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/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"
@@ -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
  ]