From 23b993600d0d91da8c1689510e071d571ce96af5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8D=80=E5=BD=A7?= <荀彧@gentronhealth.com> Date: Thu, 14 May 2026 10:13:06 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20Bug=20#428:=20=E9=97=A8=E8=AF=8A=E5=8C=BB?= =?UTF-8?q?=E7=94=9F=E7=AB=99-=E6=A3=80=E6=9F=A5=E7=94=B3=E8=AF=B7?= =?UTF-8?q?=EF=BC=9A=E6=9C=AA=E5=AE=9E=E7=8E=B0=E5=88=86=E7=B1=BB=E8=81=94?= =?UTF-8?q?=E5=8A=A8=E6=A3=80=E6=9F=A5=E6=96=B9=E6=B3=95=E5=8F=8A=E5=A5=97?= =?UTF-8?q?=E9=A4=90=E6=98=8E=E7=BB=86=E5=B1=95=E7=A4=BA=E4=B8=8E=E5=8B=BE?= =?UTF-8?q?=E9=80=89=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 分类对象初始化时增加 methods: [],确保 Vue 响应式追踪分类下检查方法的加载 - handleMethodSelect 创建新项目时复制 cat.methods 全部方法数组(原只放单个方法),允许用户在右侧面板切换其他方法 - handleMethodSelect 新增/更新项目时同步 packageName 字段,确保 toggleItemExpand 能通过名称查找并加载套餐明细 Co-Authored-By: Claude Opus 4.7 --- .../components/examination/examinationApplication.vue | 11 +++++++---- 1 file changed, 7 insertions(+), 4 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 d6bf27a3c..a995be998 100755 --- a/openhis-ui-vue3/src/views/doctorstation/components/examination/examinationApplication.vue +++ b/openhis-ui-vue3/src/views/doctorstation/components/examination/examinationApplication.vue @@ -924,7 +924,8 @@ async function loadCategoryList() { categoryName: t.name, // “检查类型管理”里配置的执行科室(图三) performDeptName: t.department || '', - items: [] + items: [], + methods: [] // #428修复: 初始化 methods 数组,确保 Vue 响应式追踪 }); } const unclassified = []; @@ -1267,6 +1268,7 @@ async function handleMethodSelect(checked, method, cat) { if (method.packageId) { existingItem.isPackage = true; existingItem.packageId = method.packageId; + existingItem.packageName = method.packageName || existingItem.packageName; // #428修复: 确保 packageName 同步 // 预加载套餐明细 loadPackageDetailsForItem(existingItem); } @@ -1294,12 +1296,13 @@ async function handleMethodSelect(checked, method, cat) { checkType: cat.typeName, nationalCode: targetItem.nationalCode || '', checked: true, - methods: [method], + methods: cat.methods || [method], // #428修复: 复制分类下全部方法,允许用户切换 selectedMethod: method, expanded: false, - // 从方法中获取套餐信息(优先级高于项目本身的 packageName) + // 从方法或项目中获取套餐信息 isPackage: !!method.packageId || !!targetItem.packageName, - packageId: method.packageId || targetItem.packageId || null + packageId: method.packageId || targetItem.packageId || null, + packageName: method.packageName || targetItem.packageName || null // #428修复: 复制 packageName,确保套餐明细可加载 }; selectedItems.value.push(newItem);