import request from '@/utils/request'

// 查询设备完整性维修申请列表
export function listMaintenance(query) {
  return request({
    url: '/intact/maintenance/list',
    method: 'get',
    params: query
  })
}

export function hisApprovelist(query) {
  return request({
    url: '/intact/maintenance/hisApprovelist',
    method: 'get',
    params: query
  })
}

// 查询设备完整性维修申请详细
export function getMaintenance(id) {
  return request({
    url: '/intact/maintenance/' + id,
    method: 'get'
  })
}

// 新增设备完整性维修申请
export function addMaintenance(data) {
  return request({
    url: '/intact/maintenance',
    method: 'post',
    data: data
  })
}

// 修改设备完整性维修申请
export function updateMaintenance(data) {
  return request({
    url: '/intact/maintenance',
    method: 'put',
    data: data
  })
}

// 删除设备完整性维修申请
export function delMaintenance(id) {
  return request({
    url: '/intact/maintenance/' + id,
    method: 'delete'
  })
}

// 导出设备完整性维修申请
export function exportMaintenance(query) {
  return request({
    url: '/intact/maintenance/export',
    method: 'get',
    params: query
  })
}
