import request from '@/utils/request'

const formDataHeader = {
  headers: {
    'Content-Type': 'application/x-www-form-urlencoded'
  }
}
/**
 * 获取 工单总数量
 */
export const fetchTodoTasks = () => request.get('/api/services/app/Repair/GetTodoTasks')

/**
 * 获取 工单维修列表
 */
interface RepairList {
  state: number
}
export const fetchTodoRepairList = (params: RepairList) =>
  request.get('/api/services/app/Repair/GetTodoRepairList', { params })

/**
 * 获取 全部工单
 */
interface AllDevices {
  //  1, 2, 3, 4, 5
  state?: number
  Keyword?: string
  MaxResultCount?: string
  SkipCount?: string
}
export const getRepairForAllDevices = (params: any) =>
  request.get('/api/services/app/Repair/GetRepairForAllDevices', { params })
