diff --git a/src/pages/processCenter/pages/creatProcess/xmpg/step1-1.vue b/src/pages/processCenter/pages/creatProcess/xmpg/step1-1.vue index a7391f3a1..baee348f1 100644 --- a/src/pages/processCenter/pages/creatProcess/xmpg/step1-1.vue +++ b/src/pages/processCenter/pages/creatProcess/xmpg/step1-1.vue @@ -153,8 +153,8 @@ placeholder="请选择分发负责人" readonly @click.native="choiceZRR(scope,'distributePerson', '选择分发责任人', roleForm.distributePerson)" - v-if="!scope.row.distributePerson"> - {{ scope.row.distributePerson }} + > + @@ -563,6 +563,7 @@ export default { distributePerson: "", //分发责任人 distributePersonId: "", //分发责任人id id: "", + pastProject: [], //用来存放上次选中的产品线信息 sarStandProjectLibraries: [{ projectManager: "", projectLevel: "", @@ -710,6 +711,7 @@ export default { }, //确认添加事件 okStand() { + this.pastProject = JSON.parse(localStorage.getItem('projectList')) let proData = []; if (this.dataList.length >= 1) { this.dataList.forEach(item => { @@ -727,6 +729,14 @@ 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 + } + }) + }) this.dataList = this.standList; this.roleForm.directorUser = this.dataList[0].uname; this.listForm.dataList = this.standList; @@ -774,6 +784,7 @@ export default { this.isSubmit = true; this.listForm.commentText = this.commentText; var json = Object.assign(this.listForm, this.roleForm); + localStorage.setItem('projectList', JSON.stringify(this.dataList)) this.$refs["listForm"].validate((valid) => { if (valid) { this.$refs["roleForm"].validate((valid) => { diff --git a/src/pages/processCenter/pages/creatProcess/xmpg/step1.vue b/src/pages/processCenter/pages/creatProcess/xmpg/step1.vue index 7dde63dce..35783abf5 100644 --- a/src/pages/processCenter/pages/creatProcess/xmpg/step1.vue +++ b/src/pages/processCenter/pages/creatProcess/xmpg/step1.vue @@ -686,7 +686,7 @@ export default { }, //确认添加事件 okStand() { - // this.pastProject = JSON.parse(localStorage.getItem('projectList')) + this.pastProject = JSON.parse(localStorage.getItem('projectList')) let proData = []; if (this.dataList.length >= 1) { this.dataList.forEach(item => { @@ -704,6 +704,14 @@ 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 + } + }) + }) this.dataList = this.standList; this.roleForm.directorUser = this.dataList[0].uname; this.listForm.dataList = this.standList; @@ -749,7 +757,7 @@ export default { this.isSubmit = true; this.listForm.commentText = this.commentText; var json = Object.assign(this.listForm, this.roleForm); - // localStorage.setItem('projectList', JSON.stringify(this.dataList)) + localStorage.setItem('projectList', JSON.stringify(this.dataList)) this.$refs["listForm"].validate((valid) => { if (valid) { this.$refs["roleForm"].validate((valid) => {