feat: 统一列表模糊搜索行为

- 统一管理端和用户中心搜索参数及多字段包含匹配

- 修复聊天搜索竞态并优化部门重名路径展示

- 补充部门展开、模型空白词和聊天查询回归测试
This commit is contained in:
2026-08-13 22:29:59 +08:00
parent 765006747a
commit 64a85c6a5b
83 changed files with 1134 additions and 208 deletions

View File

@@ -38,10 +38,6 @@ const props = defineProps({
title: { type: String, default: '' },
width: { type: String, default: '80%' },
extraQueryParams: { type: Object, default: () => ({}) },
searchParams: {
type: Array as PropType<string[]>,
default: () => [],
},
titleKey: { type: String, default: 'name' },
pageUrl: { type: String, default: '' },
hasParent: { type: Boolean, default: false },
@@ -183,14 +179,8 @@ const handleSubmitRun = () => {
};
const handleSearch = (query: string) => {
const tempParams = {} as Record<string, string>;
props.searchParams.forEach((paramName) => {
tempParams[paramName] = query;
});
pageDataRef.value?.setQuery({
isQueryOr: true,
...tempParams,
keyword: query.trim() || undefined,
});
};
</script>

View File

@@ -76,9 +76,15 @@ const emitButtonEvent = (payload) => {
};
const handleSearch = () => {
searchValue.value = searchValue.value.trim();
emit('search', searchValue.value);
};
const handleClear = () => {
searchValue.value = '';
emit('search', '');
};
const handleReset = () => {
searchValue.value = '';
emit('reset');
@@ -117,6 +123,7 @@ const handleDropdownClick = (button) => {
:placeholder="searchPlaceholder"
class="search-input"
clearable
@clear="handleClear"
@keyup.enter="handleSearch"
>
<template #prefix>