openatc-components 0.2.14 → 0.2.16
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/IntersectionMap/crossDirection/crossDiagram.vue +33 -33
- package/package/kisscomps/components/OverLap/OverLap.vue +24 -3
- package/package/kisscomps/components/PatternStatus/PatternStatus.vue +7 -9
- package/package/kisscomps/components/SchemeConfig/tentativeplancontrolmodal/index.vue +5 -2
- package/package/kissui.min.js +1 -1
- package/package.json +1 -1
- package/src/EdgeMgr/controller/crossDiagramMgr.js +1 -0
- package/src/kisscomps/components/IntersectionMap/crossDirection/crossDiagram.vue +33 -33
- package/src/kisscomps/components/OverLap/OverLap.vue +24 -3
- package/src/kisscomps/components/PatternStatus/PatternStatus.vue +7 -9
- package/src/kisscomps/components/SchemeConfig/tentativeplancontrolmodal/index.vue +5 -2
- package/static/styles/schemeconfig.scss +8 -3
package/package.json
CHANGED
|
@@ -276,9 +276,7 @@ export default {
|
|
|
276
276
|
this.phaseStatusList = val.phase
|
|
277
277
|
this.overlapStatusList = val.overlap
|
|
278
278
|
// 默认显示相位数据(包括黄闪、全红、关灯状态下,或者匝道,均不做比对跟随相位的处理)
|
|
279
|
-
this.
|
|
280
|
-
this.compSidewalkPhaseData = JSON.parse(JSON.stringify(this.sidewalkPhaseData))
|
|
281
|
-
this.comdireBusPhaseData = JSON.parse(JSON.stringify(this.busPhaseData))
|
|
279
|
+
this.drawDefaultPhaseIcon()
|
|
282
280
|
if (val.control === 1 || val.control === 2 || val.control === 3) {
|
|
283
281
|
// 黄闪、全红、关灯属于特殊控制,优先级最高,直接改变灯色,不用判断phase里的type,也不需要考虑跟随相位的灯色优先级
|
|
284
282
|
if (val.control === 1) {
|
|
@@ -387,6 +385,14 @@ export default {
|
|
|
387
385
|
this.PhaseDataModel = new PhaseDataModel(this.roadDirection)
|
|
388
386
|
this.getIntersectionInfo() // 获取路口信息
|
|
389
387
|
},
|
|
388
|
+
drawDefaultPhaseIcon () {
|
|
389
|
+
this.compLanePhaseData = JSON.parse(JSON.stringify(this.CrossDiagramMgr.compare(this.LanePhaseData, this.overlapLanePhaseData, 'type', 'nostatus')))
|
|
390
|
+
this.compSidewalkPhaseData = JSON.parse(JSON.stringify(this.CrossDiagramMgr.compare(this.sidewalkPhaseData, this.overlapsidewalkPhaseData, 'pedtype', 'nostatus')))
|
|
391
|
+
this.comdireBusPhaseData = JSON.parse(JSON.stringify(this.busPhaseData))
|
|
392
|
+
console.log(this.LanePhaseData)
|
|
393
|
+
console.log(this.overlapLanePhaseData)
|
|
394
|
+
console.log('###################', this.compLanePhaseData)
|
|
395
|
+
},
|
|
390
396
|
comparePhaseStatus () {
|
|
391
397
|
// 对比车道: 跟随相位和相位的状态数据(此处判断是为了保证被比较的数据direction都是唯一的)
|
|
392
398
|
if (!this.comdirePhaseData && !this.comdireOverlapPhaseData) {
|
|
@@ -498,39 +504,51 @@ export default {
|
|
|
498
504
|
getYellowFlashColor () {
|
|
499
505
|
// 车道相位(左行右行)
|
|
500
506
|
let curLanePhaseData = []
|
|
501
|
-
for (let i = 0; i < this.
|
|
507
|
+
for (let i = 0; i < this.compLanePhaseData.length; i++) {
|
|
502
508
|
const data = {
|
|
503
|
-
...this.
|
|
509
|
+
...this.compLanePhaseData[i],
|
|
504
510
|
type: '黄闪',
|
|
505
511
|
control: 1
|
|
506
512
|
}
|
|
507
513
|
curLanePhaseData.push(data)
|
|
508
514
|
}
|
|
509
|
-
this.
|
|
515
|
+
this.compLanePhaseData = JSON.parse(JSON.stringify(curLanePhaseData))
|
|
510
516
|
|
|
511
517
|
// 行人相位
|
|
512
518
|
let curPedStatus = []
|
|
513
|
-
for (let i = 0; i < this.
|
|
519
|
+
for (let i = 0; i < this.compSidewalkPhaseData.length; i++) {
|
|
514
520
|
const data = {
|
|
515
|
-
...this.
|
|
521
|
+
...this.compSidewalkPhaseData[i],
|
|
516
522
|
pedtype: '黄闪',
|
|
517
523
|
control: 1
|
|
518
524
|
}
|
|
519
525
|
curPedStatus.push(data)
|
|
520
526
|
}
|
|
521
|
-
this.
|
|
527
|
+
this.compSidewalkPhaseData = JSON.parse(JSON.stringify(curPedStatus))
|
|
522
528
|
|
|
523
529
|
// 公交相位
|
|
524
530
|
let curBusLanePhaseData = []
|
|
525
|
-
for (let i = 0; i < this.
|
|
531
|
+
for (let i = 0; i < this.comdireBusPhaseData.length; i++) {
|
|
526
532
|
const data = {
|
|
527
|
-
...this.
|
|
533
|
+
...this.comdireBusPhaseData[i],
|
|
528
534
|
type: '黄闪',
|
|
529
535
|
control: 1
|
|
530
536
|
}
|
|
531
537
|
curBusLanePhaseData.push(data)
|
|
532
538
|
}
|
|
533
|
-
this.
|
|
539
|
+
this.comdireBusPhaseData = JSON.parse(JSON.stringify(curBusLanePhaseData))
|
|
540
|
+
|
|
541
|
+
if (this.mainType === '103') {
|
|
542
|
+
// 匝道相位
|
|
543
|
+
if (this.LanePhaseData.length) {
|
|
544
|
+
const LanePhaseData = this.LanePhaseData.map(data => ({
|
|
545
|
+
...data,
|
|
546
|
+
type: '黄闪',
|
|
547
|
+
control: 1
|
|
548
|
+
}))
|
|
549
|
+
this.LanePhaseData = JSON.parse(JSON.stringify(LanePhaseData))
|
|
550
|
+
}
|
|
551
|
+
}
|
|
534
552
|
},
|
|
535
553
|
getPhaseStatus () {
|
|
536
554
|
// 得到车道相位状态(颜色)
|
|
@@ -666,6 +684,9 @@ export default {
|
|
|
666
684
|
// 获取匝道道路的主路和支路的相位坐标
|
|
667
685
|
this.getRampPhasePos()
|
|
668
686
|
}
|
|
687
|
+
if (!this.isVipRoute) {
|
|
688
|
+
this.drawDefaultPhaseIcon()
|
|
689
|
+
}
|
|
669
690
|
if (this.isVipRoute && this.isThirdSignal) {
|
|
670
691
|
this.LanePhaseData = this.CrossDiagramMgr.compare(this.LanePhaseData, this.overlapLanePhaseData, 'type', 'nostatus')
|
|
671
692
|
// console.log(this.LanePhaseData)
|
|
@@ -793,8 +814,6 @@ export default {
|
|
|
793
814
|
})
|
|
794
815
|
}
|
|
795
816
|
})
|
|
796
|
-
// 行人相位无,也要显示人行横道,与车道相位显示与否逻辑不同
|
|
797
|
-
// this.handleCompleteSidewalkPhase()
|
|
798
817
|
},
|
|
799
818
|
getOverlapPedPhasePos () {
|
|
800
819
|
// 行人跟随相位信息
|
|
@@ -817,25 +836,6 @@ export default {
|
|
|
817
836
|
}
|
|
818
837
|
})
|
|
819
838
|
},
|
|
820
|
-
// handleCompleteSidewalkPhase () {
|
|
821
|
-
// // 没有相位状态的车道也要显示,默认白色
|
|
822
|
-
// let hasDirIds = this.sidewalkPhaseData.map(data => data.id)
|
|
823
|
-
// let allIds = []
|
|
824
|
-
// for (let key of this.PhaseDataModel.SidePosMap.keys()) {
|
|
825
|
-
// allIds.push(key)
|
|
826
|
-
// }
|
|
827
|
-
// let diffIds = allIds.filter(function (val) { return hasDirIds.indexOf(val) === -1 })
|
|
828
|
-
// diffIds.forEach(id => {
|
|
829
|
-
// this.sidewalkPhaseData.push({
|
|
830
|
-
// key: `${this.sidewalkPhaseData.length + 1}`,
|
|
831
|
-
// phaseid: undefined, // 相位id,用于对应相位状态
|
|
832
|
-
// id,
|
|
833
|
-
// name: this.PhaseDataModel.getSidePos(id).name,
|
|
834
|
-
// left: this.PhaseDataModel.getSidePos(id).x,
|
|
835
|
-
// top: this.PhaseDataModel.getSidePos(id).y
|
|
836
|
-
// })
|
|
837
|
-
// })
|
|
838
|
-
// },
|
|
839
839
|
getCrossType () {
|
|
840
840
|
// 路口类型对应底图决策
|
|
841
841
|
if (this.mainType === '101') {
|
|
@@ -47,7 +47,8 @@ export default {
|
|
|
47
47
|
},
|
|
48
48
|
data () {
|
|
49
49
|
return {
|
|
50
|
-
overlapDatas: []
|
|
50
|
+
overlapDatas: [],
|
|
51
|
+
max: ''
|
|
51
52
|
}
|
|
52
53
|
},
|
|
53
54
|
props: {
|
|
@@ -67,6 +68,10 @@ export default {
|
|
|
67
68
|
type: Boolean,
|
|
68
69
|
default: false
|
|
69
70
|
},
|
|
71
|
+
cycleChange: {
|
|
72
|
+
type: Boolean,
|
|
73
|
+
default: true
|
|
74
|
+
},
|
|
70
75
|
cycle: {
|
|
71
76
|
type: Number
|
|
72
77
|
},
|
|
@@ -82,6 +87,13 @@ export default {
|
|
|
82
87
|
// 深度观察监听
|
|
83
88
|
deep: true
|
|
84
89
|
},
|
|
90
|
+
cycleChange: {
|
|
91
|
+
handler: function (val, oldVal) {
|
|
92
|
+
this.doAdd(this.stageList, this.overlap)
|
|
93
|
+
},
|
|
94
|
+
// 深度观察监听
|
|
95
|
+
deep: true
|
|
96
|
+
},
|
|
85
97
|
stageList: {
|
|
86
98
|
handler: function (val, oldVal) {
|
|
87
99
|
this.doAdd(this.stageList, this.overlap)
|
|
@@ -140,6 +152,15 @@ export default {
|
|
|
140
152
|
if (findItems.length) findIndexs.push(...findItems.map(m => m.key))
|
|
141
153
|
})
|
|
142
154
|
findIndexs = Array.from(new Set(findIndexs))
|
|
155
|
+
if (this.cycleChange) {
|
|
156
|
+
const globalParamModel = this.$store.getters.globalParamModel
|
|
157
|
+
let pattern = globalParamModel.getParamsByType('patternList')
|
|
158
|
+
const allCycle = pattern.map(item => item.cycle)
|
|
159
|
+
let cycle = Math.max(...allCycle)
|
|
160
|
+
this.max = cycle
|
|
161
|
+
} else {
|
|
162
|
+
this.max = ''
|
|
163
|
+
}
|
|
143
164
|
return {
|
|
144
165
|
...item,
|
|
145
166
|
peddirection: this.getPedPhasePos(item.peddirection),
|
|
@@ -150,8 +171,8 @@ export default {
|
|
|
150
171
|
...sta,
|
|
151
172
|
direction: this.getRoad(item),
|
|
152
173
|
// peddirection: this.getPedPhasePos(item.peddirection),
|
|
153
|
-
greenWidth: find ? (sta.split / this.cycle * 100).toFixed(3) + '%' : '0%',
|
|
154
|
-
redWidth: !find ? (sta.split / this.cycle * 100).toFixed(3) + '%' : '0%'
|
|
174
|
+
greenWidth: find ? (sta.split / (this.max ? this.max : this.cycle) * 100).toFixed(3) + '%' : '0%',
|
|
175
|
+
redWidth: !find ? (sta.split / (this.max ? this.max : this.cycle) * 100).toFixed(3) + '%' : '0%'
|
|
155
176
|
}
|
|
156
177
|
})
|
|
157
178
|
}
|
|
@@ -432,9 +432,9 @@ export default {
|
|
|
432
432
|
},
|
|
433
433
|
getStage () {
|
|
434
434
|
if (!this.stagesChange) return
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
let mapAdd = this.allPatternList.map(item => item.stagesList).map(item => {
|
|
435
|
+
const globalParamModel = this.$store.getters.globalParamModel
|
|
436
|
+
let pattern = globalParamModel.getParamsByType('patternList')
|
|
437
|
+
let mapAdd = (this.allPatternList ? this.allPatternList : pattern).map(item => item.stagesList).map(item => {
|
|
438
438
|
return item.map(val => {
|
|
439
439
|
return val.stageSplit ? val.stageSplit : val.split
|
|
440
440
|
})
|
|
@@ -444,7 +444,6 @@ export default {
|
|
|
444
444
|
return a + b
|
|
445
445
|
}) : 0
|
|
446
446
|
}) : 0
|
|
447
|
-
console.log(maxCycle, 'maxCycle')
|
|
448
447
|
let stageMaxCyle = Math.max(...maxCycle)// 每个环的周期最大值
|
|
449
448
|
if (!this.cycleChange) {
|
|
450
449
|
let stageCycleList = this.stagesChange.map(item => {
|
|
@@ -464,7 +463,6 @@ export default {
|
|
|
464
463
|
redWidth: (item.red / stageMaxCyle * 100).toFixed(3) + '%'
|
|
465
464
|
}
|
|
466
465
|
})
|
|
467
|
-
console.log(this.stageLists, '011')
|
|
468
466
|
},
|
|
469
467
|
getBusPos () {
|
|
470
468
|
// 公交相位信息
|
|
@@ -1052,9 +1050,9 @@ export default {
|
|
|
1052
1050
|
this.fillGap(ringTeams, val)
|
|
1053
1051
|
}
|
|
1054
1052
|
if (this.cycleChange) {
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
const allCycle =
|
|
1053
|
+
const globalParamModel = this.$store.getters.globalParamModel
|
|
1054
|
+
let pattern = globalParamModel.getParamsByType('patternList')
|
|
1055
|
+
const allCycle = pattern.map(item => item.cycle)
|
|
1058
1056
|
let cycle = Math.max(...allCycle)
|
|
1059
1057
|
this.max = cycle
|
|
1060
1058
|
} else {
|
|
@@ -1063,7 +1061,7 @@ export default {
|
|
|
1063
1061
|
let barrier = this.step2(ringTeams, newPattern)
|
|
1064
1062
|
let barrierLeft = barrier.map(item => item)// 屏障左移显示出人行横道
|
|
1065
1063
|
this.barrierList = barrierLeft.map(j => {
|
|
1066
|
-
return (j / (this.max ? this.max :
|
|
1064
|
+
return (j / (this.max ? this.max : cycle) * 100) + '%'
|
|
1067
1065
|
})
|
|
1068
1066
|
// this.barrierList.unshift(0)
|
|
1069
1067
|
}
|
|
@@ -469,6 +469,9 @@ export default {
|
|
|
469
469
|
},
|
|
470
470
|
changeStage () {
|
|
471
471
|
this.isRing = true
|
|
472
|
+
this.patternOne = this.allPatternList.filter(item => {
|
|
473
|
+
return item.id === Number(this.manualInfo.tempPatternid)
|
|
474
|
+
})
|
|
472
475
|
this.getStageCycle()
|
|
473
476
|
},
|
|
474
477
|
getStageCycle () {
|
|
@@ -849,14 +852,14 @@ export default {
|
|
|
849
852
|
setTimeout(() => {
|
|
850
853
|
this.handleStageData(currPattern)
|
|
851
854
|
this.getCycles()
|
|
852
|
-
this.patternOne[0].stagesList = this.stagesList
|
|
855
|
+
// this.patternOne[0].stagesList = this.stagesList
|
|
853
856
|
}, 50)
|
|
854
857
|
} else {
|
|
855
858
|
let currPattern = this.planPattern.rings
|
|
856
859
|
setTimeout(() => {
|
|
857
860
|
this.handleStageData(currPattern)
|
|
858
861
|
this.getCycle()
|
|
859
|
-
this.allPatternList[0].stagesList = this.stagesList
|
|
862
|
+
// this.allPatternList[0].stagesList = this.stagesList
|
|
860
863
|
}, 50)
|
|
861
864
|
}
|
|
862
865
|
},
|
|
@@ -342,12 +342,17 @@
|
|
|
342
342
|
margin: 10px auto;
|
|
343
343
|
color: $--color-text-primary;
|
|
344
344
|
}
|
|
345
|
+
.stage-panel-contener {
|
|
346
|
+
display: flex;
|
|
347
|
+
align-items: center;
|
|
348
|
+
flex-wrap: wrap;
|
|
349
|
+
}
|
|
345
350
|
.optimizetype {
|
|
346
351
|
color: $--color-text-primary;
|
|
347
352
|
}
|
|
348
|
-
.todo {
|
|
349
|
-
|
|
350
|
-
}
|
|
353
|
+
// .todo {
|
|
354
|
+
// float: left;
|
|
355
|
+
// }
|
|
351
356
|
.stage-item {
|
|
352
357
|
cursor: pointer;
|
|
353
358
|
width: 100%;
|