openatc-components 0.4.88 → 0.4.89

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 (51) hide show
  1. package/config/index.js +137 -137
  2. package/package/kisscomps/components/BoardCard/BoardCard.vue +4 -0
  3. package/package/kisscomps/components/DirectionListConfiguration/DirectionListConfiguration.vue +2 -2
  4. package/package/kisscomps/components/IntersectionDirectionSelection/IntersectionDirectionSelection.vue +9 -6
  5. package/package/kisscomps/components/IntersectionMap/crossDirection/crossDiagram.vue +49 -16
  6. package/package/kisscomps/components/IntersectionMap/crossDirection/posJson/phasePos.json +0 -16
  7. package/package/kisscomps/components/IntersectionMap/crossDirection/posJson/sidePos.json +0 -16
  8. package/package/kisscomps/components/IntersectionMap/intersectionmap.vue +5 -0
  9. package/package/kisscomps/components/IntersectionMapDirSelect/customCrossDiagram.vue +5 -0
  10. package/package/kisscomps/components/OverLap/OverLap.vue +1 -22
  11. package/package/kisscomps/components/OverviewComponent/index.vue +33 -7
  12. package/package/kisscomps/components/PatternStatus/PatternStatus.vue +84 -46
  13. package/package/kisscomps/components/SchemeConfig/SchemeConfig.vue +30 -7
  14. package/package/kisscomps/components/SchemeConfig/manualControlModalNew/icon.vue +1 -5
  15. package/package/kisscomps/components/SchemeConfig/tentativeplancontrolmodal/index.vue +19 -0
  16. package/package/kisscomps/components/overView/index.vue +30 -7
  17. package/package/kisscomps/components/patternList/patternList.vue +4 -0
  18. package/package/kisscomps/index.js +2 -6
  19. package/package/kissui.min.js +1 -1
  20. package/package.json +1 -1
  21. package/src/App.vue +24 -20
  22. package/src/i18n/language/en.js +0 -78
  23. package/src/i18n/language/index.js +25 -31
  24. package/src/i18n/language/zh.js +0 -78
  25. package/src/kisscomps/components/BoardCard/BoardCard.vue +4 -0
  26. package/src/kisscomps/components/DirectionListConfiguration/DirectionListConfiguration.vue +2 -2
  27. package/src/kisscomps/components/IntersectionDirectionSelection/IntersectionDirectionSelection.vue +9 -6
  28. package/src/kisscomps/components/IntersectionMap/crossDirection/crossDiagram.vue +49 -16
  29. package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/phasePos.json +0 -16
  30. package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/sidePos.json +0 -16
  31. package/src/kisscomps/components/IntersectionMap/intersectionmap.vue +5 -0
  32. package/src/kisscomps/components/IntersectionMapDirSelect/customCrossDiagram.vue +5 -0
  33. package/src/kisscomps/components/OverLap/OverLap.vue +1 -22
  34. package/src/kisscomps/components/OverviewComponent/index.vue +33 -7
  35. package/src/kisscomps/components/PatternStatus/PatternStatus.vue +84 -46
  36. package/src/kisscomps/components/SchemeConfig/SchemeConfig.vue +30 -7
  37. package/src/kisscomps/components/SchemeConfig/manualControlModalNew/icon.vue +1 -5
  38. package/src/kisscomps/components/SchemeConfig/tentativeplancontrolmodal/index.vue +19 -0
  39. package/src/kisscomps/components/overView/index.vue +30 -7
  40. package/src/kisscomps/components/patternList/patternList.vue +4 -0
  41. package/src/kisscomps/index.js +2 -6
  42. package/src/utils/ControlFormat.js +36 -14
  43. package/src/utils/auth.js +199 -199
  44. package/src/utils/conflct.js +268 -266
  45. package/src/utils/fault.js +72 -20
  46. package/src/utils/faultcode.js +182 -130
  47. package/src/utils/responseMessage.js +21 -24
  48. package/src/views/intersection.vue +8 -7
  49. package/src/views/patternConfig.vue +2 -2
  50. package/src/views/schemeconfig.vue +1 -1
  51. package/src/i18n/language/ru.js +0 -1555
@@ -4,7 +4,6 @@
4
4
  "name": "东人行横道",
5
5
  "ename": "East-Pedestrian",
6
6
  "desc": "东行人",
7
- "commondesc": "openatccomponents.phase.eped",
8
7
  "svgid": "东行人",
