From 38d289b5d8d43927f93102093b06ef814fd0e928 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=B3=E7=BE=BD?= <关羽@gentronhealth.com> Date: Wed, 13 May 2026 19:15:16 +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 使用 append-to-body 将浮层渲染到 body 下,而 prescriptionlist 组件 使用 v-if="showChargeDialog" 控制渲染。当 closeChargeDialog() 通过 nextTick 将 showChargeDialog 置为 false 时,Vue 立即销毁组件,但 append-to-body 的 popover DOM 元素因关闭过渡动画尚未完成而残留在 body 下。 修复: 1. 移除 prescriptionlist 上的 v-if="showChargeDialog",让组件保持挂载状态 (外层 el-dialog 的 v-model 已控制可见性,v-if 冗余) 2. closeChargeDialog() 同步关闭弹窗并清空数据,不再使用 nextTick 延迟 Co-Authored-By: Claude Opus 4.7 --- openhis-ui-vue3/src/views/surgicalschedule/index.vue | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/openhis-ui-vue3/src/views/surgicalschedule/index.vue b/openhis-ui-vue3/src/views/surgicalschedule/index.vue index 800061088..c8f2f6640 100755 --- a/openhis-ui-vue3/src/views/surgicalschedule/index.vue +++ b/openhis-ui-vue3/src/views/surgicalschedule/index.vue @@ -829,7 +829,7 @@
-
@@ -1434,12 +1434,10 @@ function closeChargeDialog() { if (prescriptionRef.value && prescriptionRef.value.closeAllPopovers) { prescriptionRef.value.closeAllPopovers() } - // 等 Vue 完成 DOM 更新后再关闭弹窗,确保 popover 先消失 - nextTick(() => { - showChargeDialog.value = false - chargePatientInfo.value = {} - chargeSurgeryInfo.value = {} - }) + // 清空数据,避免下次打开时使用缓存 + showChargeDialog.value = false + chargePatientInfo.value = {} + chargeSurgeryInfo.value = {} } // 🔧 新增:标志位,用于区分是"打开"还是"刷新"