上饶市警务平台后台管理前端
zhongrj
2023-02-17 19269577940bb85bbdedd8b471898b25ca76cb7f
用户新增,修改报错修改
1 files modified
30 ■■■■ changed files
src/views/system/user.vue 30 ●●●● patch | view | raw | blame | history
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
                })