From e97a404960da3964475aebbef4ff069be2e4ccfc Mon Sep 17 00:00:00 2001
From: ChenZeping02609 <chenzeping02609@163.com>
Date: 星期三, 12 五月 2021 17:54:29 +0800
Subject: [PATCH] 修改问题,污染源

---
 src/components/LayerController/logic/SourcesPollution.js         |   24 ++++++++
 src/components/LayerController/event/EventHandler.js             |    1 
 src/components/LayerController/logic/WasteGas.js                 |    7 +
 src/components/LayerController/service/WmsLayerService.js        |    2 
 src/conf/Constants.js                                            |    3 
 public/static/SourcesPoll.json                                   |  125 +++++++++++++++++++++++++++++++++++++++++
 src/api/mapApi.js                                                |    3 +
 src/components/LayerController/logic/WasteWater.js               |    2 
 src/components/panel/topicSearch/SewersSelect/SewersAnalysis.vue |    4 
 src/components/LayerController/logic/WasteSolid.js               |    1 
 src/api/mapUrl.js                                                |    3 +
 11 files changed, 168 insertions(+), 7 deletions(-)

diff --git a/public/static/SourcesPoll.json b/public/static/SourcesPoll.json
new file mode 100644
index 0000000..132f6bf
--- /dev/null
+++ b/public/static/SourcesPoll.json
@@ -0,0 +1,125 @@
+{
+  "Result": {
+    "IsSuccess": 1,
+    "ErrorMsg": "",
+    "DataInfo": [
+      {
+        "StoragePlaceId": 0,
+        "Name": "宸撮櫟鐭冲寲 鍙栨按鍗曞厓骞叉偿鏆傚瓨搴�",
+        "StorageQtyMax": 0,
+        "Longitude": 113.38361,
+        "Latitude": 29.9008,
+        "SortNum": 0,
+        "DesignFloorArea": 0,
+        "VideoCoding": null,
+        "VideoURL": null,
+        "DaysAlarm": 0,
+        "MarginAlarm": 0
+      },
+      {
+        "StoragePlaceId": 1,
+        "Name": "宸撮櫟鐭冲寲 鍚夊婀栫伆濉�",
+        "StorageQtyMax": 0,
+        "Longitude": 113.14089,
+        "Latitude": 29.4181,
+        "SortNum": 0,
+        "DesignFloorArea": 0,
+        "VideoCoding": null,
+        "VideoURL": null,
+        "DaysAlarm": 0,
+        "MarginAlarm": 0
+      },
+      {
+        "StoragePlaceId": 2,
+        "Name": "闀垮箔鐐煎寲 鍏瓧闂ㄥ瀮鍦惧~鍩嬪満",
+        "StorageQtyMax": 0,
+        "Longitude": 113.3916666667,
+        "Latitude": 29.6394444444,
+        "SortNum": 0,
+        "DesignFloorArea": 0,
+        "VideoCoding": null,
+        "VideoURL": null,
+        "DaysAlarm": 0,
+        "MarginAlarm": 0
+      },
+      {
+        "StoragePlaceId": 3,
+        "Name": "涓煩鐭冲寲 鐏版福鍦�",
+        "StorageQtyMax": 0,
+        "Longitude": 114.5192083333,
+        "Latitude": 30.6201666667,
+        "SortNum": 0,
+        "DesignFloorArea": 0,
+        "VideoCoding": null,
+        "VideoURL": null,
+        "DaysAlarm": 0,
+        "MarginAlarm": 0
+      },
+      {
+        "StoragePlaceId": 4,
+        "Name": "瀹夊簡鐭冲寲 灞卞彛搴熸福濉煁鍦�",
+        "StorageQtyMax": 0,
+        "Longitude": 116.960599,
+        "Latitude": 30.541509,
+        "SortNum": 0,
+        "DesignFloorArea": 0,
+        "VideoCoding": null,
+        "VideoURL": null,
+        "DaysAlarm": 0,
+        "MarginAlarm": 0
+      },
+      {
+        "StoragePlaceId": 5,
+        "Name": "瀹夊簡鐭冲寲 鐑數闄堝鍐茬伆鍦�",
+        "StorageQtyMax": 0,
+        "Longitude": 116.986949,
+        "Latitude": 30.534486,
+        "SortNum": 0,
+        "DesignFloorArea": 0,
+        "VideoCoding": null,
+        "VideoURL": null,
+        "DaysAlarm": 0,
+        "MarginAlarm": 0
+      },
+      {
+        "StoragePlaceId": 6,
+        "Name": "楂樻ˉ鐭冲寲 娴锋花鐮佸ご闄勮繎婊╂秱",
+        "StorageQtyMax": 0,
+        "Longitude": 121.55,
+        "Latitude": 31.63,
+        "SortNum": 0,
+        "DesignFloorArea": 0,
+        "VideoCoding": null,
+        "VideoURL": null,
+        "DaysAlarm": 0,
+        "MarginAlarm": 0
+      },
+      {
+        "StoragePlaceId": 7,
+        "Name": "宸濈淮鍖栧伐 鐢熷寲姹℃偿鏂欎粨",
+        "StorageQtyMax": 0,
+        "Longitude": 107.02342004,
+        "Latitude": 29.79235333,
+        "SortNum": 0,
+        "DesignFloorArea": 0,
+        "VideoCoding": null,
+        "VideoURL": null,
+        "DaysAlarm": 0,
+        "MarginAlarm": 0
+      },
+      {
+        "StoragePlaceId": 8,
+        "Name": "宸濈淮鍖栧伐 鎺掓偿姘存偿楗兼枡浠�",
+        "StorageQtyMax": 0,
+        "Longitude": 107.02315181,
+        "Latitude": 29.78832166,
+        "SortNum": 0,
+        "DesignFloorArea": 0,
+        "VideoCoding": null,
+        "VideoURL": null,
+        "DaysAlarm": 0,
+        "MarginAlarm": 0
+      }
+    ]
+  }
+}
\ No newline at end of file
diff --git a/src/api/mapApi.js b/src/api/mapApi.js
index 58df7b6..9d6114c 100644
--- a/src/api/mapApi.js
+++ b/src/api/mapApi.js
@@ -85,5 +85,8 @@
   },
   getCrossSection (data) {
     return axios.get(mapUrl.getCrossSection, data)
+  },
+  getSourcesPoll (data) {
+    return axios.get(mapUrl.getSourcesPoll, data)
   }
 }
