diff --git a/src/views/sys/role.vue b/src/views/sys/role.vue index d13a5071..54a2b234 100644 --- a/src/views/sys/role.vue +++ b/src/views/sys/role.vue @@ -169,18 +169,17 @@ this.isSaveing = true; let res; if(this.type==='add'){ - res = this.$API.system.role.create.req(that.addForm); + 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{ - 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.isSaveing = false; - this.limitedVisible = false; - this.$refs.table.refresh(); + 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;}) } } })