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