显示管网
This commit is contained in:
@@ -46,6 +46,14 @@
|
|||||||
useStatusStore().poiLayers.showPopulationGrid.loading
|
useStatusStore().poiLayers.showPopulationGrid.loading
|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<!-- 管网系统 -->
|
||||||
|
<WaterPipeComponent
|
||||||
|
v-if="
|
||||||
|
useStatusStore().appLoadingCompleted &&
|
||||||
|
useStatusStore().infrastructureLayers.showNetworkSystem.loading
|
||||||
|
"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
@@ -56,6 +64,7 @@
|
|||||||
import FireStationComponent from './FireStationComponent.vue';
|
import FireStationComponent from './FireStationComponent.vue';
|
||||||
import StorePointsComponent from './StorePointsComponent.vue';
|
import StorePointsComponent from './StorePointsComponent.vue';
|
||||||
import PopulationGridComponent from './PopulationGridComponent.vue';
|
import PopulationGridComponent from './PopulationGridComponent.vue';
|
||||||
|
import WaterPipeComponent from './WaterPipeComponent.vue';
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="less"></style>
|
<style scoped lang="less"></style>
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
let populationLayer: ImageryLayer | null = null;
|
let populationLayer: ImageryLayer | null = null;
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 监听显示隐藏风险点
|
// 监听显示
|
||||||
watch(
|
watch(
|
||||||
() => useStatusStore().poiLayers.showPopulationGrid.show,
|
() => useStatusStore().poiLayers.showPopulationGrid.show,
|
||||||
(newValue: boolean) => {
|
(newValue: boolean) => {
|
||||||
|
|||||||
@@ -0,0 +1,38 @@
|
|||||||
|
<!-- 供水管网 -->
|
||||||
|
<template>
|
||||||
|
<LoadingGeoserverLayer
|
||||||
|
:id="`waterPipe`"
|
||||||
|
:layers="`xian:xian_water_pipe`"
|
||||||
|
@provide-layers="provideLayers"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { useStatusStore } from '@/stores/useStatusStore';
|
||||||
|
import type { ImageryLayer } from 'cesium';
|
||||||
|
import { onMounted, watch } from 'vue';
|
||||||
|
import LoadingGeoserverLayer from './LoadingGeoserverLayer.vue';
|
||||||
|
|
||||||
|
// 保存图层引用
|
||||||
|
let waterPipeLayer: ImageryLayer | null = null;
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
// 监听显示隐藏
|
||||||
|
watch(
|
||||||
|
() => useStatusStore().infrastructureLayers.showNetworkSystem.show,
|
||||||
|
(newValue: boolean) => {
|
||||||
|
waterPipeLayer!.show = newValue;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提供图层
|
||||||
|
* @param layer 图层
|
||||||
|
*/
|
||||||
|
function provideLayers(layer: ImageryLayer) {
|
||||||
|
waterPipeLayer = layer;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped></style>
|
||||||
@@ -231,9 +231,7 @@ export const useEarthquakeDisasterChain = () => {
|
|||||||
name: '显示管网系统',
|
name: '显示管网系统',
|
||||||
statusStore: statusStore.infrastructureLayers,
|
statusStore: statusStore.infrastructureLayers,
|
||||||
statusKey: 'showNetworkSystem' as const,
|
statusKey: 'showNetworkSystem' as const,
|
||||||
callback: (status: unknown) => {
|
callback: layerControl.clickWaterPipe,
|
||||||
console.log('显示管网系统', status);
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '显示交通道路',
|
name: '显示交通道路',
|
||||||
|
|||||||
@@ -261,9 +261,7 @@ export const useRainDisasterChain = () => {
|
|||||||
name: '显示管网系统',
|
name: '显示管网系统',
|
||||||
statusStore: statusStore.infrastructureLayers,
|
statusStore: statusStore.infrastructureLayers,
|
||||||
statusKey: 'showNetworkSystem' as const,
|
statusKey: 'showNetworkSystem' as const,
|
||||||
callback: (status: unknown) => {
|
callback: layerControl.clickWaterPipe,
|
||||||
console.log('显示管网系统', status);
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '显示交通道路',
|
name: '显示交通道路',
|
||||||
|
|||||||
@@ -61,6 +61,13 @@ export const useLayerControl = () => {
|
|||||||
useStatusStore().poiLayers.showPopulationGrid.loading = true;
|
useStatusStore().poiLayers.showPopulationGrid.loading = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 显示管网
|
||||||
|
*/
|
||||||
|
const clickWaterPipe = () => {
|
||||||
|
useStatusStore().infrastructureLayers.showNetworkSystem.loading = true;
|
||||||
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
clickHiddenDangerPoint,
|
clickHiddenDangerPoint,
|
||||||
clickHospital,
|
clickHospital,
|
||||||
@@ -69,5 +76,6 @@ export const useLayerControl = () => {
|
|||||||
clickFireStation,
|
clickFireStation,
|
||||||
clickStorePoints,
|
clickStorePoints,
|
||||||
clickPopulationGrid,
|
clickPopulationGrid,
|
||||||
|
clickWaterPipe,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user