9
8
  "x": "310px",
10
9
  "y": "198px"
@@ -14,7 +13,6 @@
14
13
  "name": "西人行横道",
15
14
  "ename": "West-Pedestrian",
16
15
  "desc": "西行人",
17
- "commondesc": "openatccomponents.phase.wped",
18
16
  "svgid": "西行人",
19
17
  "x": "310px",
20
18
  "y": "198px"
@@ -24,7 +22,6 @@
24
22
  "name": "南人行横道",
25
23
  "ename": "South-Pedestrian",
26
24
  "desc": "南行人",
27
- "commondesc": "openatccomponents.phase.sped",
28
25
  "svgid": "南行人",
29
26
  "x": "310px",
30
27
  "y": "198px"
@@ -34,7 +31,6 @@
34
31
  "name": "北人行横道",
35
32
  "ename": "North-Pedestrian",
36
33
  "desc": "北行人",
37
- "commondesc": "openatccomponents.phase.nped",
38
34
  "svgid": "北行人",
39
35
  "x": "310px",
40
36
  "y": "198px"
@@ -44,7 +40,6 @@
44
40
  "name": "东人行横道-上",
45
41
  "ename": "East-Top-Pedestrian",
46
42
  "desc": "东行人上",
47
- "commondesc": "openatccomponents.phase.etped",
48
43
  "svgid": "东行人上",
49
44
  "x": "310px",
50
45
  "y": "198px"
@@ -54,7 +49,6 @@
54
49
  "name": "东人行横道-下",
55
50
  "ename": "East-Bottom-Pedestrian",
56
51
  "desc": "东行人下",
57
- "commondesc": "openatccomponents.phase.ebped",
58
52
  "svgid": "东行人下",
59
53
  "x": "310px",
60
54
  "y": "198px"
@@ -64,7 +58,6 @@
64
58
  "name": "西人行横道-上",
65
59
  "ename": "West-Top-Pedestrian",
66
60
  "desc": "西行人上",
67
- "commondesc": "openatccomponents.phase.wtped",
68
61
  "svgid": "西行人上",
69
62
  "x": "310px",
70
63
  "y": "198px"
@@ -74,7 +67,6 @@
74
67
  "name": "西人行横道-下",
75
68
  "ename": "West-Bottom-Pedestrian",
76
69
  "desc": "西行人下",
77
- "commondesc": "openatccomponents.phase.wbped",
78
70
  "svgid": "西行人下",
79
71
  "x": "310px",
80
72
  "y": "198px"
@@ -84,7 +76,6 @@
84
76
  "name": "南人行横道-左",
85
77
  "ename": "South-Left-Pedestrian",
86
78
  "desc": "南行人左",
87
- "commondesc": "openatccomponents.phase.slped",
88
79
  "svgid": "南行人左",
89
80
  "x": "310px",
90
81
  "y": "198px"
@@ -94,7 +85,6 @@
94
85
  "name": "南人行横道-右",
95
86
  "ename": "South-Right-Pedestrian",
96
87
  "desc": "南行人右",
97
- "commondesc": "openatccomponents.phase.srped",
98
88
  "svgid": "南行人右",
99
89
  "x": "310px",
100
90
  "y": "198px"
@@ -104,7 +94,6 @@
104
94
  "name": "北人行横道-左",
105
95
  "ename": "North-Left-Pedestrian",
106
96
  "desc": "北行人左",
107
- "commondesc": "openatccomponents.phase.nlped",
108
97
  "svgid": "北行人左",
109
98
  "x": "310px",
110
99
  "y": "198px"
@@ -114,7 +103,6 @@
114
103
  "name": "北人行横道-右",
115
104
  "ename": "North-Right-Pedestrian",
116
105
  "desc": "北行人右",
117
- "commondesc": "openatccomponents.phase.nrped",
118
106
  "svgid": "北行人右",
119
107
  "x": "310px",
120
108
  "y": "198px"
@@ -124,7 +112,6 @@
124
112
  "name": "X人行横道-/",
125
113
  "ename": "X-/-Pedestrian",
126
114
  "desc": "/行人",
127
- "commondesc": "openatccomponents.phase.xrped",
128
115
  "svgid": "斜杠行人",
129
116
  "x": "310px",
130
117
  "y": "198px"
@@ -134,7 +121,6 @@
134
121
  "name": "X人行横道-\\",
135
122
  "ename": "X-\\-Pedestrian",
