Parcourir la source

feat: 添加多目标检测导入模型、多源信息融合、异源图像匹配的文件说明

Suuuuuukang il y a 1 mois
Parent
commit
ca0abb7bb1

+ 17 - 1
src/views/demo/match/index.vue

@@ -66,7 +66,12 @@
         <el-input v-model="formData.name" placeholder="请输入任务名称"></el-input>
       </el-container>
       <el-container style="margin-top: 20px">
-        <span class="span_class">任务文件</span>
+        <span class="span_class">
+            任务文件
+            <el-tooltip :content="fileDescription" placement="top">
+              <el-icon><InfoFilled /></el-icon>
+            </el-tooltip>
+        </span>
         <file @update:model-value="updateFile" :file-size="2048" :file-type="['zip']"></file>
       </el-container>
 
@@ -245,6 +250,7 @@ const stopTask = function (row) {
   })
 }
 
+const fileDescription = ref('')
 const jsonParams = ref([])
 const dialogVisible = ref(false)
 const openCreateDialog = async function () {
@@ -255,6 +261,16 @@ const openCreateDialog = async function () {
     name: '',
     file: null
   }
+
+  let _res = await getDictsApi('zip_file_format_description')
+
+  _res.data.forEach(item => {
+    // 检查item对象是否包含dict和des属性
+    if (item.dictLabel === '异源图像匹配') {
+      fileDescription.value = item.remark
+    }
+  })
+
   dialogVisible.value = true
 }
 const formData = ref({

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

@@ -45,7 +45,13 @@
           <el-input v-model="params.name" placeholder="请输入任务名称"></el-input>
         </el-container>
         <el-container style="margin-top: 20px">
-          <span style="min-width: 80px">任务文件</span>
+          <span style="min-width: 80px">
+            任务文件
+            <el-tooltip :content="fileDescription" placement="top">
+              <el-icon><InfoFilled /></el-icon>
+            </el-tooltip>
+          </span>
+
           <file @update:model-value="updateFiles" :file-size="20" :file-type="['mat', 'json', 'txt']"></file>
         </el-container>
         <el-container v-for="(item, index) in jsonParams" :key="index" style="align-items: center; margin-top: 5px">
@@ -208,12 +214,22 @@ const stopTask = function (row) {
     }
   })
 }
-
+const fileDescription = ref('')
 const jsonParams = ref([])
 const createTask = async function () {
   const res = await getOneAlgorithmConfigApi({ algorithmName: '多源信息融合' })
   // console.log(res)
   jsonParams.value = JSON.parse(res.data.parameters)
+
+  let _res = await getDictsApi('zip_file_format_description')
+
+  _res.data.forEach(item => {
+    // 检查item对象是否包含dict和des属性
+    if (item.dictLabel === '多源信息融合') {
+      fileDescription.value = item.remark
+    }
+  })
+
   createTaskDialogVisible.value = true
   params.value = {
     preprocessPath: null,

+ 12 - 2
src/views/taais/homePage/task/index.vue

@@ -189,7 +189,7 @@ import FormDialog from '@/components/FormDialog/index.vue'
 import { useRouter } from 'vue-router'
 import { listTaskConfigurationApi } from '@/api/modules/task/taskConfiguration'
 import { amplifyApi, batchListDataApi } from '@/api/modules/demo/data'
-import { listDataApi } from '@/api/modules/system/dictData'
+import {getDictsApi, listDataApi} from '@/api/modules/system/dictData'
 import { ElMessage } from 'element-plus'
 import AmplifyForm from '@/views/demo/data/AmplifyForm.vue'
 
@@ -542,7 +542,8 @@ const onAlgorithmModelSelect = index => {
 const formDialogRef = ref<InstanceType<typeof FormDialog> | null>(null)
 
 let UPDATE_INDEX = ref({ id: null, idx: null })
-const showAddModelDialog = (item, index) => {
+const fileDescription = ref('')
+const showAddModelDialog = async (item, index) => {
   let _id = null
   try {
     _id = item.id
@@ -558,6 +559,14 @@ const showAddModelDialog = (item, index) => {
     id: _id,
     idx: index
   }
+  let _res = await getDictsApi('zip_file_format_description')
+
+  _res.data.forEach(item => {
+    // 检查item对象是否包含dict和des属性
+    if (item.dictLabel === '多目标检测导入模型') {
+      fileDescription.value = item.remark
+    }
+  })
   const params = {
     title: '算法模型配置',
     width: 580,
@@ -573,6 +582,7 @@ const showAddModelDialog = (item, index) => {
       },
       {
         label: '模型',
+        tooltip: fileDescription,
         prop: 'modelAddress',
         rules: [], //{ required: true, message: '模型不能为空', trigger: 'blur' }
         compOptions: {