Files
xian_vue_new/src/views/home/earthquake/EarthquakeView.vue
T

99 lines
3.3 KiB
Vue
Raw Normal View History

<template>
<div>
2026-04-14 16:00:39 +08:00
<!-- 基础组件 -->
<BasicComponent
:disaster-type="DisasterType.EARTHQUAKE"
:key="route.fullPath"
/>
2026-04-14 08:08:01 +08:00
2026-04-16 09:42:21 +08:00
<!-- 断裂带 -->
<FaultComponent
v-if="
2026-06-12 10:42:54 +08:00
statusStore.appLoadingCompleted &&
statusStore.mapLayers.faultShow.loading
2026-04-16 09:42:21 +08:00
"
/>
2026-04-14 16:00:39 +08:00
<!-- 灾害链影响列表组件 -->
2026-04-14 08:08:01 +08:00
<DisasterChainPointComponent
v-if="
2026-06-12 10:42:54 +08:00
statusStore.appLoadingCompleted &&
statusStore.uiComponents.disasterChainPointShow.loading
"
2026-06-12 10:42:54 +08:00
:select-options="disasterChainTableStore.selectOptions"
:table-data-list="disasterChainTableStore.tableDatas"
:table-columns="disasterChainTableStore.tableColumns"
:page-option="disasterChainTableStore.paginationConfig"
@change-conditions="disasterChainTableStore.changeConditions"
@change-current-page="disasterChainTableStore.changeCurrentPage"
2026-04-14 08:08:01 +08:00
/>
2026-04-14 16:00:39 +08:00
<!-- 左侧按钮组件 -->
<LeftButtonComponent
v-if="
2026-05-07 13:11:15 +08:00
statusStore.appLoadingCompleted &&
statusStore.uiComponents.leftButton.loading
"
:button-list="leftButtonInfo"
/>
<!-- 右侧按钮组件 -->
<RightButtonComponent
v-if="
2026-05-07 13:11:15 +08:00
statusStore.appLoadingCompleted &&
statusStore.uiComponents.rightButton.loading
"
:button-list="rightButtonInfo"
/>
<!-- 控制显示组件 -->
<ControlShowComponent :constrol-show-list="controlPanel" />
<!-- 控制显示详情组件 -->
<ControlShowDetailComponent />
</div>
</template>
<script setup lang="ts">
2026-04-16 09:42:21 +08:00
import FaultComponent from '@/component/earthquake/FaultComponent.vue';
import BasicComponent from '@/component/rain-earthquake/BasicComponent.vue';
import ControlShowComponent from '@/component/rain-earthquake/ControlShowComponent.vue';
import ControlShowDetailComponent from '@/component/rain-earthquake/ControlShowDetailComponent.vue';
2026-04-14 08:08:01 +08:00
import DisasterChainPointComponent from '@/component/rain-earthquake/DisasterChainPointComponent.vue';
2026-04-14 16:00:39 +08:00
import LeftButtonComponent from '@/component/rain-earthquake/LeftButtonComponent.vue';
import RightButtonComponent from '@/component/rain-earthquake/RightButtonComponent.vue';
2026-04-14 08:08:01 +08:00
import { useEarthquakeDisasterChain } from '@/hooks/earthquake/useEarthquakeDisasterChain';
2026-06-12 10:42:54 +08:00
import { useDisasterChainTableStore } from '@/stores/useDisasterChainTableStore';
import { useStatusStore } from '@/stores/useStatusStore';
2026-06-12 10:42:54 +08:00
import { DisasterType, PointType } from '@/types/common/DisasterType.ts';
import { onBeforeMount } from 'vue';
import { useRoute } from 'vue-router';
const route = useRoute();
2026-04-14 08:08:01 +08:00
2026-06-12 10:42:54 +08:00
const { leftButtonInfo, rightButtonInfo, controlPanel } =
useEarthquakeDisasterChain();
2026-04-14 08:08:01 +08:00
2026-05-07 13:11:15 +08:00
const statusStore = useStatusStore();
2026-06-12 10:42:54 +08:00
const disasterChainTableStore = useDisasterChainTableStore();
onBeforeMount(() => {
// 设置相关数据
disasterChainTableStore.selectOptions = [
{ value: PointType.LANDSLIDE, label: '滑坡' },
{ value: PointType.DEBRIS_FLOW, label: '泥石流' },
{ value: PointType.RISK_AREA, label: '风险区' },
];
disasterChainTableStore.tableColumns = [
{ title: '名称', key: 'disasterName' },
{ title: '位置', key: 'position' },
{ title: '规模等级', key: 'scaleGrade' },
{ title: '险情等级', key: 'riskGrade' },
];
});
</script>
<style scoped></style>