Commit 95737bcd authored by “yiyousong”'s avatar “yiyousong”

preff:添加同步站点数据提示框

parent 7d7587b7
...@@ -376,12 +376,28 @@ export default { ...@@ -376,12 +376,28 @@ export default {
this.$refs.addsite.onEdit(data); this.$refs.addsite.onEdit(data);
}, },
// 同步数据 // 同步数据
async handleSync(id) { handleSync(id) {
let res = await SyncSiteData({ id }); let _this = this;
let { code, msg } = res.data; this.$confirm({
if (code == 1) { title: "系统提示",
this.$message.success(msg); content: "确定要同步更新站点数据吗?",
} okText: "确定",
okType: "primary",
cancelText: "取消",
centered: true,
maskClosable: true,
icon: "question",
async onOk() {
let res = await SyncSiteData({ id });
let { code, msg } = res.data;
if (code == 1) {
_this.$message.success(msg);
}
},
onCancel() {
console.log("Cancel");
},
});
}, },
}, },
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment