refactor(chat-input): 简化任务搜索逻辑

移除项目 ID 筛选条件,统一使用 scope: 'all_project' 搜索所有项目的任务。
This commit is contained in:
kuaifan 2026-01-16 01:23:59 +08:00
parent c8c27e808f
commit 70be6619e9

View File

@ -2586,16 +2586,14 @@ export default {
if (this.taskSearchKey !== searchKey) { if (this.taskSearchKey !== searchKey) {
return; return;
} }
const projectId = this.getProjectId();
const data = (await this.$store.dispatch("call", { const data = (await this.$store.dispatch("call", {
url: 'project/task/lists', url: 'project/task/lists',
data: { data: {
keys: { keys: {
name: searchKey, name: searchKey,
}, },
project_id: projectId > 0 ? projectId : undefined,
parent_id: -1, parent_id: -1,
scope: projectId > 0 ? undefined : 'all_project', scope: 'all_project',
pagesize: 50, pagesize: 50,
}, },
}).catch(_ => {}))?.data; }).catch(_ => {}))?.data;