设备历史轨迹

This commit is contained in:
2023-12-04 01:05:19 +08:00
parent 3688c421dc
commit eece1ec099
2 changed files with 15 additions and 7 deletions

View File

@@ -3,7 +3,7 @@
<head>
<script type="text/javascript" src="https://172.16.3.18/static_file/vconsole.min.js"></script>
<script>
// var vConsole = new VConsole();
var vConsole = new VConsole();
console.log('Hello world');
</script>
<meta charset="utf-8">

View File

@@ -9,6 +9,9 @@
<div class="timeSelectBoxItem">
<van-button type="default" @click="showendDate=true">结束时间</van-button>
</div>
<div class="timeSelectBoxItem">
<van-button type="default" @click="playPath=!playPath">{{playPath?'停止播放':'播放轨迹'}}</van-button>
</div>
</div>
<div class="addAlarmPoint" v-if="page=='addAlarmPoint'">
<div class="addAlarmPointNext" @click="addAlarmPointNextAction">下一步</div>
@@ -188,6 +191,7 @@ export default {
moveUserId: "",
moveIndex: 0,
pointMoveTimer:null,
playPath:false
};
},
mounted() {
@@ -609,7 +613,14 @@ export default {
},
startAnimation() {
this.pointMoveTimer=setInterval(()=>{
if(!this.playPath){
return false;
}
this.moveIndex = this.moveIndex + 30
if(this.moveIndex>=this.routeOriginList.length){
@@ -1110,12 +1121,9 @@ export default {
},
moveFromStartToEnd() {
if (Object.keys(this.vectorLayer).length == 0) {
// 创建图层
this.vectorLayer = new VectorLayer({
source: new VectorSource(),
});
// 图层添加到地图上
if (Object.keys(this.vectorLayer).length > 0) {
// 将旧图层删掉
this.map.removeLayer(this.vectorLayer);
}