import { responsesmodel } from './model/queryModal';
import { defHttp } from '@/utils/http/axios';

enum Api {
  // complete-分页获取列表数据
  Get_LoadCaseInfoList = '/api/DroneCaseinfo/LoadCaseInfoList',
  // complete-
  Get_LoadList = '/api/Categorys/LoadList',
  // complete-
  Get_load = '/api/categorys/load',
  // complete-
  Get_OrgList = '/api/Orgs/OrgList',
  // complete-导出
  Get_ExportCaseInfoList = '/api/DroneCaseinfo/ExportCaseInfoList', 

  // 案件详情
  Get_getCaseInfo = '/api/DroneCaseinfo/GetCaseInfo',
  // 获取案件处理流程
  Get_GetCaseFlowLog = '/api/DroneCaseinfo/GetCaseFlowLog',
  // 处理详情
  Get_GetDroneCaseDeal = '/api/DroneCaseinfo/GetDroneCaseDeal',
}

// complete-分页获取列表数据
export function fun_LoadDataBaseInfo(params) {
  params.typeid = params.value.typeid;
  params.org = params.value.org;
  params.is_illegal = params.value.is_illegal;
  params.case_no = params.value.case_no;
  params.key = params.value.key;
  params.deal_username = params.value.deal_username;
  params.verifyuser = params.value.verifyuser;
  params.report_start_time = params.value.report_start_time;
  params.report_end_time = params.value.report_end_time;
  params.countyid = params.value.countyid;
  params.streetid = params.value.streetid;
  params.communityid = params.value.communityid;
  delete params.value;

  return defHttp.get<responsesmodel>({
    url: Api.Get_LoadCaseInfoList,
    params,
  });
}

// complete-分页获取列表数据
export function fun_LoadList(params) {
  return defHttp.get<responsesmodel>({
    url: Api.Get_LoadList,
    params,
  });
}

// complete-分页获取列表数据
export function fun_load(params) {
  return defHttp.get<responsesmodel>({
    url: Api.Get_load,
    params,
  });
}

// complete-分页获取列表数据
export function fun_OrgList(params) {
  return defHttp.get<responsesmodel>({
    url: Api.Get_OrgList,
    params,
  });
}

// complete-导出
export function fun_ExportCaseInfoList(params) {
  return defHttp.get<responsesmodel>({
    url: Api.Get_ExportCaseInfoList,
    params,
  });
}

// 案件详情
export function fun_getCaseInfo(params) {
  return defHttp.get<responsesmodel>({
    url: Api.Get_getCaseInfo,
    params,
  });
}

// 处理详情
export function fun_GetCaseFlowLog(params) {
  return defHttp.get<responsesmodel>({
    url: Api.Get_GetCaseFlowLog,
    params,
  });
}

// 获取案件处理流程
export function fun_GetDroneCaseDeal(params) {
  return defHttp.get<responsesmodel>({
    url: Api.Get_GetDroneCaseDeal,
    params,
  });
}
