断裂带
This commit is contained in:
@@ -0,0 +1,27 @@
|
|||||||
|
<!-- 加载断层组件 -->
|
||||||
|
<template>
|
||||||
|
<div></div>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { xianFaultData } from '@/assets';
|
||||||
|
import { CesiumUtilsSingleton } from '@/utils/cesium/CesiumUtils';
|
||||||
|
import { Color } from 'cesium';
|
||||||
|
import { onMounted } from 'vue';
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
CesiumUtilsSingleton.addGeoJsonLayer(
|
||||||
|
'xian-earthque-fault-data',
|
||||||
|
xianFaultData,
|
||||||
|
{
|
||||||
|
showName: false,
|
||||||
|
isDefault: true,
|
||||||
|
polylineStyle: {
|
||||||
|
width: 2,
|
||||||
|
material: Color.RED,
|
||||||
|
clampToGround: true,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<style scoped lang="less"></style>
|
||||||
@@ -37,6 +37,8 @@ export const useStatusStore = defineStore('status', () => {
|
|||||||
hiddenDangerPointShow: true,
|
hiddenDangerPointShow: true,
|
||||||
/** 风险点显示状态 */
|
/** 风险点显示状态 */
|
||||||
riskPointShow: true,
|
riskPointShow: true,
|
||||||
|
/** 断裂带显示状态 */
|
||||||
|
faultShow: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -6,6 +6,14 @@
|
|||||||
:key="route.fullPath"
|
:key="route.fullPath"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<!-- 断裂带 -->
|
||||||
|
<FaultComponent
|
||||||
|
v-if="
|
||||||
|
useStatusStore().appLoadingCompleted &&
|
||||||
|
useStatusStore().mapLayers.faultShow
|
||||||
|
"
|
||||||
|
/>
|
||||||
|
|
||||||
<!-- 灾害链影响列表组件 -->
|
<!-- 灾害链影响列表组件 -->
|
||||||
<DisasterChainPointComponent
|
<DisasterChainPointComponent
|
||||||
:select-options="selectOptions"
|
:select-options="selectOptions"
|
||||||
@@ -31,7 +39,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { xianFaultData } from '@/assets';
|
import FaultComponent from '@/component/earthquake/FaultComponent.vue';
|
||||||
import BasicComponent from '@/component/rain-earthquake/BasicComponent.vue';
|
import BasicComponent from '@/component/rain-earthquake/BasicComponent.vue';
|
||||||
import ControlShowComponent from '@/component/rain-earthquake/ControlShowComponent.vue';
|
import ControlShowComponent from '@/component/rain-earthquake/ControlShowComponent.vue';
|
||||||
import DisasterChainPointComponent from '@/component/rain-earthquake/DisasterChainPointComponent.vue';
|
import DisasterChainPointComponent from '@/component/rain-earthquake/DisasterChainPointComponent.vue';
|
||||||
@@ -41,9 +49,7 @@
|
|||||||
import { useEarthquakeDisasterChain } from '@/hooks/earthquake/useEarthquakeDisasterChain';
|
import { useEarthquakeDisasterChain } from '@/hooks/earthquake/useEarthquakeDisasterChain';
|
||||||
import { useStatusStore } from '@/stores/useStatusStore';
|
import { useStatusStore } from '@/stores/useStatusStore';
|
||||||
import { DisasterType } from '@/types/common/DisasterType.ts';
|
import { DisasterType } from '@/types/common/DisasterType.ts';
|
||||||
import { CesiumUtilsSingleton } from '@/utils/cesium/CesiumUtils';
|
import { watch } from 'vue';
|
||||||
import { Color } from 'cesium';
|
|
||||||
import { onMounted, watch } from 'vue';
|
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
@@ -62,35 +68,6 @@
|
|||||||
changeCurrentPage,
|
changeCurrentPage,
|
||||||
} = useEarthquakeDisasterChain();
|
} = useEarthquakeDisasterChain();
|
||||||
|
|
||||||
/**
|
|
||||||
* 组件挂载
|
|
||||||
*/
|
|
||||||
onMounted(() => {
|
|
||||||
/**
|
|
||||||
* 加载西安断层数据
|
|
||||||
*/
|
|
||||||
watch(
|
|
||||||
() => useStatusStore().appLoadingCompleted,
|
|
||||||
(newStatue: boolean) => {
|
|
||||||
if (newStatue) {
|
|
||||||
CesiumUtilsSingleton.addGeoJsonLayer(
|
|
||||||
'xian-earthque-fault-data',
|
|
||||||
xianFaultData,
|
|
||||||
{
|
|
||||||
showName: false,
|
|
||||||
isDefault: true,
|
|
||||||
polylineStyle: {
|
|
||||||
width: 2,
|
|
||||||
material: Color.RED,
|
|
||||||
clampToGround: true,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
// 监听条件变化
|
// 监听条件变化
|
||||||
watch(
|
watch(
|
||||||
conditions,
|
conditions,
|
||||||
|
|||||||
Reference in New Issue
Block a user