From bd04abe46e1c277f351b84f08972dbec83d23779 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Thu, 1 Aug 2024 09:03:45 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20base=20systemdict=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E6=97=B6=E4=B8=8D=E5=88=B7=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/sys/dict.vue | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/views/sys/dict.vue b/src/views/sys/dict.vue index d0a8929a..1d4e8aad 100644 --- a/src/views/sys/dict.vue +++ b/src/views/sys/dict.vue @@ -350,21 +350,19 @@ //提交字典 dicSubmit(){ let that = this; - that.$refs.dicForm.validate(async (valid) => { + that.$refs.dicForm.validate((valid) => { if (valid) { that.dicForm.type = typeof that.dicForm.type==='string'?that.dicForm.type:that.dicForm.type[0]; - let res=null; if(that.mode === 'addItem'){ - res = that.$API.system.dict.create.req(this.dicForm) + that.$API.system.dict.create.req(this.dicForm).then(res=>{ + that.visibleDicItem = false; + that.$refs.table.refresh() + }) }else{ - res = that.$API.system.dict.update.req(this.editId,this.dicForm) - } - if(res.err_msg){ - that.$alert(res.message, "提示", {type: 'error'}) - }else{ - that.$message.success("操作成功"); - that.visibleDicItem = false; - that.$refs.table.refresh() + that.$API.system.dict.update.req(this.editId,this.dicForm).then(res=>{ + that.visibleDicItem = false; + that.$refs.table.refresh() + }) } } })