1
|
|
-import { BasicColumn } from '/@/components/Table';
|
|
1
|
+import { BasicColumn, FormSchema } from '/@/components/Table';
|
2
|
2
|
import moment from 'moment';
|
3
|
3
|
import { Tag } from 'ant-design-vue';
|
4
|
4
|
import { h } from 'vue';
|
...
|
...
|
@@ -18,9 +18,9 @@ export const configColumns: BasicColumn[] = [ |
18
|
18
|
return h(
|
19
|
19
|
Tag,
|
20
|
20
|
{
|
21
|
|
- color: Number(text) === 0 ? 'blue' : 'green',
|
|
21
|
+ color: Number(text) === 1 ? 'green' : 'blue',
|
22
|
22
|
},
|
23
|
|
- () => (Number(text) === 0 ? '自定义' : '服务')
|
|
23
|
+ () => (Number(text) === 1 ? '服务' : '自定义')
|
24
|
24
|
);
|
25
|
25
|
},
|
26
|
26
|
},
|
...
|
...
|
@@ -51,27 +51,59 @@ export const configColumns: BasicColumn[] = [ |
51
|
51
|
? '#00C9A7'
|
52
|
52
|
: text == 'FAILED'
|
53
|
53
|
? 'red'
|
54
|
|
- : 'green',
|
|
54
|
+ : text == 'SUCCESSFUL'
|
|
55
|
+ ? 'green'
|
|
56
|
+ : 'red',
|
55
|
57
|
},
|
56
|
58
|
() => record?.statusName
|
57
|
59
|
);
|
58
|
60
|
},
|
59
|
61
|
},
|
60
|
62
|
{
|
61
|
|
- title: '响应结果',
|
|
63
|
+ title: '响应内容',
|
62
|
64
|
dataIndex: 'response111',
|
63
|
65
|
slots: { customRender: 'responseContent' },
|
64
|
66
|
},
|
65
|
|
- // {
|
66
|
|
- // title: '响应失败内容',
|
67
|
|
- // dataIndex: 'response.error',
|
68
|
|
- // format: (_, record) => {
|
69
|
|
- // return record?.response === null ? '无' : record?.response?.error;
|
70
|
|
- // },
|
71
|
|
- // },
|
72
|
67
|
{
|
73
|
68
|
title: '命令内容',
|
74
|
69
|
dataIndex: 'request.body',
|
75
|
70
|
slots: { customRender: 'recordContent' },
|
76
|
71
|
},
|
77
|
72
|
];
|
|
73
|
+
|
|
74
|
+export const searchFormSchema: FormSchema[] = [
|
|
75
|
+ {
|
|
76
|
+ field: 'status',
|
|
77
|
+ label: '命令状态',
|
|
78
|
+ component: 'Select',
|
|
79
|
+ colProps: { span: 6 },
|
|
80
|
+ componentProps: {
|
|
81
|
+ options: [
|
|
82
|
+ {
|
|
83
|
+ label: '队列中',
|
|
84
|
+ value: 'QUEUED',
|
|
85
|
+ },
|
|
86
|
+ {
|
|
87
|
+ label: '已发送',
|
|
88
|
+ value: 'SENT',
|
|
89
|
+ },
|
|
90
|
+ {
|
|
91
|
+ label: '发送成功',
|
|
92
|
+ value: 'DELIVERED',
|
|
93
|
+ },
|
|
94
|
+ ],
|
|
95
|
+ placeholder: '请选择命令状态',
|
|
96
|
+ },
|
|
97
|
+ },
|
|
98
|
+ {
|
|
99
|
+ field: 'sendTime',
|
|
100
|
+ label: '命令下发时间',
|
|
101
|
+ component: 'RangePicker',
|
|
102
|
+ componentProps: {
|
|
103
|
+ showTime: {
|
|
104
|
+ defaultValue: [moment('00:00:00', 'HH:mm:ss'), moment('23:59:59', 'HH:mm:ss')],
|
|
105
|
+ },
|
|
106
|
+ },
|
|
107
|
+ colProps: { span: 6 },
|
|
108
|
+ },
|
|
109
|
+]; |
...
|
...
|
|