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.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openatc-components",
3
- "version": "0.2.79",
3
+ "version": "0.2.81",
4
4
  "description": "A Vue.js project",
5
5
  "author": "openatc developer",
6
6
  "private": false,
@@ -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
- // }, 1500)
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
- // this.getChannelPedStatus()
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
- this.sidewalkPhaseData.push({
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
- type: channel.light
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.type,
1199
- color: this.ColorMap.get(curPhaseStatus.type),
1200
- // phaseCountdown: curPhaseStatus.phaseCountdown,
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 () {
@@ -7,7 +7,7 @@ export default new Router({
7
7
  {
8
8
  path: '/',
9
9
  component: (resolve) => {
10
- require(['@/views/overView'], resolve)
10
+ require(['@/views/intersection'], resolve)
11
11
  }
12
12
  },
13
13
  {
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div>
3
3
  <h2 class="text">实时通道路口图</h2>
4
- <channel-intection-with-interface
4
+ <channel-realtime-intersection
5
5
  :agentId="this.agentId"
6
6
  :roadDirection="roadDirection"
7
7
  :channelRealtimeStatusData="channelRealtimeStatusData"
@@ -139,12 +139,12 @@ export default {
139
139
  return {
140
140
  roadDirection: 'right',
141
141
  // reqUrl: 'http://192.168.13.103:10003/openatc',
142
- agentId: 'tjbljml',
142
+ agentId: 'tjblfql',
143
143
  // agentId: '13013',
144
144
  // agentId: '12007_390',
145
145
  // agentId: '12014',
146
146
  reqUrl: 'http://192.168.13.103:10003/openatc',
147
- Token: 'eyJraWQiOiIxNzE4NjcyODI1MTg4IiwidHlwIjoiSldUIiwiYWxnIjoiSFMyNTYifQ.eyJzdWIiOiJhZG1pbiIsImV4cCI6MTcxODcxNjAyNSwiaWF0IjoxNzE4NjcyODI1fQ.vjEP7xqngwal74DlUwqs4FLoy-IsNphHNrbuDqzGce4',
147
+ Token: 'eyJraWQiOiIxNzE4NzU5ODA0Njc0IiwidHlwIjoiSldUIiwiYWxnIjoiSFMyNTYifQ.eyJzdWIiOiJhZG1pbiIsImV4cCI6MTcxODgwMzAwNCwiaWF0IjoxNzE4NzU5ODA0fQ.8CKosL9Yrp8h8d_op6kGHHcNXIBgNu3YhwY7JdPIKJc',
148
148
  // agentId: '30003-352',
149
149
  // reqUrl: 'https://kints-dev.devdolphin.com/openatc',
150
150
  // Token: 'eyJraWQiOiIxNjUwNTA5MDI2ODk2IiwidHlwIjoiSldUIiwiYWxnIjoiSFMyNTYifQ.eyJzdWIiOiJ4aWFvbWluZyIsImV4cCI6MTczNjkwOTAyNiwiaWF0IjoxNjUwNTA5MDI2fQ.-s4T-uMRmB2zf9yer87USKQXLY1a12Zq5lCOnqjNmfA',
@@ -216,6 +216,22 @@ export default {
216
216
  {
217
217
  'id': 7,
218
218
  'light': 3
219
+ },
220
+ {
221
+ 'id': 8,
222
+ 'light': 3
223
+ },
224
+ {
225
+ 'id': 9,
226
+ 'light': 1
227
+ },
228
+ {
229
+ 'id': 10,
230
+ 'light': 1
231
+ },
232
+ {
233
+ 'id': 11,
234
+ 'light': 3
219
235
  }
220
236
  ]
221
237
  }