浏览代码

常规上传

Koishi 2 周之前
父节点
当前提交
935c0f4e11
共有 1 个文件被更改,包括 17 次插入17 次删除
  1. 17 17
      src/views/cesiumComponents/windMap2D.vue

+ 17 - 17
src/views/cesiumComponents/windMap2D.vue

@@ -121,7 +121,7 @@ import sl from "@/assets/windimgs/fanSvg/sl.svg";
 import bwzhu from "@/assets/windimgs/fanSvg/bwzhu.svg";
 import bwshan from "@/assets/windimgs/fanSvg/bwshan.png";
 
-import benchmark from "@/assets/cesiumImg/benchmark.png"
+import benchmark from "@/assets/cesiumImg/benchmark.png";
 
 import windHome from "@/components/windHome/index.vue";
 import windPro from "@/components/windProDetail/windProblem.vue";
@@ -438,7 +438,7 @@ export default {
         },
         onError: (error) => {
           console.log("❌ WebSocket 错误:", error);
-          return
+          return;
           if (stationName === "MYFDC") {
             fjLonLatJson = JSON.parse(JSON.stringify(fjMYLonLatJson));
           } else if (stationName === "JNWHZ") {
@@ -488,23 +488,23 @@ export default {
 
       webSocketService.on("message", (res) => {
         if (stationName === "MYFDC") {
-          fjLonLatJson = fjMYLonLatJson;
+          fjLonLatJson = JSON.parse(JSON.stringify(fjMYLonLatJson));
         } else if (stationName === "JNWHZ") {
-          fjLonLatJson = fjWHZLonLatJson;
+          fjLonLatJson = JSON.parse(JSON.stringify(fjWHZLonLatJson));
         } else if (stationName === "JNYPL") {
-          fjLonLatJson = fjYPLLonLatJson;
+          fjLonLatJson = JSON.parse(JSON.stringify(fjYPLLonLatJson));
         } else if (stationName === "JNSMS") {
-          fjLonLatJson = fjSMSLonLatJson;
+          fjLonLatJson = JSON.parse(JSON.stringify(fjSMSLonLatJson));
         }
 
-        let wtArray = res.windMachineList;
-        fjLonLatJson.data.forEach((e, index) => {
+        let wtArray = JSON.parse(JSON.stringify(res.windMachineList));
+        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);
+          fjMix.status = this.getStatus(fjMix.fjzt);
           e = fjMix;
           if (e.status) {
             if (e.status === 1) {
@@ -703,14 +703,14 @@ export default {
           entityxy.show = !entityxy.show;
         });
         if (val.bgFj === "1") {
-            const benchmark = viewer.entities.add({
-                position,
-                billboard: { 
-                    image: that.benchmark, 
-                    scale: 0.8,
-                    pixelOffset: new Cesium.Cartesian2(50, -25) 
-                } // 偏移避免重叠
-            });
+          const benchmark = viewer.entities.add({
+            position,
+            billboard: {
+              image: that.benchmark,
+              scale: 0.8,
+              pixelOffset: new Cesium.Cartesian2(50, -25),
+            }, // 偏移避免重叠
+          });
         }
 
         const entity = viewer.entities.add({