openatc-components 0.1.33 → 0.1.34

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 (26) hide show
  1. package/package/kisscomps/components/CommonKanban/CommonKanban.vue +5 -4
  2. package/package/kisscomps/components/DrawChannelization/drawsvg/overlapAssociatedComponent.vue +20 -9
  3. package/package/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.vue +20 -9
  4. package/package/kisscomps/components/KanBan/kanban.vue +1 -1
  5. package/package/kisscomps/components/OverLap/OverLap.vue +15 -8
  6. package/package/kisscomps/components/PatternStatus/PatternStatus.vue +255 -87
  7. package/package/kisscomps/components/SchemeConfig/tentativeplancontrolmodal/index.vue +23 -1
  8. package/package/kisscomps/components/Stages/index.vue +9 -5
  9. package/package/kisscomps/components/XRDDirSelector/XRDDirSelector.vue +672 -293
  10. package/package/kissui.min.js +1 -1
  11. package/package.json +1 -1
  12. package/src/kisscomps/components/CommonKanban/CommonKanban.vue +5 -4
  13. package/src/kisscomps/components/DrawChannelization/drawsvg/overlapAssociatedComponent.vue +20 -9
  14. package/src/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.vue +20 -9
  15. package/src/kisscomps/components/KanBan/kanban.vue +1 -1
  16. package/src/kisscomps/components/OverLap/OverLap.vue +15 -8
  17. package/src/kisscomps/components/PatternStatus/PatternStatus.vue +255 -87
  18. package/src/kisscomps/components/SchemeConfig/tentativeplancontrolmodal/index.vue +23 -1
  19. package/src/kisscomps/components/Stages/index.vue +9 -5
  20. package/src/kisscomps/components/XRDDirSelector/XRDDirSelector.vue +672 -293
  21. package/src/node_modules/.package_versions.json +1 -0
  22. package/src/utils/RingDataModel.js +18 -2
  23. package/src/views/intersection.vue +1 -1
  24. package/src/views/overView.vue +3 -3
  25. package/src/views/schemeconfig.vue +3 -3
  26. package/static/styles/schemeconfig.scss +136 -136
@@ -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.controltype===99?'direction': ''">
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" v-for="(item, index) in barrierList" :key="index + '1'">
47
- <div class="divider" :style="{'left':item, 'height':barrierHeight}"></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 () {
@@ -184,7 +186,11 @@ export default {
184
186
  }
185
187
  // this.controlDatas = this.controlData
186
188
  this.getPedPhasePos()
187
- this.handlePatternData()
189
+ if (this.controlData.patternid === 109) {
190
+ this.handleTentivePatternData()
191
+ } else {
192
+ this.handlePatternData()
193
+ }
188
194
  this.handleBarrierHeight()
189
195
  },
190
196
  // 深度观察监听
@@ -298,6 +304,7 @@ export default {
298
304
  },
