Koishi 2 днів тому
батько
коміт
8c9dbef956
1 змінених файлів з 105 додано та 106 видалено
  1. 105 106
      src/views/cesiumComponents/windMap3D.vue

+ 105 - 106
src/views/cesiumComponents/windMap3D.vue

@@ -27,7 +27,7 @@
       :before-close="handleClose"
     >
       <template #header>
-        <h3 style="font-weight: bold;color: #fff">{{ windDrawerHeader }}</h3>
+        <h3 style="font-weight: bold; color: #fff">{{ windDrawerHeader }}</h3>
       </template>
       <template #default>
         <div class="windDrawerCla">
@@ -71,14 +71,14 @@
       @initView="resetWindViewport"
     /> -->
     <windView2
-        v-if="showWindDetail"
-        :cesiumViewer="viewer"
-        @coverOnChange="coverOnChange"
-        :currentHeight="currentHeight"
-        :fjLonLatJsonArr="fjLonLatJsonArr.data"
-        @showDetail="menuComTSty"
-        @resetChangeWind="resetChangeWind"
-      />
+      v-if="showWindDetail"
+      :cesiumViewer="viewer"
+      @coverOnChange="coverOnChange"
+      :currentHeight="currentHeight"
+      :fjLonLatJsonArr="fjLonLatJsonArr.data"
+      @showDetail="menuComTSty"
+      @resetChangeWind="resetChangeWind"
+    />
   </div>
 </template>
 
@@ -114,7 +114,7 @@ import gf from "@/assets/windimgs/fanSvg/gf.png";
 import benchmark from "@/assets/cesiumImg/benchmark.png";
 
 import windHome from "@/components/windHome/index.vue";
-import windVideo from "@/components/windVideo/index.vue"
+import windVideo from "@/components/windVideo/index.vue";
 import windPro from "@/components/windProDetail/windProblem.vue";
 import ModelUnpack from "@/components/modelUnpack.vue";
 
