openatc-components 0.4.59 → 0.4.61

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.59",
3
+ "version": "0.4.61",
4
4
  "description": "A Vue.js project",
5
5
  "author": "openatc developer",
6
6
  "private": false,
package/src/api/cross.js CHANGED
@@ -46,6 +46,12 @@ export const getValidDirections = (agentid) => {
46
46
  return api.Send({}, {}, [paramList])
47
47
  }
48
48
 
49
+ export const getMergeDirections = (agentid) => {
50
+ let api = new Authapi('getMergeDirections')
51
+ let paramList = [agentid]
52
+ return api.Send({}, {}, [paramList])
53
+ }
54
+
49
55
  export default {
50
56
  saveChannelizatonChart,
51
57
  getChannelizatonChart,
@@ -31,6 +31,15 @@
31
31
  <!-- 右行道路 B-->
32
32
  <div class="right-dir-road" v-if="roadDir === 'right'">
33
33
  <div class="centerText" v-if="crossType !== 'Customroads' && isHasPhase">
34
+ <div class="merge-direction-icon">
35
+ <xdr-dir-selector
36
+ :Data="xdrMData"
37
+ Width="80px"
38
+ Height="80px"
39
+ Widths="80px"
40
+ Heights="80px"
41
+ :showlist="mergeShowList"></xdr-dir-selector>
42
+ </div>
34
43
  <!-- 相位倒计时 -->
35
44
  <div class="phaseCountdown" v-show="isShowInterval" v-if="isLoaded && isHasPhase && isHasCountdown && contrloType === 'ring'" :class="{'countdownBg': isLoaded}">
36
45
  <div v-for="curPhase in phaseCountdownList" :key="curPhase.id" :style="{color: curPhase.phaseCountdownColor}">
@@ -204,7 +213,7 @@ import { getMessageByCode } from '../../../../utils/responseMessage.js'
204
213
 
205
214
  import CrossDirectionConflictList from '../../../../utils/conflictList.js'
206
215
  import RingDataModel from '../../../../utils/RingDataModel.js'
207
- import { getValidDirections } from '../../../../api/cross.js'
216
+ import { getValidDirections, getMergeDirections } from '../../../../api/cross.js'
208
217
 
209
218
  export default {
210
219
  name: 'crossDiagram',
@@ -401,7 +410,12 @@ export default {
401
410
  contrloType: 'ring',
402
411
  isMphaseStatusDataReturnMap: new Map(), // 每个跟随相位的母相位是否返回了相位状态数据
403
412
  overlapStatusCompareSum: 0, // 首次加载跳过比较母相位状态数据是否返回
404
- effectDirData: [] // 路口有效方向
413
+ effectDirData: [], // 路口有效方向
414
+ mergeShowList: [2, 4, 10],
415
+ xdrMData: {
416
+ left: '18px',
417
+ top: '18px'
418
+ }
405
419
  }
406
420
  },
407
421
  methods: {
@@ -867,6 +881,7 @@ export default {
867
881
  this.mainDirection = this.tempType.split('-')[1]
868
882
  if (this.isVipRoute) {
869
883
  this.getValidDirections()
884
+ this.getMergeDirections()
870
885
  }
871
886
  if (this.isVipRoute && !this.isThirdSignal) {
872
887
  // 特勤、分组管控下,非第三方设备,按通道显示相位方向;第三方设备还是按路口相位配置显示相位方向
@@ -1492,6 +1507,30 @@ export default {
1492
1507
  this.effectiveDirection = data.data.data.validDirections || []
1493
1508
  this.getEffectDirectionPos()
1494
1509
  })
1510
+ },
1511
+ getMergeDirections () {
1512
+ getMergeDirections(this.agentId).then((data) => {
1513
+ if (!data.data.success) {
1514
+ this.$message.error(getMessageByCode(data.data.code, this.$i18n.locale))
1515
+ return
1516
+ }
1517
+ this.mergeDirection = data.data.data.mergeDirections || []
1518
+ if (this.mergeDirection && this.mergeDirection.length > 0) {
1519
+ this.mergeShowList = this.mergeDirection.map(dir => {
1520
+ return {
1521
+ id: dir,
1522
+ color: '#6e737c'
1523
+ }
1524
+ })
1525
+ } else {
1526
+ this.mergeShowList = [
1527
+ {
1528
+ id: '',
1529
+ color: '#fff'
1530
+ }
1531
+ ]
1532
+ }
1533
+ })
1495
1534
  }
1496
1535
  },
1497
1536
  mounted () {
@@ -1545,6 +1584,11 @@ export default {
1545
1584
  color: #299BCC;
1546
1585
  margin-top: 20PX;
1547
1586
  }
1587
+ .merge-direction-icon {
1588
+ width: 80PX;
1589
+ height: 80PX;
1590
+ margin: 0 auto;
1591
+ }
1548
1592
 
1549
1593
  .baseImg {
1550
1594
  width: 100%;
@@ -488,7 +488,7 @@ export default {
488
488
  platform: {
489
489
  handler: function (val1, val2) {
490
490
  if (val1 !== val2 && val2 !== undefined) {
491
- this.changeStatus()
491
+ this.handeleChangeStatus()
492
492
  }
493
493
  },
494
494
  // 深度观察监听
@@ -636,8 +636,11 @@ export default {
636
636
  }
637
637
  },
638
638
  changeStatus () {
639
- this.toPage = 1
640
639
  this.isOperation = true
640
+ this.handeleChangeStatus()
641
+ },
642
+ handeleChangeStatus () {
643
+ this.toPage = 1
641
644
  if (this.platform !== undefined && this.platform !== 'OpenATC') {
642
645
  this.queryThirdParty()
643
646
  } else {
@@ -203,18 +203,6 @@ export default {
203
203
  }
204
204
  },
205
205
  watch: {
206
- // phaseList: {
207
- // handler: function (val, oldVal) {
208
- // console.log(val, 'phaseList')
209
- // // debugger
210
- // }
211
- // },
212
- // crossStatusData: {
213
- // handler: function (val, oldVal) {
214
- // console.log(val, 'crossStatusData')
215
- // // debugger
216
- // }
217
- // },
218
206
  preselectStages: {
219
207
  handler: function (val, oldVal) {
220
208
  if(this.preselectStages === -1 && this.preselectModel !== -1) {
@@ -123,7 +123,6 @@ export default {
123
123
  this.getIntersectionInfo(this.agentId, '')
124
124
  this.getPhase()
125
125
  getTscControl(this.agentId).then((data) => {
126
- // debugger
127
126
  if (!data.data.success) {
128
127
  let parrenterror = getMessageByCode(data.data.code, this.$i18n.locale)
129
128
  if (data.data.data) {
@@ -462,5 +462,10 @@
462
462
  "key": "getValidDirections",
463
463
  "url": "/devs/validdirections",
464
464
  "method": "get"
465
+ },
466
+ {
467
+ "key": "getMergeDirections",
468
+ "url": "/devs/mergedirections",
469
+ "method": "get"
465
470
  }
466
471
  ]