// WFProcess 流程模版基本信息
import { defHttp } from '@/utils/http/axios';

enum Api {
  // 获取待办任务统计数据
  LoadTaskCount = '/api/DroneCaseInfoZdwt1/LoadTaskCount',
  //   获取图斑信息统计数据
  LoadDroneCaseInfoCount = '/api/DroneCaseInfoZdwt1/LoadDroneCaseInfoCount',
  // 分页获取图斑信息列表
  LoadDroneCaseInfoDetail = '/api/DroneCaseInfoZdwt1/LoadTasklList',
  // 分页获取任务信息列表
  LoadTaskDetailList = '/api/DroneCaseInfoZdwt1/LoadTaskDetailList',
  // 收藏图斑
  AddCaseFavorite = '/api/DroneCaseInfoZdwt1/AddCaseFavorite',
  // // 获取收藏图斑列表
  // FavoriteCaseList = '/api/DroneCaseinfo/FavoriteCaseList',
  DeleteFavoriteCase = '/api/DroneCaseInfoZdwt1/DeleteFavoriteCase',
  // 获取图斑详情
  GetCaseInfoById = '/api/DroneCaseInfoZdwt1/GetCaseInfoById',
  // 更新图斑行政区划
  UpdateDroneCaseInfo = '/api/DroneCaseInfoZdwt1/UpdateDroneCaseInfo',
  // // 督办流程
  // Supervise = '/api/WFProcess/Supervise',
  // 获取部门父级
  LoadParents = '/api/Orgs/LoadParents',
  // 审核列表收藏
  AddtaskFavorite = '/api/DroneCaseInfoZdwt1/AddtaskFavorite',
  // 审核列表删除收藏
  DeleteTaskCase = '/api/DroneCaseInfoZdwt1/DeleteTaskCase',
  // 获取当前账号可以看见的乡镇
  loadStreet = '/api/DroneCaseInfoZdwt1/loadStreet',
  // 违法处理，待办任务列表
  LoadTaskIllegalDetailList = '/api/DroneCaseInfoZdwt1/LoadTaskIllegalDetailList',
  // 分割图斑
  SplitCase = '/api/DroneCaseInfoZdwt1/CaseSplit',
  // 恢复还原
  RecoverCase = '/api/DroneCaseInfoZdwt1/CaseRecover',
  // 获取图斑中心点
  GetPolygonCenter = '/api/DroneCaseInfoZdwt1/GetCenterPoints',
  // 获取用户访问机构权限
  // GetUserOrgs = '/api/Check/GetOrgs',
  // // 大屏下发图斑统计
  // IssuedStatitical = "/api/DroneScreenDisplay/CaseOffenceXiaFa",
  // // 大屏核实新增统计
  // VerifyStatitical = "/api/DroneScreenDisplay/CaseOffenceCheckAdd",
  // // 大屏整改剩余统计
  // RectificationStatitical = "/api/DroneScreenDisplay/CaseOffenceModifyRemain",
  // 获取案件图片坐标、方位角信息
  LoadCaseImgList = "/api/DroneCaseInfoZdwt1/LoadCaseImgList",
  // 图斑列表
  LoadCaseInfoTuBanList = '/api/DroneCaseInfoZdwt1/LoadCaseInfoTuBanList',
  CaseOffence = '/api/DroneCaseInfoZdwt1/CaseOffence',
  LoadCaseInfoListOffence = '/api/DroneCaseInfoZdwt1/LoadCaseInfoListOffence',

}

/**
 * @description: getCaseFlowLog
 */
export function getLoadTaskCount(params?) {
  return defHttp.get({ url: Api.LoadTaskCount, params });
}
export function getLoadStreet() {
  return defHttp.get({ url: Api.loadStreet });
}

/**
 * @description: getCaseFlowLog
 */
export function getLoadDroneCaseInfoCount(params) {
  return defHttp.get({ url: Api.LoadDroneCaseInfoCount, params });
}

/**
 * @description: getCaseFlowLog
 */
export function getLoadDroneCaseInfoDetail(params) {
  return defHttp.get({ url: Api.LoadDroneCaseInfoDetail, params });
}
/**
 * @description: getCaseFlowLog
 */
export function getLoadTaskDetailList(params) {
  return defHttp.get({ url: Api.LoadTaskDetailList, params });
}

export function addCaseFavorite(params) {
  return defHttp.post({ url: Api.AddCaseFavorite, params });
}
export function addTaskFavorite(params?: { taskId: string; favoriteUserId: string }) {
  return defHttp.post({ url: Api.AddtaskFavorite, params });
}
export function deleteFavoriteCase(params: string) {
  return defHttp.post({ url: Api.DeleteFavoriteCase, data: params });
}
export function deleteTaskCase(params: string) {
  return defHttp.post({ url: Api.DeleteTaskCase, data: params });
}

// export function getFavoriteCaseList(params?: { uid: string }) {
//   return defHttp.get({ url: Api.FavoriteCaseList, 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 const updateSupervise = (params: { id: string; supervise: number }) =>
//   defHttp.post({ url: `${Api.Supervise}?id=${params.id}&supervise=${params.supervise}`, params });

export const getLoadParents = (params: { childId: Number }) =>
  defHttp.get({ url: `${Api.LoadParents}?childId=${params.childId}` });

export function getLoadTaskIllegalDetailList(params) {
  return defHttp.get({ url: Api.LoadTaskIllegalDetailList, params });
}

export function splitCase(params){
  return defHttp.post({ url: Api.SplitCase, data: params });
}

export function recoverCase(params){
  return defHttp.post({ url: Api.RecoverCase, data: params });
}

export function getPolygonCenter(params){
  return defHttp.get({ url: Api.GetPolygonCenter, params });
}

// export function getUserOrgs(params){
//   return defHttp.get({ url: Api.GetUserOrgs, params });
// }


// export function getIssuedStatitical(params) {
//   return defHttp.get({
//     url: Api.IssuedStatitical,
//     params,
//   });
// }

// export function getVerifyStatitical(params) {
//   return defHttp.get({
//     url: Api.VerifyStatitical,
//     params,
//   });
// }

// export function getRectificationStatitical(params) {
//   return defHttp.get({
//     url: Api.RectificationStatitical,
//     params,
//   });
// }

export function getLoadCaseImgList(params){
  return defHttp.get({
    url: Api.LoadCaseImgList,
    params,
  });
}
export function loadCaseInfoTuBanList(params) {
  return defHttp.get({
    url: Api.LoadCaseInfoTuBanList,
    params,
  });
}
export const getCaseOffence = (params) =>
  defHttp.get({ url: Api.CaseOffence, params });
export const getLoadCaseInfoListOffence = (params) =>
  defHttp.get({ url: Api.LoadCaseInfoListOffence, params });
