openatc-components 0.3.43 → 0.3.45
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/PatternStatus/PatternStatus.vue +81 -1
- package/package/kisscomps/components/SchemeConfig/manualControlModalNew/index.vue +2 -4
- 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/PatternStatus/PatternStatus.vue +81 -1
- package/src/kisscomps/components/SchemeConfig/manualControlModalNew/index.vue +2 -4
- package/src/kisscomps/components/patternList/patternList.vue +4 -0
- package/src/node_modules/.package_versions.json +1 -0
package/package.json
CHANGED
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
:isShowTip="isShowTip"
|
|
14
14
|
:localPatternList="localPatternList"
|
|
15
15
|
:showCondition="showCondition"
|
|
16
|
+
:patternType="patternType"
|
|
16
17
|
:contrloType="contrloType"
|
|
17
18
|
:allPatternList="allPatternList"
|
|
18
19
|
:stagesChange="stagesChange"
|
|
@@ -92,6 +93,9 @@ export default {
|
|
|
92
93
|
patternId: {
|
|
93
94
|
type: Number
|
|
94
95
|
},
|
|
96
|
+
patternType: {
|
|
97
|
+
type: String
|
|
98
|
+
},
|
|
95
99
|
agentId: {
|
|
96
100
|
type: String
|
|
97
101
|
},
|
|
@@ -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
|
<div style="position: relative;" :style="{'height': '34px','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': ''">
|
|
18
43
|
<div class="first-1" :class="item.mode === 8 ? 'mask' : item.mode === 9 ? 'yellowClass' : ''" :style="{'width':Number(item.greenWidth.replace('%', ''))/Number((((item.split+(item.sum?item.sum:0)) / (max?max:item.cycle) * 100) + '%').replace('%', ''))*100+'%','height':'34px','background':'#7ccc66'}">
|
|
@@ -117,6 +142,7 @@ export default {
|
|
|
117
142
|
newCycle: this.cycles,
|
|
118
143
|
patternIds: this.patternId,
|
|
119
144
|
newPatterns: [],
|
|
145
|
+
patternRcp: [],
|
|
120
146
|
newList: [],
|
|
121
147
|
isControl: true,
|
|
122
148
|
contrloCycle: 0,
|
|
@@ -145,6 +171,9 @@ export default {
|
|
|
145
171
|
controlPhase: {
|
|
146
172
|
type: Object
|
|
147
173
|
},
|
|
174
|
+
patternType: {
|
|
175
|
+
type: String
|
|
176
|
+
},
|
|
148
177
|
contrloType: {
|
|
149
178
|
type: String
|
|
150
179
|
},
|
|
@@ -317,6 +346,9 @@ export default {
|
|
|
317
346
|
cycles: {
|
|
318
347
|
handler: function (val, oldVal) {
|
|
319
348
|
this.newCycle = this.cycles
|
|
349
|
+
if (this.patternType === 'rcp') {
|
|
350
|
+
this.handleRcp(this.patternStatusList)
|
|
351
|
+
}
|
|
320
352
|
},
|
|
321
353
|
// 深度观察监听
|
|
322
354
|
deep: true
|
|
@@ -341,6 +373,9 @@ export default {
|
|
|
341
373
|
},
|
|
342
374
|
patternStatusList: {
|
|
343
375
|
handler: function (val, oldVal) {
|
|
376
|
+
if (this.patternType === 'rcp') {
|
|
377
|
+
this.handleRcp(this.patternStatusList)
|
|
378
|
+
}
|
|
344
379
|
this.handleBarrierHeight() // 计算屏障高度
|
|
345
380
|
if (this.patternStatusList && this.newCycle) {
|
|
346
381
|
setTimeout(() => {
|
|
@@ -373,6 +408,9 @@ export default {
|
|
|
373
408
|
if (this.contrloType === 'stage') {
|
|
374
409
|
this.getStage()
|
|
375
410
|
}
|
|
411
|
+
if (this.patternType === 'rcp') {
|
|
412
|
+
this.handleRcp(this.patternStatusList)
|
|
413
|
+
}
|
|
376
414
|
},
|
|
377
415
|
methods: {
|
|
378
416
|
getPed (data) {
|
|
@@ -401,6 +439,48 @@ export default {
|
|
|
401
439
|
}
|
|
402
440
|
return ped
|
|
403
441
|
},
|
|
442
|
+
handleRcp (val) {
|
|
443
|
+
this.patternRcp = []
|
|
444
|
+
let valSplit = val.map(item => {
|
|
445
|
+
return item.map(val => {
|
|
446
|
+
return val.splitchain
|
|
447
|
+
})
|
|
448
|
+
})
|
|
449
|
+
let splitCycle = valSplit.length > 0 ? valSplit.map(item => {
|
|
450
|
+
return item.length > 0 ? item.reduce((a, b) => {
|
|
451
|
+
return a + b
|
|
452
|
+
}) : 0
|
|
453
|
+
}) : 0
|
|
454
|
+
let cycle = Math.max(...splitCycle)// 每个环的周期最大值
|
|
455
|
+
for (let rings of val) {
|
|
456
|
+
if (rings.length === 0) continue
|
|
457
|
+
let list = []
|
|
458
|
+
for (let ring of rings) {
|
|
459
|
+
if (ring.splitchain === 0) continue
|
|
460
|
+
let obj = {}
|
|
461
|
+
let split = ring.splitchain
|
|
462
|
+
obj.split = split
|
|
463
|
+
obj.cycle = cycle
|
|
464
|
+
obj.id = ring.phases
|
|
465
|
+
// if (ring.sum) {
|
|
466
|
+
// obj.sum = ring.sum
|
|
467
|
+
// obj.redWidth = ((currPhase.redclear + ring.sum) / (this.fixCycle ? this.fixCycle : this.max ? this.max : this.newCycle) * 100) + '%'
|
|
468
|
+
// } else {
|
|
469
|
+
// obj.redWidth = (currPhase.redclear / (this.fixCycle ? this.fixCycle : this.max ? this.max : this.newCycle) * 100) + '%'
|
|
470
|
+
// }
|
|
471
|
+
// obj.mode = ring.mode
|
|
472
|
+
obj.greenWidth = (split / (cycle > this.cycles ? cycle : this.cycles)) * 100 + '%'
|
|
473
|
+
// obj.flashgreen = (currPhase.flashgreen / (this.fixCycle ? this.fixCycle : this.max ? this.max : this.newCycle) * 100) + '%'
|
|
474
|
+
// obj.yellowWidth = (currPhase.yellow / (this.fixCycle ? this.fixCycle : this.max ? this.max : this.newCycle) * 100) + '%'
|
|
475
|
+
// 忽略相位不显示
|
|
476
|
+
// let mode = ring.mode
|
|
477
|
+
// if (mode !== 7) { // 忽略相位不显示
|
|
478
|
+
list.push(obj)
|
|
479
|
+
// }
|
|
480
|
+
}
|
|
481
|
+
this.patternRcp.push(list)
|
|
482
|
+
}
|
|
483
|
+
},
|
|
404
484
|
handleStageData (data) {
|
|
405
485
|
if (!data) return
|
|
406
486
|
let peddirections = this.getPed(data)
|
|
@@ -92,9 +92,8 @@
|
|
|
92
92
|
@selectModel="selectModel"
|
|
93
93
|
/>
|
|
94
94
|
|
|
95
|
-
<div class="common-config">
|
|
95
|
+
<div class="common-config" v-if="isHasPermission('configer:manual:senior')">
|
|
96
96
|
<el-form
|
|
97
|
-
v-if="isHasPermission('configer:manual:senior')"
|
|
98
97
|
ref="manual"
|
|
99
98
|
label-position="left"
|
|
100
99
|
:model="manualInfo"
|
|
@@ -128,9 +127,8 @@
|
|
|
128
127
|
@selectModel="selectModel"
|
|
129
128
|
@selectSpecialModel="selectSpecialModel" />
|
|
130
129
|
|
|
131
|
-
<div class="common-config" v-if="activeName === 'schemeselection'">
|
|
130
|
+
<div class="common-config" v-if="activeName === 'schemeselection' && isHasPermission('configer:manual:base')">
|
|
132
131
|
<el-form
|
|
133
|
-
v-if="isHasPermission('configer:manual:base')"
|
|
134
132
|
ref="manual"
|
|
135
133
|
label-position="left"
|
|
136
134
|
:model="manualInfo"
|
|
@@ -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
|
:patternStatusList="patternStatusList"
|
|
@@ -541,6 +542,9 @@ export default {
|
|
|
541
542
|
patternStatusList: {
|
|
542
543
|
type: Array
|
|
543
544
|
},
|
|
545
|
+
patternType: {
|
|
546
|
+
type: String
|
|
547
|
+
},
|
|
544
548
|
patternId: {
|
|
545
549
|
type: Number
|
|
546
550
|
},
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|