import request from '@/utils/request'

// 管控对象列表
export function hazardList(params) {
  return request({
    url: `/doubledefense/hazard/list`,
    method: "get",
    params
  });
}

// 查询区域树
export function areaTree(params) {
  return request({
    url: `/system/area/tree`,
    method: "get",
    params
  });
}

// 新增风险分析对象
export function saveHazard(data) {
  return request({
    url: `/doubledefense/hazard`,
    method: "post",
    data
  });
}

// 修改风险分析对象
export function editHazard(data) {
  return request({
    url: `/doubledefense/hazard`,
    method: "put",
    data
  });
}

// 删除
export function delHazard(data) {
  return request({
    url: `/doubledefense/hazard/${data}`,
    method: "delete",
    
  });
}

// 设备设施列表(下拉)
export function deviceList(params) {
  return request({
    url: `/doubledefense/device/list`,
    method: "get",
    params
  });
}