加载断裂带,同时允许cesium加载EPSG:4490数据

This commit is contained in:
wzy-warehouse
2026-04-16 09:32:33 +08:00
parent b3ba81dfe2
commit 360ea7ad2e
7 changed files with 131539 additions and 1 deletions
+34 -1
View File
@@ -31,6 +31,7 @@
</template>
<script setup lang="ts">
import { xianFaultData } from '@/assets';
import BasicComponent from '@/component/rain-earthquake/BasicComponent.vue';
import ControlShowComponent from '@/component/rain-earthquake/ControlShowComponent.vue';
import DisasterChainPointComponent from '@/component/rain-earthquake/DisasterChainPointComponent.vue';
@@ -38,8 +39,11 @@
import LegendComponent from '@/component/rain-earthquake/LegendComponent.vue';
import RightButtonComponent from '@/component/rain-earthquake/RightButtonComponent.vue';
import { useEarthquakeDisasterChain } from '@/hooks/earthquake/useEarthquakeDisasterChain';
import { useStatusStore } from '@/stores/useStatusStore';
import { DisasterType } from '@/types/common/DisasterType.ts';
import { watch } from 'vue';
import { CesiumUtilsSingleton } from '@/utils/cesium/CesiumUtils';
import { Color } from 'cesium';
import { onMounted, watch } from 'vue';
import { useRoute } from 'vue-router';
const route = useRoute();
@@ -58,6 +62,35 @@
changeCurrentPage,
} = 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(
conditions,