From c77c36196fb317cb530d684cd40780fd410d21aa Mon Sep 17 00:00:00 2001
From: zhangchen <1652267879@qq.com>
Date: 星期四, 04 九月 2025 15:12:10 +0800
Subject: [PATCH] Merge branch 'ID1956-已签到页面改版' into test

---
 src/views/mobile/bedsideAuxiliaryScreen/components/Header.vue |   26 ++++++++++++++++++++------
 1 files changed, 20 insertions(+), 6 deletions(-)

diff --git a/src/views/mobile/bedsideAuxiliaryScreen/components/Header.vue b/src/views/mobile/bedsideAuxiliaryScreen/components/Header.vue
index 4df3652..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";
@@ -101,6 +105,7 @@
 import { useBedsideAuxiliaryScreenStore } from "@/store/bedsideAuxiliaryScreen";
 import { EPatForm, EPageType } from "@/store/type/bedsideAuxiliaryScreen.type";
 import { ElMessage } from "element-plus";
+import { maskName } from '@/utils/utils';
 
 const bedsideAuxiliaryScreenStore = useBedsideAuxiliaryScreenStore();
 
@@ -110,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); // 定时任务的提醒弹框是否显示
@@ -118,9 +124,10 @@
   return bedsideAuxiliaryScreenStore.deviceData.pageType;
 });
 
+
 const patientInfo = computed(() => {
   return {
-    patientName: bedsideAuxiliaryScreenStore.deviceData.patientName,
+    patientName: bedsideAuxiliaryScreenStore.deviceData.customConfiguration.患者信息是否加密显示 === 1 ? maskName(bedsideAuxiliaryScreenStore.deviceData.patientName) :  bedsideAuxiliaryScreenStore.deviceData.patientName,
     patientPhone: bedsideAuxiliaryScreenStore.deviceData.patientPhone,
     age: bedsideAuxiliaryScreenStore.deviceData.age,
     gender: bedsideAuxiliaryScreenStore.deviceData.gender,
@@ -136,7 +143,12 @@
           bedsideAuxiliaryScreenStore.deviceData.underTreatment.dialysisAge
         )
       : null,
+    birthDate: bedsideAuxiliaryScreenStore.deviceData.患者出生日期,
   };
+});
+
+const isShowBirthDate = computed(() => {
+  return bedsideAuxiliaryScreenStore.deviceData.customConfiguration.是否显示患者出生年月日 === 1;
 });
 
 const formattedCountdown = computed(() => {
@@ -226,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