diff --git a/src/pages/processCenter/pages/creatProcess/qbrk/step1.vue b/src/pages/processCenter/pages/creatProcess/qbrk/step1.vue index 968862d66..fd32e7a3b 100644 --- a/src/pages/processCenter/pages/creatProcess/qbrk/step1.vue +++ b/src/pages/processCenter/pages/creatProcess/qbrk/step1.vue @@ -1963,6 +1963,14 @@ } return data }, + filterStringDate(data){ + if(data === undefined || data === null || data === '' || data === 'null'){ + return "" + }else { + data = data.toString() + } + return data + }, handleProcessStandardNext(status) { switch (status) { // 新增 @@ -1994,11 +2002,11 @@ // 引用标准 this.form.YYBZ = this.filterDate(this.standardCheckedList[0].esMatingRelations) // 起草人带入 - this.form.QCRBUSS = this.filterDate(this.standardCheckedList[0].drafterName) - this.form.QCRBUSSID = this.filterDate(this.standardCheckedList[0].drafter) + this.form.QCRBUSS = this.filterStringDate(this.standardCheckedList[0].drafterName) + this.form.QCRBUSSID = this.filterStringDate(this.standardCheckedList[0].drafter) // 起草部门带入 - this.form.QCDW = this.filterDate(this.standardCheckedList[0].unitName) - this.form.QCDWID = this.filterDate(this.standardCheckedList[0].unit) + this.form.QCDW = this.filterStringDate(this.standardCheckedList[0].unitName) + this.form.QCDWID = this.filterStringDate(this.standardCheckedList[0].unit) this.form.TXLBBUSS = this.filterDate(this.standardCheckedList[0].tsJsonName) this.form.menuId = this.filterDate(this.standardCheckedList[0].tsJson) this.form.treeType = 'sarMs' diff --git a/src/pages/regulatoryRepository/enterpriseStandardPlan/index.vue b/src/pages/regulatoryRepository/enterpriseStandardPlan/index.vue index a48a0c3ba..6440abd35 100644 --- a/src/pages/regulatoryRepository/enterpriseStandardPlan/index.vue +++ b/src/pages/regulatoryRepository/enterpriseStandardPlan/index.vue @@ -1100,32 +1100,36 @@ this.modalshowflag2 = true }, checkedRole2 (data) { + let idList = '' let nameList = '' - let bmIdList = '' - let bmNameList = '' data.forEach( item => { if (nameList.length > 0) { nameList += ',' idList += ',' - bmIdList += ',' - bmNameList += ',' } idList += item.id nameList += item.name - bmIdList += item.topUnitId - bmNameList += item.topUnit }) + if (this.type === 'resPerson') { this.addForm.resPerson = idList this.addForm.resPersonName = nameList } else if (this.type === 'drafter') { this.addForm.drafter = idList this.addForm.drafterName = nameList - this.addForm.unitName = bmNameList - this.addForm.unit = bmIdList + if(data && data.length > 0){ + const institutionIdList = this.unique(data.map(item => item.topUnitId)).join(",") + const institutionNameList = this.unique(data.map(item => item.topUnit)).join(",") + this.addForm.unitName = institutionNameList + this.addForm.unit = institutionIdList + } } }, + unique(newArr) { + const res = new Map(); + return newArr.filter((newArr) => !res.has(newArr) && res.set(newArr, 1)); + }, addDrawerSubmit () { this.$refs['addForm'].validate((valid) => { if (valid) {