diff --git a/src/api/mapUrl.js b/src/api/mapUrl.js
index bb12e82..62051fd 100644
--- a/src/api/mapUrl.js
+++ b/src/api/mapUrl.js
@@ -35,3 +35,6 @@
 export const findFlowDirection = $HOSTANALYSE + '/findFlowDirection'
 export const findLeakages = $HOSTANALYSE + '/findLeakages'
 export const getCrossSection = $HOSTANALYSE + '/getCrossSection'
+
+// 姹℃煋婧�
+export const getSourcesPoll = 'http://localhost:8081/static/SourcesPoll.json'
diff --git a/src/components/LayerController/event/EventHandler.js b/src/components/LayerController/event/EventHandler.js
index 7ff6a58..2ab3cba 100644
--- a/src/components/LayerController/event/EventHandler.js
+++ b/src/components/LayerController/event/EventHandler.js
@@ -5,6 +5,7 @@
     this.mapClickForLayers = {}
 
     window.map.on('click', (e) => {
+      console.log(e)
       for (var k in this.mapClickForLayers) {
         const func = this.mapClickForLayers[k]
         console.log(func)
diff --git a/src/components/LayerController/logic/SourcesPollution.js b/src/components/LayerController/logic/SourcesPollution.js
new file mode 100644
index 0000000..6cec839
--- /dev/null
+++ b/src/components/LayerController/logic/SourcesPollution.js
@@ -0,0 +1,24 @@
+/**
+ * 姹℃煋婧�
+ *  */
+
+// 浣跨敤灏佽鏂规硶
+// 璇锋眰鎺ュ彛鏁版嵁
+// import { getSourcesPoll } from '../../../api/request'
+
+const mapApi = require('../../../api/mapApi').default
+const AnimalService = require('../service/AnimalService').default
+
+module.exports = function () {
+  this.init = async (layer, L) => {
+    this.animalService = new AnimalService({
+      L: L,
+      layer: layer
+    })
+    // getSourcesPoll().then(res => {
+    //   console.log(res)
+    // })
+    const result = await mapApi.getSourcesPoll()
+    console.log(result)
+  }
+}
diff --git a/src/components/LayerController/logic/WasteGas.js b/src/components/LayerController/logic/WasteGas.js
index 889bcc5..7d57975 100644
--- a/src/components/LayerController/logic/WasteGas.js
+++ b/src/components/LayerController/logic/WasteGas.js
@@ -21,7 +21,10 @@
    */
   this.init = async (layer, L) => {
     // console.log(WasteGasChats)
-    this.animalService = new AnimalService({ L: L, layer: layer })
+    this.animalService = new AnimalService({
+      L: L,
+      layer: layer
+    })
     const res = await mapApi.getWasteGas()
     // console.log(res)
     const data = res.Result.DataInfo || {}
@@ -53,7 +56,7 @@
   }
 
   this.bindTooltip = (layer) => {
-    return layer.options.test.Name
+    return '<div class="company-bindTooltip-hover"><h3>澶╂触鐭冲寲</h3></div>' + layer.options.test.Name
   }
 
   this.clickListener = async (e) => {
diff --git a/src/components/LayerController/logic/WasteSolid.js b/src/components/LayerController/logic/WasteSolid.js
index bba786a..ec726a0 100644
--- a/src/components/LayerController/logic/WasteSolid.js
+++ b/src/components/LayerController/logic/WasteSolid.js
@@ -46,6 +46,7 @@
   }
 
   this.bindTooltip = (layer) => {
+    // '<div class="company-bindTooltip-hover"><h3>澶╂触鐭冲寲</h3></div>' +
     return layer.options.totransferData.Name
   }
 
diff --git a/src/components/LayerController/logic/WasteWater.js b/src/components/LayerController/logic/WasteWater.js
index 0305114..9d10a57 100644
--- a/src/components/LayerController/logic/WasteWater.js
+++ b/src/components/LayerController/logic/WasteWater.js
@@ -50,7 +50,7 @@
 
   // 鍒嗗壊绾�-------------------------------------------------------------------------------
   this.bindTooltip = (layer) => {
-    return layer.options.totransferData.Name
+    return '<div class="company-bindTooltip-hover"><h3>澶╂触鐭冲寲</h3></div>' + layer.options.totransferData.Name
   }
 
   this.clickListener = (e) => {
diff --git a/src/components/LayerController/service/WmsLayerService.js b/src/components/LayerController/service/WmsLayerService.js
index 999783e..0094a71 100644
--- a/src/components/LayerController/service/WmsLayerService.js
+++ b/src/components/LayerController/service/WmsLayerService.js
@@ -85,7 +85,7 @@
 
   clickListener () {
     window.map.on('click', (e) => {
-      console.log(e)
+      // console.log(e)
       this.featureGroup.clearLayers()
       var point = this.map.latLngToContainerPoint(e.latlng, this.map.getZoom())
       var size = this.map.getSize()
diff --git a/src/components/panel/topicSearch/SewersSelect/SewersAnalysis.vue b/src/components/panel/topicSearch/SewersSelect/SewersAnalysis.vue
index 9ba63dc..e85728c 100644
--- a/src/components/panel/topicSearch/SewersSelect/SewersAnalysis.vue
+++ b/src/components/panel/topicSearch/SewersSelect/SewersAnalysis.vue
@@ -261,7 +261,7 @@
       }
       // 鏍规嵁鍙傛暟璇锋眰鎺ュ彛鏁版嵁
       const res = await mapApi.findPipelineByClickPoint(param)
-      console.log(res.pipesegcode)
+      console.log(res)
       if (this.activeName === 'first') {
         if (this.linkType === 1) {
           this.tableDataLinkStart = res.data
@@ -367,7 +367,7 @@
         startLineID: this.currentSelectStart.pipesegcode,
         endLineID: this.currentSelectEnd.pipesegcode
       }
-      // console.log(param)
+      console.log(param)
       // 璇锋眰鎺ュ彛鍜屾暟鎹�
       const res = await mapApi.findConnectedPipelines(param)
       // console.log(res)
diff --git a/src/conf/Constants.js b/src/conf/Constants.js
index 867a58c..1eb2734 100644
--- a/src/conf/Constants.js
+++ b/src/conf/Constants.js
@@ -18,7 +18,8 @@
   wasteWaterPfk: 'WasteWater.js',
   wasteSolidCcd: 'WasteSolid.js',
   sewersAreaGs: 'Company.js',
-  pipesegment: 'PipeLineAnimal.js'
+  pipesegment: 'PipeLineAnimal.js',
+  pollutionSources: 'SourcesPollution.js'
 }
 
 export const STYLES = {

--
Gitblit v1.8.0