切换页面是,关闭定时器接口
如果接口报错,尝试季测若不成功,载关闭
This commit is contained in:
parent
062b80ea16
commit
d439734ebd
|
@ -228,6 +228,7 @@ export default {
|
|||
timer: null,
|
||||
updataFilterType: [],
|
||||
updataFilterDataQuality: [],
|
||||
httpNum: 0,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
@ -268,6 +269,7 @@ export default {
|
|||
|
||||
// 查询台站数据提供率及有效率
|
||||
async getDataProvisionEfficiency(arr, str) {
|
||||
this.httpNum++
|
||||
if (str && this.$route.path == '/station-operation') {
|
||||
this.$message.loading({ content: 'Loading station data, please wait...', key, duration: 0 })
|
||||
}
|
||||
|
@ -325,10 +327,15 @@ export default {
|
|||
} else if (arrA.length == 0 || arrB.length == 0 || arrC.length == 0) {
|
||||
this.upDateStationList = []
|
||||
}
|
||||
setTimeout(() => {
|
||||
this.timer = setTimeout(() => {
|
||||
this.getDataProvisionEfficiency(this.markerList_clone)
|
||||
}, 10000)
|
||||
} else {
|
||||
if (this.httpNum <= 5) {
|
||||
setTimeout(() => {
|
||||
this.getDataProvisionEfficiency(this.markerList_clone)
|
||||
}, 5000)
|
||||
}
|
||||
this.$message.warning('This operation fails. Contact your system administrator')
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue
Block a user