import { defHttp } from '@/utils/http/axios';
enum Api {
  // 非粮化 接收办理 和图斑调整
  LoadCaiKuangTaskList = '/api/DroneCaseInfoFLH/LoadFLHTaskList',
  // 添加收藏
  AddCaiKuangTaskFavorite = '/api/DroneCaseInfoFLH/LoadFLHTaskList',
  // 取消收藏
  DeleteCaiKuangTaskCase = '/api/DroneCaseInfoFLH/DeleteFLHTaskCase',
  // 非粮化 图斑列表
  LoadCaseInfoWpxfTuBanList = '/api/DroneCaseInfoFLH/LoadCaseInfoTuBanList',
  // 非粮化 填报审核第一层
  LoadReportCaseCount = '/api/DroneCaseInfoFLH/LoadTaskCount',
  // 非粮化 填报审核第二层
  LoadTaskDetailList = '/api/DroneCaseInfoFLH/LoadTaskDetailList',
  // 非粮化 整改审核第一层
  LoadReformCaseCount = '/api/DroneCaseInfoFLH/LoadTaskCount',
  // 非粮化 整改审核第二层
  LoadTaskIllegalDetailList = '/api/DroneCaseInfoFLH/LoadTaskIllegalDetailList',
  // 图斑详情
  GetCaseInfoById = '/api/DroneCaseInfoFLH/GetCaseInfoById',
  // 非粮化 图斑调整 更新图斑行政区划
  UpdateDroneCaseInfo = '/api/DroneCaseInfoFLH/UpdateDroneCaseInfo',
  // 分割还原
  CaseRecover = '/api/DroneCaseInfoFLH/CaseRecover',
  // 图斑分割
  CaseSplit = '/api/DroneCaseInfoFLH/CaseSplit',
}
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 const UpdateDroneCaseInfo = (params) =>
  defHttp.post({ url: Api.UpdateDroneCaseInfo, params });
export function CaseRecover(params){
  return defHttp.post({ url: Api.CaseRecover, data: params });
}
export function CaseSplit(params){
  return defHttp.post({ url: Api.CaseSplit, data: params });
}