136
123
  "desc": "\\行人",
137
- "commondesc": "openatccomponents.phase.xlped",
138
124
  "svgid": "反斜杠行人",
139
125
  "x": "310px",
140
126
  "y": "198px"
@@ -144,7 +130,6 @@
144
130
  "name": "南北路段人行横道",
145
131
  "ename": "East-West-Pedestrian",
146
132
  "desc": "南北路段行人",
147
- "commondesc": "openatccomponents.phase.snped",
148
133
  "svgid": "南北路段行人",
149
134
  "x": "310px",
150
135
  "y": "198px"
@@ -154,7 +139,6 @@
154
139
  "name": "东西路段人行横道",
155
140
  "ename": "South-North-Pedestrian",
156
141
  "desc": "东西路段行人",
157
- "commondesc": "openatccomponents.phase.ewped",
158
142
  "svgid": "东西路段行人",
159
143
  "x": "310px",
160
144
  "y": "198px"
@@ -42,6 +42,7 @@
42
42
  :isThirdSignal="isThirdSignal"
43
43
  :channelType="channelType"
44
44
  :isShowMessage ="isShowMessage"
45
+ :isRcp="isRcp"
45
46
  @handleClickCrossIcon="handleClickCrossIcon" />
46
47
  </div>
47
48
  </div>
@@ -134,6 +135,10 @@ export default {
134
135
  channelType: {
135
136
  type: Boolean,
136
137
  default: false
138
+ },
139
+ isRcp: {
140
+ type: Boolean,
141
+ default: false
137
142
  }
138
143
  },
