openatc-components 0.4.78 → 0.4.80

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.
@@ -15,7 +15,6 @@
15
15
  :isMove="isMove"
16
16
  :localPatternList="localPatternList"
17
17
  :showCondition="showCondition"
18
- :patternType="patternType"
19
18
  :contrloType="contrloType"
20
19
  :allPatternList="allPatternList"
21
20
  :stagesChange="stagesChange"
@@ -104,9 +103,6 @@ export default {
104
103
  patternId: {
105
104
  type: Number
106
105
  },
107
- patternType: {
108
- type: String
109
- },
110
106
  agentId: {
111
107
  type: String
112
108
  },
@@ -31,7 +31,7 @@
31
31
  <!-- 右行道路 B-->
32
32
  <div class="right-dir-road" v-if="roadDir === 'right'">
33
33
  <div class="centerText" v-if="crossType !== 'Customroads' && isHasPhase">
34
- <div class="merge-direction-icon">
34
+ <div v-if="isVipRoute" class="merge-direction-icon">
35
35
  <xdr-dir-selector
36
36
  :Data="xdrMData"
37
37
  Width="80px"
@@ -688,11 +688,6 @@ 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
- }
696
691
 
697
692
  .baseImg {
698
693
  width: 100%;
@@ -10,6 +10,12 @@
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>
13
19
  </div>
14
20
  <div style="cursor:pointer;">
15
21
  <div class="ring-phase">
@@ -22,6 +28,12 @@
22
28
  <span v-for="(ids,index3) in list.includedphases" :key="index3">
23
29
  {{$t('openatccomponents.phase.phase')}}{{ids}}<span v-if="index3+1!==list.includedphases.length">,</span>
24
30
  </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>
25
37
  </div>
26
38
  </div>
27
39
  </div>
@@ -153,7 +165,16 @@ export default {
153
165
  const findItems = stageList.filter(j => (j.phases ? j.phases : j.stages).includes(i))
154
166
  if (findItems.length) findIndexs.push(...findItems.map(m => m.key))
155
167
  })
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
+ }
156
176
  findIndexs = Array.from(new Set(findIndexs))
