Explorar o código

fix: 修改视觉算法评估展示组件

WANGKANG hai 7 meses
pai
achega
40e9b7f496

+ 6 - 1
src/views/demo/components/ShowStatisticResult.vue

@@ -1,5 +1,5 @@
 <template>
-  <el-dialog v-model="showResultDialogVisible" title="统计结果" width="700">
+  <el-dialog v-model="showResultDialogVisible" :title="props.title" width="700">
     <el-card style="width: 100%; margin-bottom: 10px">
       <div class="evaluate-data">
         <template v-for="(item, index) in ResultData" :key="index">
@@ -17,6 +17,11 @@ const props = defineProps({
   api: {
     type: Function,
     required: true
+  },
+  title: {
+    type: String,
+    required: false,
+    default: '统计结果'
   }
 })
 

+ 3 - 27
src/views/demo/trackSequence/index.vue

@@ -53,7 +53,7 @@
           icon="View"
           v-auth="['demo:DataSeq:query']"
           v-if="scope.row.status == '2' && scope.row.type == AlgorithmType2['测试']"
-          @click="previewEvaluate(scope.row)"
+          @click="showEvaluateResultRef.get_statistics_result(scope.row.id)"
         >
           结果
         </el-button>
@@ -135,6 +135,7 @@
     <ViewLog ref="viewLogRef" :get-log-api="getLogTrackSequenceApi" />
     <PreviewCompareImages ref="previewImagesRef" />
     <ShowStatisticResult ref="showStatisticResultRef" :api="getStatisticsResultToInfraredApi" />
+    <ShowStatisticResult ref="showEvaluateResultRef" :api="previewEvaluateTrackSequenceApi" title="评估结果" />
     <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">
@@ -162,24 +163,6 @@
         </template>
       </el-scrollbar>
     </el-dialog>
-    <el-dialog v-model="dialogEvaluateVisable" title="评估结果" width="700">
-      <el-card style="width: 100%; margin-bottom: 10px">
-        <div class="evaluate-data">
-          <el-tooltip effect="dark" content="方向上的相似度" placement="top-start">
-            <span>Direction: {{ evaluateData.Direction }}</span> </el-tooltip
-          ><br />
-          <el-tooltip effect="dark" content="长度上的相似度" placement="top-start">
-            <span>Length: {{ evaluateData.Length }}</span> </el-tooltip
-          ><br />
-          <el-tooltip effect="dark" content="位置上的相似度" placement="top-start">
-            <span>Position: {{ evaluateData.Position }}</span> </el-tooltip
-          ><br />
-          <el-tooltip effect="dark" content="形状上的相似度" placement="top-start">
-            <span>Shape: {{ evaluateData.Shape }}</span> </el-tooltip
-          ><br />
-        </div>
-      </el-card>
-    </el-dialog>
   </div>
 </template>
 
@@ -228,14 +211,7 @@ import PreviewCompareImages from '@/views/demo/components/PreviewCompareImages.v
 import ShowStatisticResult from '@/views/demo/components/ShowStatisticResult.vue'
 
 const showStatisticResultRef = ref()
-
-const dialogEvaluateVisable = ref(false)
-const evaluateData = ref({})
-const previewEvaluate = async (row: any) => {
-  const res: any = await previewEvaluateTrackSequenceApi(row.id)
-  evaluateData.value = res.data
-  dialogEvaluateVisable.value = true
-}
+const showEvaluateResultRef = ref()
 
 const previewImagesRef = ref()
 const preview = async row => {