|
@@ -25,7 +25,7 @@
|
25
|
25
|
<div class="moreFilter"></div>
|
26
|
26
|
</div>
|
27
|
27
|
<div class="order-list-box">
|
28
|
|
- <div style='position:relative;' v-for="(item,index) in list" :key="index">
|
|
28
|
+ <div style='position:relative;' v-for="(item,index) in currentList" :key="index">
|
29
|
29
|
<div>
|
30
|
30
|
<div style="padding:25px 20px 5px;border-bottom:2px solid #cccccc;">
|
31
|
31
|
<i class="iconfont icon-yinchenglogo" style="font-size:70px;color:red;position: relative;bottom: 20px;margin-right:10px;"></i>
|
|
@@ -140,6 +140,7 @@ export default {
|
140
|
140
|
}
|
141
|
141
|
clearInterval(this.interval)
|
142
|
142
|
this.GetOrdersList({ caseid: this.caseid }).then(() => {
|
|
143
|
+ this.currentList = this.list
|
143
|
144
|
this.getBusinessStatus(this.caseid).then(() => {
|
144
|
145
|
if (this.businessStatus) {
|
145
|
146
|
this.initWebSocket()
|
|
@@ -243,14 +244,15 @@ export default {
|
243
|
244
|
this.websock.onclose = console.log
|
244
|
245
|
},
|
245
|
246
|
websocketonmessage (e) {
|
|
247
|
+ let that = this
|
246
|
248
|
console.log(e)
|
247
|
|
- let lengthOld = this.list.length
|
|
249
|
+ let lengthOld = this.currentList.length
|
248
|
250
|
let lengthNew = JSON.parse(e.data).data.refreshOnlineGoodsOrders.length
|
249
|
251
|
let newData = JSON.parse(e.data).data.refreshOnlineGoodsOrders.slice(lengthOld - lengthNew)
|
250
|
252
|
this.updateList(JSON.parse(e.data).data.refreshOnlineGoodsOrders).then(() => {
|
251
|
253
|
for (let i = 0; i < newData.length; i++) {
|
252
|
|
- let index = this.list.indexOf(newData[i])
|
253
|
|
- this.printPdf(`item${index}`)
|
|
254
|
+ let index = that.list.indexOf(newData[i])
|
|
255
|
+ that.printPdf(`item${index}`)
|
254
|
256
|
}
|
255
|
257
|
})
|
256
|
258
|
},
|