299
305
  handleStageData (data) {
300
306
  if (!data) return
307
+ let peddirections = this.getPed(data)
301
308
  let stagesTemp = []
302
309
  let tempList = []
303
310
  for (let stg of data) {
@@ -309,11 +316,19 @@ export default {
309
316
  directionList.push(...currPhase.direction)
310
317
  directionList = Array.from(new Set(directionList))
311
318
  }
312
- // if (directionList.length === 0) return
313
- tempList = directionList.map(dir => ({
314
- id: dir,
315
- color: '#606266'
316
- }))
319
+ if (directionList.length === 0) {
320
+ tempList.push({
321
+ id: '',
322
+ color: '#606266',
323
+ peddirection: peddirections
324
+ })
325
+ } else {
326
+ tempList = directionList.map(dir => ({
327
+ id: dir,
328
+ color: '#606266',
329
+ peddirection: peddirections
330
+ }))
331
+ }
317
332
  stagesTemp.push(...tempList)
318
333
  }
319
334
  return stagesTemp
@@ -332,7 +347,7 @@ export default {
332
347
  this.stageLists = this.localPatternList[i].stagesList.map(item => {
333
348
  return {
334
349
  ...item,
335
- peddirection: this.getPed(item.phases ? item.phases : item.stages),
350
+ // peddirection: this.getPed(item.phases ? item.phases : item.stages),
336
351
  direction: this.handleStageData(item.phases ? item.phases : item.stages),
337
352
  greenWidth: (item.green / stageMaxCyle * 100).toFixed(3) + '%',
338
353
  yellowWidth: (item.yellow / stageMaxCyle * 100).toFixed(3) + '%',
@@ -353,7 +368,7 @@ export default {
353
368
  this.stageLists = this.stagesChange.map(item => {
354
369
  return {
355
370
  ...item,
356
- peddirection: this.getPed(item.phases ? item.phases : item.stages),
371
+ // peddirection: this.getPed(item.phases ? item.phases : item.stages),
357
372
  direction: this.handleStageData(item.phases ? item.phases : item.stages),
358
373
  greenWidth: (item.green / stageMaxCyle * 100).toFixed(3) + '%',
359
374
  yellowWidth: (item.yellow / stageMaxCyle * 100).toFixed(3) + '%',
@@ -406,15 +421,17 @@ export default {
406
421
  }
407
422
  })
408
423
  },
409
- handlePatternData () {
424
+ handleTentivePatternData () {
410
425
  if (!this.controlData) return
411
426
  this.newList = []
412
427
  if (Object.keys(this.controlData).length === 0 || this.phaseList.length === 0) return
413
428
  if (!this.controlData.phase) return
429
+ // let cycle = this.controlData.cycle
414
430
  if (!this.controlData.rings) return
415
431
  let newValue = []
416
432
  for (let rings of this.controlData.rings) {
417
433
  let phase = this.controlData.phase
434
+ // let list = []
418
435
  let obj = {}
419
436
  for (let key in rings.sequence) {
420
437
  obj[key] = rings.sequence[key]
@@ -438,14 +455,9 @@ export default {
438
455
  })
439
456
  }
440
457
  }
441
- this.handleOverViewChange(newValue)
442
- },
443
- handleBarrierHeight () { // 屏障高度
444
- if (!this.patternInfo) return
445
- let patternLength = this.patternInfo.length
446
- this.barrierHeight = (patternLength * 35 + 21) + 'px'
458
+ this.handleTentative(newValue)
447
459
  },
448
- handleOverViewChange (val) {
460
+ handleTentative (val) {
449
461
  if (val === null || val.length === 0) return
450
462
  this.patternInfo = []
451
463
  let currentArr = []
@@ -489,6 +501,20 @@ export default {
489
501
  }
490
502
  return item.id === ring.id
491
503
  })[0]
504
+ let peddirections = []
505
+ for (let walk of this.sidewalkPhaseData) {
506
+ for (let ped of currPhase.peddirection) {
507
+ // if (stg === walk.phaseid) {
508
+ let objs = {}
509
+ objs.name = walk.name
510
+ objs.id = walk.id
511
+ if (ped === walk.id) {
512
+ peddirections.push(objs)
513
+ peddirections = Array.from(new Set(peddirections))
514
+ }
515
+ // }
516
+ }
517
+ }
492
518
  if (ring.desc) {
493
519
  obj.direction = ring.desc.map(item => { // 虚相位desc为空
494
520
  return {
@@ -497,12 +523,23 @@ export default {
497
523
  }
498
524
  })
499
525
  } else {
500
- obj.direction = currPhase.direction.map(item => {
501
- return {
502
- id: item,
503
- color: '#454545'
504
- }
505
- })
526
+ if (currPhase.direction.length > 0) {
527
+ obj.direction = currPhase.direction.map(item => {
528
+ return {
529
+ id: item,
530
+ peddirection: peddirections,
531
+ color: '#454545'
532
+ }
533
+ })
534
+ } else {
535
+ obj.direction = [
536
+ {
537
+ id: '',
538
+ color: '#454545',
539
+ peddirection: peddirections
540
+ }
541
+ ]
542
+ }
506
543
  }
507
544
  obj.split = split
508
545
  if (ring.sum) {
@@ -513,7 +550,76 @@ export default {
513
550
  obj.flashgreen = (currPhase.flashgreen / (this.max ? this.max : cycle) * 100).toFixed(3) + '%'
514
551
  obj.yellowWidth = (currPhase.yellow / (this.max ? this.max : cycle) * 100).toFixed(3) + '%'
515
552
  obj.greenWidth = ((split - currPhase.redclear - currPhase.yellow - currPhase.flashgreen) / (this.max ? this.max : cycle) * 100).toFixed(3) + '%'
516
- // obj.peddirection = currPhase.peddirection
553
+ // 忽略相位不显示
554
+ let mode = ring.mode
555
+ if (mode !== 7) { // 忽略相位不显示
556
+ list.push(obj)
557
+ }
558
+ }
559
+ this.patternInfo.push(list)
560
+ }
561
+ },
562
+ handlePatternData () {
563
+ if (!this.controlData) return
564
+ // this.newList = []
565
+ if (Object.keys(this.controlData).length === 0 || this.phaseList.length === 0) return
566
+ if (!this.controlData.phase) return
567
+ if (!this.controlData.rings) return
568
+ let nowPattern = this.localPatternList.filter(item => {
569
+ return item.id === this.controlData.patternid
570
+ })[0].rings
571
+ this.handleOverViewChange(nowPattern)
572
+ },
573
+ handleBarrierHeight () { // 屏障高度
574
+ if (!this.patternInfo) return
575
+ let patternLength = this.patternInfo.length
576
+ this.barrierHeight = (patternLength * 35 + 21) + 'px'
577
+ },
578
+ handleOverViewChange (val) {
579
+ if (val === null || val.length === 0) return
580
+ this.patternInfo = []
581
+ let currentArr = []
582
+ let newPattern = []
583
+ val.map(i => {
584
+ newPattern.push(...i)
585
+ })
586
+ if (this.phaseList.length === 0) return
587
+ for (let patternStatus of val[0]) {
588
+ // if (patternStatus.mode !== 7) {
589
+ let concurrent = this.phaseList.filter((item) => {
590
+ return item.id === patternStatus.id // patternStatus.id当前相位id concurrent当前相位的并发相位
591
+ })[0].concurrent// 当前相位的并发相位
592
+ if (concurrent) {
593
+ let obj = {
594
+ id: patternStatus.id,
595
+ current: concurrent.sort()
596
+ }
597
+ currentArr.push(obj)
598
+ }
599
+ // }
600
+ }
601
+ if (currentArr.length !== 0) {
602
+ let newCurrent = this.tranform(currentArr)
603
+ let ringTeam = this.step1(this.phaseList, newCurrent)
604
+ this.fillGap(ringTeam, val)
605
+ }
606
+ let cycle = this.controlData.cycle
607
+ for (let rings of val) {
608
+ if (rings.length === 0) continue
609
+ let list = []
610
+ for (let ring of rings) {
611
+ if (ring.value === 0) continue
612
+ let obj = {}
613
+ let split = ring.value
614
+ obj.id = ring.id
615
+ obj.mode = ring.mode
616
+ // obj.split = split
617
+ let currPhase = this.phaseList.filter((item) => {
618
+ if (item.id === ring.id && item.controltype === 99) {
619
+ obj.controltype = item.controltype
620
+ }
621
+ return item.id === ring.id
622
+ })[0]
517
623
  let peddirections = []
518
624
  for (let walk of this.sidewalkPhaseData) {
519
625
  for (let ped of currPhase.peddirection) {
@@ -528,12 +634,46 @@ export default {
528
634
  // }
529
635
  }
530
636
  }
531
- obj.peddirection = peddirections
532
- // 忽略相位不显示
533
- let mode = ring.mode
534
- if (mode !== 7) { // 忽略相位不显示
535
- list.push(obj)
637
+ if (ring.desc) {
638
+ obj.direction = ring.desc.map(item => { // 虚相位desc为空
639
+ return {
640
+ id: item.id,
641
+ color: '#454545'
642
+ }
643
+ })
644
+ } else {
645
+ if (currPhase.direction.length > 0) {
646
+ obj.direction = currPhase.direction.map(item => {
647
+ return {
648
+ id: item,
649
+ peddirection: peddirections,
650
+ color: '#454545'
651
+ }
652
+ })
653
+ } else {
654
+ obj.direction = [
655
+ {
656
+ id: '',
657
+ color: '#454545',
658
+ peddirection: peddirections
659
+ }
660
+ ]
661
+ }
662
+ }
663
+ obj.split = split
664
+ if (ring.sum) {
665
+ obj.redWidth = ((currPhase.redclear + ring.sum) / (this.max ? this.max : cycle) * 100).toFixed(3) + '%'
666
+ } else {
667
+ obj.redWidth = (currPhase.redclear / (this.max ? this.max : cycle) * 100).toFixed(3) + '%'
536
668
  }
669
+ obj.flashgreen = (currPhase.flashgreen / (this.max ? this.max : cycle) * 100).toFixed(3) + '%'
670
+ obj.yellowWidth = (currPhase.yellow / (this.max ? this.max : cycle) * 100).toFixed(3) + '%'
671
+ obj.greenWidth = ((split - currPhase.redclear - currPhase.yellow - currPhase.flashgreen) / (this.max ? this.max : cycle) * 100).toFixed(3) + '%'
672
+ // 忽略相位不显示
673
+ // let mode = ring.mode
674
+ // if (mode !== 7) { // 忽略相位不显示
675
+ list.push(obj)
676
+ // }
537
677
  }
538
678
  this.patternInfo.push(list)
539
679
  }
@@ -549,18 +689,18 @@ export default {
549
689
  })
550
690
  if (this.phaseList.length === 0) return
551
691
  for (let patternStatus of val[0]) {
552
- if (patternStatus.mode !== 7) {
553
- let concurrent = this.phaseList.filter((item) => {
554
- return item.id === patternStatus.id // patternStatus.id当前相位id concurrent当前相位的并发相位
555
- })[0].concurrent// 当前相位的并发相位
556
- if (concurrent) {
557
- let obj = {
558
- id: patternStatus.id,
559
- current: concurrent.sort()
560
- }
561
- currentArr.push(obj)
692
+ // if (patternStatus.mode !== 7) {
693
+ let concurrent = this.phaseList.filter((item) => {
694
+ return item.id === patternStatus.id // patternStatus.id当前相位id concurrent当前相位的并发相位
695
+ })[0].concurrent// 当前相位的并发相位
696
+ if (concurrent) {
697
+ let obj = {
698
+ id: patternStatus.id,
699
+ current: concurrent.sort()
562
700
  }
701
+ currentArr.push(obj)
563
702
  }
703
+ // }
564
704
  }
565
705
  if (currentArr.length !== 0) {
566
706
  let newCurrent = this.tranform(currentArr)
@@ -590,20 +730,46 @@ export default {
590
730
  }
591
731
  return item.id === ring.id
592
732
  })[0]
593
- if (ring.desc) {
733
+ let peddirections = []
734
+ for (let walk of this.sidewalkPhaseData) {
735
+ for (let ped of currPhase.peddirection) {
736
+ // if (stg === walk.phaseid) {
737
+ let objs = {}
738
+ objs.name = walk.name
739
+ objs.id = walk.id
740
+ if (ped === walk.id) {
741
+ peddirections.push(objs)
742
+ peddirections = Array.from(new Set(peddirections))
743
+ }
744
+ // }
745
+ }
746
+ }
747
+ if (ring.desc && ring.desc.length > 0) {
594
748
  obj.direction = ring.desc.map(item => { // 虚相位desc为空
595
749
  return {
596
750
  id: item.id,
597
- color: '#454545'
751
+ color: '#454545',
752
+ peddirection: peddirections
598
753
  }
599
754
  })
600
755
  } else {
601
- obj.direction = currPhase.direction.map(item => {
602
- return {
603
- id: item,
604
- color: '#454545'
605
- }
606
- })
756
+ if (currPhase.direction > 0) {
757
+ obj.direction = currPhase.direction.map(item => {
758
+ return {
759
+ id: item,
760
+ color: '#454545',
761
+ peddirection: peddirections
762
+ }
763
+ })
764
+ } else {
765
+ obj.direction = [
766
+ {
767
+ id: '',
768
+ color: '#454545',
769
+ peddirection: peddirections
770
+ }
771
+ ]
772
+ }
607
773
  }
608
774
  if (ring.sum) {
609
775
  obj.split = split + ring.sum
@@ -612,30 +778,31 @@ export default {
612
778
  obj.split = split
613
779
  obj.greenWidth = ((split - currPhase.redclear - currPhase.yellow - currPhase.flashgreen) / (this.max ? this.max : this.newCycle) * 100).toFixed(3) + '%'
614
780
  }
781
+ obj.mode = ring.mode
615
782
  obj.flashgreen = (currPhase.flashgreen / (this.max ? this.max : this.newCycle) * 100).toFixed(3) + '%'
616
783
  obj.redWidth = (currPhase.redclear / (this.max ? this.max : this.newCycle) * 100).toFixed(3) + '%'
617
784
  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
- for (let ped of currPhase.peddirection) {
622
- // if (stg === walk.phaseid) {
623
- let objs = {}
624
- objs.name = walk.name
625
- objs.id = walk.id
626
- if (ped === walk.id) {
627
- peddirections.push(objs)
628
- peddirections = Array.from(new Set(peddirections))
629
- }
630
- // }
631
- }
632
- }
633
- obj.peddirection = peddirections
785
+ // // obj.peddirection = currPhase.peddirection
786
+ // let peddirections = []
787
+ // for (let walk of this.sidewalkPhaseData) {
788
+ // for (let ped of currPhase.peddirection) {
789
+ // // if (stg === walk.phaseid) {
790
+ // let objs = {}
791
+ // objs.name = walk.name
792
+ // objs.id = walk.id
793
+ // if (ped === walk.id) {
794
+ // peddirections.push(objs)
795
+ // peddirections = Array.from(new Set(peddirections))
796
+ // }
797
+ // // }
798
+ // }
799
+ // }
800
+ // obj.peddirection = peddirections
634
801
  // 忽略相位不显示
635
- let mode = ring.mode
636
- if (mode !== 7) { // 忽略相位不显示
637
- list.push(obj)
638
- }
802
+ // let mode = ring.mode
803
+ // if (mode !== 7) { // 忽略相位不显示
804
+ list.push(obj)
805
+ // }
639
806
  }
640
807
  this.patternInfo.push(list)
641
808
  }
@@ -721,9 +888,9 @@ export default {
721
888
  let ret = []
722
889
  const patternObj = {}
723
890
  pattern.forEach(l => {
724
- if (l.mode !== 7) {
725
- patternObj[l.id] = l.value
726
- }
891
+ // if (l.mode !== 7) {
892
+ patternObj[l.id] = l.value
893
+ // }
727
894
  })
728
895
  newArr.forEach((na, index) => {
729
896
  let max = 0
@@ -733,7 +900,7 @@ export default {
733
900
  max = total
734
901
  }
735
902
  })
736
- while (index > 0 && max < this.newCycle) { // && max < _this.newCycle
903
+ while (index > 0) { // && max < _this.newCycle
737
904
  index--
738
905
  max += ret[index]
739
906
  }
@@ -746,9 +913,9 @@ export default {
746
913
  const patternObj = {}
747
914
  pattern.forEach(l => {
748
915
  l.map(k => {
749
- if (k.mode !== 7) {
750
- patternObj[k.id] = k.value
751
- }
916
+ // if (k.mode !== 7) {
917
+ patternObj[k.id] = k.value
918
+ // }
752
919
  })
753
920
  })
754
921
  let newMax = []
@@ -768,7 +935,7 @@ export default {
768
935
  this.max = newmaxNum + newminNum
769
936
  pattern.map(d => {
770
937
  d.map(r => {
771
- if (r.sum && r.mode !== 7) {
938
+ if (r.sum) {
772
939
  delete r.sum
773
940
  }
774
941
  })
@@ -778,7 +945,7 @@ export default {
778
945
  na.map(n => {
779
946
  pattern.map(h => {
780
947
  h.map(d => {
781
- if (d.id === n.data[1] && d.sum && d.mode !== 7) {
948
+ if (d.id === n.data[1] && d.sum) {
782
949
  delete d.sum
783
950
  }
784
951
  })
@@ -790,11 +957,11 @@ export default {
790
957
  pattern.map(h => {
791
958
  h.map(d => {
792
959
  if (n.data.length > 1) {
793
- if (d.id === n.data[1] && d.mode !== 7) {
960
+ if (d.id === n.data[1]) {
794
961
  delete d.sum
795
962
  }
796
963
  } else {
797
- if (d.id === n.data[0] && d.mode !== 7) {
964
+ if (d.id === n.data[0]) {
798
965
  delete d.sum
799
966
  }
800
967
  }
@@ -812,11 +979,11 @@ export default {
812
979
  pattern.filter((i) => {
813
980
  i.map(j => {
814
981
  if (m.data.length > 1) {
815
- if (j.id === m.data[1] && j.mode !== 7) {
982
+ if (j.id === m.data[1]) {
816
983
  j.sum = sum
817
984
  }
818
985
  } else {
819
- if (j.id === m.data[0] && j.mode !== 7) {
986
+ if (j.id === m.data[0]) {
820
987
  j.sum = sum
821
988
  }
822
989
  }
@@ -826,7 +993,7 @@ export default {
826
993
  }
827
994
  let mapAdd = pattern.map(item => {
828
995
  return item.map(val => {
829
- return val.mode === 7 ? 0 : val.value + (val.sum ? val.sum : 0)
996
+ return val.value + (val.sum ? val.sum : 0)
830
997
  })
831
998
  })
832
999
  let maxCycle = mapAdd.length > 0 ? mapAdd.map(item => {
@@ -904,6 +1071,7 @@ export default {
904
1071
  float: left;
905
1072
  // margin-left: 5px;
906
1073
  height: 34px;
1074
+ width: 36px;
907
1075
  z-index: 999;
908
1076
  background: rgba(30, 96, 12, 0.2);
909
1077
  // 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: [],