import request from '@/utils/request'

// 查询围栏组列表
export function selectFenceGroups(data) {
  return request({
    url: '/rule/map/selectFenceGroups',
    method: 'post',
    data
  })
}

// 查询围栏列表
export function selectFence(data) {
  return request({
    url: '/rule/map/selectFence',
    method: 'post',
    data
  })
}

// 查询企业列表
export function selectFenceGroupsById(carId) {
  return request({
    url: '/rule/map/selectFenceGroupsById/' + carId,
    method: 'post'
  })
}

// 将坐标传输给电子围栏
export function getSel(data) {
  return request({
    url: '/rule/map/getSel',
    method: 'post',
    data
  })
}

//删除电子围栏
export function deleteFence(fenceId) {
  return request({
    url: '/rule/map/deleteFence/' + fenceId,
    method: 'post'
  })
}

//查看详情
export function queryFence(fenceId) {
  return request({
    url: '/rule/map/queryFence/' + fenceId,
    method: 'post'
  })
}

// 修改围栏状态
export function updateFence(fenceId) {
  return request({
    url: '/rule/map/updateFence/' + fenceId,
    method: 'post'
  })
}
