From 5e3dad0ae62f237e515d0619cef479e05d836bc8 Mon Sep 17 00:00:00 2001
From: zhangshuaibao <15731629597@163.com>
Date: 星期三, 07 四月 2021 11:01:20 +0800
Subject: [PATCH] 修改废水点信息

---
 src/components/LayerController/logic/WasteWater.js |   19 ++++++++++++++-----
 1 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/src/components/LayerController/logic/WasteWater.js b/src/components/LayerController/logic/WasteWater.js
index 16c4f17..31e0d53 100644
--- a/src/components/LayerController/logic/WasteWater.js
+++ b/src/components/LayerController/logic/WasteWater.js
@@ -24,9 +24,7 @@
       layer: layer
     })
     const res = await mapApi.getWasteWater()
-    console.log(res)
-    const data = res.Result.DataInfo
-    console.log(data)
+    const data = res.Result.DataInfo || {}
     for (let i = 0; i < data.length; i++) {
       // 缁忕含搴� 浣嶇疆
       const positionX = data[i].Latitude
@@ -57,12 +55,16 @@
     const dataValue = {
       StoragePlaceId: e.layer.options.test.StoragePlaceId
     }
-    const result = await mapApi.getWasteWater(dataValue)
+    const drawback = await mapApi.getWasteWaterMonitoring()
+    console.log(drawback)
+    const result = await mapApi.getWasteWaterMonitoringDetails(dataValue)
     const PublicBounced = window.Vue.extend(publicBounced)
     const instance = new PublicBounced()
-    instance.setData(result)
+    instance.setWaterData(e.layer.options.test, result.Result.DataInfo, drawback.Result.DataInfo, 'feishui')
+    console.log(e.layer.options.test)
     instance.$mount()
     document.body.appendChild(instance.$el)
+    this.setPanTo(e.latlng, 240)
   }
 
   // 鏍规嵁杩斿洖鍊肩殑涓嶅悓鏍囪涓嶅悓鍥剧墖
@@ -96,4 +98,11 @@
     }
     return testChange
   }
+  this.setPanTo = (pos, value) => {
+    var position = pos
+    position = window.map.latLngToLayerPoint(position)
+    position.y += value
+    position = window.map.layerPointToLatLng(position)
+    window.map.flyTo(position)
+  }
 }

--
Gitblit v1.8.0