设备历史轨迹
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<script type="text/javascript" src="https://172.16.3.18/static_file/vconsole.min.js"></script>
|
<script type="text/javascript" src="https://172.16.3.18/static_file/vconsole.min.js"></script>
|
||||||
<script>
|
<script>
|
||||||
// var vConsole = new VConsole();
|
var vConsole = new VConsole();
|
||||||
console.log('Hello world');
|
console.log('Hello world');
|
||||||
</script>
|
</script>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
|
|||||||
@@ -9,6 +9,9 @@
|
|||||||
<div class="timeSelectBoxItem">
|
<div class="timeSelectBoxItem">
|
||||||
<van-button type="default" @click="showendDate=true">结束时间</van-button>
|
<van-button type="default" @click="showendDate=true">结束时间</van-button>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="timeSelectBoxItem">
|
||||||
|
<van-button type="default" @click="playPath=!playPath">{{playPath?'停止播放':'播放轨迹'}}</van-button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="addAlarmPoint" v-if="page=='addAlarmPoint'">
|
<div class="addAlarmPoint" v-if="page=='addAlarmPoint'">
|
||||||
<div class="addAlarmPointNext" @click="addAlarmPointNextAction">下一步</div>
|
<div class="addAlarmPointNext" @click="addAlarmPointNextAction">下一步</div>
|
||||||
@@ -188,6 +191,7 @@ export default {
|
|||||||
moveUserId: "",
|
moveUserId: "",
|
||||||
moveIndex: 0,
|
moveIndex: 0,
|
||||||
pointMoveTimer:null,
|
pointMoveTimer:null,
|
||||||
|
playPath:false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -609,7 +613,14 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
startAnimation() {
|
startAnimation() {
|
||||||
|
|
||||||
|
|
||||||
this.pointMoveTimer=setInterval(()=>{
|
this.pointMoveTimer=setInterval(()=>{
|
||||||
|
|
||||||
|
if(!this.playPath){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
this.moveIndex = this.moveIndex + 30
|
this.moveIndex = this.moveIndex + 30
|
||||||
|
|
||||||
if(this.moveIndex>=this.routeOriginList.length){
|
if(this.moveIndex>=this.routeOriginList.length){
|
||||||
@@ -1110,12 +1121,9 @@ export default {
|
|||||||
},
|
},
|
||||||
moveFromStartToEnd() {
|
moveFromStartToEnd() {
|
||||||
|
|
||||||
if (Object.keys(this.vectorLayer).length == 0) {
|
if (Object.keys(this.vectorLayer).length > 0) {
|
||||||
// 创建图层
|
|
||||||
this.vectorLayer = new VectorLayer({
|
// 将旧图层删掉
|
||||||
source: new VectorSource(),
|
|
||||||
});
|
|
||||||
// 图层添加到地图上
|
|
||||||
this.map.removeLayer(this.vectorLayer);
|
this.map.removeLayer(this.vectorLayer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user