openatc-components 0.0.91 → 0.0.94

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 (117) hide show
  1. package/package/kisscomps/components/KanBan/kanban.vue +1 -1
  2. package/package/kisscomps/components/SchemeConfig/tentativeplancontrolmodal/index.vue +6 -3
  3. package/package/kisscomps/index.js +1 -11
  4. package/package/kissui.min.js +1 -1
  5. package/package.json +2 -4
  6. package/src/i18n/language/en.js +2 -77
  7. package/src/i18n/language/zh.js +2 -77
  8. package/src/kisscomps/components/KanBan/kanban.vue +1 -1
  9. package/src/kisscomps/components/SchemeConfig/tentativeplancontrolmodal/index.vue +6 -3
  10. package/src/kisscomps/index.js +1 -11
  11. package/src/main.js +0 -3
  12. package/src/router/index.js +0 -7
  13. package/src/store/index.js +2 -2
  14. package/src/store/modules/globalParam.js +16 -67
  15. package/src/views/intersection.vue +2 -8
  16. package/static/apiconfig.json +0 -15
  17. package/static/styles/common.scss +0 -1
  18. package/package/kisscomps/components/Channelization/Channelization.vue +0 -545
  19. package/package/kisscomps/components/Channelization/index.js +0 -2
  20. package/package/kisscomps/components/ChannelizationWithInterface/ChannelizationWithInterface.vue +0 -498
  21. package/package/kisscomps/components/ChannelizationWithInterface/index.js +0 -2
  22. package/package/kisscomps/components/DrawChannelization/drawsvg/channelizationElements.vue +0 -249
  23. package/package/kisscomps/components/DrawChannelization/drawsvg/detectorAssociatedComponent.vue +0 -152
  24. package/package/kisscomps/components/DrawChannelization/drawsvg/drawElement/TextBox.vue +0 -91
  25. package/package/kisscomps/components/DrawChannelization/drawsvg/drawElement/crossMap.vue +0 -176
  26. package/package/kisscomps/components/DrawChannelization/drawsvg/drawElement/editText.vue +0 -108
  27. package/package/kisscomps/components/DrawChannelization/drawsvg/firstImportCrossmap.vue +0 -48
  28. package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/countdownSvg.vue +0 -182
  29. package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/detectorChart.vue +0 -222
  30. package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/detectorIconSvg.vue +0 -191
  31. package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/laneIcon.vue +0 -78
  32. package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/motorwayIconSvg.vue +0 -433
  33. package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/pedroadIconSvg.vue +0 -195
  34. package/package/kisscomps/components/DrawChannelization/drawsvg/importDialog.vue +0 -71
  35. package/package/kisscomps/components/DrawChannelization/drawsvg/index.draw.vue +0 -939
  36. package/package/kisscomps/components/DrawChannelization/drawsvg/index.vue +0 -118
  37. package/package/kisscomps/components/DrawChannelization/drawsvg/laneEditPanel.vue +0 -563
  38. package/package/kisscomps/components/DrawChannelization/drawsvg/overlapAssociatedComponent.vue +0 -157
  39. package/package/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.check.vue +0 -191
  40. package/package/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.syncOper.vue +0 -331
  41. package/package/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.vue +0 -157
  42. package/package/kisscomps/components/DrawChannelization/drawsvg/table.vue +0 -99
  43. package/package/kisscomps/components/DrawChannelization/drawsvg/utils/loadutils.js +0 -43
  44. package/package/kisscomps/components/DrawChannelization/drawsvg/utils/phaseDataModel.js +0 -32
  45. package/package/kisscomps/components/DrawChannelization/drawsvg/utils/phasePos.json +0 -20
  46. package/package/kisscomps/components/DrawChannelization/index.js +0 -2
  47. package/package/kisscomps/components/DrawChannelization/phaseDataMgr.js +0 -278
  48. package/package/kisscomps/components/MessageBox/index.vue +0 -96
  49. package/src/api/cross.js +0 -33
  50. package/src/icons/svg/custom-BRTlane.svg +0 -40
  51. package/src/icons/svg/custom-bicyclelane.svg +0 -7
  52. package/src/icons/svg/custom-buslane.svg +0 -40
  53. package/src/icons/svg/custom-detector.svg +0 -12
  54. package/src/icons/svg/custom-east-bottom.svg +0 -32
  55. package/src/icons/svg/custom-east-top.svg +0 -32
  56. package/src/icons/svg/custom-ewped.svg +0 -35
  57. package/src/icons/svg/custom-motorway.svg +0 -7
  58. package/src/icons/svg/custom-nonmotorizedlane.svg +0 -40
  59. package/src/icons/svg/custom-north-left.svg +0 -32
  60. package/src/icons/svg/custom-north-right.svg +0 -32
  61. package/src/icons/svg/custom-pedcrossing.svg +0 -7
  62. package/src/icons/svg/custom-peddetector.svg +0 -17
  63. package/src/icons/svg/custom-pedeastward.svg +0 -9
  64. package/src/icons/svg/custom-pedestrian.svg +0 -7
  65. package/src/icons/svg/custom-pednorthward.svg +0 -9
  66. package/src/icons/svg/custom-pedsouthward.svg +0 -9
  67. package/src/icons/svg/custom-pedwestward.svg +0 -9
  68. package/src/icons/svg/custom-secondcrossing.svg +0 -7
  69. package/src/icons/svg/custom-sectionpedestrian.svg +0 -7
  70. package/src/icons/svg/custom-snped.svg +0 -35
  71. package/src/icons/svg/custom-south-left.svg +0 -32
  72. package/src/icons/svg/custom-south-right.svg +0 -32
  73. package/src/icons/svg/custom-straightahead.svg +0 -7
  74. package/src/icons/svg/custom-tramlane.svg +0 -40
  75. package/src/icons/svg/custom-turnaround.svg +0 -7
  76. package/src/icons/svg/custom-turnleft.svg +0 -7
  77. package/src/icons/svg/custom-turnright.svg +0 -7
  78. package/src/icons/svg/custom-vehiclebranch.svg +0 -40
  79. package/src/icons/svg/custom-vehiclemainroad.svg +0 -41
  80. package/src/icons/svg/custom-west-bottom.svg +0 -32
  81. package/src/icons/svg/custom-west-top.svg +0 -32
  82. package/src/icons/svg/custom-xlped.svg +0 -14
  83. package/src/icons/svg/custom-xpedestrian.svg +0 -7
  84. package/src/icons/svg/custom-xrped.svg +0 -14
  85. package/src/kisscomps/components/Channelization/Channelization.vue +0 -545
  86. package/src/kisscomps/components/Channelization/index.js +0 -2
  87. package/src/kisscomps/components/ChannelizationWithInterface/ChannelizationWithInterface.vue +0 -498
  88. package/src/kisscomps/components/ChannelizationWithInterface/index.js +0 -2
  89. package/src/kisscomps/components/DrawChannelization/drawsvg/channelizationElements.vue +0 -249
  90. package/src/kisscomps/components/DrawChannelization/drawsvg/detectorAssociatedComponent.vue +0 -152
  91. package/src/kisscomps/components/DrawChannelization/drawsvg/drawElement/TextBox.vue +0 -91
  92. package/src/kisscomps/components/DrawChannelization/drawsvg/drawElement/crossMap.vue +0 -176
  93. package/src/kisscomps/components/DrawChannelization/drawsvg/drawElement/editText.vue +0 -108
  94. package/src/kisscomps/components/DrawChannelization/drawsvg/firstImportCrossmap.vue +0 -48
  95. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/countdownSvg.vue +0 -182
  96. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/detectorChart.vue +0 -222
  97. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/detectorIconSvg.vue +0 -191
  98. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/laneIcon.vue +0 -78
  99. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/motorwayIconSvg.vue +0 -433
  100. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/pedroadIconSvg.vue +0 -195
  101. package/src/kisscomps/components/DrawChannelization/drawsvg/importDialog.vue +0 -71
  102. package/src/kisscomps/components/DrawChannelization/drawsvg/index.draw.vue +0 -939
  103. package/src/kisscomps/components/DrawChannelization/drawsvg/index.vue +0 -118
  104. package/src/kisscomps/components/DrawChannelization/drawsvg/laneEditPanel.vue +0 -563
  105. package/src/kisscomps/components/DrawChannelization/drawsvg/overlapAssociatedComponent.vue +0 -157
  106. package/src/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.check.vue +0 -191
  107. package/src/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.syncOper.vue +0 -331
  108. package/src/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.vue +0 -157
  109. package/src/kisscomps/components/DrawChannelization/drawsvg/table.vue +0 -99
  110. package/src/kisscomps/components/DrawChannelization/drawsvg/utils/loadutils.js +0 -43
  111. package/src/kisscomps/components/DrawChannelization/drawsvg/utils/phaseDataModel.js +0 -32
  112. package/src/kisscomps/components/DrawChannelization/drawsvg/utils/phasePos.json +0 -20
  113. package/src/kisscomps/components/DrawChannelization/index.js +0 -2
  114. package/src/kisscomps/components/DrawChannelization/phaseDataMgr.js +0 -278
  115. package/src/kisscomps/components/MessageBox/index.vue +0 -96
  116. package/src/views/customchannelization.vue +0 -49
  117. package/static/styles/channelizatioon.scss +0 -365
