openatc-components 0.3.112 → 0.3.113
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 +0 -4
- package/package/kisscomps/components/OverviewComponent/index.vue +2 -12
- package/package/kisscomps/components/PatternStatus/PatternStatus.vue +2 -82
- package/package/kisscomps/components/SchemeConfig/SchemeConfig.vue +31 -9
- package/package/kisscomps/components/SchemeConfig/manualControlModalNew/controlModelGroup.vue +6 -4
- package/package/kisscomps/components/SchemeConfig/manualControlModalNew/icon.vue +2 -2
- package/package/kisscomps/components/SchemeConfig/manualControlModalNew/index.vue +19 -12
- package/package/kisscomps/components/SchemeConfig/utils/thirdPartypermission.js +95 -0
- package/package/kisscomps/components/overView/index.vue +1 -24
- package/package/kisscomps/components/patternList/patternList.vue +0 -4
- package/package/kissui.min.js +1 -1
- package/package.json +1 -1
- package/src/api/permission.js +33 -0
- package/src/i18n/language/en.js +10 -7
- package/src/i18n/language/zh.js +15 -12
- package/src/kisscomps/components/BoardCard/BoardCard.vue +0 -4
- package/src/kisscomps/components/OverviewComponent/index.vue +2 -12
- package/src/kisscomps/components/PatternStatus/PatternStatus.vue +2 -82
- package/src/kisscomps/components/SchemeConfig/SchemeConfig.vue +31 -9
- package/src/kisscomps/components/SchemeConfig/manualControlModalNew/controlModelGroup.vue +6 -4
- package/src/kisscomps/components/SchemeConfig/manualControlModalNew/icon.vue +2 -2
- package/src/kisscomps/components/SchemeConfig/manualControlModalNew/index.vue +19 -12
- package/src/kisscomps/components/SchemeConfig/utils/thirdPartypermission.js +95 -0
- package/src/kisscomps/components/overView/index.vue +1 -24
- package/src/kisscomps/components/patternList/patternList.vue +0 -4
- package/src/utils/ControlFormat.js +1 -1
- package/src/views/intersection.vue +1 -1
- package/src/views/overView.vue +1 -1
- package/static/apiconfig.json +10 -0
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
:isShowTip="isShowTip"
|
|
14
14
|
:localPatternList="localPatternList"
|
|
15
15
|
:showCondition="showCondition"
|
|
16
|
-
:patternType="patternType"
|
|
17
16
|
:contrloType="contrloType"
|
|
18
17
|
:allPatternList="allPatternList"
|
|
19
18
|
:stagesChange="stagesChange"
|
|
@@ -93,9 +92,6 @@ export default {
|
|
|
93
92
|
patternId: {
|
|
94
93
|
type: Number
|
|
95
94
|
},
|
|
96
|
-
patternType: {
|
|
97
|
-
type: String
|
|
98
|
-
},
|
|
99
95
|
agentId: {
|
|
100
96
|
type: String
|
|
101
97
|
},
|
|
@@ -103,7 +103,6 @@
|
|
|
103
103
|
:agentId="agentId"
|
|
104
104
|
:ip="ip"
|
|
105
105
|
:platform="platform"
|
|
106
|
-
:funcSort="FuncSort"
|
|
107
106
|
:roadDirection="roadDirection"
|
|
108
107
|
:isFromAtc="isfromatc" />
|
|
109
108
|
</div>
|
|
@@ -168,7 +167,7 @@ export default {
|
|
|
168
167
|
detectorStatusTimer: null, // 检测器定时器
|
|
169
168
|
ParamsMode: new Map([[0, '自主控制'], [1, '本地手动'], [2, '平台控制'], [3, '配置软件控制'], [4, '遥控器控制'], [5, '黄闪器控制'], [6, '降级控制'], [7, '脚本控制'], [8, '算法控制']]),
|
|
170
169
|
ParamsModeEn: new Map([[0, 'Autonomous Control'], [1, 'Local Manual'], [2, 'Platform Control'], [3, 'Configuration Software Control'], [4, 'Remote Control'], [5, 'Yellow Flasher Control'], [6, 'Degradation Control'], [7, 'Script Control'], [8, 'Algorithm Control']]),
|
|
171
|
-
ParamsControl: new Map([[0, '多时段'], [1, '黄闪'], [2, '全红'], [3, '关灯'], [4, '步进'], [5, '定周期控制'], [6, '
|
|
170
|
+
ParamsControl: new Map([[0, '多时段'], [1, '黄闪'], [2, '全红'], [3, '关灯'], [4, '步进'], [5, '定周期控制'], [6, '自适应'], [7, '协调感应控制'], [8, '方案选择控制'], [9, '方案生成'], [10, '无电缆控制'], [11, '有电缆控制'], [12, '行人过街控制'], [13, '方案恢复过渡'], [14, '相位驻留'], [15, '通道检测'], [16, '方向锁定'], [17, '韦伯斯特单点控制'], [18, '预留18'], [19, '感应式行人过街'], [20, '方案干预'], [100, '方案干预'], [21, '预留21'], [22, '相位锁定'], [23, '相位放行控制'], [24, '紧急控制'], [99, '设备维护']]),
|
|
172
171
|
ParamsControlEn: new Map([[0, 'Multi Period'], [1, 'Yellow Flash Control'], [2, 'Red Control'], [3, 'Dark Control'], [4, 'Step'], [5, 'Fixed_Cycle Control'], [6, 'Free Control'], [7, 'Coordinated Induction Control'], [8, 'Pattern Selection Control'], [9, 'Adaptive Control'], [10, 'Wireless Control'], [11, 'Cable Control'], [12, 'Pedestrian Crossing Control'], [13, 'Pattern recovery'], [14, 'Phase dwell'], [15, 'Channel Detection'], [16, 'Direction lock'], [17, 'Webster Single Point Coordination'], [18, 'Reserving18'], [19, 'Inductive Pedestrian Crossing Control'], [20, 'Program Intervention'], [100, 'Program Intervention'], [21, 'Reserving21'], [22, 'Priority Control'], [23, 'Close Phase'], [24, 'Emergency Control'], [99, 'Device Mantenance']]),
|
|
173
172
|
phaseType: new Map([[1, '红'], [2, '黄'], [3, '绿'], [4, '绿闪']]), // phaseType表示红,黄,绿
|
|
174
173
|
phaseTypeEn: new Map([[1, 'Red'], [2, 'Yellow'], [3, 'Green'], [4, 'Greenclear']]), // phaseType表示红,黄,绿
|
|
@@ -193,8 +192,7 @@ export default {
|
|
|
193
192
|
commonHeight: undefined, // 左右侧面板的高度值
|
|
194
193
|
graphicMode: false,
|
|
195
194
|
resetcomponent: true,
|
|
196
|
-
curHomePage: 'Graphical'
|
|
197
|
-
FuncSort: 'allFunc'
|
|
195
|
+
curHomePage: 'Graphical'
|
|
198
196
|
}
|
|
199
197
|
},
|
|
200
198
|
computed: {
|
|
@@ -781,14 +779,6 @@ export default {
|
|
|
781
779
|
this.agentName = res.data.data.name
|
|
782
780
|
}
|
|
783
781
|
this.platform = res.data.data.platform
|
|
784
|
-
let func = 'allFunc'
|
|
785
|
-
if (this.platform === 'OpenATC') {
|
|
786
|
-
func = 'allFunc'
|
|
787
|
-
}
|
|
788
|
-
if (this.platform === 'SCATS' || this.platform === 'HUATONG') {
|
|
789
|
-
func = 'basicFunc'
|
|
790
|
-
}
|
|
791
|
-
this.FuncSort = func
|
|
792
782
|
})
|
|
793
783
|
}
|
|
794
784
|
},
|
|
@@ -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="
|
|
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
|
<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': ''">
|
|
43
18
|
<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'}">
|
|
@@ -142,7 +117,6 @@ export default {
|
|
|
142
117
|
newCycle: this.cycles,
|
|
143
118
|
patternIds: this.patternId,
|
|
144
119
|
newPatterns: [],
|
|
145
|
-
patternRcp: [],
|
|
146
120
|
newList: [],
|
|
147
121
|
isControl: true,
|
|
148
122
|
contrloCycle: 0,
|
|
@@ -171,9 +145,6 @@ export default {
|
|
|
171
145
|
controlPhase: {
|
|
172
146
|
type: Object
|
|
173
147
|
},
|
|
174
|
-
patternType: {
|
|
175
|
-
type: String
|
|
176
|
-
},
|
|
177
148
|
contrloType: {
|
|
178
149
|
type: String
|
|
179
150
|
},
|
|
@@ -346,9 +317,6 @@ export default {
|
|
|
346
317
|
cycles: {
|
|
347
318
|
handler: function (val, oldVal) {
|
|
348
319
|
this.newCycle = this.cycles
|
|
349
|
-
if (this.patternType === 'rcp') {
|
|
350
|
-
this.handleRcp(this.patternStatusList)
|
|
351
|
-
}
|
|
352
320
|
},
|
|
353
321
|
// 深度观察监听
|
|
354
322
|
deep: true
|
|
@@ -373,9 +341,6 @@ export default {
|
|
|
373
341
|
},
|
|
374
342
|
patternStatusList: {
|
|
375
343
|
handler: function (val, oldVal) {
|
|
376
|
-
if (this.patternType === 'rcp') {
|
|
377
|
-
this.handleRcp(this.patternStatusList)
|
|
378
|
-
}
|
|
379
344
|
this.handleBarrierHeight() // 计算屏障高度
|
|
380
345
|
if (this.patternStatusList && this.newCycle) {
|
|
381
346
|
setTimeout(() => {
|
|
@@ -408,9 +373,6 @@ export default {
|
|
|
408
373
|
if (this.contrloType === 'stage') {
|
|
409
374
|
this.getStage()
|
|
410
375
|
}
|
|
411
|
-
if (this.patternType === 'rcp') {
|
|
412
|
-
this.handleRcp(this.patternStatusList)
|
|
413
|
-
}
|
|
414
376
|
},
|
|
415
377
|
methods: {
|
|
416
378
|
getPed (data) {
|
|
@@ -439,48 +401,6 @@ export default {
|
|
|
439
401
|
}
|
|
440
402
|
return ped
|
|
441
403
|
},
|
|
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
|
-
},
|
|
484
404
|
handleStageData (data) {
|
|
485
405
|
if (!data) return
|
|
486
406
|
let peddirections = this.getPed(data)
|
|
@@ -1117,7 +1037,7 @@ export default {
|
|
|
1117
1037
|
}
|
|
1118
1038
|
}
|
|
1119
1039
|
obj.split = split
|
|
1120
|
-
obj.cycle =
|
|
1040
|
+
obj.cycle = this.fixCycle ? this.fixCycle : this.max ? this.max : this.newCycle
|
|
1121
1041
|
if (ring.sum) {
|
|
1122
1042
|
obj.sum = ring.sum
|
|
1123
1043
|
obj.redWidth = ((currPhase.redclear + ring.sum) / (this.max ? this.max : cycle) * 100) + '%'
|
|
@@ -40,6 +40,8 @@
|
|
|
40
40
|
:patternSelect="patternSelect"
|
|
41
41
|
:allPatternList="allPatternList"
|
|
42
42
|
:funcSort="funcSort"
|
|
43
|
+
:thirdPartyControlMenu="thirdPartyControlMenu"
|
|
44
|
+
:thirdPartyControl="thirdPartyControl"
|
|
43
45
|
:isShowBack="isShowBack"
|
|
44
46
|
:isShowRecovery="isShowRecovery"
|
|
45
47
|
:isShowImplement="isShowImplement"
|
|
@@ -104,6 +106,8 @@
|
|
|
104
106
|
:patternSelect="patternSelect"
|
|
105
107
|
:allPatternList="allPatternList"
|
|
106
108
|
:funcSort="funcSort"
|
|
109
|
+
:thirdPartyControlMenu="thirdPartyControlMenu"
|
|
110
|
+
:thirdPartyControl="thirdPartyControl"
|
|
107
111
|
:isShowBack="isShowBack"
|
|
108
112
|
:isShowRecovery="isShowRecovery"
|
|
109
113
|
:isShowImplement="isShowImplement"
|
|
@@ -138,6 +142,8 @@ import CrossDiagramMgr from '../../../EdgeMgr/controller/crossDiagramMgr.js'
|
|
|
138
142
|
import { setToken, setHost, getTheme } from '../../../utils/auth.js'
|
|
139
143
|
import RingDataModel from '../../../utils/RingDataModel.js'
|
|
140
144
|
import { getIntersectionInfo } from '../../../api/template'
|
|
145
|
+
import { GetRoleByName } from '../../../api/permission.js'
|
|
146
|
+
import { getPermissionMenu, getPermissionControl } from './utils/thirdPartypermission.js'
|
|
141
147
|
|
|
142
148
|
export default {
|
|
143
149
|
name: 'scheme-config',
|
|
@@ -200,10 +206,6 @@ export default {
|
|
|
200
206
|
type: String,
|
|
201
207
|
default: ''
|
|
202
208
|
},
|
|
203
|
-
funcSort: {
|
|
204
|
-
type: String,
|
|
205
|
-
default: 'allFunc'
|
|
206
|
-
},
|
|
207
209
|
roadDirection: {
|
|
208
210
|
type: String,
|
|
209
211
|
default: 'right'
|
|
@@ -261,7 +263,7 @@ export default {
|
|
|
261
263
|
faultTimer: null, // 当前故障定时器
|
|
262
264
|
ParamsMode: new Map([[0, '自主控制'], [1, '本地手动'], [2, '平台控制'], [3, '配置软件控制'], [4, '遥控器控制'], [5, '黄闪器控制'], [6, '降级控制'], [7, '脚本控制'], [8, '算法控制']]),
|
|
263
265
|
ParamsModeEn: new Map([[0, 'Autonomous Control'], [1, 'Local Manual'], [2, 'Platform Control'], [3, 'Configuration Software Control'], [4, 'Remote Control'], [5, 'Yellow Flasher Control'], [6, 'Degradation Control'], [7, 'Script Control'], [8, 'Algorithm Control']]),
|
|
264
|
-
ParamsControl: new Map([[0, '多时段'], [1, '黄闪'], [2, '全红'], [3, '关灯'], [4, '步进'], [5, '定周期控制'], [6, '
|
|
266
|
+
ParamsControl: new Map([[0, '多时段'], [1, '黄闪'], [2, '全红'], [3, '关灯'], [4, '步进'], [5, '定周期控制'], [6, '自适应'], [7, '协调感应控制'], [8, '方案选择控制'], [9, '方案生成'], [10, '无电缆控制'], [11, '有电缆控制'], [12, '行人过街控制'], [13, '方案恢复过渡'], [14, '相位驻留'], [15, '通道检测'], [16, '方向锁定'], [17, '韦伯斯特单点控制'], [18, '预留18'], [19, '感应式行人过街'], [20, '方案干预'], [100, '方案干预'], [21, '预留21'], [22, '相位锁定'], [23, '相位放行控制'], [24, '紧急控制'], [99, '设备维护']]),
|
|
265
267
|
ParamsControlEn: new Map([[0, 'Multi Period'], [1, 'Yellow Flash Control'], [2, 'Red Control'], [3, 'Dark Control'], [4, 'Step'], [5, 'Fixed_Cycle Control'], [6, 'Free Control'], [7, 'Coordinated Induction Control'], [8, 'Pattern Selection Control'], [9, 'Adaptive Control'], [10, 'Wireless Control'], [11, 'Cable Control'], [12, 'Pedestrian Crossing Control'], [13, 'Pattern recovery'], [14, 'Phase dwell'], [15, 'Channel Detection'], [16, 'Direction lock'], [17, 'Webster Single Point Coordination'], [18, 'Reserving18'], [19, 'Inductive Pedestrian Crossing Control'], [20, 'Program Intervention'], [100, 'Program Intervention'], [21, 'Reserving21'], [22, 'Priority Control'], [23, 'Close Phase'], [24, 'Emergency Control'], [99, 'Device Mantenance']]),
|
|
266
268
|
phaseType: new Map([[1, '红'], [2, '黄'], [3, '绿']]), // phaseType表示红,黄,绿
|
|
267
269
|
phaseTypeEn: new Map([[1, 'Red'], [2, 'Yellow'], [3, 'Green']]), // phaseType表示红,黄,绿
|
|
@@ -301,7 +303,7 @@ export default {
|
|
|
301
303
|
id: 9,
|
|
302
304
|
iconClass: 'zishiying',
|
|
303
305
|
permission: 'configer:manual:base',
|
|
304
|
-
iconName: '
|
|
306
|
+
iconName: '方案生成'
|
|
305
307
|
}, {
|
|
306
308
|
id: 10,
|
|
307
309
|
iconClass: 'wuxianlan',
|
|
@@ -385,14 +387,14 @@ export default {
|
|
|
385
387
|
iconName: this.$t('openatccomponents.overview.modelList5'),
|
|
386
388
|
bgcolor: getTheme() === 'light' ? '#edf6ff' : '#243d59'
|
|
387
389
|
}, {
|
|
388
|
-
type: '
|
|
390
|
+
type: '自适应',
|
|
389
391
|
id: 6,
|
|
390
392
|
iconClass: 'ganyingkongzhi',
|
|
391
393
|
permission: 'configer:manual:base',
|
|
392
394
|
iconName: this.$t('openatccomponents.overview.modelList6'),
|
|
393
395
|
bgcolor: getTheme() === 'light' ? '#edf6ff' : '#243d59'
|
|
394
396
|
}, {
|
|
395
|
-
type: '
|
|
397
|
+
type: '方案生成',
|
|
396
398
|
id: 9,
|
|
397
399
|
iconClass: 'zishiying',
|
|
398
400
|
permission: 'configer:manual:base',
|
|
@@ -465,7 +467,10 @@ export default {
|
|
|
465
467
|
patternSelect: [], // 所有方案id
|
|
466
468
|
specialPage: '', // 哪一个特殊控制页面
|
|
467
469
|
nextcycleefficcontrol: [5, 6, 9, 10, 12, 19], // 下周期生效的控制方式
|
|
468
|
-
resetcomponent: false
|
|
470
|
+
resetcomponent: false,
|
|
471
|
+
funcSort: 'allFunc',
|
|
472
|
+
thirdPartyControlMenu: [],
|
|
473
|
+
thirdPartyControl: []
|
|
469
474
|
}
|
|
470
475
|
},
|
|
471
476
|
watch: {
|
|
@@ -613,8 +618,25 @@ export default {
|
|
|
613
618
|
changeStatus () {
|
|
614
619
|
this.toPage = 1
|
|
615
620
|
this.isOperation = true
|
|
621
|
+
if (this.platform !== undefined && this.platform !== 'OpenATC') {
|
|
622
|
+
this.queryThirdParty()
|
|
623
|
+
}
|
|
616
624
|
this.$refs.ManualControlModalNew.init()
|
|
617
625
|
},
|
|
626
|
+
queryThirdParty () {
|
|
627
|
+
this.funcSort = 'allFunc'
|
|
628
|
+
GetRoleByName(`thirdparty--${this.platform}`).then(res => {
|
|
629
|
+
if (!res.data.success) {
|
|
630
|
+
let msg = getMessageByCode(res.data.code, this.$i18n.locale)
|
|
631
|
+
this.$message.error(msg)
|
|
632
|
+
return
|
|
633
|
+
}
|
|
634
|
+
this.funcSort = 'thirdPartyFunc'
|
|
635
|
+
this.thirdPartyControl = getPermissionControl(res.data.data)
|
|
636
|
+
this.thirdPartyControlMenu = getPermissionMenu(this.thirdPartyControl)
|
|
637
|
+
this.$refs.ManualControlModalNew.activeName = this.thirdPartyControlMenu[0]
|
|
638
|
+
})
|
|
639
|
+
},
|
|
618
640
|
handleGetData (data) {
|
|
619
641
|
let that = this
|
|
620
642
|
if (data.name === '') {
|
package/package/kisscomps/components/SchemeConfig/manualControlModalNew/controlModelGroup.vue
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
<div class="single-model-new"
|
|
19
19
|
:style="{'backgroundColor': item.bgcolor}"
|
|
20
20
|
@click="selectModel(item)"
|
|
21
|
-
v-if="isHasPermission(item.permission)">
|
|
21
|
+
v-if="isHasPermission(item.permission) && (funcSort === 'allFunc' || (funcSort === 'thirdPartyFunc'&& thirdPartyControl.indexOf(item.id) !== -1))">
|
|
22
22
|
<div class="closephase-icon">
|
|
23
23
|
<OthersIconSvg :type="item.type" />
|
|
24
24
|
</div>
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
:style="{'backgroundColor': item.bgcolor}"
|
|
32
32
|
@click="selectModel(item)"
|
|
33
33
|
:class="preselecttype == item.type? 'single-model-select' : ''"
|
|
34
|
-
v-if="isHasPermission(item.permission) && (funcSort === 'allFunc' || (funcSort === '
|
|
34
|
+
v-if="isHasPermission(item.permission) && (funcSort === 'allFunc' || (funcSort === 'thirdPartyFunc'&& thirdPartyControl.indexOf(item.id) !== -1))">
|
|
35
35
|
<!-- <svg-icon :icon-class="item.iconClass" className="model-icon"></svg-icon> -->
|
|
36
36
|
<div class="model-icon">
|
|
37
37
|
<IconSvg :type="item.type" />
|
|
@@ -70,14 +70,16 @@ export default {
|
|
|
70
70
|
othersControl: {
|
|
71
71
|
type: Boolean,
|
|
72
72
|
default: false
|
|
73
|
+
},
|
|
74
|
+
thirdPartyControl: {
|
|
75
|
+
type: Array
|
|
73
76
|
}
|
|
74
77
|
},
|
|
75
78
|
data () {
|
|
76
79
|
return {
|
|
77
80
|
preselecttype: '',
|
|
78
81
|
controllist: [],
|
|
79
|
-
specialControl: [23,
|
|
80
|
-
basicFuncControlId: [0, 1, 4, 5] // 基础功能包含的控制方式: 自主控制(手动下)、黄闪、步进、定周期
|
|
82
|
+
specialControl: [23, 24, 100]
|
|
81
83
|
}
|
|
82
84
|
},
|
|
83
85
|
computed: {
|
|
@@ -227,7 +227,7 @@ PURPOSE. * See the Mulan PSL v2 for more details. **/
|
|
|
227
227
|
</g>
|
|
228
228
|
</svg>
|
|
229
229
|
<svg
|
|
230
|
-
v-if="type === '
|
|
230
|
+
v-if="type === '自适应'"
|
|
231
231
|
version="1.1"
|
|
232
232
|
id="图层_1"
|
|
233
233
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -266,7 +266,7 @@ PURPOSE. * See the Mulan PSL v2 for more details. **/
|
|
|
266
266
|
</svg>
|
|
267
267
|
|
|
268
268
|
<svg
|
|
269
|
-
v-if="type === '
|
|
269
|
+
v-if="type === '方案生成'"
|
|
270
270
|
xmlns="http://www.w3.org/2000/svg"
|
|
271
271
|
viewBox="0 0 24.53 21.2"
|
|
272
272
|
:width="iconWidth"
|
|
@@ -12,13 +12,15 @@
|
|
|
12
12
|
<template>
|
|
13
13
|
<div class="manual-control-modal-new">
|
|
14
14
|
<el-tabs v-model="activeName" type="card" @tab-click="handleClick">
|
|
15
|
-
<el-tab-pane :label="$t('openatccomponents.overview.residentcontrol')" name="residentcontrol"
|
|
15
|
+
<el-tab-pane :label="$t('openatccomponents.overview.residentcontrol')" name="residentcontrol"
|
|
16
|
+
v-if="(funcSort === 'allFunc' || (funcSort === 'thirdPartyFunc'&& thirdPartyControlMenu.indexOf('residentcontrol') !== -1))">
|
|
16
17
|
<ControlModelGroup
|
|
17
18
|
v-if="activeName === 'residentcontrol'"
|
|
18
19
|
ref="ControlModelGroup"
|
|
19
20
|
className="residentcontrol"
|
|
20
21
|
:controlList="residentControlList"
|
|
21
22
|
:funcSort="funcSort"
|
|
23
|
+
:thirdPartyControl="thirdPartyControl"
|
|
22
24
|
@selectModel="selectModel"
|
|
23
25
|
/>
|
|
24
26
|
|
|
@@ -80,13 +82,15 @@
|
|
|
80
82
|
<el-button v-if="!isShowImplement" type="primary" @click="handleManualControl()">{{$t('openatccomponents.overview.comfirm')}}</el-button>
|
|
81
83
|
</div>
|
|
82
84
|
</el-tab-pane>
|
|
83
|
-
<el-tab-pane :label="$t('openatccomponents.overview.specialcontrol')" name="specialcontrol"
|
|
85
|
+
<el-tab-pane :label="$t('openatccomponents.overview.specialcontrol')" name="specialcontrol"
|
|
86
|
+
v-if="(funcSort === 'allFunc' || (funcSort === 'thirdPartyFunc'&& thirdPartyControlMenu.indexOf('specialcontrol') !== -1))">
|
|
84
87
|
<ControlModelGroup
|
|
85
88
|
v-if="activeName === 'specialcontrol'"
|
|
86
89
|
ref="ControlModelGroup"
|
|
87
90
|
className="specialcontrol"
|
|
88
91
|
:controlList="specialControlList"
|
|
89
92
|
:funcSort="funcSort"
|
|
93
|
+
:thirdPartyControl="thirdPartyControl"
|
|
90
94
|
@selectModel="selectModel"
|
|
91
95
|
/>
|
|
92
96
|
|
|
@@ -112,13 +116,15 @@
|
|
|
112
116
|
</div>
|
|
113
117
|
|
|
114
118
|
</el-tab-pane>
|
|
115
|
-
<el-tab-pane :label="$t('openatccomponents.overview.schemeselection')" name="schemeselection"
|
|
119
|
+
<el-tab-pane :label="$t('openatccomponents.overview.schemeselection')" name="schemeselection"
|
|
120
|
+
v-if="(funcSort === 'allFunc' || (funcSort === 'thirdPartyFunc'&& thirdPartyControlMenu.indexOf('schemeselection') !== -1))">
|
|
116
121
|
<ControlModelGroup
|
|
117
122
|
v-if="activeName === 'schemeselection'"
|
|
118
123
|
ref="ControlModelGroup"
|
|
119
124
|
className="otherscontrol"
|
|
120
125
|
:controlList="patternChooseControlList"
|
|
121
126
|
:funcSort="funcSort"
|
|
127
|
+
:thirdPartyControl="thirdPartyControl"
|
|
122
128
|
@selectModel="selectModel"
|
|
123
129
|
@selectSpecialModel="selectSpecialModel" />
|
|
124
130
|
|
|
@@ -177,14 +183,16 @@
|
|
|
177
183
|
<el-button v-if="!isShowImplement" type="primary" @click="handleManualControl()">{{$t('openatccomponents.overview.comfirm')}}</el-button>
|
|
178
184
|
</div>
|
|
179
185
|
</el-tab-pane>
|
|
180
|
-
<el-tab-pane :label="$t('openatccomponents.overview.others')" name="others"
|
|
186
|
+
<el-tab-pane :label="$t('openatccomponents.overview.others')" name="others"
|
|
187
|
+
v-if="(funcSort === 'allFunc' || (funcSort === 'thirdPartyFunc'&& thirdPartyControlMenu.indexOf('others') !== -1))">
|
|
181
188
|
<ControlModelGroup
|
|
182
|
-
v-if="activeName === 'others'
|
|
189
|
+
v-if="activeName === 'others'"
|
|
183
190
|
ref="ControlModelGroup"
|
|
184
191
|
className="otherscontrol"
|
|
185
192
|
othersControl
|
|
186
193
|
:controlList="othersControlList"
|
|
187
194
|
:funcSort="funcSort"
|
|
195
|
+
:thirdPartyControl="thirdPartyControl"
|
|
188
196
|
@selectModel="selectModel"
|
|
189
197
|
@selectSpecialModel="selectSpecialModel"
|
|
190
198
|
/>
|
|
@@ -348,15 +356,15 @@ export default {
|
|
|
348
356
|
isShowImplement: {
|
|
349
357
|
type: Boolean,
|
|
350
358
|
default: true
|
|
359
|
+
},
|
|
360
|
+
thirdPartyControlMenu: {
|
|
361
|
+
type: Array
|
|
362
|
+
},
|
|
363
|
+
thirdPartyControl: {
|
|
364
|
+
type: Array
|
|
351
365
|
}
|
|
352
366
|
},
|
|
353
367
|
watch: {
|
|
354
|
-
activeName: {
|
|
355
|
-
handler: function (val) {
|
|
356
|
-
},
|
|
357
|
-
// 深度观察监听
|
|
358
|
-
deep: true
|
|
359
|
-
},
|
|
360
368
|
patternSelect: {
|
|
361
369
|
handler: function (val) {
|
|
362
370
|
this.manualInfo.tempPatternid = this.crossStatusData.patternid
|
|
@@ -375,7 +383,6 @@ export default {
|
|
|
375
383
|
},
|
|
376
384
|
data () {
|
|
377
385
|
return {
|
|
378
|
-
basicFuncControlId: [0, 1, 4, 5], // 基础功能包含的控制方式: 自主控制(手动下)、黄闪、步进、定周期
|
|
379
386
|
visible: this.Visible,
|
|
380
387
|
manuals: false,
|
|
381
388
|
realtimeStage: {},
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
// const permissionMenuMap = new Map([[
|
|
2
|
+
// 'configer:manual:dwell', ['驻留控制']
|
|
3
|
+
// ], [
|
|
4
|
+
// 'configer:manual:senior', ['特殊控制']
|
|
5
|
+
// ], [
|
|
6
|
+
// 'configer:manual:base', ['方案选择']
|
|
7
|
+
// ], [
|
|
8
|
+
// 'configer:manual:optimize', ['其他']
|
|
9
|
+
// ]])
|
|
10
|
+
const permissionControlMap = new Map([[
|
|
11
|
+
'configer:manual:dwell', [4, 22, 25]
|
|
12
|
+
], [
|
|
13
|
+
'configer:manual:senior', [1, 2, 3]
|
|
14
|
+
], [
|
|
15
|
+
'configer:manual:base', [5, 6, 9, 10, 12, 19]
|
|
16
|
+
], [
|
|
17
|
+
'configer:manual:optimize', [23, 100, 24]
|
|
18
|
+
], [
|
|
19
|
+
'configer:manual:dwell:step', [4]
|
|
20
|
+
], [
|
|
21
|
+
'configer:manual:dwell:stage', [4]
|
|
22
|
+
], [
|
|
23
|
+
'configer:manual:dwell:phaselock', [22]
|
|
24
|
+
], [
|
|
25
|
+
'configer:manual:dwell:directionlock', [25]
|
|
26
|
+
], [
|
|
27
|
+
'configer:manual:senior:yellowfalsh', [1]
|
|
28
|
+
], [
|
|
29
|
+
'configer:manual:senior:allred', [2]
|
|
30
|
+
], [
|
|
31
|
+
'configer:manual:senior:close', [3]
|
|
32
|
+
], [
|
|
33
|
+
'configer:manual:base:fix', [5]
|
|
34
|
+
], [
|
|
35
|
+
'configer:manual:base:free', [6]
|
|
36
|
+
], [
|
|
37
|
+
'configer:manual:base:adapter', [9]
|
|
38
|
+
], [
|
|
39
|
+
'configer:manual:base:coordinate', [10]
|
|
40
|
+
], [
|
|
41
|
+
'configer:manual:base:ped', [12]
|
|
42
|
+
], [
|
|
43
|
+
'configer:manual:base:pedfree', [19]
|
|
44
|
+
], [
|
|
45
|
+
'configer:manual:optimize:procedure', [23]
|
|
46
|
+
], [
|
|
47
|
+
'configer:manual:optimize:temp', [100]
|
|
48
|
+
], [
|
|
49
|
+
'configer:manual:optimize:preempt', [24]
|
|
50
|
+
]])
|
|
51
|
+
|
|
52
|
+
export function getPermissionMenu (thirdPartyControl) {
|
|
53
|
+
// 按第三方平台角色的权限处理可显示的手动控制菜单
|
|
54
|
+
// let thirdPartyControlMenu = []
|
|
55
|
+
// for (let i = 0; i < permissionList.length; i++) {
|
|
56
|
+
// let per = permissionList[i].permission_code
|
|
57
|
+
// if (permissionMenuMap.get(per)) {
|
|
58
|
+
// thirdPartyControlMenu = thirdPartyControlMenu.concat(permissionMenuMap.get(per))
|
|
59
|
+
// }
|
|
60
|
+
// }
|
|
61
|
+
// console.log(thirdPartyControlMenu)
|
|
62
|
+
// return thirdPartyControlMenu
|
|
63
|
+
let thirdPartyControlMenu = []
|
|
64
|
+
for (let i = 0; i < thirdPartyControl.length; i++) {
|
|
65
|
+
let control = thirdPartyControl[i]
|
|
66
|
+
if ([4, 22, 25].indexOf(control) !== -1) {
|
|
67
|
+
thirdPartyControlMenu = thirdPartyControlMenu.concat(['residentcontrol'])
|
|
68
|
+
}
|
|
69
|
+
if ([1, 2, 3].indexOf(control) !== -1) {
|
|
70
|
+
thirdPartyControlMenu = thirdPartyControlMenu.concat(['specialcontrol'])
|
|
71
|
+
}
|
|
72
|
+
if ([5, 6, 9, 10, 12, 19].indexOf(control) !== -1) {
|
|
73
|
+
thirdPartyControlMenu = thirdPartyControlMenu.concat(['schemeselection'])
|
|
74
|
+
}
|
|
75
|
+
if ([23, 24, 100].indexOf(control) !== -1) {
|
|
76
|
+
thirdPartyControlMenu = thirdPartyControlMenu.concat(['others'])
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
thirdPartyControlMenu = [...new Set(thirdPartyControlMenu)]
|
|
80
|
+
// console.log(thirdPartyControlMenu)
|
|
81
|
+
return thirdPartyControlMenu
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function getPermissionControl (permissionList) {
|
|
85
|
+
// 按第三方平台角色的权限处理可显示的手动控制按钮
|
|
86
|
+
let thirdPartyControl = []
|
|
87
|
+
for (let i = 0; i < permissionList.length; i++) {
|
|
88
|
+
let per = permissionList[i].permission_code
|
|
89
|
+
if (permissionControlMap.get(per)) {
|
|
90
|
+
thirdPartyControl = thirdPartyControl.concat(permissionControlMap.get(per))
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
// console.log(thirdPartyControl)
|
|
94
|
+
return thirdPartyControl
|
|
95
|
+
}
|
|
@@ -74,7 +74,6 @@
|
|
|
74
74
|
:agentId="agentId"
|
|
75
75
|
:ip="ip"
|
|
76
76
|
:platform="platform"
|
|
77
|
-
:funcSort="FuncSort"
|
|
78
77
|
:roadDirection="roadDirection" />
|
|
79
78
|
</div>
|
|
80
79
|
</div>
|
|
@@ -140,7 +139,6 @@ export default {
|
|
|
140
139
|
stateName: this.$t('openatccomponents.overview.offline'),
|
|
141
140
|
curBodyWidth: 1920,
|
|
142
141
|
graphicMode: false,
|
|
143
|
-
FuncSort: 'allFunc',
|
|
144
142
|
controlData: {},
|
|
145
143
|
checked: false,
|
|
146
144
|
overlap: [],
|
|
@@ -155,7 +153,7 @@ export default {
|
|
|
155
153
|
volumeControlTimer: null, // 流量定时器
|
|
156
154
|
ParamsMode: new Map([[0, '自主控制'], [1, '本地手动'], [2, '平台控制'], [3, '配置软件控制'], [4, '遥控器控制'], [5, '黄闪器控制'], [6, '降级控制'], [7, '脚本控制'], [8, '算法控制']]),
|
|
157
155
|
ParamsModeEn: new Map([[0, 'Autonomous Control'], [1, 'Local Manual'], [2, 'Platform Control'], [3, 'Configuration Software Control'], [4, 'Remote Control'], [5, 'Yellow Flasher Control'], [6, 'Degradation Control'], [7, 'Script Control'], [8, 'Algorithm Control']]),
|
|
158
|
-
ParamsControl: new Map([[0, '多时段'], [1, '黄闪'], [2, '全红'], [3, '关灯'], [4, '步进'], [5, '定周期控制'], [6, '
|
|
156
|
+
ParamsControl: new Map([[0, '多时段'], [1, '黄闪'], [2, '全红'], [3, '关灯'], [4, '步进'], [5, '定周期控制'], [6, '自适应'], [7, '协调感应控制'], [8, '方案选择控制'], [9, '方案生成'], [10, '无电缆控制'], [11, '有电缆控制'], [12, '行人过街控制'], [13, '方案恢复过渡'], [14, '相位驻留'], [15, '通道检测'], [16, '方向锁定'], [17, '韦伯斯特单点控制'], [18, '预留18'], [19, '感应式行人过街'], [20, '方案干预'], [100, '方案干预'], [21, '预留21'], [22, '相位锁定'], [23, '相位放行控制'], [24, '紧急控制'], [99, '设备维护']]),
|
|
159
157
|
ParamsControlEn: new Map([[0, 'Multi Period'], [1, 'Yellow Flash Control'], [2, 'Red Control'], [3, 'Dark Control'], [4, 'Step'], [5, 'Fixed_Cycle Control'], [6, 'Free Control'], [7, 'Coordinated Induction Control'], [8, 'Pattern Selection Control'], [9, 'Adaptive Control'], [10, 'Wireless Control'], [11, 'Cable Control'], [12, 'Pedestrian Crossing Control'], [13, 'Pattern recovery'], [14, 'Phase dwell'], [15, 'Channel Detection'], [16, 'Direction lock'], [17, 'Webster Single Point Coordination'], [18, 'Reserving18'], [19, 'Inductive Pedestrian Crossing Control'], [20, 'Program Intervention'], [100, 'Program Intervention'], [21, 'Reserving21'], [22, 'Priority Control'], [23, 'Close Phase'], [24, 'Emergency Control'], [99, 'Device Mantenance']]),
|
|
160
158
|
phaseType: new Map([[1, '红'], [2, '黄'], [3, '绿']]), // phaseType表示红,黄,绿
|
|
161
159
|
phaseTypeEn: new Map([[1, 'Red'], [2, 'Yellow'], [3, 'Green']]), // phaseType表示红,黄,绿
|
|
@@ -184,7 +182,6 @@ export default {
|
|
|
184
182
|
...mapState({
|
|
185
183
|
// curBodyWidth: state => state.globalParam.curBodyWidth,
|
|
186
184
|
curBodyHeight: state => state.globalParam.curBodyHeight,
|
|
187
|
-
// FuncSort: state => state.globalParam.FuncSort,
|
|
188
185
|
hideMenu: state => state.globalParam.hideMenu
|
|
189
186
|
// graphicMode: state => state.globalParam.graphicMode
|
|
190
187
|
// isShowGui: state => state.globalParam.isShowGui,
|
|
@@ -613,12 +610,6 @@ export default {
|
|
|
613
610
|
this.agentName = res.data.data.name
|
|
614
611
|
}
|
|
615
612
|
this.platform = res.data.data.platform
|
|
616
|
-
if (this.platform === 'OpenATC') {
|
|
617
|
-
this.FuncSort = 'allFunc'
|
|
618
|
-
}
|
|
619
|
-
if (this.platform === 'SCATS' || this.platform === 'HUATONG') {
|
|
620
|
-
this.FuncSort = 'basicFunc'
|
|
621
|
-
}
|
|
622
613
|
this.$refs.intersectionMap.resetCrossDiagram()
|
|
623
614
|
this.registerMessage() // 注册消息
|
|
624
615
|
this.initData()
|
|
@@ -663,20 +654,6 @@ export default {
|
|
|
663
654
|
} else {
|
|
664
655
|
this.stateName = this.$t('openatccomponents.overview.offline')
|
|
665
656
|
}
|
|
666
|
-
// let func = 'allFunc'
|
|
667
|
-
// if (this.platform === 'OpenATC') {
|
|
668
|
-
// func = 'allFunc'
|
|
669
|
-
// }
|
|
670
|
-
// if (this.platform === 'SCATS' || this.platform === 'HUATONG') {
|
|
671
|
-
// func = 'basicFunc'
|
|
672
|
-
// }
|
|
673
|
-
// this.$store.dispatch('SaveFunctionLevel', func)
|
|
674
|
-
if (this.platform === 'OpenATC') {
|
|
675
|
-
this.FuncSort = 'allFunc'
|
|
676
|
-
}
|
|
677
|
-
if (this.platform === 'SCATS' || this.platform === 'HUATONG') {
|
|
678
|
-
this.FuncSort = 'basicFunc'
|
|
679
|
-
}
|
|
680
657
|
})
|
|
681
658
|
},
|
|
682
659
|
isJsonString (str) {
|
|
@@ -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
|
:patternStatusList="patternStatusList"
|
|
@@ -542,9 +541,6 @@ export default {
|
|
|
542
541
|
patternStatusList: {
|
|
543
542
|
type: Array
|
|
544
543
|
},
|
|
545
|
-
patternType: {
|
|
546
|
-
type: String
|
|
547
|
-
},
|
|
548
544
|
patternId: {
|
|
549
545
|
type: Number
|
|
550
546
|
},
|