import request from './request'

export function getTrafficEventsApi(type) {
  return request({
    url: '/fjtcc-api/api/largeScreen/monitor/trafficEvents?type='+type,
    method: 'get'
  })
}
export function getVideoEventApi(scenicSpotId,type) {
  return request({
    url: '/fjtcc-api/api/largeScreen/monitor/videoEvents?type='+type+'&scenicSpotId='+scenicSpotId,
    method: 'get'
  })
}
export function getVideoEventObjImgApi(objId) {
  return request({
    url: '/fjtcc-api/api/largeScreen/monitor/videoEventsImg/'+objId,
    method: 'get'
  })
}
export function getPreviewUrlSubApi(data) {
  return request({
    url: '/fjtcc-api/api/largeScreen/video/getPreviewUrlSub',
    method: 'post',
    data
  })
}
// 安全页面视频类型
export function getVideoTypeApi(data) {
  return request({
    url: '/fjtcc-api/api/largeScreen/video/type',
    method: 'post',
    data
  })
}

// 获取区域树
export function getVideoRegionsApi(data) {
  return request({
    url: '/fjtcc-api/api/largeScreen/video/regions',
    method: 'post',
    data
  })
}

// 获取区域摄像头搜索
export function getVideoRegionsSearchApi(data) {
  return request({
    url: '/fjtcc-api/api/largeScreen/video/regions/search',
    method: 'post',
    data
  })
}

// 更新视频资源
export function postVideoRemainApi(data) {
  return request({
    url: '/fjtcc-api/api/largeScreen/video/remain',
    method: 'post',
    data
  })
}

// 根据监控点编号进行云台操作
export function postVideoControlApi(data) {
  return request({
    url: '/fjtcc-api/api/largeScreen/video/controlling',
    method: 'post',
    data
  })
}

// 收藏视频
export function postVideoCollectApi(data) {
  return request({
    url: '/fjtcc-api/api/largeScreen/video/collect',
    method: 'get',
    params: data
  })
}
