Fix Bug #502: 【住院护士站-汇总发药申请】顶部医嘱类型(长期/临时)过滤按钮点击无响应
根因:汇总视图(SummaryMedicineList)没有ref属性,handleGetPrescription()只调用了prescriptionRefs.value?.handleGetPrescription(),
当isDetails=='2'时PrescriptionList被v-if隐藏,prescriptionRefs.value为null,导致汇总列表不刷新。
修复:1. 给SummaryMedicineList添加ref="summaryMedicineRefs"
2. handleGetPrescription()根据isDetails值调用对应的子组件刷新方法
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -85,7 +85,7 @@
|
||||
:deadline="deadline"
|
||||
:therapyEnum="therapyEnum"
|
||||
/>
|
||||
<SummaryMedicineList v-else :therapyEnum="therapyEnum" />
|
||||
<SummaryMedicineList v-else ref="summaryMedicineRefs" :therapyEnum="therapyEnum" />
|
||||
<!-- <el-tabs v-model="activeName" class="demo-tabs centered-tabs" @tab-change="handleClick">
|
||||
<el-tab-pane
|
||||
v-for="tab in prescriptionTabs"
|
||||
@@ -129,6 +129,7 @@ const therapyEnum = ref(undefined);
|
||||
|
||||
// 存储子组件引用的对象
|
||||
const prescriptionRefs = ref();
|
||||
const summaryMedicineRefs = ref();
|
||||
|
||||
const navigationButtons = inpatientNurseNavs;
|
||||
|
||||
@@ -165,7 +166,11 @@ function handleClick(tabName) {
|
||||
|
||||
function handleGetPrescription() {
|
||||
chooseAll.value = false;
|
||||
prescriptionRefs.value?.handleGetPrescription();
|
||||
if (isDetails.value == '1') {
|
||||
prescriptionRefs.value?.handleGetPrescription();
|
||||
} else {
|
||||
summaryMedicineRefs.value?.handleGetPrescription();
|
||||
}
|
||||
}
|
||||
|
||||
function handelSwicthChange(value) {
|
||||
|
||||
Reference in New Issue
Block a user