import request from '@/utils/request'

// 查询电子围栏列表
export function listFence(data) {
  return request({
    url: '/vehicles/sysCorpuscleFence/list',
    method: 'POST',
    data: data
  })
}
/**
 * 导出
 * @param response 请求响应
 * @param etlDictionaries 导出数据信息
 */
export function selectSourceExport(data){
  return request({
    url: "/vehicles/sysCorpuscleFence/export",
    method: "POST",
    data: data
  })
}
/**
 * 根据电子围栏表ID查询数据源信息
 * @param etlSysCorpuscleFenceId 请求对象
 * @return 返回结果
 */
export function getFence(id) {
  return request({
    url: '/vehicles/sysCorpuscleFence/' + id,
    method: 'GET'
  })
}
/**
 * 新增（添加）电子围栏
 * @param sysCorpuscleFenceAddReq 请求对象
 * @return 返回结果
 */
export function addFence(data) {
  return request({
    url: '/vehicles/sysCorpuscleFence/addSysCorpuscleFence',
    method: 'POST',
    data: data
  })
}

/**
 * 修改电子围栏
 * @param sysCorpuscleFence 请求对象
 * @return 返回结果
 */
export function updateFence(data) {
  return request({
    url: '/vehicles/sysCorpuscleFence/updSysCorpuscleFence',
    method: 'POST',
    data: data
  })
}

/**
 * 电子围栏表信息表删除
 * @param etlSysCorpuscleFenceId 请求对象
 * @return 返回结果
 */
export function delFence(id) {
  return request({
    url: '/vehicles/sysCorpuscleFence/' + id,
    method: 'DELETE'
  })
}

export function getFencePath(id){
  return request({
    url: '/vehicles/sysCorpuscleFence/' + id,
    method: 'GET'
  })
}

export function saveFencePath(data){
  return request({
    url: '/vehicles/sysCorpuscleFence/updSysCorpuscleFence',
    method: 'POST',
    data: data
  })
}
