浏览代码

bug修复,角色无法选中

chenrui 3 年之前
父节点
当前提交
ff96a639d3
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      src/views/power/user/userModal.vue

+ 3 - 3
src/views/power/user/userModal.vue

@@ -229,9 +229,9 @@ export default {
           if (this.nowData.id) { //  编辑
             this.titleText = '编辑用户'
             this.form = Object.assign({}, this.nowData)
-            if (this.nowData.roleIds) {
-              this.form.roleNames = this.nowData.roleIds.split(',')
-            } else {
+            this.form.roleNames = this.nowData.roleIds.split(',')
+            if (!this.nowData.roleIds) {
+              this.nowData.roleIds = ''
               this.form.roleNames = []
             }
             this.form.loginFlag = Number(this.nowData.loginFlag)