浏览代码

增加标杆风机

sunzehao 2 周之前
父节点
当前提交
b9f9b580e9
共有 2 个文件被更改,包括 29 次插入1 次删除
  1. 14 1
      src/views/cesiumComponents/windMap2D.vue
  2. 15 0
      src/views/cesiumComponents/windMap3D.vue

+ 14 - 1
src/views/cesiumComponents/windMap2D.vue

@@ -121,6 +121,8 @@ 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 windHome from "@/components/windHome/index.vue";
 import windPro from "@/components/windProDetail/windProblem.vue";
 import ModelUnpack from "@/components/modelUnpack.vue";
@@ -147,6 +149,7 @@ export default {
   data() {
     return {
       loading: true,
+      benchmark,
       showAllWindFromStation: [],
       restLatLon: [
         {
@@ -435,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") {
@@ -699,6 +702,16 @@ export default {
         btn.addEventListener("click", function (event) {
           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 entity = viewer.entities.add({
           id: ids,

+ 15 - 0
src/views/cesiumComponents/windMap3D.vue

@@ -108,6 +108,8 @@ import hd from "@/assets/windimgs/fanSvg/hd.png";
 //光伏电站展示图标
 import gf from "@/assets/windimgs/fanSvg/gf.png";
 
+import benchmark from "@/assets/cesiumImg/benchmark.png"
+
 import windHome from "@/components/windHome/index.vue";
 import windPro from "@/components/windProDetail/windProblem.vue";
 import ModelUnpack from "@/components/modelUnpack.vue";
@@ -132,6 +134,7 @@ export default {
   },
   data() {
     return {
+        benchmark,
       restLatLon: [
         {
           longitude: 114.48789,
@@ -734,6 +737,18 @@ export default {
       const statueFJ = this.getWtStatue(status, "en");
       const statueZh = this.getWtStatue(status, "zh");
 
+      if (model.bgFj === "1") {
+            const benchmark = viewer.entities.add({
+                position,
+                billboard: { 
+                    image: that.benchmark, 
+                    scale: 0.8,
+                    pixelOffset: new Cesium.Cartesian2(50, -25),
+                    heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
+                } // 偏移避免重叠
+            });
+        }
+
       const entity = viewer.entities.add({
         name, // 模型名称
         position, // 模型位置