mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-22 17:31:03 +01:00
Merge remote-tracking branch 'crawlab-team/develop' into develop
This commit is contained in:
@@ -151,6 +151,19 @@ export default {
|
||||
'Detail Page Fields': '详情页字段',
|
||||
'Detail Page URL': '详情页URL',
|
||||
'All': '全部',
|
||||
'Stages': '阶段',
|
||||
'Process': '流程',
|
||||
'Stage Process': '流程图',
|
||||
'Stage Name': '阶段名称',
|
||||
'Start Stage': '开始阶段',
|
||||
'Engine': '引擎',
|
||||
'Selector Type': '选择器类别',
|
||||
'Selector': '选择器',
|
||||
'Is Attribute': '是否为属性',
|
||||
'Next Stage': '下一阶段',
|
||||
'No Next Stage': '没有下一阶段',
|
||||
'Fields': '字段',
|
||||
'Stage': '阶段',
|
||||
|
||||
// 爬虫列表
|
||||
'Name': '名称',
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const state = {
|
||||
lang: window.localStorage.getItem('lang') || 'en'
|
||||
lang: window.localStorage.getItem('lang') || 'zh'
|
||||
}
|
||||
|
||||
const getters = {
|
||||
|
||||
@@ -34,22 +34,6 @@
|
||||
:visible.sync="addDialogVisible"
|
||||
:before-close="onAddDialogClose">
|
||||
<el-tabs :active-name="spiderType">
|
||||
<el-tab-pane name="customized" :label="$t('Customized')">
|
||||
<el-form :model="spiderForm" ref="addCustomizedForm" inline-message>
|
||||
<el-form-item :label="$t('Upload Zip File')" label-width="120px" name="site">
|
||||
<el-upload
|
||||
:action="$request.baseUrl + '/spiders'"
|
||||
:headers="{Authorization:token}"
|
||||
:on-change="onUploadChange"
|
||||
:on-success="onUploadSuccess"
|
||||
:file-list="fileList">
|
||||
<el-button size="small" type="primary" icon="el-icon-upload">{{$t('Upload')}}</el-button>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-alert type="error" :title="$t('Please zip your spider files from the root directory')"
|
||||
:closable="false"></el-alert>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane name="configurable" :label="$t('Configurable')">
|
||||
<el-form :model="spiderForm" ref="addConfigurableForm" inline-message label-width="120px">
|
||||
<el-form-item :label="$t('Spider Name')" prop="name" required>
|
||||
@@ -66,19 +50,23 @@
|
||||
<el-button type="primary" @click="onAddConfigurable">{{$t('Add')}}</el-button>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane name="customized" :label="$t('Customized')">
|
||||
<el-form :model="spiderForm" ref="addCustomizedForm" inline-message>
|
||||
<el-form-item :label="$t('Upload Zip File')" label-width="120px" name="site">
|
||||
<el-upload
|
||||
:action="$request.baseUrl + '/spiders'"
|
||||
:headers="{Authorization:token}"
|
||||
:on-change="onUploadChange"
|
||||
:on-success="onUploadSuccess"
|
||||
:file-list="fileList">
|
||||
<el-button size="small" type="primary" icon="el-icon-upload">{{$t('Upload')}}</el-button>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-alert type="error" :title="$t('Please zip your spider files from the root directory')"
|
||||
:closable="false"></el-alert>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<!-- <div class="add-spider-wrapper">-->
|
||||
<!-- <div @click="onAddConfigurable">-->
|
||||
<!-- <el-card shadow="hover" class="add-spider-item success">-->
|
||||
<!-- {{$t('Configurable Spider')}}-->
|
||||
<!-- </el-card>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div @click="onAddCustomized">-->
|
||||
<!-- <el-card shadow="hover" class="add-spider-item primary">-->
|
||||
<!-- {{$t('Customized Spider')}}-->
|
||||
<!-- </el-card>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
</el-dialog>
|
||||
<!--./add dialog-->
|
||||
|
||||
@@ -323,7 +311,7 @@ export default {
|
||||
name: [{ required: true, message: 'Required Field', trigger: 'change' }]
|
||||
},
|
||||
fileList: [],
|
||||
spiderType: 'customized'
|
||||
spiderType: 'configurable'
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -356,7 +344,6 @@ export default {
|
||||
onAdd () {
|
||||
this.$store.commit('spider/SET_SPIDER_FORM', {})
|
||||
this.addDialogVisible = true
|
||||
// this.onAddCustomized()
|
||||
},
|
||||
onAddConfigurable () {
|
||||
this.$refs['addConfigurableForm'].validate(async res => {
|
||||
|
||||
Reference in New Issue
Block a user