import request from '@/utils/request'

// 查询电子围栏列表
export function listFence(query) {
  return request({
    url: '/customerBusiness/fence/list',
    method: 'get',
    params: query,
    headers: {
      'enterprise-code': 'liu_0608'
    }
  })
}

// 查询电子围栏详细
export function getFence(id) {
  return request({
    url: '/customerBusiness/fence/' + id,
    method: 'get',
    headers: {
      'enterprise-code': 'liu_0608'
    }
  })
}

// 新增电子围栏
export function addFence(data) {
  return request({
    url: '/customerBusiness/fence',
    method: 'post',
    data: data,
    headers: {
      'enterprise-code': 'liu_0608'
    }
  })
}

// 修改电子围栏
export function updateFence(data) {
  return request({
    url: '/customerBusiness/fence/'+data.id,
    method: 'put',
    data: data,
    headers: {
      'enterprise-code': 'liu_0608'
    }
  })
}

// 删除电子围栏
export function delFence(id) {
  return request({
    url: '/customerBusiness/fence/' + id,
    method: 'delete'
  })
}

// 查询企业
export function selectByName() {
  return request({
    url: '/netWorking/car/selectByName',
    method: 'get',
  })
}
