98 门诊管理-》门诊划价:选项增加‘西药’和‘中成药’

This commit is contained in:
Ranyunqiao
2026-04-01 13:14:46 +08:00
parent 1ab9b020c1
commit 9105e687d6
22 changed files with 418 additions and 144 deletions

View File

@@ -53,17 +53,20 @@ const currentSelectRow = ref({});
const queryParams = ref({
pageSize: 100,
pageNum: 1,
adviceType: undefined,
categoryCode: '',
});
const adviceBaseList = ref([]);
// 节流函数
const throttledGetList = throttle(
() => {
// 触发数据加载
getList();
},
300,
{ leading: true, trailing: true }
);
watch(
watch(
() => props.adviceQueryParams,
(newValue) => {
// 只有在弹窗打开时才响应 adviceQueryParams 的变化,避免选择项目后弹窗关闭时触发不必要的请求
@@ -72,6 +75,7 @@ watch(
}
queryParams.value.searchKey = newValue?.searchKey;
queryParams.value.adviceType = newValue?.adviceType;
queryParams.value.categoryCode = newValue?.categoryCode;
throttledGetList();
},
{ deep: true }
@@ -86,6 +90,11 @@ watch(
if (props.adviceQueryParams) {
queryParams.value.searchKey = props.adviceQueryParams.searchKey;
queryParams.value.adviceType = props.adviceQueryParams.adviceType;
queryParams.value.categoryCode = props.adviceQueryParams.categoryCode;
console.log('[adviceBaseList] 弹窗打开,参数:', JSON.stringify({
adviceType: queryParams.value.adviceType,
categoryCode: queryParams.value.categoryCode
}));
}
// 主动触发数据加载
getList();