From 375108fa05db87c2fde62932bea9bae828fce20b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E4=BA=91?= <赵云@gentronhealth.com> Date: Tue, 12 May 2026 18:39:04 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20Bug=20#455:=20=E9=97=A8=E8=AF=8A=E5=8C=BB?= =?UTF-8?q?=E7=94=9F=E7=AB=99-=E5=8C=BB=E5=98=B1=EF=BC=9A=E5=BC=80?= =?UTF-8?q?=E7=AB=8B=E8=AF=8A=E7=96=97=E5=8C=BB=E5=98=B1=E6=97=B6=E6=89=A7?= =?UTF-8?q?=E8=A1=8C=E7=A7=91=E5=AE=A4=E9=BB=98=E8=AE=A4=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E6=9C=89=E8=AF=AF=E4=B8=94=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E4=B8=BA=E5=8E=9F=E5=A7=8BID?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根因修复: 1. 默认科室逻辑错误:row.orgId来自wor_activity_definition.org_id(项目所属科室),不是执行科室。 改为优先使用positionId(adm_organization_location配置的执行科室),回退到患者就诊科室。 2. 显示为原始ID:getOrgList()为异步调用但未await,导致findOrgNameById执行时organization树未加载。 将setValue改为async函数并await getOrgList(),确保科室名称解析时数据已就绪。 Co-Authored-By: Claude Opus 4.7 --- .../components/prescription/prescriptionlist.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/openhis-ui-vue3/src/views/doctorstation/components/prescription/prescriptionlist.vue b/openhis-ui-vue3/src/views/doctorstation/components/prescription/prescriptionlist.vue index 2c4cabc2..a7bf93c3 100755 --- a/openhis-ui-vue3/src/views/doctorstation/components/prescription/prescriptionlist.vue +++ b/openhis-ui-vue3/src/views/doctorstation/components/prescription/prescriptionlist.vue @@ -3346,7 +3346,7 @@ function syncGroupFields(row) { } } -function setValue(row) { +async function setValue(row) { unitCodeList.value = []; unitCodeList.value.push({ value: row.unitCode, label: row.unitCode_dictText, type: 'unit' }); @@ -3398,8 +3398,8 @@ function setValue(row) { showPopover: false, // 确保查询框关闭 }; console.log('[BugFix] setValue - prescriptionList[rowIndex].adviceType_dictText:', prescriptionList.value[rowIndex.value].adviceType_dictText); - // 🔧 修复执行科室逻辑:优先使用项目维护的所属科室(row.orgId),其次使用positionId,最后回退到患者科室 - prescriptionList.value[rowIndex.value].orgId = row.orgId || row.positionId || props.patientInfo?.orgId; + // 🔧 Bug #455: 执行科室默认逻辑:使用positionId(诊疗执行科室配置) → 患者就诊科室,不再使用row.orgId(项目所属科室) + prescriptionList.value[rowIndex.value].orgId = row.positionId || props.patientInfo?.orgId; prescriptionList.value[rowIndex.value].dose = row.dose || row.doseQuantity; prescriptionList.value[rowIndex.value].quantity = row.quantity || 1; prescriptionList.value[rowIndex.value].unitCodeList = unitCodeList.value; @@ -3518,7 +3518,7 @@ function setValue(row) { prescriptionList.value[rowIndex.value].positionId = finalLocationId; } } else { - getOrgList(); + await getOrgList(); // 会诊类型(adviceType == 5)和诊疗类型(adviceType == 3)的处理 if (row.adviceType == 5) { // 会诊类型:设置默认值