import { defHttp } from '@/utils/http/axios';
enum Api {
  // 非法采矿接收办理
  LoadCaiKuangTaskList = '/api/DroneCaseInfoSatellite/LoadCaiKuangTaskList',
  // 添加收藏
  AddCaiKuangTaskFavorite = '/api/DroneCaseInfoSatellite/AddCaiKuangTaskFavorite',
  // 取消收藏
  DeleteCaiKuangTaskCase = '/api/DroneCaseInfoSatellite/DeleteCaiKuangTaskCase',
  // 非法采矿图斑列表
  LoadCaseInfoWpxfTuBanList = '/api/DroneCaseInfoSatellite/LoadCaseInfoWpxfTuBanList',
  // 非法采矿填报审核第一层
  LoadReportCaseCount = '/api/DroneCaseInfoSatellite/LoadReportCaseCount',
  // 非法采矿填报审核第二层
  LoadTaskDetailList = '/api/DroneCaseInfoSatellite/LoadTaskDetailList',
  // 非法采矿整改审核第一层
  LoadReformCaseCount = '/api/DroneCaseInfoSatellite/LoadReformCaseCount',
  // 非法采矿整改审核第二层
  LoadTaskIllegalDetailList = '/api/DroneCaseInfoSatellite/LoadTaskIllegalDetailList',
  // 图斑详情
  GetCaseInfoById = '/api/DroneCaseInfoSatellite/GetCaseInfoById',

  /****************************************************************************************************************************/

  // 图斑填报
  LoadReportingTaskList = '/api/DroneCaseInfoMinerals/LoadReportingTaskList',
  // 填报审核
  LoadReportingAuditTaskList = '/api/DroneCaseInfoMinerals/LoadReportingAuditTaskList',
  // 图斑查处
  LoadExaminingTaskList = '/api/DroneCaseInfoMinerals/LoadExaminingTaskList',
  // 查处审核
  LoadExaminingAuditTaskList = '/api/DroneCaseInfoMinerals/LoadExaminingAuditTaskList',
  // 图斑整改
  LoadRectifyingTaskList = '/api/DroneCaseInfoMinerals/LoadRectifyingTaskList',
  // 整改审核
  LoadRectifyingAuditTaskList = '/api/DroneCaseInfoMinerals/LoadRectifyingAuditTaskList',
  // 图斑调整
  LoadModifyingTaskList = '/api/DroneCaseInfoMinerals/LoadModifyingTaskList',
  // 图斑收藏
  AddTaskFavorite = '/api/DroneCaseInfoMinerals/AddTaskFavorite',
  // 取消收藏
  CancelTaskFavorite = '/api/DroneCaseInfoMinerals/CancelTaskFavorite',
  //   获取图斑信息统计数据
  LoadDroneCaseInfoCount = '/api/DroneCaseInfoMinerals/LoadModifyingTaskList',
  // 分页获取图斑信息列表
  LoadDroneCaseInfoDetail = '/api/DroneCaseInfoMinerals/LoadTasklList',
  // 恢复还原
  RecoverCase = '/api/DroneCaseInfoMinerals/CaseRecover',
  // 获取图斑详情
  mineralsGetCaseInfoById = '/api/DroneCaseInfoMinerals/GetCaseInfoById',
  // 分割图斑
  SplitCase = '/api/DroneCaseInfoMinerals/CaseSplit',
  // 更新图斑行政区划
  UpdateDroneCaseInfo = '/api/DroneCaseInfoMinerals/UpdateDroneCaseInfo',
  // 判读-待审核列表
  MainLoadCaseInfoLists = '/api/DroneCaseInfoMinerals/LoadCaseInfoCheckTuBanList',
  // 判读-详情
  MainGetCaseInfo = '/api/DroneCaseInfoMinerals/GetCaseInfo',
  // 判读-关闭案件
  MainCloseCaseInfo = '/api/DroneCaseInfoMinerals/CloseMineralCaseInfo',
  // 判读-导入数据
  MainUpdateCaseInfoShpData = '/api/DroneCaseInfoTask/ImportMineralShpData',
}

