...
|
...
|
@@ -5,11 +5,11 @@ |
5
|
5
|
<a-button type="link" class="ml-2" @click="handleRecordContent(record)"> 查看 </a-button>
|
6
|
6
|
</template>
|
7
|
7
|
<template #responseContent="{ record }">
|
8
|
|
- <Tag
|
9
|
|
- v-if="!record.request?.oneway"
|
10
|
|
- :color="record.request?.response?.status === 'SUCCESS' ? 'green' : 'red'"
|
11
|
|
- >{{ record.request?.response?.status === 'SUCCESS' ? '成功' : '失败' }}</Tag
|
12
|
|
- >
|
|
8
|
+ <div v-if="!record.request?.oneway">
|
|
9
|
+ <a-button type="link" class="ml-2" @click="handleRecordResponseContent(record)">
|
|
10
|
+ 查看
|
|
11
|
+ </a-button>
|
|
12
|
+ </div>
|
13
|
13
|
</template>
|
14
|
14
|
</BasicTable>
|
15
|
15
|
</div>
|
...
|
...
|
@@ -19,7 +19,7 @@ |
19
|
19
|
import { configColumns } from './config';
|
20
|
20
|
import { deviceCommandRecordGetQuery } from '/@/api/device/deviceConfigApi';
|
21
|
21
|
import { BasicTable, useTable } from '/@/components/Table';
|
22
|
|
- import { Modal, Tag } from 'ant-design-vue';
|
|
22
|
+ import { Modal } from 'ant-design-vue';
|
23
|
23
|
import { JsonPreview } from '/@/components/CodeEditor';
|
24
|
24
|
|
25
|
25
|
const props = defineProps({
|
...
|
...
|
@@ -54,4 +54,9 @@ |
54
|
54
|
const jsonParams = JSON.parse(record?.request?.body?.params);
|
55
|
55
|
commonModalInfo('命令下发内容', jsonParams?.params ? jsonParams?.params : jsonParams);
|
56
|
56
|
};
|
|
57
|
+ const handleRecordResponseContent = (record) => {
|
|
58
|
+ if (!record?.response) return;
|
|
59
|
+ const jsonParams = record?.response;
|
|
60
|
+ commonModalInfo('响应结果', jsonParams);
|
|
61
|
+ };
|
57
|
62
|
</script> |
...
|
...
|
|