import request from '@/utils/request'

// 查询巡检列表
export function listPatrol(query) {
  return request({
    url: '/pssr/patrol/list',
    method: 'get',
    params: query
  })
}

// 查询巡检详细
export function getPatrol(id) {
  return request({
    url: '/pssr/patrol/' + id,
    method: 'get'
  })
}

// 新增巡检
export function addPatrol(data) {
  return request({
    url: '/pssr/patrol',
    method: 'post',
    data: data
  })
}

// 修改巡检
export function updatePatrol(data) {
  return request({
    url: '/pssr/patrol',
    method: 'put',
    data: data
  })
}

//
export function updatePatrolBatch(data) {
  return request({
    url: '/pssr/patrol/editBatch',
    method: 'put',
    data: data
  })
}


// 删除巡检
export function delPatrol(id) {
  return request({
    url: '/pssr/patrol/' + id,
    method: 'delete'
  })
}

// 导出巡检
export function exportPatrol(query) {
  return request({
    url: '/pssr/patrol/export',
    method: 'get',
    params: query
  })
}
