|
@@ -294,51 +294,51 @@ export default {
|
294
|
294
|
|
295
|
295
|
var storedata = this.$store.getters.scheduals
|
296
|
296
|
var scheduals = storedata.scheduals
|
297
|
|
- if (Object.keys(storedata).length > 0) {
|
298
|
|
- var zoneMap = {}
|
299
|
|
- var schedualMap = {}
|
300
|
|
- for (let index = 0; index < scheduals.length; index++) {
|
301
|
|
- const schedual = scheduals[index]
|
302
|
|
- if (schedual.dialysis_order == null) {
|
303
|
|
- continue
|
304
|
|
- }
|
305
|
|
- if (schedualMap[schedual.device_number.zone.name] == null) {
|
306
|
|
- schedualMap[schedual.device_number.zone.name] = []
|
307
|
|
- }
|
308
|
|
- schedualMap[schedual.device_number.zone.name].push(schedual)
|
309
|
|
- if (zoneMap[schedual.device_number.zone.name] == null) {
|
310
|
|
- zoneMap[schedual.device_number.zone.name] =
|
311
|
|
- schedual.device_number.zone
|
312
|
|
- }
|
313
|
|
- }
|
|
297
|
+ // if (Object.keys(storedata).length > 0) {
|
|
298
|
+ // var zoneMap = {}
|
|
299
|
+ // var schedualMap = {}
|
|
300
|
+ // for (let index = 0; index < scheduals.length; index++) {
|
|
301
|
+ // const schedual = scheduals[index]
|
|
302
|
+ // if (schedual.dialysis_order == null) {
|
|
303
|
+ // continue
|
|
304
|
+ // }
|
|
305
|
+ // if (schedualMap[schedual.device_number.zone.name] == null) {
|
|
306
|
+ // schedualMap[schedual.device_number.zone.name] = []
|
|
307
|
+ // }
|
|
308
|
+ // schedualMap[schedual.device_number.zone.name].push(schedual)
|
|
309
|
+ // if (zoneMap[schedual.device_number.zone.name] == null) {
|
|
310
|
+ // zoneMap[schedual.device_number.zone.name] =
|
|
311
|
+ // schedual.device_number.zone
|
|
312
|
+ // }
|
|
313
|
+ // }
|
314
|
314
|
|
315
|
|
- var zones = []
|
316
|
|
- zones.push({ value: 0, text: '全部分区' })
|
317
|
|
- for (var zoneName in zoneMap) {
|
318
|
|
- zones.push({ value: zoneMap[zoneName].id, text: zoneName })
|
319
|
|
- }
|
|
315
|
+ // var zones = []
|
|
316
|
+ // zones.push({ value: 0, text: '全部分区' })
|
|
317
|
+ // for (var zoneName in zoneMap) {
|
|
318
|
+ // zones.push({ value: zoneMap[zoneName].id, text: zoneName })
|
|
319
|
+ // }
|
320
|
320
|
|
321
|
|
- zones = zones.sort(function (a, b) {
|
322
|
|
- return a.value > b.value
|
323
|
|
- })
|
324
|
|
- this.zones = zones
|
|
321
|
+ // zones = zones.sort(function (a, b) {
|
|
322
|
+ // return a.value > b.value
|
|
323
|
+ // })
|
|
324
|
+ // this.zones = zones
|
325
|
325
|
|
326
|
|
- var dialysis_scheduals = []
|
327
|
|
- for (let index = 0; index < zones.length; index++) {
|
328
|
|
- const zone = zones[index]
|
329
|
|
- var scheduals = schedualMap[zone.text]
|
330
|
|
- if (scheduals == null) {
|
331
|
|
- continue
|
332
|
|
- }
|
333
|
|
- dialysis_scheduals.push({
|
334
|
|
- zone_name: zone.text,
|
335
|
|
- scheduals: scheduals
|
336
|
|
- })
|
337
|
|
- }
|
338
|
|
- this.dialysis_scheduals = dialysis_scheduals
|
339
|
|
- } else {
|
|
326
|
+ // var dialysis_scheduals = []
|
|
327
|
+ // for (let index = 0; index < zones.length; index++) {
|
|
328
|
+ // const zone = zones[index]
|
|
329
|
+ // var scheduals = schedualMap[zone.text]
|
|
330
|
+ // if (scheduals == null) {
|
|
331
|
+ // continue
|
|
332
|
+ // }
|
|
333
|
+ // dialysis_scheduals.push({
|
|
334
|
+ // zone_name: zone.text,
|
|
335
|
+ // scheduals: scheduals
|
|
336
|
+ // })
|
|
337
|
+ // }
|
|
338
|
+ // this.dialysis_scheduals = dialysis_scheduals
|
|
339
|
+ // } else {
|
340
|
340
|
this.requestDialysisScheduals()
|
341
|
|
- }
|
|
341
|
+ // }
|
342
|
342
|
},
|
343
|
343
|
mounted () {
|
344
|
344
|
this.timer = window.setInterval(() => {
|