openatc-components 0.0.31 → 0.0.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -384,6 +384,7 @@ export default {
384
384
  })
385
385
  },
386
386
  handlePatternData () {
387
+ if (!this.controlData) return
387
388
  this.newList = []
388
389
  if (Object.keys(this.controlData).length === 0 || this.phaseList.length === 0) return
389
390
  if (!this.controlData.phase) return
@@ -154,7 +154,7 @@ export default {
154
154
  type: Array
155
155
  },
156
156
  planPattern: {
157
- type: Array
157
+ type: Object
158
158
  },
159
159
  allPatternList: {
160
160
  type: Array
@@ -574,7 +574,7 @@ export default {
574
574
  }
575
575
  if (!this.realtimeStatusModalvisible) {
576
576
  console.log(control)
577
- this.$emit('patternCommit', control)
577
+ this.$emit('patternCommitCallback', control)
578
578
  return
579
579
  }
580
580
  this.lockScreen()
@@ -695,7 +695,7 @@ export default {
695
695
  },
696
696
  closePhaseControl (controldata) {
697
697
  if (!this.realtimeStatusModalvisible) {
698
- this.$emit('closePhaseControl', controldata)
698
+ this.$emit('patternCommitCallback', controldata)
699
699
  return
700
700
  }
701
701
  this.lockScreen()
@@ -48,16 +48,16 @@
48
48
  </el-row>
49
49
  <el-row>
50
50
  <div class="title" style="margin-top:18px; margin-bottom:10px">{{$t('openatccomponents.overview.patternstate')}}:
51
- <span>({{$t('openatccomponents.overview.cycle')}}: {{patternOne.length===0?allPatternList[0].cycle:patternOne[0].cycle}} {{$t('openatccomponents.overview.patternoffset')}}: {{controlData.patternoffset}})</span>
51
+ <span>({{$t('openatccomponents.overview.cycle')}}: {{patternOne.length===0?planPattern.cycle:patternOne[0].cycle}} {{$t('openatccomponents.overview.patternoffset')}}: {{planPattern.offset}})</span>
52
52
  </div>
53
53
  <stage-status
54
- :patternStatusList="patternOne.length===0?allPatternList[0].rings:patternOne[0].rings"
54
+ :patternStatusList="patternOne.length===0?planPattern.rings:patternOne[0].rings"
55
55
  >
56
56
  </stage-status>
57
57
  <pattern-list
58
- :patternList="patternOne.length===0?allPatternList:patternOne"
59
- :patternStatusList="patternOne.length===0?allPatternList[0].rings:patternOne[0].rings"
60
- :cycles="patternOne.length===0?allPatternList[0].cycle:patternOne[0].cycle"
58
+ :patternList="patternOne.length===0?planPattern.rings:patternOne"
59
+ :patternStatusList="patternOne.length===0?planPattern.rings:patternOne[0].rings"
60
+ :cycles="patternOne.length===0?planPattern.cycle:patternOne[0].cycle"
61
61
  :phaseList="phaseList">
62
62
  </pattern-list>
63
63
  </el-row>
@@ -72,7 +72,7 @@
72
72
  :key="n" class="closephasekanban"
73
73
  :index="n"
74
74
  :options="patternOne.length===0?allPatternList[0].options:patternOne[0].options"
75
- :list="patternOne.length===0?planPattern[n-1]:patternOne[0].rings[n-1]"
75
+ :list="patternOne.length===0?planPattern.rings[n-1]:patternOne[0].rings[n-1]"
76
76
  :phaseList="phaseList"
77
77
  :header-text="$t('openatccomponents.pattern.ring')+n"
78
78
  @handleSplit="handleSplit">
@@ -110,7 +110,7 @@
110
110
  class="closephasekanban"
111
111
  :options="patternOne.length===0?allPatternList[0].options:patternOne[0].options"
112
112
  :header-text="$t('openatccomponents.pattern.ring')+j"
113
- :list="patternOne.length===0?allPatternList[0].rings[j-1]:patternOne[0].rings[j-1]"
113
+ :list="patternOne.length===0?planPattern.rings[j-1]:patternOne[0].rings[j-1]"
114
114
  >
115
115
  </expend-config>
116
116
  <!-- </el-col> -->
@@ -140,7 +140,7 @@
140
140
  :overlap="overlap"
141
141
  :checked="true"
142
142
  :tentative="true"
143
- :cycle="patternOne.length===0?allPatternList[0].cycle:patternOne[0].cycle"
143
+ :cycle="patternOne.length===0?planPattern.cycle:patternOne[0].cycle"
144
144
  >
145
145
  </over-lap>
146
146
  </el-col>
@@ -175,7 +175,7 @@ export default {
175
175
  // type: Array
176
176
  // }
177
177
  planPattern: {
178
- type: Array
178
+ type: Object
179
179
  },
180
180
  patternSelect: {
181
181
  type: Array
@@ -205,9 +205,9 @@ export default {
205
205
  // }, {
206
206
  // value: 3
207
207
  // }],
208
- options: {
209
- group: 'pattern'
210
- },
208
+ // options: {
209
+ // group: 'pattern'
210
+ // },
211
211
  // overlap: [
212
212
  // {
213
213
  // 'id': 1,
@@ -303,145 +303,149 @@ export default {
303
303
  ringCounts: 1,
304
304
  coordphaseOption: [],
305
305
  patternOne: [],
306
- // planPattern: [
307
- // [
308
- // {
309
- // 'name': 'Phase 1',
310
- // 'desc': [
311
- // {
312
- // 'id': 13,
313
- // 'color': '#454545'
314
- // }
315
- // ],
316
- // 'id': 1,
317
- // 'value': 30,
318
- // 'mode': 2,
319
- // 'options': [],
320
- // 'delaystart': 0,
321
- // 'advanceend': 0
322
- // },
323
- // {
324
- // 'name': 'Phase 2',
325
- // 'desc': [
326
- // {
327
- // 'id': 3,
328
- // 'color': '#454545'
329
- // },
330
- // {
331
- // 'id': 12,
332
- // 'color': '#454545'
333
- // }
334
- // ],
335
- // 'id': 2,
336
- // 'value': 30,
337
- // 'mode': 2,
338
- // 'options': [],
339
- // 'delaystart': 0,
340
- // 'advanceend': 0
341
- // },
342
- // {
343
- // 'name': 'Phase 3',
344
- // 'desc': [
345
- // {
346
- // 'id': 1,
347
- // 'color': '#454545'
348
- // }
349
- // ],
350
- // 'id': 3,
351
- // 'value': 30,
352
- // 'mode': 2,
353
- // 'options': [],
354
- // 'delaystart': 0,
355
- // 'advanceend': 0
356
- // },
357
- // {
358
- // 'name': 'Phase 4',
359
- // 'desc': [
360
- // {
361
- // 'id': 6,
362
- // 'color': '#454545'
363
- // },
364
- // {
365
- // 'id': 8,
366
- // 'color': '#454545'
367
- // }
368
- // ],
369
- // 'id': 4,
370
- // 'value': 30,
371
- // 'mode': 2,
372
- // 'options': [],
373
- // 'delaystart': 0,
374
- // 'advanceend': 0
375
- // }
376
- // ],
377
- // [
378
- // {
379
- // 'name': 'Phase 5',
380
- // 'desc': [
381
- // {
382
- // 'id': 9,
383
- // 'color': '#454545'
384
- // }
385
- // ],
386
- // 'id': 5,
387
- // 'value': 30,
388
- // 'mode': 2,
389
- // 'options': [],
390
- // 'delaystart': 0,
391
- // 'advanceend': 0
392
- // },
393
- // {
394
- // 'name': 'Phase 6',
395
- // 'desc': [
396
- // {
397
- // 'id': 14,
398
- // 'color': '#454545'
399
- // },
400
- // {
401
- // 'id': 16,
402
- // 'color': '#454545'
403
- // }
404
- // ],
405
- // 'id': 6,
406
- // 'value': 30,
407
- // 'mode': 2,
408
- // 'options': [],
409
- // 'delaystart': 0,
410
- // 'advanceend': 0
411
- // },
412
- // {
413
- // 'name': 'Phase 7',
414
- // 'desc': [],
415
- // 'id': 7,
416
- // 'value': 30,
417
- // 'mode': 2,
418
- // 'options': [],
419
- // 'delaystart': 0,
420
- // 'advanceend': 0
421
- // },
422
- // {
423
- // 'name': 'Phase 8',
424
- // 'desc': [
425
- // {
426
- // 'id': 2,
427
- // 'color': '#454545'
428
- // },
429
- // {
430
- // 'id': 4,
431
- // 'color': '#454545'
432
- // }
433
- // ],
434
- // 'id': 8,
435
- // 'value': 30,
436
- // 'mode': 2,
437
- // 'options': [],
438
- // 'delaystart': 0,
439
- // 'advanceend': 0
440
- // }
441
- // ],
442
- // [],
443
- // []
444
- // ],
306
+ // planPattern: {
307
+ // cycle: 120,
308
+ // offset: 0,
309
+ // rings: [
310
+ // [
311
+ // {
312
+ // 'name': 'Phase 1',
313
+ // 'desc': [
314
+ // {
315
+ // 'id': 13,
316
+ // 'color': '#454545'
317
+ // }
318
+ // ],
319
+ // 'id': 1,
320
+ // 'value': 30,
321
+ // 'mode': 2,
322
+ // 'options': [],
323
+ // 'delaystart': 0,
324
+ // 'advanceend': 0
325
+ // },
326
+ // {
327
+ // 'name': 'Phase 2',
328
+ // 'desc': [
329
+ // {
330
+ // 'id': 3,
331
+ // 'color': '#454545'
332
+ // },
333
+ // {
334
+ // 'id': 12,
335
+ // 'color': '#454545'
336
+ // }
337
+ // ],
338
+ // 'id': 2,
339
+ // 'value': 30,
340
+ // 'mode': 2,
341
+ // 'options': [],
342
+ // 'delaystart': 0,
343
+ // 'advanceend': 0
344
+ // },
345
+ // {
346
+ // 'name': 'Phase 3',
347
+ // 'desc': [
348
+ // {
349
+ // 'id': 1,
350
+ // 'color': '#454545'
351
+ // }
352
+ // ],
353
+ // 'id': 3,
354
+ // 'value': 30,
355
+ // 'mode': 2,
356
+ // 'options': [],
357
+ // 'delaystart': 0,
358
+ // 'advanceend': 0
359
+ // },
360
+ // {
361
+ // 'name': 'Phase 4',
362
+ // 'desc': [
363
+ // {
364
+ // 'id': 6,
365
+ // 'color': '#454545'
366
+ // },
367
+ // {
368
+ // 'id': 8,
369
+ // 'color': '#454545'
370
+ // }
371
+ // ],
372
+ // 'id': 4,
373
+ // 'value': 30,
374
+ // 'mode': 2,
375
+ // 'options': [],
376
+ // 'delaystart': 0,
377
+ // 'advanceend': 0
378
+ // }
379
+ // ],
380
+ // [
381
+ // {
382
+ // 'name': 'Phase 5',
383
+ // 'desc': [
384
+ // {
385
+ // 'id': 9,
386
+ // 'color': '#454545'
387
+ // }
388
+ // ],
389
+ // 'id': 5,
390
+ // 'value': 30,
391
+ // 'mode': 2,
392
+ // 'options': [],
393
+ // 'delaystart': 0,
394
+ // 'advanceend': 0
395
+ // },
396
+ // {
397
+ // 'name': 'Phase 6',
398
+ // 'desc': [
399
+ // {
400
+ // 'id': 14,
401
+ // 'color': '#454545'
402
+ // },
403
+ // {
404
+ // 'id': 16,
405
+ // 'color': '#454545'
406
+ // }
407
+ // ],
408
+ // 'id': 6,
409
+ // 'value': 30,
410
+ // 'mode': 2,
411
+ // 'options': [],
412
+ // 'delaystart': 0,
413
+ // 'advanceend': 0
414
+ // },
415
+ // {
416
+ // 'name': 'Phase 7',
417
+ // 'desc': [],
418
+ // 'id': 7,
419
+ // 'value': 30,
420
+ // 'mode': 2,
421
+ // 'options': [],
422
+ // 'delaystart': 0,
423
+ // 'advanceend': 0
424
+ // },
425
+ // {
426
+ // 'name': 'Phase 8',
427
+ // 'desc': [
428
+ // {
429
+ // 'id': 2,
430
+ // 'color': '#454545'
431
+ // },
432
+ // {
433
+ // 'id': 4,
434
+ // 'color': '#454545'
435
+ // }
436
+ // ],
437
+ // 'id': 8,
438
+ // 'value': 30,
439
+ // 'mode': 2,
440
+ // 'options': [],
441
+ // 'delaystart': 0,
442
+ // 'advanceend': 0
443
+ // }
444
+ // ],
445
+ // [],
446
+ // []
447
+ // ]
448
+ // },
445
449
  // allPatternList: [
446
450
  // {
447
451
  // 'id': 1,
@@ -1174,7 +1178,7 @@ export default {
1174
1178
  },
1175
1179
  created () {
1176
1180
  if (this.patternOne.length === 0) {
1177
- this.handleStageData(this.planPattern)
1181
+ this.handleStageData(this.planPattern.rings)
1178
1182
  }
1179
1183
  this.initData()
1180
1184
  },
@@ -1243,6 +1247,21 @@ export default {
1243
1247
  this.patternOne = this.allPatternList.filter(item => {
1244
1248
  return item.id === this.manualInfo.tempPatternid
1245
1249
  })
1250
+ for (let rings of this.patternOne[0].rings) {
1251
+ if (rings.length === 0) continue
1252
+ for (let ring of rings) {
1253
+ if (ring.value === 0) continue
1254
+ let currPhase = this.phaseList.filter((item) => {
1255
+ return item.id === ring.id
1256
+ })[0]
1257
+ ring.desc = currPhase.direction.map(item => {
1258
+ return {
1259
+ id: item,
1260
+ color: '#454545'
1261
+ }
1262
+ })
1263
+ }
1264
+ }
1246
1265
  this.handleStageData(this.patternOne[0].rings)
1247
1266
  },
1248
1267
  handleStageData (rings) { // stagesList