From b7b79d84b269641a4a8134249f6b5ec33ae6218f Mon Sep 17 00:00:00 2001
From: zhangchen <1652267879@qq.com>
Date: 星期六, 26 七月 2025 14:15:03 +0800
Subject: [PATCH] Merge branch 'ID1825-床旁副屏改版' into test

---
 src/store/bedsideAuxiliaryScreen.ts |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/store/bedsideAuxiliaryScreen.ts b/src/store/bedsideAuxiliaryScreen.ts
index b93d6cc..1424463 100644
--- a/src/store/bedsideAuxiliaryScreen.ts
+++ b/src/store/bedsideAuxiliaryScreen.ts
@@ -134,14 +134,19 @@
           const dataBody = JSON.parse(datax) as SseMsgData;
           console.log("dataBody: ", dataBody);
           // 倒计时提示文本
-          if (dataBody.倒计时?.提醒文本) {
-            const taskTime = dayjs(dataBody.倒计时?.当前服务器时间).add(dataBody.倒计时?.设定提醒倒计时, 'minute')
+          if (dataBody.倒计时?.提醒文本 && Number(dataBody.倒计时?.设定提醒倒计时 > 0)) {
+            const serverTimeRaw = dataBody.倒计时?.当前服务器时间;
+            const reminderMinutes = Number(dataBody.倒计时?.设定提醒倒计时 ?? 0);
+            const serverTimeFormatted = serverTimeRaw.replace(' ', 'T');
+
+            const taskTime = dayjs(serverTimeFormatted).add(reminderMinutes, 'second');
             setSyncTask({
               deviceCode: dataBody.IOT信息.设备唯一编号,
               recordCode: dataBody.透析状态?.透析单编号,
               taskDate: taskTime.format('YYYY-MM-DD HH:mm'),
               taskName: dataBody.倒计时?.提醒文本,
               overdue: false,
+              sync: true,
               countdown: dataBody.倒计时?.设定提醒倒计时
             })
           } else {

--
Gitblit v1.8.0