From c92dd3fca165ddd8d73d29a640ec22c89c45260f Mon Sep 17 00:00:00 2001
From: zhangshuaibao <15731629597@163.com>
Date: 星期三, 31 三月 2021 15:38:53 +0800
Subject: [PATCH] Merge branch 'develop' of http://xearth.cn:6600/r/wuyushui/SewerAndRainNetwork into develop

---
 public/assets/images/map/exhaust/fq_bright_green.png       |    0 
 src/components/LayerController/logic/WasteGas.js           |   69 ++++++++++++++++++++++------------
 public/assets/images/map/exhaust/fq_green_xc.png           |    0 
 src/api/mapApi.js                                          |    3 +
 src/views/MapTemplate.vue                                  |    3 +
 public/assets/images/map/exhaust/fq_orange.png             |    0 
 src/api/mapUrl.js                                          |    2 +
 public/assets/images/map/exhaust/fq_blue.png               |    0 
 src/components/BaseNav/PublicBounced/PublicBounced.vue     |    9 +++-
 public/assets/images/map/exhaust/fq_green.png              |    0 
 src/main.js                                                |    1 
 src/utils/axios.js                                         |    2 
 src/components/LayerController/service/BusiLayerService.js |    2 
 public/assets/images/map/exhaust/fq_gray.png               |    0 
 public/assets/images/map/exhaust/fq_yellow.png             |    0 
 public/assets/images/map/exhaust/fq_red.png                |    0 
 src/components/LayerController/logic/SolidWaste.js         |    2 -
 17 files changed, 62 insertions(+), 31 deletions(-)

diff --git a/src/assets/images/map-pages/basenav/flugas/exhaust/fq_blue.png b/public/assets/images/map/exhaust/fq_blue.png
similarity index 100%
rename from src/assets/images/map-pages/basenav/flugas/exhaust/fq_blue.png
rename to public/assets/images/map/exhaust/fq_blue.png
Binary files differ
diff --git a/src/assets/images/map-pages/basenav/flugas/exhaust/fq_bright_green.png b/public/assets/images/map/exhaust/fq_bright_green.png
similarity index 100%
rename from src/assets/images/map-pages/basenav/flugas/exhaust/fq_bright_green.png
rename to public/assets/images/map/exhaust/fq_bright_green.png
Binary files differ
diff --git a/src/assets/images/map-pages/basenav/flugas/exhaust/fq_gray.png b/public/assets/images/map/exhaust/fq_gray.png
similarity index 100%
rename from src/assets/images/map-pages/basenav/flugas/exhaust/fq_gray.png
rename to public/assets/images/map/exhaust/fq_gray.png
Binary files differ
diff --git a/src/assets/images/map-pages/basenav/flugas/exhaust/fq_green.png b/public/assets/images/map/exhaust/fq_green.png
similarity index 100%
rename from src/assets/images/map-pages/basenav/flugas/exhaust/fq_green.png
rename to public/assets/images/map/exhaust/fq_green.png
Binary files differ
diff --git a/src/assets/images/map-pages/basenav/flugas/exhaust/fq_green_xc.png b/public/assets/images/map/exhaust/fq_green_xc.png
similarity index 100%
rename from src/assets/images/map-pages/basenav/flugas/exhaust/fq_green_xc.png
rename to public/assets/images/map/exhaust/fq_green_xc.png
Binary files differ
diff --git a/src/assets/images/map-pages/basenav/flugas/exhaust/fq_orange.png b/public/assets/images/map/exhaust/fq_orange.png
similarity index 100%
rename from src/assets/images/map-pages/basenav/flugas/exhaust/fq_orange.png
rename to public/assets/images/map/exhaust/fq_orange.png
Binary files differ
diff --git a/src/assets/images/map-pages/basenav/flugas/exhaust/fq_red.png b/public/assets/images/map/exhaust/fq_red.png
similarity index 100%
rename from src/assets/images/map-pages/basenav/flugas/exhaust/fq_red.png
rename to public/assets/images/map/exhaust/fq_red.png
Binary files differ
diff --git a/src/assets/images/map-pages/basenav/flugas/exhaust/fq_yellow.png b/public/assets/images/map/exhaust/fq_yellow.png
similarity index 100%
rename from src/assets/images/map-pages/basenav/flugas/exhaust/fq_yellow.png
rename to public/assets/images/map/exhaust/fq_yellow.png
Binary files differ
diff --git a/src/api/mapApi.js b/src/api/mapApi.js
index 533c5e1..95c9f42 100644
--- a/src/api/mapApi.js
+++ b/src/api/mapApi.js
@@ -17,5 +17,8 @@
   },
   getWasteWater (data) {
     return axios.get(mapUrl.getWasteWater, data)
+  },
+  GetWasteGas (data) {
+    return axios.get(mapUrl.GetWasteGas, data)
   }
 }
