1
0

4 Incheckningar f2d8555bb6 ... 84537f19cd

Upphovsman SHA1 Meddelande Datum
  28968 84537f19cd fix: bug fix 2 månader sedan
  28968 98b5c056aa Merge branch 'develop' of http://101.126.133.7:9001/www/taais-web into tl 2 månader sedan
  Suuuuuukang eabb4d82f6 fix: 图片标注显示修复 3 månader sedan
  Suuuuuukang b4e104a0d8 feat: 目标检测启动停止,下载改打开文件夹 3 månader sedan

+ 8 - 5
src/views/demo/components/img-maker.vue

@@ -66,6 +66,7 @@ const props = defineProps({
 const state = reactive({
   loading: true,
   radio: 1,
+  radioBackup: 1,
   realRadioX: 0.5,
   realRadioY: 0.5,
   imgPoint: { x: 0, y: 0 },
@@ -211,8 +212,9 @@ const loadInit = () => {
         let config = props.jsonData[i]
         let subArr = config.subArr
         console.log('ratio', state.radio)
-        const lW = imgInstance.width //* state.radio
-        const lH = imgInstance.height //* state.radio
+        state.radioBackup = state.radio
+        const lW = imgInstance.width * state.radio
+        const lH = imgInstance.height * state.radio
         let obj = new fabric.Path(
           'M ' +
             subArr[1] * lW +
@@ -754,7 +756,7 @@ const clearAll = () => {
   state.drawType = 'rectangle'
 }
 const getPoint = pi => {
-  return Math.floor(pi / state.radio)
+  return Math.floor(pi)// / state.radio
 }
 const getRealPoint = poi => {
   let dx = Math.abs(state.imgPoint.x > poi.x ? state.imgPoint.x - poi.x : state.imgPoint.x + poi.x) * state.realRadioX
@@ -807,8 +809,9 @@ const getData = () => {
           // console.log(poi)
           poi = getRealPoint(poi)
           // console.log(poi)
-          poi.x = poi.x / 1920
-          poi.y = poi.y / 1080
+          console.log('radio final:', state.radio, state.radioBackup)
+          poi.x = poi.x / 1920 / state.radioBackup
+          poi.y = poi.y / 1080 / state.radioBackup
           // console.log(poi)
           point['nodes'].push(poi)
           // point['nodes'].push(getRealPoint(poi))

+ 3 - 3
src/views/demo/dataAugmentation/index.vue

@@ -45,16 +45,16 @@
         <el-button type="primary" link icon="View" v-auth="['demo:DataAugmentation:query']" @click="openDialog(3, '任务查看', scope.row)">
           查看
         </el-button>
-        <!-- <el-button
+        <el-button
           type="primary"
           link
           icon="View"
           v-auth="['demo:DataAugmentation:query']"
           @click="viewLogRef.handleOpen(scope.row.id)"
-          v-if="scope.row.status != '0' && scope.row.status != '1'"
+          v-if="scope.row.status != '0'"
         >
           日志
-        </el-button> -->
+        </el-button>
         <el-button type="primary" link icon="Delete" v-auth="['demo:DataAugmentation:remove']" @click="deleteDataAugmentation(scope.row)">
           删除
         </el-button>

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

@@ -43,7 +43,7 @@
           icon="View"
           v-auth="['demo:DataAugmentation:query']"
           @click="viewLogRef.handleOpen(scope.row.id)"
-          v-if="scope.row.status != '0' && scope.row.status != '1'"
+          v-if="scope.row.status != '0'"
         >
           日志
         </el-button>

+ 1 - 1
src/views/demo/targetDamageAcess/index.vue

@@ -51,7 +51,7 @@
           icon="View"
           v-auth="['demo:DataAugmentation:query']"
           @click="viewLogRef.handleOpen(scope.row.id)"
-          v-if="scope.row.status != '0' && scope.row.status != '1'"
+          v-if="scope.row.status != '0'"
         >
           日志
         </el-button>

+ 1 - 1
src/views/demo/targetTrack/index.vue

@@ -43,7 +43,7 @@
           icon="View"
           v-auth="['demo:DataAugmentation:query']"
           @click="viewLogRef.handleOpen(scope.row.id)"
-          v-if="scope.row.status != '0' && scope.row.status != '1'"
+          v-if="scope.row.status != '0'"
         >
           日志
         </el-button>

+ 6 - 2
src/views/demo/traceMerge/index.vue

@@ -48,7 +48,9 @@
           <span style="min-width: 80px">
             任务文件
             <el-tooltip :content="fileDescription" placement="top">
-              <el-icon><InfoFilled /></el-icon>
+              <el-icon>
+                <InfoFilled />
+              </el-icon>
             </el-tooltip>
           </span>
 
@@ -57,7 +59,9 @@
         <el-container v-for="(item, index) in jsonParams" :key="index" style="align-items: center; margin-top: 5px">
           <span style="min-width: 80px; max-width: 150px">{{ item.name }}</span>
           <el-tooltip :content="item.prompt" placement="top">
-            <el-icon><InfoFilled /></el-icon>
+            <el-icon>
+              <InfoFilled />
+            </el-icon>
           </el-tooltip>
           <el-input v-model="item.value" :placeholder="item.defaultValue" style="max-width: 300px" />
         </el-container>

+ 2 - 0
src/views/system/config/index.vue

@@ -240,6 +240,8 @@ const setItemsOptions = () => {
       prop: 'parameters',
       rules: [{ required: true, message: '参数不能为空', trigger: 'blur' }],
       compOptions: {
+        type: 'textarea',
+        rows: 2,
         placeholder: '请输入参数'
       }
     },

+ 30 - 7
src/views/task/bizProcess/index.vue

@@ -47,11 +47,19 @@
         <!--          查看详情-->
         <!--        </el-button>-->
 
-        <el-button v-if="scope.row.name.indexOf('训练') === -1" type="primary" link icon="Refresh" @click="reRunTask(scope.row)">
-          执行任务
+        <el-button v-if="scope.row.name.indexOf('训练') === -1 && (scope.row.status === '0' || scope.row.status === '3')" type="primary" link icon="Refresh" @click="reRunTask(scope.row)">
+          开始任务
+        </el-button>
+        <el-button v-if="scope.row.name.indexOf('训练') !== -1 && (scope.row.status === '0' || scope.row.status === '3')" type="primary" link icon="Refresh" @click="startTask(scope.row)"> 开始任务 </el-button>
+        <el-button v-if="scope.row.status === '0'" type="primary" link icon="Refresh" @click="taskExecute('continue', scope.row)">
+          继续任务
+        </el-button>
+        <el-button v-if="scope.row.status === '1'" type="primary" link icon="Refresh" @click="taskExecute('pause', scope.row)">
+          暂停任务
+        </el-button>
+        <el-button v-if="scope.row.status === '1'" type="primary" link icon="Refresh" @click="taskExecute('stop', scope.row)">
+          停止任务
         </el-button>
-        <el-button v-else type="primary" link icon="Refresh" @click="startTask(scope.row)"> 开始任务 </el-button>
-
         <el-button v-if="!scope.row.name.includes('测试')" type="primary" link icon="finished" @click="showResult(scope.row)"> 结果图 </el-button>
 
         <el-button v-if="!scope.row.name.includes('训练')" type="primary" link icon="search" @click="showTimeResult(scope.row)"> 查看指标 </el-button>
@@ -60,8 +68,8 @@
           查看日志
         </el-button>
 
-        <el-button type="primary" link icon="Refresh" @click="openDir(scope.row)"> 打开文件夹 </el-button>
-        <el-button type="primary" link icon="Refresh" @click="exportData(scope.row)"> 导出结果 </el-button>
+        <el-button type="primary" link icon="document" @click="openDir(scope.row)"> 任务文件夹 </el-button>
+        <el-button type="primary" link icon="document" @click="exportData(scope.row)"> 结果文件夹 </el-button>
       </template>
     </ProTable>
     <FormDialog ref="formDialogRef" />
@@ -313,13 +321,28 @@ const startTask = row => {
     }
   })
 }
+
+const taskExecute = (type, row) => {
+  http.post<any>('/identification/identificationSubtaskDetails/' + (type === 'continue' ? 'continueTask' : type === 'pause' ? 'pauseTask' : 'stopTask'),
+    { bizId: row.id }, { loading: true }).then(res => {
+    if (res.code !== 200) {
+      ElMessage.error(res.msg)
+    } else {
+      ElMessage.success('操作成功')
+    }
+  })
+}
+
 const typeDefs = ref(reactive([]))
 
 const exportData = row => {
   http.get<any>('/identification/identificationSubtaskDetails/resultZip', { taskId: row.id }, { loading: true }).then(res => {
     console.log(res)
     if (res.code === 200) {
-      window.open(res.msg, '_blank')
+      // window.open(res.msg, '_blank')
+      http.get<any>('/identification/identificationSubtaskDetails/openDir', { directory: row.resultPath + "/weights" }, { loading: true }).then(res => {
+        console.log(res)
+      })
     }
   })
 }