feat: 分类模块联调初始化
parent
e74a0739ac
commit
c825f53982
@ -0,0 +1,199 @@
|
|||||||
|
/*
|
||||||
|
* @Author: donghao donghao@supervision.ltd
|
||||||
|
* @Date: 2024-05-24 17:57:19
|
||||||
|
* @LastEditors: donghao donghao@supervision.ltd
|
||||||
|
* @LastEditTime: 2024-05-28 11:03:42
|
||||||
|
* @FilePath: \general-ai-platform-web\src\services\business\basemodel.ts
|
||||||
|
* @Description: 基础模型
|
||||||
|
*/
|
||||||
|
// @ts-ignore
|
||||||
|
/* eslint-disable */
|
||||||
|
import { request } from '@umijs/max';
|
||||||
|
|
||||||
|
/** 基础模型管理 */
|
||||||
|
// 添加模型分类
|
||||||
|
export async function apiBasemodelClassificationAdd(body: any, options?: { [key: string]: any }) {
|
||||||
|
return request<API.Response & { data?: API.ENTITY_INDEX_DATA; msg?: string }>(
|
||||||
|
`/api/v1/basemodel/classification/add`,
|
||||||
|
{
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
// 'Content-Type': 'application/json',
|
||||||
|
// "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
|
||||||
|
},
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
// 模型分类列表
|
||||||
|
export async function apiBasemodelClassificationList(body: any, options?: { [key: string]: any }) {
|
||||||
|
return request<API.Response & { data?: API.ENTITY_INDEX_DATA; msg?: string }>(
|
||||||
|
`/api/v1/basemodel/classification/list`,
|
||||||
|
{
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
// 'Content-Type': 'application/json',
|
||||||
|
// "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
|
||||||
|
},
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
// 删除模型分类
|
||||||
|
export async function apiBasemodelClassificationDelete(
|
||||||
|
body: any,
|
||||||
|
options?: { [key: string]: any },
|
||||||
|
) {
|
||||||
|
return request<API.Response & { data?: API.ENTITY_INDEX_DATA; msg?: string }>(
|
||||||
|
`/api/v1/basemodel/classification/delete`,
|
||||||
|
{
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
// 'Content-Type': 'application/json',
|
||||||
|
// "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
|
||||||
|
},
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
// 添加模型
|
||||||
|
export async function apiBasemodelAdd(body: any, options?: { [key: string]: any }) {
|
||||||
|
return request<API.Response & { data?: API.ENTITY_INDEX_DATA; msg?: string }>(
|
||||||
|
`/api/v1/basemodel/add`,
|
||||||
|
{
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
// 'Content-Type': 'application/json',
|
||||||
|
// "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
|
||||||
|
},
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
// 模型列表
|
||||||
|
export async function apiBasemodelList(body: any, options?: { [key: string]: any }) {
|
||||||
|
return request<API.Response & { data?: API.ENTITY_INDEX_DATA; msg?: string }>(
|
||||||
|
`/api/v1/basemodel/list`,
|
||||||
|
{
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
// 'Content-Type': 'application/json',
|
||||||
|
// "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
|
||||||
|
},
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
// 删除模型
|
||||||
|
export async function apiBasemodelDelete(body: any, options?: { [key: string]: any }) {
|
||||||
|
return request<API.Response & { data?: API.ENTITY_INDEX_DATA; msg?: string }>(
|
||||||
|
`/api/v1/basemodel/delete`,
|
||||||
|
{
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
// 'Content-Type': 'application/json',
|
||||||
|
// "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
|
||||||
|
},
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 编辑模型
|
||||||
|
export async function apiBasemodelEdit(body: any, options?: { [key: string]: any }) {
|
||||||
|
return request<API.Response & { data?: API.ENTITY_INDEX_DATA; msg?: string }>(
|
||||||
|
`/api/v1/basemodel/edit`,
|
||||||
|
{
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
// 'Content-Type': 'application/json',
|
||||||
|
// "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
|
||||||
|
},
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
// 模型信息
|
||||||
|
export async function apiBasemodelInfo(body: any, options?: { [key: string]: any }) {
|
||||||
|
return request<API.Response & { data?: API.ENTITY_INDEX_DATA; msg?: string }>(
|
||||||
|
`/api/v1/basemodel/info`,
|
||||||
|
{
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
// 'Content-Type': 'application/json',
|
||||||
|
// "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
|
||||||
|
},
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 添加模型版本
|
||||||
|
export async function apiBasemodelVersionAdd(body: any, options?: { [key: string]: any }) {
|
||||||
|
return request<API.Response & { data?: API.ENTITY_INDEX_DATA; msg?: string }>(
|
||||||
|
`/api/v1/basemodel/version/add`,
|
||||||
|
{
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
// 'Content-Type': 'application/json',
|
||||||
|
// "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
|
||||||
|
},
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
// 模型版本列表
|
||||||
|
export async function apiBasemodelVersionList(body: any, options?: { [key: string]: any }) {
|
||||||
|
return request<API.Response & { data?: API.ENTITY_INDEX_DATA; msg?: string }>(
|
||||||
|
`/api/v1/basemodel/version/list`,
|
||||||
|
{
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
// 'Content-Type': 'application/json',
|
||||||
|
// "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
|
||||||
|
},
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
// 删除模型版本
|
||||||
|
export async function apiBasemodelVersionDelete(body: any, options?: { [key: string]: any }) {
|
||||||
|
return request<API.Response & { data?: API.ENTITY_INDEX_DATA; msg?: string }>(
|
||||||
|
`/api/v1/basemodel/version/delete`,
|
||||||
|
{
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
// 'Content-Type': 'application/json',
|
||||||
|
// "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
|
||||||
|
},
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 模型版本信息
|
||||||
|
export async function apiBasemodelVersionInfo(body: any, options?: { [key: string]: any }) {
|
||||||
|
return request<API.Response & { data?: API.ENTITY_INDEX_DATA; msg?: string }>(
|
||||||
|
`/api/v1/basemodel/version/info`,
|
||||||
|
{
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
// 'Content-Type': 'application/json',
|
||||||
|
// "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
|
||||||
|
},
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
@ -0,0 +1,60 @@
|
|||||||
|
/*
|
||||||
|
* @Author: donghao donghao@supervision.ltd
|
||||||
|
* @Date: 2024-05-24 17:57:19
|
||||||
|
* @LastEditors: donghao donghao@supervision.ltd
|
||||||
|
* @LastEditTime: 2024-05-27 14:54:19
|
||||||
|
* @FilePath: \general-ai-platform-web\src\services\business\device.ts
|
||||||
|
* @Description: 设备
|
||||||
|
*/
|
||||||
|
// @ts-ignore
|
||||||
|
/* eslint-disable */
|
||||||
|
import { request } from '@umijs/max';
|
||||||
|
|
||||||
|
/** 企业设备 */
|
||||||
|
// 添加设备分类
|
||||||
|
export async function apiDeviceClassificationAdd(body: any, options?: { [key: string]: any }) {
|
||||||
|
return request<API.Response & { data?: API.ENTITY_INDEX_DATA; msg?: string }>(
|
||||||
|
`/api/v1/enterprise/device/classification/add`,
|
||||||
|
{
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
// 'Content-Type': 'application/json',
|
||||||
|
// "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
|
||||||
|
},
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 设备分类列表
|
||||||
|
export async function apiDeviceClassification(body: any, options?: { [key: string]: any }) {
|
||||||
|
return request<API.Response & { data?: API.ENTITY_INDEX_DATA; msg?: string }>(
|
||||||
|
`/api/v1/enterprise/device/classification`,
|
||||||
|
{
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
// 'Content-Type': 'application/json',
|
||||||
|
// "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
|
||||||
|
},
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除设备分类
|
||||||
|
export async function apiDeviceClassificationDelete(body: any, options?: { [key: string]: any }) {
|
||||||
|
return request<API.Response & { data?: API.ENTITY_INDEX_DATA; msg?: string }>(
|
||||||
|
`/api/v1/enterprise/device/classification/delete`,
|
||||||
|
{
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
// 'Content-Type': 'application/json',
|
||||||
|
// "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
|
||||||
|
},
|
||||||
|
data: body,
|
||||||
|
...(options || {}),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
Loading…
Reference in New Issue