import { request } from '@/utils/request.js';

// -----------------------------------派单分析-----------------------------------------
//客户类型分布
export const customTypeAnalysis = (params) =>
  request({
    url: '/api/admin/tb/crm/analyse/custom/type',
    params,
  });

//客户类型分布的下钻接口
export const customTypeDrill = (params) =>
  request({
    url: '/api/admin/tb/crm/analyse/custom/type/detail',
    params,
  });

//月度派单分布下钻接口
export const monthDispatchDrill = (params) =>
  request({
    url: '/api/admin/tb/crm/analyse/monthly/detail',
    params,
  });
//大区在执行派单排名下钻接口
export const regionDispatchDrill = (params) =>
  request({
    url: '/api/admin/tb/crm/analyse/region/detail',
    params,
  });
//供应商派单分布下钻接口
export const supplierDispatchDrill = (params) =>
  request({
    url: '/api/admin/tb/crm/analyse/supplier/detail',
    params,
  });

//月度派单分布及对比接口
export const monthDispatchAnalysis = (params) =>
  request({
    url: '/api/admin/tb/crm/analyse/monthly',
    params,
  });
//大区在执行派单排名接口
export const dispatchRankingAnalysis = (params) =>
  request({
    url: '/api/admin/tb/crm/analyse/region',
    params,
  });

//供应商派单分布接口
export const supplierDispatchAnalysis = (params) =>
  request({
    url: '/api/admin/tb/crm/analyse/supplier',
    params,
  });

//项目派单完成率接口
export const dispatchStatisticsAnalysis = (params) =>
  request({
    url: '/api/admin/tb/crm/analyse/project',
    params,
  });
//项目派单完成率下钻
export const dispatchStatisticsDrill = (params) =>
  request({
    url: '/api/admin/tb/crm/analyse/project/detail',
    params,
  });
//派单累计 服务人员累计
export const dispatchProjectCount = (params) =>
  request({
    url: '/api/admin/tb/crm/analyse/project/count',
    params,
  });

// -----------------------------------服务单元分析-----------------------------------------
//按时间查询服务单元列表
export const serviceServiceList = (params) =>
  request({
    url: '/api/service/analyse/list',
    params,
  });

//服务单元概览
export const serviceOverviewAnalysis = (params) =>
  request({
    url: '/api/service/analyse/overview',
    params,
  });

//人力供应商项目数量分布及占比
export const supplierOverviewAnalysis = (params) =>
  request({
    url: '/api/service/analyse/supplier',
    params,
  });
//人力供应商项目数量分布及占比 数据下钻
export const supplierOverviewDrill = (params) =>
  request({
    url: '/api/service/analyse/supplier/detail',
    params,
  });
//人力供应商项目角色人员分布
export const supplierRoleAnalysis = (params) =>
  request({
    url: '/api/service/analyse/supplier/role',
    params,
  });

//项目调配完成进度
export const projectAllocateProcessAnalysis = (params) =>
  request({
    url: '/api/service/analyse/project/allocation',
    params,
  });
//人员配额完成进度
export const personAllocateProcessAnalysis = (params) =>
  request({
    url: '/api/service/analyse/personnel/quota',
    params,
  });

//项目角色待调配配额盘点
export const projectRoleAnalysis = (params) =>
  request({
    url: '/api/service/analyse/supplier/region/detail',
    params,
  });
//大区列表
export const getRegionList = (params) =>
  request({
    url: '/api/service/analyse/supplier/region',
    params,
  });

//设备供应商设备使用占比
export const deviceUseAnalysis = (params) =>
  request({
    url: '/api/service/analyse/device/use',
    params,
  });

//大区服务人数分布及对比
export const personNumAnalysis = (params) =>
  request({
    url: '/api/service/analyse/region/personnel',
    params,
  });

// -----------------------------------SOP预警监控-----------------------------------------
//sop-按时间查询服务单元列表
export const sopServiceList = (params) =>
  request({
    url: '/api/sop/analyse/list',
    params,
  });
//预警top10
export const warningTop = (params) =>
  request({
    url: '/api/sop/analyse/processing',
    params,
  });
//考勤top
export const attendanceTop = (params) =>
  request({
    url: '/api/sop/analyse/attendance',
    params,
  });
//供应商预警均值走势接口
export const supWarningTrend = (params) =>
  request({
    url: '/api/sop/analyse/trend',
    params,
  });
//总体概况接口
export const sopWarningAnalysis = (params) =>
  request({
    url: '/api/sop/analyse/overview',
    params,
  });

// -----------------------------------项目进度监控-----------------------------------------
//项目阶段分布
export const projectStageAnalysis = (params) =>
  request({
    url: '/api/sop/schedule/progress',
    params,
  });

//项目燃尽图
export const projectProcessAnalysis = (params) =>
  request({
    url: '/api/sop/schedule/projectProgress',
    params,
  });
//点击阶段分布的下钻接口
export const sopDetailDrill = (params) =>
  request({
    url: '/api/sop/schedule/detail',
    params,
  });
// -----------------------------------设备保障监控-----------------------------------------
export const deviceStatusAnalysis = (params) =>
  request({
    url: '/api/sys/device/monitor/count',
    params,
  });
export const deviceStatusTable = (params) =>
  request({
    url: '/api/sys/device/monitor/countByModel',
    params,
  });

export const resourceWarningAnalysis = (params) =>
  request({
    url: '/api/sys/device/monitor/countByServiceUnit',
    params,
  });
export const resourceWarningTable = (params) =>
  request({
    url: '/api/sys/device/monitor/countByServiceUnitDetail',
    params,
  });

// -----------------------------------质量分析监控-----------------------------------------
//按时间查询服务单元列表
export const qualityServiceList = (params) =>
  request({
    url: '/api/quality/analyse/list',
    params,
  });

// 总体盘点饼图
export const qualityAnalysisPie = (params) =>
  request({
    url: '/api/quality/analyse/pie',
    params,
  });
// 总体盘点归因雷达图
export const qualityAnalysisRadar = (params) =>
  request({
    url: '/api/quality/analyse/radar',
    params,
  });
// 审核进度
export const qualityAnalysisProgress = (params) =>
  request({
    url: '/api/quality/analyse/progress',
    params,
  });
// 影响度/归因柱状图
export const qualityAnalysisInfluence = (params) =>
  request({
    url: '/api/quality/analyse/influence',
    params,
  });
//饼图下钻
export const inventoryDrill = (params) =>
  request({
    url: '/api/quality/analyse/supplier/detail',
    params,
  });
//影响度/归因 下钻接口
export const degreeDrill = (params) =>
  request({
    url: '/api/quality/analyse/influence/detail',
    params,
  });
