From 936c01060eea0924b88ca5c35d221a972a6aba7d Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期一, 05 十月 2026 10:47:22 +0800
Subject: [PATCH] 检查单列表调整

---
 src/views/ecg/doctor/components/QueuePanel.vue |  134 +++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 117 insertions(+), 17 deletions(-)

diff --git a/src/views/ecg/doctor/components/QueuePanel.vue b/src/views/ecg/doctor/components/QueuePanel.vue
index 6f82075..2562362 100644
--- a/src/views/ecg/doctor/components/QueuePanel.vue
+++ b/src/views/ecg/doctor/components/QueuePanel.vue
@@ -2,11 +2,14 @@
 import {defineComponent, PropType} from "vue";
 import { QueueVO } from '@/api/ecg/queue'
 import {DICT_TYPE} from "@/utils/dict";
-import {PatientVO, DoctorApi} from "@/api/ecg/doctor";
+import {PatientVO, DoctorApi, RoomBedVO} from "@/api/ecg/doctor";
+import {getCheckTypeName, getCheckTypeSeqPrefix} from "../../../../utils/checkTypeFormatter";
 
 defineComponent({
   name: 'QueuePanel'
 })
+
+const emit = defineEmits(['event_RecallFinish']) // 瀹氫箟 success 浜嬩欢锛岀敤浜庢搷浣滄垚鍔熷悗鐨勫洖璋�
 
 const message = useMessage() // 娑堟伅寮圭獥
 
@@ -14,13 +17,11 @@
   queue: {
     type: Array as PropType<QueueVO[]>,
     required: true
-  }
-  /*,
-  modelValue: {
-    type: Object as PropType<RoomVO>,
+  },
+  room: {
+    type: Object as PropType<RoomBedVO>,
     required: true
   }
-*/
 })
 
 const recall = async (item) => {
@@ -28,27 +29,126 @@
     roomId: item.roomId,
     bedNo: item.bedNo,
     patId: item.patId,
-    jumpFlag: 0
+    checkType: item.bookCheckType,
+    //jumpFlag: 0,
+    roomId_operator: props.room.roomId,
+    bedNo_operator: props.room.bedNo,
   }
 
-  const data = await DoctorApi.recallPatient(patientVO);
+  let data = ""
+  if (item.status === 5) // 甯歌銆侀鐢� 杩囧彿
+    data = await DoctorApi.recallPatient(patientVO);
+  else if (item.status === 7)
+    data = await DoctorApi.recallInstallPatient(patientVO);
+
+  emit("event_RecallFinish") // 鍙洖瀹屾垚
   message.info(data)
 }
 
+/**
+ * 闇�姹傦細鍙充晶鎮h�呭垪琛ㄨ鎶娿�屽氨璇婁腑 / 宸茶繃鍙� / 鍊欒瘖涓�嶇敤涓嶅悓棰滆壊鍖哄垎锛屾柟渚垮尰鐢熻瘑鍒��
+ *
+ * 棰滆壊鏂规锛堝乏渚ц壊鏉� + 娴呰壊搴� + 宸︿晶绔栫嚎锛夛細
+ *   路 灏辫瘖涓�(30)      鈥斺�� 钃濊壊锛堜富鑹诧級  锛氭鍦ㄧ湅鐨勬偅鑰咃紝鏈�閱掔洰
+ *   路 宸茶繃鍙�(3/5)     鈥斺�� 绾㈣壊          锛氶渶瑕佸叧娉紙鍙兘宸查敊杩囧彨鍙凤級
+ *   路 鍊欒瘖涓�(20/15)   鈥斺�� 缁胯壊          锛氭甯哥瓑寰�
+ *   路 鍏朵粬            鈥斺�� 鐏拌壊          锛氭帓闃熶腑/浜插拰/宸查鐢�/瀹夎涓瓑
+ *
+ * 涔嬫墍浠ヤ笉鍙潬 dict-tag 鐨勬枃瀛楋細鍖荤敓鎵竴鐪煎垪琛ㄦ椂瑕佽兘**蹇�熷畾浣�**褰撳墠灏辫瘖鑰呬笌杩囧彿鑰咃紝
+ * 棰滆壊姣旀枃瀛楁洿蹇��
+ */
+const rowClass = (item: any): string => {
+  const st = Number(item?.status)
+  if (st === 30) return 'row-onstage'            // 灏辫瘖涓�
+  if (st === 3 || st === 5) return 'row-passed'  // 宸茶繃鍙凤紙鍚�"宸茶繃鍙�-鎺掗槦"锛�
+  if (st === 20 || st === 15) return 'row-ready' // 鍊欒瘖涓� / 宸插彫鍥�
+  return 'row-other'
+}
 </script>
 
 <template>
