From e25465c223a2e63422acfb58414597ca8fc4df09 Mon Sep 17 00:00:00 2001
From: WXL <wl_5969728@163.com>
Date: 星期四, 13 十一月 2025 18:01:55 +0800
Subject: [PATCH] 排队异常、小屏适配问题

---
 src/views/ecg/appointment/CheckItemPanel.vue |  301 ++++++++++++++++++++++++++++++++-----------------
 public/integration.html                      |    4 
 public/ConsultationRoom.html                 |   39 +++--
 3 files changed, 220 insertions(+), 124 deletions(-)

diff --git a/public/ConsultationRoom.html b/public/ConsultationRoom.html
index 55fc719..433072d 100644
--- a/public/ConsultationRoom.html
+++ b/public/ConsultationRoom.html
@@ -184,28 +184,31 @@
       width: 80px;
       font-weight: bold;
       color: #5b8cff;
-      font-size: 0.95rem;
+      font-size: 1.5rem;
+      font-weight: 600;
       overflow: hidden;
       text-overflow: ellipsis;
     }
 
     .patient-name {
       width: 100px;
-      font-size: 0.95rem;
+      font-size: 1.2rem;
+      font-weight: 600;
       overflow: hidden;
       text-overflow: ellipsis;
     }
 
     .patient-check-type {
       flex: 1;
-      font-size: 0.95rem;
+      font-size: 1.2rem;
+      font-weight: 600;
       overflow: hidden;
       text-overflow: ellipsis;
     }
 
     .patient-status {
       width: 70px;
-      font-size: 0.8rem;
+      font-size: 1.2rem;
       font-weight: bold;
       text-align: center;
       padding: 3px 8px;
@@ -350,7 +353,7 @@
       }
 
       .clinic-info {
-        font-size: 0.8rem;
+        font-size: 1.2rem;
       }
 
       .panel {
@@ -358,7 +361,8 @@
       }
 
       .panel-header {
-        font-size: 0.9rem;
+        font-size: 1.6rem;
+        font-weight: 700;
         padding: 6px 10px;
       }
 
@@ -369,12 +373,12 @@
       .patient-number,
       .patient-name {
         width: 60px;
-        font-size: 0.9rem;
+        font-size: 1.2rem;
       }
 
       .patient-status {
         width: 60px;
-        font-size: 0.7rem;
+        font-size: 1.2rem;
       }
 
       .patient-bed {
@@ -400,17 +404,17 @@
 
 <body>
   <div id="app">
-    <div class="search-bar" style="display: none;">
+    <div class="search-bar" >
       <input class="search-input" type="text" placeholder="璇疯緭鍏ユ埧闂村彿鏌ヨ" id="searchRoomInput">
       <button class="search-btn" id="searchRoomBtn">鏌ヨ</button>
     </div>
 
-    <div class="header" style="display: none;">
-      <div class="clinic-title">蹇冪數鍥捐瘖闂村彨鍙风郴缁�</div>
-      <div class="clinic-info">
+    <div class="header" >
+      <div class="clinic-title" id="titleroomName">蹇冪數鍥捐瘖闂村彨鍙风郴缁�</div>
+      <!-- <div class="clinic-info">
         <div class="room-name" id="roomName">璇婇棿鍔犺浇涓�...</div>
         <div class="screen-type" id="screenType">妯″紡锛氬姞杞戒腑...</div>
-      </div>
+      </div> -->
     </div>
 
     <div class="main-content">
@@ -459,8 +463,8 @@
       roomId: 1,
       timer: null,
       speechSynthesis: window.speechSynthesis || null,
-      apiBaseUrl: 'http://10.0.2.193/admin-api' 
-      // apiBaseUrl: 'http://localhost:48080/admin-api' 
+      // apiBaseUrl: 'http://10.0.2.193/admin-api' 
+      apiBaseUrl: 'http://localhost:48080/admin-api' 
     };
 
     // 椤甸潰鍔犺浇瀹屾垚鍚庡垵濮嬪寲
@@ -509,7 +513,7 @@
               var response = JSON.parse(xhr.responseText);
               appState.roomProfile = response.data || response;
               updateRoomInfo();
