update 表格样式

qianlishi 3 years ago
parent f0c33529e7
commit 71ec8a1b73

@ -1,7 +1,6 @@
<template> <template>
<anji-crud ref="listPage" :option="crudOption"> <anji-crud ref="listPage" :option="crudOption">
<template v-slot:buttonLeftOnTable> <template v-slot:buttonLeftOnTable> </template>
</template>
<!-- <!--
<template slot="rowButton" slot-scope="props"> <template slot="rowButton" slot-scope="props">
@ -22,229 +21,231 @@ import {
accessAuthorityAdd, accessAuthorityAdd,
accessAuthorityDeleteBatch, accessAuthorityDeleteBatch,
accessAuthorityUpdate, accessAuthorityUpdate,
accessAuthorityDetail, accessAuthorityDetail
} from '@/api/accessAuthority' } from "@/api/accessAuthority";
export default { export default {
name: 'AccessAuthority', name: "AccessAuthority",
data() { data() {
return { return {
crudOption: { crudOption: {
// 使 // 使
title: '权限管理', title: "权限管理",
// //
labelWidth: '120px', labelWidth: "120px",
// //
queryFormFields: [ queryFormFields: [
{ {
inputType: 'anji-tree', // 20% inputType: "anji-tree", // 20%
anjiTreeOption: { anjiTreeOption: {
url: '/accessAuthority/menuTree', // idtreeidlabeltreelabel url: "/accessAuthority/menuTree", // idtreeidlabeltreelabel
enableFilter: true, // tree input enableFilter: true, // tree input
isOpen: true, // true tree false isOpen: true // true tree false
}, },
label: '所属菜单', label: "所属菜单",
field: 'target', field: "target"
}, },
{ {
inputType: 'anji-select', //form input|input-number|anji-select(urldictCode)|anji-tree()|date|datetime|datetimerange inputType: "anji-select", //form input|input-number|anji-select(urldictCode)|anji-tree()|date|datetime|datetimerange
anjiSelectOption: { anjiSelectOption: {
dictCode: 'ENABLE_FLAG', dictCode: "ENABLE_FLAG"
}, },
label: '启用状态', label: "启用状态",
field: 'enableFlag', field: "enableFlag"
}, },
{ {
inputType: 'input', inputType: "input",
label: '菜单代码', label: "菜单代码",
field: 'target', field: "target"
}, },
{ {
inputType: 'input', inputType: "input",
label: '菜单名称', label: "菜单名称",
field: 'targetName', field: "targetName"
}, },
{ {
inputType: 'input', inputType: "input",
label: '按钮代码', label: "按钮代码",
field: 'action', field: "action"
}, },
{ {
inputType: 'input', inputType: "input",
label: '按钮名称', label: "按钮名称",
field: 'actionName', field: "actionName"
}, }
], ],
// //
buttons: { buttons: {
query: { query: {
api: accessAuthorityList, api: accessAuthorityList,
permission: 'authorityManage:query', permission: "authorityManage:query"
}, },
queryByPrimarykey: { queryByPrimarykey: {
api: accessAuthorityDetail, api: accessAuthorityDetail,
permission: 'authorityManage:query', permission: "authorityManage:query"
}, },
add: { add: {
api: accessAuthorityAdd, api: accessAuthorityAdd,
permission: 'authorityManage:insert', permission: "authorityManage:insert"
}, },
delete: { delete: {
api: accessAuthorityDeleteBatch, api: accessAuthorityDeleteBatch,
permission: 'authorityManage:delete', permission: "authorityManage:delete"
}, },
edit: { edit: {
api: accessAuthorityUpdate, api: accessAuthorityUpdate,
permission: 'authorityManage:update', permission: "authorityManage:update"
}, },
customButton: {
operationWidth: "150px"
}
}, },
// //
columns: [ columns: [
{ {
label: '', label: "",
field: 'id', field: "id",
primaryKey: true, // , primaryKey: true, // ,
tableHide: true, // tableHide: true, //
editHide: true, // editHide: true //
}, },
{ {
label: '菜单代码', // label: "菜单代码", //
placeholder: '', placeholder: "",
field: 'target', field: "target",
editField: 'target', editField: "target",
tableHide: true, // tableHide: true, //
inputType: 'input', inputType: "input",
rules: [ rules: [
{ required: true, message: '目标菜单必填', trigger: 'blur' }, { required: true, message: "目标菜单必填", trigger: "blur" },
{ min: 1, max: 64, message: '不超过64个字符', trigger: 'blur' }, { min: 1, max: 64, message: "不超过64个字符", trigger: "blur" }
], ],
disabled: false, disabled: false
}, },
{ {
label: '菜单名称', // label: "菜单名称", //
placeholder: '', placeholder: "",
field: 'targetName', field: "targetName",
sortable: true, sortable: true,
fieldTableRowRenderer: (row) => { fieldTableRowRenderer: row => {
return `${row['targetName']}[${row['target']}]` return `${row["targetName"]}[${row["target"]}]`;
}, },
editField: 'targetName', editField: "targetName",
inputType: 'input', inputType: "input",
rules: [ rules: [
{ required: true, message: '目标菜单名称必填', trigger: 'blur' }, { required: true, message: "目标菜单名称必填", trigger: "blur" },
{ min: 1, max: 128, message: '不超过128个字符', trigger: 'blur' }, { min: 1, max: 128, message: "不超过128个字符", trigger: "blur" }
], ],
disabled: false, disabled: false
}, },
{ {
label: '按钮代码', // label: "按钮代码", //
placeholder: '', placeholder: "",
field: 'action', field: "action",
tableHide: true, // tableHide: true, //
editField: 'action', editField: "action",
inputType: 'input', inputType: "input",
rules: [ rules: [
{ required: true, message: '目标必填', trigger: 'blur' }, { required: true, message: "目标必填", trigger: "blur" },
{ min: 1, max: 64, message: '不超过64个字符', trigger: 'blur' }, { min: 1, max: 64, message: "不超过64个字符", trigger: "blur" }
], ],
disabled: false, disabled: false
}, },
{ {
label: '按钮名称', // label: "按钮名称", //
placeholder: '', placeholder: "",
field: 'actionName', field: "actionName",
fieldTableRowRenderer: (row) => { fieldTableRowRenderer: row => {
return `${row['actionName']}[${row['action']}]` return `${row["actionName"]}[${row["action"]}]`;
}, },
sortable: true, sortable: true,
editField: 'actionName', editField: "actionName",
inputType: 'input', inputType: "input",
rules: [ rules: [
{ required: true, message: '目标按钮名称必填', trigger: 'blur' }, { required: true, message: "目标按钮名称必填", trigger: "blur" },
{ min: 1, max: 128, message: '不超过128个字符', trigger: 'blur' }, { min: 1, max: 128, message: "不超过128个字符", trigger: "blur" }
], ],
disabled: false, disabled: false
}, },
{ {
label: '启用状态', //0-- 1-- DIC_NAME=ENABLE_FLAG label: "启用状态", //0-- 1-- DIC_NAME=ENABLE_FLAG
placeholder: '', placeholder: "",
field: 'enableFlag', field: "enableFlag",
fieldTableRowRenderer: (row) => { fieldTableRowRenderer: row => {
return this.getDictLabelByCode('ENABLE_FLAG', row['enableFlag']) return this.getDictLabelByCode("ENABLE_FLAG", row["enableFlag"]);
}, },
editField: 'enableFlag', editField: "enableFlag",
inputType: 'anji-select', inputType: "anji-select",
anjiSelectOption: { anjiSelectOption: {
dictCode: 'ENABLE_FLAG', // dictCode: "ENABLE_FLAG" //
}, },
colorStyle: { colorStyle: {
0: 'table-danger', //keyeditField'': 'danger','': 'primary','绿': 'success','': 'warning','': 'info','''' 0: "table-danger", //keyeditField'': 'danger','': 'primary','绿': 'success','': 'warning','': 'info',''''
1: 'table-success', 1: "table-success"
}, },
rules: [ rules: [
{ required: true, message: '启用状态必填', trigger: 'blur' }, { required: true, message: "启用状态必填", trigger: "blur" }
], ],
disabled: false, disabled: false
}, },
{ {
label: '排序', // label: "排序", //
placeholder: '', placeholder: "",
field: 'sort', field: "sort",
editField: 'sort', editField: "sort",
inputType: 'input', inputType: "input",
rules: [], rules: [],
disabled: false, disabled: false
}, },
{ {
label: '创建人', label: "创建人",
placeholder: '', placeholder: "",
field: 'createBy', field: "createBy",
columnType: 'expand', columnType: "expand",
editField: 'createBy', editField: "createBy",
inputType: 'input', inputType: "input",
editHide: 'hideOnAdd', // true/false/'hideOnAdd hideOnView hideOnEdit' editHide: "hideOnAdd", // true/false/'hideOnAdd hideOnView hideOnEdit'
disabled: true, disabled: true
}, },
{ {
label: '创建时间', label: "创建时间",
placeholder: '', placeholder: "",
field: 'createTime', field: "createTime",
columnType: 'expand', columnType: "expand",
editField: 'createTime', editField: "createTime",
inputType: 'input', inputType: "input",
editHide: 'hideOnAdd', // true/false/'hideOnAdd hideOnView hideOnEdit' editHide: "hideOnAdd", // true/false/'hideOnAdd hideOnView hideOnEdit'
disabled: true, disabled: true
}, },
{ {
label: '修改人', label: "修改人",
placeholder: '', placeholder: "",
field: 'updateBy', field: "updateBy",
columnType: 'expand', columnType: "expand",
editField: 'updateBy', editField: "updateBy",
inputType: 'input', inputType: "input",
editHide: 'hideOnAdd', // true/false/'hideOnAdd hideOnView hideOnEdit' editHide: "hideOnAdd", // true/false/'hideOnAdd hideOnView hideOnEdit'
disabled: true, disabled: true
}, },
{ {
label: '修改时间', label: "修改时间",
placeholder: '', placeholder: "",
field: 'updateTime', field: "updateTime",
columnType: 'expand', columnType: "expand",
editField: 'updateTime', editField: "updateTime",
inputType: 'input', inputType: "input",
editHide: 'hideOnAdd', // true/false/'hideOnAdd hideOnView hideOnEdit' editHide: "hideOnAdd", // true/false/'hideOnAdd hideOnView hideOnEdit'
disabled: true, disabled: true
}, }
], ]
}, }
} };
}, },
created() {}, created() {},
methods: {}, methods: {}
} };
</script> </script>

