From 8a84c8e9e646f234006c6bbf4607776a4c4ed6b4 Mon Sep 17 00:00:00 2001 From: hanbaoshan <hanbaoshan@aiotlink.com> Date: 星期二, 29 十二月 2020 19:16:05 +0800 Subject: [PATCH] 轨迹图查询条件判空处理 --- src/pages/panoramicView/components/TracePlot.vue | 18 ++++++++++++++---- 1 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/pages/panoramicView/components/TracePlot.vue b/src/pages/panoramicView/components/TracePlot.vue index fc50227..9ee705b 100644 --- a/src/pages/panoramicView/components/TracePlot.vue +++ b/src/pages/panoramicView/components/TracePlot.vue @@ -65,6 +65,7 @@ //this.$moment().format("YYYY-MM-DD HH:mm:ss") ], timer: null, + intervalTime: 5000, colorArr: ['#F4DA40', '#0092BC', '#97D700', '#D0006F', '#D86018', '#653279', '#A45A2A', '#004B87', '#008C95', '#AA0061'], searchStartTimeStamp: 0, searchEndTimeStamp: 0, @@ -80,9 +81,7 @@ mounted () { this.searchData(); this.getPanorama(); - this.timer = setInterval(() => { - this.searchData(); - }, 7000); + }, beforeDestroy () { console.log('beforeDestroy') @@ -190,6 +189,14 @@ // } }, searchData () { + if(!this.searchTime){ + this.$notify({ + type:'warning', + message:'璇烽�夋嫨鏃堕棿!' + }); + clearInterval(this.timer); + return; + } let _this = this; var param = { page: 1, @@ -278,7 +285,10 @@ }) } console.log(new Date().getTime(), _this.actObj) - _this.drawTracePath() + _this.drawTracePath(); + _this.timer = setTimeout(()=>{ + _this.searchData() + },_this.intervalTime) }) } } -- Gitblit v1.8.0