openatc-components 0.1.86 → 0.1.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.
- package/package/kisscomps/components/FaultDetailModal/FaultDetailModal.vue +6 -6
- package/package/kisscomps/components/PatternStatus/PatternStatus.vue +24 -26
- package/package/kisscomps/components/SchemeConfig/tentativeplancontrolmodal/index.vue +3 -3
- package/package/kisscomps/components/StageBord/StageBord.vue +2 -2
- package/package/kissui.min.js +1 -1
- package/package.json +1 -1
- package/src/i18n/language/zh.js +16 -16
- package/src/kisscomps/components/FaultDetailModal/FaultDetailModal.vue +6 -6
- package/src/kisscomps/components/PatternStatus/PatternStatus.vue +24 -26
- package/src/kisscomps/components/SchemeConfig/tentativeplancontrolmodal/index.vue +3 -3
- package/src/kisscomps/components/StageBord/StageBord.vue +2 -2
- package/src/node_modules/.package_versions.json +1 -0
- package/src/utils/fault.js +12 -11
- package/static/styles/schemeconfig.scss +15 -0
package/package.json
CHANGED
package/src/i18n/language/zh.js
CHANGED
|
@@ -335,22 +335,22 @@ const zh = {
|
|
|
335
335
|
'sl': '南左转',
|
|
336
336
|
'sr': '南右转',
|
|
337
337
|
'sb': '南掉头',
|
|
338
|
-
'eped': '
|
|
339
|
-
'wped': '
|
|
340
|
-
'sped': '
|
|
341
|
-
'nped': '
|
|
342
|
-
'etped': '
|
|
343
|
-
'ebped': '
|
|
344
|
-
'wtped': '
|
|
345
|
-
'wbped': '
|
|
346
|
-
'slped': '
|
|
347
|
-
'srped': '
|
|
348
|
-
'nlped': '
|
|
349
|
-
'nrped': '
|
|
350
|
-
'xrped': 'X
|
|
351
|
-
'xlped': 'X
|
|
352
|
-
'ewped': '
|
|
353
|
-
'snped': '
|
|
338
|
+
'eped': '东行人',
|
|
339
|
+
'wped': '西行人',
|
|
340
|
+
'sped': '南行人',
|
|
341
|
+
'nped': '北行人',
|
|
342
|
+
'etped': '东行人-上',
|
|
343
|
+
'ebped': '东行人-下',
|
|
344
|
+
'wtped': '西行人-上',
|
|
345
|
+
'wbped': '西行人-下',
|
|
346
|
+
'slped': '南行人-左',
|
|
347
|
+
'srped': '南行人-右',
|
|
348
|
+
'nlped': '北行人-左',
|
|
349
|
+
'nrped': '北行人-右',
|
|
350
|
+
'xrped': 'X行人-/',
|
|
351
|
+
'xlped': 'X行人-\\',
|
|
352
|
+
'ewped': '东西路段行人',
|
|
353
|
+
'snped': '南北路段行人',
|
|
354
354
|
'redyellow': '红黄',
|
|
355
355
|
'vehiclethresh': '车辆排队阈值',
|
|
356
356
|
'pedestrianthresh': '行人等待阈值',
|
|
@@ -121,19 +121,19 @@ export default {
|
|
|
121
121
|
this.getFaultById()
|
|
122
122
|
},
|
|
123
123
|
formatterBoardType (row) {
|
|
124
|
-
return formatBoardType(row)
|
|
124
|
+
return formatBoardType(row, this.$i18n)
|
|
125
125
|
},
|
|
126
126
|
m_byFaultDescValue (row) {
|
|
127
|
-
return formatFaultDescValue(row)
|
|
127
|
+
return formatFaultDescValue(row, this.$i18n)
|
|
128
128
|
},
|
|
129
129
|
m_wSubFaultType (row) {
|
|
130
|
-
return formatSubFaultType(row)
|
|
130
|
+
return formatSubFaultType(row, this.$i18n)
|
|
131
131
|
},
|
|
132
132
|
m_byFaultLevel (row) {
|
|
133
|
-
return formatFaultLevel(row)
|
|
133
|
+
return formatFaultLevel(row, this.$i18n)
|
|
134
134
|
},
|
|
135
135
|
m_wFaultTypes (row) {
|
|
136
|
-
return formatFaultTypes(row)
|
|
136
|
+
return formatFaultTypes(row, this.$i18n)
|
|
137
137
|
},
|
|
138
138
|
handleEnumerateCheck (row, enumerate) {
|
|
139
139
|
enumerateCheck(row.agentid, row.m_wFaultID, enumerate).then(res => {
|
|
@@ -154,7 +154,7 @@ export default {
|
|
|
154
154
|
})
|
|
155
155
|
},
|
|
156
156
|
formatterEnumerate (row) {
|
|
157
|
-
return formatEnumerate(row)
|
|
157
|
+
return formatEnumerate(row, this.$i18n)
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
160
|
}
|
|
@@ -14,8 +14,8 @@
|
|
|
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.mode===7?'direction': ''">
|
|
18
|
-
<div class="first-1" :class="item.mode===8?'mask': ''" :style="{'width':item.greenWidth,'height':'34px','background':'#7ccc66'}">
|
|
17
|
+
<div style="position: relative;" :style="{'height': '34px','float':'left','width':((item.split+(item.sum?item.sum:0)) / (max?max:item.cycle) * 100).toFixed(3) + '%'}" v-for="(item,index2) in list" :key="index2" :class="item.mode===7?'direction': ''">
|
|
18
|
+
<div class="first-1" :class="item.mode===8?'mask': ''" :style="{'width':Number(item.greenWidth.replace('%', ''))/Number((((item.split+(item.sum?item.sum:0)) / (max?max:item.cycle) * 100).toFixed(3) + '%').replace('%', ''))*100+'%','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;">
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
<!-- <patternwalksvg :showWalk="item.peddirection" :Width="'32'" :Height="'34'"></patternwalksvg> -->
|
|
24
24
|
<xdrdirselector Width="38px" Height="36px" :showlist="item.direction"></xdrdirselector>
|
|
25
25
|
</div>
|
|
26
|
-
<div class="box">
|
|
26
|
+
<div class="box" style="position: absolute; left:40px;top: 2px;">
|
|
27
27
|
<div class="ring-nums">P{{item.id}}</div>
|
|
28
28
|
<div class="ring-nums">{{item.split}}</div>
|
|
29
29
|
</div>
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
<i class="iconfont icon-youguidianche" style="position: absolute;top: 8px;font-size:12px;color:#454545;" v-if="bus.controltype === 5 && bus.phaseid===item.id"></i>
|
|
39
39
|
</div>
|
|
40
40
|
</div>
|
|
41
|
-
<div class="first-1" :class="item.mode===8?'mask': ''" :style="{'width':item.flashgreen,'height':'34px','float':'left','background': 'linear-gradient(to right, #ffffff 50%, #7ccc66 0)','background-size': '4px 100%'}"></div>
|
|
42
|
-
<div class="first-1" :class="item.mode===8?'mask': ''" :style="{'width':item.yellowWidth,'height':'34px','background':'#f9dc6a'}"></div>
|
|
43
|
-
<div class="first-1" :class="item.mode===8?'mask': ''" :style="{'width':item.redWidth,'height':'34px','background':'#f27979'}"></div>
|
|
41
|
+
<div class="first-1" :class="item.mode===8?'mask': ''" :style="{'width':Number(item.flashgreen.replace('%', ''))/Number((((item.split+(item.sum?item.sum:0)) / (max?max:item.cycle) * 100).toFixed(3) + '%').replace('%', ''))*100+'%','height':'34px','float':'left','background': 'linear-gradient(to right, #ffffff 50%, #7ccc66 0)','background-size': '4px 100%'}"></div>
|
|
42
|
+
<div class="first-1" :class="item.mode===8?'mask': ''" :style="{'width':Number(item.yellowWidth.replace('%', ''))/Number((((item.split+(item.sum?item.sum:0)) / (max?max:item.cycle) * 100).toFixed(3) + '%').replace('%', ''))*100+'%','height':'34px','background':'#f9dc6a'}"></div>
|
|
43
|
+
<div class="first-1" :class="item.mode===8?'mask': ''" :style="{'width':Number(item.redWidth.replace('%', ''))/Number((((item.split+(item.sum?item.sum:0)) / (max?max:item.cycle) * 100).toFixed(3) + '%').replace('%', ''))*100+'%','height':'34px','background':'#f27979'}"></div>
|
|
44
44
|
</div>
|
|
45
45
|
</div>
|
|
46
46
|
<div v-if="showBarrier">
|
|
@@ -104,6 +104,7 @@ export default {
|
|
|
104
104
|
patternIds: this.patternId,
|
|
105
105
|
newPatterns: [],
|
|
106
106
|
newList: [],
|
|
107
|
+
contrloCycle: 0,
|
|
107
108
|
sidewalkPhaseData: [],
|
|
108
109
|
// controlDatas: this.controlData,
|
|
109
110
|
max: '',
|
|
@@ -161,23 +162,15 @@ export default {
|
|
|
161
162
|
computed: {
|
|
162
163
|
paddingLeft () {
|
|
163
164
|
let res = '0%'
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
// res = curPercent * 100 + '%'
|
|
167
|
-
// }
|
|
168
|
-
if (this.cycle && this.cycle > 0) {
|
|
169
|
-
let curPercent = (this.cycle - this.syncTime) / (this.max ? this.max : this.cycle)
|
|
165
|
+
if (this.contrloCycle > 0) {
|
|
166
|
+
let curPercent = (this.contrloCycle - this.syncTime) / (this.max ? this.max : this.contrloCycle)
|
|
170
167
|
res = curPercent * 100 + '%'
|
|
171
168
|
}
|
|
172
169
|
return res
|
|
173
170
|
},
|
|
174
171
|
timeNumDevide () {
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
// return res
|
|
178
|
-
// }
|
|
179
|
-
if (this.cycle && this.cycle > 0) {
|
|
180
|
-
let res = (this.cycle - this.syncTime) + '/' + this.cycle
|
|
172
|
+
if (this.contrloCycle > 0) {
|
|
173
|
+
let res = (this.contrloCycle - this.syncTime) + '/' + this.contrloCycle
|
|
181
174
|
return res
|
|
182
175
|
}
|
|
183
176
|
}
|
|
@@ -482,6 +475,7 @@ export default {
|
|
|
482
475
|
}) : 0
|
|
483
476
|
}) : 0
|
|
484
477
|
let cycle = Math.max(...splitCycle)// 每个环的周期最大值
|
|
478
|
+
this.contrloCycle = cycle
|
|
485
479
|
this.patternInfo = []
|
|
486
480
|
let currentArr = []
|
|
487
481
|
let newPattern = []
|
|
@@ -543,7 +537,7 @@ export default {
|
|
|
543
537
|
peddirections = []
|
|
544
538
|
}
|
|
545
539
|
}
|
|
546
|
-
if (ring.desc) {
|
|
540
|
+
if (ring.desc && ring.desc.length > 0) {
|
|
547
541
|
obj.direction = ring.desc.map(item => { // 虚相位desc为空
|
|
548
542
|
return {
|
|
549
543
|
id: item.id,
|
|
@@ -551,7 +545,7 @@ export default {
|
|
|
551
545
|
}
|
|
552
546
|
})
|
|
553
547
|
} else {
|
|
554
|
-
if (currPhase.direction.length > 0) {
|
|
548
|
+
if (currPhase.direction && currPhase.direction.length > 0) {
|
|
555
549
|
obj.direction = currPhase.direction.map(item => {
|
|
556
550
|
return {
|
|
557
551
|
id: item,
|
|
@@ -570,6 +564,7 @@ export default {
|
|
|
570
564
|
}
|
|
571
565
|
}
|
|
572
566
|
obj.split = split
|
|
567
|
+
obj.cycle = cycle
|
|
573
568
|
if (ring.sum) {
|
|
574
569
|
obj.redWidth = ((currPhase.redclear + ring.sum) / (this.max ? this.max : cycle) * 100).toFixed(3) + '%'
|
|
575
570
|
} else {
|
|
@@ -631,6 +626,7 @@ export default {
|
|
|
631
626
|
}) : 0
|
|
632
627
|
}) : 0
|
|
633
628
|
let cycle = Math.max(...splitCycle)// 每个环的周期最大值
|
|
629
|
+
this.contrloCycle = cycle
|
|
634
630
|
// 按环序分组
|
|
635
631
|
let ringlength = []
|
|
636
632
|
let ringsequence = val.map(item => {
|
|
@@ -771,7 +767,7 @@ export default {
|
|
|
771
767
|
peddirections = []
|
|
772
768
|
}
|
|
773
769
|
}
|
|
774
|
-
if (ring.desc) {
|
|
770
|
+
if (ring.desc && ring.desc.length > 0) {
|
|
775
771
|
obj.direction = ring.desc.map(item => { // 虚相位desc为空
|
|
776
772
|
return {
|
|
777
773
|
id: item.id,
|
|
@@ -779,7 +775,7 @@ export default {
|
|
|
779
775
|
}
|
|
780
776
|
})
|
|
781
777
|
} else {
|
|
782
|
-
if (currPhase.direction.length > 0) {
|
|
778
|
+
if (currPhase.direction && currPhase.direction.length > 0) {
|
|
783
779
|
obj.direction = currPhase.direction.map(item => {
|
|
784
780
|
return {
|
|
785
781
|
id: item,
|
|
@@ -798,6 +794,7 @@ export default {
|
|
|
798
794
|
}
|
|
799
795
|
}
|
|
800
796
|
obj.split = split
|
|
797
|
+
obj.cycle = cycle
|
|
801
798
|
if (ring.sum) {
|
|
802
799
|
obj.redWidth = ((currPhase.redclear + ring.sum) / (this.max ? this.max : cycle) * 100).toFixed(3) + '%'
|
|
803
800
|
} else {
|
|
@@ -986,7 +983,7 @@ export default {
|
|
|
986
983
|
}
|
|
987
984
|
})
|
|
988
985
|
} else {
|
|
989
|
-
if (currPhase.direction.length > 0) {
|
|
986
|
+
if (currPhase.direction && currPhase.direction.length > 0) {
|
|
990
987
|
obj.direction = currPhase.direction.map(item => {
|
|
991
988
|
return {
|
|
992
989
|
id: item,
|
|
@@ -1270,9 +1267,10 @@ export default {
|
|
|
1270
1267
|
// color: #ffffff;
|
|
1271
1268
|
// }
|
|
1272
1269
|
.box {
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
margin-
|
|
1270
|
+
text-align: center;
|
|
1271
|
+
// float: left;
|
|
1272
|
+
// margin-left: 6px;
|
|
1273
|
+
// margin-right: 10px;
|
|
1276
1274
|
}
|
|
1277
1275
|
.ring-nums {
|
|
1278
1276
|
// float: left;
|
|
@@ -111,15 +111,15 @@
|
|
|
111
111
|
:list="patternOne.length===0?planPattern.rings[j-1]:patternOne[0].rings[j-1]"
|
|
112
112
|
>
|
|
113
113
|
</expend-config>
|
|
114
|
-
<div
|
|
114
|
+
<div class="forbiddenstage">
|
|
115
115
|
{{$t('openatccomponents.pattern.forbiddenstage')}}
|
|
116
116
|
<el-input class="stage-value" size="small" v-model="forbiddenstage"></el-input>
|
|
117
117
|
</div>
|
|
118
|
-
<div
|
|
118
|
+
<div class="forbiddenstage">
|
|
119
119
|
{{$t('openatccomponents.pattern.screenstage')}}
|
|
120
120
|
<el-input class="stage-value" size="small" v-model="screenstage"></el-input>
|
|
121
121
|
</div>
|
|
122
|
-
<div
|
|
122
|
+
<div class="forbiddenstage">
|
|
123
123
|
{{$t('openatccomponents.pattern.coordinatestage')}}
|
|
124
124
|
<el-input class="stage-value" size="small" v-model="coordinatestage"></el-input>
|
|
125
125
|
</div>
|
|
@@ -228,14 +228,14 @@ export default {
|
|
|
228
228
|
height: auto;
|
|
229
229
|
margin: 5px 0;
|
|
230
230
|
line-height: 40px;
|
|
231
|
-
color: #FFFFFF;
|
|
231
|
+
// color: #FFFFFF;
|
|
232
232
|
padding: 1px 1px;
|
|
233
233
|
box-sizing: border-box;
|
|
234
234
|
}
|
|
235
235
|
.el-button--primary:hover, .el-button--primary:focus{
|
|
236
236
|
background: #409EFF;
|
|
237
237
|
border-color: #409EFF;
|
|
238
|
-
color: #FFFFFF;
|
|
238
|
+
// color: #FFFFFF;
|
|
239
239
|
}
|
|
240
240
|
</style>
|
|
241
241
|
<style lang="scss">
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
package/src/utils/fault.js
CHANGED
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
|
10
10
|
* See the Mulan PSL v2 for more details.
|
|
11
11
|
**/
|
|
12
|
-
import i18n from '../i18n/index'
|
|
13
|
-
import {faultCodeMap,
|
|
12
|
+
// import i18n from '../i18n/index.js'
|
|
13
|
+
import { faultCodeMap,
|
|
14
14
|
faultCodeMapEn,
|
|
15
15
|
TZParamSubtypeMap,
|
|
16
16
|
TZParamSubtypeMapEn,
|
|
@@ -22,7 +22,7 @@ import {faultCodeMap,
|
|
|
22
22
|
LampGroupSubtypeMapEn
|
|
23
23
|
} from './faultcode.js'
|
|
24
24
|
|
|
25
|
-
export function getFaultType (type) {
|
|
25
|
+
export function getFaultType (type, i18n) {
|
|
26
26
|
if (type >= 101 && type <= 199) {
|
|
27
27
|
return i18n.t('openatccomponents.faultrecord.maincontrolboardfault')
|
|
28
28
|
} else if (type >= 201 && type <= 299) {
|
|
@@ -44,7 +44,7 @@ export function getMainFaultTypeEn (type) {
|
|
|
44
44
|
return faultCodeMapEn.get(type)
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
export function getAllMainFaultTypeArr (keyfield, valuefield) {
|
|
47
|
+
export function getAllMainFaultTypeArr (keyfield, valuefield, i18n) {
|
|
48
48
|
let typeArr = []
|
|
49
49
|
let label = 'label'
|
|
50
50
|
let val = 'value'
|
|
@@ -71,7 +71,8 @@ export function getAllMainFaultTypeArr (keyfield, valuefield) {
|
|
|
71
71
|
}
|
|
72
72
|
return typeArr
|
|
73
73
|
}
|
|
74
|
-
|
|
74
|
+
|
|
75
|
+
export function getBoardType (i18n) {
|
|
75
76
|
let BoardType = [{
|
|
76
77
|
label: i18n.t('openatccomponents.fault.tab1'),
|
|
77
78
|
value: 1
|
|
@@ -93,7 +94,7 @@ export function getBoardType () {
|
|
|
93
94
|
}]
|
|
94
95
|
return BoardType
|
|
95
96
|
}
|
|
96
|
-
export function formatBoardType (dev) {
|
|
97
|
+
export function formatBoardType (dev, i18n) {
|
|
97
98
|
let boardType = dev.m_byFaultBoardType
|
|
98
99
|
let res = ''
|
|
99
100
|
if (boardType === 1) {
|
|
@@ -111,7 +112,7 @@ export function formatBoardType (dev) {
|
|
|
111
112
|
}
|
|
112
113
|
return res
|
|
113
114
|
}
|
|
114
|
-
export function formatFaultDescValue (dev) {
|
|
115
|
+
export function formatFaultDescValue (dev, i18n) {
|
|
115
116
|
let res = ''
|
|
116
117
|
let faultDesc = dev.m_byFaultDescValue
|
|
117
118
|
let boardType = dev.m_byFaultBoardType
|
|
@@ -127,7 +128,7 @@ export function formatFaultDescValue (dev) {
|
|
|
127
128
|
}
|
|
128
129
|
return res
|
|
129
130
|
}
|
|
130
|
-
export function formatEnumerate (dev) {
|
|
131
|
+
export function formatEnumerate (dev, i18n) {
|
|
131
132
|
let enumerate = dev.enumerate
|
|
132
133
|
let res = ''
|
|
133
134
|
if (enumerate === '0') {
|
|
@@ -139,7 +140,7 @@ export function formatEnumerate (dev) {
|
|
|
139
140
|
}
|
|
140
141
|
return res
|
|
141
142
|
}
|
|
142
|
-
export function formatSubFaultType (dev) {
|
|
143
|
+
export function formatSubFaultType (dev, i18n) {
|
|
143
144
|
let wFaultType = dev.m_wFaultType
|
|
144
145
|
let wSubFaultType = dev.m_wSubFaultType
|
|
145
146
|
let res = ''
|
|
@@ -170,7 +171,7 @@ export function formatSubFaultType (dev) {
|
|
|
170
171
|
}
|
|
171
172
|
return res
|
|
172
173
|
}
|
|
173
|
-
export function formatFaultLevel (dev) {
|
|
174
|
+
export function formatFaultLevel (dev, i18n) {
|
|
174
175
|
let byFaultLevel = dev.m_byFaultLevel
|
|
175
176
|
let res = ''
|
|
176
177
|
if (byFaultLevel === 1) {
|
|
@@ -182,7 +183,7 @@ export function formatFaultLevel (dev) {
|
|
|
182
183
|
}
|
|
183
184
|
return res
|
|
184
185
|
}
|
|
185
|
-
export function formatFaultTypes (dev,
|
|
186
|
+
export function formatFaultTypes (dev, i18n) {
|
|
186
187
|
// 故障主类型需要显示具体类型,不要按范围判断
|
|
187
188
|
let faultType = dev.m_wFaultType
|
|
188
189
|
let res = ''
|
|
@@ -330,6 +330,21 @@
|
|
|
330
330
|
padding: 21PX 0PX 21PX 28PX;
|
|
331
331
|
min-width: 360PX;
|
|
332
332
|
overflow: auto;
|
|
333
|
+
.forbiddenstage{
|
|
334
|
+
width: 60%;
|
|
335
|
+
margin: 10px auto;
|
|
336
|
+
color: $--color-text-primary;
|
|
337
|
+
}
|
|
338
|
+
.stage-item {
|
|
339
|
+
cursor: pointer;
|
|
340
|
+
width: 100%;
|
|
341
|
+
height: auto;
|
|
342
|
+
margin: 5px 0;
|
|
343
|
+
line-height: 40px;
|
|
344
|
+
color: $--color-text-primary;
|
|
345
|
+
padding: 1px 1px;
|
|
346
|
+
box-sizing: border-box;
|
|
347
|
+
}
|
|
333
348
|
.title {
|
|
334
349
|
margin-bottom: 24PX;
|
|
335
350
|
font-size: 20PX;
|