From 9b3f59ebe897d76b3a6108781e232d6e3967ca0f Mon Sep 17 00:00:00 2001
From: Your Name <123456>
Date: Tue, 10 May 2022 14:54:23 +0800
Subject: [PATCH] 四色图
---
src/views/doublePreventAction/riskLevelManage/fourColorMap/oneHundredAndThirty/index.vue | 29 ++++++++++++++++++++++++-----
1 files changed, 24 insertions(+), 5 deletions(-)
diff --git a/src/views/doublePreventAction/riskLevelManage/fourColorMap/oneHundredAndThirty/index.vue b/src/views/doublePreventAction/riskLevelManage/fourColorMap/oneHundredAndThirty/index.vue
index 4920741..4a1b871 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" />
+ <Tab v-if="loaded" :type='type' :colorMapList='colorMapList'/>
</div>
@@ -16,7 +16,7 @@
getCatesian3FromPX,
Cartesian3_to_WGS84,
} from '../../../../../components/Map/libs/Point';
-
+ import { getMap } from '@/api/fourColorMap'
export default {
name: 'App',
components: {
@@ -31,6 +31,8 @@
option: null,
heatLayer: null,
shineishiwai: true,
+ colorMapList:[],
+ type:2,
};
},
mounted() {
@@ -115,9 +117,26 @@
testLoadedData() {
const map = global.map;
if (!map) return;
- $.get('./public/data/plots_namisuo.geojson', res => {
- map.loadGeoJSON(res);
- });
+ 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)
+ }
+ })
+ const fourMapList = {
+ "type": "FeatureCollection",
+ "features": list
+ }
+ map.loadGeoJSON(fourMapList)
+ })
+ // $.get('./public/data/plots_namisuo.geojson', res => {
+ // map.loadGeoJSON(res);
+ // });
},
initEvent(map) {
let popup = null;
--
Gitblit v1.9.2