This commit is contained in:
lb
2023-08-01 15:16:47 +08:00
parent 456c9d8950
commit 2f1bc5906c
8 changed files with 108 additions and 67 deletions

View File

@@ -666,10 +666,23 @@ export default {
}
case "同步":
case "全部同步":
this.$http.post(this.urls.syncUrl).then(({ data: res }) => {
console.log("同步", res);
this.$message({ message: res.msg, type: res.code === 0 ? "success" : "error" });
this.getList();
this.$confirm("是否同步数据?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
this.overlayVisible = true;
this.$http
.post(this.urls.syncUrl)
.then(({ data: res }) => {
console.log("同步", res);
this.$message({ message: res.msg, type: res.code === 0 ? "success" : "error" });
this.getList();
this.overlayVisible = false;
})
.catch((err) => {
this.overlayVisible = false;
});
});
break;
}