|
@@ -72,7 +72,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="tsx" name="DataAugmentation">
|
|
|
-import { ref, reactive } from 'vue'
|
|
|
+import { ref, reactive, onMounted } from 'vue'
|
|
|
import { useHandleData } from '@/hooks/useHandleData'
|
|
|
import { useDownload } from '@/hooks/useDownload'
|
|
|
import { ElMessageBox, ElMessage } from 'element-plus'
|
|
@@ -94,7 +94,7 @@ import {
|
|
|
getCompareImageApi,
|
|
|
getCompareImageCountApi
|
|
|
} from '@/api/modules/demo/dataAugmentation'
|
|
|
-
|
|
|
+import { listDataApi } from '@/api/modules/system/dictData'
|
|
|
const dialogVisible = ref(false)
|
|
|
const taskId = ref('')
|
|
|
const imageIdx = ref(0)
|
|
@@ -110,7 +110,39 @@ const dialogTitle = ref('')
|
|
|
const fileCount = ref(0)
|
|
|
const imageFps = ref(0)
|
|
|
const intervalChangeFps: any = ref()
|
|
|
+const taskType = ref([])
|
|
|
+const taskTypeEnums: EnumProps[] = []
|
|
|
|
|
|
+const getTaskType = async () => {
|
|
|
+ const res: any = await listDataApi({
|
|
|
+ dictName: '',
|
|
|
+ dictType: 'biz_data_augmentation',
|
|
|
+ dictLabel: '任务类型',
|
|
|
+ pageNum: 0,
|
|
|
+ pageSize: 1000
|
|
|
+ })
|
|
|
+ if (res.data.list.length != 0) {
|
|
|
+ taskType.value = res.data.list.map(item => ({
|
|
|
+ label: item.dictValue,
|
|
|
+ value: item.dictValue
|
|
|
+ }))
|
|
|
+ res.data.list.forEach(item => {
|
|
|
+ taskTypeEnums.push({
|
|
|
+ label: item.dictValue,
|
|
|
+ value: item.dictValue,
|
|
|
+ disabled: false,
|
|
|
+ tagType: 'default'
|
|
|
+ })
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ ElMessage.error('task_type为空,请在数据字典中设置具体的任务类型!')
|
|
|
+ }
|
|
|
+
|
|
|
+ // console.log(taskType.value)
|
|
|
+}
|
|
|
+onMounted(() => {
|
|
|
+ getTaskType()
|
|
|
+})
|
|
|
const changeFps = () => {
|
|
|
console.log('changeFps')
|
|
|
if (intervalChangeFps.value) {
|
|
@@ -151,6 +183,7 @@ const loadImageData = async (taskId: string, imageIdx: number) => {
|
|
|
imageBase64List.value.origin = res.origin
|
|
|
imageBase64List.value.stable = res.stable
|
|
|
}
|
|
|
+
|
|
|
const compareDataAugmentation = async (params: any) => {
|
|
|
taskId.value = params.id
|
|
|
imageIdx.value = 0
|
|
@@ -299,6 +332,16 @@ const columns = reactive<ColumnProps<any>[]>([
|
|
|
},
|
|
|
width: 150
|
|
|
},
|
|
|
+ {
|
|
|
+ prop: 'taskType',
|
|
|
+ label: '任务类型',
|
|
|
+ search: {
|
|
|
+ el: 'select'
|
|
|
+ },
|
|
|
+ width: 100,
|
|
|
+ tag: true,
|
|
|
+ enum: taskTypeEnums
|
|
|
+ },
|
|
|
{
|
|
|
prop: 'status',
|
|
|
label: '任务状态',
|
|
@@ -384,6 +427,16 @@ const setItemsOptions = () => {
|
|
|
placeholder: '请输入任务名称'
|
|
|
}
|
|
|
},
|
|
|
+ {
|
|
|
+ label: '任务类型',
|
|
|
+ prop: 'taskType',
|
|
|
+ rules: [{ required: true, message: '任务类型不能为空', trigger: 'change' }],
|
|
|
+ compOptions: {
|
|
|
+ elTagName: 'select', // 指定使用 el-select 组件
|
|
|
+ placeholder: '请选择任务类型',
|
|
|
+ enum: taskType
|
|
|
+ }
|
|
|
+ },
|
|
|
{
|
|
|
label: '图片集压缩包',
|
|
|
prop: 'inputOssId',
|