import { request } from "@/utils/request";
import { getDeptId } from "@/utils/auth";
//
/**
* 获取设备数
*/
export const getDeviceCount = () =>
request({
url: '/rq/stat/home/device/count/undefined',
method: 'GET',
})
/**
* 获取维修工单数
*/
export const getMaintainCount = () =>
request({
url: '/rq/stat/home/maintain/count/undefined',
method: 'GET',
})
/**
* 获取运行记录未/填报数
*/
export const getPendingCount = (params) =>
request({
url: '/rq/iot-opeation-fill/getCount',
method: 'GET',
params,
})
/**
* 获取保养工单数
*/
export const getMaintenanceCount = () =>
request({
url: '/rq/stat/maintenance/status/undefined',
method: 'GET',
})
/**
* 获取巡检工单数
*/
export const getInspectCount = (params) =>
request({
url: '/rq/stat/inspect/statuss/'+getDeptId(), // deptId
method: 'GET',
params,
})
/**
* 获取MTTR 平均解决时间
*/
export const getMTTR = () =>
request({
url: '/rq/stat/mttr',
method: 'GET',
})
/**
* 获取库存预警物料数量
*/
export const getStockWarningCount = () =>
request({
url: '/rq/stat/home/safe',
method: 'GET',
})
/**
* 获取设备状态统计
*/
export const getDeviceStatusStatistic = () =>
request({
url: '/rq/stat/home/device/status/undefined',
method: 'GET',
})
/**
* 获取设备类别TOP5
*/
export const getDeviceTypeCount = () =>
request({
url: '/rq/stat/home/device/type/yf',
method: 'GET',
})
/**
* 获取近一周用户活跃度
*/
export const getWeeklyUserActivity = () =>
request({
url: '/rq/stat/home/dept',
method: 'GET',
})
/**
* 获取工单数量统计
*/
export const getWorkOrderCount = () =>
request({
url: '/rq/stat/rh/order/'+getDeptId(), // deptId
method: 'GET',
})
//
//
/**
* 获取当天维修统计
*/
export const getTodayRepairStatistic = () =>
request({
url: '/rq/stat/main/day',
method: 'GET',
})
/**
* 获取近一周维修统计
*/
export const getWeeklyRepairStatistic = () =>
request({
url: '/rq/stat/main/week',
method: 'GET',
})
/**
* 获取近一月维修统计
*/
export const getMonthlyRepairStatistic = () =>
request({
url: '/rq/stat/main/month',
method: 'GET',
})
/**
* 获取总维修统计
*/
export const getTotalRepairStatistic = () =>
request({
url: '/rq/stat/main/total',
method: 'GET',
})
/**
* 获取维修数据统计
*/
export const getOtherRepairStatistic = () =>
request({
url: '/rq/stat/main/status',
method: 'GET',
})
//
//
/**
* 获取昨日保养统计
*/
export const getYesterdayMaintenanceStatistic = () =>
request({
url: '/rq/stat/maintenance/day',
method: 'GET',
})
/**
* 获取近一周保养统计
*/
export const getWeeklyMaintenanceStatistic = () =>
request({
url: '/rq/stat/maintenance/week',
method: 'GET',
})
/**
* 获取近一月保养统计
*/
export const getMonthlyMaintenanceStatistic = () =>
request({
url: '/rq/stat/maintenance/month',
method: 'GET',
})
/**
* 获取总保养统计
*/
export const getTotalMaintenanceStatistic = () =>
request({
url: '/rq/stat/maintenance/total',
method: 'GET',
})
/**
* 获取保养工单状态数据统计
*/
export const getMaintenanceStatusStatistic = () =>
request({
url: '/rq/stat/maintenance/status/undefined',
method: 'GET',
})
/**
* 获取今日保养工单状态数据统计
*/
export const getMaintenanceTodayStatusStatistic = () =>
request({
url: '/rq/stat/maintenance/today/status',
method: 'GET',
})
/**
* 获取保养工单类型数据统计
*/
export const getMaintenanceTypeStatistic = () =>
request({
url: '/rq/stat/maintenance/type',
method: 'GET',
})
//
//
/**
* 获取昨日巡检统计
*/
export const getYesterdayInspectionStatistic = () =>
request({
url: '/rq/stat/inspect/day',
method: 'GET',
})
/**
* 获取近一周巡检统计
*/
export const getWeeklyInspectionStatistic = () =>
request({
url: '/rq/stat/inspect/week',
method: 'GET',
})
/**
* 获取近一月巡检统计
*/
export const getMonthlyInspectionStatistic = () =>
request({
url: '/rq/stat/inspect/month',
method: 'GET',
})
/**
* 获取总巡检统计
*/
export const getTotalInspectionStatistic = () =>
request({
url: '/rq/stat/inspect/total',
method: 'GET',
})
/**
* 获取巡检工单状态数据统计
*/
export const getInspectionStatusStatistic = () =>
request({
url: '/rq/stat/inspect/status',
method: 'GET',
})
/**
* 获取今日巡检工单状态数据统计
*/
export const getInspectionTodayStatusStatistic = () =>
request({
url: '/rq/stat/inspect/today/status',
method: 'GET',
})
//