ソースを参照

feat: MASC和CAT预览

WANGKANG 7 ヶ月 前
コミット
3c994ee706

+ 4 - 0
src/api/modules/demo/trackSequence.ts

@@ -106,3 +106,7 @@ export const addEvaluateTrackSequenceApi = (data: any) => {
 export const showCATModelApi = (id: string | number) => {
   return http.get('/demo/trackSequence/model/' + id, { loading: true })
 }
+
+export const previewPredictResultTrackSequenceModelApi = (id: string | number) => {
+  return http.get('/demo/trackSequence/previewPredictResult/' + id, {}, { loading: false })
+}

+ 23 - 4
src/views/demo/trackSequence/index.vue

@@ -47,6 +47,16 @@
             <el-button type="primary" link icon="Delete"> 终止</el-button>
           </template>
         </el-popconfirm>
+        <el-button
+          type="primary"
+          link
+          icon="View"
+          v-auth="['demo:DataSeq:query']"
+          v-if="scope.row.status == '2' && scope.row.type == AlgorithmType2['预测/推理']"
+          @click="preview(scope.row)"
+        >
+          预览
+        </el-button>
         <el-button
           type="primary"
           link
@@ -103,6 +113,7 @@
     <FormDialog ref="formDialogRef" />
     <ImportExcel ref="dialogRef" />
     <ViewLog ref="viewLogRef" :get-log-api="getLogTrackSequenceApi" />
+    <PreviewCompareImages ref="previewImagesRef" />
     <el-dialog v-model="showModelDialogVisible" title="模型列表" width="1000">
       <el-scrollbar ref="scrollbarRef" id="scrollbarRef1" height="500px">
         <template v-for="model in model_list" :key="model">
@@ -122,7 +133,7 @@
                   >下载
                 </el-link>
                 <el-button type="success" link @click="addModel(model.path, model.name)"
-                  ><el-icon><Plus /></el-icon>添加模型</el-button
+                  ><el-icon> <Plus /> </el-icon>添加模型</el-button
                 >
               </el-form-item>
             </el-form>
@@ -157,7 +168,8 @@ import {
   getLogTrackSequenceApi,
   getLDetailTrackSequenceApi,
   addEvaluateTrackSequenceApi,
-  showCATModelApi
+  showCATModelApi,
+  previewPredictResultTrackSequenceModelApi
 } from '@/api/modules/demo/trackSequence'
 import { enumAlgorithmModelTrackApi } from '@/api/modules/demo/AlgorithmModelTrack'
 import { getAlgorithmModelTrackApi } from '@/api/modules/demo/AlgorithmModelTrack'
@@ -170,6 +182,12 @@ import ViewLog from '@/views/demo/components/ViewLog.vue'
 import { addAlgorithmModelTrackApi } from '@/api/modules/demo/AlgorithmModelTrack'
 import useWebSocketStore from '@/stores/modules/websocket'
 import { resetHeart } from '@/utils/websocket'
+import PreviewCompareImages from '@/views/demo/components/PreviewCompareImages.vue'
+
+const previewImagesRef = ref()
+const preview = async row => {
+  previewImagesRef.value?.handleOpen(previewPredictResultTrackSequenceModelApi, row.id)
+}
 
 onMounted(() => {
   const websocketStore = useWebSocketStore()
@@ -180,7 +198,7 @@ onMounted(() => {
     if (e.data.indexOf('ping') > 0) {
       return
     }
-    // console.log(e)
+    console.log(e)
     proTable.value?.getTableList(true)
   }
 })
@@ -340,7 +358,8 @@ const addCATDialog = async () => {
   enumsAlgorithmModelTrack_______.value = []
   for (const item of result.data) {
     if (SubSystem[item['subsystem']] === '注释轨迹序列' || SubSystem[item['subsystem']] === '目标检测') {
-      item['label'] = item['label'] + '-' + SubSystem[item['subsystem']] + '-' + AlgorithmType[item['type']] + '-' + item['algorithmName']
+      item['label'] =
+        item['value'] + '_' + item['label'] + '-' + SubSystem[item['subsystem']] + '-' + AlgorithmType[item['type']] + '-' + item['algorithmName']
       enumsAlgorithmModelTrack_______.value.push(item)
     }
   }