import request from '@/utils/request'
/**
 * 获取围栏数据
 * @param {object} data
 * {
    "buildId": "string",
    "floorNoArray": [0],
    "extent": [0],
    "riskLevelArray":[1,2,3,4]  //是否获取四色图
   }
 * @returns
 */
export function getRailListJson(data) {
  return request({
    url: 'positioning/map/getRailListJson',
    method: 'post',
    data: data
  })
}

/**
 * 获取区域数据
 * @param {object} data
 * {
    "buildId": "string",
    "riskLevelArray":[1,2,3,4]  //是否获取四色图
   }
 * @returns
 */
export function getAreaListJson(data) {
  return request({
    url: 'positioning/map/getAreaListJson',
    method: 'post',
    data: data
  })
}

/**
 * 获取正在报警的围栏数据
 * @param {object} data
 * @returns
 */
export function getAlarmRail(data) {
  return request({
    url: 'positioning/map/getAlarmRail',
    method: 'post',
    data: data
  })
}

/**
 * 获取摄像头数据
 * @param {object} data
 * {
    "buildId": "string",
    "floorNoArray": [0],
    "extent": [0],
    "riskLevelArray":[1,2,3,4]  //是否获取四色图
   }
 * @returns
 */
   export function getCameraListJson(data) {
    return request({
      url: 'positioning/map/getCameraListJson',
      method: 'post',
      data: data
    })
  }

  /**
 * 获取摄像头数据
 * @param {object} data
 * {
    "buildId": "string",
    "floorNoArray": [0],
    "extent": [0],
    "riskLevelArray":[1,2,3,4]  //是否获取四色图
   }
 * @returns
 */
   export function getPerimeterListJson(data) {
    return request({
      url: 'positioning/map/getPerimeterListJson',
      method: 'post',
      data: data
    })
  }

/**
 * 获取定位标签
 * @param {object} data
    {
      "buildId": "string",
      "floorNoArray": [0],
      "extent": [0]
    }
 * @returns
 */
export function getPositioningJson(data) {
  return request({
    url: 'positioning/map/getPositioningJson',
    method: 'post',
    data: data
  })
}

/**
 * 获取信标数据
 * @param {object} data
    {
      "buildId": "string",
      "floorNoArray": [0],
      "extent": [0]
    }
 * @returns
 */
export function getiBeaconListJson(data) {
  return request({
    url: 'positioning/map/getiBeaconListJson',
    method: 'post',
    data: data
  })
}

/**
 * 获取人员信息
 * @param {object} data
 * @returns
 */
export function getPersonEntity(data) {
  return request({
    url: 'positioning/map/getPersonEntity',
    method: 'post',
    data
  })
}

/**
 * 获取历史轨迹
 * @param {object} data
  {
    "buildId": "string",
    "floorNoArray": [0],
    "extent": [0],
    "mac": "string",
    "startTime": "2021-09-14T08:54:56.627Z",
    "endTime": "2021-09-14T08:54:56.627Z"
  }
 * @returns
 */
export function getPositioningHistory(data) {
  return request({
    url: 'positioning/map/getPositioningHistory',
    method: 'post',
    data: data
  })
}

/**
 * 获取自定义数值
 * @param {object} data
 * @returns
 */
 export function getCustomConut(data) {
  return request({
    url: 'positioning/map/getCustomConut',
    method: 'post',
    data: data
  })
}

/**
 * 设置自定义数值
 * @param {object} data
 * @returns
 */
 export function setCustomConut(data) {
  return request({
    url: 'positioning/map/setCustomConut',
    method: 'post',
    data: data
  })
}
