|
|
@@ -129,6 +129,8 @@ import windGridData from "./windGridData.json";
|
|
|
|
|
|
import AdvancedBillboardGenerator from "@/tools/lightsign.js";
|
|
|
|
|
|
+import { useWebSocket } from "@/tools/websocket.js"
|
|
|
+
|
|
|
export default {
|
|
|
name: "windMap2D",
|
|
|
components: {
|
|
|
@@ -225,8 +227,8 @@ export default {
|
|
|
// minimumLevel: 11,
|
|
|
maximumLevel: 18,
|
|
|
// url: this.urlTiles,
|
|
|
- url: "/static/ditu/{z}/{x}/{y}.png",
|
|
|
- // url: "https://webst02.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}",
|
|
|
+ // url: "/static/ditu/{z}/{x}/{y}.png",
|
|
|
+ url: "https://webst02.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}",
|
|
|
credit: "影像地图",
|
|
|
});
|
|
|
imageryProvider.alpha = 0.55; // 透明度
|
|
|
@@ -391,17 +393,31 @@ export default {
|
|
|
// 展示所选风场的风机
|
|
|
showWindFromStation(viewer) {
|
|
|
let stationName = this.$route.query.nameEn;
|
|
|
+ console.log("nameEn====>>>>")
|
|
|
+
|
|
|
let fjLonLatJson = [];
|
|
|
this.fjLonLatJsonArr = []
|
|
|
+ let url = ""
|
|
|
+ // 旺海庄:DHWH 苏木山:DHSM 营盘梁:DHYP 迈越:HZMY
|
|
|
if (stationName === "MYFDC") {
|
|
|
fjLonLatJson = fjMYLonLatJson;
|
|
|
+ url = "ws://10.121.128.117:8431/ws/HZMY"
|
|
|
} else if (stationName === "JNWHZ") {
|
|
|
fjLonLatJson = fjWHZLonLatJson;
|
|
|
+ url = "ws://10.121.128.117:8431/ws/DHWH"
|
|
|
} else if (stationName === "JNYPL") {
|
|
|
fjLonLatJson = fjYPLLonLatJson;
|
|
|
+ url = "ws://10.121.128.117:8431/ws/DHYP"
|
|
|
} else if (stationName === "JNSMS") {
|
|
|
fjLonLatJson = fjSMSLonLatJson;
|
|
|
+ url = "ws://10.121.128.117:8431/ws/DHSM"
|
|
|
}
|
|
|
+
|
|
|
+ const ws = useWebSocket(url)
|
|
|
+
|
|
|
+ // let wsRes = ws.messages.windMachineList
|
|
|
+ console.log("wsres1====>>>>")
|
|
|
+
|
|
|
this.fjLonLatJsonArr = fjLonLatJson
|
|
|
fjLonLatJson.data.forEach((e, index) => {
|
|
|
if (e.status) {
|
|
|
@@ -423,6 +439,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
+ console.log("wsres2====>>>>")
|
|
|
this.resetWindViewport();
|
|
|
},
|
|
|
// 根据状态展示不同颜色风机贴图
|
|
|
@@ -888,6 +905,15 @@ export default {
|
|
|
let fromLat = this.$route.query.latitude * 1;
|
|
|
let fromheight = this.$route.query.height * 1;
|
|
|
let fromname = this.$route.query.nameEn;
|
|
|
+
|
|
|
+ let targetLon = null;
|
|
|
+ let targetLat = null;
|
|
|
+ this.restLatLon.forEach((it) => {
|
|
|
+ if (it.name === fromname) {
|
|
|
+ targetLon = it.longitude;
|
|
|
+ targetLat = it.latitude;
|
|
|
+ }
|
|
|
+ });
|
|
|
// 设置镜头到指定的经纬度(度)、高度(米)
|
|
|
this.viewer.camera.setView({
|
|
|
destination: Cesium.Cartesian3.fromDegrees(
|
|
|
@@ -904,14 +930,7 @@ export default {
|
|
|
// 目标位置:经度、纬度、高度
|
|
|
// const targetLon = 114.48789;
|
|
|
// const targetLat = 35.32916;
|
|
|
- let targetLon = null;
|
|
|
- let targetLat = null;
|
|
|
- this.restLatLon.forEach((it) => {
|
|
|
- if (it.name === fromname) {
|
|
|
- targetLon = it.longitude;
|
|
|
- targetLat = it.latitude;
|
|
|
- }
|
|
|
- });
|
|
|
+
|
|
|
const targetHeight = 5000;
|
|
|
|
|
|
const draggableHeightTolerance = 5000; // 允许拖拽的高度范围:20,000 ~ 30,000
|