From a52c94c7cc0f5c883caf48aba6599eb2d7ea9bc4 Mon Sep 17 00:00:00 2001 From: marvzhang Date: Mon, 17 Feb 2020 15:24:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E5=85=A5=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/Scrapy/SpiderScrapy.vue | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/frontend/src/components/Scrapy/SpiderScrapy.vue b/frontend/src/components/Scrapy/SpiderScrapy.vue index b7d74a31..b183f72a 100644 --- a/frontend/src/components/Scrapy/SpiderScrapy.vue +++ b/frontend/src/components/Scrapy/SpiderScrapy.vue @@ -297,17 +297,20 @@ export default { } this.$set(this.spiderScrapySettings, this.activeParamIndex, JSON.parse(JSON.stringify(this.activeParam))) this.dialogVisible = false + this.$st('爬虫详情', 'Scrapy 设置', '确认编辑参数') }, onEditParam (row, index) { this.activeParam = JSON.parse(JSON.stringify(row)) this.activeParamIndex = index this.onOpenDialog() + this.$st('爬虫详情', 'Scrapy 设置', '点击编辑参数') }, async onSave () { const res = await this.$store.dispatch('spider/saveSpiderScrapySettings', this.$route.params.id) if (!res.data.error) { this.$message.success(this.$t('Saved successfully')) } + this.$st('爬虫详情', 'Scrapy 设置', '保存设置') }, onAdd () { const data = JSON.parse(JSON.stringify(this.spiderScrapySettings)) @@ -317,11 +320,13 @@ export default { type: 'string' }) this.$store.commit('spider/SET_SPIDER_SCRAPY_SETTINGS', data) + this.$st('爬虫详情', 'Scrapy 设置', '添加参数') }, onRemove (index) { const data = JSON.parse(JSON.stringify(this.spiderScrapySettings)) data.splice(index, 1) this.$store.commit('spider/SET_SPIDER_SCRAPY_SETTINGS', data) + this.$st('爬虫详情', 'Scrapy 设置', '删除参数') }, onActiveParamAdd () { if (this.activeParam.type === 'array') { @@ -332,6 +337,7 @@ export default { } this.$set(this.activeParam.value, '', 999) } + this.$st('爬虫详情', 'Scrapy 设置', '添加参数中参数') }, onActiveParamRemove (index) { if (this.activeParam.type === 'array') { @@ -342,6 +348,7 @@ export default { delete value[key] this.$set(this.activeParam, 'value', value) } + this.$st('爬虫详情', 'Scrapy 设置', '删除参数中参数') }, settingsKeysFetchSuggestions (queryString, cb) { const data = this.$utils.scrapy.settingParamNames @@ -380,6 +387,7 @@ export default { this.isAddSpiderLoading = false await this.$store.dispatch('spider/getSpiderScrapySpiders', this.$route.params.id) }) + this.$st('爬虫详情', 'Scrapy 设置', '确认添加爬虫') }, onAddSpider () { this.addSpiderForm = { @@ -387,6 +395,7 @@ export default { domain: '' } this.isAddSpiderVisible = true + this.$st('爬虫详情', 'Scrapy 设置', '添加爬虫') } } }