updated stats

This commit is contained in:
Marvin Zhang
2019-08-05 20:06:17 +08:00
parent 5bc7085edb
commit 5c189485a2
4 changed files with 17 additions and 4 deletions

View File

@@ -29,7 +29,7 @@
<el-input v-model="spiderForm.col" :placeholder="$t('Results Collection')"
:disabled="isView"></el-input>
</el-form-item>
<el-form-item :label="$t('Site')">
<el-form-item v-if="false" :label="$t('Site')">
<el-autocomplete v-model="spiderForm.site"
:placeholder="$t('Site')"
:fetch-suggestions="fetchSiteSuggestions"

View File

@@ -78,7 +78,7 @@ export default {
this.$refs['spider-stats'].update()
}, 0)
}
this.$st.sendEv('爬虫详情', '切换标签', 'tabName', tab.name)
this.$st.sendEv('爬虫详情', '切换标签', tab.name)
},
onSpiderChange (id) {
this.$router.push(`/spiders/${id}`)

View File

@@ -83,7 +83,7 @@ export default {
},
methods: {
onTabClick (tab) {
this.$st.sendEv('任务详情', '切换标签', 'tabName', tab.name)
this.$st.sendEv('任务详情', '切换标签', tab.name)
},
onSpiderChange (id) {
this.$router.push(`/spiders/${id}`)

View File

@@ -36,7 +36,9 @@
<el-table :data="filteredTableData"
class="table"
:header-cell-style="{background:'rgb(48, 65, 86)',color:'white'}"
border>
border
@row-click="onRowClick"
>
<template v-for="col in columns">
<el-table-column v-if="col.name === 'spider_name'"
:key="col.name"
@@ -295,6 +297,11 @@ export default {
getTotalDuration (row) {
if (row.finish_ts.match('^0001')) return 'NA'
return dayjs(row.finish_ts).diff(row.create_ts, 'second')
},
onRowClick (row, event, column) {
if (column.label !== this.$t('Action')) {
this.onView(row)
}
}
},
created () {
@@ -362,3 +369,9 @@ export default {
text-align: right;
}
</style>
<style scoped>
.el-table >>> tr {
cursor: pointer;
}
</style>