5555 </template >
5656 </el-table-column >
5757
58- <el-table-column label =" 进度条" width =" 100 " align =" center" display =" none" >
58+ <el-table-column label =" 进度条" width =" 1 " align =" center" display =" none" >
5959 <template slot-scope="scope">
6060 <div v-if =" scope.row.state === 0" >
6161 <el-progress :text-inside =" true" :stroke-width =" 18" :percentage =" 0" />
7272 </template >
7373 </el-table-column >
7474
75- <el-table-column label =" 操作" width =" 200 " align =" center" >
75+ <el-table-column label =" 操作" width =" 300 " align =" center" >
7676 <template slot-scope="scope">
7777 <div >
7878 <el-button
8989 size =" mini"
9090 type =" success"
9191 @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 >
9297
9398 <el-button
9499 size =" mini"
121126</template >
122127
123128<script >
124- import { getList , deleteAct , search , startTask } from ' @/api/api_excel'
129+ import { getList , deleteAct , search , startTask , download_log } from ' @/api/api_excel'
125130
126131export default {
127132 filters: {
@@ -246,6 +251,14 @@ export default {
246251 download (index , row ) {
247252 window .location .href = this .url + row .finish_url
248253 },
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+ },
249262 fetchData () {
250263 this .listLoading = true
251264 const params = Object .assign ({ ' page' : this .listQuery .page }, { ' perPage' : this .perpage })
@@ -254,6 +267,7 @@ export default {
254267 this .listLoading = false
255268 this .total = response .data .total
256269 this .url = response .data .appUrl
270+ console .log (' type' , Object .prototype .toString .call (this .list ))
257271
258272 this .initWebSocket (8 )
259273 })
0 commit comments