添加步骤条

This commit is contained in:
wzy-warehouse
2026-05-06 19:22:10 +08:00
parent ab13567d1d
commit a125872cf5
7 changed files with 67 additions and 4 deletions
@@ -157,13 +157,13 @@
<style scoped>
.control-box {
position: absolute;
top: 75px;
top: 125px;
left: 30px;
z-index: 1001;
}
.disaster-list-box {
position: absolute;
top: 65px;
top: 115px;
left: 20px;
background: rgba(14, 52, 98, 0.8);
color: white;
@@ -85,7 +85,7 @@
.left-button-box {
width: 180px;
position: absolute;
top: 45px;
top: 95px;
z-index: 1000;
border-radius: 8px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0);
@@ -78,7 +78,7 @@
.right-button-box {
width: 180px;
position: absolute;
top: 45px;
top: 95px;
right: 40px;
z-index: 1000;
border-radius: 8px;
@@ -0,0 +1,36 @@
<template>
<div class="step-box">
<el-steps
style="max-width: 100%"
:active="useStepStore().currentStep"
finish-status="success"
simple
v-if="useStepStore().stepList.length > 0"
>
<el-step
v-for="(item, index) in useStepStore().stepList"
:key="index"
:title="item"
/>
</el-steps>
</div>
</template>
<script lang="ts" setup>
import { useStepStore } from '@/stores/useStepStore';
</script>
<style scoped>
.step-box {
width: 100%;
height: 50px;
display: flex;
justify-content: center;
align-items: center;
position: absolute;
top: 50px;
left: 0;
background-color: rgba(14, 52, 98, 0.8);
z-index: 1000;
}
</style>
+4
View File
@@ -40,6 +40,10 @@ export const useStatusStore = defineStore('status', () => {
show: true,
loading: true,
},
stepBar: {
show: false,
loading: true,
},
});
// ============================ 地图图层显示状态 ================================
+19
View File
@@ -0,0 +1,19 @@
import { defineStore } from 'pinia';
import { type Ref, ref } from 'vue';
/**
* 步骤条store
*/
export const useStepStore = defineStore('step', () => {
/**
* 步骤条列表
*/
const stepList: Ref<string[]> = ref([]);
/**
* 当前步骤
*/
const currentStep: Ref<number> = ref(0);
return { stepList, currentStep };
});
@@ -54,6 +54,9 @@
<!-- 功能组件 -->
<FunctionComponent />
<!-- 步骤组件 -->
<StepComponent />
</div>
</template>
@@ -66,6 +69,7 @@
import LeftButtonComponent from '@/component/rain-earthquake/LeftButtonComponent.vue';
import LeftLegendComponent from '@/component/rain-earthquake/LeftLegendComponent.vue';
import RightButtonComponent from '@/component/rain-earthquake/RightButtonComponent.vue';
import StepComponent from '@/component/rain-earthquake/StepComponent.vue';
import { useRainDisasterChain } from '@/hooks/rainstorm/useRainDisasterChain';
import { useStatusStore } from '@/stores/useStatusStore';
import { DisasterType } from '@/types/common/DisasterType.ts';