// 首页工单数据
import request from '@/utils/request'

// 获取工单状态统计数据
export function getOrderState(datetype) {
  return request({
    url: 'workorderapi/api/baseworkorder/getworkorderstatecount',
    method: 'get',
    params: {
      datetype
    }
  })
}

// 获取工单类型统计数据
export function getOrderType(datetype) {
  return request({
    url: 'workorderapi/api/baseworkorder/getworkordertypecount',
    method: 'get',
    params: {
      datetype
    }
  })
}

// 获取工单来源统计数据
export function getOrderSource(datetype) {
  return request({
    url: 'workorderapi/api/baseworkorder/getworkordersourcecount',
    method: 'get',
    params: {
      datetype
    }
  })
}

// 获取工单24小时统计数据
export function getOrderHoursCount(datetype) {
  return request({
    url: 'workorderapi/api/baseworkorder/getworkorder24count',
    method: 'get',
    params: {
      datetype
    }
  })
}

// 获取工单排行统计数据
export function getOrderLists(params) {
  return request({
    url: 'workorderapi/api/baseworkorder/getusercountrank',
    method: 'get',
    params
  })
}
