import request from '@/utils/request';
import { AxiosPromise } from 'axios';
// 获取 数据总览 DataOverview
export const getDataOverview = (params) => {
  return request({
    url: '/api/device/homepage/getDataOverview',
    method: 'get',
    params: params
  });
};
// 设备分类
export const getEquipmentClassification = (params) => {
  return request({
    url: '/api/device/homepage/getEquipmentClassification',
    method: 'get',
    params: params
  });
};
// 获取设备使用情况
export const getEquipmentUsageData = (range, params = {}) => {
  return request({
    url: `/api/device/homepage/getEquipmentUsageData/${range}`,
    method: 'get',
    params: params
  });
};

// 获取报警信息
export const getAlarmInformation = (params) => {
  return request({
    url: `/api/device/homepage/getAlarmInformation`,
    method: 'get',
    params: params
  });
};


export default {
    getDataOverview,
    getEquipmentClassification,
    getEquipmentUsageData,
    getAlarmInformation
}