/**
 * 年份       year
 * 图斑来源   tubanlaiyuan
 * 图斑类型   typename
 * 县区       countyid
 * 乡镇       streetid
 * 处理状态   nowStatus
 * 下发时间段 startTime-endTime
 * 图斑号     caseNo
 * 是否立案   register
 */
// 图斑来源
import { getChildrenTree } from '@/api/demo/system';
import { asyncGetOptions } from '@/utils/global';

const counties = await getChildrenTree({ parentId: 371300 })

export const polygonSourceOptions= await asyncGetOptions('tubanlaiyuan')
// 图斑类型
export const polygonTypeOptions= await asyncGetOptions('kctubanleixing')
// 当前状态
export const statusOptions = await asyncGetOptions('kcdangqianzhuangtai')
// 是否立案
export const registerOptions =await asyncGetOptions('kcregister')
export const countiesOptions = counties.map(item => {
  return {
    label: item.name,
    value: item.id
  }
})
export const orderUtils = {
  0: null,
  1: 'asc',
  2: 'desc',
}
export const usePageRequestUrl = {
  'patternfilling': '/api/DroneCaseInfoMinerals/LoadReportingTaskList',
  'fillingaudit': '/api/DroneCaseInfoMinerals/LoadReportingAuditTaskList',
  'patternexamining': '/api/DroneCaseInfoMinerals/LoadExaminingTaskList',
  'examiningaudit': '/api/DroneCaseInfoMinerals/LoadExaminingAuditTaskList',
  'patternrectification': '/api/DroneCaseInfoMinerals/LoadRectifyingTaskList',
  'rectificationaudit': '/api/DroneCaseInfoMinerals/LoadRectifyingAuditTaskList',
  'patternadjust': '/api/DroneCaseInfoMinerals/LoadModifyingTaskList',
}
export const usePageGetSearchItem = {
  'patternfilling': ["year", "tubanlaiyuan", "typename", "countyid", "streetid", "nowStatus", "time", "caseNo"],
  'fillingaudit': ["year", "tubanlaiyuan", "typename", "countyid", "caseNo"],
  'patternexamining': ["year", "tubanlaiyuan", "register", "countyid", "caseNo"],
  'examiningaudit': ["year", "tubanlaiyuan", "register", "countyid", "caseNo"],
  'patternrectification': ["year", "tubanlaiyuan", "countyid", "caseNo"],
  'rectificationaudit': ["year", "tubanlaiyuan", "countyid", "caseNo"],
  'patternadjust': ["year", "tubanlaiyuan", "countyid", "caseNo"],
}
export const smallInput:any = ['fillingaudit','patternexamining','examiningaudit']