|
@@ -47,19 +47,29 @@
|
|
|
<!-- 查看详情-->
|
|
|
<!-- </el-button>-->
|
|
|
|
|
|
- <el-button v-if="scope.row.name.indexOf('训练') === -1 && (scope.row.status === '0' || scope.row.status === '3')" type="primary" link icon="Refresh" @click="reRunTask(scope.row)">
|
|
|
+ <el-button
|
|
|
+ v-if="scope.row.name.indexOf('训练') === -1 && (scope.row.status === '0' || scope.row.status === '3')"
|
|
|
+ type="primary"
|
|
|
+ link
|
|
|
+ icon="VideoPlay"
|
|
|
+ @click="reRunTask(scope.row)"
|
|
|
+ >
|
|
|
+ 开始任务
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ v-if="scope.row.name.indexOf('训练') !== -1 && (scope.row.status === '0' || scope.row.status === '3')"
|
|
|
+ type="primary"
|
|
|
+ link
|
|
|
+ icon="VideoPlay"
|
|
|
+ @click="startTask(scope.row)"
|
|
|
+ >
|
|
|
开始任务
|
|
|
</el-button>
|
|
|
- <el-button v-if="scope.row.name.indexOf('训练') !== -1 && (scope.row.status === '0' || scope.row.status === '3')" type="primary" link icon="Refresh" @click="startTask(scope.row)"> 开始任务 </el-button>
|
|
|
<el-button v-if="scope.row.status === '0'" type="primary" link icon="Refresh" @click="taskExecute('continue', scope.row)">
|
|
|
继续任务
|
|
|
</el-button>
|
|
|
- <el-button v-if="scope.row.status === '1'" type="primary" link icon="Refresh" @click="taskExecute('pause', scope.row)">
|
|
|
- 暂停任务
|
|
|
- </el-button>
|
|
|
- <el-button v-if="scope.row.status === '1'" type="primary" link icon="Refresh" @click="taskExecute('stop', scope.row)">
|
|
|
- 停止任务
|
|
|
- </el-button>
|
|
|
+ <el-button v-if="scope.row.status === '1'" type="primary" link icon="Refresh" @click="taskExecute('pause', scope.row)"> 暂停任务 </el-button>
|
|
|
+ <el-button v-if="scope.row.status === '1'" type="primary" link icon="Refresh" @click="taskExecute('stop', scope.row)"> 停止任务 </el-button>
|
|
|
<el-button v-if="!scope.row.name.includes('测试')" type="primary" link icon="finished" @click="showResult(scope.row)"> 结果图 </el-button>
|
|
|
|
|
|
<el-button v-if="!scope.row.name.includes('训练')" type="primary" link icon="search" @click="showTimeResult(scope.row)"> 查看指标 </el-button>
|
|
@@ -68,8 +78,9 @@
|
|
|
查看日志
|
|
|
</el-button>
|
|
|
|
|
|
- <el-button type="primary" link icon="document" @click="openDir(scope.row)"> 任务文件夹 </el-button>
|
|
|
- <el-button type="primary" link icon="document" @click="exportData(scope.row)"> 结果文件夹 </el-button>
|
|
|
+ <el-button type="primary" link icon="FolderOpened" @click="openDir(scope.row, true)"> 预处理文件夹 </el-button>
|
|
|
+ <el-button type="primary" link icon="FolderOpened" @click="openDir(scope.row, false)"> 结果文件夹 </el-button>
|
|
|
+ <el-button type="primary" link icon="SoldOut" @click="exportData(scope.row)"> 导出结果 </el-button>
|
|
|
</template>
|
|
|
</ProTable>
|
|
|
<FormDialog ref="formDialogRef" />
|
|
@@ -323,14 +334,19 @@ const startTask = row => {
|
|
|
}
|
|
|
|
|
|
const taskExecute = (type, row) => {
|
|
|
- http.post<any>('/identification/identificationSubtaskDetails/' + (type === 'continue' ? 'continueTask' : type === 'pause' ? 'pauseTask' : 'stopTask'),
|
|
|
- { bizId: row.id }, { loading: true }).then(res => {
|
|
|
- if (res.code !== 200) {
|
|
|
- ElMessage.error(res.msg)
|
|
|
- } else {
|
|
|
- ElMessage.success('操作成功')
|
|
|
- }
|
|
|
- })
|
|
|
+ http
|
|
|
+ .post<any>(
|
|
|
+ '/identification/identificationSubtaskDetails/' + (type === 'continue' ? 'continueTask' : type === 'pause' ? 'pauseTask' : 'stopTask'),
|
|
|
+ { bizId: row.id },
|
|
|
+ { loading: true }
|
|
|
+ )
|
|
|
+ .then(res => {
|
|
|
+ if (res.code !== 200) {
|
|
|
+ ElMessage.error(res.msg)
|
|
|
+ } else {
|
|
|
+ ElMessage.success('操作成功')
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
const typeDefs = ref(reactive([]))
|
|
@@ -339,19 +355,25 @@ const exportData = row => {
|
|
|
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')
|
|
|
- http.get<any>('/identification/identificationSubtaskDetails/openDir', { directory: row.resultPath + "/weights" }, { loading: true }).then(res => {
|
|
|
- console.log(res)
|
|
|
- })
|
|
|
+ window.open(res.msg, '_blank')
|
|
|
+ // http.get<any>('/identification/identificationSubtaskDetails/openDir', { directory: row.resultPath + "/weights" }, { loading: true }).then(res => {
|
|
|
+ // console.log(res)
|
|
|
+ // })
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
|
|
|
-const openDir = row => {
|
|
|
+const openDir = (row, isPre) => {
|
|
|
console.log(row)
|
|
|
- http.get<any>('/identification/identificationSubtaskDetails/openDir', { directory: row.preprocessPath }, { loading: true }).then(res => {
|
|
|
- console.log(res)
|
|
|
- })
|
|
|
+ http
|
|
|
+ .get<any>(
|
|
|
+ '/identification/identificationSubtaskDetails/openDir',
|
|
|
+ { directory: isPre ? row.preprocessPath : row.resultPath, type: '2' },
|
|
|
+ { loading: true }
|
|
|
+ )
|
|
|
+ .then(res => {
|
|
|
+ console.log(res)
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
let imgDataList = ref(reactive([]))
|