import request from '@/utils/request'

// 查询巡检事故列表
export function listAccident(query) {
  return request({
    url: '/system/accident/list',
    method: 'get',
    params: query
  })
}

// 查询巡检事故详细
export function getAccident(id) {
  return request({
    url: '/system/accident/' + id,
    method: 'get'
  })
}

// 新增巡检事故
export function addAccident(data) {
  return request({
    url: '/system/accident',
    method: 'post',
    data: data
  })
}

// 修改巡检事故
export function updateAccident(data) {
  return request({
    url: '/system/accident',
    method: 'put',
    data: data
  })
}

// 删除巡检事故
export function delAccident(id) {
  return request({
    url: '/system/accident/' + id,
    method: 'delete'
  })
}

// 导出巡检事故
export function exportAccident(query) {
  return request({
    url: '/system/accident/export',
    method: 'get',
    params: query
  })
}
