This commit is contained in:
161
src/services/ai/sample/index.ts
Normal file
161
src/services/ai/sample/index.ts
Normal file
@@ -0,0 +1,161 @@
|
||||
import { request } from "@umijs/max";
|
||||
|
||||
export interface SampleVo {
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
createTime?: string[];
|
||||
/**
|
||||
* 页码,从 1 开始", example = "1
|
||||
*/
|
||||
remark?: string;
|
||||
/**
|
||||
* 样本文件id
|
||||
*/
|
||||
sampleFileId?: number;
|
||||
/**
|
||||
* 样本格式
|
||||
*/
|
||||
sampleMineType?: string;
|
||||
/**
|
||||
* 样本名称
|
||||
*/
|
||||
sampleName?: string;
|
||||
/**
|
||||
* 样本大小
|
||||
*/
|
||||
sampleSize?: string;
|
||||
/**
|
||||
* 样本时长
|
||||
*/
|
||||
sampleTime?: string[];
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回数据
|
||||
*
|
||||
* PageResultAiSampleRespVO
|
||||
*/
|
||||
export interface PageResultAiSampleRespVO {
|
||||
/**
|
||||
* 数据
|
||||
*/
|
||||
list?: AiSampleRespVO[];
|
||||
/**
|
||||
* 总量
|
||||
*/
|
||||
total?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* com.tashow.cloud.ai.controller.admin.aisample.vo.AiSampleRespVO
|
||||
*
|
||||
* AiSampleRespVO
|
||||
*/
|
||||
export interface AiSampleRespVO {
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
createTime?: string;
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
id?: number;
|
||||
/**
|
||||
* 样本注释
|
||||
*/
|
||||
remark?: string;
|
||||
/**
|
||||
* 样本文件id
|
||||
*/
|
||||
sampleFileId?: number;
|
||||
/**
|
||||
* 样本格式
|
||||
*/
|
||||
sampleMineType?: string;
|
||||
/**
|
||||
* 样本名称
|
||||
*/
|
||||
sampleName?: string;
|
||||
/**
|
||||
* 样本大小
|
||||
*/
|
||||
sampleSize?: string;
|
||||
/**
|
||||
* 样本时长
|
||||
*/
|
||||
sampleTime?: string;
|
||||
}
|
||||
|
||||
export interface SampleReqVo extends PageParam {
|
||||
name?: string;
|
||||
status?: number;
|
||||
}
|
||||
|
||||
// 获得样本库分页
|
||||
export const getSamplePage = async (params: SampleReqVo) => {
|
||||
return request("/ai/sample/get", {
|
||||
method: "GET",
|
||||
params,
|
||||
});
|
||||
};
|
||||
export const getSample = async (id: number) => {
|
||||
return request("/ai/sample/get", {
|
||||
method: "GET",
|
||||
params: { id },
|
||||
});
|
||||
};
|
||||
|
||||
// 查询部门列表
|
||||
// export const getDeptPage = async (params: DeptReq): Promise<Dept[]> => {
|
||||
// return await request.get({ url: "/system/dept/list", params });
|
||||
// };
|
||||
|
||||
export const getDeptPage = (params: SampleReqVo) => {
|
||||
return request("/system/dept/list", {
|
||||
method: "GET",
|
||||
params,
|
||||
});
|
||||
};
|
||||
|
||||
// 查询部门详情
|
||||
// export const getDept = async (id: number) => {
|
||||
// return await request.get({ url: "/system/dept/get?id=" + id });
|
||||
// };
|
||||
|
||||
export const getDept = (id: number) => {
|
||||
return request("/system/dept/get", {
|
||||
method: "GET",
|
||||
params: { id },
|
||||
});
|
||||
};
|
||||
|
||||
// 创建样本库
|
||||
export const createSample = (formData: FormData) => {
|
||||
return request("/ai/sample/create", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "multipart/form-data",
|
||||
},
|
||||
data: formData,
|
||||
});
|
||||
};
|
||||
|
||||
export const updateSample = (params: SampleReqVo) => {
|
||||
return request("/ai/sample/update", {
|
||||
method: "PUT",
|
||||
data: params,
|
||||
});
|
||||
};
|
||||
|
||||
// 删除部门
|
||||
// export const deleteDept = async (id: number) => {
|
||||
// return await request.delete({ url: "/system/dept/delete?id=" + id });
|
||||
// };
|
||||
|
||||
export const deleteSample = (id: number) => {
|
||||
return request("/ai/sample/delete", {
|
||||
method: "DELETE",
|
||||
params: { id },
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user