fix: role create update 没有刷新

This commit is contained in:
caoqianming 2023-12-21 12:58:29 +08:00
parent e5edaf1b3c
commit cbcde10f80
1 changed files with 10 additions and 11 deletions

View File

@ -169,18 +169,17 @@
this.isSaveing = true;
let res;
if(this.type==='add'){
res = this.$API.system.role.create.req(that.addForm);
}else{
res = this.$API.system.role.update.req(that.addForm.id,that.addForm);
}
console.log(res);
debugger;
if(res.err_msg){
this.$message.error(res.err_msg);
}else{
this.$API.system.role.create.req(that.addForm).then(res=>{
this.isSaveing = false;
this.limitedVisible = false;
this.$refs.table.refresh();
}).catch(e=>{this.isSaveing = false;})
}else{
this.$API.system.role.update.req(that.addForm.id,that.addForm).then(res=>{
this.isSaveing = false;
this.limitedVisible = false;
this.$refs.table.refresh();
}).catch(e=>{this.isSaveing = false;})
}
}
})