From 8975e7a82755a3df7db0fa3adeb07a319e61a3a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E4=BC=9F=E4=BD=B3?= <2797716443@qq.com> Date: Fri, 6 Aug 2021 16:08:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=81=E7=A8=8Bbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/creatProcess/xmpg2/step4.vue | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/pages/processCenter/pages/creatProcess/xmpg2/step4.vue b/src/pages/processCenter/pages/creatProcess/xmpg2/step4.vue index 7f30f2f5b..c5656481f 100644 --- a/src/pages/processCenter/pages/creatProcess/xmpg2/step4.vue +++ b/src/pages/processCenter/pages/creatProcess/xmpg2/step4.vue @@ -429,17 +429,19 @@ export default { }, checkedRole (data) { if (this.type === 1) { - this.dataList[this.zrIndex].liablePeopleId = data[0].id - this.dataList[this.zrIndex].liablePeople = data[0].name - this.$forceUpdate() + const newRow = JSON.parse(JSON.stringify(this.dataList[this.zrIndex])) + newRow.liablePeopleId = data[0].id + newRow.liablePeople = data[0].name + this.$set(this.dataList, this.zrIndex, newRow) } else if(this.type === 2) { - this.dataList.forEach( item => { + this.dataList.forEach((item, index) => { this.selectList.forEach( items => { if (item.standId === items.standId) { - item.liablePeopleId = data[0].id - item.liablePeople = data[0].name + const newRow = JSON.parse(JSON.stringify(item)) + newRow.liablePeopleId = data[0].id + newRow.liablePeople = data[0].name + this.$set(this.dataList, index, newRow) } - this.$forceUpdate() }) }) }