fix(history): optimize 任务查看跳 optimize-result 页(此前跳 CTA result 致指标全空)
Dashboard/History 的 open() 只区分 factor,optimize 任务也跳 /backtest/result/, 但优化任务无单一 metrics/equity → 指标卡片全显示 —。改为按 type 分流到 /backtest/optimize-result/(同 Progress.vue 已有逻辑)。
This commit is contained in:
@@ -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<string, string> = { cta: '回测', optimize: '优化', factor: '因子' }
|
||||
|
||||
@@ -76,6 +76,7 @@ async function load(): Promise<void> {
|
||||
|
||||
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}`)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user