openatc-components 0.4.91 → 0.4.93

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.93",
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"
@@ -86,6 +96,10 @@
86
96
  <el-button type="primary" @click="savedraw()">{{$t('openatccomponents.button.save')}}</el-button>
87
97
  <el-button type="primary" @click="importFromFile()">{{$t('openatccomponents.main.import')}}</el-button>
88
98
  <el-button type="primary" @click="exportToFile()">{{$t('openatccomponents.main.export')}}</el-button>
99
+ <el-switch
100
+ v-model="isDefaultShowQuhua"
101
+ active-text="渠化默认显示">
102
+ </el-switch>
89
103
  </div>
90
104
  </div>
91
105
  <div class="custom-edit" ref="customEdit">
@@ -306,7 +320,8 @@ export default {
306
320
  ]),
307
321
  phaseAssociatedMap: new Map(), // 关联相位Map: key 是相位ID, value 是车道数据包含direction
308
322
  dialogVisible: false,
309
- LoadedChannelizatonData: {} // 从接口获取到的渠化参数,用于作为加载数据,从文件导入可修改
323
+ LoadedChannelizatonData: {}, // 从接口获取到的渠化参数,用于作为加载数据,从文件导入可修改
324
+ isDefaultShowQuhua: true // 控制总览是否默认显示渠化图的开关
310
325
  }
311
326
  },
312
327
  methods: {
@@ -782,21 +797,7 @@ export default {
782
797
  // }
783
798
  this.index = 0
784
799
  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
- })
800
+ this.reloadDefaultCrossMap('CrossRoad.svg')
800
801
  },
801
802
  // 取消
802
803
  cancledraw () {
@@ -827,7 +828,10 @@ export default {
827
828
  // 保存
828
829
  savedraw () {
829
830
  let temp = {}
830
- temp = this.handleSaveParams()
831
+ temp = {
832
+ ...this.handleSaveParams(),
833
+ isDefaultShowQuhua: this.isDefaultShowQuhua
834
+ }
831
835
  this.saveChannelizatonChart(temp)
832
836
  },
833
837
  // 加载
@@ -1010,6 +1014,39 @@ export default {
1010
1014
  el.click()
1011
1015
  // 移除链接释放资源
1012
1016
  urlObject.revokeObjectURL(url)
1017
+ },
1018
+ handleChangeCrossShapes (shape) {
1019
+ switch (shape) {
1020
+ case '100':
1021
+ this.reloadDefaultCrossMap('TCrossRoad.svg')
1022
+ break
1023
+ case '101':
1024
+ this.reloadDefaultCrossMap('CrossRoad.svg')
1025
+ break
1026
+ case '103':
1027
+ this.reloadDefaultCrossMap('RampRoad.svg')
1028
+ break
1029
+ case '104':
1030
+ this.reloadDefaultCrossMap('PedCrossingRoad.svg')
1031
+ break
1032
+ }
1033
+ },
1034
+ reloadDefaultCrossMap (imgname) {
1035
+ axios.get(`./img/${imgname}`).then((val) => {
1036
+ if (!val.data || val.data === '') return
1037
+ this.CrossMapData = {
1038
+ index: -2,
1039
+ icontype: 'crossmap',
1040
+ x: 435,
1041
+ y: 325,
1042
+ w: 870,
1043
+ h: 650,
1044
+ angle: 0,
1045
+ imgfilesrc: '',
1046
+ svgstr: val.data,
1047
+ type: 'vectorgraph'
1048
+ }
1049
+ })
1013
1050
  }
1014
1051
  },
1015
1052
  mounted () {
@@ -1018,5 +1055,11 @@ export default {
1018
1055
  }
1019
1056
  </script>
1020
1057
 
1021
- <style lang="css" rel="stylesheet/scss">
1058
+ <style lang="css" rel="stylesheet/scss" scoped>
1059
+ .cross-shapes-btn {
1060
+ height: 32PX;
1061
+ width: 90PX;
1062
+ line-height: 32PX;
1063
+ padding: 0;
1064
+ }
1022
1065
  </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
  ]
@@ -1,12 +1,12 @@
1
1
  <template>
2
2
  <!-- 渠化绘制demo -->
3
3
  <div style="height: 100%;">
4
- <custom-channelization
5
- :AgentId="agentId" />
6
- <!-- <CustomChannelization
4
+ <!-- <custom-channelization
5
+ :AgentId="agentId" /> -->
6
+ <CustomChannelization
7
7
  :AgentId="agentId"
8
8
  :tscParam="tscParams"
9
- @saveCallback="saveCallback" /> -->
9
+ @saveCallback="saveCallback" />
10
10
  </div>
11
11
  </template>
12
12
  <script>
@@ -16,7 +16,7 @@ export default {
16
16
  name: 'custom-channelization-demo',
17
17
  data () {
18
18
  return {
19
- agentId: '13000000000000000003',
19
+ agentId: '0',
20
20
  tscParams: {}
21
21
  }
22
22
  },
@@ -39,7 +39,7 @@ export default {
39
39
  created () {
40
40
  },
41
41
  mounted () {
42
- // this.getIntersectionInfo()
42
+ this.getIntersectionInfo()
43
43
  },
44
44
  destroyed () {
45
45
  }
@@ -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: 'eyJraWQiOiIxNzYxMTk4MTU4MzIwIiwidHlwIjoiSldUIiwiYWxnIjoiSFMyNTYifQ.eyJzdWIiOiJhZG1pbiIsImV4cCI6MTc2MTIwMTc1NiwiaWF0IjoxNzYxMTk0NTU2fQ.Y7w2piXOChLTCQR4gdPuNIUpmFZM4d2GO04Ce0xgBOk',
186
190
  // agentId: '30003-352',
187
191
  // reqUrl: 'https://kints-dev.devdolphin.com/openatc',
188
192
  // Token: 'eyJraWQiOiIxNjUwNTA5MDI2ODk2IiwidHlwIjoiSldUIiwiYWxnIjoiSFMyNTYifQ.eyJzdWIiOiJ4aWFvbWluZyIsImV4cCI6MTczNjkwOTAyNiwiaWF0IjoxNjUwNTA5MDI2fQ.-s4T-uMRmB2zf9yer87USKQXLY1a12Zq5lCOnqjNmfA',
@@ -472,9 +476,9 @@ export default {
472
476
  this.$refs.selectMap.refresh()
473
477
  },
474
478
  clear () {
475
- // this.choosedDirection = []
476
- // this.choosedPedDirection = []
477
- // this.$refs.intersectionMap3.resetCrossDiagram()
479
+ this.choosedDirection = []
480
+ this.choosedPedDirection = []
481
+ this.$refs.intersectionMap3.resetCrossDiagram()
478
482
  },
479
483
  changeChoosedDir () {
480
484
  this.choosedDirection = [2]