From 0face36fd79ce30127c80d131b1bc41106133f3b Mon Sep 17 00:00:00 2001
From: guonan <guonan201020@163.com>
Date: 星期三, 16 四月 2025 09:49:59 +0800
Subject: [PATCH] 修改样式

---
 /dev/null                        |   29 -------
 src/assets/css/navigation.css    |  106 ++++++++++++++-----------
 src/components/menu/Device.vue   |    3 
 src/store/simulation.js          |    4 
 src/assets/css/global.css        |   31 +++++++
 src/views/left/Left.vue          |    1 
 src/components/menu/Location.vue |    1 
 src/views/left/CitySim.vue       |   10 ++
 src/views/nav/Navigation.vue     |   33 +++++++
 9 files changed, 130 insertions(+), 88 deletions(-)

diff --git a/src/assets/css/global.css b/src/assets/css/global.css
index 3639e65..103df06 100644
--- a/src/assets/css/global.css
+++ b/src/assets/css/global.css
@@ -1,3 +1,31 @@
+.left {
+  position: absolute;
+  width: 355px;
+  top: 100px;
+  left: 30px;
+  bottom: 45px;
+  z-index: 99;
+}
+
+.left-top {
+  background: url("@/assets/img/left/topbg.png") no-repeat;
+  width: 100%;
+  height: 41px;
+  color: white;
+  line-height: 41px;
+  font-size: 16px;
+  font-weight: 700;
+  cursor: pointer;
+  text-indent: 80px;
+  letter-spacing: 2px;
+}
+.left-content {
+  margin-top: 20px;
+  background: url("@/assets/img/left/leftbg.png");
+  background-size: 100% 100%;
+  width: 100%;
+  height: calc(100% - 70px);
+}
 .el-button {
   background-color: #009688 !important;
   border-color: #009688 !important;
@@ -17,10 +45,9 @@
 .el-date-range-picker__header [class*="arrow-left"] {
   color: #ffffff;
 }
- .el-select-dropdown__item.is-hovering {
+.el-select-dropdown__item.is-hovering {
   background-color: #009688;
 }
-
 
 .el-select__placeholder {
   color: white;
diff --git a/src/assets/css/left.css b/src/assets/css/left.css
deleted file mode 100644
index fc9adc1..0000000
--- a/src/assets/css/left.css
+++ /dev/null
@@ -1,29 +0,0 @@
-.left{
-    position: absolute;
-    width: 355px;
-    top:100px;
-    left: 30px;
-    bottom: 45px;
-    z-index: 99;
-}
-
-.left-top{
-    background: url('@/assets/img/left/topbg.png') no-repeat;
-    width: 100%;
-    height: 41px;
-    color: white;
-    line-height: 41px;
-    font-size: 16px;
-    font-weight: 700;
-    cursor: pointer;
-    text-indent: 80px;
-    letter-spacing: 2px;
-
-}
-.left-content{
-    margin-top: 20px;
-    background: url('@/assets/img/left/leftbg.png');
-    background-size: 100% 100%;
-    width: 100%;
-    height: calc(100% - 70px);
-}
\ No newline at end of file
diff --git a/src/assets/css/navigation.css b/src/assets/css/navigation.css
index faa2aba..d3689ad 100644
--- a/src/assets/css/navigation.css
+++ b/src/assets/css/navigation.css
@@ -1,89 +1,101 @@
 .navigation {
-    height: 65px;
-    width: 989px;
-    position: absolute;
-    bottom: 40px;
-    left: calc(50% - 494px);
+  height: 65px;
+  width: 989px;
+  position: absolute;
+  bottom: 40px;
+  left: calc(50% - 494px);
 }
 
 .navigation-bg {
-    background: url("@/assets/img/navigation/navigationbg.png");
-    background-size: 100% 100%;
-    width: 989px;
-    height: 28px;
-    position: absolute;
-    bottom: 0px;
-    left: 0px;
+  background: url("@/assets/img/navigation/navigationbg.png");
+  background-size: 100% 100%;
+  width: 989px;
+  height: 28px;
+  position: absolute;
+  bottom: 0px;
+  left: 0px;
 }
 
 .navigation-content {
-    /* 浣跨敤 flex 甯冨眬 */
-    display: flex;
-    /* 浣垮瓙鍏冪礌姘村钩绛夐棿闅斿垎甯� */
-    justify-content: space-between;
-    position: absolute;
-    top: 0px;
-    left: calc(50% - 350px);
-    float: left;
-    width: 700px;
-    margin: auto;
-    z-index: 1;
+  /* 浣跨敤 flex 甯冨眬 */
+  display: flex;
+  /* 浣垮瓙鍏冪礌姘村钩绛夐棿闅斿垎甯� */
+  justify-content: space-between;
+  position: absolute;
+  top: 0px;
+  left: calc(50% - 350px);
+  float: left;
+  width: 700px;
+  margin: auto;
+  z-index: 1;
+}
+.navigation-contents {
+  /* 浣跨敤 flex 甯冨眬 */
+  display: flex;
+  /* 浣垮瓙鍏冪礌姘村钩绛夐棿闅斿垎甯� */
+  justify-content: center;
+  position: absolute;
+  top: 0px;
+  left: calc(50% - 350px);
+  float: left;
+  width: 700px;
+  margin: auto;
+  z-index: 1;
 }
 
 .navigation-item {
-    float: left;
+  float: left;
 
-    color: #CDF3FD;
-    cursor: pointer;
-    width: 149px;
-    height: 51px;
+  color: #cdf3fd;
+  cursor: pointer;
+  width: 149px;
+  height: 51px;
 
-    line-height: 46px;
-    text-align: center;
-    font-size: 18px;
-    font-weight: bold;
-    text-indent: 40px;
+  line-height: 46px;
+  text-align: center;
+  font-size: 18px;
+  font-weight: bold;
+  text-indent: 40px;
 }
 
 .bg1 {
-    background: url("@/assets/img/navigation/buttonbg1.png");
+  background: url("@/assets/img/navigation/buttonbg1.png");
 }
 
 .bg2 {
-    background: url("@/assets/img/navigation/buttonbg2.png");
+  background: url("@/assets/img/navigation/buttonbg2.png");
 }
 
 .bg3 {
-    background: url("@/assets/img/navigation/buttonbg3.png");
+  background: url("@/assets/img/navigation/buttonbg3.png");
 }
 
 .bg4 {
-    background: url("@/assets/img/navigation/buttonbg4.png");
+  background: url("@/assets/img/navigation/buttonbg4.png");
 }
-
 
 .bg1:hover {
-    background: url("@/assets/img/navigation/buttonbgac1.png");
+  background: url("@/assets/img/navigation/buttonbgac1.png");
 }
 .bg1-active {
-    background: url("@/assets/img/navigation/buttonbgac1.png");
+  background: url("@/assets/img/navigation/buttonbgac1.png");
 }
 .bg2:hover {
-    background: url("@/assets/img/navigation/buttonbgac2.png");
+  background: url("@/assets/img/navigation/buttonbgac2.png");
 }
 .bg2-active {
-    background: url("@/assets/img/navigation/buttonbgac2.png");
+  background: url("@/assets/img/navigation/buttonbgac2.png");
 }
 .bg3:hover {
-    background: url("@/assets/img/navigation/buttonbgac3.png");
+  background: url("@/assets/img/navigation/buttonbgac3.png");
 }
-.bg3-active{
-    background: url("@/assets/img/navigation/buttonbgac3.png");
+.bg3-active {
+  background: url("@/assets/img/navigation/buttonbgac3.png");
 }
 
 .bg4:hover {
-    background: url("@/assets/img/navigation/buttonbgac4.png");
+  background: url("@/assets/img/navigation/buttonbgac4.png");
 }
 .bg4-active {
-    background: url("@/assets/img/navigation/buttonbgac4.png");
+  background: url("@/assets/img/navigation/buttonbgac4.png");
 }
diff --git a/src/components/menu/Device.vue b/src/components/menu/Device.vue
index 11d5ac4..2c19385 100644
--- a/src/components/menu/Device.vue
+++ b/src/components/menu/Device.vue
@@ -285,8 +285,6 @@
     }
   }
 }
-
-// 鍏朵粬鍘熸湁鏂规硶淇濇寔涓嶅彉...
 </script>
 
 <style lang="less" scoped>
@@ -301,6 +299,7 @@
 
 .device-content {
   padding: 10px;
+  box-sizing: border-box;
   overflow-y: auto;
   height: calc(100% - 70px);
 }
diff --git a/src/components/menu/Location.vue b/src/components/menu/Location.vue
index 4de85e1..7536307 100644
--- a/src/components/menu/Location.vue
+++ b/src/components/menu/Location.vue
@@ -747,6 +747,7 @@
 }
 .district-content {
   padding: 10px;
+  box-sizing: border-box;
 }
 .district-item-icon {
   background: url("@/assets/img/menu/locationicon.png") no-repeat;
diff --git a/src/store/simulation.js b/src/store/simulation.js
index 44797b3..cbb2e60 100644
--- a/src/store/simulation.js
+++ b/src/store/simulation.js
@@ -87,8 +87,8 @@
 
     const startMNPG = () => {
         init()
-        showResultAssess.value = true
-        showDangerAssess.value = true
+        // showResultAssess.value = true
+        // showDangerAssess.value = true
     }
 
     // 瀵艰埅鐐瑰嚮
diff --git a/src/views/left/CitySim.vue b/src/views/left/CitySim.vue
index 411ea44..6b3daa1 100644
--- a/src/views/left/CitySim.vue
+++ b/src/views/left/CitySim.vue
@@ -1,6 +1,10 @@
 <template>
   <div style="width: 100%; height: 100%">
-    <div class="left-top" v-if="disForm == '琛屾斂鍖哄垝浠跨湡'" style="margin-top: 0px;">
+    <div
+      class="left-top"
+      v-if="disForm == '琛屾斂鍖哄垝浠跨湡'"
+      style="margin-top: 0px"
+    >
       琛屾斂鍖哄垝浠跨湡锛�30m绮惧害锛�
     </div>
     <div class="left-top" v-if="disForm == '閲嶇偣鍖哄煙浠跨湡'">
@@ -126,6 +130,7 @@
 import * as XLSX from "xlsx";
 import Papa from "papaparse";
 import { ElMessage } from "element-plus";
+import { initeWaterPrimitiveView } from "@/utils/water";
 
 // 娉ㄥ叆鐖剁粍浠舵彁渚涚殑鏂规硶
 const { startSimulate, endSimulate } = inject("simulateActions");
@@ -207,7 +212,7 @@
     闄嶉洦閲�: `${forms.rainfall} mm`,
     闄嶉洦鏃堕暱: `${forms.duration} h`,
     闄嶉洦寮哄害: `${forms.intensity} mm/h`,
-    涓婁紶鏂囦欢: forms.fileList.map(file => file.name),
+    涓婁紶鏂囦欢: forms.fileList.map((file) => file.name),
   });
   ElMessage.success("鏂规宸蹭繚瀛�");
   saveDialogVisible.value = false;
