|
|
@@ -108,7 +108,7 @@ import hd from "@/assets/windimgs/fanSvg/hd.png";
|
|
|
//光伏电站展示图标
|
|
|
import gf from "@/assets/windimgs/fanSvg/gf.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";
|
|
|
@@ -122,6 +122,8 @@ import AdvancedBillboardGenerator from "@/tools/lightsign.js";
|
|
|
|
|
|
import webSocketService from "@/tools/ws.js";
|
|
|
|
|
|
+// const advancedGenerator = new AdvancedBillboardGenerator();
|
|
|
+
|
|
|
export default {
|
|
|
name: "windMap3D",
|
|
|
components: {
|
|
|
@@ -134,7 +136,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- benchmark,
|
|
|
+ benchmark,
|
|
|
restLatLon: [
|
|
|
{
|
|
|
longitude: 114.48789,
|
|
|
@@ -194,6 +196,7 @@ export default {
|
|
|
isFakeData: false,
|
|
|
fakeDataTimmer: null,
|
|
|
isFirstAdd: true,
|
|
|
+ zbLabelList: [],
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
|
@@ -505,6 +508,7 @@ export default {
|
|
|
},
|
|
|
onError: (error) => {
|
|
|
console.log("❌ WebSocket 错误:", error);
|
|
|
+ return;
|
|
|
if (stationName === "MYFDC") {
|
|
|
fjLonLatJson = JSON.parse(JSON.stringify(fjMYLonLatJson));
|
|
|
} else if (stationName === "JNWHZ") {
|
|
|
@@ -532,18 +536,12 @@ export default {
|
|
|
this.fjLonLatJsonArr = fjLonLatJson;
|
|
|
|
|
|
this.fakeDataTimmer = setInterval(() => {
|
|
|
- // viewer.entities.removeAll();
|
|
|
-
|
|
|
- fjLonLatJson.data.forEach((e) => {
|
|
|
- let fjItem =
|
|
|
- wtArray.find((findEle) => {
|
|
|
- return findEle.fjbh === e.fjbh;
|
|
|
+ wtArray.forEach((fjzbItem) => {
|
|
|
+ const jwdItem =
|
|
|
+ fjLonLatJson.data.find((findEle) => {
|
|
|
+ return findEle.fjbh === fjzbItem.fjbh;
|
|
|
}) || {};
|
|
|
- const fjMix = Object.assign({}, e, fjItem);
|
|
|
- fjMix.status = this.getStatus(fjMix.fjzt);
|
|
|
- e = fjMix;
|
|
|
-
|
|
|
- this.changeZb(e);
|
|
|
+ this.changeZb(Object.assign({}, jwdItem, fjzbItem));
|
|
|
});
|
|
|
}, 1000);
|
|
|
},
|
|
|
@@ -579,15 +577,12 @@ export default {
|
|
|
this.fjLonLatJsonArr = fjLonLatJson;
|
|
|
this.isFirstAdd = false;
|
|
|
|
|
|
- fjLonLatJson.data.forEach((e) => {
|
|
|
- let fjItem =
|
|
|
- wtArray.find((findEle) => {
|
|
|
- return findEle.fjbh === e.fjbh;
|
|
|
+ wtArray.forEach((fjzbItem) => {
|
|
|
+ const jwdItem =
|
|
|
+ fjLonLatJson.data.find((findEle) => {
|
|
|
+ return findEle.fjbh === fjzbItem.fjbh;
|
|
|
}) || {};
|
|
|
- const fjMix = Object.assign({}, e, fjItem);
|
|
|
- fjMix.status = this.getStatus(fjMix.fjzt);
|
|
|
- e = fjMix;
|
|
|
- this.changeZb(e);
|
|
|
+ this.changeZb(Object.assign({}, jwdItem, fjzbItem));
|
|
|
});
|
|
|
});
|
|
|
|
|
|
@@ -738,16 +733,16 @@ export default {
|
|
|
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 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, // 模型名称
|
|
|
@@ -820,9 +815,6 @@ export default {
|
|
|
}
|
|
|
}, Cesium.ScreenSpaceEventType.RIGHT_CLICK);
|
|
|
|
|
|
- // 使用高级灯牌生成器
|
|
|
- const advancedGenerator = new AdvancedBillboardGenerator();
|
|
|
-
|
|
|
let statusItems = [
|
|
|
{
|
|
|
label: "功率",
|
|
|
@@ -830,7 +822,7 @@ export default {
|
|
|
this.isFakeData
|
|
|
? this.randomNum(100, 1000)
|
|
|
: model.actualPower.toFixed(2)
|
|
|
- }MW`,
|
|
|
+ } MW`,
|
|
|
},
|
|
|
{
|
|
|
label: "风速",
|
|
|
@@ -838,7 +830,7 @@ export default {
|
|
|
this.isFakeData
|
|
|
? this.randomNum(100, 1000)
|
|
|
: model.windSpeed.toFixed(1)
|
|
|
- }m/s`,
|
|
|
+ } m/s`,
|
|
|
},
|
|
|
{
|
|
|
label: "转速",
|
|
|
@@ -846,119 +838,322 @@ export default {
|
|
|
this.isFakeData
|
|
|
? this.randomNum(100, 1000)
|
|
|
: model.rotateSpeed.toFixed(1)
|
|
|
- }p`,
|
|
|
+ } p`,
|
|
|
},
|
|
|
];
|
|
|
|
|
|
- const billboardImage = advancedGenerator.generateAdvancedBillboard({
|
|
|
- title: name,
|
|
|
- statusItems,
|
|
|
- borderGradient: ["#ccc", "#ccc"],
|
|
|
- backgroundColor: "transparent",
|
|
|
- padding: 6,
|
|
|
- titleHeight: 22,
|
|
|
- itemHeight: 17,
|
|
|
- titleColor: "#1890ff",
|
|
|
- titleStrokeStyle: "#000",
|
|
|
- titleStrokeWidth: 1,
|
|
|
- labelStrokeStyle: "#000",
|
|
|
- labelStrokeWidth: 1,
|
|
|
- valueStrokeStyle: "#000",
|
|
|
- valueStrokeWidth: 1,
|
|
|
- });
|
|
|
-
|
|
|
- let entityxy =
|
|
|
- this.entityxyArray.find((findEle) => {
|
|
|
- return findEle.fjbh === model.fjbh;
|
|
|
- }) || null;
|
|
|
+ // const billboardImage = advancedGenerator.generateAdvancedBillboard({
|
|
|
+ // title: name,
|
|
|
+ // statusItems,
|
|
|
+ // borderGradient: ["#ccc", "#ccc"],
|
|
|
+ // backgroundColor: "rgba(13, 38, 77, 0.5)",
|
|
|
+ // padding: 6,
|
|
|
+ // titleHeight: 22,
|
|
|
+ // itemHeight: 17,
|
|
|
+ // titleColor: "#1890ff",
|
|
|
+ // titleStrokeStyle: "#000",
|
|
|
+ // titleStrokeWidth: 1,
|
|
|
+ // labelStrokeStyle: "#000",
|
|
|
+ // labelStrokeWidth: 1,
|
|
|
+ // valueStrokeStyle: "#000",
|
|
|
+ // valueStrokeWidth: 1,
|
|
|
+ // });
|
|
|
|
|
|
- entityxy = viewer.entities.add({
|
|
|
- name,
|
|
|
- position,
|
|
|
- billboard: {
|
|
|
- image: billboardImage,
|
|
|
- scale: 1,
|
|
|
- verticalOrigin: Cesium.VerticalOrigin.BOTTOM, // 原来已经是CENTER,现在改为BOTTOM
|
|
|
- pixelOffset: new Cesium.Cartesian2(80, -50), // 原来是-20,现在改为30,向上移动
|
|
|
- eyeOffset: new Cesium.Cartesian3(0, 0, 0), // 保持固定大小
|
|
|
- heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
|
|
|
- scaleByDistance: new Cesium.NearFarScalar(
|
|
|
- 6000, // 5010米内
|
|
|
- 1.2, // 1倍大小
|
|
|
- 9000, // 10000米外
|
|
|
- 1 // 0.1倍大小
|
|
|
- ),
|
|
|
-
|
|
|
- // 透明度渐变
|
|
|
- // translucencyByDistance: new Cesium.NearFarScalar(
|
|
|
- // 6000, // 500米内
|
|
|
- // 1.0, // 完全不透明
|
|
|
- // 9000, // 3000米外
|
|
|
- // 0.5 // 完全透明
|
|
|
- // ),
|
|
|
- },
|
|
|
- });
|
|
|
+ // let entityxy =
|
|
|
+ // this.entityxyArray.find((findEle) => {
|
|
|
+ // return findEle.fjbh === model.fjbh;
|
|
|
+ // }) || null;
|
|
|
+
|
|
|
+ // entityxy = viewer.entities.add({
|
|
|
+ // name,
|
|
|
+ // position,
|
|
|
+ // billboard: {
|
|
|
+ // image: billboardImage,
|
|
|
+ // scale: 1,
|
|
|
+ // verticalOrigin: Cesium.VerticalOrigin.BOTTOM, // 原来已经是CENTER,现在改为BOTTOM
|
|
|
+ // pixelOffset: new Cesium.Cartesian2(80, -50), // 原来是-20,现在改为30,向上移动
|
|
|
+ // eyeOffset: new Cesium.Cartesian3(0, 0, 0), // 保持固定大小
|
|
|
+ // heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
|
|
|
+ // scaleByDistance: new Cesium.NearFarScalar(
|
|
|
+ // 6000, // 5010米内
|
|
|
+ // 1.2, // 1倍大小
|
|
|
+ // 9000, // 10000米外
|
|
|
+ // 1 // 0.1倍大小
|
|
|
+ // ),
|
|
|
+
|
|
|
+ // // 透明度渐变
|
|
|
+ // // translucencyByDistance: new Cesium.NearFarScalar(
|
|
|
+ // // 6000, // 500米内
|
|
|
+ // // 1.0, // 完全不透明
|
|
|
+ // // 9000, // 3000米外
|
|
|
+ // // 0.5 // 完全透明
|
|
|
+ // // ),
|
|
|
+ // },
|
|
|
+ // });
|
|
|
|
|
|
- entityxy.fjbh = model.fjbh;
|
|
|
- this.entityxyArray.push(entityxy);
|
|
|
+ // entityxy.fjbh = model.fjbh;
|
|
|
+ // this.entityxyArray.push(entityxy);
|
|
|
},
|
|
|
|
|
|
changeZb(model) {
|
|
|
// 使用高级灯牌生成器
|
|
|
- const advancedGenerator = new AdvancedBillboardGenerator();
|
|
|
+ // let statusItems = [
|
|
|
+ // {
|
|
|
+ // label: "功率",
|
|
|
+ // value: `${
|
|
|
+ // this.isFakeData
|
|
|
+ // ? this.randomNum(100, 1000)
|
|
|
+ // : model.actualPower.toFixed(2)
|
|
|
+ // } MW`,
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // label: "风速",
|
|
|
+ // value: `${
|
|
|
+ // this.isFakeData
|
|
|
+ // ? this.randomNum(100, 1000)
|
|
|
+ // : model.windSpeed.toFixed(1)
|
|
|
+ // } m/s`,
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // label: "转速",
|
|
|
+ // value: `${
|
|
|
+ // this.isFakeData
|
|
|
+ // ? this.randomNum(100, 1000)
|
|
|
+ // : model.rotateSpeed.toFixed(1)
|
|
|
+ // } p`,
|
|
|
+ // },
|
|
|
+ // ];
|
|
|
+
|
|
|
+ const glText = this.isFakeData
|
|
|
+ ? this.randomNum(100, 1000)
|
|
|
+ : model.actualPower.toFixed(2);
|
|
|
+
|
|
|
+ const fsText = this.isFakeData
|
|
|
+ ? this.randomNum(100, 1000)
|
|
|
+ : model.rotateSpeed.toFixed(2);
|
|
|
+
|
|
|
+ const zsText = this.isFakeData
|
|
|
+ ? this.randomNum(100, 1000)
|
|
|
+ : model.windSpeed.toFixed(2);
|
|
|
+
|
|
|
+ const zbMap = {
|
|
|
+ glText: `${glText} MW`,
|
|
|
+ fsText: `${fsText} m/s`,
|
|
|
+ zsText: `${zsText} p`,
|
|
|
+ };
|
|
|
|
|
|
- let statusItems = [
|
|
|
- {
|
|
|
- label: "功率",
|
|
|
- value: `${
|
|
|
- this.isFakeData
|
|
|
- ? this.randomNum(100, 1000)
|
|
|
- : model.actualPower.toFixed(2)
|
|
|
- }MW`,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "风速",
|
|
|
- value: `${
|
|
|
- this.isFakeData
|
|
|
- ? this.randomNum(100, 1000)
|
|
|
- : model.windSpeed.toFixed(1)
|
|
|
- }m/s`,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "转速",
|
|
|
- value: `${
|
|
|
- this.isFakeData
|
|
|
- ? this.randomNum(100, 1000)
|
|
|
- : model.rotateSpeed.toFixed(1)
|
|
|
- }p`,
|
|
|
- },
|
|
|
- ];
|
|
|
-
|
|
|
- const billboardImage = advancedGenerator.generateAdvancedBillboard({
|
|
|
- title: model.fjbh,
|
|
|
- statusItems,
|
|
|
- borderGradient: ["#ccc", "#ccc"],
|
|
|
- backgroundColor: "transparent",
|
|
|
- padding: 6,
|
|
|
- titleHeight: 22,
|
|
|
- itemHeight: 17,
|
|
|
- titleColor: "#1890ff",
|
|
|
- titleStrokeStyle: "#000",
|
|
|
- titleStrokeWidth: 1,
|
|
|
- labelStrokeStyle: "#000",
|
|
|
- labelStrokeWidth: 1,
|
|
|
- valueStrokeStyle: "#000",
|
|
|
- valueStrokeWidth: 1,
|
|
|
- });
|
|
|
+ const position = Cesium.Cartesian3.fromDegrees(
|
|
|
+ model.longitude,
|
|
|
+ model.latitude,
|
|
|
+ 0
|
|
|
+ );
|
|
|
|
|
|
- let entityxy =
|
|
|
- this.entityxyArray.find((findEle) => {
|
|
|
- return findEle.fjbh === model.fjbh;
|
|
|
+ const zbhj =
|
|
|
+ this.zbLabelList.find((ele) => {
|
|
|
+ return ele.fjbh === model.fjbh;
|
|
|
}) || null;
|
|
|
|
|
|
- if (entityxy) {
|
|
|
- entityxy.billboard.image._value = billboardImage;
|
|
|
+ if (zbhj?.fjbh) {
|
|
|
+ zbhj.zb.forEach((ele) => {
|
|
|
+ if (ele.zb) {
|
|
|
+ const spText = ele.label.text._value.split(": ");
|
|
|
+ ele.label.text._value = `${spText[0]}: ${zbMap[ele.zb]}`;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ const wtName = this.viewer.entities.add({
|
|
|
+ position,
|
|
|
+ label: {
|
|
|
+ text: model.fjbh,
|
|
|
+ font: "14pt sans-serif",
|
|
|
+ fillColor: new Cesium.Color.fromCssColorString("#4fc3f7"), // 填充颜色
|
|
|
+ outlineColor: Cesium.Color.BLACK, // 轮廓颜色
|
|
|
+ style: Cesium.LabelStyle.FILL_AND_OUTLINE,
|
|
|
+ outlineWidth: 2,
|
|
|
+ verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
|
|
|
+ showBackground: false, // 显示背景
|
|
|
+ backgroundColor: new Cesium.Color.fromCssColorString(
|
|
|
+ "rgba(13, 38, 77, 0.5)"
|
|
|
+ ), // 背景颜色
|
|
|
+ backgroundPadding: new Cesium.Cartesian2(10, 10), // 背景内边距
|
|
|
+ verticalOrigin: Cesium.VerticalOrigin.CENTER, // 垂直对齐方式
|
|
|
+ horizontalOrigin: Cesium.HorizontalOrigin.LEFT, // 水平对齐方式
|
|
|
+ pixelOffset: new Cesium.Cartesian2(80, -60), // 原来是-20,现在改为30,向上移动
|
|
|
+ eyeOffset: new Cesium.Cartesian3(0, 0, 0), // 保持固定大小
|
|
|
+ heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
|
|
|
+ scaleByDistance: new Cesium.NearFarScalar(
|
|
|
+ 6000, // 6000米内
|
|
|
+ 1,
|
|
|
+ 9000, // 9000米外
|
|
|
+ 0.8
|
|
|
+ ),
|
|
|
+ },
|
|
|
+ });
|
|
|
+
|
|
|
+ const glZb = this.viewer.entities.add({
|
|
|
+ position,
|
|
|
+ label: {
|
|
|
+ text: `功率: ${glText} MW`,
|
|
|
+ font: "14pt sans-serif",
|
|
|
+ style: Cesium.LabelStyle.FILL_AND_OUTLINE,
|
|
|
+ outlineWidth: 2,
|
|
|
+ verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
|
|
|
+ showBackground: false, // 显示背景
|
|
|
+ backgroundColor: new Cesium.Color.fromCssColorString(
|
|
|
+ "rgba(13, 38, 77, 0.5)"
|
|
|
+ ), // 背景颜色
|
|
|
+ backgroundPadding: new Cesium.Cartesian2(10, 10), // 背景内边距
|
|
|
+ verticalOrigin: Cesium.VerticalOrigin.CENTER, // 垂直对齐方式
|
|
|
+ horizontalOrigin: Cesium.HorizontalOrigin.LEFT, // 水平对齐方式
|
|
|
+ pixelOffset: new Cesium.Cartesian2(80, -40), // 原来是-20,现在改为30,向上移动
|
|
|
+ eyeOffset: new Cesium.Cartesian3(0, 0, 0), // 保持固定大小
|
|
|
+ heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
|
|
|
+ scaleByDistance: new Cesium.NearFarScalar(
|
|
|
+ 6000, // 6000米内
|
|
|
+ 1,
|
|
|
+ 9000, // 9000米外
|
|
|
+ 0.8
|
|
|
+ ),
|
|
|
+ },
|
|
|
+ });
|
|
|
+
|
|
|
+ glZb.zb = "glText";
|
|
|
+
|
|
|
+ const fsZb = this.viewer.entities.add({
|
|
|
+ position,
|
|
|
+ label: {
|
|
|
+ text: `风速: ${fsText}`,
|
|
|
+ font: "14pt sans-serif",
|
|
|
+ style: Cesium.LabelStyle.FILL_AND_OUTLINE,
|
|
|
+ outlineWidth: 2,
|
|
|
+ verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
|
|
|
+ showBackground: false, // 显示背景
|
|
|
+ backgroundColor: new Cesium.Color.fromCssColorString(
|
|
|
+ "rgba(13, 38, 77, 0.5)"
|
|
|
+ ), // 背景颜色
|
|
|
+ backgroundPadding: new Cesium.Cartesian2(10, 10), // 背景内边距
|
|
|
+ verticalOrigin: Cesium.VerticalOrigin.CENTER, // 垂直对齐方式
|
|
|
+ horizontalOrigin: Cesium.HorizontalOrigin.LEFT, // 水平对齐方式
|
|
|
+ pixelOffset: new Cesium.Cartesian2(80, -20), // 原来是-20,现在改为30,向上移动
|
|
|
+ eyeOffset: new Cesium.Cartesian3(0, 0, 0), // 保持固定大小
|
|
|
+ heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
|
|
|
+ scaleByDistance: new Cesium.NearFarScalar(
|
|
|
+ 6000, // 6000米内
|
|
|
+ 1,
|
|
|
+ 9000, // 9000米外
|
|
|
+ 0.8
|
|
|
+ ),
|
|
|
+ },
|
|
|
+ });
|
|
|
+
|
|
|
+ fsZb.zb = "fsText";
|
|
|
+
|
|
|
+ const zsZb = this.viewer.entities.add({
|
|
|
+ position,
|
|
|
+ label: {
|
|
|
+ text: `转速: ${zsText}`,
|
|
|
+ font: "14pt sans-serif",
|
|
|
+ style: Cesium.LabelStyle.FILL_AND_OUTLINE,
|
|
|
+ outlineWidth: 2,
|
|
|
+ verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
|
|
|
+ showBackground: false, // 显示背景
|
|
|
+ backgroundColor: new Cesium.Color.fromCssColorString(
|
|
|
+ "rgba(13, 38, 77, 0.5)"
|
|
|
+ ), // 背景颜色
|
|
|
+ backgroundPadding: new Cesium.Cartesian2(10, 10), // 背景内边距
|
|
|
+ verticalOrigin: Cesium.VerticalOrigin.CENTER, // 垂直对齐方式
|
|
|
+ horizontalOrigin: Cesium.HorizontalOrigin.LEFT, // 水平对齐方式
|
|
|
+ pixelOffset: new Cesium.Cartesian2(80, 0), // 原来是-20,现在改为30,向上移动
|
|
|
+ eyeOffset: new Cesium.Cartesian3(0, 0, 0), // 保持固定大小
|
|
|
+ heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
|
|
|
+ scaleByDistance: new Cesium.NearFarScalar(
|
|
|
+ 6000, // 6000米内
|
|
|
+ 1,
|
|
|
+ 9000, // 9000米外
|
|
|
+ 0.8
|
|
|
+ ),
|
|
|
+ },
|
|
|
+ });
|
|
|
+
|
|
|
+ zsZb.zb = "zsText";
|
|
|
+
|
|
|
+ this.zbLabelList.push({
|
|
|
+ fjbh: model.fjbh,
|
|
|
+ zb: [wtName, glZb, fsZb, zsZb],
|
|
|
+ });
|
|
|
}
|
|
|
+
|
|
|
+ // entity.label.text._value
|
|
|
+ // const billboardImage = advancedGenerator.generateAdvancedBillboard({
|
|
|
+ // title: model.fjbh,
|
|
|
+ // statusItems,
|
|
|
+ // borderGradient: ["#ccc", "#ccc"],
|
|
|
+ // backgroundColor: "rgba(13, 38, 77, 0.5)",
|
|
|
+ // padding: 6,
|
|
|
+ // titleHeight: 22,
|
|
|
+ // itemHeight: 17,
|
|
|
+ // titleColor: "#1890ff",
|
|
|
+ // titleStrokeStyle: "#000",
|
|
|
+ // titleStrokeWidth: 1,
|
|
|
+ // labelStrokeStyle: "#000",
|
|
|
+ // labelStrokeWidth: 1,
|
|
|
+ // valueStrokeStyle: "#000",
|
|
|
+ // valueStrokeWidth: 1,
|
|
|
+ // });
|
|
|
+
|
|
|
+ // this.billboardImageList.push(billboardImage);
|
|
|
+
|
|
|
+ // let entityxy =
|
|
|
+ // this.entityxyArray.find((findEle) => {
|
|
|
+ // return findEle.fjbh === model.fjbh;
|
|
|
+ // }) || null;
|
|
|
+
|
|
|
+ // for (let i = 0; i < this.entityxyArray.length; i++) {
|
|
|
+ // if (this.entityxyArray[i].fjbh === model.fjbh) {
|
|
|
+ // let entityxy = Cesium.clone(this.entityxyArray[i]);
|
|
|
+ // entityxy.fjbh = this.entityxyArray[i].fjbh;
|
|
|
+ // entityxy.billboard = null;
|
|
|
+ // entityxy.billboard = {
|
|
|
+ // image: billboardImage.toDataURL("image/png"),
|
|
|
+ // scale: 1,
|
|
|
+ // width: billboardImage.width,
|
|
|
+ // height: billboardImage.height,
|
|
|
+ // verticalOrigin: Cesium.VerticalOrigin.BOTTOM, // 原来已经是CENTER,现在改为BOTTOM
|
|
|
+ // pixelOffset: new Cesium.Cartesian2(80, -50), // 原来是-20,现在改为30,向上移动
|
|
|
+ // eyeOffset: new Cesium.Cartesian3(0, 0, 0), // 保持固定大小
|
|
|
+ // heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
|
|
|
+ // scaleByDistance: new Cesium.NearFarScalar(
|
|
|
+ // 6000, // 5010米内
|
|
|
+ // 1.2, // 1.2倍大小
|
|
|
+ // 9000, // 10000米外
|
|
|
+ // 1 // 1.05倍大小
|
|
|
+ // ),
|
|
|
+ // };
|
|
|
+ // this.viewer.entities.remove(this.entityxyArray[i]);
|
|
|
+ // this.viewer.entities.add(entityxy);
|
|
|
+ // this.entityxyArray.splice(i, 1, entityxy);
|
|
|
+ // break;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+
|
|
|
+ // if (entityxy) {
|
|
|
+ // entityxy.billboard = {
|
|
|
+ // image: billboardImage.toDataURL("image/png"),
|
|
|
+ // scale: 1,
|
|
|
+ // width: billboardImage.width,
|
|
|
+ // height: billboardImage.height,
|
|
|
+ // verticalOrigin: Cesium.VerticalOrigin.BOTTOM, // 原来已经是CENTER,现在改为BOTTOM
|
|
|
+ // pixelOffset: new Cesium.Cartesian2(80, -50), // 原来是-20,现在改为30,向上移动
|
|
|
+ // eyeOffset: new Cesium.Cartesian3(0, 0, 0), // 保持固定大小
|
|
|
+ // heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
|
|
|
+ // scaleByDistance: new Cesium.NearFarScalar(
|
|
|
+ // 6000, // 5010米内
|
|
|
+ // 1.2, // 1.2倍大小
|
|
|
+ // 9000, // 10000米外
|
|
|
+ // 1 // 1.05倍大小
|
|
|
+ // ),
|
|
|
+ // };
|
|
|
+ // }
|
|
|
},
|
|
|
|
|
|
// 右键展示元素
|
|
|
@@ -1097,7 +1292,6 @@ export default {
|
|
|
document.addEventListener("keydown", keyDownHandler);
|
|
|
},
|
|
|
showMessage(type, val) {
|
|
|
- console.log("type===>>>", type);
|
|
|
this.windDrawer = true;
|
|
|
this.windDrawerHeader = val.name + "数据详情";
|
|
|
if (type === "basic") {
|