From 5c3fd1617e1413683b1586451d746aa1686b09ba Mon Sep 17 00:00:00 2001
From: wangjuncheng <1>
Date: 星期五, 06 六月 2025 09:36:56 +0800
Subject: [PATCH] 1

---
 src/views/GisView.vue |   48 ++++++++++++++++++++++++++++--------------------
 1 files changed, 28 insertions(+), 20 deletions(-)

diff --git a/src/views/GisView.vue b/src/views/GisView.vue
index 2c9fab3..66b72f9 100644
--- a/src/views/GisView.vue
+++ b/src/views/GisView.vue
@@ -1,24 +1,12 @@
 <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>
@@ -44,6 +32,21 @@
 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" },
@@ -595,14 +598,17 @@
   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 {
@@ -623,7 +629,8 @@
 }
 
 .item-container.active .icon-wrapper {
-  border: 1px solid #218967; /* 钃濊壊杈规 */
+  border: 1px solid #218967;
+  /* 钃濊壊杈规 */
 }
 
 .item-container.active .label {
@@ -633,6 +640,7 @@
 .diqiu.shift-right {
   right: 10%;
 }
+
 .earthBox.shift-right {
   right: 13%;
 }

--
Gitblit v1.9.3