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

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