139
144
  watch: {
@@ -688,6 +688,11 @@ export default {
688
688
  color: #299BCC;
689
689
  margin-top: 20PX;
690
690
  }
691
+ .merge-direction-icon {
692
+ width: 80PX;
693
+ height: 80PX;
694
+ margin: 0 auto;
695
+ }
691
696
 
692
697
  .baseImg {
693
698
  width: 100%;
@@ -10,12 +10,6 @@
10
10
  <span v-for="(ids,index3) in list.includedphases" :key="index3">
11
11
  {{$t('openatccomponents.phase.phase')}}{{ids}}<span v-if="index3+1!==list.includedphases.length">,</span>
12
12
  </span>
13
- <span v-if="list.modifyphase && list.modifyphase.length>0">(<span v-for="(ids, index4) in list.modifyphase" :key="index4">
14
- *{{$t('openatccomponents.phase.phase')}}{{ ids
15
- }}<span v-if="index4 + 1 !== list.modifyphase.length"
16
- >,</span
17
- >
18
- </span>)</span>
19
13
  </div>
20
14
  <div style="cursor:pointer;">
21
15
  <div class="ring-phase">
@@ -28,12 +22,6 @@
28
22
  <span v-for="(ids,index3) in list.includedphases" :key="index3">
29
23
  {{$t('openatccomponents.phase.phase')}}{{ids}}<span v-if="index3+1!==list.includedphases.length">,</span>
30
24
  </span>
31
- <span v-if="list.modifyphase && list.modifyphase.length>0">(<span v-for="(ids, index4) in list.modifyphase" :key="index4">
32
- *{{$t('openatccomponents.phase.phase')}}{{ ids
33
- }}<span v-if="index4 + 1 !== list.modifyphase.length"
34
- >,</span
35
- >
36
- </span>)</span>
37
25
  </div>
38
26
  </div>
39
27
  </div>
@@ -165,16 +153,7 @@ export default {
165
153
  const findItems = stageList.filter(j => (j.phases ? j.phases : j.stages).includes(i))
166
154
  if (findItems.length) findIndexs.push(...findItems.map(m => m.key))
167
155
  })
168
- // 收集所有包含 modifyphase 中相位的阶段 key
169
- let modifyIndexs = []
170
- if (item.modifyphase !== undefined) {
171
- item.modifyphase.forEach(i => {
172
- const findItems = stageList.filter(j => j.phases.includes(i))
173
- if (findItems.length) modifyIndexs.push(...findItems.map(m => m.key))
174
- })
175
- }
176
156
  findIndexs = Array.from(new Set(findIndexs))
177
- modifyIndexs = Array.from(new Set(modifyIndexs))
178
157
  if (this.cycleChange) {
179
158
  const globalParamModel = this.$store.getters.globalParamModel
180
159
  let pattern = globalParamModel.getParamsByType('patternList')
@@ -189,7 +168,7 @@ export default {
189
168
  peddirection: this.getPedPhasePos(item.peddirection),
190
169
  sidewalkPhaseData: this.getPedPhasePos(item.peddirection),
191
170
  stageLists: stageList.map(sta => {
192
- const find = findIndexs.includes(sta.key) && !modifyIndexs.includes(sta.key)
171
+ const find = findIndexs.includes(sta.key)
193
172
  return {
194
173
  ...sta,
195
174
  direction: this.getRoad(item),
@@ -668,22 +668,48 @@ export default {
668
668
  handleGetData (data) {
669
669
  let that = this
670
670
  if (data.name === '') {
671
- data.name = this.$t('openatccomponents.pattern.plan') + data.patternid
671
+ if (that.$i18n.locale === 'en') {
672
+ data.name = 'Pattern' + data.patternid
673
+ } else if (that.$i18n.locale === 'zh') {
674
+ data.name = '方案' + data.patternid
675
+ }
672
676
  }
673
677
  Object.keys(data).forEach(function (key) {
674
- if (key === 'mode') {
675
- if (data[key] > 0 && data[key] < 9) {
676
- data[key] = that.$t('openatccomponents.overview.ParamsMode' + data[key])
678
+ if (that.$i18n.locale === 'en') {
679
+ if (key === 'mode') {
680
+ if (data[key] > 0 && data[key] < 6) {
681
+ data[key] = that.ParamsModeEn.get(data[key])
677
682
  } else {
678
- data[key] = that.$t('openatccomponents.overview.ParamsMode0')
683
+ data[key] = that.ParamsModeEn.get(0)
679
684
  }
680
685
  }
686
+ // if (key === 'control') {
687
+ // data[key] = that.ParamsControlEn.get(data[key])
688
+ // }
681
689
  if (key === 'phase' || key === 'overlap') {
682
690
  for (let val of data[key]) {
683
- val.typestr = that.$t('openatccomponents.overview.phaseType' + val.type)
684
- val.pedtypestr = that.$t('openatccomponents.overview.phaseType' + val.pedtype)
691
+ val.typestr = that.phaseTypeEn.get(val.type)
692
+ val.pedtypestr = that.phaseTypeEn.get(val.pedtype)
693
+ }
694
+ }
695
+ } else if (that.$i18n.locale === 'zh') {
696
+ if (key === 'mode') {
697
+ if (data[key] > 0 && data[key] < 6) {
698
+ data[key] = that.ParamsMode.get(data[key])
699
+ } else {
700
+ data[key] = that.ParamsMode.get(0)
685
701
  }
686
702
  }
703
+ // if (key === 'control') {
704
+ // data[key] = that.ParamsControl.get(data[key])
705
+ // }
706
+ if (key === 'phase' || key === 'overlap') {
707
+ for (let val of data[key]) {
708
+ val.typestr = that.phaseType.get(val.type)
709
+ val.pedtypestr = that.phaseType.get(val.pedtype)
710
+ }
711
+ }
712
+ }
687
713
  })
688
714
  return data
689
715
  },
@@ -11,8 +11,33 @@
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>
14
39
  <!-- 环模式true -->
15
- <div v-if="this.contrloType === 'ring' || !this.contrloType">
40
+ <div v-if="(this.contrloType === 'ring' || !this.contrloType) && patternType !== 'rcp'">
16
41
  <div class="ring-first" v-for="(list, index1) in patternInfo" :key="index1">
17
42
  <draggable :move="move" @end="endDrag(index1)" :disabled="isMove" :list="list">
18
43
  <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' : ''">
@@ -134,6 +159,7 @@ export default {
134
159
  newCycle: this.cycles,
135
160
  patternIds: this.patternId,
136
161
  newPatterns: [],
162
+ patternRcp: [],
137
163
  newList: [],
138
164
  isControl: true,
139
165
  contrloCycle: 0,
@@ -170,6 +196,9 @@ export default {
170
196
  controlPhase: {
171
197
  type: Object
172
198
  },
199
+ patternType: {
200
+ type: String
201
+ },
173
202
  contrloType: {
174
203
  type: String
175
204
  },
@@ -342,6 +371,9 @@ export default {
342
371
  cycles: {
343
372
  handler: function (val, oldVal) {
344
373
  this.newCycle = this.cycles
374
+ if (this.patternType === 'rcp') {
375
+ this.handleRcp(this.patternStatusList)
376
+ }
345
377
  },
346
378
  // 深度观察监听
347
379
  deep: true
@@ -366,6 +398,9 @@ export default {
366
398
  },
367
399
  patternStatusList: {
368
400
  handler: function (val, oldVal) {
401
+ if (this.patternType === 'rcp') {
402
+ this.handleRcp(this.patternStatusList)
403
+ }
369
404
  this.handleBarrierHeight() // 计算屏障高度
370
405
  if (this.patternStatusList && this.newCycle) {
371
406
  // setTimeout(() => {
@@ -398,6 +433,9 @@ export default {
398
433
  if (this.contrloType === 'stage') {
399
434
  this.getStage()
400
435
  }
436
+ if (this.patternType === 'rcp') {
437
+ this.handleRcp(this.patternStatusList)
438
+ }
401
439
  },
402
440
  methods: {
403
441
  move (e) {
@@ -485,6 +523,48 @@ export default {
485
523
  }
486
524
  return ped
487
525
  },
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
+ },
488
568
  handleStageData (data) {
489
569
  if (!data) return
490
570
  let peddirections = this.getPed(data)
@@ -757,20 +837,6 @@ export default {
757
837
  let addRing1 = [...new Set(resultArrs[1])].filter(item => newCurrent[h].includes(item))
758
838
  ring1s.push(addRing1)
759
839
  }
760
- // 双环相位数不等的时候
761
- if (newRings.length > 1) {
762
- if (newRings[0].length !== newRings[1].length) {
763
- for (let h = 0; h < newCurrent.length; h++) {
764
- let adds = [...new Set(ringsequence[0])].filter(item => newCurrent[h].includes(item))
765
- ring1.push(adds)
766
- }
767
- let ring1s = [] // 环1与关系2的并集
768
- for (let h = 0; h < newCurrent.length; h++) {
769
- let addRing1 = [...new Set(ringsequence[1])].filter(item => newCurrent[h].includes(item))
770
- ring1s.push(addRing1)
771
- }
772
- }
773
- }
774
840
  barrierRing1.push(...ring1, ...ring1s)
775
841
  let resultList = []
776
842
  if (newRings.length > 1) {
@@ -1057,20 +1123,6 @@ export default {
1057
1123
  let addRing1 = [...new Set(resultArrs[1])].filter(item => newCurrent[h].includes(item))
1058
1124
  ring1s.push(addRing1)
1059
1125
  }
1060
- // 双环相位数不等的时候
1061
- if (newRings.length > 1) {
1062
- if (newRings[0].length !== newRings[1].length) {
1063
- for (let h = 0; h < newCurrent.length; h++) {
1064
- let adds = [...new Set(ringsequence[0])].filter(item => newCurrent[h].includes(item))
1065
- ring1.push(adds)
1066
- }
1067
- let ring1s = [] // 环1与关系2的并集
1068
- for (let h = 0; h < newCurrent.length; h++) {
1069
- let addRing1 = [...new Set(ringsequence[1])].filter(item => newCurrent[h].includes(item))
1070
- ring1s.push(addRing1)
1071
- }
1072
- }
1073
- }
1074
1126
  barrierRing1.push(...ring1, ...ring1s)
1075
1127
  let resultList = []
1076
1128
  if (newRings.length > 1) {
@@ -1320,20 +1372,6 @@ export default {
1320
1372
  let addRing1 = [...new Set(resultArrs[1])].filter(item => newCurrent[h].includes(item))
1321
1373
  ring1s.push(addRing1)
1322
1374
  }
1323
- // 双环相位数不等的时候
1324
- if (newRings.length > 1) {
1325
- if (newRings[0].length !== newRings[1].length) {
1326
- for (let h = 0; h < newCurrent.length; h++) {
1327
- let adds = [...new Set(ringsequence[0])].filter(item => newCurrent[h].includes(item))
1328
- ring1.push(adds)
1329
- }
1330
- let ring1s = [] // 环1与关系2的并集
1331
- for (let h = 0; h < newCurrent.length; h++) {
1332
- let addRing1 = [...new Set(ringsequence[1])].filter(item => newCurrent[h].includes(item))
1333
- ring1s.push(addRing1)
1334
- }
1335
- }
1336
- }
1337
1375
  barrierRing1.push(...ring1, ...ring1s)
1338
1376
  let resultList = []
1339
1377
  if (newRings.length >= 1) {
@@ -1392,6 +1430,9 @@ export default {
1392
1430
  if (this.patternList) {
1393
1431
  this.setBarrier(ringTeams, val)
1394
1432
  }
1433
+ if (newRings.length > 1) {
1434
+ this.fillGap(ringTeams, val)
1435
+ }
1395
1436
  if (this.cycleChange) {
1396
1437
  const globalParamModel = this.$store.getters.globalParamModel
1397
1438
  let pattern = globalParamModel.getParamsByType('patternList')
@@ -1401,9 +1442,6 @@ export default {
1401
1442
  } else {
1402
1443
  this.max = ''
1403
1444
  }
1404
- if (newRings.length > 1) {
1405
- this.fillGap(ringTeams, val)
1406
- }
1407
1445
  let barrier = this.step2(ringTeams, newPattern)
1408
1446
  let barrierLeft = barrier.map(item => item)// 屏障左移显示出人行横道
1409
1447
  this.barrierList = barrierLeft.map(j => {
@@ -135,6 +135,7 @@ import LockingPhaseControlModal from './lockingPhaselControlModal'
135
135
  import TentativePlanControlModal from './tentativeplancontrolmodal'
136
136
  import AzimuthLocking from './azimuthlocking'
137
137
  import priorityControl from './priorityControl'
138
+ // import { getFaultMesZh, getFaultMesEn } from '../../utils/faultcode.js'
138
139
  import { getMessageByCode } from '../../../utils/responseMessage'
139
140
  import { GetAllFaultRange } from '../../../api/fault'
140
141
  import PhaseDataModel from '../IntersectionMap/crossDirection/utils.js'
@@ -674,24 +675,46 @@ export default {
674
675
  handleGetData (data) {
675
676
  let that = this
676
677
  if (data.name === '') {
677
- data.name = this.$t('openatccomponents.pattern.plan') + data.patternid
678
+ if (that.$i18n.locale === 'en') {
679
+ data.name = 'Pattern' + data.patternid
680
+ } else if (that.$i18n.locale === 'zh') {
681
+ data.name = '方案' + data.patternid
682
+ }
678
683
  }
679
684
  Object.keys(data).forEach(function (key) {
680
- if (key === 'mode') {
681
- if (data[key] > 0 && data[key] < 9) {
682
- data[key] = that.$t('openatccomponents.overview.ParamsMode' + data[key])
685
+ if (that.$i18n.locale === 'en') {
686
+ if (key === 'mode') {
687
+ if (that.ParamsModeEn.get(data[key]) !== undefined) {
688
+ data[key] = that.ParamsModeEn.get(data[key])
683
689
  } else {
684
- data[key] = that.$t('openatccomponents.overview.ParamsMode0')
690
+ data[key] = that.ParamsModeEn.get(0)
691
+ }
692
+ }
693
+ // if (key === 'control') {
694
+ // data[key] = that.ParamsControlEn.get(data[key])
695
+ // }
696
+ if (key === 'phase') {
697
+ for (let val of data[key]) {
698
+ val.type = that.phaseTypeEn.get(val.type)
699
+ }
700
+ }
701
+ } else if (that.$i18n.locale === 'zh') {
702
+ if (key === 'mode') {
703
+ if (that.ParamsMode.get(data[key]) !== undefined) {
704
+ data[key] = that.ParamsMode.get(data[key])
705
+ } else {
706
+ data[key] = that.ParamsMode.get(0)
685
707
  }
686
708
  }
687
709
  if (key === 'control') {
688
- data[key] = that.$t('openatccomponents.overview.modelList' + data[key])
710
+ data[key] = that.ParamsControl.get(data[key])
689
711
  }
690
712
  if (key === 'phase') {
691
713
  for (let val of data[key]) {
692
- val.type = that.$t('openatccomponents.overview.phaseType' + val.type)
714
+ val.type = that.phaseType.get(val.type)
693
715
  }
694
716
  }
717
+ }
695
718
  })
696
719
  return data
697
720
  },
@@ -441,11 +441,7 @@ PURPOSE. * See the Mulan PSL v2 for more details. **/
441
441
  :width="iconWidth"
442
442
  :height="iconHeight"
443
443
  >
444
- <path
445
- :class="themeColor"
446
- d="M947.685353 711.851301h-34.260223v-121.814126c0-15.226766-11.420074-30.453532-30.453531-30.453532h-342.602231v-167.494424h137.040892c38.066914 0 64.713755-30.453532 64.713755-64.713754V114.200743c0-38.066914-30.453532-64.713755-64.713755-64.713754H346.228104c-38.066914-3.806691-68.520446 26.64684-68.520446 64.713754v216.981413c0 38.066914 30.453532 64.713755 64.713755 64.713755h137.040892v167.494424h-342.602231c-15.226766 0-30.453532 11.420074-30.453531 30.453531v121.814127h-26.64684c-38.066914 0-64.713755 30.453532-64.713755 64.713754v137.040892c0 38.066914 30.453532 64.713755 64.713755 64.713755h137.040892c38.066914 0 64.713755-30.453532 64.713754-64.713755v-137.040892c0-38.066914-30.453532-64.713755-64.713754-64.713754H167.313606v-91.360595h315.95539v91.360595h-41.873606c-38.066914 0-64.713755 30.453532-64.713754 64.713754v137.040892c0 38.066914 30.453532 64.713755 64.713754 64.713755h137.040893c38.066914 0 64.713755-30.453532 64.713754-64.713755v-137.040892c0-38.066914-30.453532-64.713755-64.713754-64.713754h-41.873606v-91.360595H852.518067v91.360595h-45.680297c-38.066914 0-64.713755 30.453532-64.713755 64.713754v137.040892c0 38.066914 30.453532 64.713755 64.713755 64.713755h137.040892c38.066914 0 64.713755-30.453532 64.713754-64.713755v-137.040892c3.806691-38.066914-22.840149-68.520446-60.907063-68.520446z m7.613383 205.561338c0 3.806691-3.806691 7.613383-7.613383 7.613383h-137.040892c-3.806691 0-7.613383-3.806691-7.613383-7.613383v-137.040892c0-3.806691 3.806691-7.613383 7.613383-7.613383h137.040892c3.806691 0 7.613383 3.806691 7.613383 7.613383v137.040892z" p-id="21091">
447
- </path>
448
- </svg>
444
+ <path d="M947.685353 711.851301h-34.260223v-121.814126c0-15.226766-11.420074-30.453532-30.453531-30.453532h-342.602231v-167.494424h137.040892c38.066914 0 64.713755-30.453532 64.713755-64.713754V114.200743c0-38.066914-30.453532-64.713755-64.713755-64.713754H346.228104c-38.066914-3.806691-68.520446 26.64684-68.520446 64.713754v216.981413c0 38.066914 30.453532 64.713755 64.713755 64.713755h137.040892v167.494424h-342.602231c-15.226766 0-30.453532 11.420074-30.453531 30.453531v121.814127h-26.64684c-38.066914 0-64.713755 30.453532-64.713755 64.713754v137.040892c0 38.066914 30.453532 64.713755 64.713755 64.713755h137.040892c38.066914 0 64.713755-30.453532 64.713754-64.713755v-137.040892c0-38.066914-30.453532-64.713755-64.713754-64.713754H167.313606v-91.360595h315.95539v91.360595h-41.873606c-38.066914 0-64.713755 30.453532-64.713754 64.713754v137.040892c0 38.066914 30.453532 64.713755 64.713754 64.713755h137.040893c38.066914 0 64.713755-30.453532 64.713754-64.713755v-137.040892c0-38.066914-30.453532-64.713755-64.713754-64.713754h-41.873606v-91.360595H852.518067v91.360595h-45.680297c-38.066914 0-64.713755 30.453532-64.713755 64.713754v137.040892c0 38.066914 30.453532 64.713755 64.713755 64.713755h137.040892c38.066914 0 64.713755-30.453532 64.713754-64.713755v-137.040892c3.806691-38.066914-22.840149-68.520446-60.907063-68.520446z m7.613383 205.561338c0 3.806691-3.806691 7.613383-7.613383 7.613383h-137.040892c-3.806691 0-7.613383-3.806691-7.613383-7.613383v-137.040892c0-3.806691 3.806691-7.613383 7.613383-7.613383h137.040892c3.806691 0 7.613383 3.806691 7.613383 7.613383v137.040892z" p-id="21091"></path></svg>
449
445
  </span>
450
446
  </template>
451
447
 
@@ -1217,6 +1217,25 @@ export default {
1217
1217
  }
1218
1218
  return maxCycle
1219
1219
  },
1220
+ // checkPatternRules (rings) {
1221
+ // if (!this.isRingCycleEqual(rings)) {
1222
+ // this.patternCycleEqual = false
1223
+ // } else {
1224
+ // this.patternCycleEqual = true
1225
+ // }
1226
+ // if (!this.patternCycleEqual) {
1227
+ // let mess = `方案中存在环周期时长不一致`
1228
+ // if (this.$i18n.locale === 'en') {
1229
+ // mess = `Inconsistent loop cycle durations exist in the scheme`
1230
+ // }
1231
+ // this.$message({
1232
+ // message: mess,
1233
+ // type: 'error',
1234
+ // dangerouslyUseHTMLString: true
1235
+ // })
1236
+ // return false
1237
+ // }
1238
+ // },
1220
1239
  handleManualControl () {
1221
1240
  let submitdata = {
1222
1241
  control: 100,
@@ -89,6 +89,7 @@ import { setIframdevid, getStageTypes, setToken, setHost } from '../../../utils/
89
89
  // import BoardCard from '@/components/BoardCard'
90
90
  // import OverLap from '@/components/OverLap'
91
91
  import { getIntersectionInfo } from '../../../api/template'
92
+ // import { getFaultMesZh, getFaultMesEn } from '../../utils/faultcode.js'
92
93
  import { getMessageByCode } from '../../../utils/responseMessage'
93
94
  import PhaseDataModel from '../IntersectionMap/crossDirection/utils.js'
94
95
  import CrossDiagramMgr from '../../../EdgeMgr/controller/crossDiagramMgr'
@@ -546,24 +547,46 @@ export default {
546
547
  handleGetData (data) {
547
548
  let that = this
548
549
  if (data.name === '') {
549
- data.name = this.$t('openatccomponents.pattern.plan') + data.patternid
550
+ if (that.$i18n.locale === 'en') {
551
+ data.name = 'Pattern' + data.patternid
552
+ } else if (that.$i18n.locale === 'zh') {
553
+ data.name = '方案' + data.patternid
554
+ }
550
555
  }
551
556
  Object.keys(data).forEach(function (key) {
552
- if (key === 'mode') {
553
- if (data[key] > 0 && data[key] < 9) {
554
- data[key] = that.$t('openatccomponents.overview.ParamsMode' + data[key])
557
+ if (that.$i18n.locale === 'en') {
558
+ if (key === 'mode') {
559
+ if (that.ParamsModeEn.get(data[key]) !== undefined) {
560
+ data[key] = that.ParamsModeEn.get(data[key])
555
561
  } else {
556
- data[key] = that.$t('openatccomponents.overview.ParamsMode0')
562
+ data[key] = that.ParamsModeEn.get(0)
557
563
  }
558
564
  }
559
565
  if (key === 'control') {
560
- data[key] = that.$t('openatccomponents.overview.modelList' + data[key])
566
+ data[key] = that.ParamsControlEn.get(data[key])
561
567
  }
562
568
  if (key === 'phase') {
563
569
  for (let val of data[key]) {
564
- val.type = that.$t('openatccomponents.overview.phaseType' + val.type)
570
+ val.type = that.phaseTypeEn.get(val.type)
571
+ }
572
+ }
573
+ } else if (that.$i18n.locale === 'zh') {
574
+ if (key === 'mode') {
575
+ if (that.ParamsMode.get(data[key]) !== undefined) {
576
+ data[key] = that.ParamsMode.get(data[key])
577
+ } else {
578
+ data[key] = that.ParamsMode.get(0)
565
579
  }
566
580
  }
581
+ if (key === 'control') {
582
+ data[key] = that.ParamsControl.get(data[key])
583
+ }
584
+ if (key === 'phase') {
585
+ for (let val of data[key]) {
586
+ val.type = that.phaseType.get(val.type)
587
+ }
588
+ }
589
+ }
567
590
  })
568
591
  return data
569
592
  },
@@ -3,6 +3,7 @@
3
3
  <BoardCard
4
4
  :patternId="patternId"
5
5
  :contrloType="contrloType"
6
+ :patternType="patternType"
6
7
  :stagesChange="stagesChange"
7
8
  :isShowTip="isShowTip"
8
9
  :isBorder="isBorder"
@@ -552,6 +553,9 @@ export default {
552
553
  patternStatusList: {
553
554
  type: Array
554
555
  },
556
+ patternType: {
557
+ type: String
558
+ },
555
559
  patternId: {
556
560
  type: Number
557
561
  },