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 5555 </template >
5656 </el-table-column >
5757
58- <el-table-column label =" 进度条" width =" 1 " align =" center" display =" none" >
58+ <el-table-column label =" 进度条" width =" 100 " 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" />
6262 </div >
6363 <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 " />
6565 </div >
6666 <div v-else-if =" scope.row.state === 2" >
6767 <el-progress :text-inside =" true" :stroke-width =" 18" :percentage =" 100" status =" success" />
@@ -228,18 +228,20 @@ export default {
228228 // console.log(rs)
229229 },
230230 onerror () { // 连接建立失败重连
231- this .initWebSocket ()
231+ // this.initWebSocket()
232232 },
233233 onmessage (e ) { // 数据接收
234234 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)
237239 },
238240 send (Data ) {
239241 this .websock .send (Data)
240242 },
241- close (e ) { // 关闭
242- console .log (' 断开连接' , e )
243+ close () { // 关闭
244+ console .log (' 断开连接' )
243245 },
244246 download (index , row ) {
245247 window .location .href = this .url + row .finish_url
@@ -252,6 +254,8 @@ export default {
252254 this .listLoading = false
253255 this .total = response .data .total
254256 this .url = response .data .appUrl
257+
258+ this .initWebSocket (8 )
255259 })
256260 },
257261 handleEdit (index , row ) {
You can’t perform that action at this time.
0 commit comments