@@ -55,7 +55,6 @@ export default {
return {
activeTabName: 'overview',
handle: undefined,
- taskLog: '',
// tutorial
tourSteps: [
@@ -137,7 +136,8 @@ export default {
...mapState('task', [
'taskForm',
'taskResultsData',
- 'taskResultsTotalCount'
+ 'taskResultsTotalCount',
+ 'taskLog'
]),
...mapGetters('task', [
'taskResultsColumns'
@@ -186,11 +186,7 @@ export default {
this.$st.sendEv('任务详情', '结果', '下载CSV')
},
getTaskLog () {
- if (this.$route.params.id) {
- request.get(`/tasks/${this.$route.params.id}/log`).then(response => {
- this.taskLog = response.data.data
- })
- }
+ this.$store.dispatch('task/getTaskLog', this.$route.params.id)
}
},
created () {