feat: 训练数据管理

This commit is contained in:
archer
2023-03-25 01:40:15 +08:00
parent c0dc5a74c9
commit 8a9f1ed29b
27 changed files with 81165 additions and 97 deletions

13
src/api/data.ts Normal file
View File

@@ -0,0 +1,13 @@
import { GET, POST, DELETE, PUT } from './request';
import { RequestPaging } from '../types/index';
import { Obj2Query } from '@/utils/tools';
import type { DataListItem } from '@/types/data';
import type { PagingData } from '../types/index';
export const getDataList = (data: RequestPaging) =>
GET<PagingData<DataListItem>>(`/data/getDataList?${Obj2Query(data)}`);
export const postData = (name: string) => POST<string>(`/data/postData?name=${name}`);
export const postSplitData = (dataId: string, text: string) =>
POST(`/data/splitData`, { dataId, text });