openatc-components 0.3.113 → 0.3.115

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.
@@ -1037,7 +1037,7 @@ export default {
1037
1037
  }
1038
1038
  }
1039
1039
  obj.split = split
1040
- obj.cycle = this.fixCycle ? this.fixCycle : this.max ? this.max : this.newCycle
1040
+ obj.cycle = cycle
1041
1041
  if (ring.sum) {
1042
1042
  obj.sum = ring.sum
1043
1043
  obj.redWidth = ((currPhase.redclear + ring.sum) / (this.max ? this.max : cycle) * 100) + '%'
@@ -1065,6 +1065,17 @@ export default {
1065
1065
  j.value = this.controlPhase.phase.filter(item => item.id === j.id)[0].split
1066
1066
  })
1067
1067
  })
1068
+ let valSplit = val.map(item => {
1069
+ return item.map(val => {
1070
+ return val.value + (val.sum ? val.sum : 0)
1071
+ })
1072
+ })
1073
+ let splitCycle = valSplit.length > 0 ? valSplit.map(item => {
1074
+ return item.length > 0 ? item.reduce((a, b) => {
1075
+ return a + b
1076
+ }) : 0
1077
+ }) : 0
1078
+ this.fixCycle = Math.max(...splitCycle)// 每个环的周期最大值
1068
1079
  }
1069
1080
  // 按环序分组
1070
1081
  let ringlength = []
@@ -1086,7 +1097,6 @@ export default {
1086
1097
  }) : 0
1087
1098
  }) : 0
1088
1099
  let cycle = Math.max(...splitCycle)// 每个环的周期最大值
1089
- this.fixCycle = cycle// 每个环的周期最大值
1090
1100
  let newRings = ringsequence.filter(item => item)
1091
1101
  let minLength = Math.min(...ringlength)
1092
1102
  let resultArrs = [] // 环1分组
@@ -1266,7 +1276,7 @@ export default {
1266
1276
  }
1267
1277
  }
1268
1278
  obj.split = split
1269
- obj.cycle = cycle
1279
+ obj.cycle = this.fixCycle ? this.fixCycle : this.max ? this.max : this.newCycle
1270
1280
  const isZero = split - currPhase.redclear - currPhase.yellow - currPhase.flashgreen
1271
1281
  const allAdd = split + currPhase.redclear + currPhase.yellow + currPhase.flashgreen
1272
1282
  if (isZero <= 0) {