import { defHttp } from '@/utils/http/axios';

enum Api {
  GetTrendData = '/api/DroneScreenDisplay/GetTrendData',
  GetTuBanSummary = '/api/DroneScreenDisplay/GetTuBanSummary',
  GetTotalAndAreaByType = '/api/DroneScreenDisplay/GetTotalAndAreaByType',
  GetTotalAndArea = '/api/DroneScreenDisplay/GetTotalAndArea',
  GetAnalysisData = '/api/DroneScreenDisplay/GetAnalysisData',
  CaseOffenceEcharts = '/api/DroneScreenDisplay/CaseOffenceEcharts',
  GetTrendEchartsData = '/api/DroneScreenDisplay/GetTrendEchartsData',
  ReFlyVerifyPage = '/api/DetectCenter/ReFlyVerifyPage',
}
export function GetTrendData(params: {
  countyid: string;
  type: string;
  datatype: number;
  begindate?: string;
  enddate?: string;
}) {
  // datatype 0按天统计，1按月统计
  return defHttp.get({ url: Api.GetTrendData, params });
}
export function GetTuBanSummary(params: { countyid: string; type: string }) {
  return defHttp.get({ url: Api.GetTuBanSummary, params });
}
export function GetTotalAndAreaByType(params: { countyid: string; type: string }) {
  return defHttp.get({ url: Api.GetTotalAndAreaByType, params });
}
export function GetTotalAndArea(params: { countyid: string; type: string }) {
  return defHttp.get({ url: Api.GetTotalAndArea, params });
}
export function getAnalysisData(params: { countyid: string; month: number }) {
  return defHttp.get({ url: Api.GetAnalysisData, params });
}

export function caseOffenceEcharts(params: { type: number; month: number }) {
  return defHttp.get({ url: Api.CaseOffenceEcharts, params });
}
export function getTrendEchartsData(params: {
  type: number;
  month: number;
  datatype: number;
  begindate: string;
  enddate: string;
}) {
  return defHttp.get({ url: Api.GetTrendEchartsData, params });
}

export function reFlyVerifyPage(params: { page?: number; limit?: number; key?: string }) {
  return defHttp.get({ url: Api.ReFlyVerifyPage, params });
}
