From c55cd0599b359c435db26a66f3232d599b2d2048 Mon Sep 17 00:00:00 2001 From: haha Date: Thu, 29 Aug 2024 22:39:45 +0800 Subject: [PATCH] update --- yanzhu-ui/src/views/system/user/index.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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){