openatc-components 0.1.189 → 0.1.191

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.
Files changed (83) hide show
  1. package/package/kisscomps/components/DirectionListConfiguration/DirectionListConfiguration.vue +436 -0
  2. package/package/kisscomps/components/DirectionListConfiguration/index.js +2 -0
  3. package/package/kisscomps/components/DirectionListConfiguration/svg/ped-east-bottom.vue +41 -0
  4. package/package/kisscomps/components/DirectionListConfiguration/svg/ped-east-top.vue +60 -0
  5. package/package/kisscomps/components/DirectionListConfiguration/svg/ped-ewped.vue +105 -0
  6. package/package/kisscomps/components/DirectionListConfiguration/svg/ped-north-left.vue +60 -0
  7. package/package/kisscomps/components/DirectionListConfiguration/svg/ped-north-right.vue +60 -0
  8. package/package/kisscomps/components/DirectionListConfiguration/svg/ped-pedeastward.vue +35 -0
  9. package/package/kisscomps/components/DirectionListConfiguration/svg/ped-pednorthward.vue +30 -0
  10. package/package/kisscomps/components/DirectionListConfiguration/svg/ped-pedsouthward.vue +35 -0
  11. package/package/kisscomps/components/DirectionListConfiguration/svg/ped-pedwestward.vue +41 -0
  12. package/package/kisscomps/components/DirectionListConfiguration/svg/ped-snped.vue +105 -0
  13. package/package/kisscomps/components/DirectionListConfiguration/svg/ped-south-left.vue +60 -0
  14. package/package/kisscomps/components/DirectionListConfiguration/svg/ped-south-right.vue +60 -0
  15. package/package/kisscomps/components/DirectionListConfiguration/svg/ped-west-bottom.vue +60 -0
  16. package/package/kisscomps/components/DirectionListConfiguration/svg/ped-west-top.vue +60 -0
  17. package/package/kisscomps/components/DirectionListConfiguration/svg/ped-xlped.vue +30 -0
  18. package/package/kisscomps/components/DirectionListConfiguration/svg/ped-xrped.vue +30 -0
  19. package/package/kisscomps/components/DirectionListConfiguration/svg/pedSvg.vue +78 -0
  20. package/package/kisscomps/components/IntersectionDirectionSelection/IntersectionDirectionSelection.vue +127 -0
  21. package/package/kisscomps/components/IntersectionDirectionSelection/index.js +2 -0
  22. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/CrossRoadsSvg.vue +0 -1
  23. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/PatternWalkSvg.vue +429 -0
  24. package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/SidewalkClickSvg.vue +1272 -0
  25. package/package/kisscomps/components/IntersectionMap/crossDirection/crossDiagram.vue +239 -16
  26. package/package/kisscomps/components/IntersectionMap/crossDirection/phaseIcon/LphaseIconSvg.vue +88 -14
  27. package/package/kisscomps/components/IntersectionMap/crossDirection/phaseIcon/phaseIconSvg.vue +88 -15
  28. package/package/kisscomps/components/IntersectionMap/crossDirection/posJson/phasePos.json +24 -8
  29. package/package/kisscomps/components/IntersectionMap/crossDirection/posJson/phasePos.left.json +24 -8
  30. package/package/kisscomps/components/IntersectionMap/crossDirection/posJson/sidePos.json +50 -2
  31. package/package/kisscomps/components/IntersectionMap/crossDirection/utils.js +6 -0
  32. package/package/kisscomps/components/IntersectionMap/intersectionmap.vue +28 -1
  33. package/package/kisscomps/index.js +5 -1
  34. package/package/kissui.min.js +1 -1
  35. package/package.json +1 -1
  36. package/src/EdgeMgr/controller/crossDiagramMgr.js +5 -1
  37. package/src/api/param.js +11 -0
  38. package/src/icons/demo_index.html +8146 -0
  39. package/src/icons/iconfont.css +219 -3
  40. package/src/icons/iconfont.js +1 -1
  41. package/src/icons/iconfont.json +378 -0
  42. package/src/icons/iconfont.ttf +0 -0
  43. package/src/icons/iconfont.woff +0 -0
  44. package/src/icons/iconfont.woff2 +0 -0
  45. package/src/kisscomps/components/DirectionListConfiguration/DirectionListConfiguration.vue +436 -0
  46. package/src/kisscomps/components/DirectionListConfiguration/index.js +2 -0
  47. package/src/kisscomps/components/DirectionListConfiguration/svg/ped-east-bottom.vue +41 -0
  48. package/src/kisscomps/components/DirectionListConfiguration/svg/ped-east-top.vue +60 -0
  49. package/src/kisscomps/components/DirectionListConfiguration/svg/ped-ewped.vue +105 -0
  50. package/src/kisscomps/components/DirectionListConfiguration/svg/ped-north-left.vue +60 -0
  51. package/src/kisscomps/components/DirectionListConfiguration/svg/ped-north-right.vue +60 -0
  52. package/src/kisscomps/components/DirectionListConfiguration/svg/ped-pedeastward.vue +35 -0
  53. package/src/kisscomps/components/DirectionListConfiguration/svg/ped-pednorthward.vue +30 -0
  54. package/src/kisscomps/components/DirectionListConfiguration/svg/ped-pedsouthward.vue +35 -0
  55. package/src/kisscomps/components/DirectionListConfiguration/svg/ped-pedwestward.vue +41 -0
  56. package/src/kisscomps/components/DirectionListConfiguration/svg/ped-snped.vue +105 -0
  57. package/src/kisscomps/components/DirectionListConfiguration/svg/ped-south-left.vue +60 -0
  58. package/src/kisscomps/components/DirectionListConfiguration/svg/ped-south-right.vue +60 -0
  59. package/src/kisscomps/components/DirectionListConfiguration/svg/ped-west-bottom.vue +60 -0
  60. package/src/kisscomps/components/DirectionListConfiguration/svg/ped-west-top.vue +60 -0
  61. package/src/kisscomps/components/DirectionListConfiguration/svg/ped-xlped.vue +30 -0
  62. package/src/kisscomps/components/DirectionListConfiguration/svg/ped-xrped.vue +30 -0
  63. package/src/kisscomps/components/DirectionListConfiguration/svg/pedSvg.vue +78 -0
  64. package/src/kisscomps/components/IntersectionDirectionSelection/IntersectionDirectionSelection.vue +127 -0
  65. package/src/kisscomps/components/IntersectionDirectionSelection/index.js +2 -0
  66. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/CrossRoadsSvg.vue +0 -1
  67. package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/SidewalkClickSvg.vue +1272 -0
  68. package/src/kisscomps/components/IntersectionMap/crossDirection/crossDiagram.vue +239 -16
  69. package/src/kisscomps/components/IntersectionMap/crossDirection/phaseIcon/LphaseIconSvg.vue +88 -14
  70. package/src/kisscomps/components/IntersectionMap/crossDirection/phaseIcon/phaseIconSvg.vue +88 -15
  71. package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/phasePos.json +24 -8
  72. package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/phasePos.left.json +24 -8
  73. package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/sidePos.json +50 -2
  74. package/src/kisscomps/components/IntersectionMap/crossDirection/utils.js +6 -0
  75. package/src/kisscomps/components/IntersectionMap/intersectionmap.vue +28 -1
  76. package/src/kisscomps/index.js +5 -1
  77. package/src/utils/conflct.js +233 -0
  78. package/src/utils/conflictList.js +87 -0
  79. package/src/utils/phasedesc.js +37 -17
  80. package/src/views/intersection.vue +62 -12
  81. package/src/views/overView.vue +1 -1
  82. package/static/styles/uiComponents.scss +52 -0
  83. package/src/node_modules/.package_versions.json +0 -1
