allen 4 сар өмнө
parent
commit
e170010e53

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

@@ -48,9 +48,9 @@
         <!--        </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 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>
 
@@ -295,7 +295,7 @@ const PATH_PREFIX = 'api/profile/task'
 let resultDialogVisible = ref(false)
 let refSelectData = ref(reactive({}))
 const reRunTask = row => {
-  http.post<any>('/identification/identificationSubtaskDetails/execute', { taskId: row.id }, { loading: false }).then(res => {
+  http.post<any>('/identification/identificationSubtaskDetails/execute', { taskId: row.id }, { loading: true }).then(res => {
     if (res.code !== 200) {
       ElMessage.error(res.msg)
     } else {
@@ -304,7 +304,7 @@ const reRunTask = row => {
   })
 }
 const startTask = row => {
-  http.post<any>('/identification/identificationSubtaskDetails/startTask', { taskId: row.id }, { loading: false }).then(res => {
+  http.post<any>('/identification/identificationSubtaskDetails/startTask', { taskId: row.id }, { loading: true }).then(res => {
     if (res.code !== 200) {
       ElMessage.error(res.msg)
     } else {
@@ -315,7 +315,7 @@ const startTask = row => {
 const typeDefs = ref(reactive([]))
 
 const exportData = row => {
-  http.get<any>('/identification/identificationSubtaskDetails/resultZip', { taskId: row.id }, { loading: false }).then(res => {
+  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')
@@ -761,7 +761,7 @@ const columns = reactive<ColumnProps<any>[]>([
   },
   {
     prop: 'costSecond',
-    label: '耗时(ms)'
+    label: '耗时'
   },
   {
     prop: 'remarks',
@@ -891,7 +891,9 @@ const setItemsOptions = () => {
 <style scoped lang="scss">
 .log {
   width: 90%;
-  height: 60vh; /* 根据需要调整 */
+  height: 60vh;
+
+  /* 根据需要调整 */
   padding: 10px;
 
   // padding-bottom: 80px;