From 8c7b164166aef8ba249b7afb20cdcfe94b549cfa Mon Sep 17 00:00:00 2001 From: caozehui <2427765068@qq.com> Date: Tue, 2 Jun 2026 09:25:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/api/system/sntp.ts | 9 + frontend/src/views/authority/role/index.vue | 2 +- frontend/src/views/machine/sntp/index.vue | 325 ++++++++++++++++++++ 3 files changed, 335 insertions(+), 1 deletion(-) create mode 100644 frontend/src/api/system/sntp.ts create mode 100644 frontend/src/views/machine/sntp/index.vue diff --git a/frontend/src/api/system/sntp.ts b/frontend/src/api/system/sntp.ts new file mode 100644 index 0000000..fe8b6db --- /dev/null +++ b/frontend/src/api/system/sntp.ts @@ -0,0 +1,9 @@ +import http from '@/api' + +export const startSntpService = () => { + return http.post('/sntp/start', {}) +} + +export const stopSntpService = () => { + return http.post('/sntp/stop', {}) +} diff --git a/frontend/src/views/authority/role/index.vue b/frontend/src/views/authority/role/index.vue index 3fa2944..a35babd 100644 --- a/frontend/src/views/authority/role/index.vue +++ b/frontend/src/views/authority/role/index.vue @@ -18,7 +18,7 @@ 编辑 删除 - 设置权限 + 设置权限 diff --git a/frontend/src/views/machine/sntp/index.vue b/frontend/src/views/machine/sntp/index.vue new file mode 100644 index 0000000..fdf0c5b --- /dev/null +++ b/frontend/src/views/machine/sntp/index.vue @@ -0,0 +1,325 @@ + + + + + + + 当前电脑时间 + {{ computerTime }} + + + + + 装置返回时间 + {{ deviceTime }} + + + + + + + 启动SNTP对时服务 + + + 停止SNTP对时服务 + + + + + + 历史记录 + 清空 + + + + 暂无数据 + + + + + 序号 + 当前电脑时间 + 装置返回时间 + + + + {{ index + 1 }} + {{ item.computerTime }} + {{ item.deviceTime }} + + + + + + + + + + +