From d20331fbf0b9c58c9146d5dbc6cad2b5e756f570 Mon Sep 17 00:00:00 2001 From: cwchen <1048842385@qq.com> Date: Tue, 28 Oct 2025 16:25:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E4=BB=B6=E4=B8=8A=E4=BC=A0=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/common/UploadFile.vue | 685 ++++++++++-------- .../child/AccountOpeningCertificate.vue | 5 +- .../enterprise/components/child/BasicInfo.vue | 5 +- .../components/child/LegalPerson.vue | 5 +- .../personnel/components/PersonnelForm.vue | 3 + .../personnel/components/child/BasicInfo.vue | 5 +- .../personnel/components/child/OtherInfo.vue | 5 +- .../components/child/QualificationInfo.vue | 5 +- .../technical/components/child/FileInfo.vue | 10 +- 9 files changed, 410 insertions(+), 318 deletions(-) diff --git a/src/views/common/UploadFile.vue b/src/views/common/UploadFile.vue index da42e3f..b869c2d 100644 --- a/src/views/common/UploadFile.vue +++ b/src/views/common/UploadFile.vue @@ -1,8 +1,9 @@ @@ -569,9 +638,9 @@ export default { .el-upload-dragger { width: 100%; height: 240px; - border: 2px dashed #DCDFE6; + border: 2px dashed #dcdfe6; border-radius: 8px; - background-color: #FAFAFA; + background-color: #fafafa; display: flex; align-items: center; justify-content: center; @@ -580,8 +649,8 @@ export default { overflow: hidden; &:hover { - border-color: #409EFF; - background-color: #F5F7FA; + border-color: #409eff; + background-color: #f5f7fa; } } } @@ -672,7 +741,7 @@ export default { .file-icon { font-size: 64px; - color: #1F72EA; + color: #1f72ea; margin-bottom: 16px; } @@ -735,7 +804,7 @@ export default { .main-text { font-size: 18px; - color: #1F72EA; + color: #1f72ea; margin-bottom: 12px; font-weight: 500; } @@ -752,4 +821,4 @@ export default { } } } - \ No newline at end of file + diff --git a/src/views/enterpriseLibrary/enterprise/components/child/AccountOpeningCertificate.vue b/src/views/enterpriseLibrary/enterprise/components/child/AccountOpeningCertificate.vue index 78f6e4a..95fec78 100644 --- a/src/views/enterpriseLibrary/enterprise/components/child/AccountOpeningCertificate.vue +++ b/src/views/enterpriseLibrary/enterprise/components/child/AccountOpeningCertificate.vue @@ -119,7 +119,10 @@ export default { // 文件删除时触发 handleDelFile(file) { console.log(file); - this.form.delFileList.push(file.response.fileRes.uploadPath || file.filePath); + const delPath = file?.response?.fileRes?.filePath || file?.filePath || null; + if(delPath){ + this.form.delFileList.push(delPath); + } }, setFormData(){ const fileList = this.getFileList('account_opening_license'); diff --git a/src/views/enterpriseLibrary/enterprise/components/child/BasicInfo.vue b/src/views/enterpriseLibrary/enterprise/components/child/BasicInfo.vue index 730ef35..b79f25c 100644 --- a/src/views/enterpriseLibrary/enterprise/components/child/BasicInfo.vue +++ b/src/views/enterpriseLibrary/enterprise/components/child/BasicInfo.vue @@ -174,7 +174,10 @@ export default { // 文件删除时触发 handleDelFile(file) { console.log(file); - this.form.delFileList.push(file.response.fileRes.uploadPath || file.filePath); + const delPath = file?.response?.fileRes?.filePath || file?.filePath || null; + if(delPath){ + this.form.delFileList.push(delPath); + } }, setFormData(){ const fileList = this.getFileList('business_license'); diff --git a/src/views/enterpriseLibrary/enterprise/components/child/LegalPerson.vue b/src/views/enterpriseLibrary/enterprise/components/child/LegalPerson.vue index 8c7759f..3c67f2a 100644 --- a/src/views/enterpriseLibrary/enterprise/components/child/LegalPerson.vue +++ b/src/views/enterpriseLibrary/enterprise/components/child/LegalPerson.vue @@ -172,7 +172,10 @@ export default { // 文件删除时触发 handleDelFile(file) { console.log(file); - this.form.delFileList.push(file.response.fileRes.uploadPath || file.filePath); + const delPath = file?.response?.fileRes?.filePath || file?.filePath || null; + if(delPath){ + this.form.delFileList.push(delPath); + } }, setFormData(){ const fileList = this.getFileList('face_id_card_portrait') diff --git a/src/views/enterpriseLibrary/personnel/components/PersonnelForm.vue b/src/views/enterpriseLibrary/personnel/components/PersonnelForm.vue index 0de7058..41dc8e4 100644 --- a/src/views/enterpriseLibrary/personnel/components/PersonnelForm.vue +++ b/src/views/enterpriseLibrary/personnel/components/PersonnelForm.vue @@ -295,6 +295,9 @@ export default { // 组装表单数据 assembleFormData(basicInfoData, qualificationData = EMPTY_OBJECT, otherData = EMPTY_OBJECT) { + console.log(qualificationData); + console.log(otherData); + // 安全合并所有文件列表 const allFiles = [ ...this.safeGetArray(basicInfoData.fileList), diff --git a/src/views/enterpriseLibrary/personnel/components/child/BasicInfo.vue b/src/views/enterpriseLibrary/personnel/components/child/BasicInfo.vue index 05f2ffe..0bc245e 100644 --- a/src/views/enterpriseLibrary/personnel/components/child/BasicInfo.vue +++ b/src/views/enterpriseLibrary/personnel/components/child/BasicInfo.vue @@ -261,7 +261,10 @@ export default { // 文件删除时触发 handleDelFile(file) { console.log(file); - this.form.delFileList.push(file.response.fileRes.uploadPath || file.filePath); + const delPath = file?.response?.fileRes?.filePath || file?.filePath || null; + if(delPath){ + this.form.delFileList.push(delPath); + } }, setFormData() { const fileList = this.getFileList('face_id_card_portrait'); diff --git a/src/views/enterpriseLibrary/personnel/components/child/OtherInfo.vue b/src/views/enterpriseLibrary/personnel/components/child/OtherInfo.vue index 36025c6..9643ecc 100644 --- a/src/views/enterpriseLibrary/personnel/components/child/OtherInfo.vue +++ b/src/views/enterpriseLibrary/personnel/components/child/OtherInfo.vue @@ -145,7 +145,10 @@ export default { // 文件删除时触发 handleDelFile(file) { console.log(file); - this.form.delFileList.push(file.response.fileRes.uploadPath || file.filePath); + const delPath = file?.response?.fileRes?.filePath || file?.filePath || null; + if(delPath){ + this.form.delFileList.push(delPath); + } }, setFormData() { diff --git a/src/views/enterpriseLibrary/personnel/components/child/QualificationInfo.vue b/src/views/enterpriseLibrary/personnel/components/child/QualificationInfo.vue index 4741045..fb39aec 100644 --- a/src/views/enterpriseLibrary/personnel/components/child/QualificationInfo.vue +++ b/src/views/enterpriseLibrary/personnel/components/child/QualificationInfo.vue @@ -302,7 +302,10 @@ export default { // 文件删除时触发 handleDelFile(file) { console.log(file); - this.form.delFileList.push(file.response.fileRes.uploadPath || file.filePath); + const delPath = file?.response?.fileRes?.filePath || file?.filePath || null; + if(delPath){ + this.form.delFileList.push(delPath); + } }, setFormData() { const { fileUploadType } = CONSTRUCTOR_CERTIFICATE; diff --git a/src/views/enterpriseLibrary/technical/components/child/FileInfo.vue b/src/views/enterpriseLibrary/technical/components/child/FileInfo.vue index 33ba952..3ef739d 100644 --- a/src/views/enterpriseLibrary/technical/components/child/FileInfo.vue +++ b/src/views/enterpriseLibrary/technical/components/child/FileInfo.vue @@ -19,14 +19,14 @@ // 默认参数 const defaultParams = { fileType: 'technical_solution', - uploadType: 'pdf、doc、docx', + uploadType: 'pdf、doc、docx、jpe、png、jpeg', maxFileTips: '1MB', fileUploadRule: { fileUploadType: 'technical_solution', fields_json: '', suffix: 'technical_solution_database' }, - limitUploadNum: 10 + limitUploadNum: 1 }; import UploadFile from '@/views/common/UploadFile.vue' export default { @@ -83,8 +83,10 @@ export default { }, // 文件删除时触发 handleDelFile(file) { - console.log(file); - this.form.delFileList.push(file.response.fileRes.uploadPath || file.filePath); + const delPath = file?.response?.fileRes?.filePath || file?.filePath || null; + if(delPath){ + this.form.delFileList.push(delPath); + } }, setFormData() { },