From 212e8acb9bfa78c16bedc468dbd93e5fda2231aa Mon Sep 17 00:00:00 2001 From: yanyizhou <2311759275@qq.com> Date: Sat, 18 Sep 2021 17:00:27 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=AF=84=E4=BC=B0=E6=A0=87?= =?UTF-8?q?=E5=87=86=20=20=E5=A6=82=E6=9E=9Clocalstorage=E9=87=8C=E6=B2=A1?= =?UTF-8?q?=E6=9C=89pastlist=E6=97=B6=E5=81=9A=E7=9A=84=E5=88=A4=E6=96=AD?= =?UTF-8?q?=EF=BC=88+=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/creatProcess/xmpg/step1-1.vue | 22 +++++++++++-------- .../pages/creatProcess/xmpg/step1.vue | 22 +++++++++++-------- 2 files changed, 26 insertions(+), 18 deletions(-) diff --git a/src/pages/processCenter/pages/creatProcess/xmpg/step1-1.vue b/src/pages/processCenter/pages/creatProcess/xmpg/step1-1.vue index baee348f1..725a1c0f1 100644 --- a/src/pages/processCenter/pages/creatProcess/xmpg/step1-1.vue +++ b/src/pages/processCenter/pages/creatProcess/xmpg/step1-1.vue @@ -729,17 +729,21 @@ export default { this.standModel = false; } else { if (this.standList.length >= 1) { - this.pastProject.forEach(item => { - this.standList.map(items => { - if( item.productLine === items.productLine){ - items.distributePersonId = item.distributePersonId - items.distributePerson = item.distributePerson - } + if (this.pastProject === null){ + this.dataList = this.standList; + }else { + this.pastProject.forEach(item => { + this.standList.map(items => { + if( item.productLine === items.productLine){ + items.distributePersonId = item.distributePersonId + items.distributePerson = item.distributePerson + } + }) }) - }) - this.dataList = this.standList; - this.roleForm.directorUser = this.dataList[0].uname; + this.dataList = this.standList + } this.listForm.dataList = this.standList; + this.roleForm.directorUser = this.dataList[0].uname; this.standModel = false; } else { this.$message.warning("请选择一条数据进行添加"); diff --git a/src/pages/processCenter/pages/creatProcess/xmpg/step1.vue b/src/pages/processCenter/pages/creatProcess/xmpg/step1.vue index 35783abf5..339b51f78 100644 --- a/src/pages/processCenter/pages/creatProcess/xmpg/step1.vue +++ b/src/pages/processCenter/pages/creatProcess/xmpg/step1.vue @@ -704,17 +704,21 @@ export default { this.standModel = false; } else { if (this.standList.length >= 1) { - this.pastProject.forEach(item => { - this.standList.map(items => { - if( item.productLine === items.productLine){ - items.distributePersonId = item.distributePersonId - items.distributePerson = item.distributePerson - } + if (this.pastProject === null){ + this.dataList = this.standList; + }else { + this.pastProject.forEach(item => { + this.standList.map(items => { + if( item.productLine === items.productLine){ + items.distributePersonId = item.distributePersonId + items.distributePerson = item.distributePerson + } + }) }) - }) - this.dataList = this.standList; - this.roleForm.directorUser = this.dataList[0].uname; + this.dataList = this.standList + } this.listForm.dataList = this.standList; + this.roleForm.directorUser = this.dataList[0].uname; this.standModel = false; } else { this.$message.warning("请选择一条数据进行添加");