From 049bde5457aff109f17f552d2bf5790bed2e68d3 Mon Sep 17 00:00:00 2001 From: cwchen <1048842385@qq.com> Date: Mon, 17 Nov 2025 17:27:53 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=BA=BA=E5=91=98=E5=BA=93=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/common/UploadFile.vue | 5 ++--- .../personnel/components/PersonnelForm.vue | 3 ++- .../personnel/components/child/QualificationInfo.vue | 10 ++++++---- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/views/common/UploadFile.vue b/src/views/common/UploadFile.vue index 3ecefb7..b6573fb 100644 --- a/src/views/common/UploadFile.vue +++ b/src/views/common/UploadFile.vue @@ -169,13 +169,12 @@ export default { watch: { fileList: { handler(newVal) { - if (this.files.length === 0 && newVal.length > 0) { + if (newVal.length > 0) { this.$nextTick(() => { this.files = this.formatFileList(newVal) this.handlePreviewFromExternal(newVal) }) - } - if(newVal.length === 0){ + }else{ this.$nextTick(() => { this.files = []; this.handlePreviewFromExternal(newVal) diff --git a/src/views/enterpriseLibrary/personnel/components/PersonnelForm.vue b/src/views/enterpriseLibrary/personnel/components/PersonnelForm.vue index 6ac1f66..296757c 100644 --- a/src/views/enterpriseLibrary/personnel/components/PersonnelForm.vue +++ b/src/views/enterpriseLibrary/personnel/components/PersonnelForm.vue @@ -344,7 +344,8 @@ export default { this.isProjectChiefEngineer ? Promise.resolve(EMPTY_OBJECT) : this.qualificationInfoRef?.validate?.() || Promise.resolve(EMPTY_OBJECT), this.$refs.otherInfoPersonnel.validate() ]) - + console.log(basicInfoData, qualificationData, otherData); + // 组装完整数据 const formData = this.assembleFormData(basicInfoData, qualificationData, otherData) diff --git a/src/views/enterpriseLibrary/personnel/components/child/QualificationInfo.vue b/src/views/enterpriseLibrary/personnel/components/child/QualificationInfo.vue index 9bd164f..26402f1 100644 --- a/src/views/enterpriseLibrary/personnel/components/child/QualificationInfo.vue +++ b/src/views/enterpriseLibrary/personnel/components/child/QualificationInfo.vue @@ -359,6 +359,8 @@ export default { this.$set(this.personnelCertificateId, 0, this.getFormData(item.fileUploadType, 'personnelCertificateId')); } else if (Object.keys(item).length > 0 && item.fileUploadType !== fileUploadType) { // 安全考核B证、安全考核C证、其他人员证书 this.form.fileList2 = this.getFileList(item.fileUploadType); + console.log(this.form.fileList2); + this.form.registerProfessional = this.getFormData(item.fileUploadType, 'registerProfessional'); this.form.certificateCode2 = this.getFormData(item.fileUploadType, 'certificateCode'); this.form.certificateValidityPeriod2 = this.getFormData(item.fileUploadType, 'certificateValidityPeriod').split(' - '); @@ -366,7 +368,7 @@ export default { } }) console.log(this.form); - + }, getFileList(businessType) { @@ -453,12 +455,12 @@ export default { }, detailData: { handler(newVal) { - console.log(newVal); - if (Object.keys(newVal).length > 0) { const { enterprisePersonnel: { personnelPosition } = {} } = newVal; if (personnelPosition !== 'project_chief_engineer') { - this.setFormData(); + this.$nextTick(() => { + this.setFormData(); + }) } } }, From 3faf9717753029cffb248abce6d4e2db681c0874 Mon Sep 17 00:00:00 2001 From: cwchen <1048842385@qq.com> Date: Mon, 17 Nov 2025 18:04:53 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=96=87=E4=BB=B6=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/common/FileOrImageDisplay.vue | 51 +++++++++++++++++++++---- 1 file changed, 44 insertions(+), 7 deletions(-) diff --git a/src/views/common/FileOrImageDisplay.vue b/src/views/common/FileOrImageDisplay.vue index 032fa98..40677bf 100644 --- a/src/views/common/FileOrImageDisplay.vue +++ b/src/views/common/FileOrImageDisplay.vue @@ -11,8 +11,15 @@