-              updateAnnouncement('宸插姞杞� ' + appState.roomProfile.roomName + ' 淇℃伅');
+              updatetitleroomName(appState.roomProfile[0].roomName);
               getList(); // 鑾峰彇璇ユ埧闂寸殑鎮h�呭垪琛�
             } catch (e) {
               updateAnnouncement('瑙f瀽鍝嶅簲鏁版嵁澶辫触');
@@ -657,6 +661,9 @@
     function updateAnnouncement(text) {
       $('#announcementText').text(text);
     }
+    function updatetitleroomName(text) {
+      $('#titleroomName').text(text);
+    }
 
     // 宸ュ叿鍑芥暟
     function nameDesensitize(patName) {
diff --git a/public/integration.html b/public/integration.html
index cc390e6..65cb5b9 100644
--- a/public/integration.html
+++ b/public/integration.html
@@ -295,8 +295,8 @@
       curSpeakPat: null,
       timer: null,
       speechSynthesis: window.speechSynthesis || null,
-      // apiBaseUrl: 'http://localhost:48080/admin-api'
-        apiBaseUrl: 'http://10.0.2.193/admin-api'
+      apiBaseUrl: 'http://localhost:48080/admin-api'
+        // apiBaseUrl: 'http://10.0.2.193/admin-api'
     };
 
     // 椤甸潰鍔犺浇瀹屾垚鍚庡垵濮嬪寲
diff --git a/src/views/ecg/appointment/CheckItemPanel.vue b/src/views/ecg/appointment/CheckItemPanel.vue
index 7b63084..86355cb 100644
--- a/src/views/ecg/appointment/CheckItemPanel.vue
+++ b/src/views/ecg/appointment/CheckItemPanel.vue
@@ -1,15 +1,15 @@
 <script setup lang="ts">
-import {defineComponent, PropType} from "vue";
-import {useCheckTypeStore} from "@/store/modules/checkType";
-import {AppointmentApi, AppointmentVO} from "@/api/ecg/appointment";
-import {formatTimeslot} from "@/utils/formatter";
-import {calculateAge, formatTimestamp, isCurrentDay} from "@/utils/dateUtil";
-import {QueueSequenceApi, QueueSequenceVO} from "@/api/ecg/queuesequence";
-import {formatDate} from "../../../utils/formatTime";
+import { defineComponent, PropType } from 'vue'
+import { useCheckTypeStore } from '@/store/modules/checkType'
+import { AppointmentApi, AppointmentVO } from '@/api/ecg/appointment'
+import { formatTimeslot } from '@/utils/formatter'
+import { calculateAge, formatTimestamp, isCurrentDay } from '@/utils/dateUtil'
+import { QueueSequenceApi, QueueSequenceVO } from '@/api/ecg/queuesequence'
+import { formatDate } from '../../../utils/formatTime'
 import { cloneDeep } from 'lodash-es'
-import {hiprint} from "vue-plugin-hiprint";
-import {calGender, getBookBeginTime} from "@/utils";
-import {getCheckTypeName} from "@/utils/checkTypeFormatter";
+import { hiprint } from 'vue-plugin-hiprint'
+import { calGender, getBookBeginTime } from '@/utils'
+import { getCheckTypeName } from '@/utils/checkTypeFormatter'
 
 defineComponent({
   name: 'CheckItemPanel'
@@ -24,7 +24,7 @@
 
 const emit = defineEmits(['event_appoint_confirm']) // 瀹氫箟 success 浜嬩欢锛岀敤浜庢搷浣滄垚鍔熷悗鐨勫洖璋�
 
-const checkTypeStore = useCheckTypeStore();
+const checkTypeStore = useCheckTypeStore()
 
 const checkTypeTimeslotList = ref<QueueSequenceVO>()
 const bookTimeSlotVip = ref<number>()
@@ -33,159 +33,248 @@
 
 const _confirmAppointment = async () => {
   if (!isCurrentDay(props.appointment.bookDate)) {
-    ElMessageBox.confirm(
-        '闈炲綋澶╅绾﹂」锛岀‘瀹氳浠婂ぉ妫�鏌ュ悧锛�',
-        'Warning',
-        {
-          confirmButtonText: '濂界殑',
-          cancelButtonText: '涓嶇敤',
-          type: 'warning',
+    ElMessageBox.confirm('闈炲綋澶╅绾﹂」锛岀‘瀹氳浠婂ぉ妫�鏌ュ悧锛�', 'Warning', {
+      confirmButtonText: '濂界殑',
+      cancelButtonText: '涓嶇敤',
+      type: 'warning'
+    })
+      .then(async () => {
+        const tempAppointment = cloneDeep(props.appointment)
+        if (undefined !== bookTimeSlotVip.value && null !== bookTimeSlotVip.value) {
+          tempAppointment.bookTimeslot = bookTimeSlotVip.value
         }
-    )
-        .then(async () => {
-          const tempAppointment = cloneDeep(props.appointment)
-          if (undefined !== bookTimeSlotVip.value && null !== bookTimeSlotVip.value) {
-            tempAppointment.bookTimeslot = bookTimeSlotVip.value
-          }
-          const data = await AppointmentApi.confirmAppointmentVip(tempAppointment)
-          bookSeqNum.value = data
-          // 鍙戦�佹搷浣滄垚鍔熺殑浜嬩欢
-          emit('event_appoint_confirm')
-          _printNote()
-          ElNotification({
-            title: '娓╅Θ鎻愮ず',
-            message: data,
-            type: 'info'
-          })
+        const data = await AppointmentApi.confirmAppointmentVip(tempAppointment)
+        bookSeqNum.value = data
+        // 鍙戦�佹搷浣滄垚鍔熺殑浜嬩欢
+        emit('event_appoint_confirm')
+        _printNote()
+        ElNotification({
+          title: '娓╅Θ鎻愮ず',
+          message: data,
+          type: 'info'
         })
-        .catch(() => {
-/*
+      })
+      .catch(() => {
+        /*
           ElNotification({
             title: '娓╅Θ鎻愮ず',
             message: '纭澶辫触',
             type: 'warning'
           })
 */
-        })
-  } else if (undefined !== bookTimeSlotVip.value && null !== bookTimeSlotVip.value && props.appointment.bookTimeslot !== bookTimeSlotVip.value) {
-    ElMessageBox.confirm(
-        '褰撳ぉ棰勭害椤癸紝纭畾瑕佽蛋VIP鍚楋紵',
-        'Warning',
-        {
-          confirmButtonText: '濂界殑',
-          cancelButtonText: '涓嶇敤',
-          type: 'warning',
+      })
+  } else if (
+    undefined !== bookTimeSlotVip.value &&
+    null !== bookTimeSlotVip.value &&
+    props.appointment.bookTimeslot !== bookTimeSlotVip.value
+  ) {
+    ElMessageBox.confirm('褰撳ぉ棰勭害椤癸紝纭畾瑕佽蛋VIP鍚楋紵', 'Warning', {
+      confirmButtonText: '濂界殑',
+      cancelButtonText: '涓嶇敤',
+      type: 'warning'
+    })
+      .then(async () => {
+        const tempAppointment = cloneDeep(props.appointment)
+        if (undefined !== bookTimeSlotVip.value && null !== bookTimeSlotVip.value) {
+          tempAppointment.bookTimeslot = bookTimeSlotVip.value
         }
-    )
-        .then(async () => {
-          const tempAppointment = cloneDeep(props.appointment)
-          if (undefined !== bookTimeSlotVip.value && null !== bookTimeSlotVip.value) {
-            tempAppointment.bookTimeslot = bookTimeSlotVip.value
-          }
-          const data = await AppointmentApi.confirmAppointmentVip(tempAppointment)
-          bookSeqNum.value = data
-          // 鍙戦�佹搷浣滄垚鍔熺殑浜嬩欢
-          emit('event_appoint_confirm')
-          _printNote()
-          ElNotification({
-            title: '娓╅Θ鎻愮ず',
-            message: data,
-            type: 'info'
-          })
+        const data = await AppointmentApi.confirmAppointmentVip(tempAppointment)
+        bookSeqNum.value = data
+        // 鍙戦�佹搷浣滄垚鍔熺殑浜嬩欢
+        emit('event_appoint_confirm')
+        _printNote()
+        ElNotification({
+          title: '娓╅Θ鎻愮ず',
+          message: data,
+          type: 'info'
         })
-        .catch(() => {
-          /*
+      })
+      .catch(() => {
+        /*
                     ElNotification({
                       title: '娓╅Θ鎻愮ず',
                       message: '纭澶辫触',
                       type: 'warning'
                     })
           */
-        })
+      })
   } else {
     const data = await AppointmentApi.confirmAppointment(props.appointment)
     bookSeqNum.value = data
     // 鍙戦�佹搷浣滄垚鍔熺殑浜嬩欢
     emit('event_appoint_confirm')
-    _printNote()
+    // _printNote()
     ElNotification({
       title: '娓╅Θ鎻愮ず',
-      message: data,
-      type: 'info'
+      message: '鎺掗槦鎴愬姛',
+      type: 'success'
     })
   }
 }
 
 const _printNote = async (printMode?: number) => {
-  console.info( props.appointment )
+  console.info(props.appointment)
 
-// 寮曞叆鍚庝娇鐢ㄧず渚�
+  // 寮曞叆鍚庝娇鐢ㄧず渚�
   hiprint.init({
     //    host: 'http://192.168.2.100:17521',
     token: '111111'
-  });
-// 涓嬪垪鏂规硶閮芥槸娌℃湁鎷栨嫿璁捐椤甸潰鐨�, 鐩稿綋浜庝唬鐮佹ā寮�, 浣跨敤浠g爜璁捐椤甸潰
-// 鎯宠瀹炵幇鎷栨嫿璁捐椤甸潰,璇峰線涓嬬湅 '鑷畾涔夎璁�'
-  var hiprintTemplate = new hiprint.PrintTemplate();  // 鍙紶鍙傛暟
+  })
+  // 涓嬪垪鏂规硶閮芥槸娌℃湁鎷栨嫿璁捐椤甸潰鐨�, 鐩稿綋浜庝唬鐮佹ā寮�, 浣跨敤浠g爜璁捐椤甸潰
+  // 鎯宠瀹炵幇鎷栨嫿璁捐椤甸潰,璇峰線涓嬬湅 '鑷畾涔夎璁�'
+  var hiprintTemplate = new hiprint.PrintTemplate() // 鍙紶鍙傛暟
   //var panel = hiprintTemplate.addPrintPanel({ width: 100, height: 130, paperFooter: 340, paperHeader: 10 }); 瀵艰嚧璧颁笁椤�
-  var panel = hiprintTemplate.addPrintPanel({ width: 140, height: 130, paperNumberDisabled:true});
-//鏂囨湰
+  var panel = hiprintTemplate.addPrintPanel({ width: 140, height: 130, paperNumberDisabled: true })
+  //鏂囨湰
   const checkTypeName = getCheckTypeName(props.appointment.bookCheckType)
-  panel.addPrintText({ options: { width: 150, height: 15, top: 2, left: 10, title: checkTypeName, textAlign: 'center', fontSize: 15, fontFamily: '寰蒋闆呴粦',  fontWeight: '700', } });
-  const patientBaisc = props.appointment.patName + "  " + calGender(props.appointment.patGender) + "  " + calculateAge(props.appointment.patBirthday) + "宀�"
-  panel.addPrintText({ options: { width: 150, height: 15, top: 27, left: 10, title: patientBaisc, textAlign: 'center' , fontSize: 15, fontFamily: '寰蒋闆呴粦', fontWeight: '700', } });
-  const ward_bed = props.appointment.patWardDesc + "-" + props.appointment.patBedNo
-  panel.addPrintText({ options: { width: 150, height: 15, top: 52, left: 10, title: ward_bed, textAlign: 'center', fontSize: 15, fontFamily: '寰蒋闆呴粦', fontWeight: '700', } });
-  const bookTime = formatTimestamp(props.appointment.bookDate) + " " + getBookBeginTime(props.appointment.bookTimeslot)
-  panel.addPrintText({ options: { width: 150, height: 15, top: 77, left: 10, title: bookTime, textAlign: 'center', fontSize: 15, fontFamily: '寰蒋闆呴粦', fontWeight: '700', } });
+  panel.addPrintText({
+    options: {
+      width: 150,
+      height: 15,
+      top: 2,
+      left: 10,
+      title: checkTypeName,
+      textAlign: 'center',
+      fontSize: 15,
+      fontFamily: '寰蒋闆呴粦',
+      fontWeight: '700'
+    }
+  })
+  const patientBaisc =
+    props.appointment.patName +
+    '  ' +
+    calGender(props.appointment.patGender) +
+    '  ' +
+    calculateAge(props.appointment.patBirthday) +
+    '宀�'
+  panel.addPrintText({
+    options: {
+      width: 150,
+      height: 15,
+      top: 27,
+      left: 10,
+      title: patientBaisc,
+      textAlign: 'center',
+      fontSize: 15,
+      fontFamily: '寰蒋闆呴粦',
+      fontWeight: '700'
+    }
+  })
+  const ward_bed = props.appointment.patWardDesc + '-' + props.appointment.patBedNo
+  panel.addPrintText({
+    options: {
+      width: 150,
+      height: 15,
+      top: 52,
+      left: 10,
+      title: ward_bed,
+      textAlign: 'center',
+      fontSize: 15,
+      fontFamily: '寰蒋闆呴粦',
+      fontWeight: '700'
+    }
+  })
+  const bookTime =
+    formatTimestamp(props.appointment.bookDate) +
+    ' ' +
+    getBookBeginTime(props.appointment.bookTimeslot)
+  panel.addPrintText({
+    options: {
+      width: 150,
+      height: 15,
+      top: 77,
+      left: 10,
+      title: bookTime,
+      textAlign: 'center',
+      fontSize: 15,
+      fontFamily: '寰蒋闆呴粦',
+      fontWeight: '700'
+    }
+  })
   //panel.addPrintText({ options: { width: 150, height: 12, top: 58, left: 10, title: props.appointment.patId, textAlign: 'center', fontSize: 8 } });
   //panel.addPrintText({ options: { width: 150, height: 12, top: 72, left: 10, title: props.appointment.patMobile, textAlign: 'center', fontSize: 8, fontFamily: '寰蒋闆呴粦',  fontWeight: '700', } });
 
   // 鏉$爜 灏辫瘖娴佹按鍙�
-  panel.addPrintText({ options: { width: 150, height: 22, top: 107, left: 10, title: props.appointment.episodeId, textType: 'barcode' } });
+  panel.addPrintText({
+    options: {
+      width: 150,
+      height: 22,
+      top: 107,
+      left: 10,
+      title: props.appointment.episodeId,
+      textType: 'barcode'
+    }
+  })
 
   // 鍙充晶 Pane 杈撳嚭
-  const _bookSeqNum = bookSeqNum.value??props.appointment?.bookSeqNum
-  panel.addPrintText({ options: { width: 130, height: 20, top: 7, left: 170, title: ''+_bookSeqNum, textAlign: 'center', fontSize: 30, fontFamily: '寰蒋闆呴粦',  fontWeight: '1200' } });
+  const _bookSeqNum = bookSeqNum.value ?? props.appointment?.bookSeqNum
+  panel.addPrintText({
+    options: {
+      width: 130,
+      height: 20,
+      top: 7,
+      left: 170,
+      title: '' + _bookSeqNum,
+      textAlign: 'center',
+      fontSize: 30,
+      fontFamily: '寰蒋闆呴粦',
+      fontWeight: '1200'
+    }
+  })
 
   // 娉ㄦ剰浜嬮」
   const notes = checkTypeStore.getCheckTypeNotes(props.appointment.bookCheckType)
-  panel.addPrintLongText({ options: { width: 130, height: 80, top: 35, left: 170, lineHeight: 15, title: notes, textAlign: 'center', fontSize: 13, fontFamily: '寰蒋闆呴粦',  fontWeight: '700', } });
+  panel.addPrintLongText({
+    options: {
+      width: 130,
+      height: 80,
+      top: 35,
+      left: 170,
+      lineHeight: 15,
+      title: notes,
+      textAlign: 'center',
+      fontSize: 13,
+      fontFamily: '寰蒋闆呴粦',
+      fontWeight: '700'
+    }
+  })
 
-//鎵撳嵃
+  //鎵撳嵃
   if (undefined === printMode)
-    hiprintTemplate.print2([{}]); // 鍙互浼� [瀹氫綅鍙傛暟]  http://https://ccsimple.github.io/sv-print-docs/config/template.html#%E8%87%AA%E5%AE%9A%E4%B9%89%E8%AE%BE%E8%AE%A1%E4%BD%BF%E7%94%A8%E7%A4%BA%E4%BE%8B
-  else
-    hiprintTemplate.print([{}]);
+    hiprintTemplate.print2([{}]) // 鍙互浼� [瀹氫綅鍙傛暟]  http://https://ccsimple.github.io/sv-print-docs/config/template.html#%E8%87%AA%E5%AE%9A%E4%B9%89%E8%AE%BE%E8%AE%A1%E4%BD%BF%E7%94%A8%E7%A4%BA%E4%BE%8B
+  else hiprintTemplate.print([{}])
 }
 
-onMounted( async () => {
+onMounted(async () => {
   const data = await QueueSequenceApi.getTimeslotByCheckType(props.appointment.bookCheckType)
-  console.info( data )
+  console.info(data)
   checkTypeTimeslotList.value = data
 })
-
 </script>
 
 <template>
-  <el-card style="width: 200px" shadow="hover" >
-    <template #header>{{getCheckTypeName(appointment.bookCheckType)}}</template>
-    <div>{{formatDate(appointment.bookDate, 'YYYY-MM-DD')}}</div>
-    <div>{{formatTimeslot(appointment.bookTimeslot)}}</div>
+  <el-card style="width: 200px" shadow="hover">
+    <template #header>{{ getCheckTypeName(appointment.bookCheckType) }}</template>
+    <div>{{ formatDate(appointment.bookDate, 'YYYY-MM-DD') }}</div>
+    <div>{{ formatTimeslot(appointment.bookTimeslot) }}</div>
 
-<!--    <el-select v-if="!isCurrentDay(appointment.bookDate)" v-model="bookTimeSlotVip" placeholder="璇烽�夋嫨棰勭害鏃堕棿娈�">-->
+    <!--    <el-select v-if="!isCurrentDay(appointment.bookDate)" v-model="bookTimeSlotVip" placeholder="璇烽�夋嫨棰勭害鏃堕棿娈�">-->
     <el-select v-model="bookTimeSlotVip" clearable placeholder="璇烽�夋嫨棰勭害鏃堕棿娈�">
       <el-option
-          v-for="item in checkTypeTimeslotList"
-          :key="item.id"
-          :label="formatTimeslot(item.timeSlot)"
-          :value="item.timeSlot"
-          :disabled="item.queueVipNo === item.queueVipFull"
+        v-for="item in checkTypeTimeslotList"
+        :key="item.id"
+        :label="formatTimeslot(item.timeSlot)"
+        :value="item.timeSlot"
+        :disabled="item.queueVipNo === item.queueVipFull"
       />
     </el-select>
-    {{bookSeqNum??appointment.bookSeqNum}}
-    <el-divider/>
-    <el-button @click="_confirmAppointment" :type="isCurrentDay(appointment.bookDate)?'primary':'warning'"><Icon icon="ep:list" class="mr-5px" /> 鎺掗槦 </el-button>
+    {{ bookSeqNum ?? appointment.bookSeqNum }}
+    <el-divider />
+    <el-button
+      @click="_confirmAppointment"
+      :type="isCurrentDay(appointment.bookDate) ? 'primary' : 'warning'"
+      ><Icon icon="ep:list" class="mr-5px" /> 鎺掗槦
+    </el-button>
     <el-button @click="_printNote(8)"><Icon icon="ep:printer" class="mr-5px" /> 鎵撳嵃鍙� </el-button>
   </el-card>
 </template>

--
Gitblit v1.9.3