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 ea7dfba0b..14fa2b0fb 100755 --- a/openhis-ui-vue3/src/views/doctorstation/components/examination/examinationApplication.vue +++ b/openhis-ui-vue3/src/views/doctorstation/components/examination/examinationApplication.vue @@ -730,7 +730,9 @@ function handleCollapseChange(activeName) { setTimeout(() => { isAnimating.value = false; }, 300); // 与 CSS 过渡时长一致 if (activeName) { - const cat = filteredCategoryList.value.find(c => c.typeId == activeName); + // Bug #428修复: 直接从 categoryList(原始响应式数组)查找分类, + // 确保后续 handleCategoryExpand 对 cat.methods 的赋值能正确触发 Vue 响应式更新 + const cat = categoryList.value.find(c => c.typeId == activeName); if (cat && (!cat.methods || cat.methods.length === 0)) { handleCategoryExpand(cat); // 异步加载,不 await } @@ -1149,7 +1151,8 @@ async function handleMethodSelect(checked, method, cat) { // 如果该项目不存在,创建一个并关联方法 if (selectedItems.value.length > 0) { const currentCategory = selectedItems.value[0].checkType; - const newCategory = cat.typeCode || ''; + // Bug #428修复: 使用 cat.typeName 进行比较(与 newItem.checkType 保持一致) + const newCategory = cat.typeName || ''; if (currentCategory !== newCategory) { ElMessage.warning('一个检查单不能同时选择多个项目类型的检查项目'); return; @@ -1234,7 +1237,8 @@ async function handleItemSelect(checked, item, cat) { if (selectedItems.value.length > 0) { const currentCategory = selectedItems.value[0].checkType; - const newCategory = cat.typeCode || ''; + // Bug #428修复: 使用 cat.typeName 进行比较(与 effectiveCheckType 保持一致) + const newCategory = cat.typeName || ''; if (currentCategory !== newCategory) { ElMessage.warning('一个检查单不能同时选择多个项目类型的检查项目'); item.checked = false;