config.ts
918 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
import { h } from 'vue';
import { BasicColumn, FormSchema } from '/@/components/Table';
import { Tag } from 'ant-design-vue';
export const configColumns: BasicColumn[] = [
{
title: '通道编号',
dataIndex: 'channellNumber',
},
{
title: '设备名称',
dataIndex: 'deviceName',
},
{
title: '通道名称',
dataIndex: 'channelName',
},
{
title: '厂家',
dataIndex: 'manufacturer',
},
{
title: '开启音频',
dataIndex: 'turnOnAudio',
slots: { customRender: 'turnOnAudio' },
},
{
title: '状态',
dataIndex: 'state',
format: (text) => {
return h(
Tag,
{
color: Number(text) === 1 ? 'green' : 'blue',
},
() => (Number(text) === 1 ? '在线' : '离线')
);
},
},
{
title: '操作',
dataIndex: 'action',
},
];
export const searchFormSchema: FormSchema[] | any = [{}];