From 0778dce9b02698933dcebf029d56b3290ebbae60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E8=BE=89?= <814457906@qq.com> Date: Thu, 23 Mar 2023 10:05:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/user/index.vue | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index b4f25b2..5a348d5 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -312,7 +312,7 @@ - + { + response.data.nurseStationIdstwo = JSON.parse( + JSON.stringify(response.data.nurseStationIds) + ); this.form = response.data; if (this.form.nurseStationIds) { this.form.nurseStationIds = this.form.nurseStationIds.split(","); this.form.nurseStationIds = this.form.nurseStationIds.map(e => { return (e = Number(e)); }); + this.form.nurseStationIdstwo = this.form.nurseStationIdstwo.split( + "," + ); + this.form.nurseStationIdstwo = this.form.nurseStationIdstwo.map(e => { + return (e = Number(e)); + }); // this.form.nurseStationIds = []; } else { // this.form.nurseStationIds = Number(this.form.nurseStationIds); @@ -721,7 +732,6 @@ export default { // this.form.nurseStationIds.length == 0 // ) {getList // } else { - // } console.log(this.form); this.postOptions = response.posts; @@ -774,7 +784,9 @@ export default { }); } else { // this.form.nurseStationIds = Number(this.form.nurseStationIds); - this.form.nurseStationIds = this.form.nurseStationIds.join(","); + this.form.nurseStationIds = this.form.nurseStationIdstwo.join( + "," + ); updateUser(this.form).then(response => { this.$modal.msgSuccess("修改成功"); this.open = false; @@ -783,7 +795,7 @@ export default { }); } } else { - this.form.nurseStationIds = this.form.nurseStationIds.join(","); + this.form.nurseStationIds = this.form.nurseStationIdstwo.join(","); addUser(this.form).then(response => { this.$modal.msgSuccess("新增成功"); this.open = false;