| 
@@ -4,6 +4,13 @@ | 
 | 
@@ -4,6 +4,13 @@ | 
| 
4
 | 
       <template #recordContent="{ record }">
 | 
4
 | 
       <template #recordContent="{ record }">
 | 
| 
5
 | 
         <a-button type="link" class="ml-2" @click="handleRecordContent(record)"> 查看 </a-button>
 | 
5
 | 
         <a-button type="link" class="ml-2" @click="handleRecordContent(record)"> 查看 </a-button>
 | 
| 
6
 | 
       </template>
 | 
6
 | 
       </template>
 | 
| 
 | 
   | 
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
 | 
+        >
 | 
| 
 | 
   | 
13
 | 
+      </template>
 | 
| 
7
 | 
     </BasicTable>
 | 
14
 | 
     </BasicTable>
 | 
| 
8
 | 
   </div>
 | 
15
 | 
   </div>
 | 
| 
9
 | 
 </template>
 | 
16
 | 
 </template>
 | 
 | 
@@ -12,7 +19,7 @@ | 
 | 
@@ -12,7 +19,7 @@ | 
| 
12
 | 
   import { configColumns } from './config';
 | 
19
 | 
   import { configColumns } from './config';
 | 
| 
13
 | 
   import { deviceCommandRecordGetQuery } from '/@/api/device/deviceConfigApi';
 | 
20
 | 
   import { deviceCommandRecordGetQuery } from '/@/api/device/deviceConfigApi';
 | 
| 
14
 | 
   import { BasicTable, useTable } from '/@/components/Table';
 | 
21
 | 
   import { BasicTable, useTable } from '/@/components/Table';
 | 
| 
15
 | 
-  import { Modal } from 'ant-design-vue';
 | 
22
 | 
+  import { Modal, Tag } from 'ant-design-vue';
 | 
| 
16
 | 
   import { JsonPreview } from '/@/components/CodeEditor';
 | 
23
 | 
   import { JsonPreview } from '/@/components/CodeEditor';
 | 
| 
17
 | 
 
 | 
24
 | 
 
 | 
| 
18
 | 
   const props = defineProps({
 | 
25
 | 
   const props = defineProps({
 | 
 | 
@@ -42,6 +49,12 @@ | 
 | 
@@ -42,6 +49,12 @@ | 
| 
42
 | 
     });
 | 
49
 | 
     });
 | 
| 
43
 | 
   };
 | 
50
 | 
   };
 | 
| 
44
 | 
   const handleRecordContent = (record) => {
 | 
51
 | 
   const handleRecordContent = (record) => {
 | 
| 
45
 | 
-    commonModalInfo('命令下发内容', JSON.parse(record?.request?.body?.params));
 | 
52
 | 
+    try {
 | 
| 
 | 
   | 
53
 | 
+      //如果是正常格式则返回params,否则输入什么内容则显示什么内容
 | 
| 
 | 
   | 
54
 | 
+      const jsonParams = JSON.parse(record?.request?.body?.params);
 | 
| 
 | 
   | 
55
 | 
+      commonModalInfo('命令下发内容', jsonParams.params ? jsonParams.params : jsonParams);
 | 
| 
 | 
   | 
56
 | 
+    } catch (e) {
 | 
| 
 | 
   | 
57
 | 
+      console.log('位置/device/list/cpns/tabs/commandRecord/index.vue', e);
 | 
| 
 | 
   | 
58
 | 
+    }
 | 
| 
46
 | 
   };
 | 
59
 | 
   };
 | 
| 
47
 | 
 </script> | 
60
 | 
 </script> |