From fcd455b10a7f40d39a55c5182dc76646ecd7a7bb Mon Sep 17 00:00:00 2001
From: zhangchen <1652267879@qq.com>
Date: 星期五, 18 七月 2025 16:39:52 +0800
Subject: [PATCH] ID1825-修改数据格式化逻辑
---
src/store/bedsideAuxiliaryScreen.ts | 24 +++++++-----------------
1 files changed, 7 insertions(+), 17 deletions(-)
diff --git a/src/store/bedsideAuxiliaryScreen.ts b/src/store/bedsideAuxiliaryScreen.ts
index 8573985..799dd0d 100644
--- a/src/store/bedsideAuxiliaryScreen.ts
+++ b/src/store/bedsideAuxiliaryScreen.ts
@@ -2,8 +2,8 @@
import { ref } from "vue";
import cache from "../utils/cache";
import { EventSourcePolyfill } from "event-source-polyfill";
-import type { DeviceData } from './type/bedsideAuxiliaryScreen.type';
-import { defaultDeviceData, defaultconsumablesCollection } from './type/bedsideAuxiliaryScreen.type';
+import type { BedsideAuxiliaryScreen } from './type/bedsideAuxiliaryScreen.type';
+import { defaultDeviceData, defaultconsumablesCollection, formatDeviceData } from './type/bedsideAuxiliaryScreen.type';
export const useBedsideAuxiliaryScreenStore = defineStore(
@@ -21,8 +21,8 @@
zuihouTime: '',
});
- /** s设备信息数据 */
- const deviceData = ref<DeviceData>(defaultDeviceData());
+ /** 设备信息数据 */
+ const deviceData = ref<BedsideAuxiliaryScreen>(defaultDeviceData());
/**
* 设置设备编号
@@ -72,19 +72,7 @@
// 倒计时提示文本
if (dataBody.倒计时?.提示文本) {}
- // 床旁血压计
- if (dataBody.推送类型 === '床旁血压计') {}
- // 中央监控大屏信息
- else if (dataBody.推送类型 === '中央监控大屏信息') {
- // 存在透析状态,表示当前设备今天存在排班
- if (dataBody?.透析状态) {}
- // 不存在就是没有排班
- else {
- deviceData.value.devicdeNo = dataBody.IOT信息?.床号;
- deviceData.value.patientName = '';
- deviceData.value.consumablesCollection = dataBody?.使用耗材字典 || defaultconsumablesCollection();
- }
- }
+ deviceData.value = formatDeviceData(dataBody)
}
};
};
@@ -100,6 +88,8 @@
console.log("[SSE] 连接已关闭");
}
};
+
+
return {
deviceCode,
deviceData,
--
Gitblit v1.8.0