fix(frontend): 组合回测基准下拉 + 新建回测改名个股回测(消除歧义) [nas]
CI/CD / test (push) Successful in 14s
CI/CD / nas-deploy (push) Successful in 27s
CI/CD / nas-verify (push) Successful in 9s

This commit is contained in:
2026-08-12 23:32:15 +08:00
parent 29b663acfc
commit 93bd251cc9
3 changed files with 13 additions and 5 deletions
+3 -3
View File
@@ -22,7 +22,7 @@ const PAGE_TITLE: Array<{ match: RegExp; group: string; title: string }> = [
{ match: /^\/strategy\/edit\//, group: '策略', title: '编辑策略' },
{ match: /^\/strategy$/, group: '策略', title: '策略库' },
{ match: /^\/account$/, group: '账户', title: '账户管理' },
{ match: /^\/backtest\/new$/, group: '回测', title: '新建回测' },
{ match: /^\/backtest\/new$/, group: '回测', title: '个股回测' },
{ match: /^\/backtest\/portfolio$/, group: '回测', title: '组合回测' },
{ match: /^\/backtest\/optimize$/, group: '回测', title: '参数优化' },
{ match: /^\/backtest\/history$/, group: '回测', title: '历史任务' },
@@ -61,7 +61,7 @@ const CMD_ITEMS: CmdItem[] = [
{ label: '新建策略', group: '策略', path: '/strategy/new' },
{ label: '策略代码编辑', group: '策略', path: '/strategy/code' },
{ label: '账户管理', group: '账户', path: '/account' },
{ label: '新建回测', group: '回测', path: '/backtest/new' },
{ label: '个股回测', group: '回测', path: '/backtest/new' },
{ label: '组合回测', group: '回测', path: '/backtest/portfolio' },
{ label: '参数优化', group: '回测', path: '/backtest/optimize' },
{ label: '历史任务', group: '回测', path: '/backtest/history' },
@@ -161,7 +161,7 @@ function onLogout(): void {
</el-sub-menu>
<el-sub-menu index="backtest">
<template #title><span class="nav-label">回测</span></template>
<el-menu-item index="/backtest/new">新建回测</el-menu-item>
<el-menu-item index="/backtest/new">个股回测</el-menu-item>
<el-menu-item index="/backtest/portfolio">组合回测</el-menu-item>
<el-menu-item index="/backtest/optimize">参数优化</el-menu-item>
<el-menu-item index="/backtest/history">历史任务</el-menu-item>
+1 -1
View File
@@ -164,7 +164,7 @@ async function onSubmit(): Promise<void> {
<div class="page bt-new">
<div class="page-head">
<div>
<h2 class="page-title">新建回测</h2>
<h2 class="page-title">个股回测</h2>
<p class="page-subtitle">CTA 策略历史回测 · 选择策略与标的提交后进入进度跟踪</p>
</div>
</div>
@@ -47,6 +47,12 @@ const strategyOptions = [
{ label: '价值精选', value: 'value_selection' },
{ label: '小市值轮动', value: 'small_cap' },
]
const BENCHMARK_OPTIONS = [
{ label: '沪深300', value: '000300.XSHG' },
{ label: '中证500', value: '000905.XSHG' },
{ label: '中证1000', value: '000852.XSHG' },
{ label: '中证2000', value: '932000.XSHG' },
]
const strategyLabel = computed(
() => strategyOptions.find((o) => o.value === form.strategy)?.label ?? form.strategy,
@@ -232,7 +238,9 @@ async function onSubmit(): Promise<void> {
<span class="muted form-hint"></span>
</el-form-item>
<el-form-item label="基准">
<el-input v-model="form.benchmark" style="width: 220px" />
<el-select v-model="form.benchmark" style="width: 220px">
<el-option v-for="b in BENCHMARK_OPTIONS" :key="b.value" :label="b.label" :value="b.value" />
</el-select>
</el-form-item>
</el-form>
<div class="submit-bar">