diff --git a/src/pages/processCenter/pages/creatProcess/qbfs/step1.vue b/src/pages/processCenter/pages/creatProcess/qbfs/step1.vue index 5cc3bda88..e613e0ea3 100644 --- a/src/pages/processCenter/pages/creatProcess/qbfs/step1.vue +++ b/src/pages/processCenter/pages/creatProcess/qbfs/step1.vue @@ -69,7 +69,7 @@ label="起草单位" width="120"> - + @@ -604,6 +604,12 @@ @checkedRole="checkedRole" :nodeList="nodeList" > + @@ -686,6 +692,7 @@ export default { saveLoading: false, isSubmit: false, modalShowFlag: false, + modalShowRoleFlag: false, standardSearch: { standCode: "", standName: "" @@ -792,26 +799,30 @@ export default { this.type = type if (type === 1) { this.drawerTitle = '选择对接人' - this.nodeList = [] + this.nodeList2 = [] this.zrIndex = index this.zrType = type - this.nodeList.push(row) - this.modalShowFlag = true + if(type === 'bussFsSubUser1'){ + if ( row.bussFsSubUser1.length > 0) { + this.nodeList2 = row.bussFsSubUser1.split(',') + } + } + this.modalShowRoleFlag = true } else if (type === 2) { // 批量 if (this.zrIdList.length > 0) { this.zrType = type - this.nodeList = [] - this.modalShowFlag = true + this.nodeList2 = [] + this.modalShowRoleFlag = true this.drawerTitle = '批量选择对接人' } else { this.$message.warning('请选择要编辑的数据') } } else { - this.nodeList = [] - this.nodeList.push(row) + this.nodeList2 = [] + this.nodeList2.push(row) this.drawerTitle = '' - this.modalShowFlag = true + this.modalShowRoleFlag = true } }, selectReplaceStandNumRowChange(val) { @@ -1199,6 +1210,44 @@ export default { this.drawerTitle = title; this.modalShowFlag = true; }, + checkedRole2 (data) { + let idList = '' + let nameList = '' + data.forEach( item => { + if (nameList.length > 0) { + nameList += ',' + idList += ',' + } + idList += item.id + nameList += item.name + }) + + if (this.type === 0) { + this.roleForm.deptUserId = data[0].id + this.roleForm.deptUserIdName = data[0].name + } else if (this.type === 1) { + this.qbfsForm.modelData[this.zrIndex].bussFsSubUser1 = idList + this.qbfsForm.modelData[this.zrIndex].bussFsSubUser1Name = nameList + } else { + this.qbfsForm.modelData.forEach(item => { + this.zrIdList.forEach(items => { + if (item.id === items) { + item.bussFsSubUser1 = idList + item.bussFsSubUser1Name = nameList + } + }) + }) + } + + // if(data !== undefined && data && data.length > 0){ + // const institutionIdList = this.unique(data.map(item => item.institutionId)).join(",") + // const institutionNameList = this.unique(data.map(item => item.institutionName)).join(",") + // this.form.QCDWID = institutionIdList + // this.form.QCDW = institutionNameList + // } + + this.modalShowRoleFlag = false + }, checkedRole (data) { if (this.type === 0) { this.roleForm.deptUserId = data[0].id