-<div v-for="(item, index) in queue" :key="index">
-  {{item.patName}}{{item.passed === 0 ? "":"*"}}
-  <dict-tag :type="DICT_TYPE.SYSTEM_USER_SEX" :value="item.patGender" />
-  {{item.roomName}}
-  {{item.bedNo}}
-  <dict-tag :type="DICT_TYPE.ECG_CHECK_TYPE" :value="item.bookCheckType" />
-  <dict-tag :type="DICT_TYPE.ECG_QUEUE_STATUS" :value="item.status" />
-  <el-button v-if="item.status === 5" @click="recall(item)"> 鍙洖 </el-button>
+<div class="queue-list">
+  <div
+    v-for="(item, index) in queue"
+    :key="index"
+    class="queue-row"
+    :class="rowClass(item)"
+  >
+    <span class="col-seq"> {{item.seqNum}} </span>
+    <span class="col-bookseq"> {{getCheckTypeSeqPrefix(item.bookCheckType)}}{{item.bookSeqNum}} </span>
+    <span class="col-name"> &nbsp; {{item.patName}}{{item.passed === 0 ? "":"*"}} </span>
+    <dict-tag :type="DICT_TYPE.SYSTEM_USER_SEX" :value="item.patGender" />
+    {{getCheckTypeName(item.bookCheckType)}}
+    <dict-tag :type="DICT_TYPE.ECG_QUEUE_STATUS" :value="item.status" />
+    <el-button v-if="item.status === 5 || item.status === 7" size="small" @click="recall(item)"> 鍙洖 </el-button>
+  </div>
 </div>
 </template>
 
-<style scoped lang="scss">
 
+<style scoped lang="scss">
+/* 娉ㄦ剰锛氬師鍏堝啓鐨勬槸鍏ㄥ眬 `div { padding-left: 5px; padding-bottom: 5px; }`锛�
+   scoped 鍙姞灞炴�ч�夋嫨鍣ㄣ�佷粛浼氬懡涓湰缁勪欢鍐�**鎵�鏈�** div锛堝惈 dict-tag/el-button 鍐呴儴锛夛紝
+   杩欓噷鏀逛负鍙綔鐢ㄤ簬鏈垪琛ㄧ殑琛屽厓绱犮�� */
+.queue-list {
+  padding-left: 5px;
+}
+
+.queue-row {
+  padding: 3px 6px;
+  margin-bottom: 3px;
+  border-left: 4px solid transparent;
+  border-radius: 3px;
+  line-height: 22px;
+}
+
+/* 灏辫瘖涓細钃濊壊锛堜富鑹诧級鈥斺�� 褰撳墠姝e湪澶勭悊鐨勬偅鑰� */
+.row-onstage {
+  background-color: var(--el-color-primary-light-8);
+  border-left-color: var(--el-color-primary);
+
+  .col-name {
+    font-weight: 700;
+    color: var(--el-color-primary);
+  }
+}
+
+/* 宸茶繃鍙凤細绾㈣壊 鈥斺�� 闇�鎻愰啋鍖荤敓娉ㄦ剰 */
+.row-passed {
+  background-color: var(--el-color-danger-light-8);
+  border-left-color: var(--el-color-danger);
+
+  .col-name {
+    font-weight: 600;
+    color: var(--el-color-danger);
+  }
+}
+
+/* 鍊欒瘖涓� / 宸插彫鍥烇細缁胯壊 鈥斺�� 姝e父绛夊緟 */
+.row-ready {
+  background-color: var(--el-color-success-light-8);
+  border-left-color: var(--el-color-success);
+}
+
+/* 鍏朵粬鐘舵�侊細鐏拌壊锛屽急鍖栨樉绀� */
+.row-other {
+  background-color: var(--el-fill-color-light);
+  border-left-color: var(--el-border-color);
+  color: var(--el-text-color-secondary);
+}
+
+.col-seq,
+.col-bookseq,
+.col-name {
+  display: inline-block;
+}
+.col-seq {
+  width: 30px;
+}
+.col-bookseq {
+  width: 40px;
+}
+.col-name {
+  width: 70px;
+}
 </style>

--
Gitblit v1.9.3