diff --git a/openhis-ui-vue3/src/views/clinicmanagement/bargain/component/adviceBaseList.vue b/openhis-ui-vue3/src/views/clinicmanagement/bargain/component/adviceBaseList.vue index f539c535..ad9802dc 100755 --- a/openhis-ui-vue3/src/views/clinicmanagement/bargain/component/adviceBaseList.vue +++ b/openhis-ui-vue3/src/views/clinicmanagement/bargain/component/adviceBaseList.vue @@ -69,13 +69,14 @@ const throttledGetList = throttle( watch( () => props.adviceQueryParams, (newValue) => { - // 只有在弹窗打开时才响应 adviceQueryParams 的变化,避免选择项目后弹窗关闭时触发不必要的请求 - if (!props.popoverVisible) { - return; - } + // 始终同步参数到 queryParams,避免弹窗打开时使用旧参数 queryParams.value.searchKey = newValue?.searchKey; queryParams.value.adviceType = newValue?.adviceType; queryParams.value.categoryCode = newValue?.categoryCode; + // 只有在弹窗打开时才触发 API 请求 + if (!props.popoverVisible) { + return; + } throttledGetList(); }, { deep: true }