feat: 评测模块新增详情页与创建向导
新增 EvalTaskDetail 与逐样本结果类型,Mock 与适配器补充评测详情接口,路由注册详情页并将维度创建并入向导;EvalCreateView 改为分步向导(任务配置、规则设置、维度表单),新增 EvalDetailView 展示综合得分与样本判定,列表补充详情入口,配套两份回归脚本。
This commit is contained in:
@@ -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 })
|
||||
|
||||
Reference in New Issue
Block a user