openatc-components 0.1.128 → 0.1.130

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.
@@ -50,7 +50,7 @@
50
50
  <el-tooltip class="item" effect="dark" placement="left">
51
51
  <div slot="content">{{element.name}}</div>
52
52
  <div class="common-phase-description">
53
- <xdrdirselector Width="60px" Height="60px" Widths="50px" Heights="50px" :Data="showStyle" :showlist="element.desc" :ISActiveMask="ISActiveMask" :MaskColor="MaskColor"></xdrdirselector>
53
+ <xdrdirselector Width="60px" Height="60px" Widths="50px" Heights="50px" :Data="showStyle" :Datas="showStyle" :showlist="element.desc" :ISActiveMask="ISActiveMask" :MaskColor="MaskColor"></xdrdirselector>
54
54
  </div>
55
55
  </el-tooltip>
56
56
  </el-col>
@@ -59,7 +59,7 @@
59
59
  <div style="margin-top:20px" class="model-label-title">{{currentName}}{{$t('openatccomponents.overview.currentphase')}}:</div>
60
60
  <div class="control-model" v-for="(item, index) in sidewalkPhaseData" :key="index">
61
61
  <div style="position:relative;" class="single-model">
62
- <xdr-dir-selector Width="50PX" Height="50PX" Widths="50PX" Heights="50PX" :Data="showStyle" :showlist="item"></xdr-dir-selector>
62
+ <xdr-dir-selector Width="75PX" Height="75PX" Widths="65PX" Heights="65PX" :Data="showStyle" :Datas="showStyles" :showlist="item"></xdr-dir-selector>
63
63
  <div style="height:65px;display:flex;flex-direction:row;justify-content:center;align-items:end;">
64
64
  <div class="current-stage-num" style="width:20%;">{{index + 1}}</div>
65
65
  <div style="width:70%;">
@@ -102,7 +102,7 @@
102
102
  <script>
103
103
  import { getPhase } from './utils'
104
104
  import { getIframdevid } from '../../../../utils/auth'
105
- import { getlockPhase, lockPhase } from '../../../../api/control'
105
+ import { getlockPhase, lockPhase, getAllDerection } from '../../../../api/control'
106
106
  import Stages from '../../Stages/index'
107
107
  import RingDataModel from '../../../../utils/RingDataModel.js'
108
108
  import { getMessageByCode } from '../../../../utils/responseMessage'
@@ -142,18 +142,25 @@ export default {
142
142
  obj.name = this.$t(obj.name)
143
143
  arrays.push(obj)
144
144
  })
145
- return arrays
145
+ let arr1Ids = this.allDirection.map(item => item.id)
146
+ const result = arrays.filter(item => arr1Ids.includes(item.id))
147
+ return result
146
148
  }
147
149
  },
