import request from '@/utils/request';
// 初始化树结构
export function getTreeAreaDeviceSelect(query) {
  return request({
    url: '/basedata/prodevmnt/device/treeAreaDeviceSelect',
    method: 'get',
    // params: query
  })
}
// 点击树结构查询
export function getMonitor(query) {
  return request({
    url: '/basedata/patrolpointmnt/patrolpoint/list/monitor',
    method: 'get',
    params: query
  })
}
// 
// 巡检类型
export function getPatroltypeList(query) {
  return request({
    url: `/basedata/patrolpointmnt/patroltype/list`,
    method: 'get',
  })
}
// 重要等级
export function pointImptLevel(query) {
  return request({
    url: `/system/dict/data/type/point_impt_level`,
    method: 'get',
  })
}
// 新增
export function postAdd(query) {
  return request({
    url: `/basedata/patrolpointmnt/patrolpoint`,
    method: 'post',
    data: query
  })
}

// 编辑
export function edit(query) {
  return request({
    url: `/basedata/patrolpointmnt/patrolpoint/edit`,
    method: 'post',
    data: query
  })
}
export function editItem(id) {
  return request({
    url: `/patrol/preset?patrolpointId=${id}`,
    method: 'get',
    // data:query
  })
}
// 移除
export function postRemove(id) {
  return request({
    url: `/basedata/patrolpointmnt/patrolpoint/remove/${id}`,
    method: 'POST',
    // data:query
  })
}

// 设置智能识别类型
export function subtypeList(id) {
  return request({
    url: `/basedata/subtype/list`,
    method: 'get',
    // data:query
  })
}
export function algList(id) {
  return request({
    url: `/basedata/alg/list`,
    method: 'get',
    // data:query
  })
}
export function vl(){
  return request({
    url: `/patrol/preset/camera/vl`,
    method: 'get',
    // data:query
  })
}
export function ir(){
  return request({
    url: `/patrol/preset/camera/ir`,
    method: 'get',
    // data:query
  })
}
// 获取摄像头列表
export function listByEqIdAndChannelId(data){
  return request({
    url: `/patrol/preset/listByEqIdAndChannelId`,
    method: 'get',
    params:data
  })
}

// 点击摄像头列表
export function realtime(data){
  return request({
    url: `/patrol/video/realtime`,
    method: 'get',
    params:data
  })
}

// 云台控制
export function PZT(data){
  return request({
    url: `/patrol/videotape/ptz`,
    method: 'get',
    params:data
  })
}
// 云台控制fi
export function fi(data){
  return request({
    url: `/patrol/videotape/ptz/fi`,
    method: 'get',
    params:data
  })
}
// 编辑预置点名称
export function goto(data){
  return request({
    url: `/patrol/preset/goto`,
    method: 'get',
    params:data
  })
}
// 预置点下发
export function issue(params) {
  return request({
    url: '/patrol/preset/issue',
    method: 'get',
    params: params
  })
}
// 绑定预置点
export function bindingPreset (data) {
  return request({
    url: '/patrol/preset',
    method: 'post',
    data: data
  })
}
// 预置点列表
export function getPresetList (params) {
  return request({
    url: '/patrol/preset',
    method: 'get',
    params: params
  })
}
// 解绑 
export function presetRemove (params) {
  return request({
    url: `/patrol/preset/remove/${params}`,
    method: 'get',
    // params: params
  })
}
// 监测设备查询
export function eqpbookList (params) {
  return request({
    url: `/basedata/eqpbook/list`,
    method: 'get',
    params: params
  })
}