import request from '@/utils/request'

/*                分类获取公共配置
* category        1.系统参数 2.公共配置
* configType      1.基础配置 2.管控一体机 3.化学品终端 4.小程序配置 5.开发配置 6.首页配置
*/
export function getConfigByType(data) {
  return request({
    url: '/system/config/info/getConfigByType',
    method: 'post',
    data: data
  })
}

//获取摄像头流地址
export function iotCameraFindByCondition(data) {
  return request({
    url: '/iot/camera/findByCondition',
    method: 'post',
    data: data
  })
}

//根据设备ID获取摄像头流地址
export function iotCameraGetPreviewURLs(query) {
  return request({
    url: '/iot/camera/getPreviewURLs',
    method: 'get',
    params: query
  })
}

//获取当前正在发生的预案
export function laboratoryBigViewSelectTriggerInfo(query) {
  return request({
    url: '/laboratory/bigView/selectTriggerInfo',
    method: 'get',
    params: query
  })
}

//获取实验室传感器
export function iotSensorFindBySubId(query) {
  return request({
    url: '/iot/sensor/findBySubId',
    method: 'get',
    params: query
  })
}

//获取时间
export function laboratoryWsBigViewGetTimeData(query) {
  return request({
    url: '/laboratory/wsBigView/getTimeData?type=1',
    method: 'get',
    params: query
  })
}

//实验室今日人次
export function laboratoryWsBigViewGetUsePerson(query) {
  return request({
    url: '/laboratory/wsBigView/getUsePerson',
    method: 'get',
    params: query
  })
}

//应急处置-结束预案
export function laboratoryPlanCloseRiskPlan(query) {
  return request({
    url: '/laboratory/plan/closeRiskPlan',
    method: 'get',
    params: query
  })
}
