import request from '@/utils/request'

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

//添加
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 delFindGroupId(id) {
  // return request({
  //   url: '/vehicles/fence/delElectronById/'+id,
  //   method: 'post',
  //   data
  // })
  return request({
    url: '/enterprise/group/' + id,
    method: 'DELETE'
  })
}
//围栏链表删除
export function delFindGroupMixId(id) {
  // return request({
  //   url: '/vehicles/fence/delElectronById/'+id,
  //   method: 'post',
  //   data
  // })
  return request({
    url: '/enterprise/group/findId' + id,
    method: 'DELETE'
  })
}
