Files
xian_vue_new/src/views/home/rainstorm/RainstormView.vue
T

108 lines
3.6 KiB
Vue
Raw Normal View History

<template>
<div>
2026-04-14 16:00:39 +08:00
<!-- 基础组件 -->
<BasicComponent
:disaster-type="DisasterType.RAINSTORM"
:key="route.fullPath"
/>
2026-04-13 19:27:32 +08:00
2026-04-14 16:00:39 +08:00
<!-- 灾害链影响列表组件 -->
2026-04-13 19:27:32 +08:00
<DisasterChainPointComponent
v-if="
2026-05-07 13:11:15 +08:00
statusStore.appLoadingCompleted &&
statusStore.uiComponents.disasterChainPointShow.loading
"
: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-13 19:27:32 +08:00
/>
2026-04-13 20:55:32 +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"
/>
2026-04-14 16:33:23 +08:00
2026-05-06 17:44:30 +08:00
<!-- 左侧图例组件 -->
<LeftLegendComponent
v-if="
2026-05-07 13:11:15 +08:00
statusStore.appLoadingCompleted &&
statusStore.uiComponents.leftLegend.loading
2026-05-06 17:44:30 +08:00
"
/>
2026-04-14 16:33:23 +08:00
<!-- 右侧按钮组件 -->
<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 />
<!-- 功能组件 -->
<FunctionComponent />
2026-05-06 19:22:10 +08:00
<!-- 步骤组件 -->
<StepComponent />
</div>
</template>
<script setup lang="ts">
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-13 19:27:32 +08:00
import DisasterChainPointComponent from '@/component/rain-earthquake/DisasterChainPointComponent.vue';
import FunctionComponent from '@/component/rain-earthquake/FunctionComponent.vue';
2026-04-14 16:00:39 +08:00
import LeftButtonComponent from '@/component/rain-earthquake/LeftButtonComponent.vue';
2026-05-06 17:44:30 +08:00
import LeftLegendComponent from '@/component/rain-earthquake/LeftLegendComponent.vue';
2026-04-14 16:33:23 +08:00
import RightButtonComponent from '@/component/rain-earthquake/RightButtonComponent.vue';
2026-05-06 19:22:10 +08:00
import StepComponent from '@/component/rain-earthquake/StepComponent.vue';
2026-04-13 20:55:32 +08:00
import { useRainDisasterChain } from '@/hooks/rainstorm/useRainDisasterChain';
import { useDisasterChainTableStore } from '@/stores/useDisasterChainTableStore';
import { useStatusStore } from '@/stores/useStatusStore';
import { DisasterType, PointType } from '@/types/common/DisasterType.ts';
import { onBeforeMount } from 'vue';
import { useRoute } from 'vue-router';
const route = useRoute();
2026-04-13 19:27:32 +08:00
const { leftButtonInfo, rightButtonInfo, controlPanel } =
useRainDisasterChain();
2026-05-07 13:11:15 +08:00
const statusStore = useStatusStore();
const disasterChainTableStore = useDisasterChainTableStore();
onBeforeMount(() => {
// 设置相关数据
disasterChainTableStore.selectOptions = [
{ value: PointType.LANDSLIDE, label: '滑坡' },
{ value: PointType.DEBRIS_FLOW, label: '泥石流' },
{ value: PointType.FLASH_FLOOD, label: '山洪' },
{ value: PointType.WATER_LOGGING, label: '内涝' },
];
disasterChainTableStore.tableColumns = [
{ title: '名称', key: 'disasterName' },
{ title: '位置', key: 'position' },
{ title: '规模等级', key: 'scaleGrade' },
{ title: '险情等级', key: 'riskGrade' },
];
});
2026-04-13 19:27:32 +08:00
</script>
<style scoped></style>