定时器

This commit is contained in:
2022-08-01 11:32:39 +08:00
parent b27b67f8dd
commit ebbf2aa57c
5 changed files with 14 additions and 10 deletions

View File

@@ -1684,7 +1684,7 @@ export default {
// console.log(res.result)
this.chartData1 = res.result
if (res.result.length) {
window.clearInterval(this.timeOut2)
clearInterval(this.timeOut2)
this.setEchart02() // 左3
}
// this.setEchart02() // 左3
@@ -1719,7 +1719,7 @@ export default {
this.taskDate2.push(e.min_productivity)
})
if (res.result.length) {
window.clearInterval(this.timeOut1)
clearInterval(this.timeOut1)
this.setEchart04() // 中2
}
} else {
@@ -1809,7 +1809,7 @@ export default {
console.log(res.result)
this.chartData2 = res.result
if (res.result.length) {
window.clearInterval(this.timeOut3)
clearInterval(this.timeOut3)
this.setEchart10() // 右3
}
// this.setEchart10() // 右3

View File

@@ -53,7 +53,7 @@ export default {
}, this.iTime)
},
toJump () {
window.clearInterval(this.timer)
clearInterval(this.timer)
this.page = this.page === 'one' ? 'two' : 'one'
setTimeout(() => {
this.swipePage()

View File

@@ -393,6 +393,10 @@ export default {
beforeDestroy () {
this.$once('hook:beforeDestroy', () => {
clearInterval(this.timer2)
clearInterval(this.timer3)
clearInterval(this.interTime)
clearInterval(this.timeOut1)
clearInterval(this.timeOut2)
})
},
methods: {
@@ -842,7 +846,7 @@ export default {
this.joo1 = res.monthResult.joo1
this.joo2 = res.monthResult.joo2
this.joo3 = res.monthResult.joo3
window.clearInterval(this.timer3)
clearInterval(this.timer3)
this.toSwiper()
} else {
this.Dialog(res.desc)
@@ -860,7 +864,7 @@ export default {
if (res.code === '1') {
this.arrL2 = [...res.result]
if (this.arrL2.length > 0) {
window.clearInterval(this.timeOut1)
clearInterval(this.timeOut1)
this.setEchart1()
}
} else {
@@ -872,7 +876,7 @@ export default {
let res = await monthHarvest()
if (res.code === '1') {
this.arrL3 = [...res.result]
window.clearInterval(this.timeOut2)
clearInterval(this.timeOut2)
this.setEchart2()
} else {
this.Dialog(res.desc)

View File

@@ -153,7 +153,7 @@ export default {
// this._getEchart4()
},
beforeDestroy () {
window.clearInterval(this.timer)
clearInterval(this.timer)
},
methods: {
_getEchart4 () {

View File

@@ -215,7 +215,7 @@ export default {
this.refresh()
},
beforeDestroy () {
window.clearInterval(this.timer)
clearInterval(this.timer)
},
methods: {
refresh () {
@@ -235,7 +235,7 @@ export default {
if (res.code === '1') {
this.obj1 = res.content
this.array1 = [...res.rows]
window.clearInterval(this.timeOut)
clearInterval(this.timeOut)
this.setEchart1()
} else {
this.Dialog(res.desc)