|
|
@@ -66,7 +66,7 @@
|
|
|
:modelVal="modelVal"
|
|
|
@showDia="showComDia"
|
|
|
/>
|
|
|
- <!-- @backStations="backStations" -->
|
|
|
+ <!-- @backStations="backStations" -->
|
|
|
<windView
|
|
|
v-if="showWindDetail"
|
|
|
@coverOnChange="coverOnChange"
|
|
|
@@ -86,6 +86,7 @@ import fjMYLonLatJson from "../fjLonLatJson/fj_MY.json"; //迈越风电场
|
|
|
import fjWHZLonLatJson from "../fjLonLatJson/fj_WHZ.json"; //京能旺海庄
|
|
|
import fjYPLLonLatJson from "../fjLonLatJson/fj_YPL.json"; //京能营盘梁
|
|
|
import fjSMSLonLatJson from "../fjLonLatJson/fj_SMS.json"; //京能苏木山
|
|
|
+import wsRes from "../fjLonLatJson/wsRes.json"; // 模拟 ws 返回数据
|
|
|
import allStationJson from "./allStationJson.json";
|
|
|
import basicGeoJson from "../../assets/geoJson/basic.json";
|
|
|
import comModelDialog from "@/components/comModelDialog.vue";
|
|
|
@@ -129,7 +130,7 @@ import windGridData from "./windGridData.json";
|
|
|
|
|
|
import AdvancedBillboardGenerator from "@/tools/lightsign.js";
|
|
|
|
|
|
-import { useWebSocket } from "@/tools/websocket.js"
|
|
|
+import { useWebSocket } from "@/tools/websocket.js";
|
|
|
|
|
|
export default {
|
|
|
name: "windMap2D",
|
|
|
@@ -394,44 +395,53 @@ export default {
|
|
|
showWindFromStation(viewer) {
|
|
|
let stationName = this.$route.query.nameEn;
|
|
|
let fjLonLatJson = [];
|
|
|
- this.fjLonLatJsonArr = []
|
|
|
- let url = ""
|
|
|
- // 旺海庄:DHWH 苏木山:DHSM 营盘梁:DHYP 迈越:HZMY
|
|
|
+ this.fjLonLatJsonArr = [];
|
|
|
+ let url = "";
|
|
|
+ // 旺海庄:DHWH 苏木山:DHSM 营盘梁:DHYP 迈越:HZMY
|
|
|
if (stationName === "MYFDC") {
|
|
|
fjLonLatJson = fjMYLonLatJson;
|
|
|
- url = "ws://10.121.128.117:8431/ws/HZMY"
|
|
|
+ url = "ws://10.121.128.117:8431/ws/HZMY";
|
|
|
} else if (stationName === "JNWHZ") {
|
|
|
fjLonLatJson = fjWHZLonLatJson;
|
|
|
- url = "ws://10.121.128.117:8431/ws/DHWH"
|
|
|
+ url = "ws://10.121.128.117:8431/ws/DHWH";
|
|
|
} else if (stationName === "JNYPL") {
|
|
|
fjLonLatJson = fjYPLLonLatJson;
|
|
|
- url = "ws://10.121.128.117:8431/ws/DHYP"
|
|
|
+ url = "ws://10.121.128.117:8431/ws/DHYP";
|
|
|
} else if (stationName === "JNSMS") {
|
|
|
fjLonLatJson = fjSMSLonLatJson;
|
|
|
- url = "ws://10.121.128.117:8431/ws/DHSM"
|
|
|
+ url = "ws://10.121.128.117:8431/ws/DHSM";
|
|
|
}
|
|
|
|
|
|
- const ws = useWebSocket(url)
|
|
|
- // let wsRes = ws.messages.windMachineList
|
|
|
+ const ws = useWebSocket(url);
|
|
|
+ // let wtArray = ws.messages.windMachineList
|
|
|
+ // this.fjLonLatJsonArr = fjLonLatJson;
|
|
|
|
|
|
- this.fjLonLatJsonArr = fjLonLatJson
|
|
|
+ let wtArray = wsRes.windMachineList;
|
|
|
+ this.fjLonLatJsonArr = wsRes.windMachineList;
|
|
|
+
|
|
|
+ console.log(789789, wtArray);
|
|
|
fjLonLatJson.data.forEach((e, index) => {
|
|
|
- if (e.status) {
|
|
|
- if (e.status === 1) {
|
|
|
- this.showStatuswind(viewer, e, dj);
|
|
|
- } else if (e.status === 2) {
|
|
|
- this.showStatuswind(viewer, e, gz);
|
|
|
- } else if (e.status === 3) {
|
|
|
- this.showStatuswind(viewer, e, jx);
|
|
|
- } else if (e.status === 4) {
|
|
|
- this.showStatuswind(viewer, e, xd);
|
|
|
- } else if (e.status === 5) {
|
|
|
- this.showStatuswind(viewer, e, lx);
|
|
|
- } else if (e.status === 6) {
|
|
|
- this.showStatuswind(viewer, e, sl);
|
|
|
+ let fjItem =
|
|
|
+ wtArray.find((findEle) => {
|
|
|
+ return findEle.fjbh === e.fjbh;
|
|
|
+ }) || {};
|
|
|
+ const dataMix = Object.assign({}, e, fjItem);
|
|
|
+ if (dataMix.status) {
|
|
|
+ if (dataMix.status === 1) {
|
|
|
+ this.showStatuswind(viewer, dataMix, dj);
|
|
|
+ } else if (dataMix.status === 2) {
|
|
|
+ this.showStatuswind(viewer, dataMix, gz);
|
|
|
+ } else if (dataMix.status === 3) {
|
|
|
+ this.showStatuswind(viewer, dataMix, jx);
|
|
|
+ } else if (dataMix.status === 4) {
|
|
|
+ this.showStatuswind(viewer, dataMix, xd);
|
|
|
+ } else if (dataMix.status === 5) {
|
|
|
+ this.showStatuswind(viewer, dataMix, lx);
|
|
|
+ } else if (dataMix.status === 6) {
|
|
|
+ this.showStatuswind(viewer, dataMix, sl);
|
|
|
} else {
|
|
|
//并网风机
|
|
|
- this.showAnimatewind(viewer, e);
|
|
|
+ this.showAnimatewind(viewer, dataMix);
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
@@ -469,6 +479,7 @@ export default {
|
|
|
},
|
|
|
//添加svg或png贴图
|
|
|
addSvg(viewer, uri, lon, lat, val, index) {
|
|
|
+ console.log(3333, val);
|
|
|
let that = this;
|
|
|
let ids = that.generateUniqueId(val.id);
|
|
|
const position = Cesium.Cartesian3.fromDegrees(lon, lat);
|
|
|
@@ -478,10 +489,9 @@ export default {
|
|
|
|
|
|
let statusItems = [];
|
|
|
const statusArray = [
|
|
|
- { label: "风速", value: "10m/s" },
|
|
|
- { label: "状态", value: "测试" },
|
|
|
- { label: "转速", value: "1000p" },
|
|
|
- { label: "功率", value: "50kW" },
|
|
|
+ { label: "功率", value: `${val.actualPower.toFixed(2)}MW` },
|
|
|
+ { label: "风速", value: `${val.windSpeed.toFixed(1)}m/s` },
|
|
|
+ { label: "转速", value: `${val.rotateSpeed.toFixed(1)}p` },
|
|
|
// { label: "其他参数A", value: "...." },
|
|
|
// { label: "其他参数B", value: "...." },
|
|
|
// { label: "其他参数C", value: "...." },
|
|
|
@@ -556,11 +566,11 @@ export default {
|
|
|
// heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
|
|
|
},
|
|
|
label: {
|
|
|
- // text: val.name ? val.name : val.plantname,
|
|
|
- text: val.name,
|
|
|
- font: '14px sans-serif',
|
|
|
- fillColor: Cesium.Color.fromBytes(255, 255, 255),
|
|
|
- }
|
|
|
+ // 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);
|
|
|
@@ -925,7 +935,7 @@ export default {
|
|
|
// 目标位置:经度、纬度、高度
|
|
|
// const targetLon = 114.48789;
|
|
|
// const targetLat = 35.32916;
|
|
|
-
|
|
|
+
|
|
|
const targetHeight = 5000;
|
|
|
|
|
|
const draggableHeightTolerance = 5000; // 允许拖拽的高度范围:20,000 ~ 30,000
|