单应用项目,可以创建很多独立工具类页面 ,不用登录 初始化的页面
zhangchen
2025-07-08 4981c1f1ef22523cb2dc027c7c8126dfb924c5af
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<template>
  <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;
}
.bedside-auxiliary-screen-container {
  .bedside-auxiliary-screen-content {
    padding: 6px 12px 0;
  }
}
</style>