diff --git a/openhis-ui-vue3/src/views/inpatientDoctor/home/components/adviceBaseList.vue b/openhis-ui-vue3/src/views/inpatientDoctor/home/components/adviceBaseList.vue index 3802ebda..c447ddfa 100755 --- a/openhis-ui-vue3/src/views/inpatientDoctor/home/components/adviceBaseList.vue +++ b/openhis-ui-vue3/src/views/inpatientDoctor/home/components/adviceBaseList.vue @@ -86,14 +86,14 @@ const tableColumns = computed(() => [ * @param searchKey 搜索关键词 */ function refresh(adviceType: any, categoryCode: string, searchKey: string) { - // 有搜索词时跨类型搜索,避免用户输入"级护理"但因当前adviceType为药品而搜不到诊疗类护理项目 - if (searchKey) { + // 有搜索词时跨类型搜索,或adviceType为空时也跨类型搜索(新行未选类型时默认搜全部),避免用户输入"级护理"但因当前adviceType为药品而搜不到诊疗类护理项目 + if (searchKey || adviceType === undefined || adviceType === '') { queryParams.value.adviceTypes = '1,2,3,6'; + queryParams.value.categoryCode = ''; } else { - queryParams.value.adviceTypes = - adviceType !== undefined && adviceType !== '' ? String(adviceType) : '1,2,3,6'; + queryParams.value.adviceTypes = String(adviceType); + queryParams.value.categoryCode = categoryCode || ''; } - queryParams.value.categoryCode = categoryCode || ''; queryParams.value.searchKey = searchKey || ''; getList(); }