OnlineUser.data.ts
1.1 KB
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
59
import { FormSchema } from '/@/components/Table';
import { render } from '/@/utils/common/renderUtils';
import { getToken } from '/@/utils/auth';
//列表
export const columns = [
{
title: '用户账号',
align: 'center',
dataIndex: 'username',
customRender: ({ text, record }) => {
const token = getToken();
if (record.token === token) {
return text + '(我)';
}
return text;
},
},
{
title: '用户姓名',
align: 'center',
dataIndex: 'realname',
},
{
title: '头像',
align: 'center',
width: 120,
dataIndex: 'avatar',
customRender: render.renderAvatar,
},
{
title: '生日',
align: 'center',
dataIndex: 'birthday',
},
{
title: '性别',
align: 'center',
dataIndex: 'sex',
customRender: ({ text }) => {
return render.renderDict(text, 'sex');
},
},
{
title: '手机号',
align: 'center',
dataIndex: 'phone',
},
];
//查询区域
export const searchFormSchema: FormSchema[] = [
{
field: 'username',
label: '用户账号',
component: 'Input',
colProps: { span: 6 },
},
];