mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-22 17:31:03 +01:00
更新添加scrapy爬虫
This commit is contained in:
@@ -189,7 +189,7 @@ export default {
|
||||
this.spiderForm.site = item._id
|
||||
},
|
||||
onUploadSuccess () {
|
||||
this.$store.dispatch('file/getFileList', this.spiderForm.src)
|
||||
this.$store.dispatch('spider/getFileTree')
|
||||
|
||||
this.uploadLoading = false
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-plus"
|
||||
@click="isAddSpiderVisible = true"
|
||||
@click="onAddSpider"
|
||||
>
|
||||
{{$t('Add Spider')}}
|
||||
</el-button>
|
||||
@@ -373,13 +373,20 @@ export default {
|
||||
id: this.$route.params.id,
|
||||
form: this.addSpiderForm
|
||||
})
|
||||
console.log(res)
|
||||
if (!res.data.error) {
|
||||
this.$message.success('Saved successfully')
|
||||
this.$message.success(this.$t('Saved successfully'))
|
||||
}
|
||||
this.isAddSpiderVisible = false
|
||||
this.isAddSpiderLoading = false
|
||||
await this.$store.dispatch('spider/getSpiderScrapySpiders', this.$route.params.id)
|
||||
})
|
||||
},
|
||||
onAddSpider () {
|
||||
this.addSpiderForm = {
|
||||
name: '',
|
||||
domain: ''
|
||||
}
|
||||
this.isAddSpiderVisible = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -202,6 +202,7 @@ export default {
|
||||
this.$store.dispatch('spider/getSpiderScrapySpiders', this.$route.params.id)
|
||||
this.$store.dispatch('spider/getSpiderScrapySettings', this.$route.params.id)
|
||||
} else if (this.activeTabName === 'files') {
|
||||
this.$store.dispatch('spider/getFileTree')
|
||||
if (this.currentPath) {
|
||||
this.$store.dispatch('file/getFileContent', { path: this.currentPath })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user