From ee629193f59c538ce816c25d673f7c4320a74f17 Mon Sep 17 00:00:00 2001
From: 陈泽平 <chenzeping>
Date: 星期四, 20 五月 2021 16:29:03 +0800
Subject: [PATCH] 管线 应急修改

---
 src/components/LayerController/logic/SourcesPollution.js |   26 +++++++++++++++++++-------
 1 files changed, 19 insertions(+), 7 deletions(-)

diff --git a/src/components/LayerController/logic/SourcesPollution.js b/src/components/LayerController/logic/SourcesPollution.js
index 6cec839..27899ce 100644
--- a/src/components/LayerController/logic/SourcesPollution.js
+++ b/src/components/LayerController/logic/SourcesPollution.js
@@ -2,11 +2,9 @@
  * 姹℃煋婧�
  *  */
 
-// 浣跨敤灏佽鏂规硶
 // 璇锋眰鎺ュ彛鏁版嵁
-// import { getSourcesPoll } from '../../../api/request'
-
 const mapApi = require('../../../api/mapApi').default
+// 浣跨敤灏佽鏂规硶
 const AnimalService = require('../service/AnimalService').default
 
 module.exports = function () {
@@ -15,10 +13,24 @@
       L: L,
       layer: layer
     })
-    // getSourcesPoll().then(res => {
-    //   console.log(res)
-    // })
     const result = await mapApi.getSourcesPoll()
-    console.log(result)
+    // console.log(result)
+    const resultData = result.Result.DataInfo || []
+    const polygon = L.polygon(resultData, { color: 'yellow' })
+    polygon.addTo(layer)
+  }
+  this.bindTooltip = (layer) => {
+    return 'layer'
+  }
+  this.click = () => {
+    window.$layer.open({
+      content: {
+        content: 'Popup', // 缁勪欢
+        data: { // 浼犻�掔殑鍙傛暟
+          datas: 'popupDatas'
+        }
+      },
+      title: ''
+    })
   }
 }

--
Gitblit v1.8.0