From cafc98632e2df166a25976d9c1cd77a94efaa3a9 Mon Sep 17 00:00:00 2001
From: jihongshun <1151753686@qq.com>
Date: 星期三, 17 九月 2025 11:07:10 +0800
Subject: [PATCH] 项目创建默认参数 变倍

---
 src/views/system/flightRouteSimulation/index.vue |   79 +++++++++++++++++++++++++++++++++++++--
 1 files changed, 74 insertions(+), 5 deletions(-)

diff --git a/src/views/system/flightRouteSimulation/index.vue b/src/views/system/flightRouteSimulation/index.vue
index 95e970f..4f49562 100644
--- a/src/views/system/flightRouteSimulation/index.vue
+++ b/src/views/system/flightRouteSimulation/index.vue
@@ -5,10 +5,19 @@
     file:mr-4 file:py-2 file:px-4
     file:rounded-md file:border-0
     file:text-sm file:font-semibold
-    file:bg-blue-50 file:text-blue-700
+    file:bg-blue-50 file:text-blue-700  
     hover:file:bg-blue-100">
     <CesiumMap style="height: 790px;" :showAnimation = true :showCesiumCompass = true :cesiumId="'cesiumContainer'"></CesiumMap>
     <CesiumMap style="height: 324px;width: 576px;" :showAnimation = false :showCesiumCompass = false :showCrosshair = true :cesiumId="'cesiumContainerYY'" class="eagleye"></CesiumMap>
+    <!-- 浣跨敤 ElementUI 鐨� Slider 鏇夸唬鍙樺�嶈酱 -->
+    <div class="zoom-ui-container">
+       <!-- 涓棿榛勮壊鍑嗘槦妗� -->
+    <div
+      class="reticle"
+      :style="{ width: boxWidth + 'px', height: boxHeight + 'px' }"
+    ></div>
+      <!-- 宸︿笅瑙掑�嶇巼淇℃伅 -->
+    </div>
    </div>
 </template>
 
@@ -103,7 +112,7 @@
       roll: 0,           // 鐩告満鐨� roll (婊氳浆)
       aspectRatio: 1.0,  // 绾垫í姣�
       color: '#FF0000',  // 瑙嗛敟浣撻鑹�
-      id: 'frustumOutline',
+      id: 'frustumOutline',//瑙嗛敟浣揑D
       positionProperty : new Cesium.SampledPositionProperty(),
       orientation : new Cesium.SampledProperty(Cesium.Quaternion),//鏃犱汉鏈烘湞鍚�
       // sztOrientation : new Cesium.SampledProperty(Cesium.Quaternion),//浜戝彴鏈濆悜
@@ -111,11 +120,23 @@
       holderPitchProperty : new Cesium.SampledProperty(Number),//浜戝彴鏈濆悜pitch
       holderRollProperty : new Cesium.SampledProperty(Number),//浜戝彴鏈濆悜roll
       holderZoomProperty : new Cesium.SampledProperty(Number),//鍙樺��
-      currentZoom:1,
-      filename :''
+      currentZoom:1,//瑙嗛敟浣撳彉鍊�
+      filename :'',//鏂囦欢鍚嶅瓧 鐒跺悗璇诲彇鏃堕棿杞存棩鏈�
+      zoomRatio: 1,//榛樿鍙樺�嶆暟
+      minZoom: 1,//鏈�灏忓彉鍊�
+      maxZoom: 56,//鏈�澶у彉鍊�
+      baseBoxSize: 576,//榛樿box瀹藉害 
     }
   },
   mounted() {
+  },
+  computed: {
+    boxWidth() {
+      return this.baseBoxSize / this.zoomRatio;
+    },
+    boxHeight() {
+      return (this.baseBoxSize *(9/16)) / this.zoomRatio; // 楂樺害淇濇寔 4:3 姣斾緥
+    }
   },
   methods: {
     async handleKMZUpload(event) {
@@ -196,6 +217,15 @@
       setTimeout(()=>{
         this.showGZ()
       },1000)
+      this.flyPoint()
+    },
+    flyPoint(){
+      let lon = this.waypoints[0].lng
+      let lat = this.waypoints[0].lat
+      let height  = 5000
+      window['cesiumContainer'].viewer.camera.flyTo({
+        destination : Cesium.Cartesian3.fromDegrees(lon, lat, height)
+    });
     },
     // 璇诲彇鏂囦欢涓篈rrayBuffer
     readFileAsArrayBuffer(file) {
@@ -563,6 +593,7 @@
         const  holderZoom = this.holderZoomProperty.getValue(currentTime)
         if(holderZoom) {
           this.currentZoom = holderZoom ==1? 1 :(holderZoom  /23.76237623)
+          this.zoomRatio = holderZoom ==1? 1 :(holderZoom  /23.76237623)
         }
         
         this.updateFrustum();
@@ -615,6 +646,44 @@
 .eagleye{
   position: absolute;
   right: 30px;
-  bottom: 50px;
+  bottom: 55px;
+  border: 1px solid white;
 }
 </style>
+<style scoped>
+.zoom-ui-container {
+  width: 576px;
+  height: 324px;
+  position: absolute;
+  right: 30px;
+  bottom: 55px;
+  /* background-color: red; */
+  z-index: 9;
+
+}
+/* 榛勮壊鍑嗘槦妗� */
+.reticle {
+  position: absolute;
+  left: 50%;
+  top: 50%;
+  border: 2px dashed orange;
+  transform: translate(-50%, -50%);
+  pointer-events: none;
+}
+
+/* ElementUI 婊戝潡鏍峰紡鍖哄煙 */
+.zoom-bar-slider {
+  position: absolute;
+  right: 20px;
+  top: 50px;
+  height: 200px;
+}
+
+/* 宸︿笅瑙掑�嶇巼鏍囩 */
+.zoom-info {
+  position: absolute;
+  bottom: 35px;
+  left: 340px;
+}
+
+</style>

--
Gitblit v1.9.3