openatc-components 0.5.44 → 0.5.46
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 +52 -38
- package/package/kisscomps/components/PatternStatus/PatternStatus.vue +1 -1
- package/package/kissui.min.js +1 -1
- package/package.json +2 -2
- package/src/kisscomps/components/IntersectionMap/crossDirection/crossDiagram.vue +52 -38
- package/src/kisscomps/components/PatternStatus/PatternStatus.vue +1 -1
- package/src/utils/RingDataModel.js +12 -10
- package/package/kisscomps/components/OptimizeKanban/index.js +0 -2
- package/package/kisscomps/components/OptimizeKanban/index.vue +0 -369
- package/package/kisscomps/components/StageOptimize/index.vue +0 -310
- package/src/node_modules/.package_versions.json +0 -1
|
@@ -433,6 +433,9 @@ export default {
|
|
|
433
433
|
},
|
|
434
434
|
methods: {
|
|
435
435
|
compareIsChangedPhase (newCrossStatus, oldCrossStatus) {
|
|
436
|
+
if (!oldCrossStatus || !newCrossStatus) return
|
|
437
|
+
if (!newCrossStatus.phase) return
|
|
438
|
+
if (!oldCrossStatus.phase) return
|
|
436
439
|
if (newCrossStatus.control === 1 || newCrossStatus.control === 2 || newCrossStatus.control === 3) return
|
|
437
440
|
// 返回的相位状态改变后,按照返回的相位状态更新路口相位显示(下个周期生效)
|
|
438
441
|
let newPhaseIds = newCrossStatus.phase.map(item => item.id)
|
|
@@ -492,7 +495,9 @@ export default {
|
|
|
492
495
|
this.getOverlapPhaseStatus()
|
|
493
496
|
this.getRoadwayLightStatus()
|
|
494
497
|
this.getCurPhaseCountdown()
|
|
495
|
-
this.
|
|
498
|
+
if (this.isHasStageCountdown) {
|
|
499
|
+
this.getCurStageCountdown()
|
|
500
|
+
}
|
|
496
501
|
this.getBusPhaseStatus()
|
|
497
502
|
if (this.mainType === '100' || this.mainType === '101' || this.mainType === '104') {
|
|
498
503
|
// 城市道路和路段行人过街才显示人行道状态
|
|
@@ -852,7 +857,7 @@ export default {
|
|
|
852
857
|
stagesList () {
|
|
853
858
|
let list = []
|
|
854
859
|
this.isHasStageCountdown = false
|
|
855
|
-
if (this.crossStatusData && this.crossStatusData.stages && this.crossInfo.phaseList && this.crossInfo.phaseList.length > 0) {
|
|
860
|
+
if (this.crossStatusData && this.crossStatusData.stages && this.crossInfo && this.crossInfo.phaseList && this.crossInfo.phaseList.length > 0) {
|
|
856
861
|
this.isHasStageCountdown = true
|
|
857
862
|
let ringDataModel = new RingDataModel(this.crossStatusData, this.crossInfo.phaseList)
|
|
858
863
|
list = ringDataModel.getStageData()
|
|
@@ -890,11 +895,14 @@ export default {
|
|
|
890
895
|
// console.log(this.stageCountdownList)
|
|
891
896
|
},
|
|
892
897
|
getshowped (peddirection) {
|
|
893
|
-
let peddirarr =
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
+
let peddirarr = []
|
|
899
|
+
if (peddirection) {
|
|
900
|
+
peddirection.map(peddir => ({
|
|
901
|
+
id: peddir,
|
|
902
|
+
name: this.PhaseDataModel.getSidePos(peddir).name,
|
|
903
|
+
color: 'rgba(255, 255, 255, 0.4)'
|
|
904
|
+
}))
|
|
905
|
+
}
|
|
898
906
|
return peddirarr
|
|
899
907
|
},
|
|
900
908
|
getIntersectionInfo () {
|
|
@@ -1025,20 +1033,22 @@ export default {
|
|
|
1025
1033
|
this.busPhaseData = []
|
|
1026
1034
|
this.crossInfo.phaseList.forEach((ele, i) => {
|
|
1027
1035
|
if (ele.controltype >= 3 && ele.controltype <= 6) {
|
|
1028
|
-
ele.direction
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1036
|
+
if (ele.direction) {
|
|
1037
|
+
ele.direction.forEach((dir, index) => {
|
|
1038
|
+
// 车道相位
|
|
1039
|
+
this.busPhaseData.push({
|
|
1040
|
+
key: this.CrossDiagramMgr.getUniqueKey('busphase'),
|
|
1041
|
+
phaseid: ele.id, // 相位id,用于对应相位状态
|
|
1042
|
+
id: dir, // 接口返回的dir字段,对应前端定义的相位方向id,唯一标识
|
|
1043
|
+
name: this.PhaseDataModel.getBusPhasePos(dir).name,
|
|
1044
|
+
left: this.PhaseDataModel.getBusPhasePos(dir).x,
|
|
1045
|
+
top: this.PhaseDataModel.getBusPhasePos(dir).y,
|
|
1046
|
+
busleft: this.PhaseDataModel.getBusMapPos(dir).x,
|
|
1047
|
+
bustop: this.PhaseDataModel.getBusMapPos(dir).y,
|
|
1048
|
+
controltype: ele.controltype
|
|
1049
|
+
})
|
|
1040
1050
|
})
|
|
1041
|
-
}
|
|
1051
|
+
}
|
|
1042
1052
|
}
|
|
1043
1053
|
})
|
|
1044
1054
|
// 去掉重复方向的数据
|
|
@@ -1055,17 +1065,19 @@ export default {
|
|
|
1055
1065
|
this.LanePhaseData = []
|
|
1056
1066
|
this.crossInfo.phaseList.forEach((ele, i) => {
|
|
1057
1067
|
if (ele.controltype === undefined || ele.controltype <= 2) {
|
|
1058
|
-
ele.direction
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1068
|
+
if (ele.direction) {
|
|
1069
|
+
ele.direction.forEach((dir, index) => {
|
|
1070
|
+
// 车道相位
|
|
1071
|
+
this.LanePhaseData.push({
|
|
1072
|
+
key: this.CrossDiagramMgr.getUniqueKey('phase'),
|
|
1073
|
+
phaseid: ele.id, // 相位id,用于对应相位状态
|
|
1074
|
+
id: dir, // 接口返回的dir字段,对应前端定义的相位方向id,唯一标识
|
|
1075
|
+
name: this.PhaseDataModel.getPhase(dir).name,
|
|
1076
|
+
left: this.PhaseDataModel.getPhase(dir).x,
|
|
1077
|
+
top: this.PhaseDataModel.getPhase(dir).y
|
|
1078
|
+
})
|
|
1067
1079
|
})
|
|
1068
|
-
}
|
|
1080
|
+
}
|
|
1069
1081
|
}
|
|
1070
1082
|
})
|
|
1071
1083
|
// 去掉重复方向的数据
|
|
@@ -1098,14 +1110,16 @@ export default {
|
|
|
1098
1110
|
// 匝道车道相位信息
|
|
1099
1111
|
this.LanePhaseData = []
|
|
1100
1112
|
this.crossInfo.phaseList.forEach((ele, i) => {
|
|
1101
|
-
ele.direction
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1113
|
+
if (ele.direction) {
|
|
1114
|
+
ele.direction.forEach((dir, index) => {
|
|
1115
|
+
if (ele.controltype === 0) {
|
|
1116
|
+
this.handleRampPhasePosData(`${i}-${index}`, ele, dir, this.PhaseDataModel.getMainPhasePos)
|
|
1117
|
+
}
|
|
1118
|
+
if (ele.controltype === 1) {
|
|
1119
|
+
this.handleRampPhasePosData(`${i}-${index}`, ele, dir, this.PhaseDataModel.getSidePhasePos)
|
|
1120
|
+
}
|
|
1121
|
+
})
|
|
1122
|
+
}
|
|
1109
1123
|
})
|
|
1110
1124
|
// 去掉重复方向的数据
|
|
1111
1125
|
this.LanePhaseData = Array.from(new Set(this.LanePhaseData.map(item => item.id)))
|
|
@@ -698,7 +698,7 @@ export default {
|
|
|
698
698
|
let currPhase = this.phaseList.filter((item) => {
|
|
699
699
|
return item.id === stg
|
|
700
700
|
})[0]
|
|
701
|
-
if (currPhase !== undefined
|
|
701
|
+
if (currPhase !== undefined) {
|
|
702
702
|
directionList.push(...currPhase.direction)
|
|
703
703
|
directionList = Array.from(new Set(directionList))
|
|
704
704
|
}
|