From a69fa8a7974397e820732539435a818232b27e33 Mon Sep 17 00:00:00 2001 From: sinohqb Date: Mon, 17 Aug 2026 16:39:53 +0800 Subject: [PATCH] refactor(intelligent-eval): split list page into dedicated pages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 评估列表页此前用 Drawer 嵌套承载详情/报告/任务队列/新建,功能页面过多。 按 keep-alive 多页模式拆为独立页面(静态路由 + intelligentEvalNav store 传递选中): - 评估列表 (/intelligent-evals):只留列表 + 新建;详情/报告/任务队列改为导航 - 任务队列 (/intelligent-evals/tasks):TaskQueueMonitor 独立页,二级菜单项 - 评估详情 (/intelligent-evals/detail):新独立页,页内 Tabs 承载概览/决策过程/ 配置历史/报告(completed 才显示报告 tab),取代 Drawer 嵌套;审批/打回/取消 提到页面头部统一管理 - EvalDetail 拆为纯展示的 EvalOverview;DecisionProcess/ConfigSnapshots/EvalReport 的 onBack 改可选(tab 环境不显示返回按钮) - index.css 加 intelligent-detail-tabs 高度链(绕开 Ant CSS-in-JS 高度覆盖) tsc 0 错误, vitest 19 passed --- frontend/web/src/App.tsx | 6 + .../intelligent_eval/ConfigSnapshots.tsx | 5 +- .../intelligent_eval/DecisionProcess.tsx | 5 +- .../intelligent_eval/EvalDetail.tsx | 267 ------------------ .../intelligent_eval/EvalOverview.tsx | 190 +++++++++++++ .../intelligent_eval/EvalReport.tsx | 5 +- frontend/web/src/index.css | 20 ++ .../web/src/pages/IntelligentEvalDetail.tsx | 193 +++++++++++++ .../web/src/pages/IntelligentEvalTasks.tsx | 23 ++ frontend/web/src/pages/IntelligentEvals.tsx | 80 ++---- frontend/web/src/stores/intelligentEvalNav.ts | 22 ++ 11 files changed, 487 insertions(+), 329 deletions(-) delete mode 100644 frontend/web/src/components/intelligent_eval/EvalDetail.tsx create mode 100644 frontend/web/src/components/intelligent_eval/EvalOverview.tsx create mode 100644 frontend/web/src/pages/IntelligentEvalDetail.tsx create mode 100644 frontend/web/src/pages/IntelligentEvalTasks.tsx create mode 100644 frontend/web/src/stores/intelligentEvalNav.ts diff --git a/frontend/web/src/App.tsx b/frontend/web/src/App.tsx index b868969..b86210a 100644 --- a/frontend/web/src/App.tsx +++ b/frontend/web/src/App.tsx @@ -17,6 +17,7 @@ import { ExperimentOutlined, SettingOutlined, ToolOutlined, + UnorderedListOutlined, } from '@ant-design/icons' import TabBar from './components/TabBar' import LoginPage from './pages/Login' @@ -38,6 +39,8 @@ const OpenClawPage = lazy(() => import('./pages/OpenClaw')) const FilesPage = lazy(() => import('./pages/Files')) const ModelConfigsPage = lazy(() => import('./pages/ModelConfigs')) const IntelligentEvalsPage = lazy(() => import('./pages/IntelligentEvals')) +const IntelligentEvalTasksPage = lazy(() => import('./pages/IntelligentEvalTasks')) +const IntelligentEvalDetailPage = lazy(() => import('./pages/IntelligentEvalDetail')) function PageLoader({ children }: { children: ReactNode }) { return ( @@ -67,6 +70,8 @@ const routeConfigs: RouteConfig[] = [ { path: '/campaigns', name: '评估活动', icon: , component: () => }, { path: '/reports', name: '评测报告', icon: , component: () => }, { path: '/intelligent-evals', name: '智能评估', icon: , component: () => }, + { path: '/intelligent-evals/tasks', name: '任务队列', icon: , component: () => }, + { path: '/intelligent-evals/detail', name: '评估详情', icon: , component: () => }, { path: '/models', name: '模型配置', icon: , component: () => }, { path: '/files', name: '原始文件', icon: , component: () => }, ] @@ -97,6 +102,7 @@ const menuItems: MenuProps['items'] = [ label: '智能评估', children: [ { key: '/intelligent-evals', icon: , label: '评估列表' }, + { key: '/intelligent-evals/tasks', icon: , label: '任务队列' }, ], }, { diff --git a/frontend/web/src/components/intelligent_eval/ConfigSnapshots.tsx b/frontend/web/src/components/intelligent_eval/ConfigSnapshots.tsx index 3adaf7c..aa0b00a 100644 --- a/frontend/web/src/components/intelligent_eval/ConfigSnapshots.tsx +++ b/frontend/web/src/components/intelligent_eval/ConfigSnapshots.tsx @@ -16,7 +16,8 @@ const SNAPSHOT_TYPE_LABELS: Record = { interface ConfigSnapshotsProps { evalId: string - onBack: () => void + /** 独立页内作为子视图 tab 使用时可不传(tab 切换代替返回)。 */ + onBack?: () => void } export default function ConfigSnapshots({ evalId, onBack }: ConfigSnapshotsProps) { @@ -240,7 +241,7 @@ export default function ConfigSnapshots({ evalId, onBack }: ConfigSnapshotsProps return (
- + {onBack && } 配置历史
+ {onBack && } 决策过程