openatc-components 0.1.176 → 0.1.178
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.
- package/package/kisscomps/components/BoardCard/BoardCard.vue +4 -0
- package/package/kisscomps/components/PatternStatus/PatternStatus.vue +31 -5
- package/package/kissui.min.js +1 -1
- package/package.json +1 -1
- package/src/kisscomps/components/BoardCard/BoardCard.vue +4 -0
- package/src/kisscomps/components/PatternStatus/PatternStatus.vue +31 -5
- package/src/views/patternConfig.vue +6 -11
- package/src/views/schemeconfig.vue +2 -2
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
</StageStatus>
|
|
10
10
|
<PatternStatus
|
|
11
11
|
:showBarrier="showBarrier"
|
|
12
|
+
:controlPhase="controlPhase"
|
|
12
13
|
:localPatternList="localPatternList"
|
|
13
14
|
:showCondition="showCondition"
|
|
14
15
|
:contrloType="contrloType"
|
|
@@ -50,6 +51,9 @@ export default {
|
|
|
50
51
|
type: Boolean,
|
|
51
52
|
default: false
|
|
52
53
|
},
|
|
54
|
+
controlPhase: {
|
|
55
|
+
type: Object
|
|
56
|
+
},
|
|
53
57
|
localPatternList: {
|
|
54
58
|
type: Array
|
|
55
59
|
},
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
<div class="divider" :style="{'left':item, 'height':barrierHeight}"></div>
|
|
49
49
|
</div>
|
|
50
50
|
</div>
|
|
51
|
-
<div v-show="(
|
|
51
|
+
<div v-show="(this.curtime>0 && cycle && cycle>0) || (this.curtime>0 && newCycle && newCycle>0)">
|
|
52
52
|
<div class="curTimeDiv" :style="{'left':paddingLeft, 'background-color': '#299BCC'}">{{ timeNumDevide }}</div>
|
|
53
53
|
<div class="curTimeLine" :style="{'left':paddingLeft, 'height':barrierHeight}"></div>
|
|
54
54
|
</div>
|
|
@@ -112,6 +112,8 @@ export default {
|
|
|
112
112
|
sidewalkPhaseData: [],
|
|
113
113
|
// controlDatas: this.controlData,
|
|
114
114
|
max: '',
|
|
115
|
+
fixCycle: '',
|
|
116
|
+
curtime: 0,
|
|
115
117
|
stageLists: [],
|
|
116
118
|
busPhaseData: [], // 公交相位数据
|
|
117
119
|
patternInfo: []
|
|
@@ -125,6 +127,9 @@ export default {
|
|
|
125
127
|
stagesChange: {
|
|
126
128
|
type: Array
|
|
127
129
|
},
|
|
130
|
+
controlPhase: {
|
|
131
|
+
type: Object
|
|
132
|
+
},
|
|
128
133
|
contrloType: {
|
|
129
134
|
type: String
|
|
130
135
|
},
|
|
@@ -171,27 +176,38 @@ export default {
|
|
|
171
176
|
paddingLeft () {
|
|
172
177
|
let res = '0%'
|
|
173
178
|
if (this.contrloCycle > 0) {
|
|
174
|
-
let curPercent = (this.
|
|
179
|
+
let curPercent = this.curtime / (this.fixCycle ? this.fixCycle : this.max ? this.max : this.contrloCycle)
|
|
175
180
|
res = curPercent * 100 + '%'
|
|
176
181
|
}
|
|
177
182
|
if (this.cycles > 0) {
|
|
178
|
-
let curPercent = (this.
|
|
183
|
+
let curPercent = this.curtime / (this.fixCycle ? this.fixCycle : this.max ? this.max : this.contrloCycle)
|
|
179
184
|
res = curPercent * 100 + '%'
|
|
180
185
|
}
|
|
181
186
|
return res
|
|
182
187
|
},
|
|
183
188
|
timeNumDevide () {
|
|
184
189
|
if (this.contrloCycle > 0) {
|
|
185
|
-
let res = (this.contrloCycle - this.syncTime) + '/' + this.contrloCycle
|
|
190
|
+
// let res = (this.contrloCycle - this.syncTime) + '/' + this.contrloCycle
|
|
191
|
+
let res = this.curtime + '/' + (this.fixCycle ? this.fixCycle : this.max ? this.max : this.contrloCycle)
|
|
186
192
|
return res
|
|
187
193
|
}
|
|
188
194
|
if (this.cycles > 0) {
|
|
189
|
-
let res = (this.cycles - this.syncTime) + '/' + this.cycles
|
|
195
|
+
// let res = (this.cycles - this.syncTime) + '/' + this.cycles
|
|
196
|
+
let res = this.curtime + '/' + (this.fixCycle ? this.fixCycle : this.max ? this.max : this.contrloCycle)
|
|
190
197
|
return res
|
|
191
198
|
}
|
|
192
199
|
}
|
|
193
200
|
},
|
|
194
201
|
watch: {
|
|
202
|
+
controlPhase: {
|
|
203
|
+
handler: function (val, oldVal) {
|
|
204
|
+
if (this.controlPhase && this.controlPhase.curTime) {
|
|
205
|
+
this.curtime = this.controlPhase.curTime
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
// 深度观察监听
|
|
209
|
+
deep: true
|
|
210
|
+
},
|
|
195
211
|
controlData: {
|
|
196
212
|
handler: function (val, oldVal) {
|
|
197
213
|
if (this.contrloType === 'stage') {
|
|
@@ -209,6 +225,8 @@ export default {
|
|
|
209
225
|
}
|
|
210
226
|
this.handleBarrierHeight()
|
|
211
227
|
}
|
|
228
|
+
if (!this.controlData.curTime) return
|
|
229
|
+
this.curtime = this.controlData.curTime
|
|
212
230
|
},
|
|
213
231
|
// 深度观察监听
|
|
214
232
|
deep: true
|
|
@@ -855,6 +873,13 @@ export default {
|
|
|
855
873
|
},
|
|
856
874
|
handleCurrentChange (val) { // 两个ring的数据
|
|
857
875
|
if (val === null || val.length === 0) return
|
|
876
|
+
if (this.controlPhase.phase && this.controlPhase.phase[0].split) {
|
|
877
|
+
val.map(i => {
|
|
878
|
+
i.map(j => {
|
|
879
|
+
j.value = this.controlPhase.phase.filter(item => item.id === j.id)[0].split
|
|
880
|
+
})
|
|
881
|
+
})
|
|
882
|
+
}
|
|
858
883
|
// 按环序分组
|
|
859
884
|
let ringlength = []
|
|
860
885
|
let ringsequence = val.map(item => {
|
|
@@ -875,6 +900,7 @@ export default {
|
|
|
875
900
|
}) : 0
|
|
876
901
|
}) : 0
|
|
877
902
|
let cycle = Math.max(...splitCycle)// 每个环的周期最大值
|
|
903
|
+
this.fixCycle = cycle// 每个环的周期最大值
|
|
878
904
|
let newRings = ringsequence.filter(item => item)
|
|
879
905
|
let minLength = Math.min(...ringlength)
|
|
880
906
|
let resultArrs = [] // 环1分组
|