@@ -358,6 +363,7 @@
 
 // 寮�濮嬫ā鎷�
 function startPlay() {
+  initeWaterPrimitiveView();
   startSimulate();
 }
 </script>
diff --git a/src/views/left/Left.vue b/src/views/left/Left.vue
index f6dc18b..3d803e1 100644
--- a/src/views/left/Left.vue
+++ b/src/views/left/Left.vue
@@ -453,7 +453,6 @@
 });
 </script>
 <style lang="less" scoped>
-@import url("../../assets/css/left.css");
 .mock {
   padding-top: 10px;
   padding-right: 10px;
diff --git a/src/views/nav/Navigation.vue b/src/views/nav/Navigation.vue
index 422ee3e..fb83ec5 100644
--- a/src/views/nav/Navigation.vue
+++ b/src/views/nav/Navigation.vue
@@ -1,6 +1,23 @@
 <template>
   <div class="navigation">
-    <div class="navigation-content">
+    <div class="navigation-contents" v-show="!simBtn">
+      <div
+        class="navigation-item bg1"
+        :class="{ 'bg1-active': currentIndexs == 1 }"
+        @click="handleClickHome(1)"
+      >
+        缁煎悎灞曠ず
+      </div>
+      <div
+        class="navigation-item bg2"
+        :class="{ 'bg2-active': currentIndexs == 2 }"
+        @click="handleClickHome(2)"
+        style="margin-left: 15%"
+      >
+        妯℃嫙浠跨湡
+      </div>
+    </div>
+    <div class="navigation-content" v-show="simBtn">
       <div
         class="navigation-item bg1"
         :class="{ 'bg1-active': currentIndex == 1 }"
@@ -20,14 +37,14 @@
         :class="{ 'bg3-active': currentIndex == 3 }"
         @click="handleClick(3)"
       >
-        妯℃嫙浠跨湡
+        浠跨湡鎺ㄦ紨
       </div>
       <div
         class="navigation-item bg4"
         :class="{ 'bg4-active': currentIndex == 4 }"
         @click="handleClick(4)"
       >
-        妯℃嫙璇勪及
+        妯℃嫙璇勪环
       </div>
     </div>
     <div class="navigation-bg"></div>
@@ -38,6 +55,9 @@
 import { useRouter } from "vue-router";
 import { useSimStore } from "@/store/simulation";
 import { ref } from "vue";
+
+const simBtn = ref(false);
+const currentIndexs = ref(1);
 
 const router = useRouter();
 const simStore = useSimStore();
@@ -72,6 +92,13 @@
   const routes = ["", "/yhgl", "/zhjc", "/mnfz", "/mnpg"];
   router.push(routes[index]);
 };
+const handleClickHome = (index) => {
+  if (index === 1) {
+    router.push("/");
+  } else {
+    simBtn.value = true;
+  }
+};
 </script>
 
 <style lang="less" scoped>

--
Gitblit v1.9.3