From 57951f7940d28783823d5fc31c8712a234b93fcc Mon Sep 17 00:00:00 2001 From: sinohqb Date: Tue, 18 Aug 2026 10:35:51 +0800 Subject: [PATCH] fix(intelligent-eval): task queue pagination + column widths align with eval list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 任务队列页对齐评估列表: - 分页:始终显示(pageSize 10 + showSizeChanger + showTotal),此前仅在 >10 条时显示导致 t480(8 条)无分页器 - 列宽重新分配:评估列 230→300(长名称不截断)、原因列固定 240(ellipsis)、 入队/完成时间 170、队列状态 100、优先级 80 - 字体格式对齐评估列表:去掉 size="middle" 改用默认(与评估列表一致) tsc 0 错误 vitest 16 passed --- .../intelligent_eval/TaskQueueMonitor.tsx | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/frontend/web/src/components/intelligent_eval/TaskQueueMonitor.tsx b/frontend/web/src/components/intelligent_eval/TaskQueueMonitor.tsx index 6169926..f4fa073 100644 --- a/frontend/web/src/components/intelligent_eval/TaskQueueMonitor.tsx +++ b/frontend/web/src/components/intelligent_eval/TaskQueueMonitor.tsx @@ -67,11 +67,11 @@ export default function TaskQueueMonitor() { const columns: ColumnsType = [ { - title: '入队时间', dataIndex: 'created_at', key: 'created_at', width: 165, + title: '入队时间', dataIndex: 'created_at', key: 'created_at', width: 170, render: (v: string | null) => (v ? formatDateTime(v) : '—'), }, { - title: '评估', key: 'eval', width: 230, ellipsis: true, + title: '评估', key: 'eval', width: 300, ellipsis: true, render: (_, t) => ( {t.eval_name ?? t.eval_id.slice(0, 8)} @@ -84,22 +84,22 @@ export default function TaskQueueMonitor() { ), }, { - title: '队列状态', dataIndex: 'status', key: 'status', width: 96, + title: '队列状态', dataIndex: 'status', key: 'status', width: 100, render: (s: TaskQueueStatus) => { const meta = STATUS_META[s] return {meta.label} }, }, { - title: '优先级', dataIndex: 'priority', key: 'priority', width: 76, + title: '优先级', dataIndex: 'priority', key: 'priority', width: 80, render: (p: number) => {p}, }, { - title: '原因', dataIndex: 'reason', key: 'reason', ellipsis: true, + title: '原因', dataIndex: 'reason', key: 'reason', width: 240, ellipsis: true, render: (r: string) => {r}, }, { - title: '完成时间', dataIndex: 'completed_at', key: 'completed_at', width: 165, + title: '完成时间', dataIndex: 'completed_at', key: 'completed_at', width: 170, render: (v: string | null, t) => { if (t.status === 'failed' && t.error) { return 失败 @@ -131,11 +131,15 @@ export default function TaskQueueMonitor() {
10 ? { pageSize: 10, showTotal: (t) => `共 ${t} 条` } : false} + pagination={{ + pageSize: 10, + showSizeChanger: true, + pageSizeOptions: [10, 20, 50], + showTotal: (t) => `共 ${t} 条`, + }} locale={{ emptyText: }} />