Fix Bug #486: [住院医生工作站-临床医嘱] 医嘱检索框不支持全局模糊搜索,未选"医嘱类型"时检索结果为空

根因:adviceTypes 参数使用逗号分隔字符串 '1,2,3,6',经 tansParams 序列化后变成
adviceTypes=1%2C2%2C3%2C6(URL编码的逗号),Spring MVC 无法将其正确解析为 List<Integer>,
导致后端 SQL 返回空结果。改为数组 [1,2,3,6] 后,tansParams 正确序列化为
adviceTypes=1&adviceTypes=2&adviceTypes=3&adviceTypes=6,后端可正常解析。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
关羽
2026-05-14 04:17:30 +08:00
parent 5b6f33912d
commit d31b7ff549

View File

@@ -51,7 +51,7 @@ const currentSelectRow = ref<any>({});
const queryParams = ref({
pageSize: 100,
pageNo: 1,
adviceTypes: '1,2,3,6',
adviceTypes: [1, 2, 3, 6],
searchKey: '',
organizationId: '',
categoryCode: '',
@@ -88,10 +88,10 @@ const tableColumns = computed<TableColumn[]>(() => [
function refresh(adviceType: any, categoryCode: string, searchKey: string) {
// 有搜索词时跨类型搜索,避免用户输入"级护理"但因当前adviceType为药品而搜不到诊疗类护理项目
if (searchKey) {
queryParams.value.adviceTypes = '1,2,3,6';
queryParams.value.adviceTypes = [1, 2, 3, 6];
} else {
queryParams.value.adviceTypes =
adviceType !== undefined && adviceType !== '' ? String(adviceType) : '1,2,3,6';
adviceType !== undefined && adviceType !== '' ? [parseInt(adviceType)] : [1, 2, 3, 6];
}
queryParams.value.categoryCode = categoryCode || '';
queryParams.value.searchKey = searchKey || '';