From 0907bb19f406f185ceb94513b98e43e465a306e2 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 13 Jan 2026 13:48:26 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=83=A8=E9=97=A8?= =?UTF-8?q?=E8=B4=9F=E8=B4=A3=E4=BA=BA=E5=88=87=E6=8D=A2=E6=8E=A5=E5=8D=95?= =?UTF-8?q?=E9=83=A8=E9=97=A8=E8=A7=86=E8=A7=92=E5=90=8E=EF=BC=8C=E6=B5=81?= =?UTF-8?q?=E6=B0=B4=E7=BA=BF=E4=BB=BB=E5=8A=A1=E4=B8=BB=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E4=B9=9F=E8=83=BD=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/TaskHall.vue | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/frontend/src/views/TaskHall.vue b/frontend/src/views/TaskHall.vue index d5401e9..ef44511 100644 --- a/frontend/src/views/TaskHall.vue +++ b/frontend/src/views/TaskHall.vue @@ -4082,21 +4082,25 @@ const loadInProgressTasks = async () => { console.log('子任务处理后,allTasks长度:', allTasks.length, 'totalCount:', totalCount) } - // 处理主任务(排除流水线任务,因为流水线任务由子任务显示) + // 处理主任务(对于流水线任务,如果主任务状态是in_progress也要显示) if (taskResponse.data && taskResponse.data.records) { console.log('getTasks返回的记录数:', taskResponse.data.records.length) - const normalTasks = taskResponse.data.records - .filter((task: any) => { - console.log('检查任务:', task.title, 'isPipeline:', task.isPipeline) - return task.isPipeline !== 1 - }) // 排除流水线任务 - .map((task: any) => ({ - ...task, - isSubTask: false - })) - console.log('过滤后的主任务数:', normalTasks.length) - allTasks = [...allTasks, ...normalTasks] - totalCount += normalTasks.length + const tasksWithInProgress = taskResponse.data.records.filter((task: any) => { + console.log('检查任务:', task.title, 'isPipeline:', task.isPipeline, 'status:', task.status) + // 对于流水线任务,如果主任务状态是in_progress,也要显示(因为可能有子任务在进行中) + if (task.isPipeline === 1) { + return task.status === 'in_progress' + } + // 非流水线任务,直接显示 + return true + }) + console.log('过滤后的主任务数:', tasksWithInProgress.length) + const mappedTasks = tasksWithInProgress.map((task: any) => ({ + ...task, + isSubTask: false + })) + allTasks = [...allTasks, ...mappedTasks] + totalCount += mappedTasks.length console.log('主任务处理后,allTasks长度:', allTasks.length, 'totalCount:', totalCount) } } else {