updated configurable spider

This commit is contained in:
Marvin Zhang
2019-05-26 17:10:04 +08:00
parent 15f9b7ef05
commit 5daebcb39b
14 changed files with 371 additions and 63 deletions

View File

@@ -99,13 +99,14 @@ export default {
]),
isShowRun () {
if (this.isCustomized) {
// customized spider
if (!this.spiderForm.deploy_ts) {
return false
}
return !!this.spiderForm.cmd
} else {
// TODO: has to add rules
return false
// configurable spider
return !!this.spiderForm.fields
}
},
isCustomized () {
@@ -113,7 +114,7 @@ export default {
}
},
methods: {
onRun () {
onCrawl () {
const row = this.spiderForm
this.$refs['spiderForm'].validate(res => {
if (res) {