更新百度统计

This commit is contained in:
marvzhang
2020-01-08 20:11:05 +08:00
parent 7d189e9567
commit aa5ae87eeb
2 changed files with 18 additions and 1 deletions

View File

@@ -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') {

View File

@@ -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)) {