提交 071cafcd authored 作者: junjie's avatar junjie

feat(fix):自动刷新不需要loading,解决界面拉伸后自动恢复

上级 63002eef
...@@ -380,7 +380,9 @@ export default { ...@@ -380,7 +380,9 @@ export default {
this.calHeight() this.calHeight()
}, },
created() { created() {
this.timer = setInterval(this.listTaskLog, 5000) this.timer = setInterval(() => {
this.listTaskLog(false)
}, 5000)
}, },
beforeDestroy() { beforeDestroy() {
clearInterval(this.timer) clearInterval(this.timer)
...@@ -461,10 +463,10 @@ export default { ...@@ -461,10 +463,10 @@ export default {
post('/dataset/table/incrementalConfig', { tableId: this.table.id }).then(response => { post('/dataset/table/incrementalConfig', { tableId: this.table.id }).then(response => {
this.incrementalConfig = response.data this.incrementalConfig = response.data
this.incrementalUpdateType = 'incrementalAdd' this.incrementalUpdateType = 'incrementalAdd'
console.log(this.sql); console.log(this.sql)
if (this.incrementalConfig.incrementalAdd) { if (this.incrementalConfig.incrementalAdd) {
this.sql = this.incrementalConfig.incrementalAdd this.sql = this.incrementalConfig.incrementalAdd
}else { } else {
this.sql = '' this.sql = ''
} }
}) })
...@@ -543,8 +545,8 @@ export default { ...@@ -543,8 +545,8 @@ export default {
this.taskForm.cron = '0 0 * ? * * *' this.taskForm.cron = '0 0 * ? * * *'
} }
}, },
listTaskLog() { listTaskLog(loading = true) {
post('/dataset/taskLog/list/' + this.page.currentPage + '/' + this.page.pageSize, { tableId: this.table.id }).then(response => { post('/dataset/taskLog/list/' + this.page.currentPage + '/' + this.page.pageSize, { tableId: this.table.id }, loading).then(response => {
this.taskLogData = response.data.listObject this.taskLogData = response.data.listObject
this.page.total = response.data.itemCount this.page.total = response.data.itemCount
}) })
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论