From 12c9a4e2f5f69f3969631c0cfb761dacfd07376c Mon Sep 17 00:00:00 2001 From: guoapeng Date: Mon, 7 Jul 2025 19:51:47 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=B6=88=E6=AF=92=E5=80=92=E8=AE=A1?= =?UTF-8?q?=E6=97=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/home/HomeOperation.vue | 25 ++++++++++++++++++------- src/views/home/chart.vue | 15 +++++++++++++-- 2 files changed, 31 insertions(+), 9 deletions(-) diff --git a/src/components/home/HomeOperation.vue b/src/components/home/HomeOperation.vue index 45487b4..3d3e4ee 100644 --- a/src/components/home/HomeOperation.vue +++ b/src/components/home/HomeOperation.vue @@ -155,7 +155,7 @@ const operationState = computed(() => { const startInjection = async () => { const stopParams = { className: 'DisinfectionCtrlServiceExt', - fnName: 'setHandleStopPumpInjectionFlag', + fnName: 'handleStartPumpInjection', params: {}, } await sendCmd(stopParams) @@ -165,12 +165,23 @@ const startInjection = async () => { const stopInjection = async () => { const stopParams = { className: 'DisinfectionCtrlServiceExt', - fnName: 'clearHandleStopPumpInjectionFlag', + fnName: 'handleStopPumpInjection', params: {}, } await sendCmd(stopParams) FtMessage.success('操作成功') } + +const formatSeconds = (seconds: number) => { + const hours = Math.floor(seconds / 3600) + const minutes = Math.floor((seconds % 3600) / 60) + // const remainingSeconds = seconds % 60 + + // 补零函数 + const padZero = (num: number) => num.toString().padStart(2, '0') + + return `${padZero(hours)}:${padZero(minutes)}` +}