import request from '@/utils/request'

// ----------------------------单台显示START------------------------------------

//设备开关量模拟量数据
export const getSingleDeviceData = (params: any) => request.get('services/app/SingleDeviceDashboard/GetRealtimeData', { params })


//报警记录
export const getAlarmRecord = (params: any) => request.get('services/app/SingleDeviceDashboard/GetAlertRecordsByDevice', { params })

//设备曲线
export const getDeviceCurves = (params: any) => request.get('services/app/SingleDeviceDashboard/GetRealtimeCurves', { params })

//设备基本信息
export const getDeviceInfo = (params: any) => request.get('services/app/SingleDeviceDashboard/GetDeviceInfo', { params })

//设备报警图表数据
export const getDeviceAlarmChart = (params: any) => request.get('services/app/SingleDeviceDashboard/GetAlertReport', { params })


//设备维修、保养图表数据
export const getDeviceRepairChart = (params: any) => request.get('services/app/SingleDeviceDashboard/GetRepairReport', { params })


//设备维修、保养记录
export const getDeviceRepairRecord = (params: any) => request.get('services/app/SingleDeviceDashboard/GetRepairRecords', { params })


//设备工作寿命记录
export const getDeviceLifeRecord = (params: any) => request.get('services/app/SingleDeviceDashboard/GetDeviceEquipmentLifes', { params })


// ----------------------------单台显示END------------------------------------



// ----------------------------综合显示START------------------------------------

/**
 * 设备状态 离线、在线、报修
 * @returns
 */
export const getDeviceState = () => request.get('api/services/app/Dashboard/GetDeviceStates')

/**
 * 公司下设备
 * @returns
 */
export const getCompanyDevices = () => request.get('api/services/app/Dashboard/GetCompanyDevices')


/**
 * 设备区域统计
 * @returns 
 */
export const getDeviceAreaStatistics = () => request.get('api/services/app/Dashboard/GetDeviceDistribution')


/**
 * 设备类型占比
 * @returns 
 */
export const getDeviceType = () => request.get('api/services/app/Dashboard/GetDeviceCategoryRatios')

/**
 * 工单状态统计
 * @returns 
 */
export const getRepairStateStatistics = () => request.get('api/services/app/Dashboard/GetRepairStateRatios')


/**
 * 本月接入统计
 * @returns 
 */
export const getMonthAddDeviceProgress = () => request.get('api/services/app/Dashboard/GetMonthAddDeviceProgress')


/**
 * 设备数据转发和故障数量
 * @returns 
 */
export const getDeviceActivityAndFaultCurves = () => request.get('api/services/app/Dashboard/GetDeviceActivityAndFaultCurves')


/**
 * 设备状态(维修中、待年检、待维保等)统计
 * @returns 
 */
export const GetDeviceStateStatistics = () => request.get('api/services/app/Dashboard/GetDeviceStateStats')


/**
 * 设备地图分布
 * @returns 
 */
export const getDeviceAreaMapData = (params: any) => request.get('api/services/app/Dashboard/GetDeviceAreaMapData', { params })

// ----------------------------综合显示END------------------------------------


export const getRealtime = (params: any) => request.get('api/services/app/SingleDeviceDashboard/GetRealtimeData', { params })

export const getAlertRecordsByDevice = (params: any) => request.get('api/services/app/SingleDeviceDashboard/GetAlertRecordsByDevice', { params })
