update material

This commit is contained in:
lb
2023-02-03 16:28:52 +08:00
parent 70243b527f
commit 151f787f0a
5 changed files with 162 additions and 92 deletions

View File

@@ -167,13 +167,15 @@ export default {
method,
data: {
...this.dataForm,
...fields
...fields,
},
}).then(({ data: res }) => {
console.log("[add&update] res is: ", res);
this.$message.success(payload.name === "add" ? "添加成功" : "更新成功");
this.$emit("refreshDataList");
this.handleClose();
if (res.code === 0) {
this.$message.success(payload.name === "add" ? "添加成功" : "更新成功");
this.$emit("refreshDataList");
this.handleClose();
} else this.$message.error(res.msg);
});
}
}