mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-22 17:31:03 +01:00
download results
This commit is contained in:
@@ -56,6 +56,8 @@ export default {
|
||||
'Stop': '停止',
|
||||
'Preview': '预览',
|
||||
'Extract Fields': '提取字段',
|
||||
'Download': '下载',
|
||||
'Download CSV': '下载CSV',
|
||||
|
||||
// 主页
|
||||
'Total Tasks': '总任务数',
|
||||
|
||||
@@ -15,6 +15,11 @@
|
||||
</el-card>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('Results')" name="results">
|
||||
<div class="button-group">
|
||||
<el-button type="primary" icon="el-icon-download" @click="downloadCSV">
|
||||
{{$t('Download CSV')}}
|
||||
</el-button>
|
||||
</div>
|
||||
<general-table-view :data="taskResultsData"
|
||||
:columns="taskResultsColumns"
|
||||
:page-num="resultsPageNum"
|
||||
@@ -85,6 +90,9 @@ export default {
|
||||
this.resultsPageNum = pageNum
|
||||
this.resultsPageSize = pageSize
|
||||
this.$store.dispatch('task/getTaskResults', this.$route.params.id)
|
||||
},
|
||||
downloadCSV () {
|
||||
window.location.href = this.$request.baseUrl + '/tasks/' + this.$route.params.id + '/download_results'
|
||||
}
|
||||
},
|
||||
created () {
|
||||
@@ -121,4 +129,9 @@ export default {
|
||||
overflow-x: auto;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.button-group {
|
||||
margin-bottom: 10px;
|
||||
text-align: right;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user