openatc-components 0.4.91 → 0.4.92

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.4.91",
3
+ "version": "0.4.92",
4
4
  "description": "A Vue.js project",
5
5
  "author": "openatc developer",
6
6
  "private": false,
@@ -1045,7 +1045,9 @@ const en = {
1045
1045
  'tjunction': 'T-junction',
1046
1046
  'roundabout': 'Roundabout',
1047
1047
  'rampintersection': 'RampIntersection',
1048
+ 'rampintersection2': 'Auxiliary Road Inbound',
1048
1049
  'pedestriancrossing': 'PedestrianCrossing',
1050
+ 'pedestriancrossing2': 'Road Section Crossing',
1049
1051
  'otherIntersections': 'OtherIntersections',
1050
1052
  'customIntersection': 'CustomIntersection'
1051
1053
  },
@@ -1408,7 +1410,7 @@ const en = {
1408
1410
  'importtip': 'The picture format is SVG, PNG and JPG, and the size is no more than 10MB',
1409
1411
  'importsizeerror': 'Picture size exceeds 10MB, please re import!',
1410
1412
  'importtypeerror': 'Picture format error, please import again!',
1411
- 'importcrosspicture': 'Import intersection picture',
1413
+ 'importcrosspicture': 'Intersection Map',
1412
1414
  'againimport': 'Re import',
1413
1415
  'motorway': 'Motorway',
1414
1416
  'bicyclelane': 'Non motorized Lane',
@@ -1042,10 +1042,12 @@ const zh = {
1042
1042
  'annual': '全年',
1043
1043
  'crossShapes': {
1044
1044
  'crossroads': '十字路口',
1045
- 'tjunction': '丁字路口',
1045
+ 'tjunction': 'T字路口',
1046
1046
  'roundabout': '环形路口',
1047
1047
  'rampintersection': '匝道路口',
1048
+ 'rampintersection2': '辅路汇入',
1048
1049
  'pedestriancrossing': '行人过街路口',
1050
+ 'pedestriancrossing2': '路段过街',
1049
1051
  'otherIntersections': '其他形状路口',
1050
1052
  'customIntersection': '自定义路口'
1051
1053
  },
@@ -1408,7 +1410,7 @@ const zh = {
1408
1410
  'importtip': '图片格式为svg、png、jpg,大小不超过10Mb',
1409
1411
  'importsizeerror': '图片大小超过10Mb,请重新导入!',
1410
1412
  'importtypeerror': '图片格式错误,请重新导入!',
1411
- 'importcrosspicture': '导入路口图片',
1413
+ 'importcrosspicture': '路口底图',
1412
1414
  'againimport': '重新导入',
1413
1415
  'motorway': '机动车道',
1414
1416
  'bicyclelane': '非机动车道',
@@ -19,7 +19,17 @@
19
19
  <!-- 绘制功能 -->
20
20
  <div class="draw-function">
21
21
  <div class="again-import">
22
- <span class="import-label">{{$t('openatccomponents.channelizationmap.importcrosspicture')}}</span>
22
+ <el-dropdown @command="handleChangeCrossShapes">
23
+ <el-button type="primary" class="cross-shapes-btn">
24
+ {{$t('openatccomponents.channelizationmap.importcrosspicture')}}<i class="el-icon-arrow-down el-icon--right"></i>
25
+ </el-button>
26
+ <el-dropdown-menu slot="dropdown">
27
+ <el-dropdown-item command="101">{{$t('openatccomponents.importTemp.crossShapes.crossroads')}}</el-dropdown-item>
28
+ <el-dropdown-item command="100">{{$t('openatccomponents.importTemp.crossShapes.tjunction')}}</el-dropdown-item>
29
+ <el-dropdown-item command="103">{{$t('openatccomponents.importTemp.crossShapes.rampintersection2')}}</el-dropdown-item>
30
+ <el-dropdown-item command="104">{{$t('openatccomponents.importTemp.crossShapes.pedestriancrossing2')}}</el-dropdown-item>
31
+ </el-dropdown-menu>
32
+ </el-dropdown>
23
33
  <el-button
24
34
  class="again-import-btn"
25
35
  type="primary"
@@ -782,21 +792,7 @@ export default {
782
792
  // }
783
793
  this.index = 0
784
794
  this.curChooseIcon = {}
785
- axios.get('./img/CrossRoadsSvg.svg').then((val) => {
786
- if (!val.data || val.data === '') return
787
- this.CrossMapData = {
788
- index: -2,
789
- icontype: 'crossmap',
790
- x: 435,
791
- y: 325,
792
- w: 870,
793
- h: 650,
794
- angle: 0,
795
- imgfilesrc: '',
796
- svgstr: val.data,
797
- type: 'vectorgraph'
798
- }
799
- })
795
+ this.reloadDefaultCrossMap('CrossRoad.svg')
800
796
  },
801
797
  // 取消
802
798
  cancledraw () {
@@ -1010,6 +1006,39 @@ export default {
1010
1006
  el.click()
1011
1007
  // 移除链接释放资源
1012
1008
  urlObject.revokeObjectURL(url)
1009
+ },
1010
+ handleChangeCrossShapes (shape) {
1011
+ switch (shape) {
1012
+ case '100':
1013
+ this.reloadDefaultCrossMap('TCrossRoad.svg')
1014
+ break
1015
+ case '101':
1016
+ this.reloadDefaultCrossMap('CrossRoad.svg')
1017
+ break
1018
+ case '103':
1019
+ this.reloadDefaultCrossMap('RampRoad.svg')
1020
+ break
1021
+ case '104':
1022
+ this.reloadDefaultCrossMap('PedCrossingRoad.svg')
1023
+ break
1024
+ }
1025
+ },
1026
+ reloadDefaultCrossMap (imgname) {
1027
+ axios.get(`./img/${imgname}`).then((val) => {
1028
+ if (!val.data || val.data === '') return
1029
+ this.CrossMapData = {
1030
+ index: -2,
1031
+ icontype: 'crossmap',
1032
+ x: 435,
1033
+ y: 325,
1034
+ w: 870,
1035
+ h: 650,
1036
+ angle: 0,
1037
+ imgfilesrc: '',
1038
+ svgstr: val.data,
1039
+ type: 'vectorgraph'
1040
+ }
1041
+ })
1013
1042
  }
1014
1043
  },
1015
1044
  mounted () {
@@ -1018,5 +1047,11 @@ export default {
1018
1047
  }
1019
1048
  </script>
1020
1049
 
1021
- <style lang="css" rel="stylesheet/scss">
1050
+ <style lang="css" rel="stylesheet/scss" scoped>
1051
+ .cross-shapes-btn {
1052
+ height: 32PX;
1053
+ width: 90PX;
1054
+ line-height: 32PX;
1055
+ padding: 0;
1056
+ }
1022
1057
  </style>
@@ -112,7 +112,7 @@ export default {
112
112
  return data.direction.map(dir => {
113
113
  return {
114
114
  id: dir,
115
- peddirection: this.getshowped(data.peddirection),
115
+ peddirection: data.peddirection ? this.getshowped(data.peddirection) : [],
116
116
  color: '#1E1E1E'
117
117
  }
118
118
  })
@@ -120,7 +120,7 @@ export default {
120
120
  return [
121
121
  {
122
122
  id: '',
123
- peddirection: this.getshowped(data.peddirection),
123
+ peddirection: data.peddirection ? this.getshowped(data.peddirection) : [],
124
124
  color: '#1E1E1E'
125
125
  }
126
126
  ]
@@ -2,6 +2,7 @@
2
2
  <!-- 渠化绘制demo -->
3
3
  <div style="height: 100%;">
4
4
  <custom-channelization
5
+ :tscParam="tscParams"
5
6
  :AgentId="agentId" />
6
7
  <!-- <CustomChannelization
7
8
  :AgentId="agentId"
@@ -16,7 +17,7 @@ export default {
16
17
  name: 'custom-channelization-demo',
17
18
  data () {
18
19
  return {
19
- agentId: '13000000000000000003',
20
+ agentId: '16005',
20
21
  tscParams: {}
21
22
  }
22
23
  },
@@ -39,7 +40,7 @@ export default {
39
40
  created () {
40
41
  },
41
42
  mounted () {
42
- // this.getIntersectionInfo()
43
+ this.getIntersectionInfo()
43
44
  },
44
45
  destroyed () {
45
46
  }
@@ -52,13 +52,13 @@
52
52
  :roadDirection="roadDirection" /> -->
53
53
  <el-button @click="refresh">刷新特勤路口底图</el-button>
54
54
  <el-button @click="changeChoosedDir" style="color: #fff;">重置所选方向</el-button>
55
- <intersection-direction-selection
55
+ <!-- <intersection-direction-selection
56
56
  ref="selectMap"
57
57
  agentId="16005"
58
58
  :clickMode="false"
59
59
  :choosedDirection="choosedDirection"
60
60
  :choosedPedDirection="choosedPedDirection"
61
- :roadDirection="roadDirection" />
61
+ :roadDirection="roadDirection" /> -->
62
62
 
63
63
  <!-- <button @click="lockPhase" >相位锁定</button><br/>
64
64
  <button @click="unlockPhase" >解锁相位</button><br/>
@@ -122,7 +122,7 @@
122
122
  <!-- <Stages :stagesList="stagesList"
123
123
  :currentStage="currentStage"
124
124
  @onSelectStages="onSelectStages"></Stages> -->
125
- <div style="height: 100px;">
125
+ <!-- <div style="height: 100px;">
126
126
  <PhaseLegend :crossStatusData="tscControlData"
127
127
  :phaseList="phaseList"
128
128
  showDataType="phase"
@@ -137,18 +137,22 @@
137
137
  :showStyle="{top:'2PX',left:'9px'}"
138
138
  :showStyles="{top:'0PX',left:'7px'}"
139
139
  ></PhaseLegend>
140
- </div>
140
+ </div> -->
141
141
 
142
- <!-- <h2 style="color: #fff;">渠化图</h2>
143
- <channelization-with-interface
142
+ <h2 style="color: #fff;">渠化图</h2>
143
+ <!-- <channelization-with-interface
144
144
  ref="channelization"
145
145
  :AgentId="agentId"
146
146
  :reqUrl="reqUrl"
147
147
  :Token="Token"
148
148
  @getTscControl="getTscControl"
149
- @onPhaseChange="onPhaseChange"/>
149
+ @onPhaseChange="onPhaseChange"/> -->
150
+ <channelization
151
+ AgentId="16005"
152
+ :crossStatusData="crossStatusData2"
153
+ :detectorStatusData="{}" />
150
154
 
151
- <h2 style="color: #fff;">流量统计渠化路口图</h2>
155
+ <!-- <h2 style="color: #fff;">流量统计渠化路口图</h2>
152
156
  <channelization-flow-statistic
153
157
  :AgentId="agentId"
154
158
  :phasesStatisticsList="phasesStatisticsList"
@@ -177,12 +181,12 @@ export default {
177
181
  return {
178
182
  roadDirection: 'right',
179
183
  // reqUrl: 'http://192.168.13.103:10003/openatc',
180
- agentId: '1059',
184
+ agentId: '16005',
181
185
  // agentId: '13013',
182
186
  // agentId: '12007_390',
183
187
  // agentId: '12014',
184
188
  reqUrl: 'http://192.168.13.103:10003/openatc',
185
- Token: 'eyJraWQiOiIxNzYwNjkyMjE3ODM1IiwidHlwIjoiSldUIiwiYWxnIjoiSFMyNTYifQ.eyJzdWIiOiJhZG1pbiIsImV4cCI6MTc2MDY5NTgxNywiaWF0IjoxNzYwNjg4NjE3fQ.ZOhFCKr7YjVJ-b7mD2G9EE34Pi3XBkdk73rMT0QdP8E',
189
+ Token: 'eyJraWQiOiIxNzYxMTgyODkxNDMzIiwidHlwIjoiSldUIiwiYWxnIjoiSFMyNTYifQ.eyJzdWIiOiJhZG1pbiIsImV4cCI6MTc2MTE4NjQ4OSwiaWF0IjoxNzYxMTc5Mjg5fQ.UHfHzNNby-Y-kee-83_4KEjESDIf4InAvmYSmVmLvk4',
186
190
  // agentId: '30003-352',
187
191
  // reqUrl: 'https://kints-dev.devdolphin.com/openatc',
188
192
  // Token: 'eyJraWQiOiIxNjUwNTA5MDI2ODk2IiwidHlwIjoiSldUIiwiYWxnIjoiSFMyNTYifQ.eyJzdWIiOiJ4aWFvbWluZyIsImV4cCI6MTczNjkwOTAyNiwiaWF0IjoxNjUwNTA5MDI2fQ.-s4T-uMRmB2zf9yer87USKQXLY1a12Zq5lCOnqjNmfA',
@@ -342,7 +346,134 @@ export default {
342
346
  tscControlData: {},
343
347
  phaseList: [],
344
348
  choosedDirection: [1, 5],
345
- choosedPedDirection: [3]
349
+ choosedPedDirection: [3],
350
+ crossStatusData2: {
351
+ 'phase': [
352
+ {
353
+ 'id': 1,
354
+ 'type': 3,
355
+ 'pedtype': 3
356
+ },
357
+ {
358
+ 'id': 2,
359
+ 'type': 1,
360
+ 'pedtype': 1
361
+ },
362
+ {
363
+ 'id': 3,
364
+ 'type': 1,
365
+ 'pedtype': 1
366
+ },
367
+ {
368
+ 'id': 4,
369
+ 'type': 1,
370
+ 'pedtype': 1
371
+ }
372
+ ],
373
+ 'mode': 0,
374
+ 'control': 5,
375
+ 'patternid': 2,
376
+ 'cycle': 107,
377
+ 'patternoffset': 0,
378
+ 'stages': [
379
+ [
380
+ 1
381
+ ],
382
+ [
383
+ 2
384
+ ],
385
+ [
386
+ 3
387
+ ],
388
+ [
389
+ 4
390
+ ],
391
+ [
392
+ 1
393
+ ],
394
+ [
395
+ 2
396
+ ],
397
+ [
398
+ 3
399
+ ],
400
+ [
401
+ 4
402
+ ],
403
+ [
404
+ 1
405
+ ],
406
+ [
407
+ 2
408
+ ],
409
+ [
410
+ 3
411
+ ],
412
+ [
413
+ 4
414
+ ],
415
+ [
416
+ 1
417
+ ],
418
+ [
419
+ 2
420
+ ],
421
+ [
422
+ 3
423
+ ],
424
+ [
425
+ 4
426
+ ]
427
+ ],
428
+ 'stages_len': [
429
+ 0,
430
+ 0,
431
+ 0,
432
+ 0,
433
+ 0,
434
+ 0,
435
+ 0,
436
+ 0,
437
+ 0,
438
+ 0,
439
+ 0,
440
+ 0,
441
+ 0,
442
+ 0,
443
+ 0,
444
+ 0
445
+ ],
446
+ 'stages_seq': [
447
+ 1,
448
+ 2,
449
+ 3,
450
+ 4,
451
+ 5,
452
+ 6,
453
+ 7,
454
+ 8,
455
+ 9,
456
+ 10,
457
+ 11,
458
+ 12,
459
+ 13,
460
+ 14,
461
+ 15,
462
+ 16
463
+ ],
464
+ 'current_stage': 1,
465
+ 'current_stagecd': 0,
466
+ 'offset': 0,
467
+ 'current_phase': [
468
+ 1
469
+ ],
470
+ 'next_phase': [
471
+ 2
472
+ ],
473
+ 'rings': [],
474
+ 'curTime': 43,
475
+ 'syncTime': 64
476
+ }
346
477
  }
347
478
  },
348
479
  components: {
@@ -472,9 +603,9 @@ export default {
472
603
  this.$refs.selectMap.refresh()
473
604
  },
474
605
  clear () {
475
- // this.choosedDirection = []
476
- // this.choosedPedDirection = []
477
- // this.$refs.intersectionMap3.resetCrossDiagram()
606
+ this.choosedDirection = []
607
+ this.choosedPedDirection = []
608
+ this.$refs.intersectionMap3.resetCrossDiagram()
478
609
  },
479
610
  changeChoosedDir () {
480
611
  this.choosedDirection = [2]