You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.2 KiB
TypeScript

/*
* @Author: donghao donghao@supervision.ltd
* @Date: 2024-08-02 10:40:49
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2024-08-14 10:42:42
* @FilePath: \General-AI-Platform-Web-Client\src\api\device.ts
* @Description: 设备
*/
import { http } from "@/utils/http";
import { baseUrlApi } from "./utils";
type Result = {
success: boolean;
data?: Array<any>;
};
type ResultList = {
success: boolean;
data?: {
/** 列表数据 */
results: Array<any>;
};
};
/** 节点模型设备获取 */
export const getDeviceList = (params?: object) => {
return http.request<Result>("get", baseUrlApi("enterprise_node/"), {
params
});
};
/** 获取设备分类 */
export const getDeviceClassfication = (params?: object) => {
return http.request<ResultList>("get", baseUrlApi("device_classfication/"), {
params
});
};
/** 获取设备 */
export const getDevices = (params?: object) => {
return http.request<ResultList>("get", baseUrlApi("devices/"), {
params
});
};
/** 布点获取设备 */
export const getLinkDevicesApi = (params?: object) => {
return http.request<ResultList>("get", baseUrlApi("get_devices/"), {
params
});
};