openatc-components 0.2.79 → 0.2.81
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/ChannelRealtimeIntersection/ChannelRealtimeIntersection.vue +2 -1
- package/package/kisscomps/components/IntersectionMap/crossDirection/crossDiagram.vue +42 -10
- package/package/kissui.min.js +1 -1
- package/package.json +1 -1
- package/src/kisscomps/components/ChannelRealtimeIntersection/ChannelRealtimeIntersection.vue +2 -1
- package/src/kisscomps/components/IntersectionMap/crossDirection/crossDiagram.vue +42 -10
- package/src/router/index.js +1 -1
- package/src/views/intersection.vue +19 -3
package/package/kisscomps/components/ChannelRealtimeIntersection/ChannelRealtimeIntersection.vue
CHANGED
|
@@ -87,8 +87,9 @@ export default {
|
|
|
87
87
|
},
|
|
88
88
|
mounted () {
|
|
89
89
|
// setTimeout(() => {
|
|
90
|
+
// 模拟
|
|
90
91
|
// this.crossStatusData = JSON.parse(JSON.stringify(this.channelRealtimeStatusData))
|
|
91
|
-
// },
|
|
92
|
+
// }, 3000)
|
|
92
93
|
this.crossStatusData = JSON.parse(JSON.stringify(this.channelRealtimeStatusData))
|
|
93
94
|
},
|
|
94
95
|
destroyed () {
|
|
@@ -281,16 +281,17 @@ export default {
|
|
|
281
281
|
this.statusData = JSON.parse(JSON.stringify(val))
|
|
282
282
|
// 默认显示相位数据(包括黄闪、全红、关灯状态下,或者匝道,均不做比对跟随相位的处理)
|
|
283
283
|
this.drawDefaultPhaseIcon()
|
|
284
|
+
|
|
284
285
|
if (this.channelType) {
|
|
286
|
+
// 通道路口图状态数据
|
|
285
287
|
this.channelStatusList = val.channellamp
|
|
286
|
-
// 显示实时通道状态
|
|
287
288
|
this.createChannelStatusMap()
|
|
288
289
|
this.getChannelPhaseStatus()
|
|
289
|
-
|
|
290
|
-
// this.getChannelCountdown()
|
|
290
|
+
this.getChannelPedStatus()
|
|
291
291
|
return
|
|
292
292
|
}
|
|
293
293
|
|
|
294
|
+
// 模版路口图状态数据
|
|
294
295
|
this.phaseStatusList = val.phase
|
|
295
296
|
this.overlapStatusList = val.overlap
|
|
296
297
|
if (val.control === 1 || val.control === 2 || val.control === 3) {
|
|
@@ -1046,12 +1047,17 @@ export default {
|
|
|
1046
1047
|
ele.realdir.forEach((dir, index) => {
|
|
1047
1048
|
// 行人相位
|
|
1048
1049
|
if (this.sidewalkDir.indexOf(dir) === -1 && this.PhaseDataModel.getSidePos(dir)) {
|
|
1049
|
-
|
|
1050
|
+
let obj = {
|
|
1050
1051
|
key: this.CrossDiagramMgr.getUniqueKey('pedphase') + `-${this.agentId}`,
|
|
1051
1052
|
channelid: ele.id, // 通道id
|
|
1052
1053
|
id: dir,
|
|
1053
1054
|
name: this.PhaseDataModel.getSidePos(dir).name
|
|
1054
|
-
}
|
|
1055
|
+
}
|
|
1056
|
+
if (this.channelType) {
|
|
1057
|
+
obj.left = this.PhaseDataModel.getSidePos(dir).x
|
|
1058
|
+
obj.top = this.PhaseDataModel.getSidePos(dir).y
|
|
1059
|
+
}
|
|
1060
|
+
this.sidewalkPhaseData.push(obj)
|
|
1055
1061
|
}
|
|
1056
1062
|
})
|
|
1057
1063
|
realpeddirarr = Array.from(new Set(realpeddirarr.concat(ele.realdir)))
|
|
@@ -1182,12 +1188,13 @@ export default {
|
|
|
1182
1188
|
this.channelStatusList.map(channel => {
|
|
1183
1189
|
let channelId = channel.id
|
|
1184
1190
|
let channelInfo = {
|
|
1185
|
-
|
|
1191
|
+
light: channel.light
|
|
1186
1192
|
}
|
|
1187
1193
|
this.channelStatusMap.set(channelId, channelInfo)
|
|
1188
1194
|
})
|
|
1189
1195
|
},
|
|
1190
1196
|
getChannelPhaseStatus () {
|
|
1197
|
+
// 通道相位机动车状态
|
|
1191
1198
|
this.comdirePhaseData = []
|
|
1192
1199
|
let curLanePhaseData = []
|
|
1193
1200
|
for (let i = 0; i < this.LanePhaseData.length; i++) {
|
|
@@ -1195,15 +1202,40 @@ export default {
|
|
|
1195
1202
|
if (!curPhaseStatus) continue
|
|
1196
1203
|
const data = {
|
|
1197
1204
|
...this.LanePhaseData[i],
|
|
1198
|
-
type: curPhaseStatus.
|
|
1199
|
-
color: this.ColorMap.get(curPhaseStatus.
|
|
1200
|
-
//
|
|
1201
|
-
flag: 'channel' // 车道相位数据标识
|
|
1205
|
+
type: curPhaseStatus.light,
|
|
1206
|
+
color: this.ColorMap.get(curPhaseStatus.light),
|
|
1207
|
+
flag: 'phasechannel' // 车道相位数据标识
|
|
1202
1208
|
}
|
|
1203
1209
|
curLanePhaseData.push(data)
|
|
1204
1210
|
}
|
|
1205
1211
|
this.LanePhaseData = JSON.parse(JSON.stringify(curLanePhaseData))
|
|
1206
1212
|
this.compLanePhaseData = JSON.parse(JSON.stringify(this.LanePhaseData))
|
|
1213
|
+
},
|
|
1214
|
+
getChannelPedStatus () {
|
|
1215
|
+
// 通道行人相位状态
|
|
1216
|
+
let curPedStatus = []
|
|
1217
|
+
for (let i = 0; i < this.sidewalkPhaseData.length; i++) {
|
|
1218
|
+
console.log(this.sidewalkPhaseData[i])
|
|
1219
|
+
if (this.sidewalkPhaseData[i].channelid) {
|
|
1220
|
+
let curPhaseStatus = this.channelStatusMap.get(this.sidewalkPhaseData[i].channelid)
|
|
1221
|
+
if (!curPhaseStatus) continue
|
|
1222
|
+
const data = {
|
|
1223
|
+
...this.sidewalkPhaseData[i],
|
|
1224
|
+
pedtype: curPhaseStatus.light,
|
|
1225
|
+
color: this.ColorMap.get(curPhaseStatus.light),
|
|
1226
|
+
flag: 'pedchannel' // 行人相位数据标识
|
|
1227
|
+
}
|
|
1228
|
+
curPedStatus.push(data)
|
|
1229
|
+
} else {
|
|
1230
|
+
// 无状态的行人道
|
|
1231
|
+
const data = {
|
|
1232
|
+
...this.sidewalkPhaseData[i],
|
|
1233
|
+
pedtype: undefined
|
|
1234
|
+
}
|
|
1235
|
+
curPedStatus.push(data)
|
|
1236
|
+
}
|
|
1237
|
+
}
|
|
1238
|
+
this.compSidewalkPhaseData = JSON.parse(JSON.stringify(curPedStatus))
|
|
1207
1239
|
}
|
|
1208
1240
|
},
|
|
1209
1241
|
mounted () {
|