openatc-components 0.4.57 → 0.4.59

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.
Files changed (24) hide show
  1. package/package/kisscomps/components/BoardCard/BoardCard.vue +0 -4
  2. package/package/kisscomps/components/IntersectionDirectionSelection/IntersectionDirectionSelection.vue +4 -0
  3. package/package/kisscomps/components/IntersectionMap/crossDirection/crossDiagram.vue +34 -1
  4. package/package/kisscomps/components/IntersectionMap/crossDirection/posJson/effectPos.json +115 -0
  5. package/package/kisscomps/components/IntersectionMap/crossDirection/utils.js +7 -0
  6. package/package/kisscomps/components/PatternStatus/PatternStatus.vue +1 -81
  7. package/package/kisscomps/components/patternList/patternList.vue +0 -4
  8. package/package/kissui.min.js +1 -1
  9. package/package/static/img/CrossRoadsSvg.66a6236.svg +529 -0
  10. package/package.json +1 -1
  11. package/src/api/cross.js +8 -1
  12. package/src/kisscomps/components/BoardCard/BoardCard.vue +0 -4
  13. package/src/kisscomps/components/IntersectionDirectionSelection/IntersectionDirectionSelection.vue +4 -0
  14. package/src/kisscomps/components/IntersectionMap/crossDirection/crossDiagram.vue +34 -1
  15. package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/effectPos.json +115 -0
  16. package/src/kisscomps/components/IntersectionMap/crossDirection/utils.js +7 -0
  17. package/src/kisscomps/components/PatternStatus/PatternStatus.vue +1 -81
  18. package/src/kisscomps/components/patternList/patternList.vue +0 -4
  19. package/src/views/intersection.vue +10 -5
  20. package/static/apiconfig.json +5 -0
  21. package/static/img/CrossRoadsSvg.svg +529 -0
  22. package/package/kisscomps/components/OptimizeKanban/index.js +0 -2
  23. package/package/kisscomps/components/OptimizeKanban/index.vue +0 -369
  24. package/src/node_modules/.package_versions.json +0 -1
@@ -15,7 +15,6 @@
15
15
  :isMove="isMove"
16
16
  :localPatternList="localPatternList"
17
17
  :showCondition="showCondition"
18
- :patternType="patternType"
19
18
  :contrloType="contrloType"
20
19
  :allPatternList="allPatternList"
21
20
  :stagesChange="stagesChange"
