diff --git a/yanzhu-ui/src/views/system/user/index.vue b/yanzhu-ui/src/views/system/user/index.vue index 9c87208..a96b48f 100644 --- a/yanzhu-ui/src/views/system/user/index.vue +++ b/yanzhu-ui/src/views/system/user/index.vue @@ -469,7 +469,6 @@ export default { handleAdd() { this.reset(); getUser().then(response => { - debugger this.postOptions = response.posts; this.roleOptions = response.roles; this.oldRoleOptions=response.roles; @@ -482,7 +481,7 @@ export default { handleUpdate(row) { this.reset(); const userId = row.userId || this.ids; - getUser(userId).then(response => { + getUser(userId).then(response => { this.form = response.data; this.postOptions = response.posts; this.roleOptions = response.roles; @@ -496,6 +495,10 @@ export default { let node=this.$refs.treeSel.getNode(this.form.deptId); this.$refs.treeSel.select(node); this.doInputDept(node.raw); + let roles=response.data.roles; + if(roles.length>0){ + this.form.roleId=roles[0].roleId; + } const func=p=>{ p.isExpanded=true; if(p.parentNode){