diff --git a/src/api/mapUrl.js b/src/api/mapUrl.js
index fa3f330..8b9b168 100644
--- a/src/api/mapUrl.js
+++ b/src/api/mapUrl.js
@@ -5,6 +5,8 @@
 
 export const GetUser = $HOST + '/user/getUser'
 
+export const GetWasteGas = $HOST + '/wasteGas/getWasteGas'
+
 export const getSolidWaste = $HOST + '/wasteSolid/getSolidWaste'
 
 export const getWasteWater = $HOST + '/wasteWater/getWasteWater'
diff --git a/src/components/BaseNav/PublicBounced/PublicBounced.vue b/src/components/BaseNav/PublicBounced/PublicBounced.vue
index d854b06..8756e92 100644
--- a/src/components/BaseNav/PublicBounced/PublicBounced.vue
+++ b/src/components/BaseNav/PublicBounced/PublicBounced.vue
@@ -86,16 +86,19 @@
   .public-bounced-content {
     margin: 15px auto;
     display: flex;
-    align-items: center;
+    //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%;
     }
   }
diff --git a/src/components/LayerController/logic/SolidWaste.js b/src/components/LayerController/logic/SolidWaste.js
index f0dad0a..7211b05 100644
--- a/src/components/LayerController/logic/SolidWaste.js
+++ b/src/components/LayerController/logic/SolidWaste.js
@@ -14,7 +14,6 @@
    * @param L leaflet瀵硅薄
    */
   this.init = async (layer, L) => {
-    // const SolidWasteIcon = this.SolidWasteIcon()
     this.animalService = new AnimalService({
       L: L,
       layer: layer
@@ -38,7 +37,6 @@
           iconAnchor: [25, 25]
         })
       })
-
       layer.addLayer(marker)
     }
   }
diff --git a/src/components/LayerController/logic/WasteGas.js b/src/components/LayerController/logic/WasteGas.js
index 2744f36..bf0a41c 100644
--- a/src/components/LayerController/logic/WasteGas.js
+++ b/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
+  }
 }
diff --git a/src/components/LayerController/service/BusiLayerService.js b/src/components/LayerController/service/BusiLayerService.js
index d63962e..e8f8d03 100644
--- a/src/components/LayerController/service/BusiLayerService.js
+++ b/src/components/LayerController/service/BusiLayerService.js
@@ -21,7 +21,7 @@
       var busiLayer = new BusiLayer()
       busiLayer.init(layer, this.L)
       if (busiLayer.bindTooltip) {
-        layer.bindTooltip(busiLayer.bindTooltip(layer))
+        layer.bindTooltip(busiLayer.bindTooltip)
       }
       // 璋冪敤click浜嬩欢
       if (busiLayer.clickListener) {
diff --git a/src/main.js b/src/main.js
index 653b668..4c254ad 100644
--- a/src/main.js
+++ b/src/main.js
@@ -23,6 +23,7 @@
 Vue.prototype.L = L
 Vue.prototype.$config = appConfig
 Vue.prototype.$echarts = echarts // 鎸傝浇echarts
+window.Vue = Vue
 // 娉ㄥ唽鎸囦护7
 // registerDirectives(Vue)
 
diff --git a/src/utils/axios.js b/src/utils/axios.js
index d42baf4..8324abe 100644
--- a/src/utils/axios.js
+++ b/src/utils/axios.js
@@ -83,7 +83,7 @@
 
 // 鍒涘缓axios瀹炰緥
 const Service = axios.create({
-  timeout: 1000
+  timeout: 5000
 })
 
 const CancelToken = axios.CancelToken
diff --git a/src/views/MapTemplate.vue b/src/views/MapTemplate.vue
index 436e2ea..08c1765 100644
--- a/src/views/MapTemplate.vue
+++ b/src/views/MapTemplate.vue
@@ -38,6 +38,9 @@
 // import MenuSpecial from '@components/panel/MenuTopic'
 import LegendPanel from '@components/panel/LegendPanel'
 import Enterprise from '../components/table/enterprise'
+// 搴曞浘涓氬姟js閫昏緫
+// import AddWasteWaterHelper from '@components/BaseNav/WasteWater/WasteWater'
+// import AddGasHelper from '@components/BaseNav/flueGas/flueGas'
 // // 鍏叡灞曠ず鏁版嵁
 import PublicBounced from '@components/BaseNav/PublicBounced/PublicBounced'
 import LayerFactory from '@components/LayerController/service/LayerFactory'

--
Gitblit v1.8.0