Browse Source

Merge branch 'tl-develop' into develop

allen 4 months ago
parent
commit
51ae3448fc

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

@@ -113,6 +113,10 @@ export const getCompareImageApi = (taskId: String) => {
   return http.get('/demo/dataAugmentation/compare/' + taskId)
 }
 
+export const getCompareImageApiNew = (taskId: String) => {
+  return http.get('/demo/dataAugmentation/imageCompare/' + taskId)
+}
+
 export const getCompareImageCountApi = (taskId: String | Number) => {
   return http.get('/demo/dataAugmentation/compare/num/' + taskId)
 }

+ 12 - 2
src/views/demo/dataAugmentation/index.vue

@@ -25,7 +25,7 @@
             <el-button type="primary" link icon="View"> 终止 </el-button>
           </template>
         </el-popconfirm>
-        <el-button type="primary" link icon="View" @click="compareDataAugmentation(scope.row)" v-if="scope.row.status == '2'"> 预览 </el-button>
+        <el-button type="primary" link icon="View" @click="preview(scope.row)" v-if="scope.row.status == '2'"> 预览 </el-button>
         <el-button type="primary" link icon="View" @click="downloadFile(scope.row)" v-if="scope.row.status == '2'"> 导出 </el-button>
         <el-button
           type="primary"
@@ -84,6 +84,7 @@
       <el-text class="mx-1">{{ logDialog }}</el-text>
     </el-dialog> -->
     <ViewLog ref="viewLogRef" :get-log-api="getDialogApi" />
+    <PreviewCompareImages ref="previewCompareImagesRef" />
     <el-dialog v-model="metricDialogVisible" title="算法结果指标" width="500px" style="text-align: center">
       <el-table :data="metricList" style="width: 100%; margin-left: 10%; text-align: left">
         <el-table-column prop="name" label="name" width="200px" />
@@ -101,6 +102,7 @@ import { ElMessageBox, ElMessage } from 'element-plus'
 import ProTable from '@/components/ProTable/index.vue'
 import ImportExcel from '@/components/ImportExcel/index.vue'
 import DataAugmentationFormDialog from '@/components/DataAugmentationFormDialog/index.vue'
+import PreviewCompareImages from '@/views/demo/components/PreviewCompareImages.vue'
 import { ProTableInstance, ColumnProps, EnumProps } from '@/components/ProTable/interface'
 import ViewLog from '@/views/demo/components/ViewLog.vue'
 import {
@@ -118,11 +120,18 @@ import {
   getCompareImageCountApi,
   getDialogApi,
   getTaskDictData,
-  getMetricApi
+  getMetricApi,
+  getCompareImageApiNew
 } from '@/api/modules/demo/dataAugmentation'
 // import {  } from '@/api/modules/system/dictData'
 import { S } from 'vite/dist/node/types.d-aGj9QkWt'
 import { servicesVersion } from 'typescript'
+
+const previewCompareImagesRef = ref()
+const preview = async row => {
+  // console.log(row)
+  await previewCompareImagesRef.value.handleOpen(getCompareImageApiNew, row.id)
+}
 const viewLogRef = ref()
 //打开指标窗口查看算法指标信息
 const metricDialogVisible = ref(false)
@@ -328,6 +337,7 @@ const batchDelete = async (ids: string[]) => {
 
 // 导出视频去抖动列表
 const downloadFile = async task => {
+  //console.log(task.outputPath)
   ElMessageBox.confirm('确认导出任务数据?', '温馨提示', { type: 'warning' }).then(() =>
     useDownload(exportDataAugmentationApi, 'export', task.outputPath)
   )

+ 1 - 9
src/views/demo/imageMosaic/index.vue

@@ -27,15 +27,7 @@
         </el-popconfirm>
         <el-button type="primary" link icon="View" @click="compareDataAugmentation(scope.row)" v-if="scope.row.status == '2'"> 预览 </el-button>
         <el-button type="primary" link icon="View" @click="downloadFile(scope.row)" v-if="scope.row.status == '2'"> 导出 </el-button>
-        <el-button
-          type="primary"
-          link
-          icon="View"
-          @click="openMetricDialog(scope.row.id)"
-          v-if="(scope.row.taskType == '图像增强' || scope.row.taskType == '图像逆光') && scope.row.status == '2'"
-        >
-          指标
-        </el-button>
+        <el-button type="primary" link icon="View" @click="openMetricDialog(scope.row.id)" v-if="scope.row.status == '2'"> 指标 </el-button>
         <el-button type="primary" link icon="View" v-auth="['demo:DataAugmentation:query']" @click="openDialog(3, '任务查看', scope.row)">
           查看
         </el-button>

+ 10 - 4
src/views/demo/targetTrack/index.vue

@@ -25,7 +25,7 @@
             <el-button type="primary" link icon="View"> 终止 </el-button>
           </template>
         </el-popconfirm>
-        <el-button type="primary" link icon="View" @click="compareDataAugmentation(scope.row)" v-if="scope.row.status == '2'"> 预览 </el-button>
+        <el-button type="primary" link icon="View" @click="preview(scope.row)" v-if="scope.row.status == '2'"> 预览 </el-button>
         <el-button type="primary" link icon="View" @click="downloadFile(scope.row)" v-if="scope.row.status == '2'"> 导出 </el-button>
         <el-button type="primary" link icon="View" @click="openMetricDialog(scope.row.id)" v-if="scope.row.status == '2'"> 指标 </el-button>
         <el-button type="primary" link icon="View" v-auth="['demo:DataAugmentation:query']" @click="openDialog(3, '任务查看', scope.row)">
@@ -86,6 +86,7 @@
       </div>
     </el-dialog>
     <ViewLog ref="viewLogRef" :get-log-api="getDialogApi" />
+    <PreviewCompareImages ref="previewCompareImagesRef" />
     <el-dialog v-model="metricDialogVisible" title="算法结果指标" width="500px" style="text-align: center">
       <el-table :data="metricList" style="width: 100%; margin-left: 10%; text-align: left">
         <el-table-column prop="name" label="name" width="200px" />
@@ -103,7 +104,7 @@ import { ElMessageBox, ElMessage } from 'element-plus'
 import ProTable from '@/components/ProTable/index.vue'
 import ImportExcel from '@/components/ImportExcel/index.vue'
 import ViewLog from '@/views/demo/components/ViewLog.vue'
-
+import PreviewCompareImages from '@/views/demo/components/PreviewCompareImages.vue'
 import DataAugmentationFormDialog from '@/components/DataAugmentationFormDialog/index.vue'
 import { ProTableInstance, ColumnProps, EnumProps } from '@/components/ProTable/interface'
 import {
@@ -122,7 +123,8 @@ import {
   getDialogApi,
   getTaskDictData,
   getMetricApi,
-  getVideoUrl
+  getVideoUrl,
+  getCompareImageApiNew
 } from '@/api/modules/demo/dataAugmentation'
 // import { VideoPlayer } from 'vue-video-player'
 // import 'vue-video-player/dist/simple.css'
@@ -162,7 +164,11 @@ import {
 //     fluid: true // 响应式布局
 //   }
 // }
-
+const previewCompareImagesRef = ref()
+const preview = async row => {
+  // console.log(row)
+  await previewCompareImagesRef.value.handleOpen(getCompareImageApiNew, row.id)
+}
 const handleClose = () => {
   if (intervalChangeFps.value) {
     clearInterval(intervalChangeFps.value)