|
@@ -16,7 +16,7 @@
|
|
|
>
|
|
|
批量删除
|
|
|
</el-button>
|
|
|
- <el-button type="primary" v-auth="['task:bizProcess:add']" icon="View" @click="contrastResults()"> 对比结果 </el-button>
|
|
|
+ <el-button type="primary" v-auth="['task:bizProcess:add']" icon="CirclePlus" @click="contrastResults()"> 对比结果 </el-button>
|
|
|
</template>
|
|
|
<!-- 表格操作 -->
|
|
|
<template #operation="scope">
|
|
@@ -37,54 +37,6 @@
|
|
|
<div class="p" v-for="(item, index) in logInfo" :key="index">{{ item }}</div>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
- <el-dialog v-model="resultVisible" title="对比结果" width="70%">
|
|
|
- <div style="width: 100%" class="resultShow">
|
|
|
- <el-row class="headerRow">
|
|
|
- <el-col class="col" :span="4" v-for="(agloName, index) in resultsData['agNameList']" :key="index">
|
|
|
- <span>{{ agloName }}</span>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row class="row">
|
|
|
- <el-col class="col" :span="4" v-for="(RCurveUrl, index) in resultsData['rcureList']" :key="index">
|
|
|
- <div v-if="index !== 1" class="oneCol">{{ RCurveUrl }}</div>
|
|
|
- <ImagePreview
|
|
|
- class="img"
|
|
|
- v-else
|
|
|
- :width="100"
|
|
|
- :height="100"
|
|
|
- :src="'/api/profile' + RCurveUrl"
|
|
|
- :preview-src-list="['/api/profile' + RCurveUrl]"
|
|
|
- />
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row class="row">
|
|
|
- <el-col class="col" :span="4" v-for="(PCurveUrl, index) in resultsData['pcureList']" :key="index">
|
|
|
- <div v-if="index !== 1" class="oneCol">{{ PCurveUrl }}</div>
|
|
|
- <ImagePreview
|
|
|
- class="img"
|
|
|
- v-else
|
|
|
- :width="100"
|
|
|
- :height="100"
|
|
|
- :src="'/api/profile' + PCurveUrl"
|
|
|
- :preview-src-list="['/api/profile' + PCurveUrl]"
|
|
|
- />
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row class="row">
|
|
|
- <el-col class="col" :span="4" v-for="(F1CurveUrl, index) in resultsData['f1cureList']" :key="index">
|
|
|
- <div v-if="index !== 1" class="oneCol">{{ F1CurveUrl }}</div>
|
|
|
- <ImagePreview
|
|
|
- class="img"
|
|
|
- v-else
|
|
|
- :width="100"
|
|
|
- :height="100"
|
|
|
- :src="'/api/profile' + F1CurveUrl"
|
|
|
- :preview-src-list="['/api/profile' + F1CurveUrl]"
|
|
|
- />
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </div>
|
|
|
- </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -97,6 +49,7 @@ import ProTable from '@/components/ProTable/index.vue'
|
|
|
import ImportExcel from '@/components/ImportExcel/index.vue'
|
|
|
import FormDialog from '@/components/FormDialog/index.vue'
|
|
|
import { ProTableInstance, ColumnProps } from '@/components/ProTable/interface'
|
|
|
+import { getDictsApi } from '@/api/modules/system/dictData'
|
|
|
import {
|
|
|
listBizProcessApi,
|
|
|
delBizProcessApi,
|
|
@@ -105,26 +58,15 @@ import {
|
|
|
importTemplateApi,
|
|
|
importBizProcessDataApi,
|
|
|
exportBizProcessApi,
|
|
|
- getBizProcessApi,
|
|
|
- getTrainResultApi,
|
|
|
- getVerifyResultApi,
|
|
|
- getTestResultApi
|
|
|
+ getBizProcessApi
|
|
|
} from '@/api/modules/task/bizProcess'
|
|
|
-import { getSubtaskApi } from '@/api/modules/task/subtask'
|
|
|
-import { getDictsApi } from '@/api/modules/system/dictData'
|
|
|
import { useRoute } from 'vue-router'
|
|
|
-import ImagePreview from '@/components/ImagePreview/index.vue'
|
|
|
const route = useRoute()
|
|
|
const subTaskId = route.query.id as string
|
|
|
// ProTable 实例
|
|
|
const proTable = ref<ProTableInstance>()
|
|
|
const dialogVisible = ref(false)
|
|
|
-const resultVisible = ref(false)
|
|
|
-let resultsData = ref({})
|
|
|
-let logList = ref()
|
|
|
let logInfo = ref([] as string[])
|
|
|
-let taskType = ref()
|
|
|
-let taskStatus = ref()
|
|
|
|
|
|
let bizProcessList = ref()
|
|
|
// 每隔10秒请求一下列表
|
|
@@ -141,10 +83,7 @@ const refreshList = () => {
|
|
|
}, 0)
|
|
|
}
|
|
|
onMounted(() => {
|
|
|
- getSubtaskApi(subTaskId).then(res => {
|
|
|
- taskType.value = res.data.type
|
|
|
- taskStatus.value = res.data.status
|
|
|
- })
|
|
|
+ // timer
|
|
|
refreshList()
|
|
|
timer.value = setInterval(() => {
|
|
|
refreshList()
|
|
@@ -184,58 +123,14 @@ const batchAdd = () => {
|
|
|
|
|
|
// 对比结果
|
|
|
const contrastResults = () => {
|
|
|
- // if (taskStatus.value !== '3') {
|
|
|
- // ElMessage.warning(`算法状态为${taskStatus.value},暂无对比结果`)
|
|
|
- // return
|
|
|
- // }
|
|
|
- switch (taskType.value) {
|
|
|
- case '1':
|
|
|
- getTrainResultApi(subTaskId).then(res => {
|
|
|
- handleResultData(res.data)
|
|
|
- })
|
|
|
- break
|
|
|
- case '2':
|
|
|
- getVerifyResultApi(subTaskId).then(res => {
|
|
|
- handleResultData(res.data)
|
|
|
- })
|
|
|
- break
|
|
|
- case '3':
|
|
|
- getTestResultApi(subTaskId).then(res => {
|
|
|
- console.log('333', res)
|
|
|
- })
|
|
|
- break
|
|
|
- default:
|
|
|
- break
|
|
|
- }
|
|
|
- resultVisible.value = true
|
|
|
-}
|
|
|
-const handleResultData = data => {
|
|
|
- resultsData.value = data
|
|
|
- resultsData.value['agNameList'].unshift('')
|
|
|
- resultsData.value['rcureList'].unshift('R_curve')
|
|
|
- resultsData.value['pcureList'].unshift('P_curve')
|
|
|
- resultsData.value['f1cureList'].unshift('F1_curve')
|
|
|
+ console.log('对比结果')
|
|
|
}
|
|
|
// 查看日志
|
|
|
const viewLog = row => {
|
|
|
- // if (taskStatus.value !== '0') {
|
|
|
- // ElMessage.warning('算法状态为待处理,暂无日志')
|
|
|
- // return
|
|
|
- // }
|
|
|
- console.log(row.log)
|
|
|
- const url = '/api/profile/task/log.log'
|
|
|
- fetchLogFile(url)
|
|
|
+ fetchLogFile(row.log)
|
|
|
.then(text => {
|
|
|
- logList.value = text.split('\n')
|
|
|
- // console.log('logList.value', logList.value)
|
|
|
- // if (taskStatus.value === '1') {
|
|
|
- // info(logList.value)
|
|
|
- // dialogVisible.value = true
|
|
|
- // } else if (taskStatus.value === '2') {
|
|
|
- // logInfo.value = logList.value
|
|
|
- // dialogVisible.value = true
|
|
|
- // }
|
|
|
- info(logList.value)
|
|
|
+ console.log('text', text)
|
|
|
+ info(text)
|
|
|
dialogVisible.value = true
|
|
|
})
|
|
|
.catch(error => {
|
|
@@ -245,6 +140,7 @@ const viewLog = row => {
|
|
|
}
|
|
|
|
|
|
const fetchLogFile = async url => {
|
|
|
+ console.log('url', url)
|
|
|
try {
|
|
|
const response = await fetch(url, { method: 'GET' })
|
|
|
if (!response.ok) {
|
|
@@ -271,7 +167,7 @@ const info = logText => {
|
|
|
} else {
|
|
|
clearInterval(timer2.value)
|
|
|
}
|
|
|
- }, 300)
|
|
|
+ }, 50)
|
|
|
}
|
|
|
const formDialogRef = ref<InstanceType<typeof FormDialog> | null>(null)
|
|
|
// 打开弹框的功能
|
|
@@ -302,7 +198,6 @@ watch(
|
|
|
val => {
|
|
|
if (!val) {
|
|
|
clearInterval(timer2.value)
|
|
|
- timer2.value = null
|
|
|
}
|
|
|
}
|
|
|
)
|
|
@@ -534,28 +429,4 @@ const setItemsOptions = () => {
|
|
|
margin-bottom: 5px;
|
|
|
border-left: 3px solid #4aff84;
|
|
|
}
|
|
|
-.resultShow {
|
|
|
- width: 100%;
|
|
|
- height: 60vh;
|
|
|
- overflow: hidden;
|
|
|
- overflow: scroll scroll;
|
|
|
- .headerRow {
|
|
|
- height: 50px;
|
|
|
- font-size: 1.5rem;
|
|
|
- line-height: 50px;
|
|
|
- text-align: center;
|
|
|
- }
|
|
|
- .row {
|
|
|
- .col {
|
|
|
- text-align: center;
|
|
|
- .oneCol {
|
|
|
- margin-top: 45px;
|
|
|
- font-size: 1.2rem;
|
|
|
- }
|
|
|
- .img {
|
|
|
- margin: 10px 0;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
</style>
|