feat: 评测模块新增详情页与创建向导

新增 EvalTaskDetail 与逐样本结果类型,Mock 与适配器补充评测详情接口,路由注册详情页并将维度创建并入向导;EvalCreateView 改为分步向导(任务配置、规则设置、维度表单),新增 EvalDetailView 展示综合得分与样本判定,列表补充详情入口,配套两份回归脚本。
This commit is contained in:
caoxiaozhu
2026-07-12 15:39:59 +08:00
parent c0f5f4a30a
commit 71ce26fff6
15 changed files with 1912 additions and 303 deletions

View File

@@ -16,6 +16,7 @@ import {
mockFineTuneList,
mockCompareList,
mockEvalList,
mockEvalDetails,
mockDimensions,
mockLogFiles,
mockTrainingLogFiles,
@@ -229,6 +230,12 @@ async function handleMock(config: AxiosRequestConfig) {
if (url === '/model-eval' && method === 'get') return ok(mockEvalList)
if (url === '/model-eval' && method === 'delete') return ok({ deleted: true })
if (url === '/model-eval/start' && method === 'post') return ok({ task_id: Math.floor(Math.random() * 1000) + 1 })
m = url.match(/^\/model-eval\/([^/]+)$/)
const evalTaskId = m?.[1]
if (evalTaskId && method === 'get') {
const found = mockEvalDetails.find((item) => String(item.id) === evalTaskId)
return found ? ok(found) : fail('评测任务不存在', 404)
}
if (url === '/dimension' && method === 'get') return ok(mockDimensions)
if (url === '/dimension' && method === 'post') {
return ok({ id: Math.floor(Math.random() * 1000) + 100 })