import request from '@/utils/request'

// 查询隐患及整改列表
export function listRectifications(query) {
  return request({
    url: '/dangers/rectifications/list',
    method: 'get',
    params: query
  })
}

// 查询隐患及整改详细
export function getRectifications(id) {
  return request({
    url: '/dangers/rectifications/' + id,
    method: 'get'
  })
}

// 新增隐患及整改
export function addRectifications(data) {
  return request({
    url: '/dangers/rectifications',
    method: 'post',
    data: data
  })
}

// 修改隐患及整改
export function updateRectifications(data) {
  return request({
    url: '/dangers/rectifications',
    method: 'put',
    data: data
  })
}

// 删除隐患及整改
export function delRectifications(id) {
  return request({
    url: '/dangers/rectifications/' + id,
    method: 'delete'
  })
}

// 导出隐患及整改
export function exportRectifications(query) {
  return request({
    url: '/dangers/rectifications/export',
    method: 'get',
    params: query
  })
}
