From f4225db7311cb761bc8c47e99816540712b6eb39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8D=80=E5=BD=A7?= <荀彧@gentronhealth.com> Date: Thu, 14 May 2026 05:05:50 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20Bug=20#500:=20=E3=80=90=E9=97=A8=E8=AF=8A?= =?UTF-8?q?=E5=8C=BB=E7=94=9F=E7=AB=99=E3=80=91=E6=A3=80=E6=9F=A5=E7=94=B3?= =?UTF-8?q?=E8=AF=B7=E5=8F=B3=E4=BE=A7"=E6=A3=80=E6=9F=A5=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E5=88=86=E7=B1=BB"=E5=88=87=E6=8D=A2=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E7=95=8C=E9=9D=A2=E5=87=BA=E7=8E=B0=E6=98=8E=E6=98=BE?= =?UTF-8?q?=E6=8A=96=E5=8A=A8/=E9=97=AA=E7=83=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 移除了 handleCollapseChange 中的 isAnimating 防抖锁。该锁会阻塞后续点击的 handleCollapseChange 回调执行, 导致快速切换分类时 currentActiveCategory 未被更新,过期 API 响应可能覆盖数据,以及 accordion 状态与业务逻辑不同步。 改为始终更新 currentActiveCategory 守卫,真正依靠 handleCategoryExpand 中的过期请求忽略机制来防止数据闪烁。 Co-Authored-By: Claude Opus 4.7 --- .../components/examination/examinationApplication.vue | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/openhis-ui-vue3/src/views/doctorstation/components/examination/examinationApplication.vue b/openhis-ui-vue3/src/views/doctorstation/components/examination/examinationApplication.vue index 1a4e4e410..d0e52ccc3 100755 --- a/openhis-ui-vue3/src/views/doctorstation/components/examination/examinationApplication.vue +++ b/openhis-ui-vue3/src/views/doctorstation/components/examination/examinationApplication.vue @@ -684,7 +684,6 @@ const dictSearchKey = ref(''); const activeNames = ref(''); // 当前展开的折叠项 const categoryLoadingSet = ref(new Set()); // Bug #500: 正在加载方法的分类集合 const currentActiveCategory = ref(null); // Bug #500: 记录当前激活的分类,忽略过期请求响应 -const isAnimating = ref(false); // Bug #500: 防止快速切换时折叠动画重叠导致抖动 const allMethods = ref([]); @@ -837,14 +836,9 @@ async function handleCategoryExpand(cat) { categoryLoadingSet.value.delete(cat.typeId); } } -// Bug #500修复: 添加防抖逻辑,快速切换时跳过中间状态的动画,避免高度跳变和白屏闪烁 +// Bug #500修复: 不阻塞 accordion 状态更新,仅防止重复加载同一分类的方法 function handleCollapseChange(activeName) { - if (isAnimating.value) return; // 动画进行中,忽略后续点击 - - isAnimating.value = true; - setTimeout(() => { isAnimating.value = false; }, 300); // 与 CSS 过渡时长一致 - - // Bug #500修复: 记录当前激活的分类,用于 handleCategoryExpand 中忽略过期请求 + // 始终记录当前激活的分类,确保 handleCategoryExpand 能正确忽略过期请求 currentActiveCategory.value = activeName || null; if (activeName) {