From 0bbcd1b64fb4b3c7823e9dfc1590554eb74ad9fe Mon Sep 17 00:00:00 2001 From: marvzhang Date: Thu, 28 Nov 2019 12:39:07 +0800 Subject: [PATCH] =?UTF-8?q?fixed:=20=E7=82=B9=E5=87=BB=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E5=AF=BC=E8=88=AA=E8=BF=9B=E5=85=A5=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E9=A1=B5=E9=9D=A2=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/Config/ConfigList.vue | 6 ++--- frontend/src/views/spider/SpiderList.vue | 26 +++++++++++-------- frontend/src/views/task/TaskList.vue | 5 ++-- 3 files changed, 20 insertions(+), 17 deletions(-) diff --git a/frontend/src/components/Config/ConfigList.vue b/frontend/src/components/Config/ConfigList.vue index 1b03c335..7b7c7ffd 100644 --- a/frontend/src/components/Config/ConfigList.vue +++ b/frontend/src/components/Config/ConfigList.vue @@ -287,14 +287,12 @@ export default { return '' }, stageNodes () { - const elChart = document.querySelector('#process-chart') - const totalWidth = Number(getComputedStyle(elChart).width.replace('px', '')) + // const elChart = document.querySelector('#process-chart') + // const totalWidth = Number(getComputedStyle(elChart).width.replace('px', '')) const stages = Object.values(this.spiderForm.config.stages) return stages.map((stage, i) => { return { name: stage.name, - // x: i * totalWidth / stages.length, - // y: 0, ...stage } }) diff --git a/frontend/src/views/spider/SpiderList.vue b/frontend/src/views/spider/SpiderList.vue index 22563796..11884a7f 100644 --- a/frontend/src/views/spider/SpiderList.vue +++ b/frontend/src/views/spider/SpiderList.vue @@ -221,16 +221,19 @@ @@ -385,7 +388,8 @@ export default { this.$store.commit('spider/SET_SPIDER_FORM', row) this.dialogVisible = true }, - onRemove (row) { + onRemove (row, ev) { + ev.stopPropagation() this.$confirm(this.$t('Are you sure to delete this spider?'), this.$t('Notification'), { confirmButtonText: this.$t('Confirm'), cancelButtonText: this.$t('Cancel'), @@ -401,12 +405,14 @@ export default { this.$st.sendEv('爬虫', '删除') }) }, - onCrawl (row) { + onCrawl (row, ev) { + ev.stopPropagation() this.crawlConfirmDialogVisible = true this.activeSpiderId = row._id this.$st.sendEv('爬虫', '点击运行') }, - onView (row) { + onView (row, ev) { + ev.stopPropagation() this.$router.push('/spiders/' + row._id) this.$st.sendEv('爬虫', '查看') }, @@ -494,10 +500,8 @@ export default { if (!str || str.match('^0001')) return 'NA' return dayjs(str).format('YYYY-MM-DD HH:mm:ss') }, - onRowClick (row, event, column) { - if (column.label !== this.$t('Action')) { - this.onView(row) - } + onRowClick (row, column, event) { + this.onView(row, event) }, onClickTab (tab) { this.filter.type = tab.name diff --git a/frontend/src/views/task/TaskList.vue b/frontend/src/views/task/TaskList.vue index 9db3623d..3ab19fee 100644 --- a/frontend/src/views/task/TaskList.vue +++ b/frontend/src/views/task/TaskList.vue @@ -125,7 +125,7 @@ - + @@ -250,7 +250,8 @@ export default { onSelectSpider () { this.$st.sendEv('任务', '选择爬虫') }, - onRemove (row) { + onRemove (row, ev) { + ev.stopPropagation() this.$confirm(this.$t('Are you sure to delete this task?'), this.$t('Notification'), { confirmButtonText: this.$t('Confirm'), cancelButtonText: this.$t('Cancel'),