From 89b24e8ac8377c8f438eae301845cd1e44f0a4ef Mon Sep 17 00:00:00 2001
From: Your Name <123456>
Date: 星期二, 10 五月 2022 08:38:04 +0800
Subject: [PATCH] Merge branch 'master' of https://sinanoaq.cn:8888/r/ztqt

---
 src/views/doublePreventAction/riskLevelManage/fourColorMap/sixty/index.vue |   28 +++++++++++++++++++++-------
 1 files changed, 21 insertions(+), 7 deletions(-)

diff --git a/src/views/doublePreventAction/riskLevelManage/fourColorMap/components/sixty.vue b/src/views/doublePreventAction/riskLevelManage/fourColorMap/sixty/index.vue
similarity index 92%
rename from src/views/doublePreventAction/riskLevelManage/fourColorMap/components/sixty.vue
rename to src/views/doublePreventAction/riskLevelManage/fourColorMap/sixty/index.vue
index 16af71b..18f51e6 100644
--- a/src/views/doublePreventAction/riskLevelManage/fourColorMap/components/sixty.vue
+++ b/src/views/doublePreventAction/riskLevelManage/fourColorMap/sixty/index.vue
@@ -16,7 +16,7 @@
         getCatesian3FromPX,
         Cartesian3_to_WGS84,
     } from '../../../../../components/Map/libs/Point';
-
+    import { getMap } from '@/api/fourColorMap'
     export default {
         name: 'App',
         components: {
@@ -71,7 +71,7 @@
 
                 map.addModel({
                     link: 'http://222.92.213.22:8006/b3dm60/tileset.json',
-                    name: '商业园区',
+                    name: '60吨模型图',
                     callback: tileset => {
                         var boundingSphere = tileset.boundingSphere;
                         var cartographic = Cesium.Cartographic.fromCartesian(
@@ -115,9 +115,23 @@
             testLoadedData() {
                 const map = global.map;
                 if (!map) return;
-                $.get('./public/data/plots_namisuo.geojson', res => {
-                    map.loadGeoJSON(res);
-                });
+                let params = {}
+                params['eType'] = 1
+                getMap(params).then(res =>{
+                    const list = res.data.result.map(item =>{
+                        return{
+                            type:item.type,
+                            geometry:JSON.parse(item.geometry),
+                            properties:JSON.parse(item.properties)
+                        }
+                    })
+                    const fourMapList = {
+                            "type": "FeatureCollection",
+                            "features": list
+                    }
+                    debugger
+                    map.loadGeoJSON(fourMapList)
+                })
             },
             initEvent(map) {
                 let popup = null;
@@ -136,6 +150,7 @@
                             popup.destroy();
                             popup = null;
                         }
+        
                         let type = entity && entity.attribute && entity.attribute.type;
                         if (type) {
                             popup = new wutu3d.DivPoint(map.viewer, {
@@ -155,7 +170,6 @@
 
                         const pos = getCatesian3FromPX(position, map.viewer);
                         const pos1 = Cartesian3_to_WGS84(pos);
-                        console.log(pos1);
 
                         var pt = turf.point([Number(pos1.lng), Number(pos1.lat)]);
                         var poly = turf.polygon([
@@ -264,7 +278,7 @@
 
 <style scoped>
     .map-layout {
-        height: 920px;;
+        height: 850px;;
         position: relative;
     }
 

--
Gitblit v1.9.2