openatc-components 0.3.104 → 0.3.106
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/SchemeConfig/SchemeConfig.vue +2 -1
- package/package/kisscomps/components/SchemeConfig/manualControlModalNew/controlModelGroup.vue +2 -3
- package/package/kisscomps/components/SchemeConfig/manualControlModalNew/index.vue +5 -11
- package/package/kisscomps/components/SchemeConfig/utils/thirdPartypermission.js +41 -15
- package/package/kissui.min.js +1 -1
- package/package.json +1 -1
- package/src/kisscomps/components/SchemeConfig/SchemeConfig.vue +2 -1
- package/src/kisscomps/components/SchemeConfig/manualControlModalNew/controlModelGroup.vue +2 -3
- package/src/kisscomps/components/SchemeConfig/manualControlModalNew/index.vue +5 -11
- package/src/kisscomps/components/SchemeConfig/utils/thirdPartypermission.js +41 -15
- package/src/views/intersection.vue +1 -1
|
@@ -632,8 +632,9 @@ export default {
|
|
|
632
632
|
return
|
|
633
633
|
}
|
|
634
634
|
this.funcSort = 'thirdPartyFunc'
|
|
635
|
-
this.thirdPartyControlMenu = getPermissionMenu(res.data.data)
|
|
636
635
|
this.thirdPartyControl = getPermissionControl(res.data.data)
|
|
636
|
+
this.thirdPartyControlMenu = getPermissionMenu(this.thirdPartyControl)
|
|
637
|
+
this.$refs.ManualControlModalNew.activeName = this.thirdPartyControlMenu[0]
|
|
637
638
|
})
|
|
638
639
|
},
|
|
639
640
|
handleGetData (data) {
|
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>
|
|
@@ -79,8 +79,7 @@ export default {
|
|
|
79
79
|
return {
|
|
80
80
|
preselecttype: '',
|
|
81
81
|
controllist: [],
|
|
82
|
-
specialControl: [23,
|
|
83
|
-
basicFuncControlId: [0, 1, 4, 5] // 基础功能包含的控制方式: 自主控制(手动下)、黄闪、步进、定周期
|
|
82
|
+
specialControl: [23, 24, 100]
|
|
84
83
|
}
|
|
85
84
|
},
|
|
86
85
|
computed: {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<div class="manual-control-modal-new">
|
|
14
14
|
<el-tabs v-model="activeName" type="card" @tab-click="handleClick">
|
|
15
15
|
<el-tab-pane :label="$t('openatccomponents.overview.residentcontrol')" name="residentcontrol"
|
|
16
|
-
v-if="(funcSort === 'allFunc' || (funcSort === 'thirdPartyFunc'&& thirdPartyControlMenu.indexOf('
|
|
16
|
+
v-if="(funcSort === 'allFunc' || (funcSort === 'thirdPartyFunc'&& thirdPartyControlMenu.indexOf('residentcontrol') !== -1))">
|
|
17
17
|
<ControlModelGroup
|
|
18
18
|
v-if="activeName === 'residentcontrol'"
|
|
19
19
|
ref="ControlModelGroup"
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
</div>
|
|
84
84
|
</el-tab-pane>
|
|
85
85
|
<el-tab-pane :label="$t('openatccomponents.overview.specialcontrol')" name="specialcontrol"
|
|
86
|
-
v-if="(funcSort === 'allFunc' || (funcSort === 'thirdPartyFunc'&& thirdPartyControlMenu.indexOf('
|
|
86
|
+
v-if="(funcSort === 'allFunc' || (funcSort === 'thirdPartyFunc'&& thirdPartyControlMenu.indexOf('specialcontrol') !== -1))">
|
|
87
87
|
<ControlModelGroup
|
|
88
88
|
v-if="activeName === 'specialcontrol'"
|
|
89
89
|
ref="ControlModelGroup"
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
|
|
118
118
|
</el-tab-pane>
|
|
119
119
|
<el-tab-pane :label="$t('openatccomponents.overview.schemeselection')" name="schemeselection"
|
|
120
|
-
v-if="(funcSort === 'allFunc' || (funcSort === 'thirdPartyFunc'&& thirdPartyControlMenu.indexOf('
|
|
120
|
+
v-if="(funcSort === 'allFunc' || (funcSort === 'thirdPartyFunc'&& thirdPartyControlMenu.indexOf('schemeselection') !== -1))">
|
|
121
121
|
<ControlModelGroup
|
|
122
122
|
v-if="activeName === 'schemeselection'"
|
|
123
123
|
ref="ControlModelGroup"
|
|
@@ -184,9 +184,9 @@
|
|
|
184
184
|
</div>
|
|
185
185
|
</el-tab-pane>
|
|
186
186
|
<el-tab-pane :label="$t('openatccomponents.overview.others')" name="others"
|
|
187
|
-
v-if="(funcSort === 'allFunc' || (funcSort === 'thirdPartyFunc'&& thirdPartyControlMenu.indexOf('
|
|
187
|
+
v-if="(funcSort === 'allFunc' || (funcSort === 'thirdPartyFunc'&& thirdPartyControlMenu.indexOf('others') !== -1))">
|
|
188
188
|
<ControlModelGroup
|
|
189
|
-
v-if="activeName === 'others'
|
|
189
|
+
v-if="activeName === 'others'"
|
|
190
190
|
ref="ControlModelGroup"
|
|
191
191
|
className="otherscontrol"
|
|
192
192
|
othersControl
|
|
@@ -365,12 +365,6 @@ export default {
|
|
|
365
365
|
}
|
|
366
366
|
},
|
|
367
367
|
watch: {
|
|
368
|
-
activeName: {
|
|
369
|
-
handler: function (val) {
|
|
370
|
-
},
|
|
371
|
-
// 深度观察监听
|
|
372
|
-
deep: true
|
|
373
|
-
},
|
|
374
368
|
patternSelect: {
|
|
375
369
|
handler: function (val) {
|
|
376
370
|
this.manualInfo.tempPatternid = this.crossStatusData.patternid
|
|
@@ -1,13 +1,21 @@
|
|
|
1
|
-
const permissionMenuMap = new Map([[
|
|
2
|
-
|
|
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]
|
|
3
12
|
], [
|
|
4
|
-
'configer:manual:senior', [
|
|
13
|
+
'configer:manual:senior', [1, 2, 3]
|
|
5
14
|
], [
|
|
6
|
-
'configer:manual:base', [
|
|
15
|
+
'configer:manual:base', [5, 6, 9, 10, 12, 19]
|
|
16
|
+
], [
|
|
17
|
+
'configer:manual:optimize', [23, 100, 24]
|
|
7
18
|
], [
|
|
8
|
-
'configer:manual:optimize', ['其他']
|
|
9
|
-
]])
|
|
10
|
-
const permissionControlMap = new Map([[
|
|
11
19
|
'configer:manual:dwell:step', [4]
|
|
12
20
|
], [
|
|
13
21
|
'configer:manual:dwell:stage', [4]
|
|
@@ -41,17 +49,35 @@ const permissionControlMap = new Map([[
|
|
|
41
49
|
'configer:manual:optimize:preempt', [24]
|
|
42
50
|
]])
|
|
43
51
|
|
|
44
|
-
export function getPermissionMenu (
|
|
52
|
+
export function getPermissionMenu (thirdPartyControl) {
|
|
45
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
|
|
46
63
|
let thirdPartyControlMenu = []
|
|
47
|
-
for (let i = 0; i <
|
|
48
|
-
let
|
|
49
|
-
if (
|
|
50
|
-
thirdPartyControlMenu = thirdPartyControlMenu.concat(
|
|
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'])
|
|
51
77
|
}
|
|
52
78
|
}
|
|
53
|
-
|
|
54
|
-
|
|
79
|
+
thirdPartyControlMenu = [...new Set(thirdPartyControlMenu)]
|
|
80
|
+
// console.log(thirdPartyControlMenu)
|
|
55
81
|
return thirdPartyControlMenu
|
|
56
82
|
}
|
|
57
83
|
|
|
@@ -64,6 +90,6 @@ export function getPermissionControl (permissionList) {
|
|
|
64
90
|
thirdPartyControl = thirdPartyControl.concat(permissionControlMap.get(per))
|
|
65
91
|
}
|
|
66
92
|
}
|
|
67
|
-
console.log(thirdPartyControl)
|
|
93
|
+
// console.log(thirdPartyControl)
|
|
68
94
|
return thirdPartyControl
|
|
69
95
|
}
|