export function LoadCaiKuangTaskList(params) {
  return defHttp.get({ url: Api.LoadCaiKuangTaskList, params });
}
export function AddCaiKuangTaskFavorite(params?: { taskId: string; favoriteUserId: string }) {
  return defHttp.post({ url: Api.AddCaiKuangTaskFavorite, params });
}
export function DeleteCaiKuangTaskCase(params: string) {
  return defHttp.post({ url: Api.DeleteCaiKuangTaskCase, data: params });
}
export function LoadCaseInfoWpxfTuBanList(params) {
  return defHttp.get({
    url: Api.LoadCaseInfoWpxfTuBanList,
    params,
  });
}
export function LoadReportCaseCount(params) {
  return defHttp.get({ url: Api.LoadReportCaseCount, params });
}
export function LoadTaskDetailList(params) {
  return defHttp.get({ url: Api.LoadTaskDetailList, params });
}
export function LoadTaskIllegalDetailList(params) {
  return defHttp.get({ url: Api.LoadTaskIllegalDetailList, params });
}
export function LoadReformCaseCount(params) {
  return defHttp.get({ url: Api.LoadReformCaseCount, params });
}
export function GetCaseInfoById(params?: { id: string }) {
  return defHttp.get({ url: Api.GetCaseInfoById, params });
}

/****************************************************************************************************************************/

export function LoadReportingTaskList(params){
  return defHttp.get({ url: Api.LoadReportingTaskList, params });
}
export function LoadReportingAuditTaskList(params){
  return defHttp.get({ url: Api.LoadReportingAuditTaskList, params });
}
export function LoadExaminingTaskList(params){
  return defHttp.get({ url: Api.LoadExaminingTaskList, params });
}
export function LoadExaminingAuditTaskList(params){
  return defHttp.get({ url: Api.LoadExaminingAuditTaskList, params });
}
export function LoadRectifyingTaskList(params){
  return defHttp.get({ url: Api.LoadRectifyingTaskList, params });
}
export function LoadRectifyingAuditTaskList(params){
  return defHttp.get({ url: Api.LoadRectifyingAuditTaskList, params });
}
export function LoadModifyingTaskList(params){
  return defHttp.get({ url: Api.LoadModifyingTaskList, params });
}
export function AddTaskFavorite(params){
  return defHttp.post({ url: Api.AddTaskFavorite, params });
}
export function CancelTaskFavorite(params){
  return defHttp.post({ url: Api.CancelTaskFavorite, data: params });
}
export function getLoadDroneCaseInfoCount(params) {
  return defHttp.get({ url: Api.LoadDroneCaseInfoCount, params });
}
export function getLoadDroneCaseInfoDetail(params) {
  return defHttp.get({ url: Api.LoadDroneCaseInfoDetail, params });
}
export function recoverCase(params){
  return defHttp.post({ url: Api.RecoverCase, data: params });
}
export function getCaseInfoById(params?: { id: string }) {
  return defHttp.get({ url: Api.mineralsGetCaseInfoById, params });
}
export function splitCase(params){
  return defHttp.post({ url: Api.SplitCase, data: params });
}
export const updateDroneCaseInfo = (params) =>
  defHttp.post({ url: Api.UpdateDroneCaseInfo, params });
export function MainLoadCaseInfoLists(params){
  return defHttp.get({
    url: Api.MainLoadCaseInfoLists,
    params,
  })
}
export function MainGetCaseInfo(params: { id: string }){
  return defHttp.get({
    url: Api.MainGetCaseInfo,
    params,
  })
}
export function MainCloseCaseInfo(params: {id:string, closereason: string}){
  return defHttp.post({
    url: Api.MainCloseCaseInfo,
    data: params,
  })
}
export function MainUpdateCaseInfoShpData(params: {zipFilePath: string, srid: string, subjectname: string}){
  return defHttp.post({
    url: `${Api.MainUpdateCaseInfoShpData}?zipFilePath=${params.zipFilePath}&srid=${params.srid}&subjectname=${params.subjectname}`,
    data: params,
  })
}