Merge branch 'master' of http://gitea.xxhhcty.xyz:8080/zcdsj/factory_web
This commit is contained in:
commit
3538d68c9c
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue