import request from '@/utils/request'

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

// 查询维修任务详细
export function getRepair(id) {
  return request({
    url: '/task/repair/' + id,
    method: 'get'
  })
}

// 新增维修任务
export function addRepair(data) {
  return request({
    url: '/task/repair',
    method: 'post',
    data: data
  })
}

// 修改维修任务
export function updateRepair(data) {
  return request({
    url: '/task/repair',
    method: 'put',
    data: data
  })
}

// 删除维修任务
export function delRepair(id) {
  return request({
    url: '/task/repair/' + id,
    method: 'delete'
  })
}

export function divideRepair(id) {
  return request({
    url: '/task/repair/' + id,
    method: 'put'
  })
}
