import request from '@/utils/request'
/************ 预案音乐 ************/
//预案音乐-列表
export function laboratoryMusicList(data) {
  return request({
    url: '/laboratory/music/list',
    method: 'post',
    data: data
  })
}
//预案音乐-新增
export function laboratoryMusicAdd(data) {
  return request({
    url: '/laboratory/music/add',
    method: 'post',
    data: data
  })
}
//预案音乐-编辑
export function laboratoryMusicUpdate(data) {
  return request({
    url: '/laboratory/music/update',
    method: 'post',
    data: data
  })
}
//预案音乐-删除
export function laboratoryMusicDelete(data) {
  return request({
    url: '/laboratory/music/delete',
    method: 'post',
    data: data
  })
}
/*
预案音乐-下拉列表
musicType:1预案音乐，2疏散音乐
*/
export function laboratoryMusicFindByType(query) {
  return request({
    url: '/laboratory/music/findByType',
    method: 'get',
    params: query
  })
}
//预案音乐-详情
export function laboratoryMusicDetail(query) {
  return request({
    url: '/laboratory/music/detail',
    method: 'get',
    params: query
  })
}
/************ 设备功能 ************/
//设备功能-下拉列表
export function laboratoryRiskDeviceTypeGetList(query) {
  return request({
    url: '/laboratory/riskDeviceType/getList',
    method: 'get',
    params: query
  })
}
//设备功能-列表
export function laboratoryRiskDeviceTypeList(data) {
  return request({
    url: '/laboratory/riskDeviceType/list',
    method: 'post',
    data: data
  })
}
//设备功能-新增
export function laboratoryRiskDeviceTypeAdd(data) {
  return request({
    url: '/laboratory/riskDeviceType/add',
    method: 'post',
    data: data
  })
}
//设备功能-编辑
export function laboratoryRiskDeviceTypeUpdate(data) {
  return request({
    url: '/laboratory/riskDeviceType/update',
    method: 'post',
    data: data
  })
}
//设备功能-删除
export function laboratoryRiskDeviceTypeDelete(data) {
  return request({
    url: '/laboratory/riskDeviceType/delete',
    method: 'post',
    data: data
  })
}
//设备功能-详情
export function laboratoryRiskDeviceTypeDetail(query) {
  return request({
    url: '/laboratory/riskDeviceType/detail',
    method: 'get',
    params: query
  })
}
/************ 预案管理 ************/
//预案管理-列表
export function laboratoryPlanList(data) {
  return request({
    url: '/laboratory/plan/list',
    method: 'post',
    data: data
  })
}
//预案管理-新增
export function laboratoryPlanAdd(data) {
  return request({
    url: '/laboratory/plan/add',
    method: 'post',
    data: data
  })
}
//预案管理-编辑
export function laboratoryPlanUpdate(data) {
  return request({
    url: '/laboratory/plan/update',
    method: 'post',
    data: data
  })
}
//预案管理-删除
export function laboratoryPlanDelete(data) {
  return request({
    url: '/laboratory/plan/delete',
    method: 'post',
    data: data
  })
}
//预案管理-详情
export function laboratoryPlanDetail(query) {
  return request({
    url: '/laboratory/plan/detail',
    method: 'get',
    params: query
  })
}
//预案管理-预案规则-列表
export function laboratoryRiskPlanLevelGetRiskPlanLeveList(query) {
  return request({
    url: '/laboratory/riskPlanLevel/getRiskPlanLeveList',
    method: 'get',
    params: query
  })
}
//预案管理-预案规则-新增
export function laboratoryRiskPlanLevelAdd(data) {
  return request({
    url: '/laboratory/riskPlanLevel/add',
    method: 'post',
    data: data
  })
}
//预案管理-预案规则-编辑
export function laboratoryRiskPlanLevelUpdate(data) {
  return request({
    url: '/laboratory/riskPlanLevel/update',
    method: 'post',
    data: data
  })
}
//预案管理-预案规则-删除
export function laboratoryRiskPlanLevelDelete(data) {
  return request({
    url: '/laboratory/riskPlanLevel/delete',
    method: 'post',
    data: data
  })
}
//预案管理-查询已关联实验室列表
export function laboratoryRiskPlanSubjectRelationRelationSubList(data) {
  return request({
    url: '/laboratory/riskPlanSubjectRelation/relationSubList',
    method: 'post',
    data: data
  })
}
//预案管理-查询未关联实验室列表
export function laboratoryRiskPlanSubjectRelationNoRelationSubList(data) {
  return request({
    url: '/laboratory/riskPlanSubjectRelation/noRelationSubList',
    method: 'post',
    data: data
  })
}
//预案管理-关联实验室
export function laboratoryRiskPlanSubjectRelationRelationSub(data) {
  return request({
    url: '/laboratory/riskPlanSubjectRelation/relationSub',
    method: 'post',
    data: data
  })
}
//预案管理-批量关联实验室
export function laboratoryRiskPlanSubjectRelationBatchRelationSub(data) {
  return request({
    url: '/laboratory/riskPlanSubjectRelation/batchRelationSub',
    method: 'post',
    data: data
  })
}
//预案管理-解除关联实验室
export function laboratoryRiskPlanSubjectRelationDelete(data) {
  return request({
    url: '/laboratory/riskPlanSubjectRelation/delete',
    method: 'post',
    data: data
  })
}
//执行记录-列表
export function laboratoryEventList(data) {
  return request({
    url: '/laboratory/event/list',
    method: 'post',
    data: data
  })
}
//执行记录-详情
export function laboratoryEventFindByEventId(query) {
  return request({
    url: '/laboratory/event/findByEventId',
    method: 'get',
    params: query
  })
}
/************ 风险统计 ************/
//风险统计-风险类型占比(饼图)
export function laboratoryEventHappenChart(query) {
  return request({
    url: '/laboratory/event/happenChart',
    method: 'get',
    params: query
  })
}
//风险统计-风险统计(线图)
export function laboratoryEventLineChart(query) {
  return request({
    url: '/laboratory/event/lineChart',
    method: 'get',
    params: query
  })
}
//风险统计-风险数(柱图)
export function laboratoryEventStatisticsChartDept(query) {
  return request({
    url: '/laboratory/event/statisticsChartDept',
    method: 'get',
    params: query
  })
}
//风险统计-列表
export function laboratoryEventLogEventLogStatistics(data) {
  return request({
    url: '/laboratory/eventLog/eventLogStatistics',
    method: 'post',
    data: data
  })
}
/************ 应急处置 ************/
//根据权限所属实验室反查楼栋楼层  type:2.楼栋 3.楼层
export function laboratoryBigViewGetBuildByBigView(query) {
  return request({
    url: '/laboratory/bigView/getBuildByBigView',
    method: 'get',
    params: query
  })
}
//应急处置-获取楼层布局数据
export function laboratoryBigViewGetFloorByBigView(query) {
  return request({
    url: '/laboratory/bigView/getFloorByBigView',
    method: 'get',
    params: query
  })
}
//应急处置-获取楼层-智能物联设备列表
export function iotBigViewStatisticsHardwareDeviceType(query) {
  return request({
    url: '/iot/bigView/statistics/hardwareDeviceType',
    method: 'get',
    params: query
  })
}
/*
应急处置-指定物联设备查询列表
typeKey:'camera'//摄像头
楼层或实验室 floorId 楼层ID  subjectId  实验室ID
*/
export function iotBigViewDeviceList(data) {
  return request({
    url: '/iot/bigView/device/list',
    method: 'post',
    data: data
  })
}
//应急处置-获取当前楼栋-楼层下的疏散数据
export function laboratoryExitLineGetRedisEvacuation(data) {
  return request({
    url: '/laboratory/exitLine/getRedisEvacuation',
    method: 'post',
    data: data
  })
}
//应急处置-执行疏散
export function laboratoryExitLineExecuteEvacuation(data) {
  return request({
    url: '/laboratory/exitLine/executeEvacuation',
    method: 'post',
    data: data
  })
}
//应急处置-结束疏散
export function laboratoryExitLineEndEvacuation(data) {
  return request({
    url: '/laboratory/exitLine/endEvacuation',
    method: 'post',
    data: data
  })
}
//应急处置-查询楼层/实验室人员
export function laboratoryBigViewOnLineUserList(data) {
  return request({
    url: '/laboratory/bigView/onLineUserList',
    method: 'post',
    data: data
  })
}
//应急处置-查询实验室硬件列表
export function iotBigViewHardwareFindByType(data) {
  return request({
    url: '/iot/bigView/hardware/findByType',
    method: 'post',
    data: data
  })
}
//应急处置-查询实验室传感器列表
export function iotBigViewDeviceFindBySubId(query) {
  return request({
    url: '/iot/bigView/device/findBySubId',
    method: 'get',
    params: query
  })
}
//应急处置-查询实验室喇叭列表
export function iotBigViewDeviceFindByType(data) {
  return request({
    url: '/iot/bigView/device/findByType',
    method: 'post',
    data: data
  })
}
//应急处置-喇叭播放文本
export function iotBigViewSpeakerPlayText(query) {
  return request({
    url: '/iot/bigView/speaker/playText',
    method: 'get',
    params: query
  })
}
//应急处置-设备开关
export function iotBigViewHardwareOperatingHardware(query) {
  return request({
    url: '/iot/bigView/hardware/operatingHardware',
    method: 'get',
    params: query
  })
}
//应急处置-危险源列表
export function laboratoryBigViewHazardCensus(data) {
  return request({
    url: '/laboratory/bigView/hazardCensus',
    method: 'post',
    data: data
  })
}
//应急处置-开灯
export function laboratoryExitRelayOpenLight(data) {
  return request({
    url: '/laboratory/exitRelay/openLight',
    method: 'post',
    data: data
  })
}
//应急处置-关灯
export function laboratoryExitRelayCloseLight(data) {
  return request({
    url: '/laboratory/exitRelay/closeLight',
    method: 'post',
    data: data
  })
}
//应急处置-结束预案
export function laboratoryPlanCloseRiskPlan(query) {
  return request({
    url: '/laboratory/plan/closeRiskPlan',
    method: 'get',
    params: query
  })
}



