openatc-components 0.3.17 → 0.3.19
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/config/index.js +1 -1
- package/package/kisscomps/components/ChannelRealtimeIntersection/ChannelRealtimeIntersection.vue +26 -7
- package/package/kisscomps/components/IntersectionMap/crossDirection/crossDiagram.vue +85 -81
- package/package/kisscomps/components/PhaseLegend/PhaseLegend.vue +290 -0
- package/package/kisscomps/components/PhaseLegend/index.js +2 -0
- package/package/kisscomps/index.js +3 -1
- package/package/kissui.min.js +1 -1
- package/package.json +1 -1
- package/src/kisscomps/components/ChannelRealtimeIntersection/ChannelRealtimeIntersection.vue +26 -7
- package/src/kisscomps/components/IntersectionMap/crossDirection/crossDiagram.vue +85 -81
- package/src/kisscomps/components/PhaseLegend/PhaseLegend.vue +290 -0
- package/src/kisscomps/components/PhaseLegend/index.js +2 -0
- package/src/kisscomps/index.js +3 -1
- package/src/router/index.js +1 -1
- package/src/utils/RingDataModel.js +18 -7
- package/src/views/intersection.vue +111 -3
- package/src/views/overView.vue +1 -1
- package/static/styles/phasePedSelect.scss +1 -0
- package/static/styles/stages.scss +2 -2
|
@@ -106,6 +106,22 @@
|
|
|
106
106
|
<!-- <Stages :stagesList="stagesList"
|
|
107
107
|
:currentStage="currentStage"
|
|
108
108
|
@onSelectStages="onSelectStages"></Stages> -->
|
|
109
|
+
<div style="height: 100px;">
|
|
110
|
+
<PhaseLegend :crossStatusData="tscControlData"
|
|
111
|
+
:phaseList="phaseList"
|
|
112
|
+
showDataType="phase"
|
|
113
|
+
:noClick="true"
|
|
114
|
+
:isShowCurrentStage="false"
|
|
115
|
+
StageWidth="46px"
|
|
116
|
+
StageHeight="52px"
|
|
117
|
+
dirWidth="46px"
|
|
118
|
+
dirHeight="52px"
|
|
119
|
+
dirWidths="46px"
|
|
120
|
+
dirHeights="52px"
|
|
121
|
+
:showStyle="{top:'2PX',left:'9px'}"
|
|
122
|
+
:showStyles="{top:'0PX',left:'7px'}"
|
|
123
|
+
></PhaseLegend>
|
|
124
|
+
</div>
|
|
109
125
|
|
|
110
126
|
<!-- <h2 style="color: #fff;">渠化图</h2>
|
|
111
127
|
<channelization-with-interface
|
|
@@ -133,18 +149,24 @@ import {
|
|
|
133
149
|
} from '../utils/auth'
|
|
134
150
|
import IntersectionWithInterface from '../kisscomps/components/IntersectionWithInterface'
|
|
135
151
|
import ChannelizationWithInterface from '../kisscomps/components/ChannelizationWithInterface/ChannelizationWithInterface'
|
|
152
|
+
import {
|
|
153
|
+
getTscPhase
|
|
154
|
+
} from '../api/cross.js'
|
|
155
|
+
import {
|
|
156
|
+
getTscControl
|
|
157
|
+
} from '../api/control.js'
|
|
136
158
|
export default {
|
|
137
159
|
name: 'demo',
|
|
138
160
|
data () {
|
|
139
161
|
return {
|
|
140
162
|
roadDirection: 'right',
|
|
141
163
|
// reqUrl: 'http://192.168.13.103:10003/openatc',
|
|
142
|
-
agentId: '
|
|
164
|
+
agentId: '12008_ticp',
|
|
143
165
|
// agentId: '13013',
|
|
144
166
|
// agentId: '12007_390',
|
|
145
167
|
// agentId: '12014',
|
|
146
168
|
reqUrl: 'http://192.168.13.103:10003/openatc',
|
|
147
|
-
Token: '
|
|
169
|
+
Token: 'eyJraWQiOiIxNzIxOTcwMTEzMTMwIiwidHlwIjoiSldUIiwiYWxnIjoiSFMyNTYifQ.eyJzdWIiOiJhZG1pbiIsImV4cCI6MTcyMTk3MzcxMywiaWF0IjoxNzIxOTY2NTEzfQ.aT14xZel09fHji-SrPMDTPAxISEUS8Y6KF30BWjCGKY',
|
|
148
170
|
// agentId: '30003-352',
|
|
149
171
|
// reqUrl: 'https://kints-dev.devdolphin.com/openatc',
|
|
150
172
|
// Token: 'eyJraWQiOiIxNjUwNTA5MDI2ODk2IiwidHlwIjoiSldUIiwiYWxnIjoiSFMyNTYifQ.eyJzdWIiOiJ4aWFvbWluZyIsImV4cCI6MTczNjkwOTAyNiwiaWF0IjoxNjUwNTA5MDI2fQ.-s4T-uMRmB2zf9yer87USKQXLY1a12Zq5lCOnqjNmfA',
|
|
@@ -187,6 +209,72 @@ export default {
|
|
|
187
209
|
}
|
|
188
210
|
],
|
|
189
211
|
crossStatusData: {},
|
|
212
|
+
crossStatusDataMock:
|
|
213
|
+
{
|
|
214
|
+
'agentid': '12008_ticp',
|
|
215
|
+
'operation': 'get-request',
|
|
216
|
+
'infotype': 'status/pattern',
|
|
217
|
+
'data': {
|
|
218
|
+
'phase': [
|
|
219
|
+
{
|
|
220
|
+
'id': 1,
|
|
221
|
+
'type': 1,
|
|
222
|
+
'pedtype': 1
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
'id': 3,
|
|
226
|
+
'type': 1,
|
|
227
|
+
'pedtype': 1
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
'id': 4,
|
|
231
|
+
'type': 1,
|
|
232
|
+
'pedtype': 1
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
'id': 6,
|
|
236
|
+
'type': 3,
|
|
237
|
+
'pedtype': 3
|
|
238
|
+
}
|
|
239
|
+
],
|
|
240
|
+
'mode': 0,
|
|
241
|
+
'control': 5,
|
|
242
|
+
'patternid': 2,
|
|
243
|
+
'cycle': 141,
|
|
244
|
+
'stages': [
|
|
245
|
+
[
|
|
246
|
+
1
|
|
247
|
+
],
|
|
248
|
+
[
|
|
249
|
+
4,
|
|
250
|
+
3
|
|
251
|
+
],
|
|
252
|
+
[
|
|
253
|
+
6
|
|
254
|
+
]
|
|
255
|
+
],
|
|
256
|
+
'stages_len': [
|
|
257
|
+
70,
|
|
258
|
+
25,
|
|
259
|
+
46
|
|
260
|
+
],
|
|
261
|
+
'stages_seq': [
|
|
262
|
+
1,
|
|
263
|
+
2,
|
|
264
|
+
3
|
|
265
|
+
],
|
|
266
|
+
'current_stage': 3,
|
|
267
|
+
'current_stagecd': 15,
|
|
268
|
+
'offset': 0,
|
|
269
|
+
'current_phase': [
|
|
270
|
+
6
|
|
271
|
+
],
|
|
272
|
+
'next_phase': [
|
|
273
|
+
1
|
|
274
|
+
],
|
|
275
|
+
'curTime': 127
|
|
276
|
+
}
|
|
277
|
+
},
|
|
190
278
|
channelRealtimeStatusData: {
|
|
191
279
|
'channellamp': [
|
|
192
280
|
{
|
|
@@ -234,7 +322,9 @@ export default {
|
|
|
234
322
|
'light': 3
|
|
235
323
|
}
|
|
236
324
|
]
|
|
237
|
-
}
|
|
325
|
+
},
|
|
326
|
+
tscControlData: {},
|
|
327
|
+
phaseList: []
|
|
238
328
|
}
|
|
239
329
|
},
|
|
240
330
|
components: {
|
|
@@ -325,6 +415,19 @@ export default {
|
|
|
325
415
|
// this.controlName = control
|
|
326
416
|
// this.modeName = mode
|
|
327
417
|
},
|
|
418
|
+
getTscControlData () {
|
|
419
|
+
this.tscControlData = {}
|
|
420
|
+
getTscControl(this.agentId).then((data) => {
|
|
421
|
+
this.tscControlData = data.data.data.data
|
|
422
|
+
}).catch(error => {
|
|
423
|
+
console.log(error)
|
|
424
|
+
})
|
|
425
|
+
},
|
|
426
|
+
getCurPhaseDirection () {
|
|
427
|
+
getTscPhase(this.agentId).then(res => {
|
|
428
|
+
this.phaseList = res.data.data.data.phaseList
|
|
429
|
+
})
|
|
430
|
+
},
|
|
328
431
|
registerMessage (res) {
|
|
329
432
|
console.log('registerMessage:', res)
|
|
330
433
|
},
|
|
@@ -363,6 +466,11 @@ export default {
|
|
|
363
466
|
this.setDialogWidth()
|
|
364
467
|
})()
|
|
365
468
|
}
|
|
469
|
+
this.getTscControlData()
|
|
470
|
+
this.getCurPhaseDirection()
|
|
471
|
+
// setTimeout(() => {
|
|
472
|
+
// this.crossStatusData = this.crossStatusDataMock.data
|
|
473
|
+
// }, 1000)
|
|
366
474
|
},
|
|
367
475
|
destroyed () {
|
|
368
476
|
}
|
package/src/views/overView.vue
CHANGED
|
@@ -20,7 +20,7 @@ export default {
|
|
|
20
20
|
modeName: '交警遥控',
|
|
21
21
|
controlName: '步进',
|
|
22
22
|
agentId: 'jmlxhl',
|
|
23
|
-
Token: '
|
|
23
|
+
Token: 'eyJraWQiOiIxNzA4OTA5NDk2ODcxIiwidHlwIjoiSldUIiwiYWxnIjoiSFMyNTYifQ.eyJzdWIiOiJhZG1pbiIsImV4cCI6MTcwODk1MjY5NiwiaWF0IjoxNzA4OTA5NDk2fQ.FI0gzBQFLyQsj95LG56lVZxb6WYlr2-datNsyv6fF-I',
|
|
24
24
|
reqUrl: 'http://192.168.13.103:10003/openatc'
|
|
25
25
|
}
|
|
26
26
|
},
|