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
@@ -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
  },
@@ -33,17 +33,19 @@
33
33
  <!-- <intersection-base-map
34
34
  ref="intersectionMap"
35
35
  :crossStatusData="crossStatusData"
36
- agentId="tjblsxl-ticp6"
36
+ agentId="1059"
37
37
  isVipRoute
38
38
  :choosedDirection="[1,2,3]"
39
39
  :choosedPedDirection="[3,4]"
40
40
  :roadDirection="roadDirection" /> -->
41
- <!-- <intersection-direction-selection
42
- :agentId="this.agentId"
41
+ <el-button @click="refresh">刷新特勤路口底图</el-button>
42
+ <intersection-direction-selection
43
+ ref="selectMap"
44
+ :agentId="1059"
43
45
  :clickMode="false"
44
46
  :choosedDirection="[14,6,13,8]"
45
47
  :choosedPedDirection="[1]"
46
- :roadDirection="roadDirection" /> -->
48
+ :roadDirection="roadDirection" />
47
49
 
48
50
  <!-- <button @click="lockPhase" >相位锁定</button><br/>
49
51
  <button @click="unlockPhase" >解锁相位</button><br/>
@@ -167,7 +169,7 @@ export default {
167
169
  // agentId: '12007_390',
168
170
  // agentId: '12014',
169
171
  reqUrl: 'http://192.168.13.103:10003/openatc',
170
- Token: 'eyJraWQiOiIxNzQxNjcxODYyMDI2IiwidHlwIjoiSldUIiwiYWxnIjoiSFMyNTYifQ.eyJzdWIiOiJhZG1pbiIsImV4cCI6MTc0MTY3NTQ2MiwiaWF0IjoxNzQxNjY4MjYyfQ.IcB4eEk2j5WFpgIwUYhu0w5sbbR9rYZNxyS9wnmGJZI',
172
+ Token: 'eyJraWQiOiIxNzQ0MTgzMDYxNjg4IiwidHlwIjoiSldUIiwiYWxnIjoiSFMyNTYifQ.eyJzdWIiOiJhZG1pbiIsImV4cCI6MTc0NDE4NjY2MiwiaWF0IjoxNzQ0MTc5NDYyfQ.g8_cn1W12VbwxJyLybxczBULqsOyKyw30s1scdcP8Ro',
171
173
  // agentId: '30003-352',
172
174
  // reqUrl: 'https://kints-dev.devdolphin.com/openatc',
173
175
  // Token: 'eyJraWQiOiIxNjUwNTA5MDI2ODk2IiwidHlwIjoiSldUIiwiYWxnIjoiSFMyNTYifQ.eyJzdWIiOiJ4aWFvbWluZyIsImV4cCI6MTczNjkwOTAyNiwiaWF0IjoxNjUwNTA5MDI2fQ.-s4T-uMRmB2zf9yer87USKQXLY1a12Zq5lCOnqjNmfA',
@@ -450,6 +452,9 @@ export default {
450
452
  },
451
453
  handleClickCrossIcon (allChoosedDir, curClickedPhase) {
452
454
  console.log('handleClickCrossIcon', allChoosedDir, curClickedPhase)
455
+ },
456
+ refresh () {
457
+ this.$refs.selectMap.refresh()
453
458
  }
454
459
  },
455
460
  created () {
@@ -457,5 +457,10 @@
457
457
  "key": "getPermission",
458
458
  "url": "/auth/role/",
459
459
  "method": "get"
460
+ },
461
+ {
462
+ "key": "getValidDirections",
463
+ "url": "/devs/validdirections",
464
+ "method": "get"
460
465
  }
461
466
  ]