import request from '@/utils/request'

// 查询隐患信息列表
export function listEhsHiddenDanger(query) {
  return request({
    url: '/ehsHiddenDanger/ehsHiddenDanger/list',
    method: 'get',
    params: query
  })
}

// 查询隐患信息详细
export function getEhsHiddenDanger(hiddenDangerId) {
  return request({
    url: '/ehsHiddenDanger/ehsHiddenDanger/' + hiddenDangerId,
    method: 'get'
  })
}

// 新增隐患信息
export function addEhsHiddenDanger(data) {
  return request({
    url: '/ehsHiddenDanger/ehsHiddenDanger',
    method: 'post',
    data: data
  })
}

// 修改隐患信息
export function updateEhsHiddenDanger(data) {
  return request({
    url: '/ehsHiddenDanger/ehsHiddenDanger',
    method: 'put',
    data: data
  })
}

// 删除隐患信息
export function delEhsHiddenDanger(hiddenDangerId) {
  return request({
    url: '/ehsHiddenDanger/ehsHiddenDanger/' + hiddenDangerId,
    method: 'delete'
  })
}

// 督办
export function superviseEhsHiddenDanger(hiddenDangerId) {
  return request({
    url: '/ehsHiddenDanger/ehsHiddenDanger/supervise/' + hiddenDangerId,
    method: 'get'
  })
}
// 协办
export function assistEhsHiddenDanger(data) {
  return request({
    url: '/ehsHiddenDanger/ehsHiddenDanger/assist' ,
    method: 'get',
    params: data
  })
}