@@ -0,0 +1,436 @@
1
+ /**
2
+ * Copyright (c) 2020 kedacom
3
+ * OpenATC is licensed under Mulan PSL v2.
4
+ * You can use this software according to the terms and conditions of the Mulan PSL v2.
5
+ * You may obtain a copy of Mulan PSL v2 at:
6
+ * http://license.coscl.org.cn/MulanPSL2
7
+ * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
8
+ * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
9
+ * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
10
+ * See the Mulan PSL v2 for more details.
11
+ **/
12
+ <template>
13
+ <div class="direction-list-configuration">
14
+ <div class="dir-config-row">
15
+ <div class="label" :style="{width: labelWidth}">{{$t('openatccomponents.phase.desc')}}:</div>
16
+ <div class="dir-btn lane-dir">
17
+ <div class="each-icon" v-for="(item, index) in laneList" :key="index" :class="item.disabled ? 'disabled-icon': ''">
18
+ <el-tooltip class="item" effect="dark" :content="item.name" placement="bottom-start">
19
+ <div class="single-icon"
20
+ @click="selectDire(item, 'lane')"
21
+ :class="!item.disabled && preselectDirection.indexOf(item.id) !== -1 ? 'single-icon-select' : ''">
22
+ <i :class="item.iconclass"></i>
23
+ <div class="single-icon-name">{{item.name}}</div>
24
+ </div>
25
+ </el-tooltip>
26
+ </div>
27
+ </div>
28
+ </div>
29
+ <div class="dir-config-row">
30
+ <div class="label" :style="{width: labelWidth}">{{$t('openatccomponents.phase.peddesc')}}:</div>
31
+ <div class="dir-btn ped-dir">
32
+ <div class="each-icon" v-for="(item, index) in pedList" :key="index" :class="item.disabled ? 'disabled-icon': ''">
33
+ <el-tooltip class="item" effect="dark" :content="item.name" placement="bottom-start">
34
+ <div class="single-icon ped-icon"
35
+ @click="selectDire(item, 'ped')"
36
+ :class="!item.disabled && preselectPedDirection.indexOf(item.id) !== -1 ? 'single-icon-select' : ''">
37
+ <PedSvg :pedId="item.id" />
38
+ <div class="single-icon-name" style="margin-top: 5px;">{{item.name}}</div>
39
+ </div>
40
+ </el-tooltip>
41
+ </div>
42
+ </div>
43
+ </div>
44
+ </div>
45
+ </template>
46
+ <script>
47
+ import xdrdirselector from '../XRDDirSelector/XRDDirSelector'
48
+ import { uploadSingleTscParam } from '../../../api/param.js'
49
+ import { getMessageByCode } from '../../../utils/responseMessage.js'
50
+ import { getIntersectionInfo } from '../../../api/template.js'
51
+ import CrossDiagramMgr from '../../../EdgeMgr/controller/crossDiagramMgr.js'
52
+ import PhaseDataModel from '../IntersectionMap/crossDirection/utils.js'
53
+ // import { getTheme } from '../../../utils/auth'
54
+ import { images } from '../../../utils/phasedesc.js'
55
+ import PedSvg from './svg/pedSvg'
56
+
57
+ import CrossDirectionConflictList from '../../../utils/conflictList.js'
58
+
59
+ export default {
60
+ name: 'direction-list-configuration',
61
+ data () {
62
+ return {
63
+ laneList: [],
64
+ pedList: [],
65
+ preselectDirection: [], // 预选方向
66
+ preselectPedDirection: [] // 预选行人方向
67
+ }
68
+ },
69
+ components: {
70
+ xdrdirselector,
71
+ PedSvg
72
+ },
73
+ props: {
74
+ labelWidth: {
75
+ type: String,
76
+ default: '130px'
77
+ },
78
+ agentId: {
79
+ type: String
80
+ },
81
+ list: {
82
+ type: Array,
83
+ default () {
84
+ return []
85
+ }
86
+ },
87
+ roadDirection: {
88
+ type: String,
89
+ default: 'right'
90
+ },
91
+ isThirdSignal: {
92
+ type: Boolean,
93
+ default: false
94
+ },
95
+ choosedDirection: {
96
+ type: Array
97
+ },
98
+ choosedPedDirection: {
99
+ type: Array
100
+ }
101
+ },
102
+ methods: {
103
+ init () {
104
+ this.CrossDiagramMgr = new CrossDiagramMgr()
105
+ this.PhaseDataModel = new PhaseDataModel(this.roadDirection)
106
+ this.getIntersectionInfo() // 获取路口信息
107
+ },
108
+ getIntersectionInfo () {
109
+ // 获取路口信息
110
+ const agentid = this.agentId || '0'
111
+ getIntersectionInfo(agentid).then(res => {
112
+ if (!res.data.success) {
113
+ this.isLoaded = false
114
+ let commomMsg = this.$t('openatccomponents.overview.signalID') + ' : ' + agentid
115
+ let msg = getMessageByCode(res.data.code, this.$i18n.locale)
116
+ if (res.data.data) {
117
+ // 子类型错误
118
+ let childErrorCode = res.data.data.errorCode
119
+ if (childErrorCode) {
120
+ let childerror = getMessageByCode(res.data.data.errorCode, this.$i18n.locale)
121
+ msg = msg + ' - ' + childerror
122
+ }
123
+ }
124
+ msg = msg + ' - ' + commomMsg
125
+ this.$message.error(msg)
126
+ return
127
+ }
128
+ this.tempType = res.data.data.type
129
+ // 获取车道相位、行人相位信息(坐标、名称)
130
+ this.mainType = this.tempType.split('-')[0]
131
+ this.mainDirection = this.tempType.split('-')[1]
132
+ if (!this.isThirdSignal) {
133
+ // 可点击模式下,非第三方设备,按通道显示相位方向
134
+ this.getChannelInfo()
135
+ return
136
+ }
137
+ this.crossInfo = res.data.data.param
138
+ // 城市道路加载车道相位坐标和人行道坐标
139
+ this.getPhasePos()
140
+ this.getOverlapPhasePos()
141
+ this.getPedPhasePos()
142
+ this.getOverlapPedPhasePos()
143
+ if (this.isThirdSignal) {
144
+ // 第三方设备,按相位方向显示相位方向
145
+ this.compLanePhaseData = this.CrossDiagramMgr.compare(this.LanePhaseData, this.overlapLanePhaseData, 'type', 'nostatus')
146
+ this.compSidewalkPhaseData = this.CrossDiagramMgr.compare(this.sidewalkPhaseData, this.overlapsidewalkPhaseData, 'pedtype', 'nostatus')
147
+ let allDir = this.compLanePhaseData.map(ele => ele.id)
148
+ let allPedDir = this.compSidewalkPhaseData.map(ele => ele.id)
149
+ this.inneChoosedDirection = this.choosedDirection.filter(dir => allDir.indexOf(dir) !== -1)
150
+ this.inneChoosedPedDirection = this.choosedPedDirection.filter(dir => allPedDir.indexOf(dir) !== -1)
151
+ this.drawPhaseIcon()
152
+ }
153
+ })
154
+ },
155
+ getPhasePos () {
156
+ // 车道相位信息
157
+ this.LanePhaseData = []
158
+ this.crossInfo.phaseList.forEach((ele, i) => {
159
+ if (ele.controltype === undefined || ele.controltype <= 2) {
160
+ ele.direction.forEach((dir, index) => {
161
+ let dirinfo = this.PhaseDataModel.getPhase(dir)
162
+ if (dir <= 16) {
163
+ // 车道相位
164
+ this.LanePhaseData.push({
165
+ key: this.CrossDiagramMgr.getUniqueKey('phase'),
166
+ phaseid: ele.id, // 相位id,用于对应相位状态
167
+ id: dir, // 接口返回的dir字段,对应前端定义的相位方向id,唯一标识
168
+ name: dirinfo.name
169
+ })
170
+ }
171
+ })
172
+ }
173
+ })
174
+ },
175
+ getOverlapPhasePos () {
176
+ // 车道跟随相位信息
177
+ if (!this.crossInfo.overlaplList) return
178
+ this.overlapLanePhaseData = []
179
+ this.crossInfo.overlaplList.forEach((ele, i) => {
180
+ if (ele.direction) {
181
+ ele.direction.forEach((dir, index) => {
182
+ this.overlapLanePhaseData.push({
183
+ key: this.CrossDiagramMgr.getUniqueKey('overlapphase'),
184
+ phaseid: ele.id, // 相位id,用于对应相位状态
185
+ id: dir, // 接口返回的dir字段,对应前端定义的相位方向id,唯一标识
186
+ name: this.PhaseDataModel.getPhase(dir).name,
187
+ left: this.PhaseDataModel.getPhase(dir).x,
188
+ top: this.PhaseDataModel.getPhase(dir).y
189
+ })
190
+ })
191
+ }
192
+ })
193
+ },
194
+ getPedPhasePos () {
195
+ // 行人相位信息
196
+ this.sidewalkPhaseData = []
197
+ this.crossInfo.phaseList.forEach((ele, i) => {
198
+ if (ele.peddirection) {
199
+ ele.peddirection.forEach((dir, index) => {
200
+ // 行人相位
201
+ let dirinfo = this.PhaseDataModel.getSidePos(dir)
202
+ if (dir <= 16) {
203
+ let key = this.CrossDiagramMgr.getUniqueKey('pedphase')
204
+ if (this.isVipRoute && this.isThirdSignal) {
205
+ key = this.CrossDiagramMgr.getUniqueKey('pedphase') + `-${this.agentId}`
206
+ }
207
+ this.sidewalkPhaseData.push({
208
+ key,
209
+ phaseid: ele.id, // 相位id,用于对应相位状态
210
+ id: dir,
211
+ name: dirinfo.name
212
+ })
213
+ }
214
+ })
215
+ }
216
+ })
217
+ },
218
+ getOverlapPedPhasePos () {
219
+ // 行人跟随相位信息
220
+ if (!this.crossInfo.overlaplList) return
221
+ this.overlapsidewalkPhaseData = []
222
+ this.crossInfo.overlaplList.forEach((ele, i) => {
223
+ if (ele.peddirection) {
224
+ ele.peddirection.forEach((dir, index) => {
225
+ if (this.PhaseDataModel.getSidePos(dir)) {
226
+ this.overlapsidewalkPhaseData.push({
227
+ key: this.CrossDiagramMgr.getUniqueKey('overlappedphase'),
228
+ phaseid: ele.id, // 相位id,用于对应相位状态
229
+ id: dir,
230
+ name: this.PhaseDataModel.getSidePos(dir).name,
231
+ left: this.PhaseDataModel.getSidePos(dir).x,
232
+ top: this.PhaseDataModel.getSidePos(dir).y
233
+ })
234
+ }
235
+ })
236
+ }
237
+ })
238
+ },
239
+ getChannelInfo () {
240
+ uploadSingleTscParam('channel', this.agentId).then(data => {
241
+ let res = data.data
242
+ if (!res.success) {
243
+ if (res.code === '4003') {
244
+ this.$message.error(this.$t('openatccomponents.errorTip.devicenotonline'))
245
+ return
246
+ }
247
+ this.$message.error(getMessageByCode(data.data.code, this.$i18n.locale))
248
+ return
249
+ }
250
+ this.channelList = res.data.data.channelList.filter(ele => ele.type !== undefined)
251
+ console.log('this.channelList', this.channelList)
252
+ this.handleChannelDirection()
253
+ })
254
+ },
255
+ handleChannelDirection () {
256
+ this.LanePhaseData = []
257
+ this.sidewalkPhaseData = []
258
+ this.sidewalkDir = []
259
+ let realphasedirarr = []
260
+ let realpeddirarr = []
261
+ this.channelList.forEach((ele, i) => {
262
+ if (ele.type === 0 || ele.type === 1 || ele.type === 3) {
263
+ if (ele.realdir) {
264
+ ele.realdir.forEach((dir, index) => {
265
+ let phaseinfo = this.PhaseDataModel.getPhase(dir)
266
+ // 车道相位(通道类型是机动车,非机动车,公交时,对应相位机动车)
267
+ this.LanePhaseData.push({
268
+ key: this.CrossDiagramMgr.getUniqueKey('phase'),
269
+ channelid: ele.id, // 通道id
270
+ id: dir, // 接口返回的dir字段,对应前端定义的相位方向id,唯一标识
271
+ name: this.$i18n.locale === 'en' ? phaseinfo.ename : phaseinfo.name
272
+ })
273
+ })
274
+ realphasedirarr = Array.from(new Set(realphasedirarr.concat(ele.realdir)))
275
+ }
276
+ }
277
+ if (ele.type === 2) {
278
+ if (ele.realdir) {
279
+ ele.realdir.forEach((dir, index) => {
280
+ // 行人相位
281
+ if (this.sidewalkDir.indexOf(dir) === -1 && this.PhaseDataModel.getSidePos(dir)) {
282
+ let pedinfo = this.PhaseDataModel.getSidePos(dir)
283
+ this.sidewalkPhaseData.push({
284
+ key: this.CrossDiagramMgr.getUniqueKey('pedphase'),
285
+ channelid: ele.id, // 通道id
286
+ id: dir,
287
+ name: this.$i18n.locale === 'en' ? pedinfo.ename : pedinfo.desc
288
+ })
289
+ }
290
+ })
291
+ realpeddirarr = Array.from(new Set(realpeddirarr.concat(ele.realdir)))
292
+ this.sidewalkDir = Array.from(new Set([...this.sidewalkDir.concat(ele.realdir)]))
293
+ }
294
+ }
295
+ })
296
+ this.inneChoosedDirection = this.choosedDirection.filter(dir => realphasedirarr.indexOf(dir) !== -1)
297
+ this.inneChoosedPedDirection = this.choosedPedDirection.filter(dir => realpeddirarr.indexOf(dir) !== -1)
298
+ this.drawPhaseIcon()
299
+ },
300
+ async drawPhaseIcon () {
301
+ if (!this.isThirdSignal) {
302
+ await this.getConflictList()
303
+ this.handleClickedPhase()
304
+ this.handleClickedPedPhase()
305
+ this.handleLaneDir()
306
+ this.handlePedDir()
307
+ } else {
308
+ this.handleClickedPhase()
309
+ this.handleClickedPedPhase()
310
+ this.handleLaneDir()
311
+ this.handlePedDir()
312
+ }
313
+ },
314
+ async getConflictList () {
315
+ let ConflictList = new CrossDirectionConflictList(this.agentId)
316
+ return ConflictList.getConflictListByAgentid().then(res => {
317
+ if (res) {
318
+ let conflictList = ConflictList.getListDirConflict(this.inneChoosedDirection, this.inneChoosedPedDirection)
319
+ this.phaseConflictList = conflictList.allConflictDir
320
+ this.pedConflictList = conflictList.allPedConflictDir
321
+ // 排他
322
+ for (let index = 0; index < this.LanePhaseData.length; index++) {
323
+ const element = this.LanePhaseData[index]
324
+ delete element.disabled
325
+ }
326
+ for (let index = 0; index < this.sidewalkPhaseData.length; index++) {
327
+ const element = this.sidewalkPhaseData[index]
328
+ delete element.disabled
329
+ }
330
+ for (let index = 0; index < this.LanePhaseData.length; index++) {
331
+ const element = this.LanePhaseData[index]
332
+ if (this.phaseConflictList.indexOf(element.id) !== -1) {
333
+ element.disabled = true
334
+ }
335
+ }
336
+ for (let index = 0; index < this.sidewalkPhaseData.length; index++) {
337
+ const element = this.sidewalkPhaseData[index]
338
+ if (this.pedConflictList.indexOf(element.id) !== -1) {
339
+ element.disabled = true
340
+ }
341
+ }
342
+ }
343
+ })
344
+ },
345
+ handleClickedPhase () {
346
+ if (!this.isThirdSignal) {
347
+ this.preselectDirection = this.inneChoosedDirection.filter(dir => this.phaseConflictList.indexOf(dir) === -1)
348
+ } else {
349
+ this.preselectDirection = JSON.parse(JSON.stringify(this.inneChoosedDirection))
350
+ }
351
+ },
352
+ handleClickedPedPhase () {
353
+ if (!this.isThirdSignal) {
354
+ this.preselectPedDirection = this.inneChoosedPedDirection.filter(dir => this.pedConflictList.indexOf(dir) === -1)
355
+ } else {
356
+ this.preselectPedDirection = JSON.parse(JSON.stringify(this.inneChoosedPedDirection))
357
+ }
358
+ },
359
+
360
+ handleLaneDir () {
361
+ if (!this.isThirdSignal) {
362
+ this.laneList = this.getPhaseDirIcon(this.LanePhaseData)
363
+ } else {
364
+ this.laneList = this.getPhaseDirIcon(this.compLanePhaseData)
365
+ }
366
+ },
367
+ handlePedDir () {
368
+ if (!this.isThirdSignal) {
369
+ this.pedList = JSON.parse(JSON.stringify(this.sidewalkPhaseData))
370
+ } else {
371
+ this.pedList = JSON.parse(JSON.stringify(this.compSidewalkPhaseData))
372
+ }
373
+ },
374
+ getPhaseDirIcon (list) {
375
+ let idarr = []
376
+ let dirlist = []
377
+ for (let i = 0; i < list.length; i++) {
378
+ if (list[i].id <= 16 && idarr.indexOf(list[i].id) === -1) {
379
+ idarr.push(list[i].id)
380
+ let obj = {
381
+ ...list[i],
382
+ iconclass: images.filter(ele => ele.id === list[i].id)[0].class
383
+ }
384
+ if (this.roadDirection === 'left') {
385
+ if (list[i].id === 4 || list[i].id === 8 || list[i].id === 12 || list[i].id === 16) {
386
+ obj.iconclass = images.filter(ele => ele.id === list[i].id)[0].leftclass
387
+ }
388
+ }
389
+ dirlist.push(obj)
390
+ }
391
+ }
392
+ return dirlist
393
+ },
394
+ selectDire (value, type) {
395
+ if (value.disabled) return
396
+ let id = value.id
397
+ if (type === 'lane') {
398
+ let index = this.preselectDirection.indexOf(id)
399
+ if (index === -1) {
400
+ this.preselectDirection.push(id)
401
+ } else {
402
+ this.preselectDirection.splice(index, 1)
403
+ }
404
+ // console.log(this.preselectDirection)
405
+ this.choosedLanePhase = this.laneList.filter(lane => this.preselectDirection.includes(lane.id))
406
+ // console.log(this.choosedLanePhase)
407
+ this.inneChoosedDirection = JSON.parse(JSON.stringify(this.preselectDirection))
408
+ }
409
+ if (type === 'ped') {
410
+ let index = this.preselectPedDirection.indexOf(id)
411
+ if (index === -1) {
412
+ this.preselectPedDirection.push(id)
413
+ } else {
414
+ this.preselectPedDirection.splice(index, 1)
415
+ }
416
+ // console.log(this.preselectPedDirection)
417
+ this.choosedPedPhase = this.pedList.filter(lane => this.preselectPedDirection.includes(lane.id))
418
+ // console.log(this.choosedPedPhase)
419
+ this.inneChoosedPedDirection = JSON.parse(JSON.stringify(this.preselectPedDirection))
420
+ }
421
+ this.EmitAllChoosedDirection(value)
422
+ },
423
+ EmitAllChoosedDirection (curClickedPhase) {
424
+ let allChoosedDir = {
425
+ direction: this.preselectDirection,
426
+ peddirection: this.preselectPedDirection
427
+ }
428
+ this.$emit('handleClickCrossIcon', allChoosedDir, curClickedPhase)
429
+ this.drawPhaseIcon()
430
+ }
431
+ },
432
+ mounted () {
433
+ this.init()
434
+ }
435
+ }
436
+ </script>
@@ -0,0 +1,2 @@
1
+ import DirectionListConfiguration from './DirectionListConfiguration.vue'
2
+ export default DirectionListConfiguration
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Copyright (c) 2020 kedacom
3
+ * OpenATC is licensed under Mulan PSL v2.
4
+ * You can use this software according to the terms and conditions of the Mulan PSL v2.
5
+ * You may obtain a copy of Mulan PSL v2 at:
6
+ * http://license.coscl.org.cn/MulanPSL2
7
+ * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
8
+ * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
9
+ * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
10
+ * See the Mulan PSL v2 for more details.
11
+ **/
12
+ <template>
13
+ <svg t="1610604036193"
14
+ class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6817"
15
+ xmlns:xlink="http://www.w3.org/1999/xlink" width="42" height="42">
16
+ <path
17
+ d="M560.761905 0h48.761905v170.666667h-48.761905V0z m73.142857 0h48.761905v170.666667h-48.761905V0z m73.142857 0h48.761905v170.666667h-48.761905V0z m73.142857 0h48.761905v170.666667h-48.761905V0z"
18
+ class="default-ped-path" fill-opacity="0.3" p-id="6818"></path>
19
+ <path
20
+ d="M195.047619 0h48.761905v170.666667H195.047619V0z m73.142857 0h48.761905v170.666667h-48.761905V0z m73.142857 0h48.761905v170.666667h-48.761905V0z m73.142857 0h48.761905v170.666667h-48.761905V0z"
21
+ class="default-ped-path" fill-opacity="0.3" p-id="6819"></path>
22
+ <path
23
+ d="M560.761905 853.333333h48.761905v170.666667h-48.761905v-170.666667z m73.142857 0h48.761905v170.666667h-48.761905v-170.666667z m73.142857 0h48.761905v170.666667h-48.761905v-170.666667z m73.142857 0h48.761905v170.666667h-48.761905v-170.666667z"
24
+ class="default-ped-path" fill-opacity="0.3" p-id="6820"></path>
25
+ <path
26
+ d="M195.047619 853.333333h48.761905v170.666667H195.047619v-170.666667z m73.142857 0h48.761905v170.666667h-48.761905v-170.666667z m73.142857 0h48.761905v170.666667h-48.761905v-170.666667z m73.142857 0h48.761905v170.666667h-48.761905v-170.666667z"
27
+ class="default-ped-path" fill-opacity="0.3" p-id="6821"></path>
28
+ <path
29
+ d="M853.333333 560.761905h170.666667v48.761905h-170.666667v-48.761905z m0 73.142857h170.666667v48.761905h-170.666667v-48.761905z m0 73.142857h170.666667v48.761905h-170.666667v-48.761905z m0 73.142857h170.666667v48.761905h-170.666667v-48.761905z"
30
+ class="default-ped-path" p-id="6822"></path>
31
+ <path
32
+ d="M853.333333 195.047619h170.666667v48.761905h-170.666667V195.047619z m0 73.142857h170.666667v48.761905h-170.666667v-48.761905z m0 73.142857h170.666667v48.761905h-170.666667v-48.761905z m0 73.142857h170.666667v48.761905h-170.666667v-48.761905z"
33
+ class="default-ped-path" fill-opacity="0.3" p-id="6823"></path>
34
+ <path
35
+ d="M0 560.761905h170.666667v48.761905H0v-48.761905z m0 73.142857h170.666667v48.761905H0v-48.761905z m0 73.142857h170.666667v48.761905H0v-48.761905z m0 73.142857h170.666667v48.761905H0v-48.761905z"
36
+ class="default-ped-path" fill-opacity="0.3" p-id="6824"></path>
37
+ <path
38
+ d="M0 195.047619h170.666667v48.761905H0V195.047619z m0 73.142857h170.666667v48.761905H0v-48.761905z m0 73.142857h170.666667v48.761905H0v-48.761905z m0 73.142857h170.666667v48.761905H0v-48.761905z"
39
+ class="default-ped-path" fill-opacity="0.3" p-id="6825"></path>
40
+ </svg>
41
+ </template>
@@ -0,0 +1,60 @@
1
+ /** * Copyright (c) 2020 kedacom * OpenATC is licensed under Mulan PSL v2. * You
2
+ can use this software according to the terms and conditions of the Mulan PSL v2.
3
+ * You may obtain a copy of Mulan PSL v2 at: *
4
+ http://license.coscl.org.cn/MulanPSL2 * THIS SOFTWARE IS PROVIDED ON AN "AS IS"
5
+ BASIS, WITHOUT WARRANTIES OF ANY KIND, * EITHER EXPRESS OR IMPLIED, INCLUDING
6
+ BUT NOT LIMITED TO NON-INFRINGEMENT, * MERCHANTABILITY OR FIT FOR A PARTICULAR
7
+ PURPOSE. * See the Mulan PSL v2 for more details. **/
8
+ <template>
9
+ <svg
10
+ t="1710299752750"
11
+ class="icon"
12
+ viewBox="0 0 1024 1024"
13
+ version="1.1"
14
+ xmlns="http://www.w3.org/2000/svg"
15
+ p-id="11672"
16
+ width="42"
17
+ height="42"
18
+ >
19
+ <path
20
+ d="M560.761905 0h48.761905v170.666667h-48.761905V0z m73.142857 0h48.761905v170.666667h-48.761905V0z m73.142857 0h48.761905v170.666667h-48.761905V0z m73.142857 0h48.761905v170.666667h-48.761905V0z"
21
+ class="default-ped-path" fill-opacity="0.3"
22
+ p-id="11673"
23
+ ></path>
24
+ <path
25
+ d="M195.047619 0h48.761905v170.666667H195.047619V0z m73.142857 0h48.761905v170.666667h-48.761905V0z m73.142857 0h48.761905v170.666667h-48.761905V0z m73.142857 0h48.761905v170.666667h-48.761905V0z"
26
+ class="default-ped-path" fill-opacity="0.3"
27
+ p-id="11674"
28
+ ></path>
29
+ <path
30
+ d="M560.761905 853.333333h48.761905v170.666667h-48.761905v-170.666667z m73.142857 0h48.761905v170.666667h-48.761905v-170.666667z m73.142857 0h48.761905v170.666667h-48.761905v-170.666667z m73.142857 0h48.761905v170.666667h-48.761905v-170.666667z"
31
+ class="default-ped-path" fill-opacity="0.3"
32
+ p-id="11675"
33
+ ></path>
34
+ <path
35
+ d="M195.047619 853.333333h48.761905v170.666667H195.047619v-170.666667z m73.142857 0h48.761905v170.666667h-48.761905v-170.666667z m73.142857 0h48.761905v170.666667h-48.761905v-170.666667z m73.142857 0h48.761905v170.666667h-48.761905v-170.666667z"
36
+ class="default-ped-path" fill-opacity="0.3"
37
+ p-id="11676"
38
+ ></path>
39
+ <path
40
+ d="M853.333333 560.761905h170.666667v48.761905h-170.666667v-48.761905z m0 73.142857h170.666667v48.761905h-170.666667v-48.761905z m0 73.142857h170.666667v48.761905h-170.666667v-48.761905z m0 73.142857h170.666667v48.761905h-170.666667v-48.761905z"
41
+ class="default-ped-path" fill-opacity="0.3"
42
+ p-id="11677"
43
+ ></path>
44
+ <path
45
+ d="M853.333333 195.047619h170.666667v48.761905h-170.666667V195.047619z m0 73.142857h170.666667v48.761905h-170.666667v-48.761905z m0 73.142857h170.666667v48.761905h-170.666667v-48.761905z m0 73.142857h170.666667v48.761905h-170.666667v-48.761905z"
46
+ class="default-ped-path"
47
+ p-id="11678"
48
+ ></path>
49
+ <path
50
+ d="M0 560.761905h170.666667v48.761905H0v-48.761905z m0 73.142857h170.666667v48.761905H0v-48.761905z m0 73.142857h170.666667v48.761905H0v-48.761905z m0 73.142857h170.666667v48.761905H0v-48.761905z"
51
+ class="default-ped-path" fill-opacity="0.3"
52
+ p-id="11679"
53
+ ></path>
54
+ <path
55
+ d="M0 195.047619h170.666667v48.761905H0V195.047619z m0 73.142857h170.666667v48.761905H0v-48.761905z m0 73.142857h170.666667v48.761905H0v-48.761905z m0 73.142857h170.666667v48.761905H0v-48.761905z"
56
+ class="default-ped-path" fill-opacity="0.3"
57
+ p-id="11680"
58
+ ></path>
59
+ </svg>
60
+ </template>
@@ -0,0 +1,105 @@
1
+ /** * Copyright (c) 2020 kedacom * OpenATC is licensed under Mulan PSL v2. * You
2
+ can use this software according to the terms and conditions of the Mulan PSL v2.
3
+ * You may obtain a copy of Mulan PSL v2 at: *
4
+ http://license.coscl.org.cn/MulanPSL2 * THIS SOFTWARE IS PROVIDED ON AN "AS IS"
5
+ BASIS, WITHOUT WARRANTIES OF ANY KIND, * EITHER EXPRESS OR IMPLIED, INCLUDING
6
+ BUT NOT LIMITED TO NON-INFRINGEMENT, * MERCHANTABILITY OR FIT FOR A PARTICULAR
7
+ PURPOSE. * See the Mulan PSL v2 for more details. **/
8
+ <template>
9
+ <svg
10
+ t="1710300380373"
11
+ class="icon"
12
+ viewBox="0 0 1024 1024"
13
+ version="1.1"
14
+ xmlns="http://www.w3.org/2000/svg"
15
+ p-id="13895"
16
+ width="42"
17
+ height="42"
18
+ >
19
+ <path
20
+ d="M293.925926 663.703704h18.962963v56.888889H293.925926v-56.888889z m0 75.851852h18.962963v56.888888H293.925926v-56.888888z m0 75.851851h18.962963v56.888889H293.925926v-56.888889z m0 75.851852h18.962963v56.888889H293.925926v-56.888889z m0 75.851852h18.962963v56.888889H293.925926v-56.888889z"
21
+ class="default-ped-path" fill-opacity="0.3"
22
+ p-id="13896"
23
+ ></path>
24
+ <path
25
+ d="M388.740741 663.703704h18.962963v56.888889h-18.962963v-56.888889z m0 75.851852h18.962963v56.888888h-18.962963v-56.888888z m0 75.851851h18.962963v56.888889h-18.962963v-56.888889z m0 75.851852h18.962963v56.888889h-18.962963v-56.888889z m0 75.851852h18.962963v56.888889h-18.962963v-56.888889z"
26
+ class="default-ped-path" fill-opacity="0.3"
27
+ p-id="13897"
28
+ ></path>
29
+ <path
30
+ d="M635.259259 1024h-18.962963V682.666667h18.962963v341.333333z"
31
+ class="default-ped-path" fill-opacity="0.3"
32
+ p-id="13898"
33
+ ></path>
34
+ <path
35
+ d="M521.481481 1024h-18.962962V682.666667h18.962962v341.333333z"
36
+ class="default-ped-path" fill-opacity="0.3"
37
+ p-id="13899"
38
+ ></path>
39
+ <path
40
+ d="M730.074074 1024h-18.962963V682.666667h18.962963v341.333333z"
41
+ class="default-ped-path" fill-opacity="0.3"
42
+ p-id="13900"
43
+ ></path>
44
+ <path
45
+ d="M199.111111 1024H180.148148V663.703704h18.962963v360.296296z"
46
+ class="default-ped-path" fill-opacity="0.3"
47
+ p-id="13901"
48
+ ></path>
49
+ <path
50
+ d="M843.851852 1024h-18.962963V663.703704h18.962963v360.296296z"
51
+ class="default-ped-path" fill-opacity="0.3"
52
+ p-id="13902"
53
+ ></path>
54
+ <path
55
+ d="M824.888889 663.703704v18.962963H502.518519v-18.962963h322.37037z"
56
+ class="default-ped-path" fill-opacity="0.3"
57
+ p-id="13903"
58
+ ></path>
59
+ <path
60
+ d="M730.074074 360.296296h-18.962963v-56.888889h18.962963v56.888889z m0-75.851852h-18.962963v-56.888888h18.962963v56.888888z m0-75.851851h-18.962963V151.703704h18.962963v56.888889z m0-75.851852h-18.962963V75.851852h18.962963v56.888889z m0-75.851852h-18.962963V0h18.962963v56.888889z"
61
+ class="default-ped-path" fill-opacity="0.3"
62
+ p-id="13904"
63
+ ></path>
64
+ <path
65
+ d="M635.259259 360.296296h-18.962963v-56.888889h18.962963v56.888889z m0-75.851852h-18.962963v-56.888888h18.962963v56.888888z m0-75.851851h-18.962963V151.703704h18.962963v56.888889z m0-75.851852h-18.962963V75.851852h18.962963v56.888889z m0-75.851852h-18.962963V0h18.962963v56.888889z"
66
+ class="default-ped-path" fill-opacity="0.3"
67
+ p-id="13905"
68
+ ></path>
69
+ <path
70
+ d="M388.740741 0h18.962963v341.333333h-18.962963V0z"
71
+ class="default-ped-path" fill-opacity="0.3"
72
+ p-id="13906"
73
+ ></path>
74
+ <path
75
+ d="M502.518519 0h18.962962v341.333333h-18.962962V0z"
76
+ class="default-ped-path" fill-opacity="0.3"
77
+ p-id="13907"
78
+ ></path>
79
+ <path
80
+ d="M293.925926 0h18.962963v341.333333H293.925926V0z"
81
+ class="default-ped-path" fill-opacity="0.3"
82
+ p-id="13908"
83
+ ></path>
84
+ <path
85
+ d="M824.888889 0h18.962963v360.296296h-18.962963V0z"
86
+ class="default-ped-path" fill-opacity="0.3"
87
+ p-id="13909"
88
+ ></path>
89
+ <path
90
+ d="M180.148148 0h18.962963v360.296296H180.148148V0z"
91
+ class="default-ped-path" fill-opacity="0.3"
92
+ p-id="13910"
93
+ ></path>
94
+ <path
95
+ d="M199.111111 360.296296v-18.962963h322.37037v18.962963H199.111111z"
96
+ class="default-ped-path" fill-opacity="0.3"
97
+ p-id="13911"
98
+ ></path>
99
+ <path
100
+ d="M578.37037 436.148148h37.925926v151.703704h-37.925926v-151.703704z m-56.888889 0h37.925926v151.703704h-37.925926v-151.703704z m-56.888888 0h37.925926v151.703704h-37.925926v-151.703704z m-56.888889 0h37.925926v151.703704h-37.925926v-151.703704z m-56.888889 0h37.925926v151.703704H350.814815v-151.703704z m-56.888889 0h37.925926v151.703704H293.925926v-151.703704z m-56.888889 0h37.925926v151.703704H237.037037v-151.703704z m-56.888889 0h37.925926v151.703704H180.148148v-151.703704z m455.111111 0h37.925926v151.703704h-37.925926v-151.703704z m56.888889 0h37.925926v151.703704h-37.925926v-151.703704z m56.888889 0h37.925926v151.703704h-37.925926v-151.703704z m56.888889 0h37.925926v151.703704h-37.925926v-151.703704z"
101
+ class="default-ped-path"
102
+ p-id="13912"
103
+ ></path>
104
+ </svg>
105
+ </template>