From 9773651ccddb122721152b144da3facd2405a74a Mon Sep 17 00:00:00 2001 From: zyn Date: Thu, 18 Jan 2024 16:43:44 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E4=BC=81=E6=A0=87=E3=80=81=E8=AE=A1?= =?UTF-8?q?=E5=88=92=E7=AB=8B=E9=A1=B9=E3=80=81=E8=AE=A1=E5=88=92=E7=AE=A1?= =?UTF-8?q?=E6=8E=A7):=20=E8=B5=B7=E8=8D=89=E4=BA=BA=E5=B8=A6=E5=85=A5?= =?UTF-8?q?=E9=83=A8=E9=97=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../qbzxdjhgk/component/establish.vue | 22 +++++++++++++++++-- .../qbzxdjhgk/component/merge.vue | 22 +++++++++++++++++-- .../pages/creatProcess/qbzxdlx/step1.vue | 2 ++ .../pages/creatProcess/qbzxdlx/step2.vue | 15 +++++++++++-- .../components/EnterpriseStandardDatabase.vue | 8 +++++++ 5 files changed, 63 insertions(+), 6 deletions(-) diff --git a/src/pages/processCenter/pages/creatProcess/qbzxdjhgk/component/establish.vue b/src/pages/processCenter/pages/creatProcess/qbzxdjhgk/component/establish.vue index b78767b81..9915cbe73 100644 --- a/src/pages/processCenter/pages/creatProcess/qbzxdjhgk/component/establish.vue +++ b/src/pages/processCenter/pages/creatProcess/qbzxdjhgk/component/establish.vue @@ -1123,7 +1123,12 @@ export default { } this.modalshowflag2 = true; }, + unique (newArr) { + const res = new Map(); + return newArr.filter((newArr) => !res.has(newArr) && res.set(newArr, 1)); + }, checkedRole2 (data) { + /* const unList = [] const uidList = [] let idList = '', nameList = '' @@ -1170,11 +1175,24 @@ export default { unIdList.push(item) } }) + */ + let idList = ''; + let nameList = ''; + data.forEach(item => { + if (nameList.length > 0) { + nameList += ','; + idList += ','; + } + idList += item.id; + nameList += item.name; + }); + const institutionIdList = this.unique(data.map(item => item.institutionId)).join(',') + const institutionNameList = this.unique(data.map(item => item.institutionCascade)).join(',') if(this.roleType === '1') { this.$set(this.qbfsForm, 'drafter', idList) this.$set(this.qbfsForm, 'drafterName', nameList) - this.$set(this.qbfsForm, 'unit', unIdList.join(',')) - this.$set(this.qbfsForm, 'unitName', unNameList.join(',')) + this.$set(this.qbfsForm, 'unit', institutionIdList) + this.$set(this.qbfsForm, 'unitName', institutionNameList) }else if(this.roleType === '2') { this.$set(this.qbfsForm, 'resPerson', idList) this.$set(this.qbfsForm, 'resPersonName', nameList) diff --git a/src/pages/processCenter/pages/creatProcess/qbzxdjhgk/component/merge.vue b/src/pages/processCenter/pages/creatProcess/qbzxdjhgk/component/merge.vue index 02f4f6ce6..8f4a75cb6 100644 --- a/src/pages/processCenter/pages/creatProcess/qbzxdjhgk/component/merge.vue +++ b/src/pages/processCenter/pages/creatProcess/qbzxdjhgk/component/merge.vue @@ -1170,7 +1170,12 @@ export default { } this.modalshowflag2 = true; }, + unique (newArr) { + const res = new Map(); + return newArr.filter((newArr) => !res.has(newArr) && res.set(newArr, 1)); + }, checkedRole2 (data) { + /* const unList = [] const uidList = [] let idList = '', nameList = '' @@ -1217,11 +1222,24 @@ export default { unIdList.push(item) } }) + */ + let idList = ''; + let nameList = ''; + data.forEach(item => { + if (nameList.length > 0) { + nameList += ','; + idList += ','; + } + idList += item.id; + nameList += item.name; + }); + const institutionIdList = this.unique(data.map(item => item.institutionId)).join(',') + const institutionNameList = this.unique(data.map(item => item.institutionCascade)).join(',') if(this.type === '1') { this.$set(this.qbfsForm, 'drafter', idList) this.$set(this.qbfsForm, 'drafterName', nameList) - this.$set(this.qbfsForm, 'unit', unIdList.join(',')) - this.$set(this.qbfsForm, 'unitName', unNameList.join(',')) + this.$set(this.qbfsForm, 'unit', institutionIdList) + this.$set(this.qbfsForm, 'unitName', institutionNameList) }else if(this.type === '2') { this.$set(this.qbfsForm, 'resPerson', idList) this.$set(this.qbfsForm, 'resPersonName', nameList) diff --git a/src/pages/processCenter/pages/creatProcess/qbzxdlx/step1.vue b/src/pages/processCenter/pages/creatProcess/qbzxdlx/step1.vue index b488580c5..bddc355ac 100644 --- a/src/pages/processCenter/pages/creatProcess/qbzxdlx/step1.vue +++ b/src/pages/processCenter/pages/creatProcess/qbzxdlx/step1.vue @@ -963,6 +963,8 @@ export default { if(this.roleType === '1') { this.$set(this.addQblxData, 'drafter', data[0].id) this.$set(this.addQblxData, 'drafterName', data[0].name) + this.$set(this.addQblxData, 'unit', data[0].institutionId) + this.$set(this.addQblxData, 'unitName', data[0].institutionCascade) }else { this.$set(this.addQblxData, 'wgLeader', data[0].id) this.$set(this.addQblxData, 'wgLeaderName', data[0].name) diff --git a/src/pages/processCenter/pages/creatProcess/qbzxdlx/step2.vue b/src/pages/processCenter/pages/creatProcess/qbzxdlx/step2.vue index 07a91949a..045698fc5 100644 --- a/src/pages/processCenter/pages/creatProcess/qbzxdlx/step2.vue +++ b/src/pages/processCenter/pages/creatProcess/qbzxdlx/step2.vue @@ -381,7 +381,7 @@ v-model="roleForm.countersignerName" readonly placeholder="选择会签人员" - @click.native="choicePeoples('1')" + @click.native="choicePeoples('3')" /> @@ -1538,6 +1538,10 @@ export default { } this.modalshowflag2 = true; }, + unique (newArr) { + const res = new Map(); + return newArr.filter((newArr) => !res.has(newArr) && res.set(newArr, 1)); + }, checkedRolePeoples (data) { let idList = ''; let nameList = ''; @@ -1550,7 +1554,14 @@ export default { nameList += item.name; }); console.log(nameList) - if(this.roleType == '1') { + if (this.roleType === '1') { + this.qbfsForm.drafter = idList; + this.qbfsForm.drafterName = nameList; + const institutionIdList = this.unique(data.map(item => item.institutionId)).join(',') + const institutionNameList = this.unique(data.map(item => item.institutionCascade)).join(',') + this.$set(this.qbfsForm, 'unit', institutionIdList) + this.$set(this.qbfsForm, 'unitName', institutionNameList) + }else if(this.roleType == '3') { this.roleForm.countersigner = idList; this.roleForm.countersignerName = nameList; }else{ diff --git a/src/pages/regulatoryRepository/enterpriseStandardDatabase/components/EnterpriseStandardDatabase.vue b/src/pages/regulatoryRepository/enterpriseStandardDatabase/components/EnterpriseStandardDatabase.vue index e8e770900..c0218276c 100644 --- a/src/pages/regulatoryRepository/enterpriseStandardDatabase/components/EnterpriseStandardDatabase.vue +++ b/src/pages/regulatoryRepository/enterpriseStandardDatabase/components/EnterpriseStandardDatabase.vue @@ -4390,6 +4390,10 @@ export default { this.drawerTitle = title this.modalShowRoleFlag1 = true }, + unique (newArr) { + const res = new Map(); + return newArr.filter((newArr) => !res.has(newArr) && res.set(newArr, 1)); + }, checkedRole2 (data) { let idList = '' let nameList = '' @@ -4411,7 +4415,11 @@ export default { this.sarBussionessSearch['QCRBUSS'] = nameList } if (this.drawerTitle === '选择起草人') { + const institutionIdList = this.unique(data.map(item => item.institutionId)).join(',') + const institutionNameList = this.unique(data.map(item => item.institutionCascade)).join(',') this.$set(this.sarBussionessStandEO, 'QCRBUSS', nameList) + this.$set(this.sarBussionessStandEO, 'QCDWId', institutionIdList) + this.$set(this.sarBussionessStandEO, 'QCDW', institutionNameList) if (this.sarBussionessStandEO.QCRBUSS) { this.$refs.sarBussionessStandForm.validateField('QCRBUSS') }