From 90948b4a207e4c4f3bcec0966c5065e48744dc4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E4=BA=91?= <赵云@gentronhealth.com> Date: Sun, 17 May 2026 16:00:12 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20Bug=20#502:=20=E3=80=90=E4=BD=8F=E9=99=A2?= =?UTF-8?q?=E6=8A=A4=E5=A3=AB=E7=AB=99-=E6=B1=87=E6=80=BB=E5=8F=91?= =?UTF-8?q?=E8=8D=AF=E7=94=B3=E8=AF=B7=E3=80=91=E9=A1=B6=E9=83=A8=E5=8C=BB?= =?UTF-8?q?=E5=98=B1=E7=B1=BB=E5=9E=8B=EF=BC=88=E9=95=BF=E6=9C=9F/?= =?UTF-8?q?=E4=B8=B4=E6=97=B6=EF=BC=89=E8=BF=87=E6=BB=A4=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E6=97=A0=E5=93=8D=E5=BA=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根因:子组件未 watch 父组件传递的 therapyEnum prop 变化, 导致父组件调用 handleGetPrescription 时,子组件可能仍使用旧的 prop 值。 修复:在 prescriptionList.vue 和 summaryMedicineList.vue 中增加 watch 监听 props.therapyEnum 变化,自动触发 handleGetPrescription 刷新列表。 Co-Authored-By: Claude Opus 4.7 --- .../drugDistribution/components/prescriptionList.vue | 7 ++++++- .../drugDistribution/components/summaryMedicineList.vue | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/openhis-ui-vue3/src/views/inpatientNurse/drugDistribution/components/prescriptionList.vue b/openhis-ui-vue3/src/views/inpatientNurse/drugDistribution/components/prescriptionList.vue index f9a392a67..5e21c4406 100755 --- a/openhis-ui-vue3/src/views/inpatientNurse/drugDistribution/components/prescriptionList.vue +++ b/openhis-ui-vue3/src/views/inpatientNurse/drugDistribution/components/prescriptionList.vue @@ -166,7 +166,7 @@ import {getPrescriptionList, medicineSummary} from './api'; import {patientInfoList} from '../../components/store/patient.js'; import {formatDateStr} from '@/utils/index'; -import {getCurrentInstance, ref} from 'vue'; +import {getCurrentInstance, ref, watch} from 'vue'; import useUserStore from '@/store/modules/user'; const activeNames = ref([]); @@ -273,6 +273,11 @@ function handleGetPrescription() { } } +// 监听医嘱类型筛选条件变化,自动刷新列表 +watch(() => props.therapyEnum, () => { + handleGetPrescription(); +}); + function handleMedicineSummary() { let paramList = getSelectRows(); if (!paramList || paramList.length === 0) { diff --git a/openhis-ui-vue3/src/views/inpatientNurse/drugDistribution/components/summaryMedicineList.vue b/openhis-ui-vue3/src/views/inpatientNurse/drugDistribution/components/summaryMedicineList.vue index 2dd6ef207..8b4933a4f 100755 --- a/openhis-ui-vue3/src/views/inpatientNurse/drugDistribution/components/summaryMedicineList.vue +++ b/openhis-ui-vue3/src/views/inpatientNurse/drugDistribution/components/summaryMedicineList.vue @@ -50,7 +50,7 @@