import request from "@/utils/request";
import fence from "@/views/system/fence/index.vue";

/**
 * 围栏列表
 * @param data
 * @returns {*}
 */
export function fenceList(data){
  return request({
    url:'/fence/fence/list',
    method:"post",
    data:data
  })
}


/**
 * 新增围栏
 * @param data
 * @returns {*}
 */
export function fenceAdd(data) {
  return request({
    url: '/fence/fence/fenceAdd',
    method: 'post',
    data
  })
}

/**
 * 删除围栏
 * @param fenceId
 * @returns {*}
 */
export function fenceDelete(fenceId) {
  return request({
    url: '/fence/fence/fenceDelete/'+fenceId,
    method: 'post'
  })
}


/**
 * 修改围栏
 * @param data
 * @returns {*}
 */
export function fenceUpdate(data) {
  return request({
    url: '/fence/fence/fenceUpdate',
    method: 'post',
    data
  })
}

export function saveFence(data) {
  return request({
    url: '/fence/fence/saveFence',
    method: 'post',
    data:JSON.stringify(data),
  })
}
