openatc-components 0.4.90 → 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/config/index.js CHANGED
@@ -15,7 +15,7 @@
15
15
  const fs = require('fs');
16
16
  const path = require('path')
17
17
  let VUE_APP_PROXY_API_TARGET = "http://127.0.0.1:8080"
18
- let VUE_APP_PROXY_MAIN_TARGET = "http://192.168.13.103:10003/openatc"
18
+ let VUE_APP_PROXY_MAIN_TARGET = "http://192.168.14.122:10003/openatc"
19
19
  let VUE_APP_PROXY_SOCKET_TARGET = "http://127.0.0.1:8080"
20
20
  const localFile = path.resolve(__dirname, 'dev.local.js');
21
21
  if (fs.existsSync(localFile)) {
@@ -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
  ]
@@ -148,6 +148,10 @@ export default {
148
148
  refresh () {
149
149
  // 刷新底图
150
150
  this.$refs.intersectionMap2.resetCrossDiagram()
151
+ },
152
+ refreshArrow () {
153
+ // 高亮箭头按最新数据刷新
154
+ this.$refs.intersectionMap2.refreshArrow()
151
155
  }
152
156
  },
153
157
  mounted () {
@@ -1263,8 +1263,10 @@ export default {
1263
1263
  init () {
1264
1264
  this.sidewalkData = JSON.parse(JSON.stringify(this.Data))
1265
1265
  this.getPedDirection()
1266
- this.handleStatus()
1267
- this.IconAddEvent()
1266
+ this.$nextTick(() => {
1267
+ this.handleStatus()
1268
+ this.IconAddEvent()
1269
+ })
1268
1270
  }
1269
1271
  },
1270
1272
  mounted () {
@@ -879,7 +879,16 @@ export default {
879
879
  return
880
880
  }
881
881
  this.isLoaded = true
882
- this.tempType = res.data.data.type
882
+ this.InfoRes = res
883
+ this.handleInfo(res)
884
+ })
885
+ },
886
+ refreshArrow () {
887
+ // 刷新所选方向箭头,不重新请求接口
888
+ this.handleInfo(this.InfoRes)
889
+ },
890
+ handleInfo (res) {
891
+ this.tempType = res.data.data.type
883
892
  // 获取车道相位、行人相位信息(坐标、名称)
884
893
  this.mainType = this.tempType.split('-')[0]
885
894
  this.mainDirection = this.tempType.split('-')[1]
@@ -888,13 +897,11 @@ export default {
888
897
  this.getMergeDirections()
889
898
  }
890
899
  if (this.isVipRoute && !this.isThirdSignal && !this.isRcp) {
891
- alert('1')
892
900
  // 特勤、分组管控下,非第三方设备且不是rcp协议,按通道显示相位方向;第三方设备和rcp协议还是按路口相位配置显示相位方向
893
901
  this.getChannelInfo()
894
902
  return
895
903
  }
896
904
  if (this.channelType && !this.isThirdSignal) {
897
- alert('2')
898
905
  this.getChannelInfo()
899
906
  return
900
907
  }
@@ -915,7 +922,6 @@ export default {
915
922
  this.contrloType = 'ring'
916
923
  }
917
924
  }
918
- })
919
925
  },
920
926
  getTempCrossInfo (res) {
921
927
  this.crossInfo = res.data.data.param
@@ -938,7 +944,6 @@ export default {
938
944
  this.drawDefaultPhaseIcon()
939
945
  }
940
946
  if ((this.isVipRoute && this.isThirdSignal) || (this.isVipRoute && this.isRcp)) {
941
- alert('3')
942
947
  this.LanePhaseData = this.CrossDiagramMgr.compare(this.LanePhaseData, this.overlapLanePhaseData, 'type', 'nostatus')
943
948
  // console.log(this.LanePhaseData)
944
949
  this.sidewalkPhaseData = this.CrossDiagramMgr.compare(this.sidewalkPhaseData, this.overlapsidewalkPhaseData, 'pedtype', 'nostatus')
@@ -1370,7 +1375,6 @@ export default {
1370
1375
  const targetIds = [4, 8, 12, 16] // 掉头相位后画
1371
1376
  this.LanePhaseData = this.LanePhaseData.filter(item => !targetIds.includes(item.id)).concat(this.LanePhaseData.filter(item => targetIds.includes(item.id)))
1372
1377
  if (!this.isThirdSignal && this.isVipRoute && !this.isRcp) {
1373
- alert('4')
1374
1378
  await this.getConflictList()
1375
1379
  this.handleClickedPhase()
1376
1380
  this.compLanePhaseData = JSON.parse(JSON.stringify(this.LanePhaseData))
@@ -1421,7 +1425,7 @@ export default {
1421
1425
  this.EmitAllChoosedDirection(curClickedPhase)
1422
1426
  },
1423
1427
  handleClickedPedPhase () {
1424
- if (!this.isThirdSignal) {
1428
+ if (!this.isThirdSignal && !this.isRcp) {
1425
1429
  this.inneChoosedPedDirection = this.inneChoosedPedDirection.filter(dir => this.pedConflictList.indexOf(dir) === -1)
1426
1430
  }
1427
1431
  // 排他
@@ -191,6 +191,11 @@ export default {
191
191
  this.reset = true
192
192
  })
193
193
  },
194
+ refreshArrow () {
195
+ this.$nextTick(() => {
196
+ this.$refs.crossDiagram.refreshArrow()
197
+ })
198
+ },
194
199
  getParentSize () {
195
200
  // 获取最外层dom尺寸,适配准备
196
201
  var _this = this