From 1b6f52907db06b44972c95dc805abbfff68e7ce2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=B3=E7=BE=BD?= <关羽@gentronhealth.com> Date: Wed, 13 May 2026 00:15:28 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20Bug=20#492:=20=E3=80=90=E9=97=A8=E8=AF=8A?= =?UTF-8?q?=E6=89=8B=E6=9C=AF=E5=AE=89=E6=8E=92=E3=80=91=E5=85=B3=E9=97=AD?= =?UTF-8?q?"=E6=89=8B=E6=9C=AF=E8=AE=A1=E8=B4=B9"=E4=B8=BB=E5=BC=B9?= =?UTF-8?q?=E7=AA=97=E5=90=8E=EF=BC=8C=E9=A1=B9=E7=9B=AE=E5=AD=97=E5=85=B8?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E5=88=97=E8=A1=A8=E4=BE=9D=E7=84=B6=E6=AE=8B?= =?UTF-8?q?=E7=95=99=E6=82=AC=E6=B5=AE=E5=9C=A8=E7=95=8C=E9=9D=A2=E4=B8=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根因:el-popover 使用 :visible 受控模式,closeAllPopovers() 将 showPopover 设为 false 后,Vue 尚未完成 DOM 更新时 showChargeDialog 已被设为 false,导致弹窗组件被销毁 而 popover 的 visible 状态变更未传播到 DOM,弹窗消失但 popover 残留。 修复:在 closeChargeDialog 中使用 nextTick 等待 Vue 完成 popover 关闭的 DOM 更新后, 再设置 showChargeDialog = false 关闭主弹窗。 Co-Authored-By: Claude Opus 4.7 --- openhis-ui-vue3/src/views/surgicalschedule/index.vue | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/openhis-ui-vue3/src/views/surgicalschedule/index.vue b/openhis-ui-vue3/src/views/surgicalschedule/index.vue index c2cb39e3e..fc71b67a0 100755 --- a/openhis-ui-vue3/src/views/surgicalschedule/index.vue +++ b/openhis-ui-vue3/src/views/surgicalschedule/index.vue @@ -1416,9 +1416,12 @@ function closeChargeDialog() { if (prescriptionRef.value && prescriptionRef.value.closeAllPopovers) { prescriptionRef.value.closeAllPopovers() } - showChargeDialog.value = false - chargePatientInfo.value = {} - chargeSurgeryInfo.value = {} + // 等 Vue 完成 DOM 更新后再关闭弹窗,确保 popover 先消失 + nextTick(() => { + showChargeDialog.value = false + chargePatientInfo.value = {} + chargeSurgeryInfo.value = {} + }) } // 🔧 新增:标志位,用于区分是"打开"还是"刷新"