openatc-components 0.1.152 → 0.1.154
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 +5 -0
- package/package/kisscomps/components/PatternStatus/PatternStatus.vue +24 -1
- package/package/kissui.min.js +1 -1
- package/package.json +1 -1
- package/src/kisscomps/components/BoardCard/BoardCard.vue +5 -0
- package/src/kisscomps/components/PatternStatus/PatternStatus.vue +24 -1
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
:showCondition="showCondition"
|
|
14
14
|
:contrloType="contrloType"
|
|
15
15
|
:stagesChange="stagesChange"
|
|
16
|
+
:cycleChange="cycleChange"
|
|
16
17
|
:patternList="patternList"
|
|
17
18
|
:agentId="agentId"
|
|
18
19
|
:controlData="controlData"
|
|
@@ -45,6 +46,10 @@ export default {
|
|
|
45
46
|
contrloType: {
|
|
46
47
|
type: String
|
|
47
48
|
},
|
|
49
|
+
cycleChange: {
|
|
50
|
+
type: Boolean,
|
|
51
|
+
default: false
|
|
52
|
+
},
|
|
48
53
|
localPatternList: {
|
|
49
54
|
type: Array
|
|
50
55
|
},
|
|
@@ -118,6 +118,10 @@ export default {
|
|
|
118
118
|
}
|
|
119
119
|
},
|
|
120
120
|
props: {
|
|
121
|
+
cycleChange: {
|
|
122
|
+
type: Boolean,
|
|
123
|
+
default: false
|
|
124
|
+
},
|
|
121
125
|
stagesChange: {
|
|
122
126
|
type: Array
|
|
123
127
|
},
|
|
@@ -201,6 +205,14 @@ export default {
|
|
|
201
205
|
// 深度观察监听
|
|
202
206
|
deep: true
|
|
203
207
|
},
|
|
208
|
+
cycleChange: {
|
|
209
|
+
handler: function (val, oldVal) {
|
|
210
|
+
this.handleCurrentChange(this.patternStatusList)
|
|
211
|
+
this.handleBarrierHeight()
|
|
212
|
+
},
|
|
213
|
+
// 深度观察监听
|
|
214
|
+
deep: true
|
|
215
|
+
},
|
|
204
216
|
phaseList: {
|
|
205
217
|
handler: function (val, oldVal) {
|
|
206
218
|
this.getPedPhasePos()
|
|
@@ -292,6 +304,7 @@ export default {
|
|
|
292
304
|
let currPhase = this.phaseList.filter((item) => {
|
|
293
305
|
return item.id === stg
|
|
294
306
|
})[0]
|
|
307
|
+
if (!currPhase) return
|
|
295
308
|
if (!currPhase.peddirection) return
|
|
296
309
|
for (let walk of this.sidewalkPhaseData) {
|
|
297
310
|
for (let ped of currPhase.peddirection) {
|
|
@@ -374,12 +387,15 @@ export default {
|
|
|
374
387
|
let stageMaxCyle = stageCycleList.reduce((a, b) => {
|
|
375
388
|
return a + b
|
|
376
389
|
}, 0)
|
|
390
|
+
if (this.cycleChange) {
|
|
391
|
+
stageMaxCyle = this.max
|
|
392
|
+
}
|
|
377
393
|
this.stageLists = this.stagesChange.map(item => {
|
|
378
394
|
return {
|
|
379
395
|
...item,
|
|
380
396
|
// peddirection: this.getPed(item.phases ? item.phases : item.stages),
|
|
381
397
|
direction: this.handleStageData(item.phases ? item.phases : item.stages),
|
|
382
|
-
greenWidth: (item.
|
|
398
|
+
greenWidth: ((item.stageSplit - item.yellow - item.red) / stageMaxCyle * 100).toFixed(3) + '%',
|
|
383
399
|
yellowWidth: (item.yellow / stageMaxCyle * 100).toFixed(3) + '%',
|
|
384
400
|
redWidth: (item.red / stageMaxCyle * 100).toFixed(3) + '%'
|
|
385
401
|
}
|
|
@@ -951,6 +967,13 @@ export default {
|
|
|
951
967
|
if (newRings.length > 1) {
|
|
952
968
|
this.fillGap(ringTeams, val)
|
|
953
969
|
}
|
|
970
|
+
if (this.cycleChange) {
|
|
971
|
+
const globalParamModel = this.$store.getters.globalParamModel
|
|
972
|
+
let pattern = globalParamModel.getParamsByType('patternList')
|
|
973
|
+
const allCycle = pattern.map(item => item.cycle)
|
|
974
|
+
let cycle = Math.max(...allCycle)
|
|
975
|
+
this.max = cycle
|
|
976
|
+
}
|
|
954
977
|
let barrier = this.step2(ringTeams, newPattern)
|
|
955
978
|
let barrierLeft = barrier.map(item => item - 0.3)// 屏障左移显示出人行横道
|
|
956
979
|
this.barrierList = barrierLeft.map(j => {
|