提交 310bc3ac authored 作者: 刘旭's avatar 刘旭

完成同步校验功能

上级 3337040d
......@@ -55,4 +55,11 @@ export function getSRecords() {
});
}
// 校验
export function getCheck(data: any) {
return request({
url: "/api/init/connect/param/check",
method: "post",
data,
});
}
......@@ -69,6 +69,7 @@ import {
getManual,
getOff,
getSRecords,
getCheck
} from "@/services/api/systemApi/synchronization/synchronizationAPI";
import { ref, reactive, onMounted } from "vue";
import { ElMessage } from "element-plus";
......@@ -98,7 +99,16 @@ const ruleFormRef = ref<FormInstance>();
const isDisabled = ref(true);
// 1、 启动 0、 关闭
const flag = ref()
const handleCheck = () => { }
const handleCheck = async () => {
if (!isDisabled.value) {
const res: any = await getCheck(sybchronizationForm.value)
if (res.code === 200) {
initSRecords()
return ElMessage({ type: "success", message: "校验成功" });
}
} else return ElMessage({ type: "warning", message: "请先关闭同步" });
}
// 开启自动同步
const handleOpen = async () => {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论