@@ -1,498 +0,0 @@
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
- <!--动态路口图,只需要设备AgentId,此组件会处理方案状态接口轮询-->
13
- <template>
14
- <div class="channelization-with-interface">
15
- <Channelization
16
- ref="channelization"
17
- :AgentId="AgentId"
18
- :crossStatusData="crossStatusData"
19
- :detectorStatusData="detectorStatusData" />
20
- </div>
21
- </template>
22
- <script>
23
- import Channelization from '../Channelization/Channelization'
24
- import { getMessageByCode } from '../../../utils/responseMessage'
25
- import { getTscControl, queryDevice, putTscControl } from '../../../api/control.js'
26
- import { registerMessage, uploadSingleTscParam } from '../../../api/param'
27
- import { getIframdevid, setIframdevid, setToken, setHost } from '../../../utils/auth.js'
28
- import ControlFormat from '../../../utils/ControlFormat.js'
29
- import { getDetectorStatus } from '../../../api/cross'
30
- export default {
31
- name: 'channelization-with-interface',
32
- components: {
33
- Channelization
34
- },
35
- data () {
36
- return {
37
- controlData: {},
38
- crossStatusData: {}, // 路口状态数据
39
- detectorStatusData: {}, // 检测器状态数据(包括车辆检测器状态和行人检测器状态)
40
- devStatus: 1,
41
- isResend: true,
42
- intervalFlag: true,
43
- phaseControlTimer: null, // 定时器
44
- registerMessageTimer: null // 延时器
45
- }
46
- },
47
- props: {
48
- reqUrl: {
49
- type: String,
50
- default: ''
51
- },
52
- AgentId: {
53
- type: String,
54
- default: '0'
55
- },
56
- Token: {
57
- type: String,
58
- default: ''
59
- },
60
- roadDirection: {
61
- type: String,
62
- default: 'right'
63
- },
64
- isShowInterval: {
65
- type: Boolean,
66
- default: true
67
- },
68
- isShowState: {
69
- type: Boolean,
70
- devault: false
71
- },
72
- isShowMode: {
73
- type: Boolean,
74
- default: false
75
- },
76
- modeName: {
77
- type: String,
78
- default: ''
79
- },
80
- controlName: {
81
- type: String,
82
- default: ''
83
- }
84
- },
85
- watch: {
86
- AgentId: {
87
- handler: function (val, oldVal) {
88
- this.agentId = val
89
- },
90
- // 深度观察监听
91
- deep: true
92
- },
93
- Token: {
94
- handler: function (val) {
95
- this.setPropsToken(val)
96
- }
97
- }
98
- },
99
- methods: {
100
- resetIntersectionMap () {
101
- this.setPropsToken(this.Token)
102
- this.firstInit()
103
- // this.$refs.intersectionMap.resetCrossDiagram()
104
- this.initData()
105
- },
106
- registerMessage () {
107
- registerMessage(this.AgentId).then(data => {
108
- if (!data.data.success) {
109
- this.devStatus = 2
110
- let parrenterror = getMessageByCode(data.data.code, this.$i18n.locale)
111
- if (data.data.data) {
112
- // 子类型错误
113
- let childErrorCode = data.data.data.errorCode
114
- if (childErrorCode) {
115
- let childerror = getMessageByCode(data.data.data.errorCode, this.$i18n.locale)
116
- this.$message.error(parrenterror + ',' + childerror)
117
- }
118
- } else {
119
- this.$message.error(parrenterror)
120
- }
121
- if (this.isResend) {
122
- this.reSend()
123
- }
124
- return
125
- }
126
- this.$emit('registerMessage', data)
127
- this.devStatus = 3
128
- this.clearPatternInterval() // 清除其他定时器
129
- this.phaseControlTimer = setInterval(() => {
130
- if (this.intervalFlag) {
131
- this.initData()
132
- }
133
- }, 1000)
134
- })
135
- },
136
- reSend () { // 设备掉线重连机制
137
- this.devStatus = 1
138
- this.clearRegisterMessageTimer()
139
- this.registerMessageTimer = setTimeout(() => {
140
- this.reconnectionDev()
141
- }, 5000)
142
- },
143
- clearPatternInterval () {
144
- if (this.phaseControlTimer !== null) {
145
- clearInterval(this.phaseControlTimer) // 清除定时器
146
- this.phaseControlTimer = null
147
- }
148
- },
149
- clearRegisterMessageTimer () {
150
- if (this.registerMessageTimer !== null) {
151
- clearTimeout(this.registerMessageTimer) // 清除延时器
152
- this.registerMessageTimer = null
153
- }
154
- },
155
- initData () {
156
- this.intervalFlag = false
157
- let iframdevid = getIframdevid()
158
- console.log(iframdevid)
159
- let startTime = new Date().getTime()
160
- getTscControl(this.AgentId).then((data) => {
161
- let endTime = new Date().getTime()
162
- let diffTime = endTime - startTime
163
- this.responseTime = diffTime
164
- this.intervalFlag = true
165
- if (!data.data.success) {
166
- if (data.data.code === '4003') {
167
- this.devStatus = 2
168
- this.clearPatternInterval() // 清除其他定时器
169
- this.$message.error(getMessageByCode(data.data.code, this.$i18n.locale))
170
- if (this.isResend) {
171
- this.reSend()
172
- }
173
- return
174
- }
175
- let parrenterror = getMessageByCode(data.data.code, this.$i18n.locale)
176
- if (data.data.data) {
177
- // 子类型错误
178
- let childErrorCode = data.data.data.errorCode
179
- if (childErrorCode) {
180
- let childerror = getMessageByCode(data.data.data.errorCode, this.$i18n.locale)
181
- this.$message.error(parrenterror + ',' + childerror)
182
- }
183
- } else {
184
- this.$message.error(parrenterror)
185
- }
186
- this.clearPatternInterval() // 清除其他定时器
187
- if (this.isResend) {
188
- this.reSend()
189
- }
190
- return
191
- }
192
- this.crossStatusData = JSON.parse(JSON.stringify(data.data.data.data))
193
- let param = JSON.parse(JSON.stringify(data.data.data.data))
194
- // this.controlData = this.handleGetData(param)
195
- this.controlData = this.controlFormat.handleGetData(param)
196
- this.$emit('getTscControl', data)
197
- }).catch(error => {
198
- this.$message.error(error)
199
- console.log(error)
200
- })
201
- },
202
- reconnectionDev () {
203
- this.registerMessage()
204
- },
205
- queryDevParams () {
206
- let _this = this
207
- queryDevice(this.AgentId).then(res => {
208
- if (!res.data.success) {
209
- _this.$message.error(getMessageByCode(res.data.code, _this.$i18n.locale))
210
- return
211
- }
212
- let devParams = res.data.data.jsonparam
213
- _this.ip = devParams.ip
214
- _this.port = String(devParams.port)
215
- _this.protocol = res.data.data.protocol
216
- _this.agentId = res.data.data.agentid
217
- if (res.data.data.name) {
218
- _this.agentName = res.data.data.name
219
- }
220
- _this.platform = res.data.data.platform
221
- // _this.$refs.intersectionMap.resetCrossDiagram()
222
- _this.registerMessage() // 注册消息
223
- _this.$emit('queryDevice', res)
224
- _this.getDetectorStatus()
225
- })
226
- },
227
- firstInit () {
228
- if (this.$route.query !== undefined && Object.keys(this.$route.query).length) {
229
- this.agentId = this.$route.query.agentid
230
- setIframdevid(this.agentId)
231
- this.registerMessage() // 注册消息
232
- } else {
233
- this.queryDevParams() // 查询设备信息
234
- }
235
- },
236
- destroyIntersectionMap () {
237
- this.isResend = false
238
- this.clearPatternInterval() // 清除定时器
239
- this.clearRegisterMessageTimer() // 清除定时器
240
- },
241
- setPropsToken (token) {
242
- // 获取组件外传入的token,便于独立组件调用接口
243
- if (token && token !== '') {
244
- setToken(token)
245
- }
246
- },
247
- setHost (host) {
248
- // 获取组件外传入的token,便于独立组件调用接口
249
- if (host && host !== '') {
250
- setHost(host)
251
- }
252
- },
253
- async doPatternCommit (control) {
254
- let that = this
255
- let resData
256
- await putTscControl(control, this.agentId).then(data => {
257
- resData = data
258
- let success = 0
259
- if (!data.data.success) {
260
- that.$message.error(getMessageByCode(data.data.code, that.$i18n.locale))
261
- return
262
- }
263
- if (data.data.data && data.data.data.data) {
264
- success = data.data.data.data.success
265
- if (success !== 0) {
266
- let errormsg = 'openatccomponents.overview.putTscControlError' + success
267
- that.$message.error(this.$t(errormsg))
268
- return
269
- }
270
- }
271
- // this.closeManualModal()
272
- if ((that.currModel === 5 || that.currModel === 6 || that.currModel === 10 || that.currModel === 12) && (that.preselectModel === 6 || that.preselectModel === 10 || that.preselectModel === 12)) {
273
- that.$message.success(this.$t('openatccomponents.overview.nextcycleeffic'))
274
- return
275
- }
276
- if (that.preselectModel === 4) {
277
- that.$message.success(this.$t('openatccomponents.overview.transitioneffic'))
278
- return
279
- }
280
- if (success === 0) {
281
- that.$message.success(this.$t('openatccomponents.common.download'))
282
- }
283
- }).catch(error => {
284
- that.$message.error(error)
285
- console.log(error)
286
- })
287
- return resData
288
- },
289
- async getTscControlInfo () {
290
- await getTscControl(this.agentId).then((data) => {
291
- let res = data
292
- this.controlInfo = {
293
- tscData: null,
294
- stageData: null,
295
- controlData: null
296
- }
297
- if (!data.data.success) {
298
- if (data.data.code === '4003') {
299
- this.$message.error(getMessageByCode(data.data.code, this.$i18n.locale))
300
- return
301
- }
302
- let parrenterror = getMessageByCode(data.data.code, this.$i18n.locale)
303
- if (data.data.data) {
304
- // 子类型错误
305
- let childErrorCode = data.data.data.errorCode
306
- if (childErrorCode) {
307
- let childerror = getMessageByCode(data.data.data.errorCode, this.$i18n.locale)
308
- this.$message.error(parrenterror + ',' + childerror)
309
- }
310
- } else {
311
- this.$message.error(parrenterror)
312
- }
313
- return
314
- }
315
- let tscData = JSON.parse(JSON.stringify(res.data.data))
316
- let stageData = []
317
- let controlData = {}
318
- let param = Object.assign({}, tscData)
319
- controlData = this.controlFormat.handleGetData(param)
320
- this.controlData = controlData
321
- this.controlInfo = {
322
- tscData: tscData,
323
- stageData: stageData,
324
- controlData: controlData
325
- }
326
- }).catch(error => {
327
- this.$message.error(error)
328
- console.log(error)
329
- })
330
- },
331
- async getPhase () {
332
- await uploadSingleTscParam('phase', this.agentId).then(data => {
333
- let res = data.data
334
- if (!res.success) {
335
- if (res.code === '4003') {
336
- this.$message.error(this.$t('openatccomponents.errorTip.devicenotonline'))
337
- return
338
- }
339
- this.$message.error(getMessageByCode(data.data.code, this.$i18n.locale))
340
- return
341
- }
342
- this.phaseList = res.data.data.phaseList
343
- })
344
- },
345
- async getPhaseInfo () {
346
- await this.getPhase()
347
- let res = [...this.phaseList]
348
- return res
349
- },
350
- async getControlInfo () {
351
- await this.getTscControlInfo()
352
- // let res = this.controlInfo.controlData
353
- let res = this.controlInfo.tscData
354
- return res
355
- },
356
- clearInterVals () {
357
- this.clearPatternInterval() // 清除定时器
358
- this.clearRegisterMessageTimer() // 清除定时器
359
- },
360
- onSelectStages (value) {
361
- this.currentStage = value
362
- this.$emit('onSelectStages', value)
363
- },
364
- async lockPhase (reqData) {
365
- let res = await this.doPatternCommit(reqData)
366
- return res
367
- },
368
- async unlockPhase (reqData) {
369
- let res = await this.doPatternCommit(reqData)
370
- return res
371
- },
372
- async changeControlPattern (reqData) {
373
- let res = await this.doPatternCommit(reqData)
374
- return res
375
- },
376
- getDetectorStatus () {
377
- this.detIntervalFlag = false
378
- // let agentid = getIframdevid()
379
- return new Promise((resolve, reject) => {
380
- getDetectorStatus(this.agentId).then(data => {
381
- this.detIntervalFlag = true
382
- if (!data.data.success) {
383
- let parrenterror = getMessageByCode(data.data.code, this.$i18n.locale)
384
- if (data.data.data) {
385
- // 子类型错误
386
- let childErrorCode = data.data.data.errorCode
387
- if (childErrorCode) {
388
- let childerror = getMessageByCode(data.data.data.errorCode, this.$i18n.locale)
389
- this.$message.error(parrenterror + ',' + childerror)
390
- }
391
- } else {
392
- this.$message.error(parrenterror)
393
- }
394
- this.clearDetectorStatusTimer()
395
- return
396
- }
397
- this.detectorStatusData = JSON.parse(JSON.stringify(data.data.data))
398
- resolve(this.detectorStatusData)
399
- })
400
- })
401
- },
402
- handleDetectorTimer () {
403
- this.clearDetectorStatusTimer()
404
- if (this.detectorList.length > 0 || this.pedestrainDetectorList.length > 0) {
405
- this.detectorStatusTimer = setInterval(() => {
406
- if (this.detIntervalFlag) {
407
- this.getDetectorStatus()
408
- }
409
- }, 1000)
410
- }
411
- },
412
- handleStageData (data) {
413
- this.getBusPos()
414
- this.stagesList = []
415
- let busPhaseData = this.busPhaseData
416
- let stages = data.stages
417
- if (!stages) return
418
- let stagesTemp = []
419
- for (let stage of stages) {
420
- let tempList = []
421
- let directionList = []
422
- let stageControType = 0
423
- let peddirections = []
424
- for (let stg of stage) {
425
- let currPhase = this.phaseList.filter((item) => {
426
- return item.id === stg
427
- })[0]
428
- if (currPhase !== undefined) {
429
- directionList = [...currPhase.direction, ...directionList]
430
- }
431
- for (let walk of this.sidewalkPhaseData) {
432
- if (stg === walk.phaseid) {
433
- peddirections.push(...currPhase.peddirection)
434
- peddirections = Array.from(new Set(peddirections))
435
- }
436
- }
437
- for (let busPhase of busPhaseData) {
438
- if (stg === busPhase.phaseid) {
439
- stageControType = busPhase.controltype
440
- }
441
- }
442
- }
443
- directionList = [...new Set(directionList)]
444
- if (directionList.length === 0) return
445
- tempList = directionList.map(dir => ({
446
- id: dir,
447
- color: '#606266',
448
- controltype: stageControType,
449
- peddirection: peddirections
450
- }))
451
- stagesTemp.push(tempList)
452
- }
453
- this.stagesList = JSON.parse(JSON.stringify(stagesTemp))
454
- // 相位变化时触发回调
455
- if (this.currentStage !== data.current_stage) {
456
- this.$emit('onPhaseChange', this.stagesList, data.current_stage)
457
- }
458
- this.currentStage = data.current_stage
459
- }
460
- },
461
- created () {
462
- this.agentId = this.AgentId
463
- this.setHost(this.reqUrl)
464
- this.controlFormat = new ControlFormat()
465
- },
466
- mounted () {
467
- setIframdevid(this.AgentId)
468
- this.resetIntersectionMap()
469
- },
470
- destroyed () {
471
- this.destroyIntersectionMap()
472
- }
473
- }
474
- </script>
475
- <style lang="scss">
476
- .abow_dialog {
477
- display: flex;
478
- justify-content: center;
479
- align-items: Center;
480
- overflow: hidden;
481
- .el-dialog {
482
- margin: 0 auto !important;
483
- height: 90%;
484
- overflow: hidden;
485
- .el-dialog__body {
486
- position: absolute;
487
- left: 0;
488
- top: 54px;
489
- bottom: 0;
490
- right: 0;
491
- padding: 0;
492
- z-index: 1;
493
- overflow-y: auto;
494
- overflow-x: auto;
495
- }
496
- }
497
- }
498
- </style>
@@ -1,2 +0,0 @@
1
- import ChannelizationWithInterface from './ChannelizationWithInterface.vue'
2
- export default ChannelizationWithInterface