import request from '@/utils/request'

// 查询监控设备列表
export function listMonitor(query) {
  return request({
    url: '/app/monitor/list',
    method: 'get',
    params: query
  })
}

// 查询监控设备详细
export function getMonitor(id) {
  return request({
    url: '/app/monitor/' + id,
    method: 'get'
  })
}

// 新增监控设备
export function addMonitor(data) {
  return request({
    url: '/app/monitor',
    method: 'post',
    data: data
  })
}

// 同步监控设备
export function syncMonitor() {
  return request({
    url: '/app/monitor/sync',
    method: 'post',
  })
}

// 修改监控设备
export function updateMonitor(data) {
  return request({
    url: '/app/monitor',
    method: 'put',
    data: data
  })
}

// 删除监控设备
export function delMonitor(id) {
  return request({
    url: '/app/monitor/' + id,
    method: 'delete'
  })
}

// 播放
export function playStart(data) {
  return request({
    url: '/app/monitor/playStart',
    method: 'post',
    data: data
  })
}

// 停止
export function playStop(data) {
  return request({
    url: '/app/monitor/playStop',
    method: 'post',
    data: data
  })
}
