55
55
</template >
56
56
</el-table-column >
57
57
58
- <el-table-column label =" 进度条" width =" 100 " align =" center" display =" none" >
58
+ <el-table-column label =" 进度条" width =" 1 " align =" center" display =" none" >
59
59
<template slot-scope="scope">
60
60
<div v-if =" scope.row.state === 0" >
61
61
<el-progress :text-inside =" true" :stroke-width =" 18" :percentage =" 0" />
72
72
</template >
73
73
</el-table-column >
74
74
75
- <el-table-column label =" 操作" width =" 200 " align =" center" >
75
+ <el-table-column label =" 操作" width =" 300 " align =" center" >
76
76
<template slot-scope="scope">
77
77
<div >
78
78
<el-button
89
89
size =" mini"
90
90
type =" success"
91
91
@click =" download(scope.$index, scope.row)" >点击下载</el-button >
92
+ <el-button
93
+ v-else-if =" scope.row.state === 5"
94
+ size =" mini"
95
+ type =" warning"
96
+ @click =" download_log(scope.$index, scope.row)" >下载已测试数据</el-button >
92
97
93
98
<el-button
94
99
size =" mini"
121
126
</template >
122
127
123
128
<script >
124
- import { getList , deleteAct , search , startTask } from ' @/api/api_excel'
129
+ import { getList , deleteAct , search , startTask , download_log } from ' @/api/api_excel'
125
130
126
131
export default {
127
132
filters: {
@@ -246,6 +251,14 @@ export default {
246
251
download (index , row ) {
247
252
window .location .href = this .url + row .finish_url
248
253
},
254
+ download_log (index , row ) {
255
+ download_log ({ id: row .id }).then (res => {
256
+ console .log (res)
257
+ if (res .code === 200 ) {
258
+ window .location .href = this .url + res .data .failed_done_file
259
+ }
260
+ })
261
+ },
249
262
fetchData () {
250
263
this .listLoading = true
251
264
const params = Object .assign ({ ' page' : this .listQuery .page }, { ' perPage' : this .perpage })
@@ -254,6 +267,7 @@ export default {
254
267
this .listLoading = false
255
268
this .total = response .data .total
256
269
this .url = response .data .appUrl
270
+ console .log (' type' , Object .prototype .toString .call (this .list ))
257
271
258
272
this .initWebSocket (8 )
259
273
})
0 commit comments