From 12eff60b5a37fc0d924e68fd75f7482daa60a287 Mon Sep 17 00:00:00 2001
From: zhangchen <1652267879@qq.com>
Date: 星期六, 06 九月 2025 16:33:51 +0800
Subject: [PATCH] Merge branch 'ID1975-副屏自动更新' into test

---
 src/views/mobile/bedsideAuxiliaryScreen/components/Header.vue |   22 +++++++++++++++++-----
 1 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/src/views/mobile/bedsideAuxiliaryScreen/components/Header.vue b/src/views/mobile/bedsideAuxiliaryScreen/components/Header.vue
index da82b86..cb20147 100644
--- a/src/views/mobile/bedsideAuxiliaryScreen/components/Header.vue
+++ b/src/views/mobile/bedsideAuxiliaryScreen/components/Header.vue
@@ -23,7 +23,8 @@
         <!-- 有排班 -->
         <template v-else>
           <span class="info-text">{{ patientInfo.patientName }}</span>
-          <span class="info-text">{{ patientInfo.age }}岁</span>
+          <span v-if="isShowBirthDate" class="info-text">{{ patientInfo.birthDate }}</span>
+          <span v-else 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
@@ -73,6 +74,8 @@
   <ScheduledTaskDialog ref="scheduledTaskDialogRef" />
   <!-- 定时任务提醒组件 -->
   <TaskAlert ref="taskAlertRef" @close="taskAlaetClose" />
+  <!-- 用户登录组件 -->
+  <LoginDialog ref="loginDialogRef" />
 </template>
 
 <script lang="ts" setup name="Header">
@@ -93,6 +96,7 @@
   () => import("./ScheduledTask.vue")
 );
 const TaskAlert = defineAsyncComponent(() => import("./TaskAlart.vue"));
+const LoginDialog = defineAsyncComponent(() => import('./Login/index.vue'));
 
 import atRegularTimeImg from "../../../../img/dingshi.png";
 import setUpImg from "../../../../img/shezhi.png";
@@ -111,6 +115,7 @@
 const settingDeviceDialogRef = ref<any>(null);
 const scheduledTaskDialogRef = ref<any>(null);
 const taskAlertRef = ref<any>(null);
+const loginDialogRef = ref<any>(null);
 
 const countdown = ref(null); // 定时任务的倒计时
 const isTaskAlartIsOpen = ref(false); // 定时任务的提醒弹框是否显示
@@ -138,7 +143,12 @@
           bedsideAuxiliaryScreenStore.deviceData.underTreatment.dialysisAge
         )
       : null,
+    birthDate: bedsideAuxiliaryScreenStore.deviceData.患者出生日期,
   };
+});
+
+const isShowBirthDate = computed(() => {
+  return bedsideAuxiliaryScreenStore.deviceData.customConfiguration.是否显示患者出生年月日 === 1;
 });
 
 const formattedCountdown = computed(() => {
@@ -228,10 +238,12 @@
 };
 
 const openLoginDialog = () => {
-  ElMessage({
-    message: "功能开发中,敬请期待!",
-    type: "warning",
-  });
+  if (
+    !bedsideAuxiliaryScreenStore.deviceCode ||
+    !bedsideAuxiliaryScreenStore.deviceData.deviceCode
+  )
+    return ElMessage.warning("未初始化或正在进行初始化操作中");
+    loginDialogRef.value.openDialog();
 };
 
 onUnmounted(() => {

--
Gitblit v1.8.0