diff --git a/frontend/src/components/TableView/TaskTableView.vue b/frontend/src/components/TableView/TaskTableView.vue index cd2ec10c..56abfab8 100644 --- a/frontend/src/components/TableView/TaskTableView.vue +++ b/frontend/src/components/TableView/TaskTableView.vue @@ -76,6 +76,9 @@ export default { this.clicked = false }, 100) this.$router.push(`/spiders/${row.spider_id}`) + if (this.$route.path.match(/\/nodes\//)) { + this.$st.sendEv('节点详情', '概览', '查看爬虫') + } }, onClickNode (row) { this.clicked = true @@ -83,9 +86,19 @@ export default { this.clicked = false }, 100) this.$router.push(`/nodes/${row.node_id}`) + if (this.$route.path.match(/\/spiders\//)) { + this.$st.sendEv('爬虫详情', '概览', '查看节点') + } }, onClickTask (row) { - if (!this.clicked) this.$router.push(`/tasks/${row._id}`) + if (!this.clicked) { + this.$router.push(`/tasks/${row._id}`) + if (this.$route.path.match(/\/nodes\//)) { + this.$st.sendEv('节点详情', '概览', '查看任务') + } else if (this.$route.path.match(/\/spiders\//)) { + this.$st.sendEv('爬虫详情', '概览', '查看任务') + } + } }, onRefresh () { if (this.$route.path.split('/')[1] === 'spiders') { diff --git a/frontend/src/views/layout/components/TagsView.vue b/frontend/src/views/layout/components/TagsView.vue index b72d874a..1222a854 100644 --- a/frontend/src/views/layout/components/TagsView.vue +++ b/frontend/src/views/layout/components/TagsView.vue @@ -9,6 +9,7 @@ :key="tag.path" tag="span" class="tags-view-item" + @click.native="clickSelectedTag(tag)" @click.middle.native="closeSelectedTag(tag)" @contextmenu.prevent.native="openMenu(tag,$event)"> {{ $t(generateTitle(tag.title)) }} @@ -138,6 +139,9 @@ export default { }) }) }, + clickSelectedTag (tag) { + this.$st.sendEv('全局', '点击标签', tag.name) + }, closeSelectedTag (view) { this.$store.dispatch('delView', view).then(({ visitedViews }) => { if (this.isActive(view)) {