openatc-components 0.1.33 → 0.1.35
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/kisscomps/components/BoardCard/BoardCard.vue +4 -0
- package/package/kisscomps/components/CommonKanban/CommonKanban.vue +5 -4
- package/package/kisscomps/components/DrawChannelization/drawsvg/overlapAssociatedComponent.vue +20 -9
- package/package/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.vue +20 -9
- package/package/kisscomps/components/KanBan/kanban.vue +1 -1
- package/package/kisscomps/components/OverLap/OverLap.vue +15 -8
- package/package/kisscomps/components/PatternStatus/PatternStatus.vue +258 -87
- package/package/kisscomps/components/SchemeConfig/tentativeplancontrolmodal/index.vue +23 -1
- package/package/kisscomps/components/Stages/index.vue +9 -5
- package/package/kisscomps/components/XRDDirSelector/XRDDirSelector.vue +672 -293
- package/package/kisscomps/components/patternList/patternList.vue +4 -0
- package/package/kissui.min.js +1 -1
- package/package.json +1 -1
- package/src/kisscomps/components/BoardCard/BoardCard.vue +4 -0
- package/src/kisscomps/components/CommonKanban/CommonKanban.vue +5 -4
- package/src/kisscomps/components/DrawChannelization/drawsvg/overlapAssociatedComponent.vue +20 -9
- package/src/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.vue +20 -9
- package/src/kisscomps/components/KanBan/kanban.vue +1 -1
- package/src/kisscomps/components/OverLap/OverLap.vue +15 -8
- package/src/kisscomps/components/PatternStatus/PatternStatus.vue +258 -87
- package/src/kisscomps/components/SchemeConfig/tentativeplancontrolmodal/index.vue +23 -1
- package/src/kisscomps/components/Stages/index.vue +9 -5
- package/src/kisscomps/components/XRDDirSelector/XRDDirSelector.vue +672 -293
- package/src/kisscomps/components/patternList/patternList.vue +4 -0
- package/src/node_modules/.package_versions.json +1 -0
- package/src/utils/RingDataModel.js +18 -2
- package/src/views/schemeconfig.vue +3 -3
|
@@ -14,13 +14,13 @@
|
|
|
14
14
|
<!-- 环模式true -->
|
|
15
15
|
<div v-if="this.contrloType === 'ring' || !this.contrloType">
|
|
16
16
|
<div class="ring-first" v-for="(list, index1) in patternInfo" :key="index1">
|
|
17
|
-
<div v-for="(item,index2) in list" :key="index2" :class="item.
|
|
17
|
+
<div v-for="(item,index2) in list" :key="index2" :class="item.mode===7?'direction': ''">
|
|
18
18
|
<div class="first-1" :style="{'width':item.greenWidth,'height':'34px','background':'#7ccc66'}">
|
|
19
19
|
<el-tooltip placement="top-start" effect="light">
|
|
20
20
|
<div slot="content">P{{item.id}}:{{item.split}}</div>
|
|
21
21
|
<div style="cursor:pointer;">
|
|
22
22
|
<div class="ring-phase">
|
|
23
|
-
<patternwalksvg :showWalk="item.peddirection" :Width="'32'" :Height="'34'"></patternwalksvg>
|
|
23
|
+
<!-- <patternwalksvg :showWalk="item.peddirection" :Width="'32'" :Height="'34'"></patternwalksvg> -->
|
|
24
24
|
<xdrdirselector Width="36px" Height="34px" :showlist="item.direction"></xdrdirselector>
|
|
25
25
|
</div>
|
|
26
26
|
<div class="box">
|
|
@@ -43,8 +43,10 @@
|
|
|
43
43
|
<div class="first-1" :style="{'width':item.redWidth,'height':'34px','background':'#f27979'}"></div>
|
|
44
44
|
</div>
|
|
45
45
|
</div>
|
|
46
|
-
<div v-if="showBarrier"
|
|
47
|
-
<div
|
|
46
|
+
<div v-if="showBarrier">
|
|
47
|
+
<div v-for="(item, index) in barrierList" :key="index + '1'">
|
|
48
|
+
<div class="divider" :style="{'left':item, 'height':barrierHeight}"></div>
|
|
49
|
+
</div>
|
|
48
50
|
</div>
|
|
49
51
|
<div v-show="(syncTime && cycle && cycle>0) || (syncTime && newCycle && newCycle>0)">
|
|
50
52
|
<div class="curTimeDiv" :style="{'left':paddingLeft, 'background-color': '#409EFF'}">{{ timeNumDevide }}</div>
|
|
@@ -63,7 +65,7 @@
|
|
|
63
65
|
</div>
|
|
64
66
|
<div style="cursor:pointer;">
|
|
65
67
|
<div class="ring-phase">
|
|
66
|
-
<patternwalksvg :showWalk="list.peddirection" :Width="'32'" :Height="'34'"></patternwalksvg>
|
|
68
|
+
<!-- <patternwalksvg :showWalk="list.peddirection" :Width="'32'" :Height="'34'"></patternwalksvg> -->
|
|
67
69
|
<xdrdirselector Width="36px" Height="34px" :showlist="list.direction"></xdrdirselector>
|
|
68
70
|
</div>
|
|
69
71
|
<div class="box" style="line-height:28px">
|
|
@@ -83,7 +85,7 @@
|
|
|
83
85
|
</div>
|
|
84
86
|
</template>
|
|
85
87
|
<script>
|
|
86
|
-
import patternwalksvg from '../PatternWalkSvg/PatternWalkSvg'
|
|
88
|
+
// import patternwalksvg from '../PatternWalkSvg/PatternWalkSvg'
|
|
87
89
|
import xdrdirselector from '../XRDDirSelector/XRDDirSelector'
|
|
88
90
|
// import PatternWalkSvg from '../IntersectionMap/crossDirection/baseImg/PatternWalkSvg'
|
|
89
91
|
import PhaseDataModel from '../IntersectionMap/crossDirection/utils.js'
|
|
@@ -91,7 +93,7 @@ import CrossDiagramMgr from '../../../EdgeMgr/controller/crossDiagramMgr.js'
|
|
|
91
93
|
export default {
|
|
92
94
|
name: 'pattern-list',
|
|
93
95
|
components: {
|
|
94
|
-
patternwalksvg,
|
|
96
|
+
// patternwalksvg,
|
|
95
97
|
xdrdirselector
|
|
96
98
|
},
|
|
97
99
|
data () {
|
|
@@ -133,6 +135,9 @@ export default {
|
|
|
133
135
|
controlData: {
|
|
134
136
|
type: Object
|
|
135
137
|
},
|
|
138
|
+
condition: {
|
|
139
|
+
type: Boolean
|
|
140
|
+
},
|
|
136
141
|
cycle: {
|
|
137
142
|
type: Number
|
|
138
143
|
},
|
|
@@ -184,7 +189,11 @@ export default {
|
|
|
184
189
|
}
|
|
185
190
|
// this.controlDatas = this.controlData
|
|
186
191
|
this.getPedPhasePos()
|
|
187
|
-
this.
|
|
192
|
+
if ((this.controlData && this.controlData.patternid === 109) || (this.controlData && this.condition)) {
|
|
193
|
+
this.handleTentivePatternData()
|
|
194
|
+
} else {
|
|
195
|
+
this.handlePatternData()
|
|
196
|
+
}
|
|
188
197
|
this.handleBarrierHeight()
|
|
189
198
|
},
|
|
190
199
|
// 深度观察监听
|
|
@@ -298,6 +307,7 @@ export default {
|
|
|
298
307
|
},
|
|
299
308
|
handleStageData (data) {
|
|
300
309
|
if (!data) return
|
|
310
|
+
let peddirections = this.getPed(data)
|
|
301
311
|
let stagesTemp = []
|
|
302
312
|
let tempList = []
|
|
303
313
|
for (let stg of data) {
|
|
@@ -309,11 +319,19 @@ export default {
|
|
|
309
319
|
directionList.push(...currPhase.direction)
|
|
310
320
|
directionList = Array.from(new Set(directionList))
|
|
311
321
|
}
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
322
|
+
if (directionList.length === 0) {
|
|
323
|
+
tempList.push({
|
|
324
|
+
id: '',
|
|
325
|
+
color: '#606266',
|
|
326
|
+
peddirection: peddirections
|
|
327
|
+
})
|
|
328
|
+
} else {
|
|
329
|
+
tempList = directionList.map(dir => ({
|
|
330
|
+
id: dir,
|
|
331
|
+
color: '#606266',
|
|
332
|
+
peddirection: peddirections
|
|
333
|
+
}))
|
|
334
|
+
}
|
|
317
335
|
stagesTemp.push(...tempList)
|
|
318
336
|
}
|
|
319
337
|
return stagesTemp
|
|
@@ -332,7 +350,7 @@ export default {
|
|
|
332
350
|
this.stageLists = this.localPatternList[i].stagesList.map(item => {
|
|
333
351
|
return {
|
|
334
352
|
...item,
|
|
335
|
-
peddirection: this.getPed(item.phases ? item.phases : item.stages),
|
|
353
|
+
// peddirection: this.getPed(item.phases ? item.phases : item.stages),
|
|
336
354
|
direction: this.handleStageData(item.phases ? item.phases : item.stages),
|
|
337
355
|
greenWidth: (item.green / stageMaxCyle * 100).toFixed(3) + '%',
|
|
338
356
|
yellowWidth: (item.yellow / stageMaxCyle * 100).toFixed(3) + '%',
|
|
@@ -353,7 +371,7 @@ export default {
|
|
|
353
371
|
this.stageLists = this.stagesChange.map(item => {
|
|
354
372
|
return {
|
|
355
373
|
...item,
|
|
356
|
-
peddirection: this.getPed(item.phases ? item.phases : item.stages),
|
|
374
|
+
// peddirection: this.getPed(item.phases ? item.phases : item.stages),
|
|
357
375
|
direction: this.handleStageData(item.phases ? item.phases : item.stages),
|
|
358
376
|
greenWidth: (item.green / stageMaxCyle * 100).toFixed(3) + '%',
|
|
359
377
|
yellowWidth: (item.yellow / stageMaxCyle * 100).toFixed(3) + '%',
|
|
@@ -406,15 +424,17 @@ export default {
|
|
|
406
424
|
}
|
|
407
425
|
})
|
|
408
426
|
},
|
|
409
|
-
|
|
427
|
+
handleTentivePatternData () {
|
|
410
428
|
if (!this.controlData) return
|
|
411
429
|
this.newList = []
|
|
412
430
|
if (Object.keys(this.controlData).length === 0 || this.phaseList.length === 0) return
|
|
413
431
|
if (!this.controlData.phase) return
|
|
432
|
+
// let cycle = this.controlData.cycle
|
|
414
433
|
if (!this.controlData.rings) return
|
|
415
434
|
let newValue = []
|
|
416
435
|
for (let rings of this.controlData.rings) {
|
|
417
436
|
let phase = this.controlData.phase
|
|
437
|
+
// let list = []
|
|
418
438
|
let obj = {}
|
|
419
439
|
for (let key in rings.sequence) {
|
|
420
440
|
obj[key] = rings.sequence[key]
|
|
@@ -438,14 +458,9 @@ export default {
|
|
|
438
458
|
})
|
|
439
459
|
}
|
|
440
460
|
}
|
|
441
|
-
this.
|
|
461
|
+
this.handleTentative(newValue)
|
|
442
462
|
},
|
|
443
|
-
|
|
444
|
-
if (!this.patternInfo) return
|
|
445
|
-
let patternLength = this.patternInfo.length
|
|
446
|
-
this.barrierHeight = (patternLength * 35 + 21) + 'px'
|
|
447
|
-
},
|
|
448
|
-
handleOverViewChange (val) {
|
|
463
|
+
handleTentative (val) {
|
|
449
464
|
if (val === null || val.length === 0) return
|
|
450
465
|
this.patternInfo = []
|
|
451
466
|
let currentArr = []
|
|
@@ -489,6 +504,20 @@ export default {
|
|
|
489
504
|
}
|
|
490
505
|
return item.id === ring.id
|
|
491
506
|
})[0]
|
|
507
|
+
let peddirections = []
|
|
508
|
+
for (let walk of this.sidewalkPhaseData) {
|
|
509
|
+
for (let ped of currPhase.peddirection) {
|
|
510
|
+
// if (stg === walk.phaseid) {
|
|
511
|
+
let objs = {}
|
|
512
|
+
objs.name = walk.name
|
|
513
|
+
objs.id = walk.id
|
|
514
|
+
if (ped === walk.id) {
|
|
515
|
+
peddirections.push(objs)
|
|
516
|
+
peddirections = Array.from(new Set(peddirections))
|
|
517
|
+
}
|
|
518
|
+
// }
|
|
519
|
+
}
|
|
520
|
+
}
|
|
492
521
|
if (ring.desc) {
|
|
493
522
|
obj.direction = ring.desc.map(item => { // 虚相位desc为空
|
|
494
523
|
return {
|
|
@@ -497,12 +526,23 @@ export default {
|
|
|
497
526
|
}
|
|
498
527
|
})
|
|
499
528
|
} else {
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
529
|
+
if (currPhase.direction.length > 0) {
|
|
530
|
+
obj.direction = currPhase.direction.map(item => {
|
|
531
|
+
return {
|
|
532
|
+
id: item,
|
|
533
|
+
peddirection: peddirections,
|
|
534
|
+
color: '#454545'
|
|
535
|
+
}
|
|
536
|
+
})
|
|
537
|
+
} else {
|
|
538
|
+
obj.direction = [
|
|
539
|
+
{
|
|
540
|
+
id: '',
|
|
541
|
+
color: '#454545',
|
|
542
|
+
peddirection: peddirections
|
|
543
|
+
}
|
|
544
|
+
]
|
|
545
|
+
}
|
|
506
546
|
}
|
|
507
547
|
obj.split = split
|
|
508
548
|
if (ring.sum) {
|
|
@@ -513,7 +553,76 @@ export default {
|
|
|
513
553
|
obj.flashgreen = (currPhase.flashgreen / (this.max ? this.max : cycle) * 100).toFixed(3) + '%'
|
|
514
554
|
obj.yellowWidth = (currPhase.yellow / (this.max ? this.max : cycle) * 100).toFixed(3) + '%'
|
|
515
555
|
obj.greenWidth = ((split - currPhase.redclear - currPhase.yellow - currPhase.flashgreen) / (this.max ? this.max : cycle) * 100).toFixed(3) + '%'
|
|
516
|
-
//
|
|
556
|
+
// 忽略相位不显示
|
|
557
|
+
let mode = ring.mode
|
|
558
|
+
if (mode !== 7) { // 忽略相位不显示
|
|
559
|
+
list.push(obj)
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
this.patternInfo.push(list)
|
|
563
|
+
}
|
|
564
|
+
},
|
|
565
|
+
handlePatternData () {
|
|
566
|
+
if (!this.controlData) return
|
|
567
|
+
// this.newList = []
|
|
568
|
+
if (Object.keys(this.controlData).length === 0 || this.phaseList.length === 0) return
|
|
569
|
+
if (!this.controlData.phase) return
|
|
570
|
+
if (!this.controlData.rings) return
|
|
571
|
+
let nowPattern = this.localPatternList.filter(item => {
|
|
572
|
+
return item.id === this.controlData.patternid
|
|
573
|
+
})[0].rings
|
|
574
|
+
this.handleOverViewChange(nowPattern)
|
|
575
|
+
},
|
|
576
|
+
handleBarrierHeight () { // 屏障高度
|
|
577
|
+
if (!this.patternInfo) return
|
|
578
|
+
let patternLength = this.patternInfo.length
|
|
579
|
+
this.barrierHeight = (patternLength * 35 + 21) + 'px'
|
|
580
|
+
},
|
|
581
|
+
handleOverViewChange (val) {
|
|
582
|
+
if (val === null || val.length === 0) return
|
|
583
|
+
this.patternInfo = []
|
|
584
|
+
let currentArr = []
|
|
585
|
+
let newPattern = []
|
|
586
|
+
val.map(i => {
|
|
587
|
+
newPattern.push(...i)
|
|
588
|
+
})
|
|
589
|
+
if (this.phaseList.length === 0) return
|
|
590
|
+
for (let patternStatus of val[0]) {
|
|
591
|
+
// if (patternStatus.mode !== 7) {
|
|
592
|
+
let concurrent = this.phaseList.filter((item) => {
|
|
593
|
+
return item.id === patternStatus.id // patternStatus.id当前相位id concurrent当前相位的并发相位
|
|
594
|
+
})[0].concurrent// 当前相位的并发相位
|
|
595
|
+
if (concurrent) {
|
|
596
|
+
let obj = {
|
|
597
|
+
id: patternStatus.id,
|
|
598
|
+
current: concurrent.sort()
|
|
599
|
+
}
|
|
600
|
+
currentArr.push(obj)
|
|
601
|
+
}
|
|
602
|
+
// }
|
|
603
|
+
}
|
|
604
|
+
if (currentArr.length !== 0) {
|
|
605
|
+
let newCurrent = this.tranform(currentArr)
|
|
606
|
+
let ringTeam = this.step1(this.phaseList, newCurrent)
|
|
607
|
+
this.fillGap(ringTeam, val)
|
|
608
|
+
}
|
|
609
|
+
let cycle = this.controlData.cycle
|
|
610
|
+
for (let rings of val) {
|
|
611
|
+
if (rings.length === 0) continue
|
|
612
|
+
let list = []
|
|
613
|
+
for (let ring of rings) {
|
|
614
|
+
if (ring.value === 0) continue
|
|
615
|
+
let obj = {}
|
|
616
|
+
let split = ring.value
|
|
617
|
+
obj.id = ring.id
|
|
618
|
+
obj.mode = ring.mode
|
|
619
|
+
// obj.split = split
|
|
620
|
+
let currPhase = this.phaseList.filter((item) => {
|
|
621
|
+
if (item.id === ring.id && item.controltype === 99) {
|
|
622
|
+
obj.controltype = item.controltype
|
|
623
|
+
}
|
|
624
|
+
return item.id === ring.id
|
|
625
|
+
})[0]
|
|
517
626
|
let peddirections = []
|
|
518
627
|
for (let walk of this.sidewalkPhaseData) {
|
|
519
628
|
for (let ped of currPhase.peddirection) {
|
|
@@ -528,12 +637,46 @@ export default {
|
|
|
528
637
|
// }
|
|
529
638
|
}
|
|
530
639
|
}
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
640
|
+
if (ring.desc) {
|
|
641
|
+
obj.direction = ring.desc.map(item => { // 虚相位desc为空
|
|
642
|
+
return {
|
|
643
|
+
id: item.id,
|
|
644
|
+
color: '#454545'
|
|
645
|
+
}
|
|
646
|
+
})
|
|
647
|
+
} else {
|
|
648
|
+
if (currPhase.direction.length > 0) {
|
|
649
|
+
obj.direction = currPhase.direction.map(item => {
|
|
650
|
+
return {
|
|
651
|
+
id: item,
|
|
652
|
+
peddirection: peddirections,
|
|
653
|
+
color: '#454545'
|
|
654
|
+
}
|
|
655
|
+
})
|
|
656
|
+
} else {
|
|
657
|
+
obj.direction = [
|
|
658
|
+
{
|
|
659
|
+
id: '',
|
|
660
|
+
color: '#454545',
|
|
661
|
+
peddirection: peddirections
|
|
662
|
+
}
|
|
663
|
+
]
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
obj.split = split
|
|
667
|
+
if (ring.sum) {
|
|
668
|
+
obj.redWidth = ((currPhase.redclear + ring.sum) / (this.max ? this.max : cycle) * 100).toFixed(3) + '%'
|
|
669
|
+
} else {
|
|
670
|
+
obj.redWidth = (currPhase.redclear / (this.max ? this.max : cycle) * 100).toFixed(3) + '%'
|
|
536
671
|
}
|
|
672
|
+
obj.flashgreen = (currPhase.flashgreen / (this.max ? this.max : cycle) * 100).toFixed(3) + '%'
|
|
673
|
+
obj.yellowWidth = (currPhase.yellow / (this.max ? this.max : cycle) * 100).toFixed(3) + '%'
|
|
674
|
+
obj.greenWidth = ((split - currPhase.redclear - currPhase.yellow - currPhase.flashgreen) / (this.max ? this.max : cycle) * 100).toFixed(3) + '%'
|
|
675
|
+
// 忽略相位不显示
|
|
676
|
+
// let mode = ring.mode
|
|
677
|
+
// if (mode !== 7) { // 忽略相位不显示
|
|
678
|
+
list.push(obj)
|
|
679
|
+
// }
|
|
537
680
|
}
|
|
538
681
|
this.patternInfo.push(list)
|
|
539
682
|
}
|
|
@@ -549,18 +692,18 @@ export default {
|
|
|
549
692
|
})
|
|
550
693
|
if (this.phaseList.length === 0) return
|
|
551
694
|
for (let patternStatus of val[0]) {
|
|
552
|
-
if (patternStatus.mode !== 7) {
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
}
|
|
561
|
-
currentArr.push(obj)
|
|
695
|
+
// if (patternStatus.mode !== 7) {
|
|
696
|
+
let concurrent = this.phaseList.filter((item) => {
|
|
697
|
+
return item.id === patternStatus.id // patternStatus.id当前相位id concurrent当前相位的并发相位
|
|
698
|
+
})[0].concurrent// 当前相位的并发相位
|
|
699
|
+
if (concurrent) {
|
|
700
|
+
let obj = {
|
|
701
|
+
id: patternStatus.id,
|
|
702
|
+
current: concurrent.sort()
|
|
562
703
|
}
|
|
704
|
+
currentArr.push(obj)
|
|
563
705
|
}
|
|
706
|
+
// }
|
|
564
707
|
}
|
|
565
708
|
if (currentArr.length !== 0) {
|
|
566
709
|
let newCurrent = this.tranform(currentArr)
|
|
@@ -590,20 +733,46 @@ export default {
|
|
|
590
733
|
}
|
|
591
734
|
return item.id === ring.id
|
|
592
735
|
})[0]
|
|
593
|
-
|
|
736
|
+
let peddirections = []
|
|
737
|
+
for (let walk of this.sidewalkPhaseData) {
|
|
738
|
+
for (let ped of currPhase.peddirection) {
|
|
739
|
+
// if (stg === walk.phaseid) {
|
|
740
|
+
let objs = {}
|
|
741
|
+
objs.name = walk.name
|
|
742
|
+
objs.id = walk.id
|
|
743
|
+
if (ped === walk.id) {
|
|
744
|
+
peddirections.push(objs)
|
|
745
|
+
peddirections = Array.from(new Set(peddirections))
|
|
746
|
+
}
|
|
747
|
+
// }
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
if (ring.desc && ring.desc.length > 0) {
|
|
594
751
|
obj.direction = ring.desc.map(item => { // 虚相位desc为空
|
|
595
752
|
return {
|
|
596
753
|
id: item.id,
|
|
597
|
-
color: '#454545'
|
|
754
|
+
color: '#454545',
|
|
755
|
+
peddirection: peddirections
|
|
598
756
|
}
|
|
599
757
|
})
|
|
600
758
|
} else {
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
759
|
+
if (currPhase.direction > 0) {
|
|
760
|
+
obj.direction = currPhase.direction.map(item => {
|
|
761
|
+
return {
|
|
762
|
+
id: item,
|
|
763
|
+
color: '#454545',
|
|
764
|
+
peddirection: peddirections
|
|
765
|
+
}
|
|
766
|
+
})
|
|
767
|
+
} else {
|
|
768
|
+
obj.direction = [
|
|
769
|
+
{
|
|
770
|
+
id: '',
|
|
771
|
+
color: '#454545',
|
|
772
|
+
peddirection: peddirections
|
|
773
|
+
}
|
|
774
|
+
]
|
|
775
|
+
}
|
|
607
776
|
}
|
|
608
777
|
if (ring.sum) {
|
|
609
778
|
obj.split = split + ring.sum
|
|
@@ -612,30 +781,31 @@ export default {
|
|
|
612
781
|
obj.split = split
|
|
613
782
|
obj.greenWidth = ((split - currPhase.redclear - currPhase.yellow - currPhase.flashgreen) / (this.max ? this.max : this.newCycle) * 100).toFixed(3) + '%'
|
|
614
783
|
}
|
|
784
|
+
obj.mode = ring.mode
|
|
615
785
|
obj.flashgreen = (currPhase.flashgreen / (this.max ? this.max : this.newCycle) * 100).toFixed(3) + '%'
|
|
616
786
|
obj.redWidth = (currPhase.redclear / (this.max ? this.max : this.newCycle) * 100).toFixed(3) + '%'
|
|
617
787
|
obj.yellowWidth = (currPhase.yellow / (this.max ? this.max : this.newCycle) * 100).toFixed(3) + '%'
|
|
618
|
-
// obj.peddirection = currPhase.peddirection
|
|
619
|
-
let peddirections = []
|
|
620
|
-
for (let walk of this.sidewalkPhaseData) {
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
}
|
|
633
|
-
obj.peddirection = peddirections
|
|
788
|
+
// // obj.peddirection = currPhase.peddirection
|
|
789
|
+
// let peddirections = []
|
|
790
|
+
// for (let walk of this.sidewalkPhaseData) {
|
|
791
|
+
// for (let ped of currPhase.peddirection) {
|
|
792
|
+
// // if (stg === walk.phaseid) {
|
|
793
|
+
// let objs = {}
|
|
794
|
+
// objs.name = walk.name
|
|
795
|
+
// objs.id = walk.id
|
|
796
|
+
// if (ped === walk.id) {
|
|
797
|
+
// peddirections.push(objs)
|
|
798
|
+
// peddirections = Array.from(new Set(peddirections))
|
|
799
|
+
// }
|
|
800
|
+
// // }
|
|
801
|
+
// }
|
|
802
|
+
// }
|
|
803
|
+
// obj.peddirection = peddirections
|
|
634
804
|
// 忽略相位不显示
|
|
635
|
-
let mode = ring.mode
|
|
636
|
-
if (mode !== 7) { // 忽略相位不显示
|
|
637
|
-
|
|
638
|
-
}
|
|
805
|
+
// let mode = ring.mode
|
|
806
|
+
// if (mode !== 7) { // 忽略相位不显示
|
|
807
|
+
list.push(obj)
|
|
808
|
+
// }
|
|
639
809
|
}
|
|
640
810
|
this.patternInfo.push(list)
|
|
641
811
|
}
|
|
@@ -721,9 +891,9 @@ export default {
|
|
|
721
891
|
let ret = []
|
|
722
892
|
const patternObj = {}
|
|
723
893
|
pattern.forEach(l => {
|
|
724
|
-
if (l.mode !== 7) {
|
|
725
|
-
|
|
726
|
-
}
|
|
894
|
+
// if (l.mode !== 7) {
|
|
895
|
+
patternObj[l.id] = l.value
|
|
896
|
+
// }
|
|
727
897
|
})
|
|
728
898
|
newArr.forEach((na, index) => {
|
|
729
899
|
let max = 0
|
|
@@ -733,7 +903,7 @@ export default {
|
|
|
733
903
|
max = total
|
|
734
904
|
}
|
|
735
905
|
})
|
|
736
|
-
while (index > 0
|
|
906
|
+
while (index > 0) { // && max < _this.newCycle
|
|
737
907
|
index--
|
|
738
908
|
max += ret[index]
|
|
739
909
|
}
|
|
@@ -746,9 +916,9 @@ export default {
|
|
|
746
916
|
const patternObj = {}
|
|
747
917
|
pattern.forEach(l => {
|
|
748
918
|
l.map(k => {
|
|
749
|
-
if (k.mode !== 7) {
|
|
750
|
-
|
|
751
|
-
}
|
|
919
|
+
// if (k.mode !== 7) {
|
|
920
|
+
patternObj[k.id] = k.value
|
|
921
|
+
// }
|
|
752
922
|
})
|
|
753
923
|
})
|
|
754
924
|
let newMax = []
|
|
@@ -768,7 +938,7 @@ export default {
|
|
|
768
938
|
this.max = newmaxNum + newminNum
|
|
769
939
|
pattern.map(d => {
|
|
770
940
|
d.map(r => {
|
|
771
|
-
if (r.sum
|
|
941
|
+
if (r.sum) {
|
|
772
942
|
delete r.sum
|
|
773
943
|
}
|
|
774
944
|
})
|
|
@@ -778,7 +948,7 @@ export default {
|
|
|
778
948
|
na.map(n => {
|
|
779
949
|
pattern.map(h => {
|
|
780
950
|
h.map(d => {
|
|
781
|
-
if (d.id === n.data[1] && d.sum
|
|
951
|
+
if (d.id === n.data[1] && d.sum) {
|
|
782
952
|
delete d.sum
|
|
783
953
|
}
|
|
784
954
|
})
|
|
@@ -790,11 +960,11 @@ export default {
|
|
|
790
960
|
pattern.map(h => {
|
|
791
961
|
h.map(d => {
|
|
792
962
|
if (n.data.length > 1) {
|
|
793
|
-
if (d.id === n.data[1]
|
|
963
|
+
if (d.id === n.data[1]) {
|
|
794
964
|
delete d.sum
|
|
795
965
|
}
|
|
796
966
|
} else {
|
|
797
|
-
if (d.id === n.data[0]
|
|
967
|
+
if (d.id === n.data[0]) {
|
|
798
968
|
delete d.sum
|
|
799
969
|
}
|
|
800
970
|
}
|
|
@@ -812,11 +982,11 @@ export default {
|
|
|
812
982
|
pattern.filter((i) => {
|
|
813
983
|
i.map(j => {
|
|
814
984
|
if (m.data.length > 1) {
|
|
815
|
-
if (j.id === m.data[1]
|
|
985
|
+
if (j.id === m.data[1]) {
|
|
816
986
|
j.sum = sum
|
|
817
987
|
}
|
|
818
988
|
} else {
|
|
819
|
-
if (j.id === m.data[0]
|
|
989
|
+
if (j.id === m.data[0]) {
|
|
820
990
|
j.sum = sum
|
|
821
991
|
}
|
|
822
992
|
}
|
|
@@ -826,7 +996,7 @@ export default {
|
|
|
826
996
|
}
|
|
827
997
|
let mapAdd = pattern.map(item => {
|
|
828
998
|
return item.map(val => {
|
|
829
|
-
return val.
|
|
999
|
+
return val.value + (val.sum ? val.sum : 0)
|
|
830
1000
|
})
|
|
831
1001
|
})
|
|
832
1002
|
let maxCycle = mapAdd.length > 0 ? mapAdd.map(item => {
|
|
@@ -904,6 +1074,7 @@ export default {
|
|
|
904
1074
|
float: left;
|
|
905
1075
|
// margin-left: 5px;
|
|
906
1076
|
height: 34px;
|
|
1077
|
+
width: 36px;
|
|
907
1078
|
z-index: 999;
|
|
908
1079
|
background: rgba(30, 96, 12, 0.2);
|
|
909
1080
|
// margin-top:1px;
|
|
@@ -534,6 +534,24 @@ export default {
|
|
|
534
534
|
}
|
|
535
535
|
return isequal
|
|
536
536
|
},
|
|
537
|
+
getMaxCycle (pattern) {
|
|
538
|
+
let rings = pattern.rings
|
|
539
|
+
let maxCycle = 0
|
|
540
|
+
for (let ring of rings) {
|
|
541
|
+
if (ring.length === 0) continue
|
|
542
|
+
let cycle = 0
|
|
543
|
+
for (let r of ring) {
|
|
544
|
+
if (r.mode === 7) { // 忽略相位不计周期
|
|
545
|
+
continue
|
|
546
|
+
}
|
|
547
|
+
cycle = cycle + r.value
|
|
548
|
+
}
|
|
549
|
+
if (cycle > maxCycle) {
|
|
550
|
+
maxCycle = cycle
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
return maxCycle
|
|
554
|
+
},
|
|
537
555
|
checkPatternRules (rings) {
|
|
538
556
|
if (!this.isRingCycleEqual(rings)) {
|
|
539
557
|
this.patternCycleEqual = false
|
|
@@ -561,8 +579,12 @@ export default {
|
|
|
561
579
|
// duration: this.manualInfo.tempDuration !== undefined ? Number(this.manualInfo.tempDuration) : 0,
|
|
562
580
|
data: {}
|
|
563
581
|
}
|
|
582
|
+
if (this.patternOne.length === 0) {
|
|
583
|
+
submitdata.data.cycle = this.getMaxCycle(this.planPattern)
|
|
584
|
+
} else {
|
|
585
|
+
submitdata.data.cycle = this.getMaxCycle(this.patternOne[0])
|
|
586
|
+
}
|
|
564
587
|
submitdata.data.offset = this.offset
|
|
565
|
-
submitdata.data.cycle = this.cycle
|
|
566
588
|
submitdata.data.rings = this.rings
|
|
567
589
|
this.checkPatternRules(submitdata.data.rings)
|
|
568
590
|
if (this.patternCycleEqual) {
|
|
@@ -24,11 +24,11 @@
|
|
|
24
24
|
:Width="'55'"
|
|
25
25
|
:Height="'55'" />
|
|
26
26
|
</template> -->
|
|
27
|
-
<patternwalksvg class="patternWalk"
|
|
27
|
+
<!-- <patternwalksvg class="patternWalk"
|
|
28
28
|
:showWalk="item[0].peddirection"
|
|
29
29
|
:Width="'40'"
|
|
30
|
-
:Height="'40'" />
|
|
31
|
-
<xdr-dir-selector Width="40PX" Height="40PX" :showlist="item"></xdr-dir-selector>
|
|
30
|
+
:Height="'40'" /> -->
|
|
31
|
+
<xdr-dir-selector Width="40PX" Height="40PX" :Data="showStyle" :showlist="item"></xdr-dir-selector>
|
|
32
32
|
<div style="display:flex;flex-direction:row;justify-content:center;align-items:center;">
|
|
33
33
|
<div class="current-stage-num" style="width:20%;">{{index + 1}}</div>
|
|
34
34
|
<div style="width:70%;">
|
|
@@ -53,11 +53,11 @@
|
|
|
53
53
|
<script>
|
|
54
54
|
/* eslint-disable */
|
|
55
55
|
import RingDataModel from '../../../utils/RingDataModel.js'
|
|
56
|
-
import patternwalksvg from '../PatternWalkSvg/PatternWalkSvg'
|
|
56
|
+
// import patternwalksvg from '../PatternWalkSvg/PatternWalkSvg'
|
|
57
57
|
export default {
|
|
58
58
|
name: 'Stages',
|
|
59
59
|
components: {
|
|
60
|
-
patternwalksvg
|
|
60
|
+
// patternwalksvg
|
|
61
61
|
},
|
|
62
62
|
props: {
|
|
63
63
|
isShowCurrentStage: {
|
|
@@ -99,6 +99,10 @@ export default {
|
|
|
99
99
|
},
|
|
100
100
|
data () {
|
|
101
101
|
return {
|
|
102
|
+
showStyle:{
|
|
103
|
+
top:'5PX',
|
|
104
|
+
left:'14px'
|
|
105
|
+
},
|
|
102
106
|
presetStageIndex: -1,
|
|
103
107
|
side: {key: 'pedphase1653818707546719', phaseid: 1, id: 1, name: '东人行横道'},
|
|
104
108
|
// stagesList: [],
|