openatc-components 0.4.37 → 0.4.39
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.
|
@@ -1567,13 +1567,21 @@ export default {
|
|
|
1567
1567
|
let maxNum = Math.max.apply(Math, na.map(item => { return item.length }))
|
|
1568
1568
|
let minNum = Math.min.apply(Math, na.map(item => { return item.length }))
|
|
1569
1569
|
newMax.push(maxNum)
|
|
1570
|
-
|
|
1571
|
-
newMin.push(minNum)
|
|
1572
|
-
}
|
|
1570
|
+
newMin.push(minNum)
|
|
1573
1571
|
let newmaxNum = Math.max.apply(Math, newMax)// 每组最大值
|
|
1574
1572
|
let newminNum = Math.min.apply(Math, newMin)
|
|
1575
1573
|
if (newArr.length > 1) {
|
|
1576
|
-
|
|
1574
|
+
let mapAdd = pattern.map(item => {
|
|
1575
|
+
return item.map(val => {
|
|
1576
|
+
return val.value + (val.sum ? val.sum : 0)
|
|
1577
|
+
})
|
|
1578
|
+
})
|
|
1579
|
+
let maxCycle = mapAdd.length > 0 ? mapAdd.map(item => {
|
|
1580
|
+
return item.length > 0 ? item.reduce((a, b) => {
|
|
1581
|
+
return a + b
|
|
1582
|
+
}) : 0
|
|
1583
|
+
}) : 0
|
|
1584
|
+
this.newCycle = Math.max(...maxCycle)
|
|
1577
1585
|
}
|
|
1578
1586
|
if (newmaxNum === newminNum) {
|
|
1579
1587
|
this.max = newmaxNum + newminNum
|