@@ -379,15 +387,14 @@
- {{ $t('Run') }}
+ {{ $t('Batch Run') }}
{
+ this.getList()
+ }, 1000)
+ },
onCopy(row, ev) {
ev.stopPropagation()
this.copyDialogVisible = true
@@ -1297,10 +1318,36 @@
this.crawlConfirmDialogVisible = true
this.isMultiple = true
},
+ onBatchCrawl() {
+ this.$store.commit('task/SET_BATCH_CRAWL_LIST', this.selectedSpiders.map(d => {
+ return {
+ spider_id: d._id,
+ run_type: 'random',
+ param: '',
+ scrapy_log_level: 'INFO'
+ }
+ }))
+ if (this.batchCrawlList.length < 10) {
+ for (let i = this.batchCrawlList.length; i < 10; i++) {
+ this.batchCrawlList.push({
+ spider_id: '',
+ run_type: 'random',
+ param: '',
+ scrapy_log_level: 'INFO'
+ })
+ }
+ }
+ this.batchCrawlDialogVisible = true
+ this.isMultiple = true
+ },
onCrawlConfirmDialogClose() {
this.crawlConfirmDialogVisible = false
this.isMultiple = false
},
+ onBatchCrawlDialogClose() {
+ this.batchCrawlDialogVisible = false
+ this.isMultiple = false
+ },
isDisabled(row) {
return row.is_public && row.username !== this.userInfo.username && this.userInfo.role !== 'admin'
}