From d051d95fa40cc142a747e8923e56ea77aaff76e8 Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Wed, 7 May 2025 10:59:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/UploadImg/index.vue | 14 ++++++ .../key-person/components/addAndEditForm.vue | 16 +++++-- .../components/addAndEditForm.vue | 24 ++++++---- .../components/addAndEditForm.vue | 14 ++++-- .../components/addAndEditForm.vue | 19 +++++--- .../gw-template/components/addAndEditForm.vue | 46 +++++++++++++------ .../nw-template/components/addAndEditForm.vue | 19 +++++--- .../sub-manage/components/addAndEditForm.vue | 4 +- .../components/addAndEditForm.vue | 6 ++- .../components/addAndEditForm.vue | 20 +++++--- src/views/system/user/index.vue | 4 +- 11 files changed, 129 insertions(+), 57 deletions(-) diff --git a/src/components/UploadImg/index.vue b/src/components/UploadImg/index.vue index e1f5763..73a4a71 100644 --- a/src/components/UploadImg/index.vue +++ b/src/components/UploadImg/index.vue @@ -15,6 +15,7 @@ :show-file-list="true" :on-exceed="handleExceed" name="files" + :class="isDetail || isUploaded ? 'upload-img' : ''" >
@@ -72,6 +73,16 @@ export default { type: Boolean, default: false, }, + // 是否为查看详情 + isDetail: { + type: Boolean, + default: false, + }, + // 是否上传的数量已经满足 + isUploaded: { + type: Boolean, + default: false, + }, }, data() { return { @@ -181,4 +192,7 @@ export default { align-items: center; } } +::v-deep .upload-img .el-upload--picture-card { + display: none; +} diff --git a/src/views/company-manage/key-person/components/addAndEditForm.vue b/src/views/company-manage/key-person/components/addAndEditForm.vue index 2c641bb..eff4c3a 100644 --- a/src/views/company-manage/key-person/components/addAndEditForm.vue +++ b/src/views/company-manage/key-person/components/addAndEditForm.vue @@ -40,9 +40,11 @@ :limit="1" :file-size="10" @deleteFile="deleteFile" + :is-detail="formType === 2" :upload-file-url="uploadFileUrl" :file-type="['jpg', 'png', 'jpeg']" :file-list.sync="addAndEditForm.idCardFront" + :is-uploaded="addAndEditForm.idCardFront.length >= 1" > @@ -52,9 +54,11 @@ :limit="1" :file-size="10" @deleteFile="deleteFile" + :is-detail="formType === 2" :upload-file-url="uploadFileUrl" :file-type="['jpg', 'png', 'jpeg']" :file-list.sync="addAndEditForm.idCardBack" + :is-uploaded="addAndEditForm.idCardBack.length >= 1" > @@ -186,9 +190,11 @@ :file-size="10" :multiple="true" @deleteFile="deleteFile" + :is-detail="formType === 2" :upload-file-url="uploadFileUrl" :file-type="['jpg', 'png', 'jpeg']" :file-list.sync="addAndEditForm.diplomaImg" + :is-uploaded="addAndEditForm.diplomaImg.length >= 5" /> @@ -206,9 +212,11 @@ :file-size="10" :multiple="true" @deleteFile="deleteFile" + :is-detail="formType === 2" :upload-file-url="uploadFileUrl" :file-type="['jpg', 'png', 'jpeg']" :file-list.sync="addAndEditForm.otherImg" + :is-uploaded="addAndEditForm.otherImg.length >= 5" /> @@ -552,7 +560,7 @@ export default { .map((e) => { return { ...e, - url: this.fileViewUrl + e.filePath.split('oadPath')[1] + '?file_token=' + getToken(), + url: this.fileViewUrl + e.filePath + '?file_token=' + getToken(), } }) this.addAndEditForm.idCardBack = this.addAndEditForm.tbFileSourceVoList @@ -560,7 +568,7 @@ export default { .map((e) => { return { ...e, - url: this.fileViewUrl + e.filePath.split('oadPath')[1] + '?file_token=' + getToken(), + url: this.fileViewUrl + e.filePath + '?file_token=' + getToken(), } }) this.addAndEditForm.diplomaImg = this.addAndEditForm.tbFileSourceVoList @@ -568,7 +576,7 @@ export default { .map((e) => { return { ...e, - url: this.fileViewUrl + e.filePath.split('oadPath')[1] + '?file_token=' + getToken(), + url: this.fileViewUrl + e.filePath + '?file_token=' + getToken(), } }) this.addAndEditForm.otherImg = this.addAndEditForm.tbFileSourceVoList @@ -576,7 +584,7 @@ export default { .map((e) => { return { ...e, - url: this.fileViewUrl + e.filePath.split('oadPath')[1] + '?file_token=' + getToken(), + url: this.fileViewUrl + e.filePath + '?file_token=' + getToken(), } }) } diff --git a/src/views/company-manage/other-person/components/addAndEditForm.vue b/src/views/company-manage/other-person/components/addAndEditForm.vue index 1621598..e6fd17b 100644 --- a/src/views/company-manage/other-person/components/addAndEditForm.vue +++ b/src/views/company-manage/other-person/components/addAndEditForm.vue @@ -35,9 +35,11 @@ :limit="1" :file-size="10" @deleteFile="deleteFile" - :file-type="['jpg', 'png', 'jpeg']" + :is-detail="formType === 2" :upload-file-url="uploadFileUrl" + :file-type="['jpg', 'png', 'jpeg']" :file-list.sync="addAndEditForm.idCardFront" + :is-uploaded="addAndEditForm.idCardFront.length >= 1" > @@ -47,9 +49,11 @@ :limit="1" :file-size="10" @deleteFile="deleteFile" - :file-type="['jpg', 'png', 'jpeg']" + :is-detail="formType === 2" :upload-file-url="uploadFileUrl" + :file-type="['jpg', 'png', 'jpeg']" :file-list.sync="addAndEditForm.idCardBack" + :is-uploaded="addAndEditForm.idCardBack.length >= 1" > @@ -167,9 +171,11 @@ :file-size="10" :multiple="true" @deleteFile="deleteFile" - :file-type="['jpg', 'png', 'jpeg']" + :is-detail="formType === 2" :upload-file-url="uploadFileUrl" + :file-type="['jpg', 'png', 'jpeg']" :file-list.sync="addAndEditForm.diplomaImg" + :is-uploaded="addAndEditForm.diplomaImg.length >= 5" /> @@ -187,9 +193,11 @@ :file-size="10" :multiple="true" @deleteFile="deleteFile" - :file-type="['jpg', 'png', 'jpeg']" + :is-detail="formType === 2" :upload-file-url="uploadFileUrl" + :file-type="['jpg', 'png', 'jpeg']" :file-list.sync="addAndEditForm.otherImg" + :is-uploaded="addAndEditForm.otherImg.length >= 5" /> @@ -514,7 +522,7 @@ export default { .map((e) => { return { ...e, - url: this.fileViewUrl + e.filePath.split('oadPath')[1] + '?file_token=' + getToken(), + url: this.fileViewUrl + e.filePath + '?file_token=' + getToken(), } }) this.addAndEditForm.idCardBack = this.addAndEditForm.tbFileSourceVoList @@ -522,7 +530,7 @@ export default { .map((e) => { return { ...e, - url: this.fileViewUrl + e.filePath.split('oadPath')[1] + '?file_token=' + getToken(), + url: this.fileViewUrl + e.filePath + '?file_token=' + getToken(), } }) this.addAndEditForm.diplomaImg = this.addAndEditForm.tbFileSourceVoList @@ -530,7 +538,7 @@ export default { .map((e) => { return { ...e, - url: this.fileViewUrl + e.filePath.split('oadPath')[1] + '?file_token=' + getToken(), + url: this.fileViewUrl + e.filePath + '?file_token=' + getToken(), } }) this.addAndEditForm.otherImg = this.addAndEditForm.tbFileSourceVoList @@ -538,7 +546,7 @@ export default { .map((e) => { return { ...e, - url: this.fileViewUrl + e.filePath.split('oadPath')[1] + '?file_token=' + getToken(), + url: this.fileViewUrl + e.filePath + '?file_token=' + getToken(), } }) } diff --git a/src/views/company-manage/performance-manage/components/addAndEditForm.vue b/src/views/company-manage/performance-manage/components/addAndEditForm.vue index 072fd2a..5f1b5ba 100644 --- a/src/views/company-manage/performance-manage/components/addAndEditForm.vue +++ b/src/views/company-manage/performance-manage/components/addAndEditForm.vue @@ -236,9 +236,11 @@ :file-size="10" :multiple="true" @deleteFile="deleteFile" + :is-detail="formType === 2" :upload-file-url="uploadFileUrl" :file-type="['jpg', 'png', 'jpeg']" :file-list.sync="addAndEditForm.htKeyFileList" + :is-uploaded="addAndEditForm.htKeyFileList.length >= 8" /> @@ -266,9 +268,11 @@ :file-size="10" :multiple="true" @deleteFile="deleteFile" + :is-detail="formType === 2" :file-list.sync="proveFileList" :upload-file-url="uploadFileUrl" :file-type="['jpg', 'png', 'jpeg']" + :is-uploaded="proveFileList.length >= 4" /> @@ -533,7 +537,7 @@ export default { filePath, fileName, fileType: 1, - url: this.fileViewUrl + filePath.split('oadPath')[1] + '?file_token=' + getToken(), + url: this.fileViewUrl + filePath + '?file_token=' + getToken(), }) } else { this.addTableList[this.keyTbCurrentIndex].tbFileSourceVoList.push({ @@ -541,7 +545,7 @@ export default { filePath: item.filePath, fileName: item.fileName, fileType: 1, - url: this.fileViewUrl + item.filePath.split('oadPath')[1] + '?file_token=' + getToken(), + url: this.fileViewUrl + item.filePath + '?file_token=' + getToken(), }) } }) @@ -561,7 +565,7 @@ export default { this.proveFileList = this.addTableList[index].tbFileSourceVoList.map((e) => { return { ...e, - url: this.fileViewUrl + e.filePath.split('oadPath')[1] + '?file_token=' + getToken(), + url: this.fileViewUrl + e.filePath + '?file_token=' + getToken(), } }) this.uploadOuterVisible = true @@ -581,7 +585,7 @@ export default { e.tbFileSourceVoList = e.tbFileSourceVoList.map((item) => { return { ...item, - url: this.fileViewUrl + item.filePath.split('oadPath')[1] + '?file_token=' + getToken(), + url: this.fileViewUrl + item.filePath + '?file_token=' + getToken(), } }) }) @@ -589,7 +593,7 @@ export default { this.addAndEditForm.htKeyFileList = newVal.tbFileSourceVoList.map((e) => { return { ...e, - url: this.fileViewUrl + e.filePath.split('oadPath')[1] + '?file_token=' + getToken(), + url: this.fileViewUrl + e.filePath + '?file_token=' + getToken(), } }) } diff --git a/src/views/data-create/epc-template/components/addAndEditForm.vue b/src/views/data-create/epc-template/components/addAndEditForm.vue index da5d9e0..71cb21d 100644 --- a/src/views/data-create/epc-template/components/addAndEditForm.vue +++ b/src/views/data-create/epc-template/components/addAndEditForm.vue @@ -760,6 +760,15 @@ export default { if (this.dialogConfig.outerTitle === '关键人员选择') { if (this.companyPerformanceQueryParams.personId) { + const rowInfo = this.keyPersonList.find( + (item) => item.id == this.companyPerformanceQueryParams.personId, + ) + const index = this.keyTableCurrentIndex + this.companyKeyPersonList[index].userId = rowInfo.id + this.companyKeyPersonList[index].title = rowInfo.title + this.companyKeyPersonList[index].userName = rowInfo.userName + this.companyKeyPersonList[index].diploma = rowInfo.diploma + this.companyKeyPersonList[index].idCard = rowInfo.idCard const keyPersonPerformanceInnerSelectList = this.waitSelectData.filter((item) => this.selectData.includes(item.perfId), ) @@ -901,15 +910,11 @@ export default { ) { this.$modal.msgError('当前人员已选择,不可重复添加') this.companyPerformanceQueryParams.personId = '' + this.waitSelectData = [] + this.selectData = [] return false } else { - const rowInfo = this.keyPersonList.find((item) => item.id == value) - const index = this.keyTableCurrentIndex - this.companyKeyPersonList[index].userId = rowInfo.id - this.companyKeyPersonList[index].title = rowInfo.title - this.companyKeyPersonList[index].userName = rowInfo.userName - this.companyKeyPersonList[index].diploma = rowInfo.diploma - this.companyKeyPersonList[index].idCard = rowInfo.idCard + this.getCompanyPerformanceListByPersonIdData() } }, diff --git a/src/views/data-create/gw-template/components/addAndEditForm.vue b/src/views/data-create/gw-template/components/addAndEditForm.vue index 641f614..bce8a1c 100644 --- a/src/views/data-create/gw-template/components/addAndEditForm.vue +++ b/src/views/data-create/gw-template/components/addAndEditForm.vue @@ -1081,6 +1081,15 @@ export default { if (this.dialogConfig.outerTitle === '关键人员选择') { if (this.companyPerformanceQueryParams.personId) { + const rowInfo = this.keyPersonList.find( + (item) => item.id == this.companyPerformanceQueryParams.personId, + ) + const index = this.keyTableCurrentIndex + this.companyKeyPersonList[index].userId = rowInfo.id + this.companyKeyPersonList[index].title = rowInfo.title + this.companyKeyPersonList[index].userName = rowInfo.userName + this.companyKeyPersonList[index].diploma = rowInfo.diploma + this.companyKeyPersonList[index].idCard = rowInfo.idCard const keyPersonPerformanceInnerSelectList = this.waitSelectData.filter((item) => this.selectData.includes(item.perfId), ) @@ -1162,6 +1171,21 @@ export default { // 添加近年同类工程业绩 if (this.dialogConfig.outerTitle === '分包人员选择') { + if (this.personPerformanceForm.personId) { + const rowInfo = this.subcontractorPersonSelectList.find( + (item) => item.id == this.personPerformanceForm.personId, + ) + const index = this.subcontractorPersonCurrentIndex + const personIndex = this.subcontractorPersonSelectIndex + this.subcontractorList[index].subcontractorPersonList[personIndex].userId = rowInfo.id + this.subcontractorList[index].subcontractorPersonList[personIndex].userName = rowInfo.userName + this.subcontractorList[index].subcontractorPersonList[personIndex].title = rowInfo.title + this.subcontractorList[index].subcontractorPersonList[personIndex].diploma = rowInfo.diploma + this.subcontractorList[index].subcontractorPersonList[personIndex].idCard = rowInfo.idCard + } else { + this.$modal.msgError('请选择人员') + return false + } const subcontractorPerformanceInnerList = this.waitSubcontractorPerformanceData.filter((item) => this.selectSubcontractorPerformanceData.includes(item.perfId), ) @@ -1317,15 +1341,12 @@ export default { ) { this.$modal.msgError('当前人员已选择,不可重复添加') this.companyPerformanceQueryParams.personId = '' + this.waitSelectData = [] + this.selectData = [] return false } else { - const rowInfo = this.keyPersonList.find((item) => item.id == value) - const index = this.keyTableCurrentIndex - this.companyKeyPersonList[index].userId = rowInfo.id - this.companyKeyPersonList[index].title = rowInfo.title - this.companyKeyPersonList[index].userName = rowInfo.userName - this.companyKeyPersonList[index].diploma = rowInfo.diploma - this.companyKeyPersonList[index].idCard = rowInfo.idCard + // 查询人员信息 + this.getCompanyPerformanceListByPersonIdData() } }, @@ -1584,16 +1605,11 @@ export default { ) { this.$modal.msgError('当前人员已选择,不可重复添加') this.personPerformanceForm.personId = '' + this.waitSubcontractorPerformanceData = [] + this.selectSubcontractorPerformanceData = [] return false } else { - const rowInfo = this.subcontractorPersonSelectList.find((item) => item.id == value) - const index = this.subcontractorPersonCurrentIndex - const personIndex = this.subcontractorPersonSelectIndex - this.subcontractorList[index].subcontractorPersonList[personIndex].userId = rowInfo.id - this.subcontractorList[index].subcontractorPersonList[personIndex].userName = rowInfo.userName - this.subcontractorList[index].subcontractorPersonList[personIndex].title = rowInfo.title - this.subcontractorList[index].subcontractorPersonList[personIndex].diploma = rowInfo.diploma - this.subcontractorList[index].subcontractorPersonList[personIndex].idCard = rowInfo.idCard + this.getSubcontractorPerformanceDataByPersonId() } }, diff --git a/src/views/data-create/nw-template/components/addAndEditForm.vue b/src/views/data-create/nw-template/components/addAndEditForm.vue index 447bf57..76351b1 100644 --- a/src/views/data-create/nw-template/components/addAndEditForm.vue +++ b/src/views/data-create/nw-template/components/addAndEditForm.vue @@ -760,6 +760,15 @@ export default { if (this.dialogConfig.outerTitle === '关键人员选择') { if (this.companyPerformanceQueryParams.personId) { + const rowInfo = this.keyPersonList.find( + (item) => item.id == this.companyPerformanceQueryParams.personId, + ) + const index = this.keyTableCurrentIndex + this.companyKeyPersonList[index].userId = rowInfo.id + this.companyKeyPersonList[index].title = rowInfo.title + this.companyKeyPersonList[index].userName = rowInfo.userName + this.companyKeyPersonList[index].diploma = rowInfo.diploma + this.companyKeyPersonList[index].idCard = rowInfo.idCard const keyPersonPerformanceInnerSelectList = this.waitSelectData.filter((item) => this.selectData.includes(item.perfId), ) @@ -902,15 +911,11 @@ export default { ) { this.$modal.msgError('当前人员已选择,不可重复添加') this.companyPerformanceQueryParams.personId = '' + this.waitSelectData = [] + this.selectData = [] return false } else { - const rowInfo = this.keyPersonList.find((item) => item.id == value) - const index = this.keyTableCurrentIndex - this.companyKeyPersonList[index].userId = rowInfo.id - this.companyKeyPersonList[index].title = rowInfo.title - this.companyKeyPersonList[index].userName = rowInfo.userName - this.companyKeyPersonList[index].diploma = rowInfo.diploma - this.companyKeyPersonList[index].idCard = rowInfo.idCard + this.getCompanyPerformanceListByPersonIdData() } }, diff --git a/src/views/sub-manage/sub-manage/components/addAndEditForm.vue b/src/views/sub-manage/sub-manage/components/addAndEditForm.vue index 1e112ad..1c47413 100644 --- a/src/views/sub-manage/sub-manage/components/addAndEditForm.vue +++ b/src/views/sub-manage/sub-manage/components/addAndEditForm.vue @@ -72,9 +72,11 @@ :file-size="10" :multiple="true" @deleteFile="deleteFile" + :is-detail="formType === 2" :file-type="['jpg', 'png', 'jpeg']" :upload-file-url="uploadFileUrl" :file-list.sync="addAndEditForm.fileList" + :is-uploaded="addAndEditForm.fileList.length >= 20" /> @@ -238,7 +240,7 @@ export default { .map((e) => { return { ...e, - url: this.fileViewUrl + e.filePath.split('oadPath')[1] + '?file_token=' + getToken(), + url: this.fileViewUrl + e.filePath + '?file_token=' + getToken(), } }) } diff --git a/src/views/sub-manage/sub-performance-manage/components/addAndEditForm.vue b/src/views/sub-manage/sub-performance-manage/components/addAndEditForm.vue index 41d2c7d..c5e65e6 100644 --- a/src/views/sub-manage/sub-performance-manage/components/addAndEditForm.vue +++ b/src/views/sub-manage/sub-performance-manage/components/addAndEditForm.vue @@ -171,10 +171,12 @@ :limit="8" :file-size="10" :multiple="true" - :file-type="['jpg', 'png', 'jpeg']" @deleteFile="deleteFile" + :is-detail="formType === 2" :upload-file-url="uploadFileUrl" + :file-type="['jpg', 'png', 'jpeg']" :file-list.sync="addAndEditForm.imgList" + :is-uploaded="addAndEditForm.imgList.length >= 8" /> @@ -467,7 +469,7 @@ export default { this.addAndEditForm.imgList = newVal.tbFileSourceVoList.map((e) => { return { ...e, - url: this.fileViewUrl + e.filePath.split('oadPath')[1] + '?file_token=' + getToken(), + url: this.fileViewUrl + e.filePath + '?file_token=' + getToken(), } }) } diff --git a/src/views/sub-manage/sub-person-manage/components/addAndEditForm.vue b/src/views/sub-manage/sub-person-manage/components/addAndEditForm.vue index 31dad17..c485826 100644 --- a/src/views/sub-manage/sub-person-manage/components/addAndEditForm.vue +++ b/src/views/sub-manage/sub-person-manage/components/addAndEditForm.vue @@ -51,26 +51,30 @@
@@ -131,9 +135,11 @@ :multiple="true" :file-size="10" @deleteFile="deleteFile" + :is-detail="formType === 2" :upload-file-url="uploadFileUrl" :file-type="['jpg', 'png', 'jpeg']" :file-list.sync="addAndEditForm.diplomaImg" + :is-uploaded="addAndEditForm.diplomaImg.length >= 5" /> @@ -151,9 +157,11 @@ :multiple="true" :file-size="10" @deleteFile="deleteFile" + :is-detail="formType === 2" :upload-file-url="uploadFileUrl" :file-type="['jpg', 'png', 'jpeg']" :file-list.sync="addAndEditForm.otherImg" + :is-uploaded="addAndEditForm.otherImg.length >= 5" /> @@ -466,7 +474,7 @@ export default { .map((e) => { return { ...e, - url: this.fileViewUrl + e.filePath.split('oadPath')[1] + '?file_token=' + getToken(), + url: this.fileViewUrl + e.filePath + '?file_token=' + getToken(), } }) this.addAndEditForm.idCardBack = this.addAndEditForm.tbFileSourceVoList @@ -474,7 +482,7 @@ export default { .map((e) => { return { ...e, - url: this.fileViewUrl + e.filePath.split('oadPath')[1] + '?file_token=' + getToken(), + url: this.fileViewUrl + e.filePath + '?file_token=' + getToken(), } }) this.addAndEditForm.diplomaImg = this.addAndEditForm.tbFileSourceVoList @@ -482,7 +490,7 @@ export default { .map((e) => { return { ...e, - url: this.fileViewUrl + e.filePath.split('oadPath')[1] + '?file_token=' + getToken(), + url: this.fileViewUrl + e.filePath + '?file_token=' + getToken(), } }) this.addAndEditForm.otherImg = this.addAndEditForm.tbFileSourceVoList @@ -490,7 +498,7 @@ export default { .map((e) => { return { ...e, - url: this.fileViewUrl + e.filePath.split('oadPath')[1] + '?file_token=' + getToken(), + url: this.fileViewUrl + e.filePath + '?file_token=' + getToken(), } }) } diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index 09ab986..d26cae3 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -719,8 +719,8 @@ export default { confirmButtonText: '确定', cancelButtonText: '取消', closeOnClickModal: false, - inputPattern: /^.{5,20}$/, - inputErrorMessage: '用户密码长度必须介于 5 和 20 之间', + // inputPattern: /^.{5,20}$/, + // inputErrorMessage: '用户密码长度必须介于 5 和 20 之间', inputValidator: (value) => { // if (/<|>|"|'|\||\\/.test(value)) { // return '不能包含非法字符:< > " \' \\\ |'