added system tasks

This commit is contained in:
marvzhang
2020-07-31 13:14:00 +08:00
parent 74f7f59036
commit e153e80aaa
5 changed files with 21 additions and 10 deletions

View File

@@ -219,14 +219,21 @@
this.isLogAutoFetch = !!this.isRunning
this.isLogAutoScroll = !!this.isRunning
await this.$store.dispatch('task/getTaskResults', this.$route.params.id)
if (this.taskForm.type === 'spider') {
await this.$store.dispatch('task/getTaskResults', this.$route.params.id)
}
await this.getTaskLog()
this.handle = setInterval(async() => {
if (this.isLogAutoFetch) {
await this.$store.dispatch('task/getTaskData', this.$route.params.id)
await this.$store.dispatch('task/getTaskResults', this.$route.params.id)
await this.getTaskLog()
if (this.taskForm.type === 'spider') {
await this.$store.dispatch('task/getTaskResults', this.$route.params.id)
}
}
}, 5000)
@@ -241,9 +248,6 @@
onTabClick(tab) {
this.$st.sendEv('任务详情', '切换标签', tab.name)
},
onSpiderChange(id) {
this.$router.push(`/spiders/${id}`)
},
onResultsPageChange(payload) {
const { pageNum, pageSize } = payload
this.resultsPageNum = pageNum