From c6cd6c7a9db14e889c35916f733fe41cc646ff66 Mon Sep 17 00:00:00 2001
From: wangqi <magical1908@outlook.com>
Date: 星期三, 07 四月 2021 14:58:36 +0800
Subject: [PATCH] Merge branch 'develop' of http://xearth.cn:6600/r/wuyushui/SewerAndRainNetwork into develop

---
 src/components/panel/LegendPanel.vue |  126 +++++------------------------------------
 1 files changed, 16 insertions(+), 110 deletions(-)

diff --git a/src/components/panel/LegendPanel.vue b/src/components/panel/LegendPanel.vue
index f7329bc..fe6d347 100644
--- a/src/components/panel/LegendPanel.vue
+++ b/src/components/panel/LegendPanel.vue
@@ -2,13 +2,13 @@
   <div class="legend-panel">
     <transition name="fade">
       <div :class="'legend-content map-background'" v-show="legendControl">
-        <div class="legend-content-box" v-for="(item,index) in legendContents" :key="index">
-          <p><span>{{ item.title }}</span></p>
-          <div :class="index === 5 ? '':'map-under-line'"></div>
+        <div class="legend-content-box" v-for="(item,index) in serviceLayers" :key="index">
+          <p><span>{{ item.name }}</span></p>
+          <div class="map-under-line"></div>
           <ul>
-            <li v-for="(ite,inde) in item.items" :key="inde">
+            <li v-for="(ite,inde) in item.layers" :key="inde">
               <img :src='ite.legendImage' alt=''>
-              <span>{{ ite.legendContent }}</span>
+              <span>{{ ite.name }}</span>
             </li>
           </ul>
         </div>
@@ -23,116 +23,23 @@
   </div>
 </template>
 <script>
+import { LayerWasteWater } from '../../conf/layers/LayerWasteWater'
+import { LayerWasteGas } from '../../conf/layers/LayerWasteGas'
+import { LayerWasteSolid } from '../../conf/layers/LayerWasteSolid'
+import { LayerAirQuality } from '../../conf/layers/LayerAirQuality'
+import { LayerEnvRisk } from '../../conf/layers/LayerEnvRisk'
+import { LayerSoilGroundWater } from '../../conf/layers/LayerSoilGroundWater'
+import { LayerPipeLines } from '../../conf/layers/LayerPipeLines'
+import { LayerPk } from '../../conf/layers/LayerPk'
+import { LayerArea } from '../../conf/layers/LayerArea'
+
 export default {
   name: 'LegendPanel',
   data () {
     return {
       // 鎺у埗鍥句緥 鍐呭鐨� 鏄剧ず/闅愯棌
       legendControl: false,
-      // 鍥鹃噷瀛樺偍鏁版嵁
-      legendContents: [
-        {
-          title: '浼佷笟',
-          items: [
-            {
-              legendImage: '../.././assets/images/map-pages/setting.png',
-              legendContent: '涓浗鐭冲寲'
-            },
-            {
-              legendImage: '../.././assets/images/map-pages/setting.png',
-              legendContent: '娌圭敯浼佷笟      '
-            },
-            {
-              legendImage: '../.././assets/images/map-pages/setting.png',
-              legendContent: '鐐煎寲浼佷笟'
-            },
-            {
-              legendImage: '../.././assets/images/map-pages/setting.png',
-              legendContent: '閿�鍞紒涓�'
-            }
-          ]
-        },
-        {
-          title: '姘存儏',
-          items: [
-            {
-              legendImage: '../.././assets/images/map-pages/setting.png',
-              legendContent: '姘存枃绔�'
-            }
-          ]
-        },
-        {
-          title: '绠$嚎',
-          items: [
-            {
-              legendImage: '../.././assets/images/map-pages/setting.png',
-              legendContent: '澶╃劧姘旂绾�'
-            },
-            {
-              legendImage: '../.././assets/images/map-pages/setting.png',
-              legendContent: '澶╃劧姘斿満绔�'
-            },
-            {
-              legendImage: '../.././assets/images/map-pages/setting.png',
-              legendContent: '鎴愬搧娌圭绾�'
-            },
-            {
-              legendImage: '../.././assets/images/map-pages/setting.png',
-              legendContent: '鎴愬搧娌瑰満绔�'
-            }
-          ]
-        },
-        {
-          title: '鍙伴',
-          items: [
-            {
-              legendImage: '../.././assets/images/map-pages/setting.png',
-              legendContent: '鍙伴瀹炴祴涓績'
-            },
-            {
-              legendImage: '../.././assets/images/map-pages/setting.png',
-              legendContent: '鍙伴瀹炴祴璺緞'
-            },
-            {
-              legendImage: '../.././assets/images/map-pages/setting.png',
-              legendContent: '鍙伴棰勬祴涓績'
-            },
-            {
-              legendImage: '../.././assets/images/map-pages/setting.png',
-              legendContent: '鍙伴棰勬祴璺緞'
-            },
-            {
-              legendImage: '../.././assets/images/map-pages/setting.png',
-              legendContent: '鍙伴褰撳墠涓績'
-            }
-          ]
-        },
-        {
-          title: '闄嶆按绛夌骇(鍗曚綅锛歮m)',
-          items: [
-            {
-              legendImage: '../.././assets/images/map-pages/setting.png',
-              legendContent: '灏忛洦0-5'
-            },
-            {
-              legendImage: '../.././assets/images/map-pages/setting.png',
-              legendContent: '涓洦5-10'
-            },
-            {
-              legendImage: '../.././assets/images/map-pages/setting.png',
-              legendContent: '澶ч洦10-20'
-            },
-            {
-              legendImage: '../.././assets/images/map-pages/setting.png',
-              legendContent: '鏆撮洦20-50'
-            },
-            {
-              legendImage: '../.././assets/images/map-pages/setting.png',
-              legendContent: '澶ф毚闆�50-100'
-            }
-          ]
-        }
-      ]
+      serviceLayers: [LayerSoilGroundWater, LayerEnvRisk, LayerAirQuality, LayerWasteSolid, LayerWasteGas, LayerWasteWater, LayerArea, LayerPk, LayerPipeLines]
     }
   },
   methods: {
@@ -145,7 +52,6 @@
 </script>
 
 <style lang="less">
-@import '@assets/css/map/_map-variable';
 .legend-panel {
   position: absolute;
   z-index: 502;

--
Gitblit v1.8.0