import request from '@/utils/request'

// 设备设施列表
export function eventList(params) {
  return request({
    url: `/doubledefense/event/list`,
    method: "get",
    params
  });
}
// 分析单元列表
export function unitList(params) {
  return request({
    url: `/doubledefense/unit/list`,
    method: "get",
    params
  });
}

// 分析对象的下拉菜单
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
  });
}
// PC查询部门树结构接口
export function deptTree(params) {
  return request({
    url: `/system/user/deptTree `,
    method: "get",
    params
  });
}

// 新增设备设施
export function saveEvent(data) {
  return request({
    url: `/doubledefense/event`,
    method: "post",
    data
  });
}

// 修改设备设施
export function editEvent(data) {
  return request({
    url: `/doubledefense/event`,
    method: "put",
    data
  });
}

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