import request from '@/utils/request'

// 查询风险信息列表
export function listEhsRisk(query) {
  return request({
    url: '/ehsRisk/ehsRisk/list',
    method: 'get',
    params: query
  })
}

// 查询风险信息详细
export function getEhsRisk(riskId) {
  return request({
    url: '/ehsRisk/ehsRisk/' + riskId,
    method: 'get'
  })
}

// 新增风险信息
export function addEhsRisk(data) {
  return request({
    url: '/ehsRisk/ehsRisk',
    method: 'post',
    data: data
  })
}

// 修改风险信息
export function updateEhsRisk(data) {
  return request({
    url: '/ehsRisk/ehsRisk',
    method: 'put',
    data: data
  })
}

// 删除风险信息
export function delEhsRisk(riskId) {
  return request({
    url: '/ehsRisk/ehsRisk/' + riskId,
    method: 'delete'
  })
}
