单应用项目,可以创建很多独立工具类页面 ,不用登录 初始化的页面
zhangchen
2025-07-18 0b4f9fc1768f0696c5046e139fb7b0c6b786a936
src/views/mobile/bedsideAuxiliaryScreen/index.vue
@@ -3,23 +3,39 @@
    <Header :type="0" device-no="03" />
    <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 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
  }
  return name;
});
watch(
  () => bedsideAuxiliaryScreenStore.deviceCode,
  (newVal: string) => {}