@ -1,14 +1,22 @@
<template> <template>
<anji-crud ref="listPage" :option="crudOption"> <anji-crud ref="listPage" :option="crudOption">
<template v-slot:buttonLeftOnTable> <template v-slot:buttonLeftOnTable> </template>
</template>
<template slot="rowButton" slot-scope="props"> <template slot="rowButton" slot-scope="props">
<el-button type="text" @click="handleOpenDialogSetAuthorityForRole(props)" v-permission="'roleManage:grantAuthority'"></el-button> <el-button
type="text"
@click="handleOpenDialogSetAuthorityForRole(props)"
v-permission="'roleManage:grantAuthority'"
>分配权限</el-button
>
</template> </template>
<!--自定义的卡片插槽将在编辑详情页面出现在底部新卡片--> <!--自定义的卡片插槽将在编辑详情页面出现在底部新卡片-->
<template v-slot:pageSection> <template v-slot:pageSection>
<RoleAuthority :role-code="roleCode" :visib="dialogVisibleSetAuthorityForRole" @handleClose="dialogVisibleSetAuthorityForRole = false" /> <RoleAuthority
:role-code="roleCode"
:visib="dialogVisibleSetAuthorityForRole"
@handleClose="dialogVisibleSetAuthorityForRole = false"
/>
</template> </template>
</anji-crud> </anji-crud>
</template> </template>
@ -18,176 +26,178 @@ import {
accessRoleAdd, accessRoleAdd,
accessRoleDeleteBatch, accessRoleDeleteBatch,
accessRoleUpdate, accessRoleUpdate,
accessRoleDetail, accessRoleDetail
} from '@/api/accessRole' } from "@/api/accessRole";
import RoleAuthority from '@/views/accessRole/components/RoleAuthority' import RoleAuthority from "@/views/accessRole/components/RoleAuthority";
export default { export default {
name: 'AccessRole', name: "AccessRole",
components: { components: {
RoleAuthority: RoleAuthority, RoleAuthority: RoleAuthority
}, },
data() { data() {
return { return {
// //
dialogVisibleSetAuthorityForRole: false, dialogVisibleSetAuthorityForRole: false,
roleCode: '', roleCode: "",
// 使 // 使
crudOption: { crudOption: {
// 使 // 使
title: '角色管理', title: "角色管理",
// //
labelWidth: '120px', labelWidth: "120px",
// //
queryFormFields: [ queryFormFields: [
{ {
inputType: 'input', inputType: "input",
label: '角色编码', label: "角色编码",
field: 'roleCode', field: "roleCode"
}, },
{ {
inputType: 'input', inputType: "input",
label: '角色名称', label: "角色名称",
field: 'roleName', field: "roleName"
}, },
{ {
inputType: 'anji-select', //form input|input-number|anji-select(urldictCode)|anji-tree()|date|datetime|datetimerange inputType: "anji-select", //form input|input-number|anji-select(urldictCode)|anji-tree()|date|datetime|datetimerange
anjiSelectOption: { anjiSelectOption: {
dictCode: 'ENABLE_FLAG', dictCode: "ENABLE_FLAG"
}, },
label: '启用状态', label: "启用状态",
field: 'enableFlag', field: "enableFlag"
}, }
], ],
// //
buttons: { buttons: {
query: { query: {
api: accessRoleList, api: accessRoleList,
permission: 'roleManage:query', permission: "roleManage:query"
}, },
queryByPrimarykey: { queryByPrimarykey: {
api: accessRoleDetail, api: accessRoleDetail,
permission: 'roleManage:query', permission: "roleManage:query"
}, },
add: { add: {
api: accessRoleAdd, api: accessRoleAdd,
permission: 'roleManage:insert', permission: "roleManage:insert"
}, },
delete: { delete: {
api: accessRoleDeleteBatch, api: accessRoleDeleteBatch,
permission: 'roleManage:delete', permission: "roleManage:delete"
}, },
edit: { edit: {
api: accessRoleUpdate, api: accessRoleUpdate,
permission: 'roleManage:update', permission: "roleManage:update"
}, },
customButton: {
operationWidth: "150px"
}
}, },
// //
columns: [ columns: [
{ {
label: '', label: "",
field: 'id', field: "id",
primaryKey: true, // , primaryKey: true, // ,
tableHide: true, // tableHide: true, //
editHide: true, // editHide: true //
}, },
{ {
label: '角色编码', label: "角色编码",
placeholder: '', placeholder: "",
field: 'roleCode', field: "roleCode",
editField: 'roleCode', editField: "roleCode",
tableHide: true, // tableHide: true, //
inputType: 'input', inputType: "input",
rules: [ rules: [
{ required: true, message: '角色编码必填', trigger: 'blur' }, { required: true, message: "角色编码必填", trigger: "blur" },
{ min: 1, max: 32, message: '不超过32个字符', trigger: 'blur' }, { min: 1, max: 32, message: "不超过32个字符", trigger: "blur" }
], ],
disabled: false, disabled: false
}, },
{ {
label: '角色名称', label: "角色名称",
placeholder: '', placeholder: "",
field: 'roleName', field: "roleName",
fieldTableRowRenderer: (row) => { fieldTableRowRenderer: row => {
return `${row['roleName']}[${row['roleCode']}]` return `${row["roleName"]}[${row["roleCode"]}]`;
}, },
editField: 'roleName', editField: "roleName",
inputType: 'input', inputType: "input",
rules: [ rules: [
{ required: true, message: '角色名称必填', trigger: 'blur' }, { required: true, message: "角色名称必填", trigger: "blur" },
{ min: 1, max: 64, message: '不超过64个字符', trigger: 'blur' }, { min: 1, max: 64, message: "不超过64个字符", trigger: "blur" }
], ],
disabled: false, disabled: false
}, },
{ {
label: '启用状态', //0-- 1-- DIC_NAME=ENABLE_FLAG label: "启用状态", //0-- 1-- DIC_NAME=ENABLE_FLAG
placeholder: '', placeholder: "",
field: 'enableFlag', field: "enableFlag",
fieldTableRowRenderer: (row) => { fieldTableRowRenderer: row => {
return this.getDictLabelByCode('ENABLE_FLAG', row['enableFlag']) return this.getDictLabelByCode("ENABLE_FLAG", row["enableFlag"]);
}, },
editField: 'enableFlag', editField: "enableFlag",
inputType: 'anji-select', inputType: "anji-select",
anjiSelectOption: { anjiSelectOption: {
dictCode: 'ENABLE_FLAG', // dictCode: "ENABLE_FLAG" //
}, },
colorStyle: { colorStyle: {
0: 'table-danger', //keyeditField'': 'danger','': 'primary','绿': 'success','': 'warning','': 'info','''' 0: "table-danger", //keyeditField'': 'danger','': 'primary','绿': 'success','': 'warning','': 'info',''''
1: 'table-success', 1: "table-success"
}, },
rules: [ rules: [
{ required: true, message: '启用状态必填', trigger: 'blur' }, { required: true, message: "启用状态必填", trigger: "blur" }
], ],
disabled: false, disabled: false
}, },
{ {
label: '创建人', label: "创建人",
placeholder: '', placeholder: "",
field: 'createBy', field: "createBy",
editField: 'createBy', editField: "createBy",
inputType: 'input', inputType: "input",
editHide: 'hideOnAdd', // true/false/'hideOnAdd hideOnView hideOnEdit' editHide: "hideOnAdd", // true/false/'hideOnAdd hideOnView hideOnEdit'
disabled: true, disabled: true
}, },
{ {
label: '创建时间', label: "创建时间",
placeholder: '', placeholder: "",
field: 'createTime', field: "createTime",
editField: 'createTime', editField: "createTime",
inputType: 'input', inputType: "input",
editHide: 'hideOnAdd', // true/false/'hideOnAdd hideOnView hideOnEdit' editHide: "hideOnAdd", // true/false/'hideOnAdd hideOnView hideOnEdit'
disabled: true, disabled: true
}, },
{ {
label: '修改人', label: "修改人",
placeholder: '', placeholder: "",
field: 'updateBy', field: "updateBy",
editField: 'updateBy', editField: "updateBy",
inputType: 'input', inputType: "input",
editHide: 'hideOnAdd', // true/false/'hideOnAdd hideOnView hideOnEdit' editHide: "hideOnAdd", // true/false/'hideOnAdd hideOnView hideOnEdit'
disabled: true, disabled: true
}, },
{ {
label: '修改时间', label: "修改时间",
placeholder: '', placeholder: "",
field: 'updateTime', field: "updateTime",
editField: 'updateTime', editField: "updateTime",
inputType: 'input', inputType: "input",
editHide: 'hideOnAdd', // true/false/'hideOnAdd hideOnView hideOnEdit' editHide: "hideOnAdd", // true/false/'hideOnAdd hideOnView hideOnEdit'
disabled: true, disabled: true
}, }
], ]
}, }
} };
}, },
created() {}, created() {},
methods: { methods: {
handleOpenDialogSetAuthorityForRole(props) { handleOpenDialogSetAuthorityForRole(props) {
this.roleCode = props.msg.roleCode this.roleCode = props.msg.roleCode;
this.dialogVisibleSetAuthorityForRole = true this.dialogVisibleSetAuthorityForRole = true;
}, }
}, }
} };
</script> </script>

