import request from '@/config/axios'

// 查询监控设备列表
export function listSipDevice(query) {
  return request.get({
    url: '/sip/device/list',
    params: query
  })
}

export function listSipDeviceChannel(deviceId) {
  return request.get({
    url: '/rq/yf-sip-device/listchannel/'+ deviceId,
    
  })
}

// 查询监控设备详细
export function getSipDevice(deviceId) {
  return request.get({
    url: '/sip/device/' + deviceId,
  
  })
}

// 新增监控设备
export function addSipDevice(data) {
  return request.post({
    url: '/sip/device',
  
    data: data
  })
}

// 修改监控设备
export function updateSipDevice(data) {
  return request.put({
    url: '/sip/device',
  
    data: data
  })
}

// 删除监控设备
export function delSipDevice(deviceId) {
  return request.delete({
    url: '/sip/device/' + deviceId,
   
  })
}

export function delSipDeviceBySipId(sipId) {
  return request.delete({
    url: '/rq/yf-sip-device/sipid/' + sipId,
    
  })
}

export function ptzdirection(deviceId,channelId,data) {
  return request.post({
    url: '/sip/ptz/direction/'+ deviceId + "/" + channelId,
   
    data: data
  })
}

export function ptzscale(deviceId,channelId,data) {
  return request.post({
    url: '/sip/ptz/scale/'+ deviceId + "/" + channelId,
    
    data: data
  })
}
