import request from '@/utils/request'

// 查询维修审批列表
export function listRepair(query) {
  return request({
    url: '/oa/repair/list',
    method: 'get',
    params: query
  })
}

// 查询维修审批详细
export function getRepair(repairId) {
  return request({
    url: '/oa/repair/' + repairId,
    method: 'get'
  })
}

// 新增维修审批
export function addRepair(data) {
  return request({
    url: '/oa/repair',
    method: 'post',
    data: data
  })
}

// 修改维修审批
export function updateRepair(data) {
  return request({
    url: '/oa/repair',
    method: 'put',
    data: data
  })
}

// 删除维修审批
export function delRepair(repairId) {
  return request({
    url: '/oa/repair/' + repairId,
    method: 'delete'
  })
}

// 维修审批统计
export function getRepairStatistic(query) {
  return request({
    url: '/oa/repair/statistic',
    method: 'get',
    params: query
  })
}
