feat(frontend): P2全平台聚宽级复刻—模拟盘/因子/回测表单页重做+模拟盘列表页

模拟盘模块:
- 新增模拟盘列表页(List.vue):统计行+富表格(名称/模式/频率/收益/最新净值/状态/操作)+搜索筛选
- 后端加 GET /paper 列表端点(类比 GET /task,带最新净值+收益率)
- paper/New 分区富表单(卡式模式选择+频率+撮合时点说明)
- paper/Result 重做(收益/年化/回撤/夏普/波动指标卡+净值曲线+归因表+成交明细,净值客户端算指标)

因子模块:
- factor/Result 重做(最优ICIR/平均IC/显著数指标卡+彩色IC表+tears报告tab化)
- factor/New 重做(因子按类分组多选+标的批量+实时计数)

回测模块:
- backtest/Progress 重做(步骤时间线+进度条+实时日志尾3s刷新)
- backtest/New 重做(策略/参数/标的区间/基准分区富表单)
- backtest/Optimize 重做(结果列头可排序+Top1高亮+按收益默认降序)
- History 迁移scoped chip→全局chips.css(DRY清理)

全局:深色主题统一,复用 tokens.css + chips.css
This commit is contained in:
2026-07-11 21:10:27 +08:00
parent e0d32c0d1a
commit 41a788c431
14 changed files with 963 additions and 296 deletions
+5
View File
@@ -176,3 +176,8 @@ export async function getRiskSeries(taskId: string): Promise<RiskSeriesData> {
return data
}
export async function getLog(taskId: string): Promise<string> {
const { data } = await apiClient.get<{ log: string }>(`/task/${taskId}/log`)
return data.log
}
+9
View File
@@ -32,6 +32,10 @@ export interface PaperAccount {
next_run_at?: string | null
checkpoint_date?: string | null
error_msg?: string | null
/** 列表端点附带的最新净值 / 收益(单账户 GET 不含) */
latest_equity?: number | null
latest_date?: string | null
total_return?: number | null
}
export interface BalancePoint {
@@ -85,6 +89,11 @@ export async function createPaper(req: PaperCreate): Promise<number> {
return data.account_id
}
export async function listPapers(): Promise<PaperAccount[]> {
const { data } = await apiClient.get<{ accounts: PaperAccount[] }>('/paper')
return data.accounts
}
export async function getPaper(aid: number): Promise<PaperAccount> {
const { data } = await apiClient.get<PaperAccount>(`/paper/${aid}`)
return data