WQQ 1 miesiąc temu
rodzic
commit
98858d8468
1 zmienionych plików z 7 dodań i 26 usunięć
  1. 7 26
      src/views/map/index.vue

+ 7 - 26
src/views/map/index.vue

@@ -2,7 +2,7 @@
   <div class="large-screen">
     <!-- 地图 -->
     <mapScene ref="mapSceneRef" v-show="state.activeIndex === '1'"></mapScene>
-    <div class="fusion-bg" v-show="state.activeIndex === '5'">
+    <div class="fusion-bg" v-show="state.activeIndex === '4'">
       <img src="@/assets/images/昆山水文站.jpg" alt="昆山水文站" />
     </div>
     <div class="vignette-overlay"></div>
@@ -24,9 +24,9 @@
           <mMenuItem index="2">水质监测</mMenuItem>
           <mMenuItem index="3">水文数据</mMenuItem>
           <div class="top-menu-mid-space"></div>
-          <mMenuItem index="4">防洪预警</mMenuItem>
-          <mMenuItem index="5">融合体系</mMenuItem>
-          <mMenuItem index="6">系统设置</mMenuItem>
+          <mMenuItem index="4">融合体系</mMenuItem>
+          <mMenuItem index="5">历史沿革</mMenuItem>
+          <mMenuItem index="6">水文科普</mMenuItem>
         </mMenu>
       </div>
       <!-- 区域总览内容 -->
@@ -89,7 +89,7 @@
       </template>
 
       <!-- 融合体系内容 -->
-      <WaterResourceContent v-if="state.activeIndex === '5'" />
+      <WaterResourceContent v-if="state.activeIndex === '4'" />
       <!-- 左右装饰线 -->
       <div class="large-screen-left-zsline"></div>
       <div class="large-screen-right-zsline"></div>
@@ -115,7 +115,6 @@
 </template>
 <script setup>
 import { shallowRef, ref, reactive, onMounted, onBeforeUnmount, nextTick } from "vue"
-import { useRouter } from "vue-router"
 import mapScene from "./map.vue"
 import mHeader from "@/components/mHeader/index.vue"
 import mCountCard from "@/components/mCountCard/index.vue"
@@ -131,14 +130,13 @@ import PurposeSpecialFunds from "./components/PurposeSpecialFunds.vue"
 import ProportionPopulationConsumption from "./components/ProportionPopulationConsumption.vue"
 import ElectricityUsage from "./components/ElectricityUsage.vue"
 import QuarterlyGrowthSituation from "./components/QuarterlyGrowthSituation.vue"
+import WaterResourceContent from "@/views/waterResource/index.vue"
 
 import { Assets } from "./assets.js"
 import emitter from "@/utils/emitter"
 import gsap from "gsap"
 import autofit from "autofit.js"
 
-const router = useRouter()
-
 const assets = shallowRef(null)
 const mapSceneRef = ref(null)
 const state = reactive({
@@ -247,23 +245,6 @@ async function hideLoading() {
 
 function handleMenuSelect(index) {
   state.activeIndex = index
-  
-  // 根据索引跳转到不同页面
-  switch (index) {
-    case "1":
-      router.push("/map")
-      break
-    case "2":
-      router.push("/waterQuality")
-      break
-    case "3":
-      router.push("/waterResource")
-      break
-    default:
-      break
-  }
-  
-  // 添加页面内容的动画效果
   nextTick(() => {
     if (index === "1") {
       gsap.to(".left-card", { x: 0, opacity: 1, duration: 0.5, stagger: 0.1 })
@@ -271,7 +252,7 @@ function handleMenuSelect(index) {
       gsap.to(".count-card", { y: 0, opacity: 1, duration: 0.5, stagger: 0.1 })
       gsap.to(".bottom-tray", { y: 0, opacity: 1, duration: 0.5 })
       gsap.to(".bottom-radar", { y: 0, opacity: 1, duration: 0.5 })
-    } else if (index === "2" || index === "3") {
+    } else if (index === "4") {
       gsap.to(".water-resource-content .module-card", { x: 0, opacity: 1, duration: 0.5, stagger: 0.1 })
     }
   })