|
@@ -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) => {
|