import request from '@/utils/request'

// 查询视频配置列表
export function listVideoConfig(query) {
  return request({
    url: '/video/videoConfig/list',
    method: 'get',
    params: query
  })
}
// 查询视频配置列表
export function listVideoView(query) {
  return request({
    url: '/video/videoConfig/listView',
    method: 'get',
    params: query
  })
}

// 查询视频配置详细
export function getVideoConfig(id) {
  return request({
    url: '/video/videoConfig/' + id,
    method: 'get'
  })
}

// 新增视频配置
export function addVideoConfig(data) {
  return request({
    url: '/video/videoConfig',
    method: 'post',
    data: data
  })
}

// 修改视频配置
export function updateVideoConfig(data) {
  return request({
    url: '/video/videoConfig',
    method: 'put',
    data: data
  })
}

// 修改视频配置
export function updateVideoConfigSort(data) {
  return request({
    url: '/video/videoConfig/updateVideoConfigSort',
    method: 'post',
    data: data
  })
}

// 修改视频配置
export function editPassageState(data) {
  return request({
    url: '/video/videoConfig/editPassageState',
    method: 'post',
    data: data
  })
}

// 删除视频配置
export function delVideoConfig(id) {
  return request({
    url: '/video/videoConfig/' + id,
    method: 'delete'
  })
}

// 根据设备编号查询设备通道信息
export function getVideoPassage(videoDvrNumberd) {
  return request({
    url: '/video/videoConfig/getVideoPassage/' + videoDvrNumberd,
    method: 'get'
  })
}
