fix: base systemdict提交时不刷新
This commit is contained in:
parent
1de0d342d5
commit
bd04abe46e
|
@ -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()
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue