From 11bd2ae19494932f7f6071425e858ce249b73179 Mon Sep 17 00:00:00 2001
From: zhangchen <1652267879@qq.com>
Date: 星期一, 21 七月 2025 16:58:08 +0800
Subject: [PATCH] ID1625-暂存
---
src/views/mobile/bedsideAuxiliaryScreen/index.vue | 32 ++++++++++++++++++++++++++++----
1 files changed, 28 insertions(+), 4 deletions(-)
diff --git a/src/views/mobile/bedsideAuxiliaryScreen/index.vue b/src/views/mobile/bedsideAuxiliaryScreen/index.vue
index b555a83..cc09d14 100644
--- a/src/views/mobile/bedsideAuxiliaryScreen/index.vue
+++ b/src/views/mobile/bedsideAuxiliaryScreen/index.vue
@@ -1,25 +1,49 @@
<template>
<div class="bedside-auxiliary-screen-container">
- <Header :type="0" device-no="03" />
+ <Header />
<div class="bedside-auxiliary-screen-content">
<div class="content-position"></div>
- <UnplannedSchedule v-if="cotentHeight > 0" :height="cotentHeight" />
+ <!-- <UnplannedSchedule v-if="cotentHeight > 0" :height="cotentHeight" /> -->
+ <component v-if="cotentHeight > 0" :is="currentComponent" :height="cotentHeight" />
</div>
</div>
</template>
<script lang="ts" setup>
-import { ref, watch, onMounted, defineAsyncComponent } from "vue";
+import { ref, watch, computed, onMounted, defineAsyncComponent } from "vue";
// @ts-ignore
import Header from "./components/Header.vue";
import { useBedsideAuxiliaryScreenStore } from "@/store/bedsideAuxiliaryScreen";
+import { EPageType } from '@/store/type/bedsideAuxiliaryScreen.type';
import { getAvailableHeightByClass } from '@/utils/utils';
// 未排班时的组件
const UnplannedSchedule = defineAsyncComponent(() => import('./components/UnplannedSchedule.vue'));
+// 未签到时的组件
+const NotSignedIn = defineAsyncComponent(() => import('./components/NotSignedIn.vue'));
+// 治疗中的组件
+const UnderTreatment = defineAsyncComponent(() => import('./components/UnderTreatment.vue'));
const bedsideAuxiliaryScreenStore = useBedsideAuxiliaryScreenStore();
-
const cotentHeight = ref(0);
+
+const currentComponent = computed(() => {
+ let name: any = UnplannedSchedule;
+ // 未排班
+ if ([EPageType.NOT_INIT, EPageType.LOADING, EPageType.UNPLANNED_SCHEDULE].includes(bedsideAuxiliaryScreenStore.deviceData.pageType)) {
+ name = UnplannedSchedule;
+ }
+ // 未签到
+ else if (bedsideAuxiliaryScreenStore.deviceData.pageType === EPageType.NOT_SIGNED_IN) {
+ name = NotSignedIn
+ }
+ // 已签到
+ else if (bedsideAuxiliaryScreenStore.deviceData.pageType === EPageType.SIGNED_IN) {
+ } else {
+ name = UnderTreatment;
+ }
+ return name;
+});
+
watch(
() => bedsideAuxiliaryScreenStore.deviceCode,
(newVal: string) => {}
--
Gitblit v1.8.0