import request from '@/utils/request'

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

// 查询摄像头列表
export function listCameraByDept(query) {
  return request({
    url: '/center-monitor/camera/selectCameraListByDeptIdAndWorkingStatus',
    method: 'get',
    params: query
  })
}

// 查询摄像头列表
export function listStateLog(query) {
  return request({
    url: '/center-monitor/camera/listStateLog',
    method: 'get',
    params: query
  })
}

// 查询摄像头详细
export function getCamera(id) {
  return request({
    url: '/center-monitor/camera/' + id,
    method: 'get'
  })
}

// 查询摄像头通道ID
export function selectchannelCodeByCameraId(cameraId) {
  return request({
    url: '/center-monitor/camerachannel/selectchannelCodeByCameraId/' + cameraId,
    method: 'get'
  })
}

// 新增摄像头
export function addCamera(data) {
  return request({
    url: '/center-monitor/camera',
    method: 'post',
    data: data
  })
}

// 修改摄像头
export function updateCamera(data) {
  return request({
    url: '/center-monitor/camera',
    method: 'put',
    data: data
  })
}

// 删除摄像头
export function delCamera(id) {
  return request({
    url: '/center-monitor/camera/' + id,
    method: 'delete'
  })
}

// 刷新设备状态
export function synchronizeOfflineCamera() {
  return request({
    url: '/center-monitor/DahuaController/synchronizeOfflineCamera',
    method: 'post',
  })
}

export function HKTVWall(params) {
  return request({
    url: '/center-monitor/camera/HKTVWall',
    method: 'get',
    params:params
  })
}



