From a2c4aa930951db59308699d170ebcaeddf0fab47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E4=BC=9F=E4=BD=B3?= <2797716443@qq.com> Date: Tue, 30 Nov 2021 10:33:26 +0800 Subject: [PATCH 1/5] commit --- .../pages/creatProcess/xmpg2/step5.vue | 147 +++++++++--------- 1 file changed, 77 insertions(+), 70 deletions(-) diff --git a/src/pages/processCenter/pages/creatProcess/xmpg2/step5.vue b/src/pages/processCenter/pages/creatProcess/xmpg2/step5.vue index 90edd8a9d..ff2a30683 100644 --- a/src/pages/processCenter/pages/creatProcess/xmpg2/step5.vue +++ b/src/pages/processCenter/pages/creatProcess/xmpg2/step5.vue @@ -421,7 +421,6 @@ export default { }, //批量分发按钮 choiceZRRS(row, type, index) { - console.log(row); this.selectedId = row.id || row.standId; this.type = type; if (type === 1) { @@ -429,13 +428,20 @@ export default { this.nodeList = []; this.zrIndex = index; this.zrType = type; - this.nodeList.push(row); + if (row.workPeopleId) { + this.nodeList = row.workPeopleId.split(","); + }else{ + this.nodeList.push(row); + } this.modalshowflag = true; } else if (type === 2) { // 批量 if (this.selectList.length > 0) { this.zrType = type; this.nodeList = []; + if (row.workPeopleId) { + this.nodeList = row.workPeopleId.split(","); + } this.modalshowflag = true; this.drawerTitle = "批量选择责任人"; } else { @@ -461,6 +467,75 @@ export default { } }, + checkedRole(data) { + console.log(data); + var idList = ""; + var nameList = ""; + data.forEach(item => { + if (nameList.length > 0) { + nameList += ","; + idList += ","; + } + idList += item.id; + nameList += item.name; + }); + //单选操作 + if (this.type === 1) { + this.dataList.forEach(item => { + if(item.standId === this.selectedId){ + item.workPeople = nameList || '请选择责任人' + item.workPeopleId = idList; + } + if (item.children) { + item.children.forEach(items => { + if (items.id === this.selectedId) { + items.workPeople = nameList; + items.workPeopleId = idList; + // this.$set(items,'workPeople',data[0].name) + //this.$set(items,'workPeopleId',data[0].id) + } + }); + } + }); + this.dataList = JSON.parse(JSON.stringify(this.dataList)); + } else if (this.type === 2) { + this.selectList.forEach(item => { + this.dataList.map(items => { + if (item.standId === items.standId) { + items.workPeople = nameList || '请选择责任人' + items.workPeopleId = idList; + // this.$message.warning('您只能针对条款进行分发') + } + if (items.children) { + items.children.map(childrenItem => { + if (childrenItem.id === item.id) { + childrenItem.workPeople = nameList; + childrenItem.workPeopleId = idList; + } + }); + } + }); + }); + this.dataList = JSON.parse(JSON.stringify(this.dataList)); + } else if (this.type === 3) { + // console.log("529",this.workPeopleList) + for (let i = 0; i < this.workPeopleList.children.length; i++) { + + this.workPeopleList.children[i].workPeople = data[0].name; + this.workPeopleList.children[i].workPeopleId = data[0].id; + // console.log(row.children[i].id) + // console.log(row.children[i].workPeople) + } + + // items.children.map(childrenItem => { + // + // childrenItem.workPeople = data[0].name; + // childrenItem.workPeopleId = data[0].id; + // }) + + } + this.modalshowflag = false; + }, setChildren(children, type) { // 编辑多个子层级 children.map(j => { @@ -541,74 +616,6 @@ export default { this.roleRow = this.$refs.tree.getCheckedNodes()[0]; } }, - checkedRole(data) { - var idList = ""; - var nameList = ""; - data.forEach(item => { - if (nameList.length > 0) { - nameList += ","; - idList += ","; - } - idList += item.id; - nameList += item.name; - }); - //单选操作 - if (this.type === 1) { - this.dataList.forEach(item => { - if(item.standId === this.selectedId){ - item.workPeople = nameList; - item.workPeopleId = idList; - } - if (item.children) { - item.children.forEach(items => { - if (items.id === this.selectedId) { - items.workPeople = nameList; - items.workPeopleId = idList; - // this.$set(items,'workPeople',data[0].name) - //this.$set(items,'workPeopleId',data[0].id) - } - }); - } - }); - this.dataList = JSON.parse(JSON.stringify(this.dataList)); - } else if (this.type === 2) { - this.selectList.forEach(item => { - this.dataList.map(items => { - if (item.standId === items.standId) { - items.workPeople = nameList; - items.workPeopleId = idList; - // this.$message.warning('您只能针对条款进行分发') - } - if (items.children) { - items.children.map(childrenItem => { - if (childrenItem.id === item.id) { - childrenItem.workPeople = nameList; - childrenItem.workPeopleId = idList; - } - }); - } - }); - }); - this.dataList = JSON.parse(JSON.stringify(this.dataList)); - } else if (this.type === 3) { - // console.log("529",this.workPeopleList) - for (let i = 0; i < this.workPeopleList.children.length; i++) { - - this.workPeopleList.children[i].workPeople = data[0].name; - this.workPeopleList.children[i].workPeopleId = data[0].id; - // console.log(row.children[i].id) - // console.log(row.children[i].workPeople) - } - - // items.children.map(childrenItem => { - // - // childrenItem.workPeople = data[0].name; - // childrenItem.workPeopleId = data[0].id; - // }) - - } - this.modalshowflag = false; - }, cancleUserInfo() { this.modalshowflag = false; } From 652ad0bc3d0404a4013f117ea151d0f2d1edbb09 Mon Sep 17 00:00:00 2001 From: shenyanpei Date: Tue, 30 Nov 2021 10:39:47 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E6=9C=AA=E7=AC=A6=E5=90=88=E9=A1=B9?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=BC=96=E8=BE=91=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/unqualProcess.js | 6 +- .../pages/rectificationDatabase.vue | 283 ++++++++---------- 2 files changed, 137 insertions(+), 152 deletions(-) diff --git a/src/api/unqualProcess.js b/src/api/unqualProcess.js index 61866c15e..c51fad700 100644 --- a/src/api/unqualProcess.js +++ b/src/api/unqualProcess.js @@ -63,12 +63,13 @@ export function meetingByMonth(params) { //未符合项模块新增 export function addUn( - closeState, standSerialNumber, standName, + closeState,standId, standSerialNumber, standName, itemsNum, itemsName, productType, productLine, productName, reason, responsibleUnit, dutyEngineer, authEngineer, qaEngineer, planCloseTime) { const data = { closeState, + standId, standSerialNumber, //标准号 standName, //标准名称 itemsNum, //条款号 @@ -92,12 +93,13 @@ export function addUn( //未符合项模块编辑 export function editUn( - closeState, standSerialNumber, standName, + closeState, standId, standSerialNumber, standName, itemsNum, itemsName, productType, productLine, productName, reason, responsibleUnit, dutyEngineer, authEngineer, qaEngineer, planCloseTime, id) { const data = { closeState, + standId, standSerialNumber, //标准号 standName, //标准名称 itemsNum, //条款号 diff --git a/src/pages/regulatoryRepository/nonConfomity/pages/rectificationDatabase.vue b/src/pages/regulatoryRepository/nonConfomity/pages/rectificationDatabase.vue index a2096a542..5e800966d 100644 --- a/src/pages/regulatoryRepository/nonConfomity/pages/rectificationDatabase.vue +++ b/src/pages/regulatoryRepository/nonConfomity/pages/rectificationDatabase.vue @@ -116,6 +116,7 @@ prop="standName" fixed="left" width="180" + show-overflow-tooltip label="标准名称">