路径规划
This commit is contained in:
@@ -62,6 +62,14 @@
|
|||||||
useStatusStore().infrastructureLayers.showNetworkSystem.loading
|
useStatusStore().infrastructureLayers.showNetworkSystem.loading
|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<!-- 交通道路 -->
|
||||||
|
<TrafficRoadComponent
|
||||||
|
v-if="
|
||||||
|
useStatusStore().appLoadingCompleted &&
|
||||||
|
useStatusStore().infrastructureLayers.showTrafficRoad.loading
|
||||||
|
"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
@@ -74,6 +82,7 @@
|
|||||||
import PopulationGridComponent from './detail-panels/PopulationGridComponent.vue';
|
import PopulationGridComponent from './detail-panels/PopulationGridComponent.vue';
|
||||||
import WaterPipeComponent from './detail-panels/WaterPipeComponent.vue';
|
import WaterPipeComponent from './detail-panels/WaterPipeComponent.vue';
|
||||||
import SchoolComponent from './detail-panels/SchoolComponent.vue';
|
import SchoolComponent from './detail-panels/SchoolComponent.vue';
|
||||||
|
import TrafficRoadComponent from '@/component/rain-earthquake/detail-panels/TrafficRoadComponent.vue';
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="less"></style>
|
<style scoped lang="less"></style>
|
||||||
|
|||||||
@@ -0,0 +1,38 @@
|
|||||||
|
<!-- 供水管网 -->
|
||||||
|
<template>
|
||||||
|
<LoadingGeoserverLayer
|
||||||
|
:id="`trafficRoad`"
|
||||||
|
:layers="`xian:xian_road`"
|
||||||
|
@provide-layers="provideLayers"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { useStatusStore } from '@/stores/useStatusStore.ts';
|
||||||
|
import type { ImageryLayer } from 'cesium';
|
||||||
|
import { onMounted, watch } from 'vue';
|
||||||
|
import LoadingGeoserverLayer from '../../common/LoadingGeoserverLayer.vue';
|
||||||
|
|
||||||
|
// 保存图层引用
|
||||||
|
let trafficRoadLayer: ImageryLayer | null = null;
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
// 监听显示隐藏
|
||||||
|
watch(
|
||||||
|
() => useStatusStore().infrastructureLayers.showTrafficRoad.show,
|
||||||
|
(newValue: boolean) => {
|
||||||
|
trafficRoadLayer!.show = newValue;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提供图层
|
||||||
|
* @param layer 图层
|
||||||
|
*/
|
||||||
|
function provideLayers(layer: ImageryLayer) {
|
||||||
|
trafficRoadLayer = layer;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped></style>
|
||||||
@@ -235,9 +235,7 @@ export const useEarthquakeDisasterChain = () => {
|
|||||||
name: '显示交通道路',
|
name: '显示交通道路',
|
||||||
statusStore: statusStore.infrastructureLayers,
|
statusStore: statusStore.infrastructureLayers,
|
||||||
statusKey: 'showTrafficRoad' as const,
|
statusKey: 'showTrafficRoad' as const,
|
||||||
callback: (status: unknown) => {
|
callback: layerControl.clickTrafficRoad,
|
||||||
console.log('显示交通道路', status);
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '显示桥梁',
|
name: '显示桥梁',
|
||||||
|
|||||||
@@ -76,6 +76,13 @@ export const useLayerControl = () => {
|
|||||||
useStatusStore().infrastructureLayers.showNetworkSystem.loading = true;
|
useStatusStore().infrastructureLayers.showNetworkSystem.loading = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 显示交通道路
|
||||||
|
*/
|
||||||
|
const clickTrafficRoad = () => {
|
||||||
|
useStatusStore().infrastructureLayers.showTrafficRoad.loading = true;
|
||||||
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
clickHiddenDangerPoint,
|
clickHiddenDangerPoint,
|
||||||
clickHospital,
|
clickHospital,
|
||||||
@@ -86,5 +93,6 @@ export const useLayerControl = () => {
|
|||||||
clickSchool,
|
clickSchool,
|
||||||
clickPopulationGrid,
|
clickPopulationGrid,
|
||||||
clickWaterPipe,
|
clickWaterPipe,
|
||||||
|
clickTrafficRoad
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -258,9 +258,7 @@ export const useRainDisasterChain = () => {
|
|||||||
name: '显示交通道路',
|
name: '显示交通道路',
|
||||||
statusStore: statusStore.infrastructureLayers,
|
statusStore: statusStore.infrastructureLayers,
|
||||||
statusKey: 'showTrafficRoad' as const,
|
statusKey: 'showTrafficRoad' as const,
|
||||||
callback: (status: unknown) => {
|
callback: layerControl.clickTrafficRoad,
|
||||||
console.log('显示交通道路', status);
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '显示桥梁',
|
name: '显示桥梁',
|
||||||
|
|||||||
Reference in New Issue
Block a user