From a0e9b51614f572aebf4706d7cff04618ebd08f2f Mon Sep 17 00:00:00 2001
From: wangjuncheng <1>
Date: 星期五, 06 六月 2025 09:43:39 +0800
Subject: [PATCH] 1

---
 src/views/GisView.vue        |   50 +++++++++++++++++++++-----------------------------
 src/components/tools/Dam.vue |   10 ++--------
 2 files changed, 23 insertions(+), 37 deletions(-)

diff --git a/src/components/tools/Dam.vue b/src/components/tools/Dam.vue
index bc9e82e..f115c6a 100644
--- a/src/components/tools/Dam.vue
+++ b/src/components/tools/Dam.vue
@@ -1,6 +1,8 @@
 <template>
   <div class="custom-panel">
     <div class="panel-content">
+      <el-button @click="handleSwitchChange" title="寮�鍚ā鍨嬪簱">
+      </el-button>
       <el-switch
         v-model="isDamEnabled"
         active-text="寮�鎸栧紑鍚�"
@@ -17,22 +19,14 @@
 import { ElSwitch } from 'element-plus';
 const isDamEnabled = ref(false);
 function handleDamOn() {
-  console.log('寮�鎸栧姛鑳藉凡寮�鍚�');
   earthCtrl.factory.createModelLibrary()
 
-}
-
-// 寮�鍏冲叧闂椂鎵ц鐨勫嚱鏁�
-function handleDamOff() {
-  console.log('寮�鎸栧姛鑳藉凡鍏抽棴');
 }
 
 // 鐩戝惉 switch 鍙樺寲
 function handleSwitchChange(value) {
   if (value) {
     handleDamOn();
-  } else {
-    handleDamOff();
   }
 }
 </script>
diff --git a/src/views/GisView.vue b/src/views/GisView.vue
index 66b72f9..5640040 100644
--- a/src/views/GisView.vue
+++ b/src/views/GisView.vue
@@ -1,12 +1,24 @@
 <template>
   <div id="gis-view" ref="mapRef"></div>
   <!-- 鍒囨崲搴曞浘褰卞儚 -->
-  <div @click="handleShow" class="diqiu" :class="{ 'shift-right': simStore.isShowEarth }">
+  <div
+    @click="handleShow"
+    class="diqiu"
+    :class="{ 'shift-right': simStore.isShowEarth }"
+  >
     <img src="@/assets/img/screen/dq.png" alt="" />
   </div>
-  <div v-show="picShow" class="earthBox" :class="{ 'shift-right': simStore.isShowEarth }">
-    <div v-for="(item, index) in views" :key="index" :class="['item-container', { active: currentIndex === index }]"
-      @click="switchView(index)">
+  <div
+    v-show="picShow"
+    class="earthBox"
+    :class="{ 'shift-right': simStore.isShowEarth }"
+  >
+    <div
+      v-for="(item, index) in views"
+      :key="index"
+      :class="['item-container', { active: currentIndex === index }]"
+      @click="switchView(index)"
+    >
       <div class="icon-wrapper">
         <img :src="getImageUrl(item.icon)" :alt="item.label" />
         <span class="label">{{ item.label }}</span>
@@ -32,21 +44,6 @@
 import { EventBus } from "@/eventBus"; // 寮曞叆浜嬩欢鎬荤嚎
 import { useSimStore } from "@/store/simulation";
 const simStore = useSimStore();
-// 1. 璁剧疆鍒濆鏃堕棿
-const date = new Date(2025, 3, 11, 12, 0, 0, 0);
-// const date = new Date(2024, 6, 13, 5, 5, 50);
-const julianDate = SmartEarth.Cesium.JulianDate.fromDate(date);
-// earthCtrl.viewer.clock.currentTime = julianDate;
-
-// // 2. 閰嶇疆鏃堕挓閫夐」锛岀姝㈣嚜鍔ㄦ帹杩涙椂闂�
-earthCtrl.viewer.clockViewModel.shouldAnimate = false; // 绂佺敤鍔ㄧ敾
-earthCtrl.viewer.clockViewModel.clockRange =
-  SmartEarth.Cesium.ClockRange.CLAMPED; // 闄愬埗鏃堕棿鑼冨洿
-earthCtrl.viewer.clockViewModel.multiplier = 0; // 璁剧疆鏃堕棿鎺ㄨ繘閫熷害涓�0
-// 寮�鍚ぇ姘旀暎灏勬晥鏋�
-// earthCtrl.atmosphere.enable();
-// 3. 璁剧疆褰撳墠鏃堕棿骞堕攣瀹�
-earthCtrl.viewer.clock.currentTime = julianDate;
 
 const views = [
   { label: "鍦板浘", value: "map", icon: "鍦板浘.png" },
@@ -127,7 +124,7 @@
     SmartEarth.Cesium.ClockRange.CLAMPED; // 闄愬埗鏃堕棿鑼冨洿
   earthCtrl.viewer.clockViewModel.multiplier = 0; // 璁剧疆鏃堕棿鎺ㄨ繘閫熷害涓�0
   // 寮�鍚ぇ姘旀暎灏勬晥鏋�
-  // earthCtrl.atmosphere.enable();
+  earthCtrl.atmosphere.enable();
   // 3. 璁剧疆褰撳墠鏃堕棿骞堕攣瀹�
   earthCtrl.viewer.clock.currentTime = julianDate;
 
@@ -598,17 +595,14 @@
   margin: 0;
   padding: 0;
   box-sizing: border-box;
-  border: 1px solid transparent;
-  /* 榛樿閫忔槑杈规鍗犱綅 */
+  border: 1px solid transparent; /* 榛樿閫忔槑杈规鍗犱綅 */
 
   img {
     height: 100%;
-    width: auto;
-    /* 纭繚鍥剧墖鎸夋瘮渚嬬缉鏀� */
+    width: auto; /* 纭繚鍥剧墖鎸夋瘮渚嬬缉鏀� */
     margin: 0;
     padding: 0;
-    display: block;
-    /* 绉婚櫎鍥剧墖涓嬫柟鍙兘瀛樺湪鐨勭┖鐧介棿闅� */
+    display: block; /* 绉婚櫎鍥剧墖涓嬫柟鍙兘瀛樺湪鐨勭┖鐧介棿闅� */
   }
 
   .label {
@@ -629,8 +623,7 @@
 }
 
 .item-container.active .icon-wrapper {
-  border: 1px solid #218967;
-  /* 钃濊壊杈规 */
+  border: 1px solid #218967; /* 钃濊壊杈规 */
 }
 
 .item-container.active .label {
@@ -640,7 +633,6 @@
 .diqiu.shift-right {
   right: 10%;
 }
-
 .earthBox.shift-right {
   right: 13%;
 }

--
Gitblit v1.9.3