fix: base systemdict提交时不刷新
This commit is contained in:
parent
1de0d342d5
commit
bd04abe46e
|
@ -350,21 +350,19 @@
|
||||||
//提交字典
|
//提交字典
|
||||||
dicSubmit(){
|
dicSubmit(){
|
||||||
let that = this;
|
let that = this;
|
||||||
that.$refs.dicForm.validate(async (valid) => {
|
that.$refs.dicForm.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
that.dicForm.type = typeof that.dicForm.type==='string'?that.dicForm.type:that.dicForm.type[0];
|
that.dicForm.type = typeof that.dicForm.type==='string'?that.dicForm.type:that.dicForm.type[0];
|
||||||
let res=null;
|
|
||||||
if(that.mode === 'addItem'){
|
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{
|
}else{
|
||||||
res = that.$API.system.dict.update.req(this.editId,this.dicForm)
|
that.$API.system.dict.update.req(this.editId,this.dicForm).then(res=>{
|
||||||
}
|
that.visibleDicItem = false;
|
||||||
if(res.err_msg){
|
that.$refs.table.refresh()
|
||||||
that.$alert(res.message, "提示", {type: 'error'})
|
})
|
||||||
}else{
|
|
||||||
that.$message.success("操作成功");
|
|
||||||
that.visibleDicItem = false;
|
|
||||||
that.$refs.table.refresh()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue