Jelajahi Sumber

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

Sk18834839360 7 bulan lalu
induk
melakukan
3fcf80e79d

+ 1 - 1
src/api/modules/task/task.ts

@@ -75,7 +75,7 @@ export const updateTaskApi = (data: TaskForm) => {
  * @returns returns
  */
 export const delTaskApi = (id: string | number | Array<string | number>) => {
-  return http.delete<any>(`/task/task/${id}`)
+  return http.delete<any>(`/identification/identificationTask/${id}`)
 }
 
 /**

+ 22 - 3
src/views/demo/traceMerge/index.vue

@@ -54,9 +54,14 @@
 
     <el-dialog v-model="displayDialogVisible" title="执行结果">
       <el-container direction="vertical">
-        <el-container v-for="(item, index) in resultData" :key="index" direction="horizontal" style="place-items: center center">
-          <span> {{ item.split('/')[item.split('/').length - 1] }} </span>
-          <el-image :src="'/api/profile' + item" style="max-width: 600px; max-height: 300px"></el-image>
+        <el-header>第 {{ dataIndex + 1 }} 张, 共 {{ resultData.length }} 张</el-header>
+        <el-container direction="horizontal" style="margin-top: 20px">
+          <div style=" place-items: center center;width: 100px">帧率</div>
+          <el-input v-model="frameSpeed" style="max-width: 200px" />
+          <el-button @click="onSpeedChange" style="margin-left: 20px">确定</el-button>
+        </el-container>
+        <el-container direction="horizontal" style="place-items: center center; margin-top: 20px">
+          <el-image :src="'/api/profile' + resultData[dataIndex]" style="min-width: 600px; min-height: 300px"></el-image>
         </el-container>
       </el-container>
     </el-dialog>
@@ -123,7 +128,21 @@ const params = ref({
 })
 
 const resultData = ref([])
+const frameSpeed = ref(0)
+const dataIndex = ref(0)
 const displayDialogVisible = ref(false)
+let stub = null
+const onSpeedChange = () => {
+  if (stub) {
+    clearInterval(stub)
+  }
+  stub = setInterval(() => {
+    dataIndex.value += 1
+    if (dataIndex.value === resultData.value.length - 1) {
+      clearInterval(stub)
+    }
+  }, 1000 / frameSpeed.value)
+}
 const display = function (row) {
   // console.log(row)
   getResApi({ taskId: row.id }).then(res => {

+ 15 - 3
src/views/taais/homePage/index.vue

@@ -3,9 +3,12 @@
     <dv-border-box1 ref="borderRef" style="width: 100%; height: 100%; margin: 0 auto">
       <div class="table-box">
         <ProTable ref="proTable" :columns="columns" row-key="id" :request-api="listITaskNewApi" :tool-button="false">
-          <template #tableHeader="">
+          <template #tableHeader="scope">
             <!--            <el-button type="primary" v-auth="['system:user:add']" :icon="CirclePlus" @click="createTask()"> 创建任务 </el-button>-->
             <el-button type="primary" v-auth="['system:user:add']" :icon="CirclePlus" @click="createTaskNew()"> 创建任务 </el-button>
+            <el-button type="danger" icon="Delete" plain :disabled="!scope.isSelected" @click="batchDelete(scope.selectedListIds)">
+              批量删除
+            </el-button>
           </template>
           <!-- 表格操作 -->
           <template #operation="scope">
@@ -44,8 +47,9 @@ import { ColumnProps, ProTableInstance } from '@/components/ProTable/interface'
 import { addUserApi, updateUserApi, deptTreeSelectApi } from '@/api/modules/system/user'
 // import { getTaskApi } from '@/api/modules/taais/task'
 // import { listTaskApi, getTaskApi } from '@/api/modules/task/task'
-import { listITaskNewApi, getITaskNewApi } from '@/api/modules/task/task'
+import { listITaskNewApi, getITaskNewApi, delTaskApi } from '@/api/modules/task/task'
 import { getDictsApi } from '@/api/modules/system/dictData'
+import { useHandleData } from '@/hooks/useHandleData'
 // import taskDataList from '@/assets/mock/taskData.json'
 // import { getDictsApi } from '@/api/modules/system/dictData'
 onMounted(() => {
@@ -65,6 +69,14 @@ const getTreeFilter = async () => {
   treeFilterData.value = data
   initParam.deptId = treeFilterData.value[0].id
 }
+
+// 批量删除多物体融合轨迹识别信息
+const batchDelete = async (ids: string[]) => {
+  await useHandleData(delTaskApi, ids, '删除所选任务')
+  proTable.value?.clearSelection()
+  proTable.value?.getTableList()
+}
+
 // 查看详情
 const viewDetails = row => {
   console.log(row)
@@ -109,7 +121,7 @@ const createTaskNew = () => {
 }
 // 表格配置项
 const columns = reactive<ColumnProps<User.ResUserList>[]>([
-  // { type: 'selection', fixed: 'left', width: 70 },
+  { type: 'selection', fixed: 'left', width: 70 },
   { prop: 'name', label: '任务名称' },
   // {
   //   prop: 'status',

+ 2 - 1
src/views/task/bizProcess/index.vue

@@ -139,7 +139,8 @@
         <div style="padding: 14px">
           <span>Results</span>
         </div>
-        <el-image :src="PATH_PREFIX + refSelectData.resultPath + '/results.png'"></el-image>
+        <el-image :src="PATH_PREFIX + refSelectData.resultPath + '/loss.png'"></el-image>
+        <el-image :src="PATH_PREFIX + refSelectData.resultPath + '/AP50.png'"></el-image>
       </div>
       <div v-else>
         <el-card :body-style="{ padding: '0px' }">