@@ -104,9 +103,6 @@ export default {
104
103
  patternId: {
105
104
  type: Number
106
105
  },
107
- patternType: {
108
- type: String
109
- },
110
106
  agentId: {
111
107
  type: String
112
108
  },
@@ -141,6 +141,10 @@ export default {
141
141
  initSelection () {
142
142
  this.getIntersectionInfo()
143
143
  this.getPlatform()
144
+ },
145
+ refresh () {
146
+ // 刷新底图
147
+ this.$refs.intersectionMap2.resetCrossDiagram()
144
148
  }
145
149
  },
146
150
  mounted () {
@@ -94,6 +94,10 @@
94
94
  <BusMapSvg v-for="(item, index) in comdireBusPhaseData" :key="'Busmap-' + item.key + '-' + index" :Data="item" />
95
95
  <PhaseIconSvg v-for="(item, index) in comdireBusPhaseData" :key="item.key + '-' + index" :Data="item"/>
96
96
  </div>
97
+ <!-- 有效方向 -->
98
+ <div v-if="isVipRoute" class="effectDir">
99
+ <PhaseIconSvg v-for="(item, index) in effectDirData" :key="item.key + '-' + index" :Data="item" />
100
+ </div>
97
101
  </div>
98
102
  <!-- 匝道状态 -->
99
103
  <!-- 车道相位 -->
@@ -200,6 +204,7 @@ import { getMessageByCode } from '../../../../utils/responseMessage.js'
200
204
 
201
205
  import CrossDirectionConflictList from '../../../../utils/conflictList.js'
202
206
  import RingDataModel from '../../../../utils/RingDataModel.js'
207
+ import { getValidDirections } from '../../../../api/cross.js'
203
208
 
204
209
  export default {
205
210
  name: 'crossDiagram',
@@ -395,7 +400,8 @@ export default {
395
400
  isHasStageCountdown: false,
396
401
  contrloType: 'ring',
397
402
  isMphaseStatusDataReturnMap: new Map(), // 每个跟随相位的母相位是否返回了相位状态数据
398
- overlapStatusCompareSum: 0 // 首次加载跳过比较母相位状态数据是否返回
403
+ overlapStatusCompareSum: 0, // 首次加载跳过比较母相位状态数据是否返回
404
+ effectDirData: [] // 路口有效方向
399
405
  }
400
406
  },
401
407
  methods: {
@@ -859,6 +865,9 @@ export default {
859
865
  // 获取车道相位、行人相位信息(坐标、名称)
860
866
  this.mainType = this.tempType.split('-')[0]
861
867
  this.mainDirection = this.tempType.split('-')[1]
868
+ if (this.isVipRoute) {
869
+ this.getValidDirections()
870
+ }
862
871
  if (this.isVipRoute && !this.isThirdSignal) {
863
872
  // 特勤、分组管控下,非第三方设备,按通道显示相位方向;第三方设备还是按路口相位配置显示相位方向
864
873
  this.getChannelInfo()
@@ -1066,6 +1075,20 @@ export default {
1066
1075
  this.overlapsidewalkPhaseData = Array.from(new Set(this.overlapsidewalkPhaseData.map(item => item.id)))
1067
1076
  .map(id => this.overlapsidewalkPhaseData.find(item => item.id === id))
1068
1077
  },
1078
+ getEffectDirectionPos () {
1079
+ this.effectDirData = []
1080
+ // this.effectiveDirection = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
1081
+ this.effectiveDirection.forEach((dir, i) => {
1082
+ this.effectDirData.push({
1083
+ key: this.CrossDiagramMgr.getUniqueKey('effectiveDir'),
1084
+ id: dir,
1085
+ name: this.PhaseDataModel.getEffectPos(dir).name,
1086
+ left: this.PhaseDataModel.getEffectPos(dir).x,
1087
+ top: this.PhaseDataModel.getEffectPos(dir).y,
1088
+ color: '#6e737c'
1089
+ })
1090
+ })
1091
+ },
1069
1092
  getCrossType () {
1070
1093
  // 路口类型对应底图决策
1071
1094
  if (this.mainType === '101') {
@@ -1459,6 +1482,16 @@ export default {
1459
1482
  }
1460
1483
  }
1461
1484
  this.compSidewalkPhaseData = JSON.parse(JSON.stringify(curPedStatus))
1485
+ },
1486
+ getValidDirections () {
1487
+ getValidDirections(this.agentId).then((data) => {
1488
+ if (!data.data.success) {
1489
+ this.$message.error(getMessageByCode(data.data.code, this.$i18n.locale))
1490
+ return
1491
+ }
1492
+ this.effectiveDirection = data.data.data.validDirections || []
1493
+ this.getEffectDirectionPos()
1494
+ })
1462
1495
  }
1463
1496
  },
1464
1497
  mounted () {
@@ -0,0 +1,115 @@
1
+ {
2
+ "effectDirectionList": [{
3
+ "id": 1,
4
+ "name": "东直行",
5
+ "ename": "East-Straight",
6
+ "x": "510px",
7
+ "y": "267px"
8
+ },
9
+ {
10
+ "id": 2,
11
+ "name": "东左转",
12
+ "ename": "East-Left",
13
+ "x": "510px",
14
+ "y": "297px"
15
+ },
16
+ {
17
+ "id": 3,
18
+ "name": "东右转",
19
+ "ename": "East-Right",
20
+ "x": "510px",
21
+ "y": "238px"
22
+ },
23
+ {
24
+ "id": 4,
25
+ "name": "东掉头",
26
+ "ename": "East-Back",
27
+ "x": "510px",
28
+ "y": "325px"
29
+ },
30
+ {
31
+ "id": 5,
32
+ "name": "西直行",
33
+ "ename": "West-Straight",
34
+ "x": "328px",
35
+ "y": "359px"
36
+ },
37
+ {
38
+ "id": 6,
39
+ "name": "西左转",
40
+ "ename": "West-Left",
41
+ "x": "328px",
42
+ "y": "329px"
43
+ },
44
+ {
45
+ "id": 7,
46
+ "name": "西右转",
47
+ "ename": "West-Right",
48
+ "x": "328px",
49
+ "y": "388px"
50
+ },
51
+ {
52
+ "id": 8,
53
+ "name": "西掉头",
54
+ "ename": "West-Back",
55
+ "x": "328px",
56
+ "y": "300px"
57
+ },
58
+ {
59
+ "id": 9,
60
+ "name": "北直行",
61
+ "ename": "North-Straight",
62
+ "x": "379px",
63
+ "y": "216px"
64
+ },
65
+ {
66
+ "id": 10,
67
+ "name": "北左转",
68
+ "ename": "North-Left",
69
+ "x": "408px",
70
+ "y": "216px"
71
+ },
72
+ {
73
+ "id": 11,
74
+ "name": "北右转",
75
+ "ename": "North-Right",
76
+ "x": "348px",
77
+ "y": "216px"
78
+ },
79
+ {
80
+ "id": 12,
81
+ "name": "北掉头",
82
+ "ename": "North-Back",
83
+ "x": "436px",
84
+ "y": "216px"
85
+ },
86
+ {
87
+ "id": 13,
88
+ "name": "南直行",
89
+ "ename": "South-Straight",
90
+ "x": "470px",
91
+ "y": "399px"
92
+ },
93
+ {
94
+ "id": 14,
95
+ "name": "南左转",
96
+ "ename": "South-Left",
97
+ "x": "440px",
98
+ "y": "399px"
99
+ },
100
+ {
101
+ "id": 15,
102
+ "name": "南右转",
103
+ "ename": "South-Right",
104
+ "x": "500px",
105
+ "y": "399px"
106
+ },
107
+ {
108
+ "id": 16,
109
+ "name": "南掉头",
110
+ "ename": "South-Back",
111
+ "x": "412px",
112
+ "y": "399px"
113
+ }
114
+ ]
115
+ }
@@ -19,6 +19,7 @@ export default class PhaseDataModel {
19
19
  this.RampSidePosMap = new Map() // 匝道支路坐标
20
20
  this.BusMapMap = new Map() // 公交相位底图坐标
21
21
  this.BusPhaseMap = new Map() // 公交相位坐标
22
+ this.EffectPosMap = new Map() // 有效方向坐标
22
23
  this.roadDirection = roadDirection
23
24
  this.Init()
24
25
  }
@@ -28,6 +29,7 @@ export default class PhaseDataModel {
28
29
  let rampJson = require('./posJson/rampPos.json')
29
30
  let busMapJson = require('./posJson/busPos.json').busMap
30
31
  let busPhaseJson = require('./posJson/busPos.json').busphases
32
+ let effectJson = require('./posJson/effectPos.json').effectDirectionList
31
33
  if (this.roadDirection === 'left') {
32
34
  phaseJson = require('./posJson/phasePos.left.json').phaseList
33
35
  busMapJson = require('./posJson/busPos.left.json').busMap
@@ -39,6 +41,7 @@ export default class PhaseDataModel {
39
41
  this.handlePos(rampJson.rampSidePhaseList, this.RampSidePosMap)
40
42
  this.handlePos(busMapJson, this.BusMapMap)
41
43
  this.handlePos(busPhaseJson, this.BusPhaseMap)
44
+ this.handlePos(effectJson, this.EffectPosMap)
42
45
  }
43
46
 
44
47
  handlePos (phaseJson, phaseMap) {
@@ -81,4 +84,8 @@ export default class PhaseDataModel {
81
84
  getBusPhasePos (id) {
82
85
  return this.BusPhaseMap.get(id)
83
86
  }
87
+
88
+ getEffectPos (id) {
89
+ return this.EffectPosMap.get(id)
90
+ }
84
91
  }
@@ -11,33 +11,8 @@
11
11
  **/
12
12
  <template>
13
13
  <div class="main-patternstatus">
14
- <!-- rcp模式 -->
15
- <div v-if="patternType === 'rcp'">
16
- <div class="ring-first" v-for="(list, index1) in patternRcp" :key="index1">
17
- <div style="position: relative" :style="{height: '34px',paddingRight: '1px',float: 'left',width:
18
- ((item.split + (item.sum ? item.sum : 0)) /(item.cycle > cycles ? item.cycle : cycles)) *100 +'%',}"
19
- v-for="(item, index2) in list" :key="index2">
20
- <div class="first-1" :style="{ width:
21
- (Number(item.greenWidth.replace('%', '')) /
22
- Number((((item.split + (item.sum ? item.sum : 0)) /
23
- (item.cycle > cycles ? item.cycle : cycles)) * 100 + '%').replace('%', ''))) * 100 + '%', height: '34px',background: '#7ccc66'}">
24
- </div>
25
- <el-tooltip placement="top-start" effect="light">
26
- <div v-if="item.id" slot="content">P{{ item.id }}:{{ item.split }}</div>
27
- <div v-if="item.id" style="cursor: pointer">
28
- <div
29
- class="box"
30
- style="position: absolute; width:40px; left: 0; top: 5px"
31
- >
32
- <div class="ring-nums">P{{ item.id }}:{{ item.split }}</div>
33
- </div>
34
- </div>
35
- </el-tooltip>
36
- </div>
37
- </div>
38
- </div>
39
14
  <!-- 环模式true -->
40
- <div v-if="(this.contrloType === 'ring' || !this.contrloType) && patternType !== 'rcp'">
15
+ <div v-if="this.contrloType === 'ring' || !this.contrloType">
41
16
  <div class="ring-first" v-for="(list, index1) in patternInfo" :key="index1">
42
17
  <draggable :move="move" @end="endDrag(index1)" :disabled="isMove" :list="list">
43
18
  <div style="position: relative;" :style="{'height': '35px','float':'left','width':((item.split+(item.sum?item.sum:0)) / (max?max:item.cycle) * 100) + '%'}" v-for="(item,index2) in list" :key="index2" :class="item.mode === 7 ? 'direction' : isBorder ? 'hovercell' : ''">
@@ -159,7 +134,6 @@ export default {
159
134
  newCycle: this.cycles,
160
135
  patternIds: this.patternId,
161
136
  newPatterns: [],
162
- patternRcp: [],
163
137
  newList: [],
164
138
  isControl: true,
165
139
  contrloCycle: 0,
@@ -196,9 +170,6 @@ export default {
196
170
  controlPhase: {
197
171
  type: Object
198
172
  },
199
- patternType: {
200
- type: String
201
- },
202
173
  contrloType: {
203
174
  type: String
204
175
  },
@@ -371,9 +342,6 @@ export default {
371
342
  cycles: {
372
343
  handler: function (val, oldVal) {
373
344
  this.newCycle = this.cycles
374
- if (this.patternType === 'rcp') {
375
- this.handleRcp(this.patternStatusList)
376
- }
377
345
  },
378
346
  // 深度观察监听
379
347
  deep: true
@@ -398,9 +366,6 @@ export default {
398
366
  },
399
367
  patternStatusList: {
400
368
  handler: function (val, oldVal) {
401
- if (this.patternType === 'rcp') {
402
- this.handleRcp(this.patternStatusList)
403
- }
404
369
  this.handleBarrierHeight() // 计算屏障高度
405
370
  if (this.patternStatusList && this.newCycle) {
406
371
  // setTimeout(() => {
@@ -433,9 +398,6 @@ export default {
433
398
  if (this.contrloType === 'stage') {
434
399
  this.getStage()
435
400
  }
436
- if (this.patternType === 'rcp') {
437
- this.handleRcp(this.patternStatusList)
438
- }
439
401
  },
440
402
  methods: {
441
403
  move (e) {
@@ -523,48 +485,6 @@ export default {
523
485
  }
524
486
  return ped
525
487
  },
526
- handleRcp (val) {
527
- this.patternRcp = []
528
- let valSplit = val.map(item => {
529
- return item.map(val => {
530
- return val.splitchain
531
- })
532
- })
533
- let splitCycle = valSplit.length > 0 ? valSplit.map(item => {
534
- return item.length > 0 ? item.reduce((a, b) => {
535
- return a + b
536
- }) : 0
537
- }) : 0
538
- let cycle = Math.max(...splitCycle)// 每个环的周期最大值
539
- for (let rings of val) {
540
- if (rings.length === 0) continue
541
- let list = []
542
- for (let ring of rings) {
543
- if (ring.splitchain === 0) continue
544
- let obj = {}
545
- let split = ring.splitchain
546
- obj.split = split
547
- obj.cycle = cycle
548
- obj.id = ring.phases
549
- // if (ring.sum) {
550
- // obj.sum = ring.sum
551
- // obj.redWidth = ((currPhase.redclear + ring.sum) / (this.fixCycle ? this.fixCycle : this.max ? this.max : this.newCycle) * 100) + '%'
552
- // } else {
553
- // obj.redWidth = (currPhase.redclear / (this.fixCycle ? this.fixCycle : this.max ? this.max : this.newCycle) * 100) + '%'
554
- // }
555
- // obj.mode = ring.mode
556
- obj.greenWidth = (split / (cycle > this.cycles ? cycle : this.cycles)) * 100 + '%'
557
- // obj.flashgreen = (currPhase.flashgreen / (this.fixCycle ? this.fixCycle : this.max ? this.max : this.newCycle) * 100) + '%'
558
- // obj.yellowWidth = (currPhase.yellow / (this.fixCycle ? this.fixCycle : this.max ? this.max : this.newCycle) * 100) + '%'
559
- // 忽略相位不显示
560
- // let mode = ring.mode
561
- // if (mode !== 7) { // 忽略相位不显示
562
- list.push(obj)
563
- // }
564
- }
565
- this.patternRcp.push(list)
566
- }
567
- },
568
488
  handleStageData (data) {
569
489
  if (!data) return
570
490
  let peddirections = this.getPed(data)
@@ -3,7 +3,6 @@
3
3
  <BoardCard
4
4
  :patternId="patternId"
5
5
  :contrloType="contrloType"
6
- :patternType="patternType"
7
6
  :stagesChange="stagesChange"
8
7
  :isShowTip="isShowTip"
9
8
  :isBorder="isBorder"
@@ -553,9 +552,6 @@ export default {
553
552
  patternStatusList: {
554
553
  type: Array
555
554
  },
556
- patternType: {
557
- type: String
558
- },
559
555
  patternId: {
560
556
  type: Number
561
557
  },