openatc-components 0.1.153 → 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 +23 -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 +23 -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()
|
|
@@ -375,12 +387,15 @@ export default {
|
|
|
375
387
|
let stageMaxCyle = stageCycleList.reduce((a, b) => {
|
|
376
388
|
return a + b
|
|
377
389
|
}, 0)
|
|
390
|
+
if (this.cycleChange) {
|
|
391
|
+
stageMaxCyle = this.max
|
|
392
|
+
}
|
|
378
393
|
this.stageLists = this.stagesChange.map(item => {
|
|
379
394
|
return {
|
|
380
395
|
...item,
|
|
381
396
|
// peddirection: this.getPed(item.phases ? item.phases : item.stages),
|
|
382
397
|
direction: this.handleStageData(item.phases ? item.phases : item.stages),
|
|
383
|
-
greenWidth: (item.
|
|
398
|
+
greenWidth: ((item.stageSplit - item.yellow - item.red) / stageMaxCyle * 100).toFixed(3) + '%',
|
|
384
399
|
yellowWidth: (item.yellow / stageMaxCyle * 100).toFixed(3) + '%',
|
|
385
400
|
redWidth: (item.red / stageMaxCyle * 100).toFixed(3) + '%'
|
|
386
401
|
}
|
|
@@ -952,6 +967,13 @@ export default {
|
|
|
952
967
|
if (newRings.length > 1) {
|
|
953
968
|
this.fillGap(ringTeams, val)
|
|
954
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
|
+
}
|
|
955
977
|
let barrier = this.step2(ringTeams, newPattern)
|
|
956
978
|
let barrierLeft = barrier.map(item => item - 0.3)// 屏障左移显示出人行横道
|
|
957
979
|
this.barrierList = barrierLeft.map(j => {
|