From 1c510f40ddaa7769fb2128cf96014090120343af Mon Sep 17 00:00:00 2001 From: wws <18630710203@163.com> Date: Fri, 8 Dec 2023 16:08:47 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7userName=E6=9B=BF=E6=8D=A2use?= =?UTF-8?q?rId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/device/inspectionPlan/index.vue | 14 +++++++++++--- src/views/device/spotCheckPlan/index.vue | 14 +++++++++++--- src/views/device/upkeepPlan/index.vue | 14 +++++++++++--- 3 files changed, 33 insertions(+), 9 deletions(-) diff --git a/src/views/device/inspectionPlan/index.vue b/src/views/device/inspectionPlan/index.vue index 5b4b81a..14e7567 100644 --- a/src/views/device/inspectionPlan/index.vue +++ b/src/views/device/inspectionPlan/index.vue @@ -892,7 +892,7 @@ export default { for (let i = 0; i < response.data.length; i++) { this.personList.push({ label: response.data[i].nickName + '(' + response.data[i].userName + ')', - key: response.data[i].userId, + key: response.data[i].userName, }) } }); @@ -1231,7 +1231,11 @@ export default { } this.planLoading = true; if (this.form.planId != null) { - this.form.personList = this.selectPersonList; + this.form.personList = this.selectPersonList.map(item => { + return{ + userName: item.toString() + } + }); updatePlan(this.form).then(response => { this.planLoading = false; this.$modal.msgSuccess("修改成功"); @@ -1239,7 +1243,11 @@ export default { this.getList(); }); } else { - this.form.personList = this.selectPersonList; + this.form.personList = this.selectPersonList.map(item => { + return{ + userName: item.toString() + } + }); addPlan(this.form).then(response => { this.planLoading = false; this.$modal.msgSuccess("新增成功"); diff --git a/src/views/device/spotCheckPlan/index.vue b/src/views/device/spotCheckPlan/index.vue index 7de6a8c..c14520f 100644 --- a/src/views/device/spotCheckPlan/index.vue +++ b/src/views/device/spotCheckPlan/index.vue @@ -937,7 +937,7 @@ export default { for (let i = 0; i < response.data.length; i++) { this.personList.push({ label: response.data[i].nickName + '(' + response.data[i].userName + ')', - key: response.data[i].userId, + key: response.data[i].userName, }) } }); @@ -1265,7 +1265,11 @@ export default { } this.planLoading = true; if (this.form.planId != null) { - this.form.personList = this.selectPersonList; + this.form.personList = this.selectPersonList.map(item => { + return{ + userName: item.toString() + } + }); updatePlan(this.form).then(response => { this.planLoading = false; this.$modal.msgSuccess("修改成功"); @@ -1273,7 +1277,11 @@ export default { this.getList(); }); } else { - this.form.personList = this.selectPersonList; + this.form.personList = this.selectPersonList.map(item => { + return{ + userName: item.toString() + } + }); addPlan(this.form).then(response => { this.planLoading = false; this.$modal.msgSuccess("新增成功"); diff --git a/src/views/device/upkeepPlan/index.vue b/src/views/device/upkeepPlan/index.vue index 4d7f8dc..be0c414 100644 --- a/src/views/device/upkeepPlan/index.vue +++ b/src/views/device/upkeepPlan/index.vue @@ -1290,7 +1290,7 @@ export default { for (let i = 0; i < response.data.length; i++) { this.personList.push({ label: response.data[i].nickName + '(' + response.data[i].userName + ')', - key: response.data[i].userId, + key: response.data[i].userName, }) } }); @@ -1660,7 +1660,11 @@ export default { } this.planLoading = true; if (this.form.planId != null) { - this.form.personList = this.selectPersonList; + this.form.personList = this.selectPersonList.map(item => { + return{ + userName: item.toString() + } + }); updatePlan(this.form).then(response => { this.planLoading = false; this.$modal.msgSuccess("修改成功"); @@ -1668,7 +1672,11 @@ export default { this.getList(); }); } else { - this.form.personList = this.selectPersonList; + this.form.personList = this.selectPersonList.map(item => { + return{ + userName: item.toString() + } + }); addPlan(this.form).then(response => { this.planLoading = false; this.$modal.msgSuccess("新增成功");