wangfei 6 lat temu
rodzic
commit
5aef8bd216
2 zmienionych plików z 15 dodań i 15 usunięć
  1. 1
    1
      dist/index.html
  2. 14
    14
      src/pages/system/newOrder/newOrderList/index.vue

+ 1
- 1
dist/index.html Wyświetl plik

@@ -1 +1 @@
1
-<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel=stylesheet href=//at.alicdn.com/t/font_775069_dwqa9wy3lkh.css><link rel="shortcut icon" href=favorite.ico><title>城的空间后台管理系统</title><link href=./static/css/app.2b6862742e5b7ddbd4c73a63f85dc175.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.d824a66773bc281133c0.js></script><script type=text/javascript src=./static/js/vendor.d93cccd3231f9f669168.js></script><script type=text/javascript src=./static/js/app.3be0be8da89125188ad1.js></script></body></html>
1
+<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel=stylesheet href=//at.alicdn.com/t/font_775069_dwqa9wy3lkh.css><link rel="shortcut icon" href=favorite.ico><title>城的空间后台管理系统</title><link href=./static/css/app.3b0e57e32c2c7a560985f9057266d39c.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.d824a66773bc281133c0.js></script><script type=text/javascript src=./static/js/vendor.d372c8cfdbe37ad99178.js></script><script type=text/javascript src=./static/js/app.deea2a2370b09a46e854.js></script></body></html>

+ 14
- 14
src/pages/system/newOrder/newOrderList/index.vue Wyświetl plik

@@ -98,17 +98,6 @@ export default {
98 98
     }),
99 99
     ...mapOrderState({
100 100
       businessStatus (state) {
101
-        if (!state.businessStatus) {
102
-          this.ws.close()
103
-        }
104
-
105
-        if (state.businessStatus && (this.wsID !== this.CaseId) && this.CaseId) {
106
-          this.ws.close()
107
-          this.initWebSocket()
108
-        }
109
-
110
-        this.wsID = this.CaseId
111
-
112 101
         return state.businessStatus
113 102
       }
114 103
     }),
@@ -167,8 +156,8 @@ export default {
167 156
         }
168 157
 
169 158
         // 开张, 则实时监控新单
170
-        this.getBusinessStatus(this.CaseId).then(() => {
171
-
159
+        this.getBusinessStatus(this.CaseId).then((businessStatus) => {
160
+          this.caseChange()
172 161
         })
173 162
 
174 163
         // 页面倒计时
@@ -176,6 +165,17 @@ export default {
176 165
         this.refreshList()
177 166
       })
178 167
     },
168
+    caseChange () {
169
+      if (!this.businessStatus) {
170
+        this.ws.close()
171
+      }
172
+
173
+      if (this.businessStatus && (this.wsID !== this.CaseId) && this.CaseId) {
174
+        this.ws.close()
175
+        this.initWebSocket()
176
+      }
177
+      this.wsID = this.CaseId
178
+    },
179 179
     refreshList () {
180 180
       this.interval = setInterval(() => {
181 181
         const now = (new Date()).valueOf()
@@ -267,7 +267,7 @@ export default {
267 267
       if (!newOrders || !newOrders.length) return
268 268
 
269 269
       // 放入待制作队列
270
-      this.updateList({ list: this.list.concat(newOrders) })
270
+      this.updateList({ list: this.ordersList.concat(newOrders) })
271 271
 
272 272
       // 放入待打队列
273 273
       const ps = newOrders.filter(x => x.IsIntimidate === 0).map((orders) => {