Browse Source

Merge branch 'devlop_1016' into develop

# Conflicts:
#	src/components/ImportPicDataset/index.vue
#	src/views/demo/dataAugmentation/index.vue
#	src/views/task/bizProcess/index.vue
allen 8 months ago
parent
commit
0fc34a0f4d

+ 1 - 1
package.json

@@ -14,7 +14,7 @@
     "serve": "vite",
     "build:dev": "vue-tsc && vite build --mode development",
     "build:test": "vue-tsc && vite build --mode test",
-    "build:pro": "vue-tsc && vite build --mode production",
+    "build:pro": "vite build --mode production",
     "type:check": "vue-tsc --noEmit --skipLibCheck",
     "preview": "npm run build:dev && vite preview",
     "lint:eslint": "eslint --fix --ext .js,.ts,.vue ./src",

+ 1 - 1
src/components/FormDialog/index.vue

@@ -10,7 +10,7 @@
   >
     <ProFrom ref="proFormRef" :items-options="parameter.itemsOptions" :form-options="_options" :model="parameter.model">
       <template #modelAddress="{}">
-        <FileUpload :file-size="4096" :file-type="['pt']" @update:model-value="setModelAddr" />
+        <FileUpload :file-size="4096" :file-type="['pt', 'pth']" @update:model-value="setModelAddr" />
       </template>
     </ProFrom>
     <template #footer>

+ 6 - 0
src/views/ag/model/index.vue

@@ -64,6 +64,12 @@ const downloadPtFile = function (row) {
   }
 }
 
+const downloadPtFile = function (row) {
+  console.log(row)
+  if (row.modelAddress && row.modelAddress.length > 0) {
+    window.open('/api' + row.modelAddress, '_blank')
+  }
+}
 // ProTable 实例
 const proTable = ref<ProTableInstance>()
 let allAgloData = ref([] as any[])

+ 16 - 9
src/views/task/bizProcess/index.vue

@@ -3,7 +3,6 @@
     <ProTable ref="proTable" :columns="columns" row-key="id" :data="bizProcessList">
       <!-- 表格 header 按钮 -->
       <template #tableHeader="scope">
-        <!--        #tableHeader="scope"-->
         <!-- <el-button type="primary" v-auth="['identification:identificationSubtaskDetails:add']" icon="CirclePlus" @click="openDialog(1, '算法业务处理新增')"> 新增 </el-button>
         <el-button type="primary" v-auth="['identification:identificationSubtaskDetails:import']" icon="Upload" plain @click="batchAdd"> 导入 </el-button> -->
         <!--        <el-button type="primary" v-auth="['identification:identificationSubtaskDetails:export']" icon="Download" plain @click="downloadFile">-->
@@ -19,10 +18,22 @@
         <!--        >-->
         <!--          批量删除-->
         <!--        </el-button>-->
-        <el-button type="primary" icon="View" @click="showCompareResult"> 验证指标对比 </el-button>
+        <!--        v-if="!scope.row.name.includes('训练')"-->
+        <el-button v-if="listData.length > 0 && !listData[0].name.includes('训练')" type="primary" icon="View" @click="showCompareResult()">
+          验证指标对比
+        </el-button>
         <!--        <el-button type="primary" icon="View" @click="showValResult(true)"> 验证结果 </el-button>-->
-        <el-button type="primary" icon="View" @click="showValResult(false && scope.row)"> 测试结果 </el-button>
-        <el-button type="primary" icon="View" @click="showValResult(true)"> 验证结果 </el-button>
+        <el-button
+          v-if="listData.length > 0 && !listData[0].name.includes('训练')"
+          type="primary"
+          icon="View"
+          @click="showValResult(false && scope.row)"
+        >
+          测试结果
+        </el-button>
+        <el-button v-if="listData.length > 0 && !listData[0].name.includes('训练')" type="primary" icon="View" @click="showValResult(true)">
+          验证结果
+        </el-button>
       </template>
       <!-- 表格操作 -->
       <template #operation="scope">
@@ -35,6 +46,7 @@
         <!--        >-->
         <!--          查看详情-->
         <!--        </el-button>-->
+
         <el-button v-if="scope.row.name.indexOf('训练') === -1" type="primary" link icon="Refresh" @click="reRunTask(scope.row)">
           执行训练
         </el-button>
@@ -51,11 +63,6 @@
         </el-button>
 
         <el-button type="primary" link icon="Refresh" @click="exportData(scope.row)"> 导出结果 </el-button>
-
-        <!--        <el-button type="primary" link icon="EditPen" v-auth="['identification:identificationSubtaskDetails:edit']" @click="openDialog(2, '算法业务处理编辑', scope.row)">-->
-        <!--          编辑-->
-        <!--        </el-button>-->
-        <!--        <el-button type="primary" link icon="Delete" v-auth="['identification:identificationSubtaskDetails:remove']" @click="deleteBizProcess(scope.row)"> 删除 </el-button>-->
       </template>
     </ProTable>
     <FormDialog ref="formDialogRef" />