sunzehao 6 dagar sedan
förälder
incheckning
add7a94f90

+ 6 - 5
src/views/cesium.vue

@@ -431,7 +431,7 @@ export default {
             Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK
         );
         // 设置相机离地表的最小距离(单位:米)
-        viewer.scene.screenSpaceCameraController.minimumZoomDistance = 10000;
+        // viewer.scene.screenSpaceCameraController.minimumZoomDistance = 10000;
 
         const handler = new Cesium.ScreenSpaceEventHandler(viewer.scene.canvas);
         handler.setInputAction(function(movement) {
@@ -453,7 +453,7 @@ export default {
       this.viewer = viewer;
 
       // this.setMapImageryProvider();
-      //   this.initCesiumTerrain();
+        // this.initCesiumTerrain();
       this.initCesiumBaseMapImage();
       //   this.switchWindLayer();
       this.showAllStation(viewer, allStationJson.station);
@@ -464,7 +464,8 @@ export default {
     async initCesiumTerrain() {
       const terrainProvider = await Cesium.CesiumTerrainProvider.fromUrl(
         // "http://localhost:3007/tiles/dixing",
-        "/static/dixing",
+        // "/static/dixing",
+        "/static/dixing/wlcb",
         {
           requestWaterMask: true, // 如果需要水效果,设置为true
           requestVertexNormals: true, // 如果需要光照效果,设置为true
@@ -504,9 +505,9 @@ export default {
     // 初始化底图
     async initCesiumBaseMapImage() {
       const imageryProvider = await new Cesium.UrlTemplateImageryProvider({
-        url: "https://webst02.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}",
+        // url: "https://webst02.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}",
         // url: "http://localhost:3007/tiles/map/{z}/{x}/{y}",
-        // url: "/static/ditu/{z}/{x}/{y}.png",
+        url: "/static/ditu/{z}/{x}/{y}.png",
         credit: "影像地图",
         // minimumLevel: 10,
         maximumLevel: 18,

+ 9 - 10
src/views/cesiumComponents/windMap2D.vue

@@ -72,6 +72,7 @@
       :currentHeight="currentHeight"
       @showDetail="menuComTSty"
       @backStations="backStations"
+      @initView="resetWindViewport"
     />
   </div>
 </template>
@@ -221,8 +222,8 @@ export default {
         // minimumLevel: 11,
         maximumLevel: 18,
         // url: this.urlTiles,
-        // url: "/static/ditu/{z}/{x}/{y}.png",
-        url: "https://webst02.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}",
+        url: "/static/ditu/{z}/{x}/{y}.png",
+        // url: "https://webst02.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}",
         credit: "影像地图",
       });
       imageryProvider.alpha = 0.55; // 透明度
@@ -521,14 +522,12 @@ export default {
           // 模型贴地
           //   heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
         },
-        // label: {
-        //     // text: val.name ? val.name : val.plantname,
-        //     text: `${val.name}\n风速: 10m/s\n状态: 测试`,
-        //     font: '14px sans-serif',
-        //     fillColor: Cesium.Color.fromBytes(255, 255, 255),
-        //     heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
-        //     pixelOffset: val.name === 'F10号风机' ? new Cesium.Cartesian2(50, -20) : new Cesium.Cartesian2(0, 20)
-        // }
+        label: {
+            // text: val.name ? val.name : val.plantname,
+            text: val.name,
+            font: '14px sans-serif',
+            fillColor: Cesium.Color.fromBytes(255, 255, 255),
+        }
       });
       // 创建事件处理器
       const handler = new Cesium.ScreenSpaceEventHandler(viewer.scene.canvas);

+ 10 - 10
src/views/cesiumComponents/windMap3D.vue

@@ -129,8 +129,8 @@ export default {
     return {
       restLatLon: [
         {
-          longitude: 107.034945,
-          latitude: 37.309099,
+          longitude: 114.48789,
+          latitude: 35.32916,
           name: "MYFDC",
         },
         {
@@ -249,9 +249,10 @@ export default {
     // 初始化底图
     async initCesiumBaseMapImage() {
       const imageryProvider = await new Cesium.UrlTemplateImageryProvider({
-        url: "https://webst02.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}",
+        // url: "https://webst02.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}",
+        // url: "https://webrd01.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}",
         // url: "http://localhost:3007/tiles/map/{z}/{x}/{y}",
-        // url: "/static/ditu/{z}/{x}/{y}.png",
+        url: "/static/ditu/{z}/{x}/{y}.png",
         // minimumLevel: 11,
         maximumLevel: 24,
         credit: "影像地图",
@@ -348,8 +349,7 @@ export default {
         let stationName = this.$route.query.nameEn;
       const terrainProvider = await Cesium.CesiumTerrainProvider.fromUrl(
         // "http://localhost:3007/tiles/dixing",
-        // stationName === "MYFDC" ? "/static/hnay" : "/static/wlcb",
-        "/static/hnay",
+        stationName === "MYFDC" ? "/static/dixing/hnay" : "/static/dixing/wlcb",
         {
           requestWaterMask: true, // 如果需要水效果,设置为true
           requestVertexNormals: true, // 如果需要光照效果,设置为true
@@ -1065,10 +1065,10 @@ export default {
           roll: 0,
         },
         duration: 3.0,
-        complete: function () {
-          console.log("飞入完成,启用拖拽限制逻辑");
-          enableHeightBasedDragControl();
-        },
+        // complete: function () {
+        //   console.log("飞入完成,启用拖拽限制逻辑");
+        //   enableHeightBasedDragControl();
+        // },
       });
       // ===== 控制逻辑:根据高度决定是否允许拖拽 =====
       function enableHeightBasedDragControl() {

+ 32 - 32
src/views/fjLonLatJson/fj_MY1.json

@@ -1405,8 +1405,8 @@
     "data": [
         {
             "nemCode": "F01",
-            "longitude": 107.064407,
-            "latitude": 37.300002,
+            "longitude": 114.49562,
+            "latitude": 35.35543,
             "name": "F01号风机",
             "aname": "F01",
             "status": 1,
@@ -1414,8 +1414,8 @@
         },
         {
             "nemCode": "F02",
-            "longitude": 107.060974,
-            "latitude": 37.290272,
+            "longitude": 114.48977,
+            "latitude": 35.35685,
             "name": "F02号风机",
             "aname": "F02",
             "status": 2,
@@ -1423,8 +1423,8 @@
         },
         {
             "nemCode": "F03",
-            "longitude": 107.054536,
-            "latitude": 37.304318,
+            "longitude": 114.48421,
+            "latitude": 35.34992,
             "name": "F03号风机",
             "aname": "F03",
             "status": 7,
@@ -1432,8 +1432,8 @@
         },
         {
             "nemCode": "F04",
-            "longitude": 107.248872,
-            "latitude": 37.303857,
+            "longitude": 114.56900,
+            "latitude": 35.31883,
             "name": "F04号风机",
             "aname": "F04",
             "status": 3,
@@ -1441,8 +1441,8 @@
         },
         {
             "nemCode": "F05",
-            "longitude": 106.94561,
-            "latitude": 37.287527,
+            "longitude": 114.47299,
+            "latitude": 35.33221,
             "name": "F05号风机",
             "aname": "F05",
             "status": 7,
@@ -1450,8 +1450,8 @@
         },
         {
             "nemCode": "F06",
-            "longitude": 107.040932,
-            "latitude": 37.200258,
+            "longitude": 114.47547,
+            "latitude": 35.32451,
             "name": "F06号风机",
             "aname": "F06",
             "status": 3,
@@ -1459,8 +1459,8 @@
         },
         {
             "nemCode": "F07",
-            "longitude": 107.137435,
-            "latitude": 37.313826,
+            "longitude": 114.48236,
+            "latitude": 35.32497,
             "name": "F07号风机",
             "aname": "F07",
             "status": 4,
@@ -1468,8 +1468,8 @@
         },
         {
             "nemCode": "F08",
-            "longitude": 107.032521,
-            "latitude": 37.3063,
+            "longitude": 114.48789,
+            "latitude": 35.32916,
             "name": "F08号风机",
             "aname": "F08",
             "status": 5,
@@ -1477,8 +1477,8 @@
         },
         {
             "nemCode": "F09",
-            "longitude": 107.054945,
-            "latitude": 37.359099,
+            "longitude": 114.44517,
+            "latitude": 35.32300,
             "name": "F09号风机",
             "aname": "F09",
             "status": 4,
@@ -1486,8 +1486,8 @@
         },
         {
             "nemCode": "F10",
-            "longitude": 107.078616,
-            "latitude": 37.30956,
+            "longitude": 114.44781,
+            "latitude": 35.32297,
             "name": "F10号风机",
             "aname": "F10",
             "status": 5,
@@ -1495,8 +1495,8 @@
         },
         {
             "nemCode": "F11",
-            "longitude": 107.023852,
-            "latitude": 37.211062,
+            "longitude": 114.44781,
+            "latitude": 35.30587,
             "name": "F11号风机",
             "aname": "F11",
             "status": 7,
@@ -1504,8 +1504,8 @@
         },
         {
             "nemCode": "F12",
-            "longitude": 107.0049,
-            "latitude": 37.27543,
+            "longitude": 114.47172,
+            "latitude": 35.29389,
             "name": "F12号风机",
             "aname": "F12",
             "status": 6,
@@ -1513,8 +1513,8 @@
         },
         {
             "nemCode": "F13",
-            "longitude": 107.052777,
-            "latitude": 37.30543,
+            "longitude": 114.59705,
+            "latitude": 35.28476,
             "name": "F13号风机",
             "aname": "F13",
             "status": 5,
@@ -1522,8 +1522,8 @@
         },
         {
             "nemCode": "F14",
-            "longitude": 107.048614,
-            "latitude": 37.30432,
+            "longitude": 114.59237,
+            "latitude": 35.28616,
             "name": "F14号风机",
             "aname": "F14",
             "status": 6,
@@ -1531,8 +1531,8 @@
         },
         {
             "nemCode": "F15",
-            "longitude": 107.045696,
-            "latitude": 37.308195,
+            "longitude": 114.55623,
+            "latitude": 35.28261,
             "name": "F15号风机",
             "aname": "F15",
             "status": 7,
@@ -1540,8 +1540,8 @@
         },
         {
             "nemCode": "F16",
-            "longitude": 107.041447,
-            "latitude": 37.311301,
+            "longitude": 114.58545,
+            "latitude": 35.30268,
             "name": "F16号风机",
             "aname": "F16",
             "status": 7,