roleConst.js
1002 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
const roleCreateStructure = {
id: Number,
roleName: '',
description: '',
departId: '',
departName: '',
departPath: '',
rights: '',
state: 1
}
const roleDataColumn = [{
label: '序号',
prop: 'id'
}, {
label: '角色名字',
prop: 'roleName'
}, {
label: '所属部门',
prop: 'departName'
}, {
label: '状态',
prop: 'state',
formatter: (cellValue) => {
return cellValue < 1 ? '禁止' : '启动'
}
}, {
label: '创建时间',
prop: 'createTime',
formatter: (cellValue) => {
if (cellValue.createTime) {
return new Date(cellValue.createTime).format('yyyy-MM-dd HH:mm:ss')
}
}
}]
const userRoleDetailColumn = [{
label: '序号',
prop: 'userId'
}, {
label: '账号',
prop: 'username'
}, {
label: '用户名称',
prop: 'realname'
}, {
label: '状态',
prop: 'state',
formatter: (cellValue) => {
return cellValue < 1 ? '禁止' : '启动'
}
}]
export {
roleCreateStructure,
roleDataColumn,
userRoleDetailColumn
}