From c819024e241b9f7c54cc3786373ad0d2998f2190 Mon Sep 17 00:00:00 2001
From: 马宇豪 <978517621@qq.com>
Date: 星期五, 05 五月 2023 08:55:46 +0800
Subject: [PATCH] 修改

---
 src/views/doublePreventAction/riskLevelManage/fourColorMap/oneHundredAndThirty/index.vue |   36 +++++++++++++++++++++++-------------
 1 files changed, 23 insertions(+), 13 deletions(-)

diff --git a/src/views/doublePreventAction/riskLevelManage/fourColorMap/oneHundredAndThirty/index.vue b/src/views/doublePreventAction/riskLevelManage/fourColorMap/oneHundredAndThirty/index.vue
index 503dffc..4c6ff61 100644
--- a/src/views/doublePreventAction/riskLevelManage/fourColorMap/oneHundredAndThirty/index.vue
+++ b/src/views/doublePreventAction/riskLevelManage/fourColorMap/oneHundredAndThirty/index.vue
@@ -2,7 +2,7 @@
 
     <div class="map-layout">
         <Map @init="init" :option="option" v-if="option" />
-        <Tab v-if="loaded" :type='type' :colorMapList='colorMapList'/>
+        <Tab v-if="loaded" :type='type' :colorMapList='colorMapList' @getList="testLoaded"/>
     </div>
 
 
@@ -74,6 +74,7 @@
                 map.addModel({
                     link: 'http://222.92.213.22:8006/b3dm130/tileset.json',
                     name: '130万吨模型图',
+                    modifyZ: -45,
                     callback: tileset => {
                         var boundingSphere = tileset.boundingSphere;
                         var cartographic = Cesium.Cartographic.fromCartesian(
@@ -119,24 +120,33 @@
                 if (!map) return;
                 let params = {}
                 params['eType'] = 2
-                getMap(params).then(res =>{
-                    this.colorMapList = res.data.result
-                    const list = res.data.result.map(item =>{
-                        return{
-                            type:item.type,
-                            geometry:JSON.parse(item.geometry),
-                            properties:JSON.parse(item.properties)
+                getMap(params).then(res => {
+                    this.colorMapList = JSON.parse(JSON.stringify(res.data.result))
+                    const list = this.colorMapList.map(item => {
+                        return {
+                            type: item.type,
+                            geometry: JSON.parse(item.geometry),
+                            properties: JSON.parse(item.properties)
                         }
                     })
                     const fourMapList = {
-                            "type": "FeatureCollection",
-                            "features": list
+                        "type": "FeatureCollection",
+                        "features": JSON.parse(JSON.stringify(list))
                     }
                     map.loadGeoJSON(fourMapList)
                 })
-                // $.get('./public/data/plots_namisuo.geojson', res => {
-                //     map.loadGeoJSON(res);
-                // });
+            },
+            testLoaded() {
+                    const map = global.map;
+                    if (!map) return;
+                    let params = {}
+                    params['eType'] = 2
+                    getMap(params).then(res => {
+                        this.colorMapList = JSON.parse(JSON.stringify(res.data.result))
+                    })
+                    // $.get('./public/data/plots_namisuo.geojson', res => {
+                    //     map.loadGeoJSON(res);
+                    // });
             },
             initEvent(map) {
                 let popup = null;

--
Gitblit v1.9.2