From f4cf35a7d1f5a343b48d37f3c195896293ff5169 Mon Sep 17 00:00:00 2001 From: claude_dev Date: Fri, 17 Jul 2026 16:48:12 +0800 Subject: [PATCH] =?UTF-8?q?fix(history):=20optimize=20=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E8=B7=B3=20optimize-result=20=E9=A1=B5(?= =?UTF-8?q?=E6=AD=A4=E5=89=8D=E8=B7=B3=20CTA=20result=20=E8=87=B4=E6=8C=87?= =?UTF-8?q?=E6=A0=87=E5=85=A8=E7=A9=BA)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Dashboard/History 的 open() 只区分 factor,optimize 任务也跳 /backtest/result/, 但优化任务无单一 metrics/equity → 指标卡片全显示 —。改为按 type 分流到 /backtest/optimize-result/(同 Progress.vue 已有逻辑)。 --- frontend/src/views/Dashboard.vue | 5 ++++- frontend/src/views/backtest/History.vue | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/src/views/Dashboard.vue b/frontend/src/views/Dashboard.vue index 3ced6ca..34b9493 100644 --- a/frontend/src/views/Dashboard.vue +++ b/frontend/src/views/Dashboard.vue @@ -41,7 +41,10 @@ function go(path: string): void { } function open(row: TaskListItem): void { - router.push(row.type === 'factor' ? `/factor/result/${row.task_id}` : `/backtest/result/${row.task_id}`) + const path = row.type === 'factor' ? `/factor/result/${row.task_id}` + : row.type === 'optimize' ? `/backtest/optimize-result/${row.task_id}` + : `/backtest/result/${row.task_id}` + router.push(path) } const typeLabelMap: Record = { cta: '回测', optimize: '优化', factor: '因子' } diff --git a/frontend/src/views/backtest/History.vue b/frontend/src/views/backtest/History.vue index 19de1fa..c5a4c09 100644 --- a/frontend/src/views/backtest/History.vue +++ b/frontend/src/views/backtest/History.vue @@ -76,6 +76,7 @@ async function load(): Promise { function open(row: TaskListItem): void { if (row.type === 'factor') router.push(`/factor/result/${row.task_id}`) + else if (row.type === 'optimize') router.push(`/backtest/optimize-result/${row.task_id}`) else router.push(`/backtest/result/${row.task_id}`) }