Bläddra i källkod

Merge branch 'dev_lsk_minmax' of www/taais-web into develop

Sk18834839360 8 månader sedan
förälder
incheckning
73ea489db0
1 ändrade filer med 29 tillägg och 23 borttagningar
  1. 29 23
      src/views/task/bizProcess/index.vue

+ 29 - 23
src/views/task/bizProcess/index.vue

@@ -61,11 +61,11 @@
     <ImportExcel ref="dialogRef" />
 
     <el-dialog v-model="executedTimeVisible" title="执行时间统计" width="70%">
-      <el-container v-for="(item, index) in executedTimeData" :key="index">
+      <el-container v-for="(item, index) in executedTimeData.data" :key="index">
         <el-container style="display: flex; flex-direction: column">
-          <h4 v-if="index === 0">单幅图像最短运行时间</h4>
-          <h4 v-else-if="index === 1">单幅图像最短运行时间</h4>
-          <h4 v-else-if="index === 2">单幅图像最短运行时间</h4>
+          <h4 v-if="index === 0" style="color: greenyellow">单幅图像最短运行时间</h4>
+          <h4 v-else-if="index === 1" style="color: greenyellow">单幅图像最长运行时间</h4>
+          <h4 v-else-if="index === 2" style="color: greenyellow">单幅图像平均运行时间</h4>
           <div style="display: flex; flex-direction: row">
             <h5>前处理用时: {{ item['preprocess'] }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</h5>
             <h5>推理用时: {{ item['inference'] }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</h5>
@@ -73,6 +73,14 @@
           </div>
         </el-container>
       </el-container>
+      <el-container>
+        <div v-if="executedTimeData.isVal">
+          <h4 style="color: greenyellow">虚警率</h4>
+          <h5>{{ executedTimeData.falseAlarmRate }} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</h5>
+          <h4 style="color: greenyellow">漏检率</h4>
+          <h5>{{ executedTimeData.omitDetectRate }}</h5>
+        </div>
+      </el-container>
     </el-dialog>
 
     <el-dialog v-model="dialogVisible" title="日志" width="70%">
@@ -313,27 +321,25 @@ const exportData = row => {
 }
 
 let executedTimeVisible = ref(false)
-let executedTimeData = ref([])
+let executedTimeData = ref({})
 const showExecutedTime = row => {
-  // row.remarks = '[\n' +
-  //   '{\n' +
-  //   '"preprocess": 1,\n' +
-  //   '"inference": 2,\n' +
-  //   '"postprocess": 3\n' +
-  //   '},\n' +
-  //   '{\n' +
-  //   '"preprocess": 11,\n' +
-  //   '"inference": 22,\n' +
-  //   '"postprocess": 33\n' +
-  //   '},\n' +
-  //   '{\n' +
-  //   '"preprocess": 111,\n' +
-  //   '"inference": 233,\n' +
-  //   '"postprocess": 333\n' +
-  //   '}\n' +
-  //   ']'
   try {
-    executedTimeData.value = JSON.parse(row.remarks)
+    console.log('row', row)
+    executedTimeData.value.isVal = row.name.includes('验证')
+    http.get('/profile/task' + row.resultPath + '/time.json').then(res => {
+      executedTimeData.value.data = []
+      executedTimeData.value.data.push(res[0].min)
+      executedTimeData.value.data.push(res[0].max)
+      executedTimeData.value.data.push(res[0].average)
+      if (executedTimeData.value.isVal) {
+        setTimeout(() => {
+          http.get('/profile/task' + row.resultPath + '/matrics.json').then(res => {
+            executedTimeData.value.omitDetectRate = res[1].omit_detect_rate
+            executedTimeData.value.falseAlarmRate = res[0].false_alarm_rate
+          })
+        }, 550)
+      }
+    })
   } catch (e) {
     ElMessage.error('解析JSON错误,请检查任务是否已完成')
     return