| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- <script setup lang="ts">
- import { useRoute } from 'vue-router'
- import { computed } from 'vue'
- const route = useRoute()
- const subMenuItems = [
- { path: '/enterprise/emergency/flood', title: '洪涝灾害救援' },
- { path: '/enterprise/emergency/forest-fire', title: '森林火灾救援' },
- { path: '/enterprise/emergency/earthquake', title: '地震与地质灾害救援' },
- { path: '/enterprise/emergency/mountain-rescue', title: '山岳搜救' }
- ]
- const currentPath = computed(() => route.path)
- </script>
- <template>
- <div class="emergency-view">
- <div class="header">
- <h1>应急救援解决方案</h1>
- <p class="description">为应急救援提供高效、精准的数字化支持</p>
- </div>
- <!-- 子菜单导航 -->
- <nav class="sub-nav">
- <router-link
- v-for="item in subMenuItems"
- :key="item.path"
- :to="item.path"
- class="nav-item"
- :class="{ active: currentPath === item.path }"
- >
- {{ item.title }}
- </router-link>
- </nav>
- <!-- 子路由视图 -->
- <div class="content">
- <router-view></router-view>
- </div>
- </div>
- </template>
- <style scoped lang="scss">
- @use '@/assets/styles/variables' as v;
- @use '@/assets/styles/mixins' as m;
- .emergency-view {
- padding: v.$spacing-xl v.$spacing-xl * 2;
- .header {
- text-align: center;
- margin-bottom: v.$spacing-xl * 2;
- h1 {
- font-size: v.$font-size-xxl;
- color: v.$text-primary;
- margin-bottom: v.$spacing-md;
- }
- .description {
- font-size: v.$font-size-lg;
- color: v.$text-secondary;
- }
- }
- .sub-nav {
- display: flex;
- justify-content: center;
- gap: v.$spacing-md;
- margin-bottom: v.$spacing-xl;
- padding: v.$spacing-md;
- background-color: v.$background-light;
- border-radius: v.$border-radius-lg;
- box-shadow: v.$shadow-sm;
- .nav-item {
- padding: v.$spacing-sm v.$spacing-md;
- color: v.$text-primary;
- text-decoration: none;
- border-radius: v.$border-radius-md;
- transition: all v.$transition-fast;
- &:hover {
- background-color: rgba(v.$primary-color, 0.1);
- color: v.$primary-color;
- }
- &.active {
- background-color: v.$primary-color;
- color: white;
- }
- }
- }
- .content {
- max-width: 1200px;
- margin: 0 auto;
- }
- }
- </style>
|