yuantianjiao 6 年之前
父節點
當前提交
0b1031f737
共有 1 個文件被更改,包括 6 次插入4 次删除
  1. 6
    4
      src/pages/system/newOrder/newOrderList/index.vue

+ 6
- 4
src/pages/system/newOrder/newOrderList/index.vue 查看文件

25
       <div class="moreFilter"></div>
25
       <div class="moreFilter"></div>
26
     </div>
26
     </div>
27
     <div class="order-list-box">
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
         <div>
29
         <div>
30
           <div style="padding:25px 20px 5px;border-bottom:2px solid #cccccc;">
30
           <div style="padding:25px 20px 5px;border-bottom:2px solid #cccccc;">
31
             <i class="iconfont icon-yinchenglogo" style="font-size:70px;color:red;position: relative;bottom: 20px;margin-right:10px;"></i>
31
             <i class="iconfont icon-yinchenglogo" style="font-size:70px;color:red;position: relative;bottom: 20px;margin-right:10px;"></i>
140
       }
140
       }
141
       clearInterval(this.interval)
141
       clearInterval(this.interval)
142
       this.GetOrdersList({ caseid: this.caseid }).then(() => {
142
       this.GetOrdersList({ caseid: this.caseid }).then(() => {
143
+        this.currentList = this.list
143
         this.getBusinessStatus(this.caseid).then(() => {
144
         this.getBusinessStatus(this.caseid).then(() => {
144
           if (this.businessStatus) {
145
           if (this.businessStatus) {
145
             this.initWebSocket()
146
             this.initWebSocket()
243
       this.websock.onclose = console.log
244
       this.websock.onclose = console.log
244
     },
245
     },
245
     websocketonmessage (e) {
246
     websocketonmessage (e) {
247
+      let that = this
246
       console.log(e)
248
       console.log(e)
247
-      let lengthOld = this.list.length
249
+      let lengthOld = this.currentList.length
248
       let lengthNew = JSON.parse(e.data).data.refreshOnlineGoodsOrders.length
250
       let lengthNew = JSON.parse(e.data).data.refreshOnlineGoodsOrders.length
249
       let newData = JSON.parse(e.data).data.refreshOnlineGoodsOrders.slice(lengthOld - lengthNew)
251
       let newData = JSON.parse(e.data).data.refreshOnlineGoodsOrders.slice(lengthOld - lengthNew)
250
       this.updateList(JSON.parse(e.data).data.refreshOnlineGoodsOrders).then(() => {
252
       this.updateList(JSON.parse(e.data).data.refreshOnlineGoodsOrders).then(() => {
251
         for (let i = 0; i < newData.length; i++) {
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
     },