|
@@ -249,6 +249,9 @@ const loadSomeData = async (row?: any) => {
|
|
|
await getToInfraredModelList()
|
|
|
} else if (row.subsystem === SubSystem__['目标检测']) {
|
|
|
} else if (row.subsystem === SubSystem__['注释轨迹序列']) {
|
|
|
+ enumsAlgorithmConfigTrack_trackSequence.value = await getEnumsAlgorithmConfigTrack('注释轨迹序列', [AlgorithmType[row.type]])
|
|
|
+ enumsAlgorithmModelTrack.value = await getEnumsAlgorithmModelTrack('注释轨迹序列')
|
|
|
+ enumsAlgorithmModelTrack_TD.value = await getEnumsAlgorithmModelTrack('目标检测')
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -272,6 +275,9 @@ const openSubTaskViewDialog = async (type: number, title: string, row?: any) =>
|
|
|
console.log('注释轨迹序列')
|
|
|
res = await getTrackSequenceApi(row.id || null)
|
|
|
api = updateTrackSequenceApi
|
|
|
+
|
|
|
+ // 重置表单
|
|
|
+ setItemsOptions_TrackSequence()
|
|
|
} else {
|
|
|
console.log('其他')
|
|
|
ElMessage.error('暂不支持该子任务类型')
|
|
@@ -449,6 +455,144 @@ const setItemsOptions_ToInfrared = () => {
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
+const enumsAlgorithmConfigTrack_trackSequence = ref<any[]>([])
|
|
|
+const enumsAlgorithmModelTrack = ref<any[]>([])
|
|
|
+const enumsAlgorithmModelTrack_TD = ref<any[]>([])
|
|
|
+const setItemsOptions_TrackSequence = () => {
|
|
|
+ itemsOptions = [
|
|
|
+ {
|
|
|
+ label: '任务名称',
|
|
|
+ prop: 'name',
|
|
|
+ rules: [{ required: true, message: '任务名称不能为空', trigger: 'blur' }],
|
|
|
+ compOptions: {
|
|
|
+ placeholder: '请输入任务名称'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '选择数据集',
|
|
|
+ prop: 'inputOssId',
|
|
|
+ rules: [{ required: false, message: '数据集不能为空', trigger: 'blur' }],
|
|
|
+ compOptions: {
|
|
|
+ elTagName: 'select',
|
|
|
+ placeholder: '请选择或者上传数据集',
|
|
|
+ enum: datasetList,
|
|
|
+ clearable: true
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '上传数据集',
|
|
|
+ prop: 'inputOssId',
|
|
|
+ rules: [{ required: false, message: '数据集不能为空', trigger: 'blur' }],
|
|
|
+ compOptions: {
|
|
|
+ elTagName: 'file-upload',
|
|
|
+ fileSize: 4096,
|
|
|
+ fileType: ['zip'],
|
|
|
+ placeholder: '请上传数据集'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '选择算法',
|
|
|
+ prop: 'algorithmId',
|
|
|
+ rules: [{ required: true, message: '算法不能为空', trigger: 'blur' }],
|
|
|
+ compOptions: {
|
|
|
+ elTagName: 'select',
|
|
|
+ placeholder: '请选择算法',
|
|
|
+ enum: enumsAlgorithmConfigTrack_trackSequence,
|
|
|
+ clearable: true,
|
|
|
+ onChange: async (value: any) => {
|
|
|
+ if (value != undefined && value != null && value != '') {
|
|
|
+ await updateItemsOptions(value)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '任务类型',
|
|
|
+ prop: 'type',
|
|
|
+ rules: [{ required: true, message: '任务类型不能为空', trigger: 'blur' }],
|
|
|
+ compOptions: {
|
|
|
+ disabled: true,
|
|
|
+ elTagName: 'select',
|
|
|
+ placeholder: '请选择任务类型',
|
|
|
+ enum: enumsAlgorithmType,
|
|
|
+ clearable: true,
|
|
|
+ value: ''
|
|
|
+ },
|
|
|
+ show: params => {
|
|
|
+ if (params.value.algorithmId != undefined) {
|
|
|
+ for (let i = 0; i < enumsAlgorithmConfigTrack_trackSequence.value.length; i++) {
|
|
|
+ if (enumsAlgorithmConfigTrack_trackSequence.value[i]['value'] === params.value.algorithmId) {
|
|
|
+ params.value.type = enumsAlgorithmConfigTrack_trackSequence.value[i]['type']
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '选择模型',
|
|
|
+ prop: 'algorithmModelId',
|
|
|
+ rules: [{ required: true, message: '模型不能为空', trigger: 'blur' }],
|
|
|
+ show: params => {
|
|
|
+ if (params.value.type == AlgorithmType2['预测/推理']) {
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ params.value.algorithmModelId = ''
|
|
|
+ return false
|
|
|
+ },
|
|
|
+ compOptions: {
|
|
|
+ elTagName: 'select',
|
|
|
+ placeholder: '请选择模型',
|
|
|
+ enum: enumsAlgorithmModelTrack,
|
|
|
+ clearable: true
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '选择目标检测模型',
|
|
|
+ prop: 'algorithmModelTargetDetectionId',
|
|
|
+ rules: [{ required: false, message: '目标检测模型不能为空', trigger: 'blur' }],
|
|
|
+ show: params => {
|
|
|
+ if (params.value.type == AlgorithmType2['预测/推理']) {
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ params.value.algorithmModelTargetDetectionId = ''
|
|
|
+ return false
|
|
|
+ },
|
|
|
+ compOptions: {
|
|
|
+ elTagName: 'select',
|
|
|
+ placeholder: '请选择目标检测模型',
|
|
|
+ enum: enumsAlgorithmModelTrack_TD,
|
|
|
+ clearable: true
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '上传标签',
|
|
|
+ prop: 'inputLabelOssId',
|
|
|
+ rules: [{ required: true, message: '标签不能为空', trigger: 'blur' }],
|
|
|
+ show: params => {
|
|
|
+ if (params.value.type == AlgorithmType2['测试']) {
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ return false
|
|
|
+ },
|
|
|
+ compOptions: {
|
|
|
+ elTagName: 'file-upload',
|
|
|
+ fileSize: 4096,
|
|
|
+ fileType: ['txt'],
|
|
|
+ placeholder: '请上传标签'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '备注',
|
|
|
+ prop: 'remarks',
|
|
|
+ rules: [],
|
|
|
+ compOptions: {
|
|
|
+ placeholder: '请输入备注'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+}
|
|
|
|
|
|
const dialogVisibleView = ref(false)
|
|
|
const viewData = ref<any[]>([])
|