feat: 实现基础设施层
axios 请求封装及七个业务模块 API,Pinia 状态管理(auth/system/models/tools),Mock 适配器与数据,以及流式对话、轮询、倒计时组合式函数。
This commit is contained in:
27
frontend/src/api/modules/eval.ts
Normal file
27
frontend/src/api/modules/eval.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import { get, post, put, del } from '../request'
|
||||
import type { EvalTask, Dimension } from '@/types'
|
||||
|
||||
/** 评测任务列表 */
|
||||
export const getEvalList = () => get<EvalTask[]>('/model-eval')
|
||||
|
||||
/** 删除评测任务 */
|
||||
export const deleteEval = (id: string | number) => del(`/model-eval/${id}`)
|
||||
|
||||
/** 启动评测 */
|
||||
export const startEval = (data: any) => post('/model-eval/start', data)
|
||||
|
||||
/** 评测维度列表 */
|
||||
export const getDimensionList = () => get<Dimension[]>('/dimension')
|
||||
|
||||
/** 评测维度详情 */
|
||||
export const getDimension = (id: string | number) => get<Dimension>(`/dimension/${id}`)
|
||||
|
||||
/** 创建维度 */
|
||||
export const createDimension = (data: Partial<Dimension>) => post('/dimension', data)
|
||||
|
||||
/** 编辑维度 */
|
||||
export const updateDimension = (id: string | number, data: Partial<Dimension>) =>
|
||||
put(`/dimension/${id}`, data)
|
||||
|
||||
/** 删除维度 */
|
||||
export const deleteDimension = (id: string | number) => del(`/dimension/${id}`)
|
||||
Reference in New Issue
Block a user