diff --git a/src/views/sponeScreen/cityGK/PhysicalGeography.vue b/src/views/sponeScreen/cityGK/PhysicalGeography.vue index cd3235f..73fb6a5 100644 --- a/src/views/sponeScreen/cityGK/PhysicalGeography.vue +++ b/src/views/sponeScreen/cityGK/PhysicalGeography.vue @@ -11,11 +11,11 @@
6118
km²
-
中心城区
+
中心城区
647.55
km²
-
建成区
+
建成区
117
km²
@@ -45,6 +45,7 @@ @@ -118,6 +142,7 @@ color: #18ffff; margin-left: 15px; text-align: center; + z-index: 111; // background: red; } .rightText { diff --git a/src/views/sponeScreen/cityGK/PhysicalGeography.vue b/src/views/sponeScreen/cityGK/PhysicalGeography.vue index cd3235f..73fb6a5 100644 --- a/src/views/sponeScreen/cityGK/PhysicalGeography.vue +++ b/src/views/sponeScreen/cityGK/PhysicalGeography.vue @@ -11,11 +11,11 @@
6118
km²
-
中心城区
+
中心城区
647.55
km²
-
建成区
+
建成区
117
km²
@@ -45,6 +45,7 @@ @@ -118,6 +142,7 @@ color: #18ffff; margin-left: 15px; text-align: center; + z-index: 111; // background: red; } .rightText { diff --git a/src/views/sponeScreen/cityGK/index.vue b/src/views/sponeScreen/cityGK/index.vue index 212c4eb..e85962e 100644 --- a/src/views/sponeScreen/cityGK/index.vue +++ b/src/views/sponeScreen/cityGK/index.vue @@ -27,6 +27,7 @@ import CurrentIssues from '@/views/sponeScreen/cityGK/CurrentIssues.vue'; //现状问题 import headHMAimg from '@/views/sponeScreen/cityGK/headHMAimg.vue'; //头部 import PhysicalGeography from '@/views/sponeScreen/cityGK/PhysicalGeography.vue'; //头部 +import bus from '@/bus/index'; const { proxy } = getCurrentInstance(); const showPanel = ref(true); //面板展开收起 @@ -45,7 +46,20 @@ { immediate: true } ); -onMounted(() => {}); +onMounted(() => { + setTimeout(() => { + bus.emit('setIniteLayer', [ + { + layername: 'topography', + show: false, + }, + { + layername: 'builtCity', + show: false, + }, + ]); + }, 5000); +}); diff --git a/src/views/sponeScreen/cityGK/PhysicalGeography.vue b/src/views/sponeScreen/cityGK/PhysicalGeography.vue index cd3235f..73fb6a5 100644 --- a/src/views/sponeScreen/cityGK/PhysicalGeography.vue +++ b/src/views/sponeScreen/cityGK/PhysicalGeography.vue @@ -11,11 +11,11 @@
6118
km²
-
中心城区
+
中心城区
647.55
km²
-
建成区
+
建成区
117
km²
@@ -45,6 +45,7 @@ @@ -118,6 +142,7 @@ color: #18ffff; margin-left: 15px; text-align: center; + z-index: 111; // background: red; } .rightText { diff --git a/src/views/sponeScreen/cityGK/index.vue b/src/views/sponeScreen/cityGK/index.vue index 212c4eb..e85962e 100644 --- a/src/views/sponeScreen/cityGK/index.vue +++ b/src/views/sponeScreen/cityGK/index.vue @@ -27,6 +27,7 @@ import CurrentIssues from '@/views/sponeScreen/cityGK/CurrentIssues.vue'; //现状问题 import headHMAimg from '@/views/sponeScreen/cityGK/headHMAimg.vue'; //头部 import PhysicalGeography from '@/views/sponeScreen/cityGK/PhysicalGeography.vue'; //头部 +import bus from '@/bus/index'; const { proxy } = getCurrentInstance(); const showPanel = ref(true); //面板展开收起 @@ -45,7 +46,20 @@ { immediate: true } ); -onMounted(() => {}); +onMounted(() => { + setTimeout(() => { + bus.emit('setIniteLayer', [ + { + layername: 'topography', + show: false, + }, + { + layername: 'builtCity', + show: false, + }, + ]); + }, 5000); +}); diff --git a/src/views/sponeScreen/gisMF/legendKF.vue b/src/views/sponeScreen/gisMF/legendKF.vue index 5d0c272..942bb25 100644 --- a/src/views/sponeScreen/gisMF/legendKF.vue +++ b/src/views/sponeScreen/gisMF/legendKF.vue @@ -40,7 +40,7 @@ import topography from '@/assets/newImgs/topography.png'; import cesiumPaiShuiArea from './cesiumPaiShuiArea.js'; import newfiberVectorLayer from './newfiberVectorLayer.js'; -import bus from "@/bus/index"; +import bus from '@/bus/index'; const { proxy } = getCurrentInstance(); const legendList = ref([]); const showLegend = ref(false); @@ -155,8 +155,22 @@ }; onMounted(() => { legendList.value = cesiumMapLegend; + bus.on('setIniteLayer', data => { + console.log('data---', data); + let legendList_1 = legendList.value[0]['children'] + .concat(legendList.value[1]['children']) + .concat(legendList.value[2]['children']) + .flat(); + data.forEach(layer => { + let selectedLayer = legendList_1.filter(item => item.layername == layer.layername); + console.log('selectedLayer--', selectedLayer); + selectedLayer.map(i => { + i.isCheck = layer.show; + changeLegend(i); + }); + }); + }); }); -