From e955287ac83d12c1545db512d9af7ed5a15db21c Mon Sep 17 00:00:00 2001
From: chenyabin <Chenab123!>
Date: 星期一, 10 五月 2021 15:05:47 +0800
Subject: [PATCH] 管线搜索弹框整体调整

---
 src/components/LayerController/logic/PipeLineAnimal.js |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/src/components/LayerController/logic/PipeLineAnimal.js b/src/components/LayerController/logic/PipeLineAnimal.js
index e9cabbe..11c54ef 100644
--- a/src/components/LayerController/logic/PipeLineAnimal.js
+++ b/src/components/LayerController/logic/PipeLineAnimal.js
@@ -7,6 +7,9 @@
 
 module.exports = function () {
   this.init = () => {
+  }
+
+  this.start = () => {
     const layers = LayerPipeLines.layers
     for (var i = 0; i < layers.length; i++) {
       const config = layers[i]
@@ -42,12 +45,22 @@
     for (var i = 0; i < layers.length; i++) {
       const config = layers[i]
       const code = config.code
+      const styles = config.styles
       // window.layerFactory.show(config)
       const layer = window.layerFactory.layers[code]
       if (layer) {
         if (layer.eachLayer) {
           layer.eachLayer(function (layer) {
             layer.resetStyle()
+            var newStyles = Object.assign(STYLES, styles)
+            layer.setStyle({
+              fill: newStyles.FILL,
+              weight: newStyles.WEIGHT,
+              fillColor: newStyles.FILL_COLOR,
+              color: newStyles.COLOR,
+              fillOpacity: newStyles.FILL_OPACITY,
+              opacity: newStyles.OPACITY
+            })
           })
         }
       }

--
Gitblit v1.8.0