From 19269577940bb85bbdedd8b471898b25ca76cb7f Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Fri, 17 Feb 2023 13:54:53 +0800
Subject: [PATCH] 用户新增,修改报错修改
---
src/views/system/user.vue | 30 +++++++++++++++---------------
1 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/src/views/system/user.vue b/src/views/system/user.vue
index 09da796..7798f02 100644
--- a/src/views/system/user.vue
+++ b/src/views/system/user.vue
@@ -688,8 +688,8 @@
})
},
rowSave (row, done, loading) {
- row.deptId = row.deptId.join(",")
- row.roleId = row.roleId.join(",")
+ // row.deptId = row.deptId.join(",")
+ // row.roleId = row.roleId.join(",")
// row.postId = row.postId.join(",");
row.postId = ''
add(row).then(() => {
@@ -706,8 +706,8 @@
})
},
rowUpdate (row, index, done, loading) {
- row.deptId = row.deptId.join(",")
- row.roleId = row.roleId.join(",")
+ // row.deptId = row.deptId.join(",")
+ // row.roleId = row.roleId.join(",")
// row.postId = row.postId.join(",");
row.postId = ''
update(row).then(() => {
@@ -868,18 +868,18 @@
})
},
beforeOpen (done, type) {
- if (["edit", "view"].indexOf(type)) {
+ if (["edit", "view"].includes(type)) {
getUser(this.form.id).then(res => {
this.form = res.data.data
- if (this.form.hasOwnProperty("deptId")) {
- this.form.deptId = this.form.deptId.split(",")
- }
- if (this.form.hasOwnProperty("roleId")) {
- this.form.roleId = this.form.roleId.split(",")
- }
- if (this.form.hasOwnProperty("postId")) {
- this.form.postId = this.form.postId.split(",")
- }
+ // if (this.form.hasOwnProperty("deptId")) {
+ // this.form.deptId = this.form.deptId.split(",")
+ // }
+ // if (this.form.hasOwnProperty("roleId")) {
+ // this.form.roleId = this.form.roleId.split(",")
+ // }
+ // if (this.form.hasOwnProperty("postId")) {
+ // this.form.postId = this.form.postId.split(",")
+ // }
})
}
this.initFlag = true
@@ -923,7 +923,7 @@
})
},
platformBeforeOpen (done, type) {
- if (["edit", "view"].indexOf(type)) {
+ if (["edit", "view"].includes(type)) {
getUserPlatform(this.platformForm.id).then(res => {
this.platformForm = res.data.data
})
--
Gitblit v1.9.3