import request from '@/utils/request';
// 初始化list
export function getList(query) {
  return request({
    url: '/basedata/patrolpointmnt/patrolpointpreset/list',
    method: 'get',
    params: query
  })
}
// 巡检点位
export function patrolpoint_list(query) {
  return request({
    url: '/basedata/patrolpointmnt/patrolpoint/list',
    method: 'get',
    params: query
  })
}
//   新增
export function postAdd(query) {
  return request({
    url: '/basedata/patrolpointmnt/patrolpointpreset',
    method: 'post',
    data: query
  })
}
// 编辑查询
export function getItem(query) {
  return request({
    url: `/basedata/patrolpointmnt/patrolpointpreset/${query}`,
    method: 'get',
  })
}


// ******

// 查询巡检点预置位列表
export function listPatrolpointpreset(query) {
  return request({
    url: '/basedata/patrolpointmnt/patrolpointpreset/list',
    method: 'get',
    params: query
  })
}

// 查询巡检点预置位详细
export function getPatrolpointpreset(patrolpointPresetId) {
  return request({
    url: '/basedata/patrolpointmnt/patrolpointpreset/' + patrolpointPresetId,
    method: 'get'
  })
}

// 新增巡检点预置位
export function addPatrolpointpreset(data) {
  return request({
    url: '/basedata/patrolpointmnt/patrolpointpreset',
    method: 'post',
    data: data
  })
}

// 修改巡检点预置位
export function updatePatrolpointpreset(data) {
  return request({
    url: '/basedata/patrolpointmnt/patrolpointpreset/edit',
    method: 'post',
    data: data
  })
}

// 删除巡检点预置位
export function delPatrolpointpreset(patrolpointPresetId) {
  return request({
    url: '/basedata/patrolpointmnt/patrolpointpreset/remove/' + patrolpointPresetId,
    method: 'post'
  })
}
// 启用停用点位
export function editPoint(data) {
  return request({
    url: '/patrol/preset/param/edit',
    method: 'post',
    data
  })

}

// 获取无人机红外图片

export function irUavImg(data) {
  return request({
    url: '/simulator/ir/channelImg',
    method: 'post',
    data
  })
}

// 点位管理
// 传送无人机图片画框消息
export function capturePicture(data) {
  return request({
    url: '/simulator/ir/capturePicture',
    method: 'post',
    data
  })
}

// 任务详情
// 获取已经画过的框的数据
export function selectBoxData(data) {
  return request({
    url: '/simulator/ir/selectBoxData',
    method: 'post',
    data
  })
}

// 清楚所有框
export function clearBoxData(data) {
  return request({
    url: '/simulator/ir/deleteBoxData',
    method: 'post',
    data
  })
}

// 保存画框的数据
export function addBoxData(data) {
  return request({
    url: '/simulator/ir/addBoxData',
    method: 'post',
    data
  })
}

// 获取csv文件
export function downloadCsv(data) {
  return request({
    url: '/simulator/ir/downloadCsv',
    method: 'post',
    data
  })
}
