40 lines
1.2 KiB
TypeScript
40 lines
1.2 KiB
TypeScript
import { defHttp } from '/@/utils/http/axios';
|
|
|
|
enum Api {
|
|
list = '/iot/device/manager/list',
|
|
previewList = '/iot/device/manager/previewList',
|
|
add = '/iot/device/manager/add',
|
|
edit = '/iot/device/manager/edit',
|
|
delete = '/iot/device/manager/delete',
|
|
exportXls = '/iot/device/manager/exportXls',
|
|
exportDeviceHzExcel = '/iot/device/manager/exportDeviceHzExcel',
|
|
bingLogList = '/iot/device/manager/bingLogList',
|
|
nuList = '/iot/device/manager/nuList',
|
|
addLog = '/iot/device/manager/addLog',
|
|
}
|
|
|
|
/**
|
|
* 导出api
|
|
* @param params
|
|
*/
|
|
export const getExportUrl = Api.exportXls;
|
|
export const exportDeviceHzExcel = Api.exportDeviceHzExcel;
|
|
/**
|
|
* 列表
|
|
* @param params
|
|
*/
|
|
export const list = (params) => defHttp.get({ url: Api.list, params });
|
|
export const previewList = (params) => defHttp.get({ url: Api.previewList, params });
|
|
export const bingLogList = (params) => defHttp.get({ url: Api.bingLogList, params });
|
|
export const nuList = (params) => defHttp.get({ url: Api.nuList, params });
|
|
/**
|
|
* 添加
|
|
* @param params
|
|
*/
|
|
export const save = (params, isUpdate) => {
|
|
let url = isUpdate ? Api.edit : Api.add;
|
|
return defHttp.post({url: url, params});
|
|
}
|
|
|
|
export const saveLog = (params) => defHttp.post({ url: Api.addLog, params });
|