main
haha 2024-08-29 22:39:45 +08:00
parent 4bc15af9d3
commit c55cd0599b
1 changed files with 5 additions and 2 deletions

View File

@ -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){