openatc-components 0.2.36 → 0.2.37
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/DirectionListConfiguration/DirectionListConfiguration.vue +49 -49
- package/package/kisscomps/components/IntersectionDirectionSelection/IntersectionDirectionSelection.vue +39 -8
- package/package/kisscomps/components/PatternStatus/PatternStatus.vue +5 -8
- package/package/kisscomps/components/SchemeConfig/SchemeConfig.vue +25 -178
- package/package/kisscomps/components/SchemeConfig/azimuthlocking/index.vue +29 -72
- package/package/kisscomps/components/SchemeConfig/closePhaselControlModal/index.vue +3 -14
- package/package/kisscomps/components/SchemeConfig/lockingPhaselControlModal/index.vue +7 -17
- package/package/kisscomps/components/SchemeConfig/manualControlModal/index.vue +1 -1
- package/package/kisscomps/components/SchemeConfig/priorityControl/index.vue +9 -18
- package/package/kisscomps/components/SchemeConfig/realtimeStatusModal/index.vue +1 -1
- package/package/kisscomps/components/SchemeConfig/tentativeplancontrolmodal/index.vue +36 -38
- package/package/kisscomps/components/Stages/index.vue +11 -52
- package/package/kisscomps/components/XRDDirSelector/XRDDirSelector.vue +29 -30
- package/package/kisscomps/components/patternConfig/pattern/patternTable.vue +73 -13
- package/package/kisscomps/components/patternConfig/planContent.vue +3 -0
- package/package/kissui.min.js +1 -1
- package/package.json +2 -2
- package/src/i18n/language/en.js +2 -6
- package/src/i18n/language/zh.js +3 -7
- package/src/kisscomps/components/DirectionListConfiguration/DirectionListConfiguration.vue +49 -49
- package/src/kisscomps/components/IntersectionDirectionSelection/IntersectionDirectionSelection.vue +39 -8
- package/src/kisscomps/components/PatternStatus/PatternStatus.vue +5 -8
- package/src/kisscomps/components/SchemeConfig/SchemeConfig.vue +25 -178
- package/src/kisscomps/components/SchemeConfig/azimuthlocking/index.vue +29 -72
- package/src/kisscomps/components/SchemeConfig/closePhaselControlModal/index.vue +3 -14
- package/src/kisscomps/components/SchemeConfig/lockingPhaselControlModal/index.vue +7 -17
- package/src/kisscomps/components/SchemeConfig/manualControlModal/index.vue +1 -1
- package/src/kisscomps/components/SchemeConfig/priorityControl/index.vue +9 -18
- package/src/kisscomps/components/SchemeConfig/realtimeStatusModal/index.vue +1 -1
- package/src/kisscomps/components/SchemeConfig/tentativeplancontrolmodal/index.vue +36 -38
- package/src/kisscomps/components/Stages/index.vue +11 -52
- package/src/kisscomps/components/XRDDirSelector/XRDDirSelector.vue +29 -30
- package/src/kisscomps/components/patternConfig/pattern/patternTable.vue +73 -13
- package/src/kisscomps/components/patternConfig/planContent.vue +3 -0
- package/src/views/intersection.vue +11 -5
- package/src/views/patternConfig.vue +7 -970
- package/src/views/schemeconfig.vue +50 -19
- package/static/styles/schemeconfig.scss +58 -70
- package/static/styles/stages.scss +8 -1
- package/src/icons/svg/fangxiangsuoding.svg +0 -1
- package/src/icons/svg/jieduansuoding.svg +0 -1
- package/src/icons/svg/xiangweisuoding.svg +0 -1
- package/src/kisscomps/components/SchemeConfig/manualControlModalNew/controlModelGroup.vue +0 -128
- package/src/kisscomps/components/SchemeConfig/manualControlModalNew/icon.vue +0 -426
- package/src/kisscomps/components/SchemeConfig/manualControlModalNew/index.vue +0 -820
- package/src/kisscomps/components/SchemeConfig/manualControlModalNew/othersIcon.vue +0 -194
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<div>
|
|
16
16
|
<div style="width: 100%; height: auto;">
|
|
17
17
|
<div class="control-model" v-for="(item, index) in stagesList" :key="index">
|
|
18
|
-
<div style="position:relative;" :style="
|
|
18
|
+
<div style="position:relative;" :style="singleStyle" class="single-model" @click="selectStages(index + 1)" :class="currentStage == index + 1 ? 'single-model-select' : ''">
|
|
19
19
|
<!-- <template v-for="(side, index) in item[0].sidewalkPhaseData" >
|
|
20
20
|
<PatternWalkSvg class="patternWalk"
|
|
21
21
|
v-if="item[0].peddirection.includes(side.id)"
|
|
@@ -28,18 +28,18 @@
|
|
|
28
28
|
:showWalk="item[0].peddirection"
|
|
29
29
|
:Width="'40'"
|
|
30
30
|
:Height="'40'" /> -->
|
|
31
|
-
<xdr-dir-selector Width="75PX" Height="75PX" Widths="65px" Heights="65px" :Data="showStyle" :Datas="showStyles" :showlist="
|
|
32
|
-
<div style="height:
|
|
33
|
-
<div class="current-stage-num" style="width:20%;"
|
|
31
|
+
<xdr-dir-selector Width="75PX" Height="75PX" Widths="65px" Heights="65px" :Data="showStyle" :Datas="showStyles" :showlist="item"></xdr-dir-selector>
|
|
32
|
+
<div style="height:65px;display:flex;flex-direction:row;justify-content:center;align-items:end;">
|
|
33
|
+
<div class="current-stage-num" style="width:20%;">{{index + 1}}</div>
|
|
34
34
|
<div style="width:70%;">
|
|
35
|
-
<i class="iconfont icon-feijidongche"
|
|
36
|
-
<i class="iconfont icon-lukouzhilu"
|
|
37
|
-
<i class="iconfont icon-BRT"
|
|
35
|
+
<i class="iconfont icon-feijidongche" style="font-size:11PX;color:#606266;margin-left:10PX" v-if="item[item.length-1].controltype === 6"></i>
|
|
36
|
+
<i class="iconfont icon-lukouzhilu" style="font-size:16PX;color:#454545;margin-left:10PX" v-if="item[item.length-1].controltype === 1"></i>
|
|
37
|
+
<i class="iconfont icon-BRT" style="font-size:11PX;color:#454545;margin-left:10PX" v-if="item[item.length-1].controltype === 4"></i>
|
|
38
38
|
<div style="transform:scale(0.65);margin-left:10PX">
|
|
39
|
-
<i class="iconfont icon-xuxiangwei-xin"
|
|
39
|
+
<i class="iconfont icon-xuxiangwei-xin" style="font-size:5PX;color:#454545;" v-if="item[item.length-1].controltype === 99"></i>
|
|
40
40
|
</div>
|
|
41
|
-
<i class="iconfont icon-gongjiaoche"
|
|
42
|
-
<i class="iconfont icon-youguidianche"
|
|
41
|
+
<i class="iconfont icon-gongjiaoche" style="font-size:11PX;color:#606266;margin-left:10PX" v-if="item[item.length-1].controltype === 3"></i>
|
|
42
|
+
<i class="iconfont icon-youguidianche" style="font-size:11PX;color:#606266;margin-left:10PX" v-if="item[item.length-1].controltype === 5"></i>
|
|
43
43
|
<div v-if="presetStageIndex === index + 1" style="color:red;width:50px;position:absolute;right:0px;bottom:5px;font-size:11px;">{{presetText}}</div>
|
|
44
44
|
</div>
|
|
45
45
|
</div>
|
|
@@ -54,8 +54,6 @@
|
|
|
54
54
|
/* eslint-disable */
|
|
55
55
|
import RingDataModel from '../../../utils/RingDataModel.js'
|
|
56
56
|
// import patternwalksvg from '../PatternWalkSvg/PatternWalkSvg'
|
|
57
|
-
import { getTheme } from '../../../utils/auth.js'
|
|
58
|
-
|
|
59
57
|
export default {
|
|
60
58
|
name: 'Stages',
|
|
61
59
|
components: {
|
|
@@ -104,7 +102,7 @@ export default {
|
|
|
104
102
|
},
|
|
105
103
|
StageHeight: {
|
|
106
104
|
type: String,
|
|
107
|
-
default: '
|
|
105
|
+
default: '65px'
|
|
108
106
|
}
|
|
109
107
|
},
|
|
110
108
|
data () {
|
|
@@ -121,8 +119,6 @@ export default {
|
|
|
121
119
|
side: {key: 'pedphase1653818707546719', phaseid: 1, id: 1, name: '东人行横道'},
|
|
122
120
|
// stagesList: [],
|
|
123
121
|
currentStage: -1,
|
|
124
|
-
themeColor: getTheme() === 'light' ? '#606266' : '#fff',
|
|
125
|
-
themeColor2: getTheme() === 'light' ? '#454545' : '#fff'
|
|
126
122
|
};
|
|
127
123
|
},
|
|
128
124
|
computed: {
|
|
@@ -142,7 +138,6 @@ export default {
|
|
|
142
138
|
}
|
|
143
139
|
}
|
|
144
140
|
console.log(list,'list')
|
|
145
|
-
this.clickType(list, this.currentStage)
|
|
146
141
|
console.log(this.phaseList,'this.phaseList')
|
|
147
142
|
return list
|
|
148
143
|
},
|
|
@@ -208,45 +203,9 @@ export default {
|
|
|
208
203
|
}
|
|
209
204
|
this.currentStage = value
|
|
210
205
|
this.$emit('onSelectStages', value)
|
|
211
|
-
this.clickType(this.stagesList, value)
|
|
212
|
-
},
|
|
213
|
-
resetToDefaultThemeColor (List) {
|
|
214
|
-
for (let i = 0; i < List.length; i++) {
|
|
215
|
-
if (List[i].length) {
|
|
216
|
-
if (List[i][0].clicked) {
|
|
217
|
-
delete List[i][0].clicked
|
|
218
|
-
}
|
|
219
|
-
List[i][0].bgcolor = getTheme() === 'light' ? '#edf6ff' : '#243d59'
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
},
|
|
223
|
-
highlightThemeColor (List, index) {
|
|
224
|
-
for (let i = 0; i < List.length; i++) {
|
|
225
|
-
if (i === index) {
|
|
226
|
-
List[i][0].clicked = true
|
|
227
|
-
List[i][0].bgcolor = getTheme() === 'light' ? '#c1e0ff' : '#0082ac'
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
},
|
|
231
|
-
clickType (stagelist, value) {
|
|
232
|
-
this.resetToDefaultThemeColor(stagelist)
|
|
233
|
-
this.highlightThemeColor(stagelist, value - 1)
|
|
234
|
-
},
|
|
235
|
-
dirListSetTheme (list) {
|
|
236
|
-
let dirArr = []
|
|
237
|
-
let color = getTheme() === 'light' ? '#606266' : '#F1F3F4'
|
|
238
|
-
for (let rec of list) {
|
|
239
|
-
let recd = {
|
|
240
|
-
...rec,
|
|
241
|
-
color: color
|
|
242
|
-
}
|
|
243
|
-
dirArr.push(recd)
|
|
244
|
-
}
|
|
245
|
-
return dirArr
|
|
246
206
|
}
|
|
247
207
|
},
|
|
248
208
|
mounted () {
|
|
249
|
-
this.resetToDefaultThemeColor(this.stagesList)
|
|
250
209
|
}
|
|
251
210
|
};
|
|
252
211
|
</script>
|
|
@@ -484,8 +484,6 @@
|
|
|
484
484
|
</template>
|
|
485
485
|
<script>
|
|
486
486
|
import { mapState } from 'vuex'
|
|
487
|
-
import { getTheme } from '../../../utils/auth.js'
|
|
488
|
-
|
|
489
487
|
export default {
|
|
490
488
|
name: 'xdr-dir-selector',
|
|
491
489
|
props: {
|
|
@@ -556,196 +554,196 @@ export default {
|
|
|
556
554
|
id: 1,
|
|
557
555
|
name: '东西路段人行横道',
|
|
558
556
|
isshow: false,
|
|
559
|
-
color:
|
|
557
|
+
color: '#040000',
|
|
560
558
|
lockColor: '#7ccc66'
|
|
561
559
|
},
|
|
562
560
|
{
|
|
563
561
|
id: 2,
|
|
564
562
|
name: '南北路段人行横道',
|
|
565
563
|
isshow: false,
|
|
566
|
-
color:
|
|
564
|
+
color: '#040000',
|
|
567
565
|
lockColor: '#7ccc66'
|
|
568
566
|
},
|
|
569
567
|
{
|
|
570
568
|
id: 3,
|
|
571
569
|
name: 'X人行横道-\\',
|
|
572
570
|
isshow: false,
|
|
573
|
-
color:
|
|
571
|
+
color: '#040000',
|
|
574
572
|
lockColor: '#7ccc66'
|
|
575
573
|
},
|
|
576
574
|
{
|
|
577
575
|
id: 4,
|
|
578
576
|
name: 'X人行横道-/',
|
|
579
577
|
isshow: false,
|
|
580
|
-
color:
|
|
578
|
+
color: '#040000',
|
|
581
579
|
lockColor: '#7ccc66'
|
|
582
580
|
},
|
|
583
581
|
{
|
|
584
582
|
id: 5,
|
|
585
583
|
name: '北人行横道',
|
|
586
584
|
isshow: false,
|
|
587
|
-
color:
|
|
585
|
+
color: '#040000',
|
|
588
586
|
lockColor: '#7ccc66'
|
|
589
587
|
},
|
|
590
588
|
{
|
|
591
589
|
id: 6,
|
|
592
590
|
name: '南人行横道',
|
|
593
591
|
isshow: false,
|
|
594
|
-
color:
|
|
592
|
+
color: '#040000',
|
|
595
593
|
lockColor: '#7ccc66'
|
|
596
594
|
},
|
|
597
595
|
{
|
|
598
596
|
id: 7,
|
|
599
597
|
name: '东人行横道',
|
|
600
598
|
isshow: false,
|
|
601
|
-
color:
|
|
599
|
+
color: '#040000',
|
|
602
600
|
lockColor: '#7ccc66'
|
|
603
601
|
},
|
|
604
602
|
{
|
|
605
603
|
id: 8,
|
|
606
604
|
name: '西人行横道',
|
|
607
605
|
isshow: false,
|
|
608
|
-
color:
|
|
606
|
+
color: '#040000',
|
|
609
607
|
lockColor: '#7ccc66'
|
|
610
608
|
},
|
|
611
609
|
{
|
|
612
610
|
id: 9,
|
|
613
611
|
name: '西人行横道-下',
|
|
614
612
|
isshow: false,
|
|
615
|
-
color:
|
|
613
|
+
color: '#040000',
|
|
616
614
|
lockColor: '#7ccc66'
|
|
617
615
|
},
|
|
618
616
|
{
|
|
619
617
|
id: 10,
|
|
620
618
|
name: '西人行横道-上',
|
|
621
619
|
isshow: false,
|
|
622
|
-
color:
|
|
620
|
+
color: '#040000',
|
|
623
621
|
lockColor: '#7ccc66'
|
|
624
622
|
},
|
|
625
623
|
{
|
|
626
624
|
id: 11,
|
|
627
625
|
name: '东人行横道-上',
|
|
628
626
|
isshow: false,
|
|
629
|
-
color:
|
|
627
|
+
color: '#040000',
|
|
630
628
|
lockColor: '#7ccc66'
|
|
631
629
|
},
|
|
632
630
|
{
|
|
633
631
|
id: 12,
|
|
634
632
|
name: '东人行横道-下',
|
|
635
633
|
isshow: false,
|
|
636
|
-
color:
|
|
634
|
+
color: '#040000',
|
|
637
635
|
lockColor: '#7ccc66'
|
|
638
636
|
},
|
|
639
637
|
{
|
|
640
638
|
id: 13,
|
|
641
639
|
name: '南人行横道-右',
|
|
642
640
|
isshow: false,
|
|
643
|
-
color:
|
|
641
|
+
color: '#040000',
|
|
644
642
|
lockColor: '#7ccc66'
|
|
645
643
|
},
|
|
646
644
|
{
|
|
647
645
|
id: 14,
|
|
648
646
|
name: '南人行横道-左',
|
|
649
647
|
isshow: false,
|
|
650
|
-
color:
|
|
648
|
+
color: '#040000',
|
|
651
649
|
lockColor: '#7ccc66'
|
|
652
650
|
},
|
|
653
651
|
{
|
|
654
652
|
id: 15,
|
|
655
653
|
name: '北人行横道-右',
|
|
656
654
|
isshow: false,
|
|
657
|
-
color:
|
|
655
|
+
color: '#040000',
|
|
658
656
|
lockColor: '#7ccc66'
|
|
659
657
|
},
|
|
660
658
|
{
|
|
661
659
|
id: 16,
|
|
662
660
|
name: '北人行横道-左',
|
|
663
661
|
isshow: false,
|
|
664
|
-
color:
|
|
662
|
+
color: '#040000',
|
|
665
663
|
lockColor: '#7ccc66'
|
|
666
664
|
},
|
|
667
665
|
{
|
|
668
666
|
id: 17,
|
|
669
667
|
name: '东南人行横道',
|
|
670
668
|
isshow: false,
|
|
671
|
-
color:
|
|
669
|
+
color: '#040000',
|
|
672
670
|
lockColor: '#7ccc66'
|
|
673
671
|
},
|
|
674
672
|
{
|
|
675
673
|
id: 18,
|
|
676
674
|
name: '西南人行横道',
|
|
677
675
|
isshow: false,
|
|
678
|
-
color:
|
|
676
|
+
color: '#040000',
|
|
679
677
|
lockColor: '#7ccc66'
|
|
680
678
|
},
|
|
681
679
|
{
|
|
682
680
|
id: 19,
|
|
683
681
|
name: '东北人行横道',
|
|
684
682
|
isshow: false,
|
|
685
|
-
color:
|
|
683
|
+
color: '#040000',
|
|
686
684
|
lockColor: '#7ccc66'
|
|
687
685
|
},
|
|
688
686
|
{
|
|
689
687
|
id: 20,
|
|
690
688
|
name: '西北人行横道',
|
|
691
689
|
isshow: false,
|
|
692
|
-
color:
|
|
690
|
+
color: '#040000',
|
|
693
691
|
lockColor: '#7ccc66'
|
|
694
692
|
},
|
|
695
693
|
{
|
|
696
694
|
id: 21,
|
|
697
695
|
name: '东南人行横道-上',
|
|
698
696
|
isshow: false,
|
|
699
|
-
color:
|
|
697
|
+
color: '#040000',
|
|
700
698
|
lockColor: '#7ccc66'
|
|
701
699
|
},
|
|
702
700
|
{
|
|
703
701
|
id: 22,
|
|
704
702
|
name: '东南人行横道-下',
|
|
705
703
|
isshow: false,
|
|
706
|
-
color:
|
|
704
|
+
color: '#040000',
|
|
707
705
|
lockColor: '#7ccc66'
|
|
708
706
|
},
|
|
709
707
|
{
|
|
710
708
|
id: 23,
|
|
711
709
|
name: '西南人行横道-上',
|
|
712
710
|
isshow: false,
|
|
713
|
-
color:
|
|
711
|
+
color: '#040000',
|
|
714
712
|
lockColor: '#7ccc66'
|
|
715
713
|
},
|
|
716
714
|
{
|
|
717
715
|
id: 24,
|
|
718
716
|
name: '西南人行横道-下',
|
|
719
717
|
isshow: false,
|
|
720
|
-
color:
|
|
718
|
+
color: '#040000',
|
|
721
719
|
lockColor: '#7ccc66'
|
|
722
720
|
},
|
|
723
721
|
{
|
|
724
722
|
id: 25,
|
|
725
723
|
name: '东北人行横道-上',
|
|
726
724
|
isshow: false,
|
|
727
|
-
color:
|
|
725
|
+
color: '#040000',
|
|
728
726
|
lockColor: '#7ccc66'
|
|
729
727
|
},
|
|
730
728
|
{
|
|
731
729
|
id: 26,
|
|
732
730
|
name: '东北人行横道-下',
|
|
733
731
|
isshow: false,
|
|
734
|
-
color:
|
|
732
|
+
color: '#040000',
|
|
735
733
|
lockColor: '#7ccc66'
|
|
736
734
|
},
|
|
737
735
|
{
|
|
738
736
|
id: 27,
|
|
739
737
|
name: '西北人行横道-上',
|
|
740
738
|
isshow: false,
|
|
741
|
-
color:
|
|
739
|
+
color: '#040000',
|
|
742
740
|
lockColor: '#7ccc66'
|
|
743
741
|
},
|
|
744
742
|
{
|
|
745
743
|
id: 28,
|
|
746
744
|
name: '西北人行横道-下',
|
|
747
745
|
isshow: false,
|
|
748
|
-
color:
|
|
746
|
+
color: '#040000',
|
|
749
747
|
lockColor: '#7ccc66'
|
|
750
748
|
}
|
|
751
749
|
],
|
|
@@ -1034,6 +1032,7 @@ export default {
|
|
|
1034
1032
|
for (let j = 0; j < this.peoplestatus.length; j++) {
|
|
1035
1033
|
if (showlist[0].peddirection[i].name === this.peoplestatus[j].name) {
|
|
1036
1034
|
this.peoplestatus[j].isshow = true
|
|
1035
|
+
this.peoplestatus[j].color = showlist[0].peddirection[i].color
|
|
1037
1036
|
}
|
|
1038
1037
|
}
|
|
1039
1038
|
}
|
|
@@ -80,9 +80,33 @@
|
|
|
80
80
|
:patternStatusList="scope.row.rings"
|
|
81
81
|
:cycles="scope.row.cycle"
|
|
82
82
|
:phaseList="scope.row.currPhase"
|
|
83
|
+
:contrloType="getControlType(scope.row)"
|
|
83
84
|
>
|
|
84
85
|
</pattern-list>
|
|
85
|
-
|
|
86
|
+
<!-- <pattern-list
|
|
87
|
+
v-if="getControlType(scope.row) === 'ring'"
|
|
88
|
+
:patternStatusList="scope.row.rings"
|
|
89
|
+
:cycles="scope.row.cycle"
|
|
90
|
+
:phaseList="scope.row.currPhase"
|
|
91
|
+
:contrloType="getControlType(scope.row)"
|
|
92
|
+
>
|
|
93
|
+
</pattern-list>
|
|
94
|
+
<pattern-list
|
|
95
|
+
v-else
|
|
96
|
+
:patternId="scope.row.patternid"
|
|
97
|
+
:contrloType="getControlType(scope.row)"
|
|
98
|
+
:index="scope.$index"
|
|
99
|
+
:cycleChange="true"
|
|
100
|
+
:stagesChange="getSelectedPattern(scope.row).stagesList"
|
|
101
|
+
:patternStatusList="getSelectedPattern(scope.row).rings"
|
|
102
|
+
:patternList="scope.row.allPatterns"
|
|
103
|
+
:allPatternList="scope.row.allPatterns"
|
|
104
|
+
:cycles="scope.row.cycle"
|
|
105
|
+
:phaseList="scope.row.currPhase"
|
|
106
|
+
:agentId="scope.row.agentid"
|
|
107
|
+
:showBarrier="false">
|
|
108
|
+
</pattern-list> -->
|
|
109
|
+
</div>
|
|
86
110
|
</template>
|
|
87
111
|
</el-table-column>
|
|
88
112
|
</el-table>
|
|
@@ -91,7 +115,8 @@
|
|
|
91
115
|
|
|
92
116
|
<script>
|
|
93
117
|
import XiaoKanBan from '../../XiaoKanBan'
|
|
94
|
-
import { getPatternList } from '../../../../api/route'
|
|
118
|
+
// import { getPatternList } from '../../../../api/route'
|
|
119
|
+
import { getIntersectionInfo } from '../../../../api/template'
|
|
95
120
|
import { getMessageByCode } from '../../../../utils/responseMessage'
|
|
96
121
|
// import { getDirName } from '../../../components/SelectCrossPhase/utils.js'
|
|
97
122
|
export default {
|
|
@@ -114,6 +139,7 @@ export default {
|
|
|
114
139
|
},
|
|
115
140
|
data () {
|
|
116
141
|
return {
|
|
142
|
+
controlType: 'stage',
|
|
117
143
|
loading: true,
|
|
118
144
|
tableHeight: 460,
|
|
119
145
|
screenHeight: window.innerHeight, // 屏幕高度
|
|
@@ -179,6 +205,9 @@ export default {
|
|
|
179
205
|
let currPattern
|
|
180
206
|
if (Array.isArray(currPatternList)) {
|
|
181
207
|
currPattern = currPatternList.filter(cpl => cpl.id === patternId)[0]
|
|
208
|
+
if (!currPattern) {
|
|
209
|
+
currPattern = currPatternList[0]
|
|
210
|
+
}
|
|
182
211
|
} else {
|
|
183
212
|
currPattern = currPatternList
|
|
184
213
|
}
|
|
@@ -292,28 +321,59 @@ export default {
|
|
|
292
321
|
}
|
|
293
322
|
return res
|
|
294
323
|
},
|
|
324
|
+
getControlType (row) {
|
|
325
|
+
let contrloType = 'ring'
|
|
326
|
+
let allPatternList = row.feature && row.feature.patternList ? row.feature.patternList : row.allPatterns
|
|
327
|
+
if (
|
|
328
|
+
!allPatternList[0].contrloType &&
|
|
329
|
+
allPatternList[0].rings.length > 0
|
|
330
|
+
) {
|
|
331
|
+
contrloType = 'ring'
|
|
332
|
+
} else if (
|
|
333
|
+
!allPatternList[0].contrloType &&
|
|
334
|
+
allPatternList[0].rings.length === 0
|
|
335
|
+
) {
|
|
336
|
+
contrloType = 'stage'
|
|
337
|
+
} else {
|
|
338
|
+
contrloType = allPatternList[0].contrloType
|
|
339
|
+
}
|
|
340
|
+
let res = contrloType
|
|
341
|
+
return res
|
|
342
|
+
},
|
|
343
|
+
getSelectedPattern (row) {
|
|
344
|
+
let res = []
|
|
345
|
+
let patternList = row.feature && row.feature.patternList ? row.feature.patternList : row.allPatterns
|
|
346
|
+
let pattern = patternList.find(item => item.id === row.patternid)
|
|
347
|
+
if (pattern) {
|
|
348
|
+
res = pattern
|
|
349
|
+
}
|
|
350
|
+
return res
|
|
351
|
+
},
|
|
295
352
|
getCurPattern (agentid) {
|
|
296
353
|
// 获取当前设备所有可选方案
|
|
297
354
|
this.loading = true
|
|
298
355
|
let _this = this
|
|
299
|
-
|
|
300
|
-
// if (patterns.allPatterns && patterns.allPatterns.length > 0) {
|
|
301
|
-
// patterns.allPatterns = patterns.allPatterns
|
|
302
|
-
// return false
|
|
303
|
-
// }
|
|
304
|
-
getPatternList(agentid).then(res => {
|
|
356
|
+
getIntersectionInfo(agentid).then(res => {
|
|
305
357
|
this.loading = false
|
|
306
358
|
if (!res.data.success) {
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
359
|
+
let commomMsg = this.$t('openatccomponents.overview.signalID') + ' : ' + agentid
|
|
360
|
+
let msg = getMessageByCode(res.data.code, this.$i18n.locale)
|
|
361
|
+
if (res.data.data) {
|
|
362
|
+
// 子类型错误
|
|
363
|
+
let childErrorCode = res.data.data.errorCode
|
|
364
|
+
if (childErrorCode) {
|
|
365
|
+
let childerror = getMessageByCode(res.data.data.errorCode, this.$i18n.locale)
|
|
366
|
+
msg = msg + ' - ' + childerror
|
|
367
|
+
}
|
|
310
368
|
}
|
|
311
|
-
|
|
369
|
+
msg = msg + ' - ' + commomMsg
|
|
370
|
+
this.$message.error(msg)
|
|
312
371
|
return
|
|
313
372
|
}
|
|
373
|
+
let allPatternList = res.data.data.param.patternList
|
|
314
374
|
_this.newPatternList.forEach(ele => {
|
|
315
375
|
if (ele.agentid === agentid) {
|
|
316
|
-
ele.allPatterns =
|
|
376
|
+
ele.allPatterns = allPatternList.map(ele => {
|
|
317
377
|
return {
|
|
318
378
|
...ele,
|
|
319
379
|
patternid: ele.id,
|
|
@@ -170,6 +170,9 @@ export default {
|
|
|
170
170
|
let currPattern
|
|
171
171
|
if (Array.isArray(currPatternList)) {
|
|
172
172
|
currPattern = currPatternList.filter(cpl => cpl.id === patternId)[0]
|
|
173
|
+
if (!currPattern) {
|
|
174
|
+
currPattern = currPatternList[0]
|
|
175
|
+
}
|
|
173
176
|
} else {
|
|
174
177
|
currPattern = currPatternList
|
|
175
178
|
}
|