import request from '@/utils/request'

// 查询围栏组列表
export function selectGroupList(data) {
  return request({
    url: '/fence/group/selectGroupList',
    method: 'post',
    data
  })
}
// 查询车辆列表
export function carlistselect() {
  return request({
    url: '/fence/group/carlistselect',
    method: 'post',
  })
}

//添加
export function addGroup(data) {
  return request({
    url: '/fence/group/addGroup',
    method: 'post',
    data
  })
}
//修改
export function updGroup(data) {
  return request({
    url: `/fence/group/updGroup/${data.id}`,
    method: 'post',
    data
  })
}
//添加
export function findGroupByid(id) {
  return request({
    url: '/fence/group/findGroupByid/' + id,
    method: 'post',
  })

}



//删除
export function unbindById(fenceId,groupId) {
  return request({
    url: '/fence/group/unbind/'+fenceId+"/"+groupId,
    method: 'post',
  })
}
//删除
export function deliteGroupById(id) {
  return request({
    url: '/fence/group/deliteGroupById/'+id,
    method: 'post',
  })
}

//围栏组所有
export function selectAllGroup() {
  return request({
    url: '/fence/group/selectAllGroup',
    method: 'post',
    data
  })
}


//回显绑定的电子围栏信息
export function findFenceAndWayById(id) {
  return request({
    url: '/fence/group/findFenceAndWayById/'+id,
    method: 'post',
  })
}


//围栏组绑定车辆
export function selectCarAdd(data) {
  return request({
    url: '/fence/group/selectCarAdd',
    method: 'post',
    data
  })
}
