tangning 2 月之前
父節點
當前提交
ab70dd1842
共有 1 個文件被更改,包括 34 次插入20 次删除
  1. 34 20
      src/views/productOperation/cameraScene.vue

+ 34 - 20
src/views/productOperation/cameraScene.vue

@@ -61,11 +61,25 @@
             <span v-else-if="record.sceneName">{{ record.sceneName }}</span>
             <span v-else>-</span>
           </template>
-          
           <template #status="{ record }">
-            <a v-if="record.status==-1" @click="hanleDowm(record.num)">计算失败</a>
-            <span v-else>{{record.payStatus == -2 ? '封存' : record.statusString}}</span>
+            <span v-if="record.status != '-1'">{{ record.statusString }}</span>
+            <Tooltip v-else placement="right">
+              <template #title>
+                <span>失败原因:{{ record.buildErrorReason || record.buildFailReason }}</span>
+                <p v-if="record.dataSource">
+                  <span>serverPath:{{ record.dataSource }}</span>
+                </p>
+              </template>
+              <span
+                >{{ record.statusString }}
+                <Icon icon="mdi:warning-octagon-outline" />
+              </span>
+            </Tooltip>
           </template>
+          <!-- <template #status="{ record }">
+            <a v-if="record.status == -1" @click="hanleDowm(record.num)">计算失败</a>
+            <span v-else>{{ record.payStatus == -2 ? '封存' : record.statusString }}</span>
+          </template> -->
           <template #action="{ record }">
             <TableAction
               v-if="!record.isShare"
@@ -205,7 +219,7 @@
   import PowersModal from './modal/PowersModal.vue';
   import caseListModal from './modal/caseListModal.vue';
   import { Time } from '/@/components/Time';
-  import { Descriptions, Tabs, Progress } from 'ant-design-vue';
+  import { Descriptions, Tabs, Progress, Tooltip } from 'ant-design-vue';
   import { useI18n } from '/@/hooks/web/useI18n';
   import { useMessage } from '/@/hooks/web/useMessage';
   import { useModal } from '/@/components/Modal';
@@ -242,6 +256,7 @@
       [Descriptions.Item.name]: Descriptions.Item,
       QrCode,
       Icon,
+      Tooltip,
       // Tabs,
       [Tabs.name]: Tabs,
       // [Tabs.TabPane?.name]: Tabs.TabPane,
@@ -293,7 +308,7 @@
           title: '状态',
           dataIndex: 'status',
           slots: { customRender: 'status' },
-          width: 80,
+          width: 120,
           // customRender: ({ record }) => {
           //   let str;
           //   switch (record.status - 0) {
@@ -314,7 +329,6 @@
           // },
         },
         {
-
           title: '相机类型',
           dataIndex: 'type',
           defaultHidden: true,
@@ -459,7 +473,8 @@
               xl: 6,
               xxl: 6,
             },
-          },{
+          },
+          {
             field: 'type',
             label: '相机类型',
             component: 'Select',
@@ -533,7 +548,6 @@
               xxl: 5,
             },
           },
-          
         ],
       };
       function cancelDownload() {
@@ -548,7 +562,7 @@
         title: `场景列表`,
         // titleHelpMessage: ['已启用expandRowByClick', '已启用stopButtonPropagation'],
         columns: columns,
-        searchInfo: { sceneType: tableType, isObj: "1" },
+        searchInfo: { sceneType: tableType, isObj: '1' },
         useSearchForm: true,
         formConfig: searchForm,
         showTableSetting: true,
@@ -670,9 +684,9 @@
         window.open(record.thumbEdit + '&&token=' + token.value);
       }
       function hanleDowm(num) {
-        getSceneBuildLog(num).then(res =>{
+        getSceneBuildLog(num).then((res) => {
           window.open(res);
-        })
+        });
       }
       async function handleGenerate(record: Recordable) {
         console.log('record', record);
@@ -721,12 +735,12 @@
       }
       function getStatus(val) {
         let obj = {
-          0 : '计算中',
-          1 : '计算成功',
-          '-2' : '计算成功',
-          '-1' : '计算失败',
-        }
-        return obj[val]
+          0: '计算中',
+          1: '计算成功',
+          '-2': '计算成功',
+          '-1': '计算失败',
+        };
+        return obj[val];
       }
       function handlegotoEdit(record: Recordable) {
         let url = record.webSite.replace('smg', 'epg');
@@ -750,9 +764,9 @@
         }
       }
       onMounted(async () => {
-        let list = await sceneCount()
+        let list = await sceneCount();
         // let list1 = await operateSceneList({sceneType: 1})
-        if(list == 0) {
+        if (list == 0) {
           qrCodeUrl.value.show = true;
         }
 
@@ -796,7 +810,7 @@
         userInfo,
         qrCodeUrl,
         getStatus,
-        hanleDowm
+        hanleDowm,
       };
     },
   });