|
@@ -5,7 +5,7 @@
|
|
|
<template #tableHeader="scope">
|
|
|
<el-button type="primary" v-auth="['demo:DataAugmentation:add']" icon="CirclePlus" @click="openDialog(1, '任务新增')"> 新增 </el-button>
|
|
|
<!-- <el-button type="primary" v-auth="['demo:DataAugmentation:import']" icon="Upload" plain @click="batchAdd"> 导入</el-button> -->
|
|
|
- <el-button type="primary" v-auth="['demo:DataAugmentation:export']" icon="Download" plain @click="downloadFile"> 导出 </el-button>
|
|
|
+ <!-- <el-button type="primary" v-auth="['demo:DataAugmentation:export']" icon="Download" plain @click="downloadFile"> 导出 </el-button> -->
|
|
|
<el-button
|
|
|
type="danger"
|
|
|
v-auth="['demo:DataAugmentation:remove']"
|
|
@@ -34,10 +34,20 @@
|
|
|
</template>
|
|
|
</el-popconfirm>
|
|
|
<el-button type="primary" link icon="View" @click="compareDataAugmentation(scope.row)" v-if="scope.row.status == '2'"> 预览 </el-button>
|
|
|
+ <el-button type="primary" link icon="View" @click="downloadFile(scope.row)" v-if="scope.row.status == '2'"> 导出 </el-button>
|
|
|
<el-button type="primary" link icon="View" v-auth="['demo:DataAugmentation:query']" @click="openDialog(3, '任务查看', scope.row)">
|
|
|
查看
|
|
|
</el-button>
|
|
|
- <el-button type="primary" link icon="View" v-auth="['demo:DataAugmentation:query']" @click="openLogDialog(scope.row.id)"> 日志 </el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ link
|
|
|
+ icon="View"
|
|
|
+ v-auth="['demo:DataAugmentation:query']"
|
|
|
+ @click="openLogDialog(scope.row.id)"
|
|
|
+ v-if="scope.row.status != '0'"
|
|
|
+ >
|
|
|
+ 日志
|
|
|
+ </el-button>
|
|
|
<el-button type="primary" link icon="Delete" v-auth="['demo:DataAugmentation:remove']" @click="deleteDataAugmentation(scope.row)">
|
|
|
删除
|
|
|
</el-button>
|
|
@@ -112,7 +122,7 @@ const taskType = ref([])
|
|
|
const taskTypeEnums: EnumProps[] = []
|
|
|
|
|
|
const hyperparameterConfiguration = []
|
|
|
-const hyperparameter = ref('')
|
|
|
+
|
|
|
const logDialogVisible = ref(false)
|
|
|
const logDialog = ref('')
|
|
|
const openLogDialog = async (id: string | number) => {
|
|
@@ -141,6 +151,7 @@ const getTaskType = async () => {
|
|
|
tagType: 'default'
|
|
|
})
|
|
|
})
|
|
|
+ console.log(taskTypeEnums)
|
|
|
for (let i = 0; i < taskType.value.length; i++) {
|
|
|
let dictValue = taskType.value[i].value
|
|
|
const res: any = await listDataApi({
|
|
@@ -198,6 +209,10 @@ const loadImageData = async (taskId: string, imageIdx: number) => {
|
|
|
}
|
|
|
|
|
|
const compareDataAugmentation = async (params: any) => {
|
|
|
+ if (taskId.value !== '' && taskId.value !== null && taskId.value !== undefined && taskId.value == params.id) {
|
|
|
+ dialogVisible.value = true
|
|
|
+ return
|
|
|
+ }
|
|
|
taskId.value = params.id
|
|
|
imageIdx.value = 0
|
|
|
cacheImages.value = {}
|
|
@@ -266,9 +281,9 @@ const batchDelete = async (ids: string[]) => {
|
|
|
}
|
|
|
|
|
|
// 导出视频去抖动列表
|
|
|
-const downloadFile = async () => {
|
|
|
+const downloadFile = async task => {
|
|
|
ElMessageBox.confirm('确认导出任务数据?', '温馨提示', { type: 'warning' }).then(() =>
|
|
|
- useDownload(exportDataAugmentationApi, '任务列表', proTable.value?.searchParam)
|
|
|
+ useDownload(exportDataAugmentationApi, 'export', task.outputPath)
|
|
|
)
|
|
|
}
|
|
|
|
|
@@ -483,6 +498,7 @@ const setItemsOptions = () => {
|
|
|
itemsOptions.splice(4) // 如果里面有新增参数,删除,重新添加
|
|
|
}
|
|
|
}
|
|
|
+const hyperparameter = ref({})
|
|
|
const addParams = params => {
|
|
|
setItemsOptions()
|
|
|
if (params == 'null') {
|
|
@@ -491,16 +507,24 @@ const addParams = params => {
|
|
|
let validJsonString = params.replace(/'/g, '"')
|
|
|
try {
|
|
|
const obj: { [key: string]: number } = JSON.parse(validJsonString)
|
|
|
+ // hyperparameter.value = { ...obj };
|
|
|
Object.keys(obj).forEach(key => {
|
|
|
- // model.value[key] = obj[key]
|
|
|
+ model.value[key] = obj[key]
|
|
|
+ // hyperparameter[key] = obj[key]
|
|
|
itemsOptions.push({
|
|
|
label: key,
|
|
|
prop: key,
|
|
|
- rules: [{ required: true, trigger: 'blur' }],
|
|
|
+ rules: [{ trigger: 'blur' }],
|
|
|
compOptions: {
|
|
|
type: 'input',
|
|
|
clearable: true,
|
|
|
- placeholder: obj[key]
|
|
|
+ placeholder: '默认值为' + obj[key]
|
|
|
+ // value: hyperparameter.value[key],
|
|
|
+ // onChange: (value) => {
|
|
|
+ // hyperparameter.value[key] = value
|
|
|
+ // console.log(hyperparameter)
|
|
|
+ // // model.value[key] = value
|
|
|
+ // }
|
|
|
}
|
|
|
})
|
|
|
})
|