@@ -138,7 +138,7 @@ export default {
     windVideo,
     windPro,
     ModelUnpack,
-    windView2
+    windView2,
   },
 
   data() {
@@ -529,93 +529,93 @@ export default {
       let fjLonLatJson = [];
       this.fjLonLatJsonArr = [];
 
-    //   webSocketService.connect({
-    //     url: `ws/${this.getWsUrl(stationName)}`,
-    //     autoReconnect: true,
-    //     maxReconnectAttempts: 5,
-    //     reconnectInterval: 3000,
-    //     onOpen: (event) => {
-    //       console.log("✅ WebSocket 连接成功", event);
-    //     },
-    //     onError: (error) => {
-    //       console.log("❌ WebSocket 错误:", error);
-    //       return;
-          if (stationName === "MYFDC") {
-            fjLonLatJson = JSON.parse(JSON.stringify(fjMYLonLatJson));
-          } else if (stationName === "JNWHZ") {
-            fjLonLatJson = JSON.parse(JSON.stringify(fjWHZLonLatJson));
-          } else if (stationName === "JNYPL") {
-            fjLonLatJson = JSON.parse(JSON.stringify(fjYPLLonLatJson));
-          } else if (stationName === "JNSMS") {
-            fjLonLatJson = JSON.parse(JSON.stringify(fjSMSLonLatJson));
-          }
+      //   webSocketService.connect({
+      //     url: `ws/${this.getWsUrl(stationName)}`,
+      //     autoReconnect: true,
+      //     maxReconnectAttempts: 5,
+      //     reconnectInterval: 3000,
+      //     onOpen: (event) => {
+      //       console.log("✅ WebSocket 连接成功", event);
+      //     },
+      //     onError: (error) => {
+      //       console.log("❌ WebSocket 错误:", error);
+      //       return;
+      if (stationName === "MYFDC") {
+        fjLonLatJson = JSON.parse(JSON.stringify(fjMYLonLatJson));
+      } else if (stationName === "JNWHZ") {
+        fjLonLatJson = JSON.parse(JSON.stringify(fjWHZLonLatJson));
+      } else if (stationName === "JNYPL") {
+        fjLonLatJson = JSON.parse(JSON.stringify(fjYPLLonLatJson));
+      } else if (stationName === "JNSMS") {
+        fjLonLatJson = JSON.parse(JSON.stringify(fjSMSLonLatJson));
+      }
 
-          let wtArray = JSON.parse(JSON.stringify(wsRes.windMachineList));
-          this.isFakeData = true;
+      let wtArray = JSON.parse(JSON.stringify(wsRes.windMachineList));
+      this.isFakeData = true;
 
-          fjLonLatJson.data.forEach((e) => {
-            let fjItem =
-              wtArray.find((findEle) => {
-                return findEle.fjbh === e.fjbh;
-              }) || {};
-            const fjMix = Object.assign({}, e, fjItem);
-            fjMix.status = this.getStatus(fjMix.fjzt);
-            e = fjMix;
+      fjLonLatJson.data.forEach((e) => {
+        let fjItem =
+          wtArray.find((findEle) => {
+            return findEle.fjbh === e.fjbh;
+          }) || {};
+        const fjMix = Object.assign({}, e, fjItem);
+        fjMix.status = this.getStatus(fjMix.fjzt);
+        e = fjMix;
 
-            this.showStatuswind(viewer, e);
-          });
-          this.fjLonLatJsonArr = fjLonLatJson;
-
-          this.fakeDataTimmer = setInterval(() => {
-            wtArray.forEach((fjzbItem) => {
-              const jwdItem =
-                fjLonLatJson.data.find((findEle) => {
-                  return findEle.fjbh === fjzbItem.fjbh;
-                }) || {};
-              this.changeZb(Object.assign({}, jwdItem, fjzbItem));
-            });
-          }, 1000);
-    //     },
-    //   });
-
-    //   webSocketService.on("message", (res) => {
-    //     if (stationName === "MYFDC") {
-    //       fjLonLatJson = JSON.parse(JSON.stringify(fjMYLonLatJson));
-    //     } else if (stationName === "JNWHZ") {
-    //       fjLonLatJson = JSON.parse(JSON.stringify(fjWHZLonLatJson));
-    //     } else if (stationName === "JNYPL") {
-    //       fjLonLatJson = JSON.parse(JSON.stringify(fjYPLLonLatJson));
-    //     } else if (stationName === "JNSMS") {
-    //       fjLonLatJson = JSON.parse(JSON.stringify(fjSMSLonLatJson));
-    //     }
-
-    //     let wtArray = JSON.parse(JSON.stringify(res.windMachineList));
-
-    //     if (this.isFirstAdd) {
-    //       fjLonLatJson.data.forEach((e) => {
-    //         let fjItem =
-    //           wtArray.find((findEle) => {
-    //             return findEle.fjbh === e.fjbh;
-    //           }) || {};
-    //         const fjMix = Object.assign({}, e, fjItem);
-    //         fjMix.status = this.getStatus(fjMix.fjzt);
-    //         e = fjMix;
-
-    //         this.showStatuswind(viewer, e);
-    //       });
-    //     }
-
-    //     this.fjLonLatJsonArr = fjLonLatJson;
-    //     this.isFirstAdd = false;
-
-    //     wtArray.forEach((fjzbItem) => {
-    //       const jwdItem =
-    //         fjLonLatJson.data.find((findEle) => {
-    //           return findEle.fjbh === fjzbItem.fjbh;
-    //         }) || {};
-    //       this.changeZb(Object.assign({}, jwdItem, fjzbItem));
-    //     });
-    //   });
+        this.showStatuswind(viewer, e);
+      });
+      this.fjLonLatJsonArr = fjLonLatJson;
+
+      this.fakeDataTimmer = setInterval(() => {
+        wtArray.forEach((fjzbItem) => {
+          const jwdItem =
+            fjLonLatJson.data.find((findEle) => {
+              return findEle.fjbh === fjzbItem.fjbh;
+            }) || {};
+          this.changeZb(Object.assign({}, jwdItem, fjzbItem));
+        });
+      }, 1000);
+      //     },
+      //   });
+
+      //   webSocketService.on("message", (res) => {
+      //     if (stationName === "MYFDC") {
+      //       fjLonLatJson = JSON.parse(JSON.stringify(fjMYLonLatJson));
+      //     } else if (stationName === "JNWHZ") {
+      //       fjLonLatJson = JSON.parse(JSON.stringify(fjWHZLonLatJson));
+      //     } else if (stationName === "JNYPL") {
+      //       fjLonLatJson = JSON.parse(JSON.stringify(fjYPLLonLatJson));
+      //     } else if (stationName === "JNSMS") {
+      //       fjLonLatJson = JSON.parse(JSON.stringify(fjSMSLonLatJson));
+      //     }
+
+      //     let wtArray = JSON.parse(JSON.stringify(res.windMachineList));
+
+      //     if (this.isFirstAdd) {
+      //       fjLonLatJson.data.forEach((e) => {
+      //         let fjItem =
+      //           wtArray.find((findEle) => {
+      //             return findEle.fjbh === e.fjbh;
+      //           }) || {};
+      //         const fjMix = Object.assign({}, e, fjItem);
+      //         fjMix.status = this.getStatus(fjMix.fjzt);
+      //         e = fjMix;
+
+      //         this.showStatuswind(viewer, e);
+      //       });
+      //     }
+
+      //     this.fjLonLatJsonArr = fjLonLatJson;
+      //     this.isFirstAdd = false;
+
+      //     wtArray.forEach((fjzbItem) => {
+      //       const jwdItem =
+      //         fjLonLatJson.data.find((findEle) => {
+      //           return findEle.fjbh === fjzbItem.fjbh;
+      //         }) || {};
+      //       this.changeZb(Object.assign({}, jwdItem, fjzbItem));
+      //     });
+      //   });
 
       this.resetWindViewport();
     },
@@ -803,12 +803,11 @@ export default {
       const btn = document.getElementById("windBtn");
 
       btn.addEventListener("click", function (event) {
-        // entityxy.show = !entityxy.show;
-        that.zbLabelList.forEach(iv => {
-            iv.zb.forEach(it => {
-                it.show = !it.show;
-            })
-        })
+        that.zbLabelList.forEach((iv) => {
+          iv.zb.forEach((it) => {
+            it.show = !it.show;
+          });
+        });
       });
 
       //   viewer.camera.moveEnd.addEventListener(() => {
@@ -2011,12 +2010,12 @@ export default {
     // background-color: rgba(20, 29, 51, 0.3) !important;
     background-color: rgba(0, 0, 0, 0.3) !important;
     border-radius: 10px 0 0 10px !important;
-    .el-drawer__header{
-        .el-drawer__close-btn{
-            .el-icon{
-                color: #fff !important;
-            }
+    .el-drawer__header {
+      .el-drawer__close-btn {
+        .el-icon {
+          color: #fff !important;
         }
+      }
     }
     .el-drawer__body {
       overflow: hidden;