This commit is contained in:
shijing 2025-11-25 13:19:03 +08:00
commit 3538d68c9c
1 changed files with 20 additions and 10 deletions

View File

@ -77,6 +77,7 @@
<scTable <scTable
ref="table" ref="table"
:apiObj="apiObj" :apiObj="apiObj"
row-key="id"
stripe stripe
remoteSort remoteSort
remoteFilter remoteFilter
@ -487,20 +488,29 @@ export default {
let res; let res;
if (this.type === "add") { if (this.type === "add") {
res = await this.$API.system.user.create.req(this.addForm); try {
res = await this.$API.system.user.create.req(this.addForm);
this.isSaveing = false;
this.limitedVisible = false;
this.$refs.table.refresh()
this.$message.success("操作成功");
}catch (err) {
this.isSaveing = false;
}
} else if (this.type === "edit") { } else if (this.type === "edit") {
res = await this.$API.system.user.update.req( try {
res = await this.$API.system.user.update.req(
this.addForm.id, this.addForm.id,
this.addForm this.addForm
); );
} this.isSaveing = false;
this.isSaveing = false; this.limitedVisible = false;
if (res.err_msg) { this.$refs.table.refresh()
this.$message(res.err_msg); this.$message.success("操作成功");
} else { }catch(e) {
this.limitedVisible = false; this.isSaveing = false;
this.$refs.table.refresh() }
this.$message.success("操作成功");
} }
} else { } else {
return false; return false;