@ -1,15 +1,23 @@
<template> <template>
<anji-crud ref="listPage" :option="crudOption"> <anji-crud ref="listPage" :option="crudOption">
<template v-slot:buttonLeftOnTable> <template v-slot:buttonLeftOnTable> </template>
</template>
<template slot="rowButton" slot-scope="props"> <template slot="rowButton" slot-scope="props">
<el-button type="text" @click="handleOpenDialogSetRoleForUser(props)" v-permission="'userManage:grantRole'"></el-button> <el-button
type="text"
@click="handleOpenDialogSetRoleForUser(props)"
v-permission="'userManage:grantRole'"
>分配角色</el-button
>
<!--<el-button type="text" @click="handleOpenDialogSetRoleForUser(props)" v-permission="'userManage:resetPassword'"></el-button>--> <!--<el-button type="text" @click="handleOpenDialogSetRoleForUser(props)" v-permission="'userManage:resetPassword'"></el-button>-->
</template> </template>
<!--自定义的卡片插槽将在编辑详情页面出现在底部新卡片--> <!--自定义的卡片插槽将在编辑详情页面出现在底部新卡片-->
<template v-slot:pageSection> <template v-slot:pageSection>
<UserRole :login-name="loginName" :visib="dialogVisibleSetRoleForUser" @handleClose="dialogVisibleSetRoleForUser = false" /> <UserRole
:login-name="loginName"
:visib="dialogVisibleSetRoleForUser"
@handleClose="dialogVisibleSetRoleForUser = false"
/>
</template> </template>
</anji-crud> </anji-crud>
</template> </template>
@ -19,112 +27,115 @@ import {
accessUserAdd, accessUserAdd,
accessUserDeleteBatch, accessUserDeleteBatch,
accessUserUpdate, accessUserUpdate,
accessUserDetail, accessUserDetail
} from '@/api/accessUser' } from "@/api/accessUser";
import UserRole from '@/views/accessUser/components/UserRole' import UserRole from "@/views/accessUser/components/UserRole";
export default { export default {
name: 'AccessUser', name: "AccessUser",
components: { components: {
UserRole: UserRole, UserRole: UserRole
}, },
data() { data() {
return { return {
// //
dialogVisibleSetRoleForUser: false, dialogVisibleSetRoleForUser: false,
loginName: '', loginName: "",
// 使 // 使
crudOption: { crudOption: {
// 使 // 使
title: '用户管理', title: "用户管理",
// //
labelWidth: '120px', labelWidth: "120px",
// //
queryFormFields: [ queryFormFields: [
{ {
inputType: 'anji-select', //form input|input-number|anji-select(urldictCode)|anji-tree()|date|datetime|datetimerange inputType: "anji-select", //form input|input-number|anji-select(urldictCode)|anji-tree()|date|datetime|datetimerange
anjiSelectOption: { anjiSelectOption: {
dictCode: 'ENABLE_FLAG', dictCode: "ENABLE_FLAG"
}, },
label: '启用状态', label: "启用状态",
field: 'enableFlag', field: "enableFlag"
}, },
{ {
inputType: 'input', inputType: "input",
label: '登录名', label: "登录名",
field: 'loginName', field: "loginName"
}, },
{ {
inputType: 'input', inputType: "input",
label: '真实姓名', label: "真实姓名",
field: 'realName', field: "realName"
}, },
{ {
inputType: 'input', inputType: "input",
label: '手机号', label: "手机号",
field: 'phone', field: "phone"
}, }
], ],
// //
buttons: { buttons: {
query: { query: {
api: accessUserList, api: accessUserList,
permission: 'userManage:query', permission: "userManage:query"
}, },
queryByPrimarykey: { queryByPrimarykey: {
api: accessUserDetail, api: accessUserDetail,
permission: 'userManage:query', permission: "userManage:query"
}, },
add: { add: {
api: accessUserAdd, api: accessUserAdd,
permission: 'userManage:insert', permission: "userManage:insert"
}, },
delete: { delete: {
api: accessUserDeleteBatch, api: accessUserDeleteBatch,
permission: 'userManage:delete', permission: "userManage:delete"
}, },
edit: { edit: {
api: accessUserUpdate, api: accessUserUpdate,
permission: 'userManage:update', permission: "userManage:update"
}, },
customButton: {
operationWidth: "150px"
}
}, },
// //
columns: [ columns: [
{ {
label: '', label: "",
field: 'id', field: "id",
primaryKey: true, // , primaryKey: true, // ,
tableHide: true, // tableHide: true, //
editHide: true, // editHide: true //
}, },
{ {
label: '登录名', label: "登录名",
placeholder: '', placeholder: "",
field: 'loginName', field: "loginName",
tableHide: true, // tableHide: true, //
editField: 'loginName', editField: "loginName",
inputType: 'input', inputType: "input",
rules: [ rules: [
{ required: true, message: '登录名必填', trigger: 'blur' }, { required: true, message: "登录名必填", trigger: "blur" },
{ min: 1, max: 64, message: '不超过64个字符', trigger: 'blur' }, { min: 1, max: 64, message: "不超过64个字符", trigger: "blur" }
], ],
disabled: false, disabled: false
}, },
{ {
label: '真实姓名', label: "真实姓名",
placeholder: '', placeholder: "",
field: 'realName', field: "realName",
fieldTableRowRenderer: (row) => { fieldTableRowRenderer: row => {
return `${row['realName']}[${row['loginName']}]` return `${row["realName"]}[${row["loginName"]}]`;
}, },
editField: 'realName', editField: "realName",
inputType: 'input', inputType: "input",
rules: [ rules: [
{ required: true, message: '真实姓名必填', trigger: 'blur' }, { required: true, message: "真实姓名必填", trigger: "blur" },
{ min: 1, max: 64, message: '不超过64个字符', trigger: 'blur' }, { min: 1, max: 64, message: "不超过64个字符", trigger: "blur" }
], ],
disabled: false, disabled: false
}, },
// { // {
// label: '', // label: '',
@ -141,131 +152,130 @@ export default {
// disabled: false, // disabled: false,
// }, // },
{ {
label: '手机号码', label: "手机号码",
placeholder: '', placeholder: "",
field: 'phone', field: "phone",
editField: 'phone', editField: "phone",
inputType: 'input', inputType: "input",
rules: [ rules: [
{ min: 1, max: 16, message: '不超过16个字符', trigger: 'blur' }, { min: 1, max: 16, message: "不超过16个字符", trigger: "blur" }
], ],
disabled: false, disabled: false
}, },
{ {
label: '用户邮箱', label: "用户邮箱",
placeholder: '', placeholder: "",
field: 'email', field: "email",
editField: 'email', editField: "email",
inputType: 'input', inputType: "input",
rules: [ rules: [
{ min: 1, max: 64, message: '不超过64个字符', trigger: 'blur' }, { min: 1, max: 64, message: "不超过64个字符", trigger: "blur" }
], ],
disabled: false, disabled: false
}, },
{ {
label: '备注', label: "备注",
placeholder: '', placeholder: "",
field: 'remark', field: "remark",
editField: 'remark', editField: "remark",
inputType: 'input', inputType: "input",
rules: [ rules: [
{ min: 1, max: 512, message: '不超过512个字符', trigger: 'blur' }, { min: 1, max: 512, message: "不超过512个字符", trigger: "blur" }
], ],
disabled: false, disabled: false
}, },
{ {
label: '启用状态', //0-- 1-- DIC_NAME=ENABLE_FLAG label: "启用状态", //0-- 1-- DIC_NAME=ENABLE_FLAG
placeholder: '', placeholder: "",
field: 'enableFlag', field: "enableFlag",
fieldTableRowRenderer: (row) => { fieldTableRowRenderer: row => {
return this.getDictLabelByCode('ENABLE_FLAG', row['enableFlag']) return this.getDictLabelByCode("ENABLE_FLAG", row["enableFlag"]);
}, },
editField: 'enableFlag', editField: "enableFlag",
inputType: 'anji-select', inputType: "anji-select",
anjiSelectOption: { anjiSelectOption: {
dictCode: 'ENABLE_FLAG', // dictCode: "ENABLE_FLAG" //
}, },
colorStyle: { colorStyle: {
0: 'table-danger', //keyeditField'': 'danger','': 'primary','绿': 'success','': 'warning','': 'info','''' 0: "table-danger", //keyeditField'': 'danger','': 'primary','绿': 'success','': 'warning','': 'info',''''
1: 'table-success', 1: "table-success"
}, },
rules: [ rules: [
{ required: true, message: '启用状态必填', trigger: 'blur' }, { required: true, message: "启用状态必填", trigger: "blur" }
], ],
disabled: false, disabled: false
}, },
{ {
label: '最后一次登陆时间', label: "最后一次登陆时间",
placeholder: '', placeholder: "",
field: 'lastLoginTime', field: "lastLoginTime",
editField: 'lastLoginTime', editField: "lastLoginTime",
inputType: 'input', inputType: "input",
rules: [], rules: [],
disabled: true, disabled: true
}, },
{ {
label: '最后一次登录IP', label: "最后一次登录IP",
placeholder: '', placeholder: "",
field: 'lastLoginIp', field: "lastLoginIp",
editField: 'lastLoginIp', editField: "lastLoginIp",
inputType: 'input', inputType: "input",
rules: [ rules: [
{ min: 1, max: 16, message: '不超过16个字符', trigger: 'blur' }, { min: 1, max: 16, message: "不超过16个字符", trigger: "blur" }
], ],
disabled: true, disabled: true
}, },
{ {
label: '创建人', label: "创建人",
placeholder: '', placeholder: "",
field: 'createBy', field: "createBy",
columnType: 'expand', columnType: "expand",
editField: 'createBy', editField: "createBy",
inputType: 'input', inputType: "input",
editHide: 'hideOnAdd', // true/false/'hideOnAdd hideOnView hideOnEdit' editHide: "hideOnAdd", // true/false/'hideOnAdd hideOnView hideOnEdit'
disabled: true, disabled: true
}, },
{ {
label: '创建时间', label: "创建时间",
placeholder: '', placeholder: "",
field: 'createTime', field: "createTime",
columnType: 'expand', columnType: "expand",
editField: 'createTime', editField: "createTime",
inputType: 'input', inputType: "input",
editHide: 'hideOnAdd', // true/false/'hideOnAdd hideOnView hideOnEdit' editHide: "hideOnAdd", // true/false/'hideOnAdd hideOnView hideOnEdit'
disabled: true, disabled: true
}, },
{ {
label: '修改人', label: "修改人",
placeholder: '', placeholder: "",
field: 'updateBy', field: "updateBy",
columnType: 'expand', columnType: "expand",
editField: 'updateBy', editField: "updateBy",
inputType: 'input', inputType: "input",
editHide: 'hideOnAdd', // true/false/'hideOnAdd hideOnView hideOnEdit' editHide: "hideOnAdd", // true/false/'hideOnAdd hideOnView hideOnEdit'
disabled: true, disabled: true
}, },
{ {
label: '修改时间', label: "修改时间",
placeholder: '', placeholder: "",
field: 'updateTime', field: "updateTime",
columnType: 'expand', columnType: "expand",
editField: 'updateTime', editField: "updateTime",
inputType: 'input', inputType: "input",
editHide: 'hideOnAdd', // true/false/'hideOnAdd hideOnView hideOnEdit' editHide: "hideOnAdd", // true/false/'hideOnAdd hideOnView hideOnEdit'
disabled: true, disabled: true
}, }
], ]
}, }
} };
}, },
created() {}, created() {},
methods: { methods: {
handleOpenDialogSetRoleForUser(props) { handleOpenDialogSetRoleForUser(props) {
this.loginName = props.msg.loginName this.loginName = props.msg.loginName;
this.dialogVisibleSetRoleForUser = true this.dialogVisibleSetRoleForUser = true;
}, }
}, }
} };
</script> </script>

Loading…
Cancel
Save