Selaa lähdekoodia

fix: fix some detailed issues

Eagle 8 kuukautta sitten
vanhempi
sitoutus
4170bf0c60

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

@@ -25,6 +25,7 @@
         <el-button type="primary" link icon="EditPen" v-auth="['ag:model:edit']" @click="openDialog(2, '算法模型配置编辑', scope.row)">
           编辑
         </el-button>
+        <el-button type="primary" link icon="EditPen" @click="downloadPtFile(scope.row)"> 下载 </el-button>
         <el-button type="primary" link icon="Delete" v-auth="['ag:model:remove']" @click="deleteModel(scope.row)"> 删除 </el-button>
       </template>
     </ProTable>
@@ -54,6 +55,14 @@ import {
 } from '@/api/modules/ag/model'
 import { getAlgorithmOptionApi } from '@/api/modules/task/task'
 import { listTaskConfigurationApi } from '@/api/modules/task/taskConfiguration'
+import http from '@/api'
+
+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>()

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

@@ -3,48 +3,52 @@
     <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">
-          导出
-        </el-button>
-        <el-button
-          type="danger"
-          v-auth="['identification:identificationSubtaskDetails:remove']"
-          icon="Delete"
-          plain
-          :disabled="!scope.isSelected"
-          @click="batchDelete(scope.selectedListIds)"
-        >
-          批量删除
-        </el-button>
+        <!--        <el-button type="primary" v-auth="['identification:identificationSubtaskDetails:export']" icon="Download" plain @click="downloadFile">-->
+        <!--          导出-->
+        <!--        </el-button>-->
+        <!--        <el-button-->
+        <!--          type="danger"-->
+        <!--          v-auth="['identification:identificationSubtaskDetails:remove']"-->
+        <!--          icon="Delete"-->
+        <!--          plain-->
+        <!--          :disabled="!scope.isSelected"-->
+        <!--          @click="batchDelete(scope.selectedListIds)"-->
+        <!--        >-->
+        <!--          批量删除-->
+        <!--        </el-button>-->
         <el-button 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)"> 测试结果 </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>
       </template>
       <!-- 表格操作 -->
       <template #operation="scope">
-        <el-button
-          type="primary"
-          link
-          icon="View"
-          v-auth="['identification:identificationSubtaskDetails:query']"
-          @click="openDialog(3, '算法业务处理查看', scope.row)"
-        >
-          查看详情
+        <!--        <el-button-->
+        <!--          type="primary"-->
+        <!--          link-->
+        <!--          icon="View"-->
+        <!--          v-auth="['identification:identificationSubtaskDetails:query']"-->
+        <!--          @click="openDialog(3, '算法业务处理查看', scope.row)"-->
+        <!--        >-->
+        <!--          查看详情-->
+        <!--        </el-button>-->
+        <el-button v-if="scope.row.name.indexOf('训练') === -1" type="primary" link icon="Refresh" @click="reRunTask(scope.row)">
+          执行训练
         </el-button>
+        <el-button v-else type="primary" link icon="Refresh" @click="startTask(scope.row)"> 开始训练 </el-button>
 
-        <el-button type="primary" link icon="finished" @click="showResult(scope.row)"> 执行结果 </el-button>
+        <el-button type="primary" link icon="finished" @click="showResult(scope.row)"> 结果 </el-button>
 
         <el-button v-show="scope.row.name.indexOf('训练') === -1" type="primary" link icon="search" @click="showExecutedTime(scope.row)">
           执行时间
         </el-button>
 
-        <el-button v-if="scope.row.name.indexOf('训练') === -1" type="primary" link icon="Refresh" @click="reRunTask(scope.row)">
-          执行训练
+        <el-button type="primary" link icon="document" v-auth="['identification:identificationSubtaskDetails:query']" @click="viewLog(scope.row)">
+          查看日志
         </el-button>
-        <el-button v-else type="primary" link icon="Refresh" @click="startTask(scope.row)"> 开始训练 </el-button>
 
         <el-button type="primary" link icon="Refresh" @click="exportData(scope.row)"> 导出结果 </el-button>
 
@@ -52,9 +56,6 @@
         <!--          编辑-->
         <!--        </el-button>-->
         <!--        <el-button type="primary" link icon="Delete" v-auth="['identification:identificationSubtaskDetails:remove']" @click="deleteBizProcess(scope.row)"> 删除 </el-button>-->
-        <el-button type="primary" link icon="document" v-auth="['identification:identificationSubtaskDetails:query']" @click="viewLog(scope.row)">
-          查看日志
-        </el-button>
       </template>
     </ProTable>
     <FormDialog ref="formDialogRef" />

+ 14 - 14
src/views/task/subtask/index.vue

@@ -2,21 +2,21 @@
   <div class="table-box">
     <ProTable ref="proTable" :is-show-search="false" :columns="columns" row-key="id" :data="subTaskList">
       <!-- 表格 header 按钮 -->
-      <template #tableHeader="scope">
-        <!-- <el-button type="primary" v-auth="['identification:identificationTask:add']" icon="CirclePlus" @click="openDialog(1, '算法子任务新增')"> 新增 </el-button>
+      <!--      <template #tableHeader="scope">-->
+      <!-- <el-button type="primary" v-auth="['identification:identificationTask:add']" icon="CirclePlus" @click="openDialog(1, '算法子任务新增')"> 新增 </el-button>
         <el-button type="primary" v-auth="['identification:identificationTask:import']" icon="Upload" plain @click="batchAdd"> 导入 </el-button> -->
-        <el-button type="primary" v-auth="['identification:identificationTask:export']" icon="Download" plain @click="downloadFile"> 导出 </el-button>
-        <el-button
-          type="danger"
-          v-auth="['identification:identificationTask:remove']"
-          icon="Delete"
-          plain
-          :disabled="!scope.isSelected"
-          @click="batchDelete(scope.selectedListIds)"
-        >
-          批量删除
-        </el-button>
-      </template>
+      <!--        <el-button type="primary" v-auth="['identification:identificationTask:export']" icon="Download" plain @click="downloadFile"> 导出 </el-button>-->
+      <!--        <el-button-->
+      <!--          type="danger"-->
+      <!--          v-auth="['identification:identificationTask:remove']"-->
+      <!--          icon="Delete"-->
+      <!--          plain-->
+      <!--          :disabled="!scope.isSelected"-->
+      <!--          @click="batchDelete(scope.selectedListIds)"-->
+      <!--        >-->
+      <!--          批量删除-->
+      <!--        </el-button>-->
+      <!--      </template>-->
       <!-- 表格操作 -->
       <template #operation="scope">
         <el-button type="primary" link icon="View" v-auth="['identification:identificationTask:query']" @click="viewDetails(scope.row)">