From 01ee694a3bb8048372fc793a8de314d70b688b35 Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期日, 18 十月 2026 22:36:21 +0800
Subject: [PATCH] 修改了工位
---
src/views/ecg/doctor/components/QueuePanel.vue | 277 ++++++++++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 260 insertions(+), 17 deletions(-)
diff --git a/src/views/ecg/doctor/components/QueuePanel.vue b/src/views/ecg/doctor/components/QueuePanel.vue
index 6f82075..5598be0 100644
--- a/src/views/ecg/doctor/components/QueuePanel.vue
+++ b/src/views/ecg/doctor/components/QueuePanel.vue
@@ -2,53 +2,296 @@
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";
+import { useRoomStore } from '@/store/modules/room'
defineComponent({
name: 'QueuePanel'
})
+const emit = defineEmits(['event_RecallFinish', 'event_PullWaiting', 'event_HurryUp']) // 瀹氫箟 success 浜嬩欢锛岀敤浜庢搷浣滄垚鍔熷悗鐨勫洖璋�
const message = useMessage() // 娑堟伅寮圭獥
const props = defineProps({
queue: {
type: Array as PropType<QueueVO[]>,
required: true
- }
- /*,
- modelValue: {
- type: Object as PropType<RoomVO>,
+ },
+ room: {
+ type: Object as PropType<RoomBedVO>,
required: true
+ },
+ /**
+ * 銆愭湰璇婂鏈垎閰嶃�戞湰宸ヤ綅妫�鏌ョ被鍨嬩笅銆�**杩樻病鍒嗛厤宸ヤ綅**鐨�"鎺掗槦涓�"鎮h�呫��
+ * 鍊欒瘖鍒楄〃鐪嬩笉鍒颁粬浠紙鍒楄〃鎸� room_id+bed_no 鏌ワ級锛屼絾澶у睆鑳界湅鍒� 鈥斺�� 鍖荤敓鍙湪姝ゆ墜宸ャ�屾媺鍏ャ�嶃��
+ */
+ waitingList: {
+ type: Array as PropType<QueueVO[]>,
+ default: () => []
+ },
+ /**
+ * 銆愯嚜鍔╄瘖鏂��"鏈�杩戜竴娆″彇鏁�"鐨勮鏄庯紝渚嬪 `鏈�杩戝彇鏁� 12:03:45 杩斿洖 0 鏉銆�
+ * 绌哄垪琛ㄦ椂鏄剧ず锛氭椂闂翠笉鍒锋柊=杞娌″湪璺戯紱杩斿洖 0 鏉�=鍚庣纭疄娌℃暟鎹��
+ */
+ fetchInfo: {
+ type: String,
+ default: ''
}
-*/
})
+
+/** 銆愪富/鍥磋銆戝綋鍓嶆槸鍚﹀彲鎿嶄綔锛歠alse 琛ㄧず姝e湪鍥磋鍒汉鐨勫伐浣嶏紙鍒楄〃鏄埆浜虹殑闃熷垪锛� */
+const roomStore = useRoomStore()
+const canOperate = computed(() => roomStore.getCanOperate)
+
+/** 鎷夊叆鎺掗槦涓殑鎮h�咃紙鐖堕〉闈㈣礋璐h皟鎺ュ彛銆佸埛鏂板垪琛級 */
+const pullWaiting = (item: any) => {
+ emit('event_PullWaiting', item)
+}
+
+/** 绔嬪嵆琛ヤ汉锛堢埗椤甸潰璐熻矗璋冩帴鍙e苟鎶�"缁撹"灞曠ず鍑烘潵锛� */
+const hurryUp = () => {
+ emit('event_HurryUp')
+}
const recall = async (item) => {
const patientVO: PatientVO = {
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) 鈥斺�� 缁胯壊 锛氭甯哥瓑寰咃紙20=鍑嗗涓紝鍘�"鍊欒瘖涓�"锛�
+ * 路 鍏朵粬 鈥斺�� 鐏拌壊 锛氭帓闃熶腑/浜插拰/宸查鐢�/瀹夎涓瓑
+ *
+ * 涔嬫墍浠ヤ笉鍙潬 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">
+ <!--
+ 绌哄垪琛ㄦ彁绀猴紙鏈鏂板锛夛細鎶�"杩欎唤鍒楄〃灞炰簬鍝釜宸ヤ綅銆佹垜鏄粈涔堣韩浠�"鐩存帴鍐欏嚭鏉ャ��
+ 鐜板満鍑虹幇杩�"鎮h�呭垪琛ㄦ槸绌虹殑"锛屽厜鐪嬬┖鍒楄〃鏃犳硶鍒ゆ柇鏄帓闃熺湡鐨勬病浜恒�佽繕鏄湅閿欎簡宸ヤ綅
+ 锛堝洿瑙傚埆浜虹殑宸ヤ綅 / 鎹簡宸ヤ綅浣嗘偅鑰呰繕鍦ㄥ師宸ヤ綅锛夈��
+ -->
+ <div v-if="!queue || queue.length === 0" class="queue-empty">
+ <div class="queue-empty__title">鏆傛棤鍊欒瘖鎮h��</div>
+ <div class="queue-empty__meta">
+ 褰撳墠鍒楄〃锛歿{ room?.roomName || '鈥�' }} 路 {{ room?.bedNo || '鈥�' }}
+ <template v-if="!canOperate">锛�<b>鍥磋妯″紡 路 鍙</b>锛岃繖鏄粬浜哄伐浣嶇殑闃熷垪锛�</template>
+ <template v-else>锛堟垜鐨勫伐浣嶏級</template>
+ </div>
+ <!-- 鑷姪璇婃柇锛氫竴鐪肩湅鍑�"杞娌¤窇"锛堟椂闂翠笉鍔級杩樻槸"鍚庣杩斿洖 0 鏉�" -->
+ <div v-if="fetchInfo" class="queue-empty__meta">{{ fetchInfo }}</div>
+ <!--
+ 鍊欒瘖鍖轰负绌烘椂鐨勮嚜鏁戝叆鍙o細
+ 绯荤粺**鍙湁鍦ㄣ�愬紑璇娿�戠姸鎬併�佷笖鏈伐浣嶆病寮�銆愬仠姝㈠�欒瘖銆戙�佷笖鍊欒瘖浜烘暟鏈揪涓婇檺**鏃舵墠浼氳嚜鍔ㄨˉ浜猴紱
+ 鐐硅繖閲岀珛鍒昏Е鍙戜竴娆″苟鐩存帴鍛婅瘔浣犺鍝亾闂ㄩ椄鎸′綇浜嗭紙鍚庣杩斿洖"缁撹"锛夈��
+ -->
+ <div class="queue-empty__meta">
+ 绯荤粺鍙湪銆愬紑璇娿�戙�佹湰宸ヤ綅鏈紑銆愬仠姝㈠�欒瘖銆戙�佷笖鍊欒瘖浜烘暟鏈揪涓婇檺鏃舵墠浼氳嚜鍔ㄨˉ浜猴紱
+ <template v-if="canOperate">
+ <el-button link type="primary" @click="hurryUp">绔嬪嵆琛ヤ汉锛堝苟鏌ョ湅鍘熷洜锛�</el-button>
+ </template>
+ </div>
+ </div>
+ <div
+ v-for="(item, index) in queue"
+ :key="index"
+ class="queue-row"
+ :class="rowClass(item)"
+ >
+ <!--
+ 鎺掗槦鍙凤紙鏈渶姹傦級锛氱粺涓�鏄剧ず銆屾鏌ラ」鐩墠缂� + seq_num銆嶏紝涓嶅啀鏄剧ず bookSeqNum銆�
+ 鍓嶇紑鏉ヨ嚜 check_type.seq_prefix 鈥斺�� 鍙风幇鍦ㄦ槸**鎸夋鏌ラ」鐩悇鑷紪鍙�**锛屼笉鍚屾鏌ラ」鐩箣闂�
+ 浼氬嚭鐜扮浉鍚屾暟瀛楋紝蹇呴』闈犲墠缂�鍖哄垎锛堜緥锛欰12 / 12锛夈��
+ 鍔犳��(jump_flag=1)鍦ㄥ彿鍓嶉潰鍔犵孩鑹层�屾�ャ�嶅瓧锛屽尰鐢熶竴鐪煎彲瑙併��
+ -->
+ <span class="col-seq">
+ <span v-if="Number(item.jumpFlag) === 1" class="jump-badge">鎬�</span>
+ {{ getCheckTypeSeqPrefix(item.bookCheckType) }}{{ item.seqNum }}
+ </span>
+ <span class="col-name"> {{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>
+
+ <!--
+ 銆愭湰璇婂鏈垎閰嶃�戞湰宸ヤ綅妫�鏌ョ被鍨嬩笅銆佽繕娌″垎閰嶅伐浣嶇殑"鎺掗槦涓�"鎮h�呫��
+ 涓轰粈涔堥渶瑕侊細鍊欒瘖鍒楄〃鎸� room_id + bed_no 鏌ワ紝鍙惈"宸插垎娴佸埌鏈伐浣�"鐨勪汉锛�
+ 鑰�"鎺掗槦涓�(10)"鐨勪汉 bed_no 鏄┖鐨� 鈥斺�� 澶у睆鑳界湅鍒颁粬浠紝宸ヤ綔鍙板師鍏堢湅涓嶅埌锛�
+ 鍖荤敓浼氫互涓�"鎮h�呭垪琛ㄦ病鍙栧埌鏁版嵁"銆傝繖閲屽垪鍑烘潵锛屽伐浣嶄富浜哄彲涓�閿�屾媺鍏ャ�嶃��
+ -->
+ <div v-if="waitingList && waitingList.length > 0" class="room-waiting">
+ <div class="room-waiting__title">
+ 鏈瘖瀹ゆ帓闃熶腑锛堟湭鍒嗛厤宸ヤ綅锛墈{ waitingList.length }} 浜�
+ </div>
+ <div v-for="(item, index) in waitingList" :key="'w' + index" class="room-waiting__row">
+ <span class="col-seq">
+ <span v-if="Number(item.jumpFlag) === 1" class="jump-badge">鎬�</span>
+ {{ getCheckTypeSeqPrefix(item.bookCheckType) }}{{ item.seqNum }}
+ </span>
+ <span class="col-name"> {{ item.patName }} </span>
+ {{ getCheckTypeName(item.bookCheckType) }}
+ <template v-if="canOperate">
+ <el-button size="small" type="primary" plain @click="pullWaiting(item)"> 鎷夊叆 </el-button>
+ </template>
+ <span v-else class="room-waiting__readonly">锛堝彧璇伙級</span>
+ </div>
+ </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-empty {
+ padding: 18px 8px;
+ text-align: center;
+
+ &__title {
+ font-size: 15px;
+ color: var(--el-text-color-secondary);
+ }
+
+ &__meta {
+ margin-top: 6px;
+ font-size: 13px;
+ line-height: 1.6;
+ color: var(--el-text-color-placeholder);
+ }
+}
+
+/*
+ 銆屾湰璇婂鎺掗槦涓紙鏈垎閰嶅伐浣嶏級銆嶅垎鍖猴紙鏈鏂板锛夛細
+ 涓庝笂闈㈢殑鍊欒瘖鍒楄〃鐢ㄤ竴鏉℃祬鑹插垎闅旂嚎 + 灏忔爣棰樺尯鍒嗗紑锛岃瑙変笂鏄庣‘"杩欎簺浜鸿繕娌¤繘鏈伐浣�"銆�
+*/
+.room-waiting {
+ margin-top: 10px;
+ padding-top: 8px;
+ border-top: 1px dashed var(--el-border-color);
+
+ &__title {
+ margin-bottom: 4px;
+ font-size: 13px;
+ font-weight: 600;
+ color: var(--el-color-primary);
+ }
+
+ &__row {
+ padding: 3px 6px;
+ margin-bottom: 3px;
+ color: var(--el-text-color-regular);
+ }
+
+ &__readonly {
+ font-size: 12px;
+ color: var(--el-text-color-placeholder);
+ }
+}
+
+/*
+ 琛屾牱寮忥紙鏈闇�姹傦級锛�
+ 路 鍘绘帀鏁磋鑳屾櫙鑹诧紝涔熷幓鎺夎棣栭偅鏉� 4px 鑹叉潯 鈥斺�� 鐘舵�佸彧闈�**鏂囧瓧棰滆壊**鍖哄垎锛�
+ 路 鍥犳杩欓噷鍙繚鐣欓棿璺�/鍦嗚锛岄鑹茶鍒欏叏閮ㄤ笅娌夊埌涓嬮潰鐨� .row-* 閲屻��
+*/
+.queue-row {
+ padding: 3px 6px;
+ margin-bottom: 3px;
+ border-radius: 3px;
+ line-height: 22px;
+ background-color: transparent;
+}
+
+/* 灏辫瘖涓細钃濊壊锛堜富鑹诧級鈥斺�� 褰撳墠姝e湪澶勭悊鐨勬偅鑰� */
+.row-onstage {
+ color: var(--el-color-primary);
+
+ .col-name {
+ font-weight: 700;
+ }
+}
+
+/* 杩囧彿锛氱孩鑹� 鈥斺�� 闇�鎻愰啋鍖荤敓娉ㄦ剰 */
+.row-passed {
+ color: var(--el-color-danger);
+
+ .col-name {
+ font-weight: 600;
+ }
+}
+
+/* 鍑嗗涓�(鍘�"鍊欒瘖涓�") / 宸插彫鍥烇細缁胯壊 鈥斺�� 姝e父绛夊緟 */
+.row-ready {
+ color: var(--el-color-success);
+}
+
+/* 鍏朵粬鐘舵�侊細鐏拌壊锛屽急鍖栨樉绀� */
+.row-other {
+ color: var(--el-text-color-secondary);
+}
+
+.col-seq,
+.col-name {
+ display: inline-block;
+}
+/* 鍙� + 鍓嶇紑 + 鍙兘鐨勩�屾�ャ�嶆爣璁帮紝缁欒冻瀹藉害閬垮厤涓庡鍚嶆尋鍦ㄤ竴璧� */
+.col-seq {
+ width: 78px;
+}
+.col-name {
+ width: 70px;
+}
+
+/* 鍔犳�ユ爣璁帮細绾㈠簳鐧藉瓧锛岀揣璐村湪鎺掗槦鍙峰墠闈� */
+.jump-badge {
+ display: inline-block;
+ padding: 0 3px;
+ margin-right: 2px;
+ border-radius: 2px;
+ background-color: var(--el-color-danger);
+ color: #fff;
+ font-size: 11px;
+ line-height: 15px;
+ vertical-align: 1px;
+}
</style>
--
Gitblit v1.9.3