Koishi 1 tydzień temu
rodzic
commit
3e2c06d9b8

+ 3 - 2
src/kLayer/index.js

@@ -527,7 +527,7 @@ import {
   ComputeCommand,
   Matrix4,
   BufferUsage,
-  defaultValue,
+  // defaultValue,
   destroyObject
 } from "cesium";
 var CustomPrimitive = class {
@@ -558,7 +558,8 @@ var CustomPrimitive = class {
     this.rawRenderState = options.rawRenderState;
     this.framebuffer = options.framebuffer;
     this.outputTexture = options.outputTexture;
-    this.autoClear = defaultValue(options.autoClear, false);
+    // this.autoClear = defaultValue(options.autoClear, false);
+    this.autoClear = false;
     this.preExecute = options.preExecute;
     this.show = true;
     this.commandToExecute = void 0;

+ 11 - 10
src/views/cesium.vue

@@ -82,13 +82,13 @@
           <div class="spjk" v-if="showVideoMsg">
             <!-- src="https://www.bilibili.com/video/BV1421DYCELw?t=12.1" -->
             <iframe
-              src="/public/static/windVideo.mp4"
+              src="/static/windVideo.mp4"
               frameborder="0"
               style="width: 100%; height: 100%"
             ></iframe>
             <!-- src="https://www.bilibili.com/video/BV1421DYCELw?t=12.1" -->
             <video ref="videoPlayer" controls width="95%">
-              <source src="/public/static/windVideo.mp4" type="video/mp4" />
+              <source src="/static/windVideo.mp4" type="video/mp4" />
             </video>
           </div>
           <div class="gzck" v-if="showProblemMsg">
@@ -430,11 +430,11 @@ export default {
       this.viewer = viewer;
 
       // this.setMapImageryProvider();
-    //   this.initCesiumTerrain(); 
+      //   this.initCesiumTerrain();
       this.initCesiumBaseMapImage();
       //   this.switchWindLayer();
       this.showAllStation(viewer, allStationJson.station);
-    //   this.initGeoJsonData();
+      //   this.initGeoJsonData();
     },
 
     // 初始化地形
@@ -485,6 +485,8 @@ export default {
         // url: "http://localhost:3007/tiles/map/{z}/{x}/{y}",
         url: "/static/ditu/{z}/{x}/{y}.png",
         credit: "影像地图",
+        // minimumLevel: 10,
+        maximumLevel: 18,
       });
       imageryProvider.alpha = 0.55; // 透明度
       imageryProvider.brightness = 1; // 亮度
@@ -1303,7 +1305,7 @@ export default {
     showCloudLayer() {
       const imageUrls = [];
       cloudJson.forEach((it) => {
-        imageUrls.push("/public/static" + it.path);
+        imageUrls.push("/static" + it.path);
       });
       this.showeveryTypeImagesLayer(
         imageUrls,
@@ -1316,7 +1318,7 @@ export default {
     showRainLayer() {
       const imageUrls = [];
       rainJson.forEach((it) => {
-        imageUrls.push("/public/static" + it.path);
+        imageUrls.push("/static" + it.path);
       });
       this.showeveryTypeImagesLayer(
         imageUrls,
@@ -1330,7 +1332,7 @@ export default {
     showTemperatureLayer() {
       const imageUrls = [];
       tempJson.forEach((it) => {
-        imageUrls.push("/public/static" + it.path);
+        imageUrls.push("/static" + it.path);
       });
       this.showeveryTypeImagesLayer(
         imageUrls,
@@ -1660,7 +1662,6 @@ export default {
     },
     // 根据状态展示不同颜色风机贴图
     async showStationFn(viewer, e, index, images) {
-
       const position = Cesium.Cartesian3.fromDegrees(e.longitude, e.latitude);
       const entity = viewer.entities.add({
         id: index,
@@ -2036,11 +2037,11 @@ export default {
 
         this.$router.push({
           path: type === "windbasic2d" ? "/windMap2D" : "/windMap3D",
-            query: {
+          query: {
             longitude: longitude,
             latitude: latitude,
             height: Math.ceil(height),
-            nameEn: val.stationNameEn
+            nameEn: val.stationNameEn,
           },
         });
       } else {

Plik diff jest za duży
+ 454 - 426
src/views/cesiumComponents/windMap2D.vue


+ 32 - 30
src/views/cesiumComponents/windMap3D.vue

@@ -41,22 +41,22 @@
           </div>
           <div class="spjk" v-if="showVideoMsg">
             <!-- <iframe
-              src="/public/static/windVideo.mp4"
+              src="/static/windVideo.mp4"
               frameborder="0"
               style="width: 100%; height: 100%"
             ></iframe> -->
             <video ref="videoPlayer" controls width="95%" muted autoplay>
-              <source src="/public/static/windVideo.mp4" type="video/mp4" />
+              <source src="/static/windVideo.mp4" type="video/mp4" />
             </video>
           </div>
           <div class="gzck" v-if="showProblemMsg">
             <windPro />
           </div>
           <div class="third" v-if="showModelMsg">
-            <!-- <ModelUnpack
+            <ModelUnpack
               :modelUnpackType="modelUnpackType"
               :showModelMsg="showModelMsg"
-            /> -->
+            />
           </div>
         </div>
       </template>
@@ -106,7 +106,7 @@ import gf from "@/assets/windimgs/fanSvg/gf.png";
 
 import windHome from "@/components/windHome/index.vue";
 import windPro from "@/components/windProDetail/windProblem.vue";
-// import ModelUnpack from "@/components/modelUnpack.vue";
+import ModelUnpack from "@/components/modelUnpack.vue";
 
 import { WindLayer } from "cesium-wind";
 import windGridData from "./windGridData.json";
@@ -122,7 +122,7 @@ export default {
     menuCom,
     windHome,
     windPro,
-    // ModelUnpack,
+    ModelUnpack,
   },
   data() {
     return {
@@ -176,7 +176,7 @@ export default {
       showWindDetail: true,
       allStationentitys: [],
       allWindEntitys: [],
-      urlTiles: "/public/static/tiles/{z}/{x}/{y}.jpg",
+      urlTiles: "/static/tiles/{z}/{x}/{y}.jpg",
       verticalExaggeration: 1.0,
       dixingAdd: false,
       infoBoxes: [],
@@ -251,6 +251,8 @@ export default {
         // 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",
+        // minimumLevel: 11,
+        maximumLevel: 18,
         credit: "影像地图",
       });
       imageryProvider.alpha = 0.55; // 透明度
@@ -560,8 +562,8 @@ export default {
         orientation, // 模型朝向
         animation: false,
         model: {
-          uri: `/public/static/model/dixing/${mountainMsg.modelNameEn}.glb`,
-          // uri: "/public/static/model/dixing/terrain.glb",
+          uri: `/static/model/dixing/${mountainMsg.modelNameEn}.glb`,
+          // uri: "/static/model/dixing/terrain.glb",
           scale: mountainMsg.scale,
           // 模型贴地
           heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
@@ -589,12 +591,12 @@ export default {
         animation: false,
         model: {
           //   uri: this.dixingAdd
-          //     ? // ? "/public/static/model/fjSolo/model.glb"
-          //       // ? "/public/static/model/fjStatus/fj_anmation_bw.glb"
-          //       `/public/static/model/fjStatus/fj_${statueFJ}.glb`
-          //     : "/public/static/model/dixing/model.glb",
-          //   // : "/public/static/model/dixing/terrain.glb",
-          uri: `/public/static/model/fjStatus/fj_${statueFJ}.glb`,
+          //     ? // ? "/static/model/fjSolo/model.glb"
+          //       // ? "/static/model/fjStatus/fj_anmation_bw.glb"
+          //       `/static/model/fjStatus/fj_${statueFJ}.glb`
+          //     : "/static/model/dixing/model.glb",
+          //   // : "/static/model/dixing/terrain.glb",
+          uri: `/static/model/fjStatus/fj_${statueFJ}.glb`,
           scale: 0.5,
           // 模型贴地
           //   heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
@@ -653,18 +655,18 @@ export default {
         borderGradient: ["#00e5ff", "#2979ff"],
       });
 
-        const entityxy = viewer.entities.add({
-          name,
-          position,
-          billboard: {
-            image: billboardImage,
-            scale: 1,
-            verticalOrigin: Cesium.VerticalOrigin.BOTTOM, // 原来已经是CENTER,现在改为BOTTOM
-            pixelOffset: new Cesium.Cartesian2(80, -50), // 原来是-20,现在改为30,向上移动
-            eyeOffset: new Cesium.Cartesian3(0, 0, 0), // 保持固定大小
-            heightReference: Cesium.HeightReference.NONE,
-          },
-        });
+      const entityxy = viewer.entities.add({
+        name,
+        position,
+        billboard: {
+          image: billboardImage,
+          scale: 1,
+          verticalOrigin: Cesium.VerticalOrigin.BOTTOM, // 原来已经是CENTER,现在改为BOTTOM
+          pixelOffset: new Cesium.Cartesian2(80, -50), // 原来是-20,现在改为30,向上移动
+          eyeOffset: new Cesium.Cartesian3(0, 0, 0), // 保持固定大小
+          heightReference: Cesium.HeightReference.NONE,
+        },
+      });
 
       this.dixingAdd = true;
 
@@ -1300,7 +1302,7 @@ export default {
     showCloudLayer() {
       const imageUrls = [];
       cloudJson.forEach((it) => {
-        imageUrls.push("/public/static" + it.path);
+        imageUrls.push("/static" + it.path);
       });
       this.showeveryTypeImagesLayer(
         imageUrls,
@@ -1312,7 +1314,7 @@ export default {
     showRainLayer() {
       const imageUrls = [];
       rainJson.forEach((it) => {
-        imageUrls.push("/public/static" + it.path);
+        imageUrls.push("/static" + it.path);
       });
       this.showeveryTypeImagesLayer(
         imageUrls,
@@ -1325,7 +1327,7 @@ export default {
     showTemperatureLayer() {
       const imageUrls = [];
       tempJson.forEach((it) => {
-        imageUrls.push("/public/static" + it.path);
+        imageUrls.push("/static" + it.path);
       });
       this.showeveryTypeImagesLayer(
         imageUrls,

+ 1 - 2
src/views/cesiumComponents/windView.vue

@@ -163,7 +163,7 @@
           </div>
         </div>
       </div>
-      <div class="stat-block2">
+      <div class="stat-block2" v-if="viewer?.clock?.currentTime?.secondsOfDay">
         <span
           class="labels"
           style="display: flex; justify-content: center; align-items: center"
@@ -179,7 +179,6 @@
             align-items: center;
             width: 405px;
           "
-          v-if="viewer?.clock"
         >
           <el-slider
             style="width: 97.5%; margin-left: 2.5%"

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików