|
@@ -17,6 +17,8 @@
|
|
批量删除
|
|
批量删除
|
|
</el-button>
|
|
</el-button>
|
|
<el-button type="primary" icon="View" @click="showCompareResult"> 对比结果 </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>
|
|
</template>
|
|
</template>
|
|
<!-- 表格操作 -->
|
|
<!-- 表格操作 -->
|
|
<template #operation="scope">
|
|
<template #operation="scope">
|
|
@@ -181,8 +183,27 @@
|
|
</el-card>
|
|
</el-card>
|
|
</el-container>
|
|
</el-container>
|
|
</el-container>
|
|
</el-container>
|
|
|
|
+ </el-dialog>
|
|
|
|
|
|
|
|
+ <el-dialog
|
|
|
|
+ v-model="valDialogVisible"
|
|
|
|
+ :title="titleMsg"
|
|
|
|
+ style="width: 85vw; height: 85vh"
|
|
|
|
+ >
|
|
|
|
+ <!-- style="width: 70vw"-->
|
|
|
|
+ <el-container style="display: flex; flex-direction: row">
|
|
|
|
+ <el-container v-for="(item, index) in imgDataList" :key="index" style="display: flex; flex-direction: column">
|
|
|
|
+ <!-- <el-button @click="console.log(item)">test</el-button>-->
|
|
|
|
|
|
|
|
+ <el-container v-for="(_item, _index) in item" :key="_index">
|
|
|
|
+ <span v-if="_item.name" style="width: 80px; margin-right: 20px"> {{ _item.name }} </span>
|
|
|
|
+ <el-image v-if="_item.srcUrl" :src="_item.srcUrl" style="height: 200px; width:200px"></el-image>
|
|
|
|
+ <span v-if="_item.imgUrl">标签</span>
|
|
|
|
+ <ImgMaker style="height: 200px; width:200px" ref="imgMaker" v-if="_item.imgUrl" :is-pic-only="true" :src="_item.imgUrl" :area="area" :width="200" :height="200" :c-width="200" :c-height="200" :class-def="typeDefs" :json-data="_item.jsonData"></ImgMaker>
|
|
|
|
+ <el-image v-if="_item.resUrl" :src="_item.resUrl" style="height: 200px; width:200px"></el-image>
|
|
|
|
+ </el-container>
|
|
|
|
+ </el-container>
|
|
|
|
+ </el-container>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
@@ -196,6 +217,7 @@ import ProTable from '@/components/ProTable/index.vue'
|
|
import ImportExcel from '@/components/ImportExcel/index.vue'
|
|
import ImportExcel from '@/components/ImportExcel/index.vue'
|
|
import FormDialog from '@/components/FormDialog/index.vue'
|
|
import FormDialog from '@/components/FormDialog/index.vue'
|
|
import { ProTableInstance, ColumnProps } from '@/components/ProTable/interface'
|
|
import { ProTableInstance, ColumnProps } from '@/components/ProTable/interface'
|
|
|
|
+import ImgMaker from '../../demo/components/img-maker'
|
|
import {
|
|
import {
|
|
listBizProcessApi,
|
|
listBizProcessApi,
|
|
delBizProcessApi,
|
|
delBizProcessApi,
|
|
@@ -205,11 +227,12 @@ import {
|
|
getBizProcessApi,
|
|
getBizProcessApi,
|
|
getTrainResultApi,
|
|
getTrainResultApi,
|
|
getVerifyResultApi,
|
|
getVerifyResultApi,
|
|
- getTestResultApi
|
|
|
|
|
|
+ getTestResultApi,
|
|
|
|
+ getImgList
|
|
} from '@/api/modules/task/bizProcessNew'
|
|
} from '@/api/modules/task/bizProcessNew'
|
|
// getTrainResultApi,getVerifyResultApi,getTestResultApi
|
|
// 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, listDataApi as listDictDataApi} from '@/api/modules/system/dictData'
|
|
import { useRoute } from 'vue-router'
|
|
import { useRoute } from 'vue-router'
|
|
import ImagePreview from '@/components/ImagePreview/index.vue'
|
|
import ImagePreview from '@/components/ImagePreview/index.vue'
|
|
import http from "@/api";
|
|
import http from "@/api";
|
|
@@ -220,6 +243,103 @@ let refSelectData = ref(reactive({}))
|
|
const reRunTask = row => {
|
|
const reRunTask = row => {
|
|
http.post<any>('/identification/identificationSubtaskDetails/execute', {taskId: row.id}, { loading: false })
|
|
http.post<any>('/identification/identificationSubtaskDetails/execute', {taskId: row.id}, { loading: false })
|
|
}
|
|
}
|
|
|
|
+const typeDefs = ref(reactive([]))
|
|
|
|
+
|
|
|
|
+let imgDataList = ref(reactive([]))
|
|
|
|
+let titleMsg = ref('')
|
|
|
|
+let valDialogVisible = ref(false)
|
|
|
|
+const showValResult = async isVal => {
|
|
|
|
+ let hasInit = false
|
|
|
|
+ titleMsg.value = isVal ? '验证结果对比' : '测试结果对比'
|
|
|
|
+ imgDataList.value = reactive([])
|
|
|
|
+ for (let i = 0; i < listData.value.length; i++) {
|
|
|
|
+ if (listData.value[i].name.indexOf(isVal ? '验证' : '测试') !== -1) {
|
|
|
|
+ console.log(listData.value[i])
|
|
|
|
+ if (!hasInit) {
|
|
|
|
+ hasInit = true;
|
|
|
|
+ let res = await getImgList({
|
|
|
|
+ taskId: listData.value[i].preprocessPath.substring(1).split('/')[0],
|
|
|
|
+ subPath: 'images'
|
|
|
|
+ })
|
|
|
|
+ console.log('res data', res)
|
|
|
|
+ imgDataList.value.push([])
|
|
|
|
+ for (let j = 0 ; j < res.data.length; j++) {
|
|
|
|
+ let jList = res.data[j].split('.')
|
|
|
|
+ jList[jList.length - 1] = 'txt'
|
|
|
|
+ let obj = {
|
|
|
|
+ name: res.data[j],
|
|
|
|
+ srcUrl: 'api/profile/task' + listData.value[i].preprocessPath + '/' + res.data[j],
|
|
|
|
+ // imgUrl: 'api/profile/task' + listData.value[i].preprocessPath + '/images/' + res.data[j],
|
|
|
|
+ // labelUrl: 'api/profile/task' + listData.value[i].preprocessPath + '/labels/' + jList.join('.')
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ imgDataList.value[imgDataList.value.length - 1].push(obj)
|
|
|
|
+ if (isVal) {
|
|
|
|
+ obj.imgUrl = 'api/profile/task' + listData.value[i].preprocessPath + '/images/' + res.data[j];
|
|
|
|
+ obj.labelUrl = '/profile/task' + listData.value[i].preprocessPath + '/labels/' + jList.join('.')
|
|
|
|
+ console.log( 'url is', obj.labelUrl)
|
|
|
|
+ setDetail(obj)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ let res = await getImgList({
|
|
|
|
+ taskId: listData.value[i].preprocessPath.substring(1).split('/')[0],
|
|
|
|
+ subPath: 'images'
|
|
|
|
+ })
|
|
|
|
+ console.log(res.data)
|
|
|
|
+ imgDataList.value.push([])
|
|
|
|
+ for (let j = 0 ; j < res.data.length; j++) {
|
|
|
|
+ let jList = res.data[j].split('.')
|
|
|
|
+ jList[jList - 1] = 'txt'
|
|
|
|
+ imgDataList.value[imgDataList.value.length - 1].push({
|
|
|
|
+ resUrl: 'api/profile/task' + listData.value[i].resultPath + '/' + res.data[j],
|
|
|
|
+ name: listData.value[i].name
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ console.log(imgDataList)
|
|
|
|
+ valDialogVisible.value = true
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+const setDetail = obj => {
|
|
|
|
+ http.get<any>(obj.labelUrl)
|
|
|
|
+ .then(res => {
|
|
|
|
+ obj.jsonData = []
|
|
|
|
+ console.log('result', res)
|
|
|
|
+ let arr = res.split('\r\n')
|
|
|
|
+ console.log(arr)
|
|
|
|
+ for (let i = 0; i < arr.length; i++) {
|
|
|
|
+ let subArr = arr[i].split(' ')
|
|
|
|
+ // console.log(subArr)
|
|
|
|
+ let cssVal = '#000000'
|
|
|
|
+ let label = '-1'
|
|
|
|
+ for (let j = 0; j < typeDefs.value.length; j++) {
|
|
|
|
+ if (typeDefs.value[j].label === subArr[0]) {
|
|
|
|
+ cssVal = typeDefs.value[j].color
|
|
|
|
+ label = typeDefs.value[j].label
|
|
|
|
+ break
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ const ww = 200
|
|
|
|
+ const hh = 200
|
|
|
|
+ obj.jsonData.push({
|
|
|
|
+ pathString: 'M ' + subArr[1] * ww + ' ' + subArr[2] * hh +
|
|
|
|
+ ' L ' + subArr[3] * ww + ' ' + subArr[4] * hh +
|
|
|
|
+ ' L ' + subArr[5] * ww + ' ' + subArr[6] * hh +
|
|
|
|
+ ' L ' + subArr[7] * ww + ' ' + subArr[8] * hh +
|
|
|
|
+ ' z',
|
|
|
|
+ // left: 0,
|
|
|
|
+ // top: 0,
|
|
|
|
+ fill: '',
|
|
|
|
+ stroke: cssVal,
|
|
|
|
+ strokeWidth: 5,
|
|
|
|
+ label: label
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+}
|
|
|
|
+
|
|
let compareDialogVisible = ref(false)
|
|
let compareDialogVisible = ref(false)
|
|
let listData = ref(reactive([]))
|
|
let listData = ref(reactive([]))
|
|
const showCompareResult = () => {
|
|
const showCompareResult = () => {
|
|
@@ -262,6 +382,22 @@ const refreshList = () => {
|
|
}, 0)
|
|
}, 0)
|
|
}
|
|
}
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
|
+ listDictDataApi({
|
|
|
|
+ pageNum: 1,
|
|
|
|
+ pageSize: 10,
|
|
|
|
+ dictType: 'class_definition'
|
|
|
|
+ })
|
|
|
|
+ .then(res => {
|
|
|
|
+ // console.log(res)
|
|
|
|
+ for (let i = 0; i < res.data.list.length; i++) {
|
|
|
|
+ typeDefs.value.push({
|
|
|
|
+ name: res.data.list[i].dictLabel,
|
|
|
|
+ color: res.data.list[i].cssClass,
|
|
|
|
+ label: res.data.list[i].dictValue
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+
|
|
getSubtaskApi(subTaskId).then(res => {
|
|
getSubtaskApi(subTaskId).then(res => {
|
|
taskType.value = res.data.type
|
|
taskType.value = res.data.type
|
|
taskStatus.value = res.data.status
|
|
taskStatus.value = res.data.status
|