import request from '@/utils/request'

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

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

}



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

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



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


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

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




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

