hldy_yunwei_vue/src/views/device/manager/components/preview/preview.api.ts

54 lines
1.6 KiB
TypeScript
Raw Normal View History

2026-03-30 18:20:25 +08:00
import { defHttp } from '/@/utils/http/axios';
enum Api {
departPreview = '/iot/device/manager/departPreview',
nuPreview = '/iot/device/manager/nuPreview',
configList = '/iot/device/config/queryList',
nuList = '/iot/device/manager/nuList',
savePreview = '/iot/device/manager/savePreview',
updatePreview = '/iot/device/manager/updatePreview',
2026-03-30 18:20:25 +08:00
deletePreview = '/iot/device/manager/deletePreview',
batchSave = '/iot/device/manager/batchSave',
queryQuantityByOrgCode = '/iot/device/manager/queryQuantityByOrgCode',
getNuListByOrgCode = '/iot/device/manager/getNuListByOrgCode',
2026-03-30 18:20:25 +08:00
}
/**
*
* @param params
*/
export const departPreview = (params) => defHttp.get({ url: Api.departPreview, params });
export const nuPreview = (params) => defHttp.get({ url: Api.nuPreview, params });
export const configList = (params) => defHttp.get({ url: Api.configList, params });
export const nuList = (params) => defHttp.get({ url: Api.nuList, params });
/**
*
* @param id
*/
export const savePreview = (params, isUpdate) => {
let url = isUpdate ? Api.updatePreview : Api.savePreview;
return defHttp.post({ url: url, params });
};
/**
*
* @param params
* @returns
*/
export const batchSave = (params) => {
return defHttp.post({ url: Api.batchSave, params });
};
2026-03-30 18:20:25 +08:00
/**
*
* @param id
*/
export const deletePreview = (params) => defHttp.post({ url: Api.deletePreview, params });
export const queryQuantityByOrgCode = (params) => {
return defHttp.get({ url: Api.queryQuantityByOrgCode, params });
};
2026-03-30 18:20:25 +08:00
export const getNuListByOrgCode = (params) => {
return defHttp.get({ url: Api.getNuListByOrgCode, params });
};