From af40a8c77389bb44b9e4b25a17ba9145a50aa4b0 Mon Sep 17 00:00:00 2001
From: songhuangfeng123 <shf18767906695@163.com>
Date: 星期二, 10 五月 2022 16:45:05 +0800
Subject: [PATCH] 新增设备区域

---
 src/views/doublePreventAction/riskLevelManage/fourColorMap/sixty/index.vue |   18 +++++++++++++-----
 1 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/src/views/doublePreventAction/riskLevelManage/fourColorMap/sixty/index.vue b/src/views/doublePreventAction/riskLevelManage/fourColorMap/sixty/index.vue
index 18f51e6..3cf2945 100644
--- a/src/views/doublePreventAction/riskLevelManage/fourColorMap/sixty/index.vue
+++ b/src/views/doublePreventAction/riskLevelManage/fourColorMap/sixty/index.vue
@@ -2,7 +2,7 @@
     
     <div class="map-layout">
         <Map @init="init" :option="option" v-if="option" />
-        <Tab v-if="loaded" />
+        <Tab v-if="loaded" :type='type' :colorMapList='colorMapList'/>
     </div>
 
 
@@ -31,6 +31,8 @@
                 option: null,
                 heatLayer: null,
                 shineishiwai: true,
+                colorMapList:[],
+                type:1,
             };
         },
         mounted() {
@@ -115,22 +117,28 @@
             testLoadedData() {
                 const map = global.map;
                 if (!map) return;
-                let params = {}
+                const params = {}
+        
                 params['eType'] = 1
                 getMap(params).then(res =>{
-                    const list = res.data.result.map(item =>{
+                    let list = []
+                    let fourMapList = []
+                    this.colorMapList = res.data.result
+                    list = res.data.result.map(item =>{
                         return{
                             type:item.type,
                             geometry:JSON.parse(item.geometry),
                             properties:JSON.parse(item.properties)
                         }
                     })
-                    const fourMapList = {
+                    fourMapList = {
                             "type": "FeatureCollection",
                             "features": list
                     }
-                    debugger
                     map.loadGeoJSON(fourMapList)
+                    // $.get('./public/data/plots_namisuo.geojson', res => {
+                    // map.loadGeoJSON(res);
+                    // });
                 })
             },
             initEvent(map) {

--
Gitblit v1.9.2