派生自 wuyushui/SewerAndRainNetwork

chenzeping
2021-03-31 003ec8342f446b977e3674940a1c2f2867ad861c
Merge branch 'develop' of http://xearth.cn:6600/r/wuyushui/SewerAndRainNetwork into develop

 Conflicts:
 src/api/mapApi.js
 src/components/LayerController/logic/WasteGas.js
 src/views/MapTemplate.vue
6个文件已修改
8 文件已重命名
91 ■■■■■ 已修改文件
public/assets/images/map/exhaust/fq_blue.png 补丁 | 查看 | 原始文档 | blame | 历史
public/assets/images/map/exhaust/fq_bright_green.png 补丁 | 查看 | 原始文档 | blame | 历史
public/assets/images/map/exhaust/fq_gray.png 补丁 | 查看 | 原始文档 | blame | 历史
public/assets/images/map/exhaust/fq_green.png 补丁 | 查看 | 原始文档 | blame | 历史
public/assets/images/map/exhaust/fq_green_xc.png 补丁 | 查看 | 原始文档 | blame | 历史
public/assets/images/map/exhaust/fq_orange.png 补丁 | 查看 | 原始文档 | blame | 历史
public/assets/images/map/exhaust/fq_red.png 补丁 | 查看 | 原始文档 | blame | 历史
public/assets/images/map/exhaust/fq_yellow.png 补丁 | 查看 | 原始文档 | blame | 历史
src/api/mapApi.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/mapUrl.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/BaseNav/PublicBounced/GasComponents/GasTabs.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/BaseNav/PublicBounced/PublicBounced.vue 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/LayerController/logic/WasteGas.js 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/axios.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/assets/images/map/exhaust/fq_blue.png

public/assets/images/map/exhaust/fq_bright_green.png

public/assets/images/map/exhaust/fq_gray.png

public/assets/images/map/exhaust/fq_green.png

public/assets/images/map/exhaust/fq_green_xc.png

public/assets/images/map/exhaust/fq_orange.png

public/assets/images/map/exhaust/fq_red.png

public/assets/images/map/exhaust/fq_yellow.png

src/api/mapApi.js
@@ -17,6 +17,9 @@
  },
  getSolidWasteBaseInfo (data) {
    return axios.get(mapUrl.getSolidWasteBaseInfo, data)
  },
  GetWasteGas (data) {
    return axios.get(mapUrl.GetWasteGas, data)
  }
}
src/api/mapUrl.js
@@ -5,5 +5,7 @@
export const GetUser = $HOST + '/user/getUser'
export const GetWasteGas = $HOST + '/wasteGas/getWasteGas'
export const getSolidWaste = $HOST + '/wasteSolid/getSolidWaste'
export const getSolidWasteBaseInfo = $HOST + '/wasteSolid/getSolidWasteBaseInfo'
src/components/BaseNav/PublicBounced/GasComponents/GasTabs.vue
@@ -1,10 +1,10 @@
<template>
<div>
  <el-tabs v-model="activeName">
    <el-tab-pane label="用户管理" name="first">用户管理</el-tab-pane>
    <el-tab-pane label="配置管理" name="second">配置管理</el-tab-pane>
    <el-tab-pane label="角色管理" name="third">角色管理</el-tab-pane>
    <el-tab-pane label="定时任务补偿" name="fourth">定时任务补偿</el-tab-pane>
    <el-tab-pane label="实时数据" name="first">用户管理</el-tab-pane>
    <el-tab-pane label="日数据" name="second">配置管理</el-tab-pane>
    <el-tab-pane label="月数据" name="third">角色管理</el-tab-pane>
    <el-tab-pane label="人工数据" name="fourth">定时任务补偿</el-tab-pane>
  </el-tabs>
</div>
</template>
src/components/BaseNav/PublicBounced/PublicBounced.vue
@@ -97,14 +97,17 @@
    display: flex;
    //align-items: center;
    justify-content: space-around;
    padding: 10px;
    .public-bounced-content-left {
      width: 48%;
      flex: 3;
      height: 100%;
      margin-right: 10px;
    }
    .public-bounced-content-right {
      width: 48%;
      flex: 2;
      //width: 48%;
      height: 100%;
    }
  }
src/components/LayerController/logic/WasteGas.js
@@ -2,40 +2,47 @@
 * 废气
 */
const AnimalService = require('../service/AnimalService').default
const AjaxUtils = require('../../../utils/AjaxUtils').default
// const AjaxUtils = require('../../../utils/AjaxUtils').default
// 区分不同类型 使用不同img
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 () {
  /**
   * 返回marker对象数组
   * @param L leaflet对象
   */
  this.init = (layer, L) => {
  this.init = async (layer, L) => {
    this.animalService = new AnimalService({ L: L, layer: layer })
    AjaxUtils.get4JsonDataByUrl('http://10.246.162.140:8080/EPInterface/DataService/EPMapService.asmx/ObtainningConInfo', {
      companyId: 3900100145,
      id: '',
      monType: 1,
      userCode: 'wenchun.deng',
      monDuration: '',
      epName: '',
      secdDeptId: '',
      contrLevel: '',
      dataStatus: '',
      dataFlag: '',
      runStatus: '',
      emissTypeId: ''
    }, function (res) {
      const data = res.data.Result.DataInfo
      for (let i = 0; i < data.length; i++) {
        // 经纬度 位置
        // const positionX = data[i].Latitude
        // const positionY = data[i].Longitude
        // layer.addLayer(L.marker([positionX, positionY], {}))
      }
    })
    const res = await mapApi.GetWasteGas()
    const data = res.Result.DataInfo || {}
    console.log(data)
    for (let i = 0; i < data.length; i++) {
      // 经纬度 位置
      const positionX = data[i].Latitude
      const positionY = data[i].Longitude
      // 定义类型 用来区分数据
      const ContrLevel = data[i].ContrLevel
      var iconUrl = this.differentTypes(ContrLevel)
      const marker = L.marker.magic([positionX, positionY], {
        icon: L.icon({
          iconUrl: iconUrl,
          iconSize: [50, 50],
          iconAnchor: [25, 25]
        })
      })
      layer.addLayer(marker)
      // layer.addLayer(L.marker([positionX, positionY], {}))
    }
  }
  this.bindTooltip = (layer) => {
    console.log(layer)
    return '测试废气'
  }
@@ -43,4 +50,18 @@
    console.log(e)
    this.animalService.pulseEffect(e.latlng)
  }
  // 不同类型图片封装
  this.differentTypes = (ContrLevel) => {
    var effectOfChange
    if (ContrLevel === 1) {
      effectOfChange = ImgBlue
    } else if (ContrLevel === 2) {
      effectOfChange = ImagGreen
    } else if (ContrLevel === 3) {
      effectOfChange = ImagBright
    } else {
      effectOfChange = ImgGray
    }
    return effectOfChange
  }
}
src/utils/axios.js
@@ -83,7 +83,7 @@
// 创建axios实例
const Service = axios.create({
  timeout: 1000
  timeout: 5000
})
const CancelToken = axios.CancelToken