openatc-components 0.1.11 → 0.1.13

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.
@@ -226,6 +226,10 @@ export default {
226
226
  controlName: {
227
227
  type: String,
228
228
  default: ''
229
+ },
230
+ stateName: {
231
+ type: String,
232
+ default: ''
229
233
  }
230
234
  },
231
235
  // computed: {
@@ -260,6 +264,12 @@ export default {
260
264
  this.isHasPhase = false
261
265
  return
262
266
  }
267
+ if (val.control === 16) {
268
+ // 方向锁定时,相位状态显示与通道无关,显示接口返回的红灯会有歧义,此处特殊处理显示默认白色
269
+ this.handleSpecialControlStatus('方向锁定')
270
+ this.isHasPhase = false
271
+ return
272
+ }
263
273
  this.curPhase = val.current_phase
264
274
  this.isHasPhase = true
265
275
  this.createPhaseStatusMap()
@@ -310,7 +320,6 @@ export default {
310
320
  },
311
321
  data () {
312
322
  return {
313
- stateName: '',
314
323
  roadDir: 'right', // 道路行车方向,默认右行
315
324
  phaseCountdownList: [], // 相位倒计时列表
316
325
  statusData: null, // 信号机状态
@@ -328,7 +337,7 @@ export default {
328
337
  crossType: '', // 路口底图类型
329
338
  isLoaded: false, // 是否成功加载底图
330
339
  isHasPhase: true, // 是否有相位状态数据
331
- phaseControlColorMap: new Map([['黄闪', '#f7b500'], ['全红', '#ff2828'], ['关灯', '#828282'], ['默认', '#fff']]),
340
+ phaseControlColorMap: new Map([['黄闪', '#f7b500'], ['全红', '#ff2828'], ['关灯', '#828282'], ['默认', '#fff'], ['方向锁定', '#fff']]),
332
341
  sidewalkPhaseData: [], // 行人相位
333
342
  overlapsidewalkPhaseData: [], // 行人跟随相位
334
343
  resetflag: true, // 离线后,控制行人相位、车道相位reset标识
@@ -554,7 +563,6 @@ export default {
554
563
  if (!res.data.success) {
555
564
  this.isLoaded = false
556
565
  let commomMsg = this.$t('openatccomponents.overview.signalID') + ' : ' + agentid
557
- this.stateName = this.$t('openatccomponents.overview.offline')
558
566
  let msg = getMessageByCode(res.data.code, this.$i18n.locale)
559
567
  if (res.data.data) {
560
568
  // 子类型错误
@@ -568,7 +576,6 @@ export default {
568
576
  this.$message.error(msg)
569
577
  return
570
578
  }
571
- this.stateName = this.$t('openatccomponents.overview.online')
572
579
  this.isLoaded = true
573
580
  this.crossInfo = res.data.data.param
574
581
  this.tempType = res.data.data.type
@@ -31,6 +31,7 @@
31
31
  :isShowMode="isShowMode"
32
32
  :modeName="modeName"
33
33
  :controlName="controlName"
34
+ :stateName="stateName"
34
35
  :devStatus="devStatus"
35
36
  :roadDirection="roadDirection" />
36
37
  </div>
@@ -95,6 +96,10 @@ export default {
95
96
  controlName: {
96
97
  type: String,
97
98
  default: ''
99
+ },
100
+ stateName: {
101
+ type: String,
102
+ default: ''
98
103
  }
99
104
  },
100
105
  watch: {
@@ -21,6 +21,7 @@
21
21
  :roadDirection="roadDirection"
22
22
  :modeName="modeName !== '' ? modeName : controlData.mode"
23
23
  :controlName="controlName !== '' ? controlName : controlData.control"
24
+ :stateName="stateName"
24
25
  :isShowMode="isShowMode"
25
26
  :isShowState="isShowState"
26
27
  :isShowInterval="isShowInterval"
@@ -41,6 +42,7 @@ export default {
41
42
  },
42
43
  data () {
43
44
  return {
45
+ stateName: this.$t('openatccomponents.overview.offline'),
44
46
  controlData: {},
45
47
  boxVisible: false,
46
48
  dialogWidth: '100%',
@@ -244,6 +246,12 @@ export default {
244
246
  _this.agentName = res.data.data.name
245
247
  }
246
248
  _this.platform = res.data.data.platform
249
+ let state = res.data.data.state
250
+ if (state === 'UP') {
251
+ _this.stateName = _this.$t('openatccomponents.overview.online')
252
+ } else {
253
+ _this.stateName = _this.$t('openatccomponents.overview.offline')
254
+ }
247
255
  _this.$refs.intersectionMap.resetCrossDiagram()
248
256
  _this.registerMessage() // 注册消息
249
257
  _this.$emit('queryDevice', res)
@@ -27,6 +27,7 @@
27
27
  <intersection-base-map
28
28
  ref="intersectionMap"
29
29
  :modeName="modeName"
30
+ :stateName="stateName"
30
31
  :controlName="controlName"
31
32
  :isShowState="isShowState"
32
33
  :isShowMode="isShowMode"
@@ -138,6 +139,7 @@ export default {
138
139
  },
139
140
  data () {
140
141
  return {
142
+ stateName: this.$t('openatccomponents.overview.offline'),
141
143
  curBodyWidth: 1920,
142
144
  graphicMode: false,
143
145
  FuncSort: 'allFunc',
@@ -643,6 +645,12 @@ export default {
643
645
  this.agentName = res.data.data.name
644
646
  }
645
647
  this.platform = res.data.data.platform
648
+ let state = res.data.data.state
649
+ if (state === 'UP') {
650
+ this.stateName = this.$t('openatccomponents.overview.online')
651
+ } else {
652
+ this.stateName = this.$t('openatccomponents.overview.offline')
653
+ }
646
654
  // let func = 'allFunc'
647
655
  // if (this.platform === 'OpenATC') {
648
656
  // func = 'allFunc'