177
+ modifyIndexs = Array.from(new Set(modifyIndexs))
157
178
  if (this.cycleChange) {
158
179
  const globalParamModel = this.$store.getters.globalParamModel
159
180
  let pattern = globalParamModel.getParamsByType('patternList')
@@ -168,7 +189,7 @@ export default {
168
189
  peddirection: this.getPedPhasePos(item.peddirection),
169
190
  sidewalkPhaseData: this.getPedPhasePos(item.peddirection),
170
191
  stageLists: stageList.map(sta => {
171
- const find = findIndexs.includes(sta.key)
192
+ const find = findIndexs.includes(sta.key) && !modifyIndexs.includes(sta.key)
172
193
  return {
173
194
  ...sta,
174
195
  direction: this.getRoad(item),
@@ -11,33 +11,8 @@
11
11
  **/
12
12
  <template>
13
13
  <div class="main-patternstatus">
14
- <!-- rcp模式 -->
15
- <div v-if="patternType === 'rcp'">
16
- <div class="ring-first" v-for="(list, index1) in patternRcp" :key="index1">
17
- <div style="position: relative" :style="{height: '34px',paddingRight: '1px',float: 'left',width:
18
- ((item.split + (item.sum ? item.sum : 0)) /(item.cycle > cycles ? item.cycle : cycles)) *100 +'%',}"
19
- v-for="(item, index2) in list" :key="index2">
20
- <div class="first-1" :style="{ width:
21
- (Number(item.greenWidth.replace('%', '')) /
22
- Number((((item.split + (item.sum ? item.sum : 0)) /
23
- (item.cycle > cycles ? item.cycle : cycles)) * 100 + '%').replace('%', ''))) * 100 + '%', height: '34px',background: '#7ccc66'}">
24
- </div>
25
- <el-tooltip placement="top-start" effect="light">
26
- <div v-if="item.id" slot="content">P{{ item.id }}:{{ item.split }}</div>
27
- <div v-if="item.id" style="cursor: pointer">
28
- <div
29
- class="box"
30
- style="position: absolute; width:40px; left: 0; top: 5px"
31
- >
32
- <div class="ring-nums">P{{ item.id }}:{{ item.split }}</div>
33
- </div>
34
- </div>
35
- </el-tooltip>
36
- </div>
37
- </div>
38
- </div>
39
14
  <!-- 环模式true -->
40
- <div v-if="(this.contrloType === 'ring' || !this.contrloType) && patternType !== 'rcp'">
15
+ <div v-if="this.contrloType === 'ring' || !this.contrloType">
41
16
  <div class="ring-first" v-for="(list, index1) in patternInfo" :key="index1">
42
17
  <draggable :move="move" @end="endDrag(index1)" :disabled="isMove" :list="list">
43
18
  <div style="position: relative;" :style="{'height': '35px','float':'left','width':((item.split+(item.sum?item.sum:0)) / (max?max:item.cycle) * 100) + '%'}" v-for="(item,index2) in list" :key="index2" :class="item.mode === 7 ? 'direction' : isBorder ? 'hovercell' : ''">
@@ -159,7 +134,6 @@ export default {
159
134
  newCycle: this.cycles,
160
135
  patternIds: this.patternId,
161
136
  newPatterns: [],
162
- patternRcp: [],
163
137
  newList: [],
164
138
  isControl: true,
165
139
  contrloCycle: 0,
@@ -196,9 +170,6 @@ export default {
196
170
  controlPhase: {
197
171
  type: Object
198
172
  },
199
- patternType: {
200
- type: String
201
- },
202
173
  contrloType: {
203
174
  type: String
204
175
  },
@@ -371,9 +342,6 @@ export default {
371
342
  cycles: {
372
343
  handler: function (val, oldVal) {
373
344
  this.newCycle = this.cycles
374
- if (this.patternType === 'rcp') {
375
- this.handleRcp(this.patternStatusList)
376
- }
377
345
  },
378
346
  // 深度观察监听
379
347
  deep: true
@@ -398,9 +366,6 @@ export default {
398
366
  },
399
367
  patternStatusList: {
400
368
  handler: function (val, oldVal) {
401
- if (this.patternType === 'rcp') {
402
- this.handleRcp(this.patternStatusList)
403
- }
404
369
  this.handleBarrierHeight() // 计算屏障高度
405
370
  if (this.patternStatusList && this.newCycle) {
406
371
  // setTimeout(() => {
@@ -433,9 +398,6 @@ export default {
433
398
  if (this.contrloType === 'stage') {
434
399
  this.getStage()
435
400
  }
436
- if (this.patternType === 'rcp') {
437
- this.handleRcp(this.patternStatusList)
438
- }
439
401
  },
440
402
  methods: {
441
403
  move (e) {
@@ -523,48 +485,6 @@ export default {
523
485
  }
524
486
  return ped
525
487
  },
526
- handleRcp (val) {
527
- this.patternRcp = []
528
- let valSplit = val.map(item => {
529
- return item.map(val => {
530
- return val.splitchain
531
- })
532
- })
533
- let splitCycle = valSplit.length > 0 ? valSplit.map(item => {
534
- return item.length > 0 ? item.reduce((a, b) => {
535
- return a + b
536
- }) : 0
537
- }) : 0
538
- let cycle = Math.max(...splitCycle)// 每个环的周期最大值
539
- for (let rings of val) {
540
- if (rings.length === 0) continue
541
- let list = []
542
- for (let ring of rings) {
543
- if (ring.splitchain === 0) continue
544
- let obj = {}
545
- let split = ring.splitchain
546
- obj.split = split
547
- obj.cycle = cycle
548
- obj.id = ring.phases
549
- // if (ring.sum) {
550
- // obj.sum = ring.sum
551
- // obj.redWidth = ((currPhase.redclear + ring.sum) / (this.fixCycle ? this.fixCycle : this.max ? this.max : this.newCycle) * 100) + '%'
552
- // } else {
553
- // obj.redWidth = (currPhase.redclear / (this.fixCycle ? this.fixCycle : this.max ? this.max : this.newCycle) * 100) + '%'
554
- // }
555
- // obj.mode = ring.mode
556
- obj.greenWidth = (split / (cycle > this.cycles ? cycle : this.cycles)) * 100 + '%'
557
- // obj.flashgreen = (currPhase.flashgreen / (this.fixCycle ? this.fixCycle : this.max ? this.max : this.newCycle) * 100) + '%'
558
- // obj.yellowWidth = (currPhase.yellow / (this.fixCycle ? this.fixCycle : this.max ? this.max : this.newCycle) * 100) + '%'
559
- // 忽略相位不显示
560
- // let mode = ring.mode
561
- // if (mode !== 7) { // 忽略相位不显示
562
- list.push(obj)
563
- // }
564
- }
565
- this.patternRcp.push(list)
566
- }
567
- },
568
488
  handleStageData (data) {
569
489
  if (!data) return
570
490
  let peddirections = this.getPed(data)
@@ -837,6 +757,20 @@ export default {
837
757
  let addRing1 = [...new Set(resultArrs[1])].filter(item => newCurrent[h].includes(item))
838
758
  ring1s.push(addRing1)
839
759
  }
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
+ }
840
774
  barrierRing1.push(...ring1, ...ring1s)
841
775
  let resultList = []
842
776
  if (newRings.length > 1) {
@@ -1123,6 +1057,20 @@ export default {
1123
1057
  let addRing1 = [...new Set(resultArrs[1])].filter(item => newCurrent[h].includes(item))
1124
1058
  ring1s.push(addRing1)
1125
1059
  }
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
+ }
1126
1074
  barrierRing1.push(...ring1, ...ring1s)
1127
1075
  let resultList = []
1128
1076
  if (newRings.length > 1) {
@@ -1372,6 +1320,20 @@ export default {
1372
1320
  let addRing1 = [...new Set(resultArrs[1])].filter(item => newCurrent[h].includes(item))
1373
1321
  ring1s.push(addRing1)
1374
1322
  }
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
+ }
1375
1337
  barrierRing1.push(...ring1, ...ring1s)
1376
1338
  let resultList = []
1377
1339
  if (newRings.length >= 1) {
@@ -1430,9 +1392,6 @@ export default {
1430
1392
  if (this.patternList) {
1431
1393
  this.setBarrier(ringTeams, val)
1432
1394
  }
1433
- if (newRings.length > 1) {
1434
- this.fillGap(ringTeams, val)
1435
- }
1436
1395
  if (this.cycleChange) {
1437
1396
  const globalParamModel = this.$store.getters.globalParamModel
1438
1397
  let pattern = globalParamModel.getParamsByType('patternList')
@@ -1442,6 +1401,9 @@ export default {
1442
1401
  } else {
1443
1402
  this.max = ''
1444
1403
  }
1404
+ if (newRings.length > 1) {
1405
+ this.fillGap(ringTeams, val)
1406
+ }
1445
1407
  let barrier = this.step2(ringTeams, newPattern)
1446
1408
  let barrierLeft = barrier.map(item => item)// 屏障左移显示出人行横道
1447
1409
  this.barrierList = barrierLeft.map(j => {
@@ -441,7 +441,11 @@ PURPOSE. * See the Mulan PSL v2 for more details. **/
441
441
  :width="iconWidth"
442
442
  :height="iconHeight"
443
443
  >
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>
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>
445
449
  </span>
446
450
  </template>
447
451
 
@@ -3,7 +3,6 @@
3
3
  <BoardCard
4
4
  :patternId="patternId"
5
5
  :contrloType="contrloType"
6
- :patternType="patternType"
7
6
  :stagesChange="stagesChange"
8
7
  :isShowTip="isShowTip"
9
8
  :isBorder="isBorder"
@@ -553,9 +552,6 @@ export default {
553
552
  patternStatusList: {
554
553
  type: Array
555
554
  },
556
- patternType: {
557
- type: String
558
- },
559
555
  patternId: {
560
556
  type: Number
561
557
  },