单应用项目,可以创建很多独立工具类页面 ,不用登录 初始化的页面
zhangchen
2025-07-25 e8254cec669f2aa1755a08ea2fdab5ca51e12d70
src/views/mobile/bedsideAuxiliaryScreen/index.vue
@@ -1,5 +1,5 @@
<template>
  <div class="bedside-auxiliary-screen-container">
  <div class="bedside-auxiliary-screen-container" :style="{ backgroundColor: backgroundColor }">
    <Header />
    <div class="bedside-auxiliary-screen-content">
        <div class="content-position"></div>
@@ -16,15 +16,29 @@
import { useBedsideAuxiliaryScreenStore } from "@/store/bedsideAuxiliaryScreen";
import { EPageType } from '@/store/type/bedsideAuxiliaryScreen.type';
import { getAvailableHeightByClass } from '@/utils/utils';
import { useWindowSize } from '@/composables/useWindowSize';
// 未排班时的组件
const UnplannedSchedule = defineAsyncComponent(() => import('./components/UnplannedSchedule.vue'));
const UnplannedSchedule = defineAsyncComponent(() => import('./pages/UnplannedSchedule.vue'));
// 未签到时的组件
const NotSignedIn = defineAsyncComponent(() => import('./components/NotSignedIn.vue'));
const NotSignedIn = defineAsyncComponent(() => import('./pages/NotSignedIn.vue'));
// 已签到时的组件
const SignedIn = defineAsyncComponent(() => import('./pages/SignedIn.vue'));
// 治疗中的组件
const UnderTreatment = defineAsyncComponent(() => import('./components/UnderTreatment.vue'));
const UnderTreatment = defineAsyncComponent(() => import('./pages/UnderTreatment.vue'));
const bedsideAuxiliaryScreenStore = useBedsideAuxiliaryScreenStore();
const cotentHeight = ref(0);
const { width, height } = useWindowSize();
const backgroundColor = computed(() => {
  let color = '#DAE5EC';
  // 如果是未排班、加载中或未签到页面,背景色为白色
  if ([EPageType.NOT_INIT, EPageType.LOADING, EPageType.UNPLANNED_SCHEDULE].includes(bedsideAuxiliaryScreenStore.deviceData.pageType)) {
    color = '#fff';
  }
  return color;
});
const currentComponent = computed(() => {
  let name: any = UnplannedSchedule;
@@ -38,16 +52,19 @@
  } 
  // 已签到
  else if (bedsideAuxiliaryScreenStore.deviceData.pageType === EPageType.SIGNED_IN) {
  } else {
    name = SignedIn;
  }
  // 透析中
  else {
    name = UnderTreatment;
  }
  return name;
});
watch(
  () => bedsideAuxiliaryScreenStore.deviceCode,
  (newVal: string) => {}
);
watch([width, height], () => {
  cotentHeight.value = getAvailableHeightByClass('content-position')
});
onMounted(() => {
  if (bedsideAuxiliaryScreenStore.deviceCode) {
@@ -68,6 +85,7 @@
  box-sizing: border-box;
}
.bedside-auxiliary-screen-container {
  background-color: #409eff;
  .bedside-auxiliary-screen-content {
    padding: 6px 12px 0;
  }