|
@@ -3,8 +3,8 @@
|
|
<ProTable ref="proTable" :columns="columns" row-key="id" :data="bizProcessList">
|
|
<ProTable ref="proTable" :columns="columns" row-key="id" :data="bizProcessList">
|
|
<!-- 表格 header 按钮 -->
|
|
<!-- 表格 header 按钮 -->
|
|
<template #tableHeader="scope">
|
|
<template #tableHeader="scope">
|
|
- <el-button type="primary" v-auth="['task:bizProcess:add']" icon="CirclePlus" @click="openDialog(1, '算法业务处理新增')"> 新增 </el-button>
|
|
|
|
- <el-button type="primary" v-auth="['task:bizProcess:import']" icon="Upload" plain @click="batchAdd"> 导入 </el-button>
|
|
|
|
|
|
+ <!-- <el-button type="primary" v-auth="['task:bizProcess:add']" icon="CirclePlus" @click="openDialog(1, '算法业务处理新增')"> 新增 </el-button>
|
|
|
|
+ <el-button type="primary" v-auth="['task:bizProcess:import']" icon="Upload" plain @click="batchAdd"> 导入 </el-button> -->
|
|
<el-button type="primary" v-auth="['task:bizProcess:export']" icon="Download" plain @click="downloadFile"> 导出 </el-button>
|
|
<el-button type="primary" v-auth="['task:bizProcess:export']" icon="Download" plain @click="downloadFile"> 导出 </el-button>
|
|
<el-button
|
|
<el-button
|
|
type="danger"
|
|
type="danger"
|
|
@@ -46,40 +46,40 @@
|
|
</el-row>
|
|
</el-row>
|
|
<el-row class="row">
|
|
<el-row class="row">
|
|
<el-col class="col" :span="spanNum" v-for="(RCurveUrl, index) in resultsData['rcureList']" :key="index">
|
|
<el-col class="col" :span="spanNum" v-for="(RCurveUrl, index) in resultsData['rcureList']" :key="index">
|
|
- <div v-if="index !== 1" :span="4" class="oneCol">{{ RCurveUrl }}</div>
|
|
|
|
|
|
+ <div v-if="index === 0" :span="4" class="oneCol">{{ RCurveUrl }}</div>
|
|
<ImagePreview
|
|
<ImagePreview
|
|
class="img"
|
|
class="img"
|
|
v-else
|
|
v-else
|
|
:width="100"
|
|
:width="100"
|
|
:height="100"
|
|
:height="100"
|
|
- :src="'/api/profile' + RCurveUrl"
|
|
|
|
- :preview-src-list="['/api/profile' + RCurveUrl]"
|
|
|
|
|
|
+ :src="'/api/profile/task' + RCurveUrl"
|
|
|
|
+ :preview-src-list="['/api/profile/task' + RCurveUrl]"
|
|
/>
|
|
/>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
<el-row class="row">
|
|
<el-row class="row">
|
|
<el-col class="col" :span="spanNum" v-for="(PCurveUrl, index) in resultsData['pcureList']" :key="index">
|
|
<el-col class="col" :span="spanNum" v-for="(PCurveUrl, index) in resultsData['pcureList']" :key="index">
|
|
- <div v-if="index !== 1" class="oneCol">{{ PCurveUrl }}</div>
|
|
|
|
|
|
+ <div v-if="index === 0" class="oneCol">{{ PCurveUrl }}</div>
|
|
<ImagePreview
|
|
<ImagePreview
|
|
class="img"
|
|
class="img"
|
|
v-else
|
|
v-else
|
|
:width="100"
|
|
:width="100"
|
|
:height="100"
|
|
:height="100"
|
|
- :src="'/api/profile' + PCurveUrl"
|
|
|
|
- :preview-src-list="['/api/profile' + PCurveUrl]"
|
|
|
|
|
|
+ :src="'/api/profile/task' + PCurveUrl"
|
|
|
|
+ :preview-src-list="['/api/profile/task' + PCurveUrl]"
|
|
/>
|
|
/>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
<el-row class="row">
|
|
<el-row class="row">
|
|
<el-col class="col" :span="spanNum" v-for="(F1CurveUrl, index) in resultsData['f1cureList']" :key="index">
|
|
<el-col class="col" :span="spanNum" v-for="(F1CurveUrl, index) in resultsData['f1cureList']" :key="index">
|
|
- <div v-if="index !== 1" class="oneCol">{{ F1CurveUrl }}</div>
|
|
|
|
|
|
+ <div v-if="index === 0" class="oneCol">{{ F1CurveUrl }}</div>
|
|
<ImagePreview
|
|
<ImagePreview
|
|
class="img"
|
|
class="img"
|
|
v-else
|
|
v-else
|
|
:width="100"
|
|
:width="100"
|
|
:height="100"
|
|
:height="100"
|
|
- :src="'/api/profile' + F1CurveUrl"
|
|
|
|
- :preview-src-list="['/api/profile' + F1CurveUrl]"
|
|
|
|
|
|
+ :src="'/api/profile/task' + F1CurveUrl"
|
|
|
|
+ :preview-src-list="['/api/profile/task' + F1CurveUrl]"
|
|
/>
|
|
/>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
@@ -93,7 +93,7 @@
|
|
<el-row class="row" v-for="(item, index) in testResultsData['resultList']" :key="index">
|
|
<el-row class="row" v-for="(item, index) in testResultsData['resultList']" :key="index">
|
|
<el-col class="col" :span="spanNum" v-for="(url, index1) in item" :key="index1">
|
|
<el-col class="col" :span="spanNum" v-for="(url, index1) in item" :key="index1">
|
|
<!-- <span>{{ url }}</span> -->
|
|
<!-- <span>{{ url }}</span> -->
|
|
- <ImagePreview class="img" :width="100" :height="100" :src="'/api/profile' + url" :preview-src-list="['/api/profile' + url]" />
|
|
|
|
|
|
+ <ImagePreview class="img" :width="100" :height="100" :src="'/api/profile/task' + url" :preview-src-list="['/api/profile/task' + url]" />
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
</div>
|
|
</div>
|
|
@@ -115,14 +115,13 @@ import {
|
|
delBizProcessApi,
|
|
delBizProcessApi,
|
|
addBizProcessApi,
|
|
addBizProcessApi,
|
|
updateBizProcessApi,
|
|
updateBizProcessApi,
|
|
- importTemplateApi,
|
|
|
|
- importBizProcessDataApi,
|
|
|
|
exportBizProcessApi,
|
|
exportBizProcessApi,
|
|
getBizProcessApi,
|
|
getBizProcessApi,
|
|
getTrainResultApi,
|
|
getTrainResultApi,
|
|
getVerifyResultApi,
|
|
getVerifyResultApi,
|
|
getTestResultApi
|
|
getTestResultApi
|
|
} from '@/api/modules/task/bizProcess'
|
|
} from '@/api/modules/task/bizProcess'
|
|
|
|
+// getTrainResultApi,getVerifyResultApi,getTestResultApi
|
|
import { getSubtaskApi } from '@/api/modules/task/subtask'
|
|
import { getSubtaskApi } from '@/api/modules/task/subtask'
|
|
import { getDictsApi } from '@/api/modules/system/dictData'
|
|
import { getDictsApi } from '@/api/modules/system/dictData'
|
|
import { useRoute } from 'vue-router'
|
|
import { useRoute } from 'vue-router'
|
|
@@ -153,7 +152,7 @@ const refreshList = () => {
|
|
pageSize: 100,
|
|
pageSize: 100,
|
|
subTaskId
|
|
subTaskId
|
|
}).then(res => {
|
|
}).then(res => {
|
|
- bizProcessList.value = res.data['list']
|
|
|
|
|
|
+ bizProcessList.value = res.data['list'].sort((a, b) => b.index - a.index)
|
|
})
|
|
})
|
|
}, 0)
|
|
}, 0)
|
|
}
|
|
}
|
|
@@ -165,7 +164,7 @@ onMounted(() => {
|
|
refreshList()
|
|
refreshList()
|
|
timer.value = setInterval(() => {
|
|
timer.value = setInterval(() => {
|
|
refreshList()
|
|
refreshList()
|
|
- }, 100000)
|
|
|
|
|
|
+ }, 10000)
|
|
// 组件挂载后,logRef 将指向实际的 DOM 元素
|
|
// 组件挂载后,logRef 将指向实际的 DOM 元素
|
|
if (logRef.value) {
|
|
if (logRef.value) {
|
|
// 操作 logRef 对应的 DOM 元素
|
|
// 操作 logRef 对应的 DOM 元素
|
|
@@ -194,38 +193,35 @@ const downloadFile = async () => {
|
|
|
|
|
|
// 批量添加算法业务处理
|
|
// 批量添加算法业务处理
|
|
const dialogRef = ref<InstanceType<typeof ImportExcel> | null>(null)
|
|
const dialogRef = ref<InstanceType<typeof ImportExcel> | null>(null)
|
|
-const batchAdd = () => {
|
|
|
|
- const params = {
|
|
|
|
- title: '算法业务处理',
|
|
|
|
- tempApi: importTemplateApi,
|
|
|
|
- importApi: importBizProcessDataApi,
|
|
|
|
- getTableList: proTable.value?.getTableList
|
|
|
|
- }
|
|
|
|
- dialogRef.value?.acceptParams(params)
|
|
|
|
-}
|
|
|
|
|
|
+// const batchAdd = () => {
|
|
|
|
+// const params = {
|
|
|
|
+// title: '算法业务处理',
|
|
|
|
+// tempApi: importTemplateApi,
|
|
|
|
+// importApi: importBizProcessDataApi,
|
|
|
|
+// getTableList: proTable.value?.getTableList
|
|
|
|
+// }
|
|
|
|
+// dialogRef.value?.acceptParams(params)
|
|
|
|
+// }
|
|
|
|
|
|
// 对比结果
|
|
// 对比结果
|
|
const contrastResults = () => {
|
|
const contrastResults = () => {
|
|
- if (taskStatus.value !== '2') {
|
|
|
|
- let status1
|
|
|
|
- getDictsApi('biz_task_status').then(res => {
|
|
|
|
- status1 = res.data.find(item => {
|
|
|
|
- return item.dictValue == taskStatus.value
|
|
|
|
- })
|
|
|
|
- ElMessage.warning(`算法状态为${status1.dictLabel},暂无对比结果`)
|
|
|
|
- })
|
|
|
|
- } else {
|
|
|
|
|
|
+ const statusFlag = bizProcessList.value.every(item => {
|
|
|
|
+ return item.status == '2'
|
|
|
|
+ })
|
|
|
|
+ if (statusFlag) {
|
|
switch (taskType.value) {
|
|
switch (taskType.value) {
|
|
case '1':
|
|
case '1':
|
|
getTrainResultApi(subTaskId).then(res => {
|
|
getTrainResultApi(subTaskId).then(res => {
|
|
resultsFlag.value = false
|
|
resultsFlag.value = false
|
|
handleResultData(res.data)
|
|
handleResultData(res.data)
|
|
|
|
+ resultVisible.value = true
|
|
})
|
|
})
|
|
break
|
|
break
|
|
case '2':
|
|
case '2':
|
|
getVerifyResultApi(subTaskId).then(res => {
|
|
getVerifyResultApi(subTaskId).then(res => {
|
|
resultsFlag.value = false
|
|
resultsFlag.value = false
|
|
handleResultData(res.data)
|
|
handleResultData(res.data)
|
|
|
|
+ resultVisible.value = true
|
|
})
|
|
})
|
|
break
|
|
break
|
|
case '3':
|
|
case '3':
|
|
@@ -235,12 +231,14 @@ const contrastResults = () => {
|
|
testResultsData.value = res.data as any
|
|
testResultsData.value = res.data as any
|
|
const num = testResultsData.value['agNameList'].length
|
|
const num = testResultsData.value['agNameList'].length
|
|
spanNum.value = 24 / num <= 4 ? 4 : parseInt(24 / num)
|
|
spanNum.value = 24 / num <= 4 ? 4 : parseInt(24 / num)
|
|
|
|
+ resultVisible.value = true
|
|
})
|
|
})
|
|
break
|
|
break
|
|
default:
|
|
default:
|
|
break
|
|
break
|
|
}
|
|
}
|
|
- resultVisible.value = true
|
|
|
|
|
|
+ } else {
|
|
|
|
+ ElMessage.warning(`所有算法状态为‘已完成’,才可以对比`)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
const handleResultData = data => {
|
|
const handleResultData = data => {
|
|
@@ -362,14 +360,14 @@ const columns = reactive<ColumnProps<any>[]>([
|
|
},
|
|
},
|
|
width: 120
|
|
width: 120
|
|
},
|
|
},
|
|
- {
|
|
|
|
- prop: 'type',
|
|
|
|
- label: '任务类型',
|
|
|
|
- search: {
|
|
|
|
- el: 'input'
|
|
|
|
- },
|
|
|
|
- width: 120
|
|
|
|
- },
|
|
|
|
|
|
+ // {
|
|
|
|
+ // prop: 'type',
|
|
|
|
+ // label: '任务类型',
|
|
|
|
+ // search: {
|
|
|
|
+ // el: 'input'
|
|
|
|
+ // },
|
|
|
|
+ // width: 120
|
|
|
|
+ // },
|
|
{
|
|
{
|
|
prop: 'status',
|
|
prop: 'status',
|
|
label: '任务状态',
|
|
label: '任务状态',
|
|
@@ -453,13 +451,13 @@ const setItemsOptions = () => {
|
|
placeholder: '请输入任务名称'
|
|
placeholder: '请输入任务名称'
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- // {
|
|
|
|
- // label: '任务类型',
|
|
|
|
- // prop: 'type',
|
|
|
|
- // compOptions: {
|
|
|
|
- // placeholder: '请输入任务类型'
|
|
|
|
- // }
|
|
|
|
- // },
|
|
|
|
|
|
+ {
|
|
|
|
+ label: '任务类型',
|
|
|
|
+ prop: 'type',
|
|
|
|
+ compOptions: {
|
|
|
|
+ placeholder: '请输入任务类型'
|
|
|
|
+ }
|
|
|
|
+ },
|
|
{
|
|
{
|
|
label: '任务状态',
|
|
label: '任务状态',
|
|
prop: 'status',
|
|
prop: 'status',
|
|
@@ -577,7 +575,7 @@ const setItemsOptions = () => {
|
|
overflow: scroll scroll;
|
|
overflow: scroll scroll;
|
|
.headerRow {
|
|
.headerRow {
|
|
height: 50px;
|
|
height: 50px;
|
|
- font-size: 1.5rem;
|
|
|
|
|
|
+ font-size: 1.2rem;
|
|
line-height: 50px;
|
|
line-height: 50px;
|
|
text-align: center;
|
|
text-align: center;
|
|
}
|
|
}
|