| | |
| | | <div class="bedside-auxiliary-screen-header"> |
| | | <div class="header-left"> |
| | | <!-- 没有设备编号 --> |
| | | <span v-if="pageType === 0" class="info-text">未绑定设备</span> |
| | | <span v-if="pageType === pageTypeEnum.NOT_INIT" class="info-text">未绑定设备</span> |
| | | <template v-else> |
| | | <!-- 设备号 --> |
| | | <span class="info-text">{{ |
| | | bedsideAuxiliaryScreenStore.deviceData.devicdeNo |
| | | }}</span> |
| | | <!-- 加载中 --> |
| | | <span v-if="pageType === 1" class="info-text" |
| | | <span v-if="pageType === pageTypeEnum.LOADING" class="info-text" |
| | | >页面初始化中,请耐心等待!</span |
| | | > |
| | | <!-- 未排班 --> |
| | | <span v-else-if="pageType === 2" class="info-text">当前尚未排班</span> |
| | | <span v-else-if="pageType === pageTypeEnum.UNPLANNED_SCHEDULE" 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 |
| | | {{ patientInfo.patForm }}:{{ patientInfo.patFormNumber }}</span |
| | | > |
| | | <span v-if="pageType === pageTypeEnum.DURING_DIALYSIS && patientInfo.dialysisAge" class="info-text"> |
| | | 透析龄: {{ patientInfo.dialysisAge?.years }}年{{ patientInfo.dialysisAge?.months }}月 |
| | | </span> |
| | | </template> |
| | | {{ taskCountdown }} |
| | | </template> |
| | |
| | | import userImg from "../../../../img/user.png"; |
| | | |
| | | import { useBedsideAuxiliaryScreenStore } from "@/store/bedsideAuxiliaryScreen"; |
| | | import { EPatForm } from "@/store/type/bedsideAuxiliaryScreen.type"; |
| | | import { EPatForm, EPageType } from "@/store/type/bedsideAuxiliaryScreen.type"; |
| | | import { ElMessage } from "element-plus"; |
| | | |
| | | const bedsideAuxiliaryScreenStore = useBedsideAuxiliaryScreenStore(); |
| | | |
| | | let timer: number; |
| | | |
| | | const pageTypeEnum = ref(EPageType); |
| | | const settingDeviceDialogRef = ref<any>(null); |
| | | const scheduledTaskDialogRef = ref<any>(null); |
| | | const taskCountdown = ref(""); // 定时任务倒计时文本 |
| | |
| | | ? "门诊号" |
| | | : "住院号", |
| | | patFormNumber: bedsideAuxiliaryScreenStore.deviceData.patFormNumber, |
| | | dialysisAge: bedsideAuxiliaryScreenStore.deviceData.underTreatment.dialysisAge ? convertMonths(bedsideAuxiliaryScreenStore.deviceData.underTreatment.dialysisAge) : null , |
| | | }; |
| | | }); |
| | | |
| | |
| | | // { deep: true } |
| | | // ); |
| | | |
| | | const convertMonths = (months: number): { years: number; months: number } => { |
| | | const years = Math.floor(months / 12); |
| | | const remainingMonths = months % 12; |
| | | return { years, months: remainingMonths }; |
| | | } |
| | | |
| | | const openSettingDeviceDialog = () => { |
| | | settingDeviceDialogRef.value?.openDialog(); |
| | | }; |