fix: team 编辑后未刷新

This commit is contained in:
caoqianming 2024-12-11 17:46:37 +08:00
parent cce2c8e395
commit c8bde428a8
1 changed files with 15 additions and 10 deletions

View File

@ -136,16 +136,21 @@
this.isSaveing = true; this.isSaveing = true;
let res; let res;
if(this.type==='add'){ if(this.type==='add'){
res = this.$API.mtm.team.create.req(that.form); this.$API.mtm.team.create.req(that.form).then(res=>{
this.isSaveing = false;
this.limitedVisible = false;
this.$refs.table.refresh();
}).catch(e=>{
this.isSaveing = false;
})
}else{ }else{
res = this.$API.mtm.team.update.req(that.form.id,that.form); this.$API.mtm.team.update.req(that.form.id,that.form).then(res=>{
} this.isSaveing = false;
if(res.err_msg){ this.limitedVisible = false;
this.$message.error(res.err_msg); this.$refs.table.refresh();
}else{ }).catch(e=>{
this.isSaveing = false; this.isSaveing = false;
this.limitedVisible = false; })
this.$refs.table.refresh();
} }
} }
}) })
@ -154,7 +159,7 @@
// //
handleEdit(row){ handleEdit(row){
this.type='edit'; this.type='edit';
this.form=row; this.form=Object.assign({},row);
this.limitedVisible = true; this.limitedVisible = true;
}, },
// //