File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed
admin/src/views/api_excel Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change 55
55
</template >
56
56
</el-table-column >
57
57
58
- <el-table-column label =" 进度条" width =" 1 " align =" center" display =" none" >
58
+ <el-table-column label =" 进度条" width =" 100 " 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" />
62
62
</div >
63
63
<div v-else-if =" scope.row.state === 1" >
64
- <el-progress :text-inside =" true" :stroke-width =" 18" :percentage =" 1 " />
64
+ <el-progress :text-inside =" true" :stroke-width =" 18" :percentage =" scope.row.rate " />
65
65
</div >
66
66
<div v-else-if =" scope.row.state === 2" >
67
67
<el-progress :text-inside =" true" :stroke-width =" 18" :percentage =" 100" status =" success" />
@@ -228,18 +228,20 @@ export default {
228
228
// console.log(rs)
229
229
},
230
230
onerror () { // 连接建立失败重连
231
- this .initWebSocket ()
231
+ // this.initWebSocket()
232
232
},
233
233
onmessage (e ) { // 数据接收
234
234
console .log (e .data )
235
- const redata = JSON .parse (e .data )
236
- console .log (redata)
235
+ const data = JSON .parse (e .data )
236
+ this .list [2 ].rate = parseInt (data .data .rate )
237
+ console .log (this .list [2 ].rate )
238
+ console .log (data)
237
239
},
238
240
send (Data ) {
239
241
this .websock .send (Data)
240
242
},
241
- close (e ) { // 关闭
242
- console .log (' 断开连接' , e )
243
+ close () { // 关闭
244
+ console .log (' 断开连接' )
243
245
},
244
246
download (index , row ) {
245
247
window .location .href = this .url + row .finish_url
@@ -252,6 +254,8 @@ export default {
252
254
this .listLoading = false
253
255
this .total = response .data .total
254
256
this .url = response .data .appUrl
257
+
258
+ this .initWebSocket (8 )
255
259
})
256
260
},
257
261
handleEdit (index , row ) {
You can’t perform that action at this time.
0 commit comments