Pr@dev@refactor view refresh (#7474)

* refactor: 视图刷新优化,解决部分出错视图停止刷新问题

* refactor: 视图刷新优化,解决部分出错视图停止刷新问题
This commit is contained in:
王嘉豪 2023-12-29 14:58:56 +08:00 committed by GitHub
parent 83517c2619
commit 8028a5d118
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -827,6 +827,9 @@ export default {
}
},
getData(id, cache = true, dataBroadcast = false) {
if (this.requestStatus === 'waiting') {
return
}
if (id) {
const filters = this.filter.filter
const group = this.groupRequiredInvalid(filters)
@ -933,6 +936,12 @@ export default {
return true
}).catch(err => {
console.error('err-' + err)
//
if (!this.innerRefreshTimer) {
setTimeout(() => {
this.getData(this.element.propValue.viewId)
}, 5000)
}
this.requestStatus = 'error'
if (err.message && err.message.indexOf('timeout') > -1) {
this.message = this.$t('panel.timeout_refresh')