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/views/mobile/bedsideAuxiliaryScreen/index.vue | 45 ++++++++++++++++++++++++++++++++++++++-------
1 files changed, 38 insertions(+), 7 deletions(-)
diff --git a/src/views/mobile/bedsideAuxiliaryScreen/index.vue b/src/views/mobile/bedsideAuxiliaryScreen/index.vue
index fa8822d..b555a83 100644
--- a/src/views/mobile/bedsideAuxiliaryScreen/index.vue
+++ b/src/views/mobile/bedsideAuxiliaryScreen/index.vue
@@ -1,20 +1,51 @@
<template>
- <div class="bedside-auxiliary-screen-container">
- 张三
+ <div class="bedside-auxiliary-screen-container">
+ <Header :type="0" device-no="03" />
+ <div class="bedside-auxiliary-screen-content">
+ <div class="content-position"></div>
+ <UnplannedSchedule v-if="cotentHeight > 0" :height="cotentHeight" />
</div>
+ </div>
</template>
<script lang="ts" setup>
+import { ref, watch, onMounted, defineAsyncComponent } from "vue";
+// @ts-ignore
+import Header from "./components/Header.vue";
+import { useBedsideAuxiliaryScreenStore } from "@/store/bedsideAuxiliaryScreen";
+import { getAvailableHeightByClass } from '@/utils/utils';
+// 未排班时的组件
+const UnplannedSchedule = defineAsyncComponent(() => import('./components/UnplannedSchedule.vue'));
+const bedsideAuxiliaryScreenStore = useBedsideAuxiliaryScreenStore();
+
+const cotentHeight = ref(0);
+watch(
+ () => bedsideAuxiliaryScreenStore.deviceCode,
+ (newVal: string) => {}
+);
+
+onMounted(() => {
+ if (bedsideAuxiliaryScreenStore.deviceCode) {
+ bedsideAuxiliaryScreenStore.connect(
+ `${import.meta.env.VITE_SSE_BASE_URL}${
+ bedsideAuxiliaryScreenStore.deviceCode
+ }`
+ );
+ }
+ cotentHeight.value = getAvailableHeightByClass('content-position')
+});
</script>
<style lang="less" scoped>
-*{
- margin: 0;
- padding: 0;
- box-sizing: border-box;
+* {
+ margin: 0;
+ padding: 0;
+ box-sizing: border-box;
}
.bedside-auxiliary-screen-container {
- font-size: 48px;
+ .bedside-auxiliary-screen-content {
+ padding: 6px 12px 0;
+ }
}
</style>
\ No newline at end of file
--
Gitblit v1.8.0