import request from '@/utils/request'

// 查询事件报告清单列表
export function listRecords(query) {
  return request({
    url: '/ehs/records/list',
    method: 'get',
    params: query
  })
}

// 查询事件报告清单详细
export function getRecords(id) {
  return request({
    url: '/ehs/records/' + id,
    method: 'get'
  })
}

// 新增事件报告清单
export function addRecords(data) {
  return request({
    url: '/ehs/records',
    method: 'post',
    data: data
  })
}

// 修改事件报告清单
export function updateRecords(data) {
  return request({
    url: '/ehs/records',
    method: 'put',
    data: data
  })
}

// 删除事件报告清单
export function delRecords(id) {
  return request({
    url: '/ehs/records/' + id,
    method: 'delete'
  })
}

// 导出事件报告清单
export function exportRecords(query) {
  return request({
    url: '/ehs/records/export',
    method: 'get',
    params: query
  })
}