派生自 wuyushui/SewerAndRainNetwork

wangqi
2021-03-31 d2e9d2b78cacbb18fbb2272f49b40064849c545b
修改文件接口路徑
1个文件已修改
22 ■■■■■ 已修改文件
src/components/LayerController/logic/WasteGas.js 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/LayerController/logic/WasteGas.js
@@ -5,8 +5,10 @@
// const AjaxUtils = require('../../../utils/AjaxUtils').default
// 区分不同类型 使用不同img
const defaultImg = '/assets/images/map/exhaust/fq_blue.png'
const setting = '/assets/images/map/exhaust/fq_gray.png'
const ImgBlue = '/assets/images/map/exhaust/fq_blue.png'
const ImgGray = '/assets/images/map/exhaust/fq_gray.png'
const ImagGreen = '/assets/images/map/exhaust/fq_green.png'
const ImagBright = '/assets/images/map/exhaust/fq_bright_green.png'
const mapApi = require('../../../api/mapApi').default
module.exports = function () {
@@ -24,8 +26,8 @@
      const positionX = data[i].Latitude
      const positionY = data[i].Longitude
      // 定义类型 用来区分数据
      const judgeValue = data[i].StorageQty
      var iconUrl = this.differentTypes(judgeValue)
      const ContrLevel = data[i].ContrLevel
      var iconUrl = this.differentTypes(ContrLevel)
      const marker = L.marker.magic([positionX, positionY], {
        icon: L.icon({
@@ -49,12 +51,16 @@
    this.animalService.pulseEffect(e.latlng)
  }
  // 不同类型图片封装
  this.differentTypes = (judgeValue) => {
  this.differentTypes = (ContrLevel) => {
    var effectOfChange
    if (judgeValue === 1) {
      effectOfChange = defaultImg
    if (ContrLevel === 1) {
      effectOfChange = ImgBlue
    } else if (ContrLevel === 2) {
      effectOfChange = ImagGreen
    } else if (ContrLevel === 3) {
      effectOfChange = ImagBright
    } else {
      effectOfChange = setting
      effectOfChange = ImgGray
    }
    return effectOfChange
  }