From cbcde10f80ce2d3e0545148973d3cdb2c2ce33d9 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Thu, 21 Dec 2023 12:58:29 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20role=20create=20update=20=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E5=88=B7=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/sys/role.vue | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) 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;}) } } })