@ -4,7 +4,7 @@
< el -input
v - model = "listQuery.tenantId"
clearable
placeholder = "租户 "
: placeholder = "$t('common.tenant') "
style = "width: 200px"
class = "filter-item"
/ >
@ -15,7 +15,7 @@
icon = "el-icon-search"
@ click = "fetchData"
>
搜索
{ { $t ( 'common.query' ) } }
< / e l - b u t t o n >
< el -button
: disabled = "isEditDisabled"
@ -25,7 +25,7 @@
icon = "el-icon-edit"
@ click = "handleCreate"
>
添加
{ { $t ( 'common.insert' ) } }
< / e l - b u t t o n >
< / div >
< el -table
@ -35,34 +35,34 @@
highlight - current - row
element - loading - text = "Loading"
>
< el -table -column label = "序号 " width = "95" >
< el -table -column :label ="$t('common.num') " width = "95" >
< template slot -scope = " scope " > { { scope . $index + 1 } } < / template >
< / e l - t a b l e - c o l u m n >
< el -table -column label = "租户 ">
< el -table -column :label ="$t('common.tenant') ">
< template slot -scope = " scope " > { { scope . row . tenantId } } < / template >
< / e l - t a b l e - c o l u m n >
< el -table -column label = "租户名称 ">
< el -table -column :label ="$t('tenantManage.tenantName') ">
< template slot -scope = " scope " > { { scope . row . tenantName } } < / template >
< / e l - t a b l e - c o l u m n >
<!-- < el -table -column label = "租户简介" >
< template slot -scope = " scope " > { { scope . row . tenantDesc | ellipsis } } < / template >
< / e l - t a b l e - c o l u m n > - - >
< el -table -column label = "负责人 ">
< el -table -column :label ="$t('tenantManage.owner') ">
< template slot -scope = " scope " > { { scope . row . owner } } < / template >
< / e l - t a b l e - c o l u m n >
<!-- < el -table -column label = "创建时间" >
< template slot -scope = " scope " > { { scope . row . gmtCreate } } < / template >
< / e l - t a b l e - c o l u m n > - - >
< el -table -column label = "修改时间 ">
< el -table -column :label ="$t('common.updateTime') ">
< template slot -scope = " scope " > { { scope . row . gmtModified } } < / template >
< / e l - t a b l e - c o l u m n >
< el -table -column label = "操作 " width = "90" class -name = " small -padding fixed -width " >
< el -table -column :label ="$t('common.operation') " width = "90" class -name = " small -padding fixed -width " >
< template slot -scope = " { row } " >
< el -button type = "text" :disabled ="isEditDisabled" size = "small" @click ="handleUpdate(row)" >
编辑
{ { $t ( 'common.edit' ) } }
< / e l - b u t t o n >
< el -button size = "small" :disabled ="isEditDisabled" type = "text" @click ="handleDelete(row)" >
删除
{ { $t ( 'common.delete' ) } }
< / e l - b u t t o n >
< / template >
< / e l - t a b l e - c o l u m n >
@ -81,36 +81,36 @@
: rules = "rules"
: model = "temp"
label - position = "left"
label - width = "1 0 0px"
label - width = "1 2 0px"
>
< el -form -item label = "租户 " prop = "tenantId" >
< el -form -item :label ="$t('common.tenant') " prop = "tenantId" >
< el -input
v - model = "temp.tenantId"
: disabled = "dialogStatus === 'create' ? false : true"
placeholder = "租户 "
: placeholder = "$t('common.tenant') "
style = "width: 40%"
/ >
< / e l - f o r m - i t e m >
< el -form -item label = "租户名称 " prop = "tenantName" >
< el -input v -model = " temp.tenantName " placeholder = "租户名称 " style = "width: 40%" / >
< el -form -item :label ="$t('tenantManage.tenantName') " prop = "tenantName" >
< el -input v -model = " temp.tenantName " :placeholder ="$t('tenantManage.tenantName') " style = "width: 40%" / >
< / e l - f o r m - i t e m >
< el -form -item label = "负责人 " prop = "owner" >
< el -input v -model = " temp.owner " placeholder = "负责人 " style = "width: 40%" / >
< el -form -item :label ="$t('tenantManage.owner') " prop = "owner" >
< el -input v -model = " temp.owner " :placeholder ="$t('tenantManage.owner') " style = "width: 40%" / >
< / e l - f o r m - i t e m >
< el -form -item label = "租户简介 " prop = "tenantDesc" >
< el -form -item :label ="$t('tenantManage.tenantIntro') " prop = "tenantDesc" >
< el -input
v - model = "temp.tenantDesc"
: autosize = "{ minRows: 3, maxRows: 6 }"
type = "textarea"
placeholder = "租户简介 "
: placeholder = "$t('tenantManage.tenantIntro') "
style = "width: 40%"
/ >
< / e l - f o r m - i t e m >
< / e l - f o r m >
< div slot = "footer" class = "dialog-footer" >
< el -button @ click = "dialogFormVisible = false" > 取消 < / e l - b u t t o n >
< el -button @ click = "dialogFormVisible = false" > { { $t ( 'common.cancel' ) } } < / e l - b u t t o n >
< el -button type = "primary" @ click = "dialogStatus === 'create' ? createData() : updateData()" >
确认
{ { $t ( 'common.confirm' ) } }
< / e l - b u t t o n >
< / div >
< / e l - d i a l o g >
@ -120,7 +120,7 @@
< el -table -column prop = "pv" label = "Pv" / >
< / e l - t a b l e >
< span slot = "footer" class = "dialog-footer" >
< el -button type = "primary" @ click = "dialogPvVisible = false" > Confirm < / e l - b u t t o n >
< el -button type = "primary" @ click = "dialogPvVisible = false" > { { $t ( 'common.confirm' ) } } < / e l - b u t t o n >
< / span >
< / e l - d i a l o g >
< / div >
@ -170,14 +170,14 @@ export default {
dialogFormVisible : false ,
dialogStatus : '' ,
textMap : {
update : 'Edit' ,
create : 'Create' ,
update : this . $t ( 'common.edit' ) ,
create : this . $t ( 'common.create' ) ,
} ,
rules : {
tenantId : [ { required : true , message : 'this is required' , trigger : 'blur' } ] ,
tenantName : [ { required : true , message : 'this is required' , trigger : 'blur' } ] ,
owner : [ { required : true , message : 'this is required' , trigger : 'blur' } ] ,
tenantDesc : [ { required : true , message : 'this is required' , trigger : 'blur' } ] ,
tenantId : [ { required : true , message : this . $t ( 'common.requiredError' ) , trigger : 'blur' } ] ,
tenantName : [ { required : true , message : this . $t ( 'common.requiredError' ) , trigger : 'blur' } ] ,
owner : [ { required : true , message : this . $t ( 'common.requiredError' ) , trigger : 'blur' } ] ,
tenantDesc : [ { required : true , message : this . $t ( 'common.requiredError' ) , trigger : 'blur' } ] ,
} ,
temp : {
id : undefined ,
@ -228,8 +228,8 @@ export default {
this . fetchData ( ) ;
this . dialogFormVisible = false ;
this . $notify ( {
title : 'Success' ,
message : 'Created Successfully' ,
title : this . $t ( 'message.success' ) ,
message : this . $t ( 'message.createdSuccess' ) ,
type : 'success' ,
duration : 2000 ,
} ) ;
@ -263,9 +263,9 @@ export default {
} ) ;
} ,
openDelConfirm ( name ) {
return this . $confirm ( ` 此操作将删除 ${ name } , 是否继续? ` , '提示' , {
confirmButtonText : '确定' ,
cancelButtonText : '取消' ,
return this . $confirm ( this . $t ( 'message.deleteMessage' , { name } ) , this . $t ( 'common.hint' ) , {
confirmButtonText : this . $t ( 'common.ok' ) ,
cancelButtonText : this . $t ( 'common.cancel' ) ,
type : 'warning' ,
} ) ;
} ,