Fix Bug #453: 住院医生站-临床医嘱:开立医嘱时输入"级护理"检索结果显示"暂无数据"
根因:新行未选医嘱类型时,adviceType为undefined,handleFocus回退为默认值1(药品) 并携带categoryCode='2'(西药),导致searchKey为空时仅搜索西药库,护理项目被过滤 修复:refresh函数新增adviceType为空时的跨类型搜索分支,同时清空categoryCode 避免按药品分类过滤导致诊疗类护理项目被排除 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -86,14 +86,14 @@ const tableColumns = computed<TableColumn[]>(() => [
|
|||||||
* @param searchKey 搜索关键词
|
* @param searchKey 搜索关键词
|
||||||
*/
|
*/
|
||||||
function refresh(adviceType: any, categoryCode: string, searchKey: string) {
|
function refresh(adviceType: any, categoryCode: string, searchKey: string) {
|
||||||
// 有搜索词时跨类型搜索,避免用户输入"级护理"但因当前adviceType为药品而搜不到诊疗类护理项目
|
// 有搜索词时跨类型搜索,或adviceType为空时也跨类型搜索(新行未选类型时默认搜全部),避免用户输入"级护理"但因当前adviceType为药品而搜不到诊疗类护理项目
|
||||||
if (searchKey) {
|
if (searchKey || adviceType === undefined || adviceType === '') {
|
||||||
queryParams.value.adviceTypes = '1,2,3,6';
|
queryParams.value.adviceTypes = '1,2,3,6';
|
||||||
|
queryParams.value.categoryCode = '';
|
||||||
} else {
|
} else {
|
||||||
queryParams.value.adviceTypes =
|
queryParams.value.adviceTypes = String(adviceType);
|
||||||
adviceType !== undefined && adviceType !== '' ? String(adviceType) : '1,2,3,6';
|
queryParams.value.categoryCode = categoryCode || '';
|
||||||
}
|
}
|
||||||
queryParams.value.categoryCode = categoryCode || '';
|
|
||||||
queryParams.value.searchKey = searchKey || '';
|
queryParams.value.searchKey = searchKey || '';
|
||||||
getList();
|
getList();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user