|
|
@@ -80,8 +80,9 @@
|
|
|
<windHome :modelValItem="modelVal" />
|
|
|
</div>
|
|
|
<div class="spjk" v-if="showVideoMsg">
|
|
|
+ <!-- src="https://www.bilibili.com/video/BV1421DYCELw?t=12.1" -->
|
|
|
<iframe
|
|
|
- src="https://www.bilibili.com/video/BV1421DYCELw?t=12.1"
|
|
|
+ src="/public/static/windVideo.mp4"
|
|
|
frameborder="0"
|
|
|
style="width: 100%; height: 100%"
|
|
|
></iframe>
|
|
|
@@ -96,6 +97,7 @@
|
|
|
:viewer="viewer"
|
|
|
:sidebarRightData="sidebarRightData"
|
|
|
@coverOnChange="coverOnChange"
|
|
|
+ @changeType="changeType"
|
|
|
v-if="showTypeViewer"
|
|
|
/>
|
|
|
<cesiumwindView
|
|
|
@@ -253,6 +255,7 @@ export default {
|
|
|
allStationentitys: [],
|
|
|
allWindEntitys: [],
|
|
|
showTypeViewer: true,
|
|
|
+ stationValue: []
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
@@ -279,6 +282,25 @@ export default {
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
+ changeType(value) {
|
|
|
+ this.stationValue = value
|
|
|
+ this.allStationentitys.forEach(({ entity, handler }) => {
|
|
|
+ this.viewer.entities.remove(entity); // 移除实体
|
|
|
+ if (!handler.isDestroyed()) {
|
|
|
+ handler.destroy(); // 销毁事件处理器(关键!)
|
|
|
+ }
|
|
|
+ });
|
|
|
+ this.allStationentitys = [];
|
|
|
+ let showStation = []
|
|
|
+ value.forEach(it => {
|
|
|
+ allStationJson.station.forEach(ic => {
|
|
|
+ if (it === ic.energytype) {
|
|
|
+ showStation.push(ic)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ this.showAllStation(this.viewer, showStation);
|
|
|
+ },
|
|
|
coverOnChange(val) {
|
|
|
if (val.value === "风场") {
|
|
|
this.switchWindLayer(val.check);
|
|
|
@@ -416,7 +438,7 @@ export default {
|
|
|
|
|
|
// this.setMapImageryProvider();
|
|
|
this.switchWindLayer();
|
|
|
- this.showAllStation(viewer);
|
|
|
+ this.showAllStation(viewer, allStationJson.station);
|
|
|
this.initGeoJsonData();
|
|
|
},
|
|
|
|
|
|
@@ -1520,8 +1542,8 @@ export default {
|
|
|
},
|
|
|
|
|
|
// 展示所有风场
|
|
|
- showAllStation(viewer) {
|
|
|
- allStationJson.station.forEach((e, index) => {
|
|
|
+ showAllStation(viewer, station) {
|
|
|
+ station.forEach((e, index) => {
|
|
|
if (e.energytype === "Wind") {
|
|
|
this.showStationFn(viewer, e, index, fc);
|
|
|
} else if (e.energytype === "Fire") {
|
|
|
@@ -1945,7 +1967,7 @@ export default {
|
|
|
backStations() {
|
|
|
this.showWindDetail = false;
|
|
|
this.showTypeViewer = true;
|
|
|
- this.switchWindLayer();
|
|
|
+ // this.switchWindLayer();
|
|
|
this.allWindEntitys.forEach(({ entity, handler }) => {
|
|
|
this.viewer.entities.remove(entity); // 移除实体
|
|
|
if (!handler.isDestroyed()) {
|
|
|
@@ -1953,7 +1975,7 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
this.allWindEntitys = [];
|
|
|
- this.showAllStation(this.viewer);
|
|
|
+ this.changeType(this.stationValue);
|
|
|
},
|
|
|
menuComTSty(val) {
|
|
|
this.menuComTStyB = val;
|