openatc-components 0.2.8 → 0.2.10

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.
@@ -13,6 +13,7 @@
13
13
  :localPatternList="localPatternList"
14
14
  :showCondition="showCondition"
15
15
  :contrloType="contrloType"
16
+ :allPatternList="allPatternList"
16
17
  :stagesChange="stagesChange"
17
18
  :cycleChange="cycleChange"
18
19
  :patternList="patternList"
@@ -54,6 +55,9 @@ export default {
54
55
  controlPhase: {
55
56
  type: Object
56
57
  },
58
+ allPatternList: {
59
+ type: Array
60
+ },
57
61
  localPatternList: {
58
62
  type: Array
59
63
  },
@@ -144,6 +144,9 @@ export default {
144
144
  type: Boolean,
145
145
  default: false
146
146
  },
147
+ allPatternList: {
148
+ type: Array
149
+ },
147
150
  localPatternList: {
148
151
  type: Array
149
152
  },
@@ -429,11 +432,11 @@ export default {
429
432
  },
430
433
  getStage () {
431
434
  if (!this.stagesChange) return
432
- const globalParamModel = this.$store.getters.globalParamModel
433
- let pattern = globalParamModel.getParamsByType('patternList')
434
- let mapAdd = pattern.map(item => item.stagesList).map(item => {
435
+ // const globalParamModel = this.$store.getters.globalParamModel
436
+ // let pattern = globalParamModel.getParamsByType('patternList')
437
+ let mapAdd = this.allPatternList.map(item => item.stagesList).map(item => {
435
438
  return item.map(val => {
436
- return val.stageSplit
439
+ return val.stageSplit ? val.stageSplit : val.split
437
440
  })
438
441
  })
439
442
  let maxCycle = mapAdd.length > 0 ? mapAdd.map(item => {
@@ -441,6 +444,7 @@ export default {
441
444
  return a + b
442
445
  }) : 0
443
446
  }) : 0
447
+ console.log(maxCycle, 'maxCycle')
444
448
  let stageMaxCyle = Math.max(...maxCycle)// 每个环的周期最大值
445
449
  if (!this.cycleChange) {
446
450
  let stageCycleList = this.stagesChange.map(item => {
@@ -460,6 +464,7 @@ export default {
460
464
  redWidth: (item.red / stageMaxCyle * 100).toFixed(3) + '%'
461
465
  }
462
466
  })
467
+ console.log(this.stageLists, '011')
463
468
  },
464
469
  getBusPos () {
465
470
  // 公交相位信息
@@ -1046,9 +1051,9 @@ export default {
1046
1051
  this.fillGap(ringTeams, val)
1047
1052
  }
1048
1053
  if (this.cycleChange) {
1049
- const globalParamModel = this.$store.getters.globalParamModel
1050
- let pattern = globalParamModel.getParamsByType('patternList')
1051
- const allCycle = pattern.map(item => item.cycle)
1054
+ // const globalParamModel = this.$store.getters.globalParamModel
1055
+ // let pattern = globalParamModel.getParamsByType('patternList')
1056
+ const allCycle = this.patternList.map(item => item.cycle)
1052
1057
  let cycle = Math.max(...allCycle)
1053
1058
  this.max = cycle
1054
1059
  } else {