openatc-components 0.1.63 → 0.1.64
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.
|
@@ -161,10 +161,10 @@ export default {
|
|
|
161
161
|
computed: {
|
|
162
162
|
paddingLeft () {
|
|
163
163
|
let res = '0%'
|
|
164
|
-
if (this.newCycle && this.newCycle > 0) {
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
}
|
|
164
|
+
// if (this.newCycle && this.newCycle > 0) {
|
|
165
|
+
// let curPercent = (this.newCycle - this.syncTime) / this.newCycle
|
|
166
|
+
// res = curPercent * 100 + '%'
|
|
167
|
+
// }
|
|
168
168
|
if (this.cycle && this.cycle > 0) {
|
|
169
169
|
let curPercent = (this.cycle - this.syncTime) / (this.max ? this.max : this.cycle)
|
|
170
170
|
res = curPercent * 100 + '%'
|
|
@@ -191,6 +191,7 @@ export default {
|
|
|
191
191
|
// this.controlDatas = this.controlData
|
|
192
192
|
this.getPedPhasePos()
|
|
193
193
|
if (this.localPatternList) {
|
|
194
|
+
this.max = ''
|
|
194
195
|
let idPattern = this.localPatternList.filter(item => item.id === this.controlData.patternid)
|
|
195
196
|
if (idPattern.length === 0 || (this.controlData && this.showCondition)) {
|
|
196
197
|
this.handleTentivePatternData()
|
|
@@ -558,13 +559,13 @@ export default {
|
|
|
558
559
|
}
|
|
559
560
|
obj.split = split
|
|
560
561
|
if (ring.sum) {
|
|
561
|
-
obj.redWidth = ((currPhase.redclear + ring.sum) / cycle * 100).toFixed(3) + '%'
|
|
562
|
+
obj.redWidth = ((currPhase.redclear + ring.sum) / (this.max ? this.max : cycle) * 100).toFixed(3) + '%'
|
|
562
563
|
} else {
|
|
563
|
-
obj.redWidth = (currPhase.redclear / cycle * 100).toFixed(3) + '%'
|
|
564
|
+
obj.redWidth = (currPhase.redclear / (this.max ? this.max : cycle) * 100).toFixed(3) + '%'
|
|
564
565
|
}
|
|
565
|
-
obj.flashgreen = (currPhase.flashgreen / cycle * 100).toFixed(3) + '%'
|
|
566
|
-
obj.yellowWidth = (currPhase.yellow / cycle * 100).toFixed(3) + '%'
|
|
567
|
-
obj.greenWidth = ((split - currPhase.redclear - currPhase.yellow - currPhase.flashgreen) / cycle * 100).toFixed(3) + '%'
|
|
566
|
+
obj.flashgreen = (currPhase.flashgreen / (this.max ? this.max : cycle) * 100).toFixed(3) + '%'
|
|
567
|
+
obj.yellowWidth = (currPhase.yellow / (this.max ? this.max : cycle) * 100).toFixed(3) + '%'
|
|
568
|
+
obj.greenWidth = ((split - currPhase.redclear - currPhase.yellow - currPhase.flashgreen) / (this.max ? this.max : cycle) * 100).toFixed(3) + '%'
|
|
568
569
|
// 忽略相位不显示
|
|
569
570
|
// let mode = ring.mode
|
|
570
571
|
// if (mode !== 7) { // 忽略相位不显示
|
|
@@ -774,13 +775,13 @@ export default {
|
|
|
774
775
|
}
|
|
775
776
|
obj.split = split
|
|
776
777
|
if (ring.sum) {
|
|
777
|
-
obj.redWidth = ((currPhase.redclear + ring.sum) / cycle * 100).toFixed(3) + '%'
|
|
778
|
+
obj.redWidth = ((currPhase.redclear + ring.sum) / (this.max ? this.max : cycle) * 100).toFixed(3) + '%'
|
|
778
779
|
} else {
|
|
779
|
-
obj.redWidth = (currPhase.redclear / cycle * 100).toFixed(3) + '%'
|
|
780
|
+
obj.redWidth = (currPhase.redclear / (this.max ? this.max : cycle) * 100).toFixed(3) + '%'
|
|
780
781
|
}
|
|
781
|
-
obj.flashgreen = (currPhase.flashgreen / cycle * 100).toFixed(3) + '%'
|
|
782
|
-
obj.yellowWidth = (currPhase.yellow / cycle * 100).toFixed(3) + '%'
|
|
783
|
-
obj.greenWidth = ((split - currPhase.redclear - currPhase.yellow - currPhase.flashgreen) / cycle * 100).toFixed(3) + '%'
|
|
782
|
+
obj.flashgreen = (currPhase.flashgreen / (this.max ? this.max : cycle) * 100).toFixed(3) + '%'
|
|
783
|
+
obj.yellowWidth = (currPhase.yellow / (this.max ? this.max : cycle) * 100).toFixed(3) + '%'
|
|
784
|
+
obj.greenWidth = ((split - currPhase.redclear - currPhase.yellow - currPhase.flashgreen) / (this.max ? this.max : cycle) * 100).toFixed(3) + '%'
|
|
784
785
|
// 忽略相位不显示
|
|
785
786
|
// let mode = ring.mode
|
|
786
787
|
// if (mode !== 7) { // 忽略相位不显示
|