import request from '@/utils/request'

// 隐患
// 查询列表
export function getDangerList(query) {
  return request({
    url: '/doubledefense/danger/list',
    method: 'get',
    params: query
  })
}
// 删除数据
export function delDanger(ids) {
  return request({
    url: `/doubledefense/danger/${ids}`,
    method: 'delete'
  })
}
// 修改
export function editDanger(data) {
  return request({
    url: '/doubledefense/danger',
    method: 'put',
    data
  })
}
// 获取详细信息
export function getDangerDetails(id) {
  return request({
    url: `/doubledefense/danger/${id}`,
    method: 'get'
  })
}
// 新增
export function addDanger(data) {
  return request({
    url: '/doubledefense/danger',
    method: 'post',
    data
  })
}
// 获取区域数据
export function getAreaTree (params) {
  return request({
    url: '/system/area/tree',
    method: 'get',
    params
  })
}