148
150
  data () {
149
151
  return {
150
152
  showStyle: {
153
+ top: '7PX',
154
+ left: '13px'
155
+ },
156
+ showStyles: {
151
157
  top: '5PX',
152
- left: '14px'
158
+ left: '12px'
153
159
  },
154
160
  sidewalkPhaseData: [],
155
161
  currentName: '',
156
162
  lockList: [],
163
+ allDirection: [],
157
164
  patternCycleEqual: true,
158
165
  spanIndex: [],
159
166
  directions: [],
@@ -167,25 +174,59 @@ export default {
167
174
  }
168
175
  },
169
176
  created () {
177
+ this.getAllDerection()
170
178
  },
171
179
  methods: {
172
180
  checkId (val) {
173
181
  if (val.id === 1) {
174
- return 2
175
- } else if (val.id === 5) {
176
182
  return 1
183
+ } else if (val.id === 5) {
184
+ return 2
177
185
  } else if (val.id === 13) {
178
- return 4
179
- } else if (val.id === 9) {
180
186
  return 3
187
+ } else if (val.id === 9) {
188
+ return 4
181
189
  } else if (val.id === 17) {
182
- return 8
190
+ return 6
183
191
  } else if (val.id === 21) {
184
- return 5
185
- } else if (val.id === 25) {
186
192
  return 7
193
+ } else if (val.id === 25) {
194
+ return 5
187
195
  } else if (val.id === 29) {
188
- return 6
196
+ return 8
197
+ }
198
+ },
199
+ getAllDerection () {
200
+ let iframdevid = getIframdevid()
201
+ getAllDerection(iframdevid).then((res) => {
202
+ if (res.data.success !== true) {
203
+ this.$message.error(getMessageByCode(res.data.code, this.$i18n.locale))
204
+ return
205
+ }
206
+ this.allDirection = res.data.data.map(item => {
207
+ return {
208
+ id: this.checkDirection(item.direction)
209
+ }
210
+ })
211
+ })
212
+ },
213
+ checkDirection (id) {
214
+ if (id === 1) {
215
+ return 1
216
+ } else if (id === 2) {
217
+ return 5
218
+ } else if (id === 3) {
219
+ return 13
220
+ } else if (id === 4) {
221
+ return 9
222
+ } else if (id === 5) {
223
+ return 25
224
+ } else if (id === 6) {
225
+ return 17
226
+ } else if (id === 7) {
227
+ return 21
228
+ } else if (id === 8) {
229
+ return 29
189
230
  }
190
231
  },
191
232
  getLockPhase (val) {
@@ -14,56 +14,56 @@ let images = [
14
14
  {
15
15
  id: 1,
16
16
  // name: 'East-Straight',
17
- name: 'openatccomponents.overview.es',
17
+ name: 'openatccomponents.overview.dong',
18
18
  // img: require('./images/East-Straight.svg'),
19
19
  class: 'iconfont icon-dongzhihang'
20
20
  },
21
21
  {
22
22
  id: 5,
23
23
  // name: 'West-Straight',
24
- name: 'openatccomponents.overview.ws',
24
+ name: 'openatccomponents.overview.xi',
25
25
  // img: require('./images/West-Straight.svg'),
26
26
  class: 'iconfont icon-xizhihang'
27
27
  },
28
28
  {
29
29
  id: 13,
30
30
  // name: 'South-Straight',
31
- name: 'openatccomponents.overview.ss',
31
+ name: 'openatccomponents.overview.nan',
32
32
  // img: require('./images/South-Straight.svg'),
33
33
  class: 'iconfont icon-nanzhihang'
34
34
  },
35
35
  {
36
36
  id: 9,
37
37
  // name: 'North-Straight',
38
- name: 'openatccomponents.overview.ns',
38
+ name: 'openatccomponents.overview.bei',
39
39
  // img: require('./images/North-Straight.svg'),
40
40
  class: 'iconfont icon-beizhihang'
41
41
  },
42
42
  {
43
43
  id: 17,
44
44
  // name: 'South-Back',
45
- name: 'openatccomponents.overview.ses',
45
+ name: 'openatccomponents.overview.dongnan',
46
46
  // img: require('./images/South-Back.svg'),
47
47
  class: 'iconfont icon-dongnanzhihang'
48
48
  },
49
49
  {
50
50
  id: 21,
51
51
  // name: 'South-Back',
52
- name: 'openatccomponents.overview.sws',
52
+ name: 'openatccomponents.overview.xinan',
53
53
  // img: require('./images/South-Back.svg'),
54
54
  class: 'iconfont icon-xinanzhihang'
55
55
  },
56
56
  {
57
57
  id: 25,
58
58
  // name: 'South-Back',
59
- name: 'openatccomponents.overview.nes',
59
+ name: 'openatccomponents.overview.dongbei',
60
60
  // img: require('./images/South-Back.svg'),
61
61
  class: 'iconfont icon-dongbeizhihang'
62
62
  },
63
63
  {
64
64
  id: 29,
65
65
  // name: 'South-Back',
66
- name: 'openatccomponents.overview.nws',
66
+ name: 'openatccomponents.overview.xibei',
67
67
  // img: require('./images/South-Back.svg'),
68
68
  class: 'iconfont icon-xibeizhihang'
69
69
  }
@@ -28,7 +28,7 @@
28
28
  :showWalk="item[0].peddirection"
29
29
  :Width="'40'"
30
30
  :Height="'40'" /> -->
31
- <xdr-dir-selector Width="50PX" Height="50PX" Widths="50px" Heights="50px" :Data="showStyle" :showlist="item"></xdr-dir-selector>
31
+ <xdr-dir-selector Width="75PX" Height="75PX" Widths="65px" Heights="65px" :Data="showStyle" :Datas="showStyles" :showlist="item"></xdr-dir-selector>
32
32
  <div style="height:65px;display:flex;flex-direction:row;justify-content:center;align-items:end;">
33
33
  <div class="current-stage-num" style="width:20%;">{{index + 1}}</div>
34
34
  <div style="width:70%;">
@@ -100,8 +100,12 @@ export default {
100
100
  data () {
101
101
  return {
102
102
  showStyle:{
103
+ top:'7PX',
104
+ left:'13px'
105
+ },
106
+ showStyles:{
103
107
  top:'5PX',
104
- left:'14px'
108
+ left:'12px'
105
109
  },
106
110
  presetStageIndex: -1,
107
111
  side: {key: 'pedphase1653818707546719', phaseid: 1, id: 1, name: '东人行横道'},
@@ -256,7 +256,7 @@
256
256
  </g>
257
257
  </svg>
258
258
  </div>
259
- <div :style="{position: 'absolute', left: Data?Data.left:0, top: Data?Data.top:0}">
259
+ <div :style="{position: 'absolute', left: Datas?Datas.left:0, top: Datas?Datas.top:0}">
260
260
  <svg
261
261
  version="1.1"
262
262
  id="图层_1"
@@ -502,7 +502,7 @@ export default {
502
502
  ]
503
503
  }
504
504
  },
505
- Width: {
505
+ Width: {// 车道宽
506
506
  type: String,
507
507
  default: '60px'
508
508
  },
@@ -510,7 +510,7 @@ export default {
510
510
  type: String,
511
511
  default: '60px'
512
512
  },
513
- Widths: {
513
+ Widths: {// 人行横道宽
514
514
  type: String,
515
515
  default: '50px'
516
516
  },
@@ -530,7 +530,10 @@ export default {
530
530
  type: String,
531
531
  default: '#0096ba'
532
532
  },
533
- Data: {
533
+ Datas: {// 人行横道样式
534
+ type: Object
535
+ },
536
+ Data: {// 车道样式
534
537
  type: Object
535
538
  }
536
539
  },