|
@@ -3,7 +3,7 @@
|
|
<div id="container" class="box">
|
|
<div id="container" class="box">
|
|
<div id="cesiumContainer"></div>
|
|
<div id="cesiumContainer"></div>
|
|
<div class="menu">
|
|
<div class="menu">
|
|
- <el-dropdown @command="handleCommand" trigger="click">
|
|
+ <el-dropdown @command="handleCommand" trigger="click">
|
|
<span class="el-dropdown-link">
|
|
<span class="el-dropdown-link">
|
|
下拉菜单<i class="el-icon-arrow-down el-icon--right"></i>
|
|
下拉菜单<i class="el-icon-arrow-down el-icon--right"></i>
|
|
</span>
|
|
</span>
|
|
@@ -11,11 +11,14 @@
|
|
<el-dropdown-item command="a">天气开关</el-dropdown-item>
|
|
<el-dropdown-item command="a">天气开关</el-dropdown-item>
|
|
<el-dropdown-item command="b">地图中文标记</el-dropdown-item>
|
|
<el-dropdown-item command="b">地图中文标记</el-dropdown-item>
|
|
<el-dropdown-item command="c">回到初始位置</el-dropdown-item>
|
|
<el-dropdown-item command="c">回到初始位置</el-dropdown-item>
|
|
|
|
+ <el-dropdown-item command="d">风场风向</el-dropdown-item>
|
|
</el-dropdown-menu>
|
|
</el-dropdown-menu>
|
|
</el-dropdown>
|
|
</el-dropdown>
|
|
</div>
|
|
</div>
|
|
<div class="promsg" v-show="promsg">
|
|
<div class="promsg" v-show="promsg">
|
|
- <div class="promsg_bar">状态:<span>{{ msg[i].isrun | isrun}}</span></div>
|
|
+ <div class="promsg_bar">
|
|
|
|
+ 状态:<span>{{ msg[i].isrun | isrun }}</span>
|
|
|
|
+ </div>
|
|
<div class="promsg_bar">
|
|
<div class="promsg_bar">
|
|
姓名:<span>{{ msg[i].username }}</span>
|
|
姓名:<span>{{ msg[i].username }}</span>
|
|
</div>
|
|
</div>
|
|
@@ -40,7 +43,11 @@
|
|
<script>
|
|
<script>
|
|
var Cesium = require("cesium/Cesium");
|
|
var Cesium = require("cesium/Cesium");
|
|
var widgets = require("cesium/Widgets/widgets.css");
|
|
var widgets = require("cesium/Widgets/widgets.css");
|
|
|
|
+import axios from 'axios'
|
|
import addCircleWave from "../../public/static/CiecleScan";
|
|
import addCircleWave from "../../public/static/CiecleScan";
|
|
|
|
+import Windy from "../../public/static/wind/Windy";
|
|
|
|
+import response from '../../public/static/2017121300'
|
|
|
|
+
|
|
export default {
|
|
export default {
|
|
name: "cesiumPage",
|
|
name: "cesiumPage",
|
|
data() {
|
|
data() {
|
|
@@ -132,21 +139,20 @@ export default {
|
|
}, Cesium.ScreenSpaceEventType.LEFT_CLICK);
|
|
}, Cesium.ScreenSpaceEventType.LEFT_CLICK);
|
|
this.viewer = viewer;
|
|
this.viewer = viewer;
|
|
},
|
|
},
|
|
- filters:{
|
|
+ filters: {
|
|
- isrun(val){
|
|
+ isrun(val) {
|
|
switch (val) {
|
|
switch (val) {
|
|
case 0:
|
|
case 0:
|
|
- return '离线';
|
|
+ return "离线";
|
|
break;
|
|
break;
|
|
case 1:
|
|
case 1:
|
|
- return '在线';
|
|
+ return "在线";
|
|
break;
|
|
break;
|
|
default:
|
|
default:
|
|
- return 'WARING';
|
|
+ return "WARING";
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
-
|
|
+ },
|
|
- }
|
|
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
addpoint(res) {
|
|
addpoint(res) {
|
|
@@ -241,8 +247,8 @@ export default {
|
|
for (let i = 0; i < this.labelEntities.length; i++) {
|
|
for (let i = 0; i < this.labelEntities.length; i++) {
|
|
this.viewer.entities.remove(this.labelEntities[i]);
|
|
this.viewer.entities.remove(this.labelEntities[i]);
|
|
}
|
|
}
|
|
- this.viewer.dataSources.removeAll()
|
|
+ this.viewer.dataSources.removeAll();
|
|
- this.labelEntities = [];
|
|
+ this.labelEntities = [];
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
@@ -266,6 +272,13 @@ export default {
|
|
maximumHeight: 5000, // 相机最大飞行高度
|
|
maximumHeight: 5000, // 相机最大飞行高度
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ windy() {
|
|
|
|
+ var windy = new Windy(response, this.viewer);
|
|
|
|
+ setInterval(function () {
|
|
|
|
+ console.log(1111111111)
|
|
|
|
+ windy.animate();
|
|
|
|
+ }, 200);
|
|
|
|
+ },
|
|
handleCommand(command) {
|
|
handleCommand(command) {
|
|
switch (command) {
|
|
switch (command) {
|
|
case "a":
|
|
case "a":
|
|
@@ -274,6 +287,9 @@ export default {
|
|
case "b":
|
|
case "b":
|
|
this.geoJSON();
|
|
this.geoJSON();
|
|
break;
|
|
break;
|
|
|
|
+ case "d":
|
|
|
|
+ this.windy();
|
|
|
|
+ break;
|
|
default:
|
|
default:
|
|
this.flyto();
|
|
this.flyto();
|
|
break;
|
|
break;
|
|
@@ -382,18 +398,17 @@ body,
|
|
border: none;
|
|
border: none;
|
|
}
|
|
}
|
|
.el-dropdown-link {
|
|
.el-dropdown-link {
|
|
- cursor: pointer;
|
|
+ cursor: pointer;
|
|
- color: #409EFF;
|
|
+ color: #409eff;
|
|
- }
|
|
+}
|
|
- .el-icon-arrow-down {
|
|
+.el-icon-arrow-down {
|
|
- font-size: 12px;
|
|
+ font-size: 12px;
|
|
- }
|
|
+}
|
|
- .el-dropdown-menu__item {
|
|
+.el-dropdown-menu__item {
|
|
- color: #fff!important;
|
|
+ color: #fff !important;
|
|
- }
|
|
+}
|
|
- .el-dropdown-menu__item:hover{
|
|
+.el-dropdown-menu__item:hover {
|
|
- color: #339999!important;
|
|
+ color: #339999 !important;
|
|
- }
|
|
+}
|
|
-
|
|
|
|
</style>
|
|
</style>
|
|
|
|
|