|
@@ -348,7 +348,8 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- let currentTime = new Date().getTime()
|
|
|
+ //时间往前推一秒,防止数据没拿到
|
|
|
+ let currentTime = new Date().getTime()-1000
|
|
|
this.count = this.timeCalculation(this.chartForm.timeValue, this.chartForm.timeType)
|
|
|
this.chooseStartTime = parseTime(new Date(currentTime - this.count))
|
|
|
this.chooseEndTime = parseTime(currentTime)
|
|
@@ -578,7 +579,8 @@ export default {
|
|
|
startTimer() {
|
|
|
this.timer = setInterval(() => {
|
|
|
this.chooseStartTime = this.chooseEndTime
|
|
|
- this.chooseEndTime = parseTime(new Date())
|
|
|
+ //时间往前推一秒,防止数据没拿到
|
|
|
+ this.chooseEndTime = parseTime(new Date().getTime()-1000)
|
|
|
this.updateChartData()
|
|
|
}, this.timeCalculation(this.chartForm.frequencyValue, this.chartForm.frequencyType))
|
|
|
},
|