import request from '@/utils/request'

/*****************************3.2疏散大屏信息页面*****************************/
/*
export function hxpChemicalList(query) {
  return request({
    url: '/chemical/hxpChemical/list',
    method: 'get',
    params: query
  })
}

export function addHxpChemical(data) {
  return request({
    url: '/chemical/hxpChemical',
    method: 'post',
    data: data
  })
}

export function putHxpChemical(data) {
  return request({
    url: '/chemical/hxpChemical',
    method: 'put',
    data: data
  })
}

export function delHxpChemicalInfo(id) {
  return request({
    url: '/chemical//hxpChemical/'+id,
    method: 'delete',
  })
}
*/

//获取喇叭列表
export function getDeviceList(query) {
  return request({
    url: '/algorithm/speaker/getDeviceListBySub',
    method: 'get',
    params: query
  })
}

//喇叭发送楼层消息记录
export function addHxpChemical(data) {
  return request({
    url: '/laboratory/bigview/sendHornMess',
    method: 'post',
    data: data
  })
}
//获取最新楼层消息数据
export function getHornLastMess(query) {
  return request({
    url: '/laboratory/bigview/getHornLastMess',
    method: 'get',
    params: query
  })
}

//获取实验室人员
export function subOnlineUser(data) {
  return request({
    url: '/laboratory/onemachine/sub/online/user',
    method: 'post',
    data: data
  })
}

//获取实验室危险源数据
export function exitHazardTotal(query) {
  return request({
    url: '/laboratory/bigview/exitHazardTotal',
    method: 'get',
    params: query
  })
}
//获取实验室火焰报警数据
export function getFireStatus(query) {
  return request({
    url: '/algorithm/firedevice/getStatus',
    method: 'get',
    params: query
  })
}

//获取楼层应急疏散相关布局数据
export function getFloorData(id) {
  return request({
    url: '/laboratory/lineVertex/floor/'+id,
    method: 'get',
  })
}

//获取新楼栋楼层数据
export function getBuildOrFloorList(query) {
  return request({
    url: '/laboratory/buildFloor/getBuildOrFloorList',
    method: 'get',
    params: query
  })
}

//查询当前发生的疏散
export function getRedisEvacuation(data) {
  return request({
    url: '/laboratory/lineVertex/getRedisEvacuation',
    method: 'post',
    data: data
  })
}


//开始疏散
export function executeEvacuation(data) {
  return request({
    url: '/laboratory/lineVertex/executeEvacuation',
    method: 'post',
    data: data
  })
}
//结束疏散
export function endEvacuation(data) {
  return request({
    url: '/laboratory/lineVertex/endEvacuation',
    method: 'post',
    data: data
  })
}
//开启/关闭疏散灯
export function openLight(data) {
  return request({
    url: '/laboratory/pointRelay/openLight',
    method: 'post',
    data: data
  })
}
//开启/关闭疏散灯
export function closeLight(data) {
  return request({
    url: '/laboratory/pointRelay/closeLight',
    method: 'post',
    data: data
  })
}

//执行一键灭火 subjectId=85&deviceCode=28613608F0CA1

export function outfirepc(query) {
  return request({
    url: '/algorithm/firedevice/outfirepc',
    method: 'get',
    params: query
  })
}

//取消一键灭火
export function isCancelOutFile(query) {
  return request({
    url: '/algorithm/firedevice/isCancelOutFile',
    method: 'get',
    params: query
  })
}
//查询当前用户下的预案触发数据
export function selectTriggerInfo(query) {
  return request({
    url: '/laboratory/plan/selectTriggerInfo',
    method: 'get',
    params: query
  })
}
//标记查看的预案
export function riskPlanId(query) {
  return request({
    url: '/laboratory/plan/writerEnterRiskPlan',
    method: 'get',
    params: query
  })
}
//预警首页-获取传感器数据
export function getLotStatis(query) {
  return request({
    url: '/laboratory/buildFloorLayout/getLotStatis',
    method: 'get',
    params: query
  })
}
//预警首页-获取传感器数据
export function exitHazardTotalByBuildId(query) {
  return request({
    url: '/laboratory/bigview/exitHazardTotalByBuildId',
    method: 'get',
    params: query
  })
}

//根据楼栋获取楼层数据(用于应急疏散首页)
export function getBuildOrFloorDetailList(query) {
  return request({
    url: '/laboratory/buildFloor/getBuildOrFloorDetailList',
    method: 'get',
    params: query
  })
}
//根据楼栋获取楼栋人数
export function getBuildOrFloorInfo(query) {
  return request({
    url: '/laboratory/buildFloor/getBuildOrFloorInfo',
    method: 'get',
    params: query
  })
}

