2021-03-04 01:25:50 +08:00
|
|
|
import { getAllRoleList } from '/@/api/demo/system';
|
2021-03-01 00:56:25 +08:00
|
|
|
import { BasicColumn } from '/@/components/Table';
|
|
|
|
|
import { FormSchema } from '/@/components/Table';
|
|
|
|
|
|
|
|
|
|
export const columns: BasicColumn[] = [
|
|
|
|
|
{
|
|
|
|
|
title: '用户名',
|
|
|
|
|
dataIndex: 'account',
|
|
|
|
|
width: 120,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '昵称',
|
|
|
|
|
dataIndex: 'nickname',
|
|
|
|
|
width: 120,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '邮箱',
|
|
|
|
|
dataIndex: 'email',
|
2021-03-10 23:39:42 +08:00
|
|
|
width: 120,
|
2021-03-01 00:56:25 +08:00
|
|
|
},
|
|
|
|
|
{
|
2021-03-01 22:54:21 +08:00
|
|
|
title: '创建时间',
|
|
|
|
|
dataIndex: 'createTime',
|
2021-03-01 00:56:25 +08:00
|
|
|
width: 180,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '角色',
|
|
|
|
|
dataIndex: 'role',
|
|
|
|
|
width: 200,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '备注',
|
|
|
|
|
dataIndex: 'remark',
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
export const searchFormSchema: FormSchema[] = [
|
|
|
|
|
{
|
|
|
|
|
field: 'account',
|
|
|
|
|
label: '用户名',
|
|
|
|
|
component: 'Input',
|
|
|
|
|
colProps: { span: 8 },
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'nickname',
|
|
|
|
|
label: '昵称',
|
|
|
|
|
component: 'Input',
|
|
|
|
|
colProps: { span: 8 },
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
export const accountFormSchema: FormSchema[] = [
|
|
|
|
|
{
|
|
|
|
|
field: 'account',
|
|
|
|
|
label: '用户名',
|
|
|
|
|
component: 'Input',
|
|
|
|
|
required: true,
|
|
|
|
|
},
|
2021-03-04 01:25:50 +08:00
|
|
|
{
|
|
|
|
|
field: 'pwd',
|
|
|
|
|
label: '密码',
|
|
|
|
|
component: 'InputPassword',
|
|
|
|
|
required: true,
|
2021-03-07 23:37:57 +08:00
|
|
|
show: false,
|
2021-03-04 01:25:50 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '角色',
|
|
|
|
|
field: 'role',
|
|
|
|
|
component: 'ApiSelect',
|
|
|
|
|
componentProps: {
|
|
|
|
|
api: getAllRoleList,
|
|
|
|
|
labelField: 'roleName',
|
|
|
|
|
valueField: 'roleValue',
|
|
|
|
|
},
|
|
|
|
|
required: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'dept',
|
|
|
|
|
label: '所属部门',
|
|
|
|
|
component: 'TreeSelect',
|
|
|
|
|
componentProps: {
|
|
|
|
|
replaceFields: {
|
|
|
|
|
title: 'deptName',
|
|
|
|
|
key: 'id',
|
|
|
|
|
value: 'id',
|
|
|
|
|
},
|
|
|
|
|
getPopupContainer: () => document.body,
|
|
|
|
|
},
|
|
|
|
|
required: true,
|
|
|
|
|
},
|
2021-03-01 00:56:25 +08:00
|
|
|
{
|
|
|
|
|
field: 'nickname',
|
|
|
|
|
label: '昵称',
|
|
|
|
|
component: 'Input',
|
|
|
|
|
required: true,
|
|
|
|
|
},
|
2021-03-04 01:25:50 +08:00
|
|
|
|
2021-03-01 00:56:25 +08:00
|
|
|
{
|
|
|
|
|
label: '邮箱',
|
|
|
|
|
field: 'email',
|
|
|
|
|
component: 'Input',
|
|
|
|
|
required: true,
|
|
|
|
|
},
|
2021-03-04 01:25:50 +08:00
|
|
|
|
2021-03-01 00:56:25 +08:00
|
|
|
{
|
|
|
|
|
label: '备注',
|
|
|
|
|
field: 'remark',
|
|
|
|
|
component: 'InputTextArea',
|
|
|
|
|
},
|
|
|
|
|
];
|