diff --git a/src/components.d.ts b/src/components.d.ts index b39b99c..90f2dde 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -63,6 +63,5 @@ SystemInfo: typeof import('./components/SystemInfo/index.vue')['default'] TableContainer: typeof import('./components/TableContainer/index.vue')['default'] Trend: typeof import('./components/Trend/index.vue')['default'] - UploadMultiFiles: typeof import('./components/uploadMultiFiles/uploadMultiFiles.vue')['default'] } } diff --git a/src/components.d.ts b/src/components.d.ts index b39b99c..90f2dde 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -63,6 +63,5 @@ SystemInfo: typeof import('./components/SystemInfo/index.vue')['default'] TableContainer: typeof import('./components/TableContainer/index.vue')['default'] Trend: typeof import('./components/Trend/index.vue')['default'] - UploadMultiFiles: typeof import('./components/uploadMultiFiles/uploadMultiFiles.vue')['default'] } } diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue index a2c536b..59a986f 100644 --- a/src/views/device/standardEquipment/components/standardList/baseInfo.vue +++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue @@ -195,11 +195,16 @@ } }) formInline.value = res.data + const tempArr = [] as any + if (res.data.fileList && res.data.fileList.length) { + res.data.fileList.forEach((item: { minioFileName: string }) => { + tempArr.push(item.minioFileName) + }) + } + formInline.value.minioFileName = tempArr }) } -if (props.buttonType !== 'add') { - getInfo() -} + // 计量人员组件 const personListdialog = ref() // 点击选择负责人函数 @@ -240,6 +245,13 @@ UploadFile(fd).then((res) => { if (res.code === 200) { formInline.value.minioFileName = res.data + const tempfileList = [] as any + res.data.forEach((item: string) => { + tempfileList.push({ + minioFileName: item, + }) + }) + formInline.value.fileList = tempfileList // 重置当前验证 ElMessage.success('文件上传成功') } @@ -262,7 +274,12 @@ const submitForm = () => { return ruleFormRef.value } -defineExpose({ submitForm }) +defineExpose({ submitForm, formInline }) +onMounted(() => { + if (props.buttonType !== 'add') { // 编辑和详情获取详情信息 + getInfo() + } +})