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("请选择一条数据进行添加");