From f0a3e4db28dcb60f5e63d9610939e881b96c447b 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, 17 Sep 2021 14:15:41 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=89=E6=8B=A9=E4=BA=A7=E5=93=81=E7=BA=BF?= =?UTF-8?q?=E6=97=B6=E8=AE=B0=E5=BD=95=E4=B8=8A=E4=B8=80=E6=AC=A1=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E7=9A=84=E5=88=86=E5=8F=91=E8=B4=A3=E4=BB=BB=E4=BA=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/creatProcess/xmpg/step1-1.vue | 15 +++++++++++++-- .../pages/creatProcess/xmpg/step1.vue | 12 ++++++++++-- 2 files changed, 23 insertions(+), 4 deletions(-) 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) => {