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.
Files changed (29) hide show
  1. package/package/kisscomps/components/BoardCard/BoardCard.vue +0 -4
  2. package/package/kisscomps/components/OverviewComponent/index.vue +2 -12
  3. package/package/kisscomps/components/PatternStatus/PatternStatus.vue +2 -82
  4. package/package/kisscomps/components/SchemeConfig/SchemeConfig.vue +31 -9
  5. package/package/kisscomps/components/SchemeConfig/manualControlModalNew/controlModelGroup.vue +6 -4
  6. package/package/kisscomps/components/SchemeConfig/manualControlModalNew/icon.vue +2 -2
  7. package/package/kisscomps/components/SchemeConfig/manualControlModalNew/index.vue +19 -12
  8. package/package/kisscomps/components/SchemeConfig/utils/thirdPartypermission.js +95 -0
  9. package/package/kisscomps/components/overView/index.vue +1 -24
  10. package/package/kisscomps/components/patternList/patternList.vue +0 -4
  11. package/package/kissui.min.js +1 -1
  12. package/package.json +1 -1
  13. package/src/api/permission.js +33 -0
  14. package/src/i18n/language/en.js +10 -7
  15. package/src/i18n/language/zh.js +15 -12
  16. package/src/kisscomps/components/BoardCard/BoardCard.vue +0 -4
  17. package/src/kisscomps/components/OverviewComponent/index.vue +2 -12
  18. package/src/kisscomps/components/PatternStatus/PatternStatus.vue +2 -82
  19. package/src/kisscomps/components/SchemeConfig/SchemeConfig.vue +31 -9
  20. package/src/kisscomps/components/SchemeConfig/manualControlModalNew/controlModelGroup.vue +6 -4
  21. package/src/kisscomps/components/SchemeConfig/manualControlModalNew/icon.vue +2 -2
  22. package/src/kisscomps/components/SchemeConfig/manualControlModalNew/index.vue +19 -12
  23. package/src/kisscomps/components/SchemeConfig/utils/thirdPartypermission.js +95 -0
  24. package/src/kisscomps/components/overView/index.vue +1 -24
  25. package/src/kisscomps/components/patternList/patternList.vue +0 -4
  26. package/src/utils/ControlFormat.js +1 -1
  27. package/src/views/intersection.vue +1 -1
  28. package/src/views/overView.vue +1 -1
  29. package/static/apiconfig.json +10 -0
@@ -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, '单点感应控制'], [7, '协调感应控制'], [8, '方案选择控制'], [9, '自适应控制'], [10, '无电缆控制'], [11, '有电缆控制'], [12, '行人过街控制'], [13, '方案恢复过渡'], [14, '相位驻留'], [15, '通道检测'], [16, '方向锁定'], [17, '韦伯斯特单点控制'], [18, '预留18'], [19, '感应式行人过街'], [20, '方案干预'], [100, '方案干预'], [21, '预留21'], [22, '相位锁定'], [23, '相位放行控制'], [24, '紧急控制'], [99, '设备维护']]),
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
  },
@@ -14,7 +14,7 @@ export default class ControlFormat {
14
14
  constructor (crossStatusData, phaseList) {
15
15
  this.ParamsMode = new Map([[0, '自主控制'], [1, '本地手动'], [2, '平台控制'], [3, '配置软件控制'], [4, '遥控器控制'], [5, '黄闪器控制'], [6, '降级控制'], [7, '脚本控制'], [8, '算法控制']])
16
16
  this.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']])
17
- this.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, '设备维护']])
17
+ this.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, '设备维护']])
18
18
  this.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']])
19
19
  this.phaseType = new Map([[1, '红'], [2, '黄'], [3, '绿']]) // phaseType表示红,黄,绿
20
20
  this.phaseTypeEn = new Map([[1, 'Red'], [2, 'Yellow'], [3, 'Green']]) // phaseType表示红,黄,绿
@@ -166,7 +166,7 @@ export default {
166
166
  // agentId: '12007_390',
167
167
  // agentId: '12014',
168
168
  reqUrl: 'http://192.168.13.103:10003/openatc',
169
- Token: 'eyJraWQiOiIxNzIxOTc3OTkzMTY4IiwidHlwIjoiSldUIiwiYWxnIjoiSFMyNTYifQ.eyJzdWIiOiJhZG1pbiIsImV4cCI6MTcyMTk4MTU5MywiaWF0IjoxNzIxOTc0MzkzfQ.vjgAFMJlM4FEHxT9K9lJQ_VsUx1fDubr4tYgMaVffS0',
169
+ Token: 'eyJraWQiOiIxNzM0MDc1MTI0MjczIiwidHlwIjoiSldUIiwiYWxnIjoiSFMyNTYifQ.eyJzdWIiOiJhZG1pbiIsImV4cCI6MTczNDA3ODcyNCwiaWF0IjoxNzM0MDcxNTI0fQ.KixCOm8CIbS10UYc0djLAr-NCg24S5ftHM384yweVVU',
170
170
  // agentId: '30003-352',
171
171
  // reqUrl: 'https://kints-dev.devdolphin.com/openatc',
172
172
  // Token: 'eyJraWQiOiIxNjUwNTA5MDI2ODk2IiwidHlwIjoiSldUIiwiYWxnIjoiSFMyNTYifQ.eyJzdWIiOiJ4aWFvbWluZyIsImV4cCI6MTczNjkwOTAyNiwiaWF0IjoxNjUwNTA5MDI2fQ.-s4T-uMRmB2zf9yer87USKQXLY1a12Zq5lCOnqjNmfA',
@@ -19,7 +19,7 @@ export default {
19
19
  isShowMode: true,
20
20
  modeName: '交警遥控',
21
21
  controlName: '步进',
22
- agentId: 'jmlxhl',
22
+ agentId: 'stao',
23
23
  Token: 'eyJraWQiOiIxNzA4OTA5NDk2ODcxIiwidHlwIjoiSldUIiwiYWxnIjoiSFMyNTYifQ.eyJzdWIiOiJhZG1pbiIsImV4cCI6MTcwODk1MjY5NiwiaWF0IjoxNzA4OTA5NDk2fQ.FI0gzBQFLyQsj95LG56lVZxb6WYlr2-datNsyv6fF-I',
24
24
  reqUrl: 'http://192.168.13.103:10003/openatc'
25
25
  }
@@ -447,5 +447,15 @@
447
447
  "key": "getDetectorStatus",
448
448
  "url": "/devs/detectorstatus",
449
449
  "method": "get"
450
+ },
451
+ {
452
+ "key": "getRoleByName",
453
+ "url": "/auth/role/rolename",
454
+ "method": "get"
455
+ },
456
+ {
457
+ "key": "getPermission",
458
+ "url": "/auth/role/",
459
+ "method": "get"
450
460
  }
451
461
  ]