91 分诊排队管理-》门诊医生站:【完诊】患者队列状态的变化

This commit is contained in:
Ranyunqiao
2026-04-02 15:23:42 +08:00
parent 08085403b3
commit 4ef9aa07d2
4 changed files with 203 additions and 8 deletions

View File

@@ -140,6 +140,12 @@ function handleReceive(row) {
// }
receiveEncounter(row.encounterId).then(() => {
emits('toCurrent', row);
}).catch(error => {
// 如果接诊失败,检查是否是"已接诊"的错误
if (error && error.message && error.message.includes('已接诊')) {
// 自动刷新列表,移除已接诊的患者
getPatientList();
}
});
}

View File

@@ -168,7 +168,7 @@
<div class="overlay" :class="{ 'overlay-disabled': disabled }" v-if="disabled"></div>
</div>
</div>
<el-drawer v-model="drawer" title="患者队列" direction="ltr" @open="handleOpen">
<el-drawer v-model="drawer" title="患者队列" direction="ltr" @open="handleOpen" @closed="handleDrawerClosed">
<PatientList ref="patientDrawerRef" @toCurrent="handleReceive" />
</el-drawer>
<RefundListDialog :open="openRefundListDialog" :encounterId="currentEncounterId"
@@ -562,6 +562,13 @@ function handleOpen() {
patientDrawerRef.value.refreshList();
}
function handleDrawerClosed() {
// 关闭患者队列抽屉时,刷新现诊患者列表和待诊患者数量
// 这样可以确保如果有其他医生接诊了患者,当前医生能看到最新状态
getPatientList();
getWaitPatient();
}
function handleCardClick(item, index) {
console.log('handleCardClick 被调用');
console.log('点击的患者项目:', item);
@@ -709,6 +716,12 @@ async function handleFinish(encounterId) {
firstEnum.value = 1; // 重置为初诊
getPatientList();
}
}).catch(error => {
// 如果完诊失败,检查是否是"已完成"的错误
if (error && error.message && (error.message.includes('已完成') || error.message.includes('完诊'))) {
// 自动刷新现诊患者列表
getPatientList();
}
});
}