| | |
| | | <template> |
| | | <div class="">1111111111</div> |
| | | <div class="bedside-auxiliary-screen-header"> |
| | | <div class="header-left"> |
| | | <!-- 没有设备编号 --> |
| | | <span v-if="pageType === 0" class="info-text">未绑定设备</span> |
| | | <template v-else> |
| | | <!-- 设备号 --> |
| | | <span class="info-text">{{ |
| | | bedsideAuxiliaryScreenStore.deviceData.devicdeNo |
| | | }}</span> |
| | | <!-- 加载中 --> |
| | | <span v-if="pageType === 1" class="info-text" |
| | | >页面初始化中,请耐心等待!</span |
| | | > |
| | | <!-- 未排班 --> |
| | | <span v-else-if="pageType === 2" class="info-text">当前尚未排班</span> |
| | | <!-- 有排班 --> |
| | | <template v-else> |
| | | <span class="info-text">{{ patientInfo.patientName }}</span> |
| | | <span class="info-text">{{ patientInfo.age }}岁</span> |
| | | <span class="info-text">{{ patientInfo.gender }}</span> |
| | | <span v-if="patientInfo.patFormNumber" class="info-text"> |
| | | {{ patientInfo.patForm }}:{{ patientInfo.patFormNumber }}</span |
| | | > |
| | | </template> |
| | | </template> |
| | | </div> |
| | | <div class="header-right"> |
| | | <img :src="atRegularTimeImg" class="btn-img" alt="" /> |
| | | <img |
| | | :src="setUpImg" |
| | | class="btn-img" |
| | | alt="" |
| | | @click="openSettingDeviceDialog" |
| | | /> |
| | | <img :src="userImg" class="btn-img" alt="" @click="openLoginDialog" /> |
| | | </div> |
| | | </div> |
| | | <!-- 设置设备编号组件 --> |
| | | <SettingDeviceDialog ref="settingDeviceDialogRef" /> |
| | | </template> |
| | | |
| | | <script lang="ts" setup name="Header"> |
| | | import { ref, computed, defineAsyncComponent } from "vue"; |
| | | const SettingDeviceDialog = defineAsyncComponent( |
| | | () => import("./SettingDeviceDialog.vue") |
| | | ); |
| | | import atRegularTimeImg from "../../../../img/dingshi.png"; |
| | | import setUpImg from "../../../../img/shezhi.png"; |
| | | import userImg from "../../../../img/user.png"; |
| | | |
| | | import { useBedsideAuxiliaryScreenStore } from "@/store/bedsideAuxiliaryScreen"; |
| | | import { EPatForm } from "@/store/type/bedsideAuxiliaryScreen.type"; |
| | | import { ElMessage } from "element-plus"; |
| | | |
| | | const bedsideAuxiliaryScreenStore = useBedsideAuxiliaryScreenStore(); |
| | | |
| | | const settingDeviceDialogRef = ref<any>(null); |
| | | |
| | | const pageType = computed(() => { |
| | | return bedsideAuxiliaryScreenStore.deviceData.pageType; |
| | | }); |
| | | |
| | | const patientInfo = computed(() => { |
| | | return { |
| | | patientName: bedsideAuxiliaryScreenStore.deviceData.patientName, |
| | | patientPhone: bedsideAuxiliaryScreenStore.deviceData.patientPhone, |
| | | age: bedsideAuxiliaryScreenStore.deviceData.age, |
| | | gender: bedsideAuxiliaryScreenStore.deviceData.gender, |
| | | patForm: |
| | | bedsideAuxiliaryScreenStore.deviceData.patForm === |
| | | EPatForm.OUTPATIENT_SERVICE |
| | | ? "门诊号" |
| | | : "住院号", |
| | | patFormNumber: bedsideAuxiliaryScreenStore.deviceData.patFormNumber, |
| | | }; |
| | | }); |
| | | |
| | | const openSettingDeviceDialog = () => { |
| | | settingDeviceDialogRef.value?.openDialog(); |
| | | }; |
| | | |
| | | const openLoginDialog = () => { |
| | | ElMessage({ |
| | | message: "功能开发中,敬请期待!", |
| | | type: "warning", |
| | | }); |
| | | }; |
| | | </script> |
| | | |
| | | <style> |
| | | <style lang="less" scoped> |
| | | .bedside-auxiliary-screen-header { |
| | | height: 25px; |
| | | padding: 0 15px 0 12px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | background: #70a3dd; |
| | | border-radius: 1px 0px 5px 5px; |
| | | .header-left { |
| | | display: flex; |
| | | align-items: center; |
| | | .info-text { |
| | | font-family: PingFangSC, PingFang SC; |
| | | font-weight: 600; |
| | | font-size: 11px; |
| | | color: #ffffff; |
| | | text-align: left; |
| | | font-style: normal; |
| | | &:not(:first-child) { |
| | | margin-left: 6px; |
| | | } |
| | | } |
| | | } |
| | | .header-right { |
| | | display: flex; |
| | | align-items: center; |
| | | .btn-img { |
| | | height: 10px; |
| | | object-fit: contain; |
| | | cursor: pointer; |
| | | &:not(:first-child) { |
| | | margin-left: 9px; |
| | | } |
| | | &:active { |
| | | opacity: 0.6; |
| | | transform: scale(0.95); |
| | | } |
| | | |
| | | transition: all 0.2s; |
| | | } |
| | | } |
| | | } |
| | | </style> |