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)}` +}