detail.config.ts
2.93 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
import { FormSchema } from '/@/components/Form';
import { BasicColumn } from '/@/components/Table';
import { DeviceTypeEnum } from '/@/api/device/model/deviceModel';
export const columns: BasicColumn[] = [
{
title: '设备名称',
dataIndex: 'name',
width: 120,
key: 'name',
},
{
title: '设备标签',
dataIndex: 'label',
width: 100,
key: 'label',
},
{
title: '设备配置',
dataIndex: 'deviceProfile.name',
width: 160,
key: 'deviceProfile.name',
},
{
title: '设备类型',
dataIndex: 'deviceType',
key: 'deviceType',
customRender({ text }) {
return text === DeviceTypeEnum.GATEWAY
? '网关设备'
: text == DeviceTypeEnum.DIRECT_CONNECTION
? '直连设备'
: '网关子设备';
},
},
{
title: '描述',
dataIndex: 'description',
width: 180,
key: 'description',
},
];
// 实时数据
export const realTimeDataSearchSchemas: FormSchema[] = [
{
field: 'key',
label: '键 / 值',
component: 'Input',
colProps: { span: 12 },
},
];
export const realTimeDataColumns: BasicColumn[] = [
{
title: '最后更新时间',
dataIndex: 'update',
width: 120,
},
{
title: '键',
dataIndex: 'label',
width: 100,
},
{
title: '值',
dataIndex: 'name',
width: 160,
},
];
// 告警
export const alarmSearchSchemas: FormSchema[] = [
{
field: 'icon',
label: '告警状态',
component: 'Select',
colProps: { span: 6 },
},
{
field: 'icon',
label: '告警类型',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'icon',
label: ' ',
component: 'DatePicker',
colProps: { span: 6 },
},
];
export const alarmColumns: BasicColumn[] = [
{
title: '告警时间',
dataIndex: 'aaa',
width: 120,
},
{
title: '告警设备',
dataIndex: 'label',
width: 100,
},
{
title: '类型',
dataIndex: 'ccc',
width: 160,
},
{
title: '告警级别',
dataIndex: 'ddd',
width: 160,
},
{
title: '状态',
dataIndex: 'eee',
width: 160,
},
{
title: '操作',
dataIndex: 'name',
width: 160,
},
];
// 子设备
export const childDeviceSchemas: FormSchema[] = [
{
field: 'icon',
label: '设备配置',
component: 'Select',
colProps: { span: 12 },
},
{
field: 'icon',
label: '设备名称',
component: 'Input',
colProps: { span: 12 },
},
];
export const childDeviceColumns: BasicColumn[] = [
{
title: '名称',
dataIndex: 'name',
width: 120,
},
{
title: '设备配置',
dataIndex: 'label',
width: 100,
},
{
title: '标签',
dataIndex: 'aaa',
width: 160,
},
{
title: '状态',
dataIndex: 'bbb',
width: 160,
},
{
title: '最后连接时间',
dataIndex: 'ccc',
width: 160,
},
{
title: '创建时间',
dataIndex: 'ddd',
width: 160,
},
];