import request from '@/utils/request'

// 查询摄像头管理列表
export function listCamera(query) {
  return request({
    url: '/management/camera/list',
    method: 'get',
    params: query
  })
}

// 查询摄像头管理详细
export function getCamera(cameraId) {
  return request({
    url: '/management/camera/' + cameraId,
    method: 'get'
  })
}

// 新增摄像头管理
export function addCamera(data) {
  return request({
    url: '/management/camera',
    method: 'post',
    data: data
  })
}

// 修改摄像头管理
export function updateCamera(data) {
  return request({
    url: '/management/camera',
    method: 'put',
    data: data
  })
}

// 删除摄像头管理
export function delCamera(cameraId) {
  return request({
    url: '/management/camera/' + cameraId,
    method: 'delete'
  })
}

// 导出摄像头管理
export function exportCamera(query) {
  return request({
    url: '/management/camera/export',
    method: 'get',
    params: query
  })
}
// 导出摄像头管理
export function checkOnline(id) {
    return request({
      url: '/management/camera/checkOnline/'+id,
      method: 'get'
    })
  }
