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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openatc-components",
3
- "version": "0.3.112",
3
+ "version": "0.3.113",
4
4
  "description": "A Vue.js project",
5
5
  "author": "openatc developer",
6
6
  "private": false,
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Copyright (c) 2020 kedacom
3
+ * OpenATC is licensed under Mulan PSL v2.
4
+ * You can use this software according to the terms and conditions of the Mulan PSL v2.
5
+ * You may obtain a copy of Mulan PSL v2 at:
6
+ * http://license.coscl.org.cn/MulanPSL2
7
+ * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
8
+ * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
9
+ * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
10
+ * See the Mulan PSL v2 for more details.
11
+ **/
12
+ import Authapi from './authapi'
13
+
14
+ export const GetPermissionById = (id) => {
15
+ let api = new Authapi('getPermission')
16
+
17
+ let paramList = [id, 'permissions']
18
+
19
+ return api.Send({}, {}, paramList)
20
+ }
21
+
22
+ export const GetRoleByName = (roleName) => {
23
+ let api = new Authapi('getRoleByName')
24
+
25
+ let argList = [roleName, 'permissions']
26
+
27
+ return api.Send({}, {}, argList)
28
+ }
29
+
30
+ export default {
31
+ GetPermissionById,
32
+ GetRoleByName
33
+ }
@@ -1065,6 +1065,15 @@ const en = {
1065
1065
  'opensourceagreement': 'Opensource Agreement'
1066
1066
  },
1067
1067
  'message': {
1068
+ // 全局异常错误
1069
+ '0001': 'Null pointer',
1070
+ '0002': 'Wrong request method',
1071
+ '0003': 'Incorrect input parameter type',
1072
+ '0004': 'Incomplete input parameters',
1073
+ '0005': 'Input parameters do not meet constraints',
1074
+ '0006': 'system error',
1075
+ '0007': 'Empty Name',
1076
+ '0008': 'Service Expired !',
1068
1077
  'errorcode': 'Error code',
1069
1078
  '10000': 'Parameter is empty',
1070
1079
  '10001': 'Parameter length error',
@@ -1078,13 +1087,6 @@ const en = {
1078
1087
  '20008': 'File read failed!',
1079
1088
  '20009': 'File does not exist!',
1080
1089
  '20010': 'I/O close mistake!',
1081
- // 全局异常错误
1082
- '0001': 'Null pointer',
1083
- '0002': 'Wrong request method',
1084
- '0003': 'Incorrect input parameter type',
1085
- '0004': 'Incomplete input parameters',
1086
- '0005': 'Input parameters do not meet constraints',
1087
- '0006': 'system error',
1088
1090
  // 用户管理错误
1089
1091
  '3001': 'Username does not exist',
1090
1092
  '3002': 'Authentication failed',
@@ -1111,6 +1113,7 @@ const en = {
1111
1113
  '3024': 'The current user has not been created!',
1112
1114
  '3025': 'Token is not enabled!',
1113
1115
  '3026': 'The role has associated users!',
1116
+ '3027': 'The character does not exist!',
1114
1117
  // 消息通讯错误
1115
1118
  '4001': 'Error Request',
1116
1119
  '4002': 'Error Response',
@@ -211,7 +211,7 @@ const zh = {
211
211
  'phasewalk': '行人过街',
212
212
  'websteroptimization': 'Webster单点优化',
213
213
  'inductivePedestrianCrossControl': '感应式行人过街控制',
214
- 'selfadaption': '自适应控制',
214
+ 'selfadaption': '方案生成',
215
215
  'custom': '自定义',
216
216
  'controlmodevalue': '控制方式数值',
217
217
  'patternstate': '方案状态',
@@ -250,10 +250,10 @@ const zh = {
250
250
  'modelList4': '步进',
251
251
  'modelList4-': '阶段锁定',
252
252
  'modelList5': '定周期',
253
- 'modelList6': '单点感应',
253
+ 'modelList6': '自适应',
254
254
  'modelList7': '协调感应控制',
255
255
  'modelList8': '方案选择控制',
256
- 'modelList9': '自适应控制',
256
+ 'modelList9': '方案生成',
257
257
  'modelList10': '无电缆协调',
258
258
  'modelList11': '平台协调',
259
259
  'modelList12': '行人过街',
@@ -498,8 +498,8 @@ const zh = {
498
498
  'ControlOption3': '关灯',
499
499
  'ControlOption4': '步进',
500
500
  'ControlOption5': '定周期控制',
501
- 'ControlOption6': '单点感应控制',
502
- 'ControlOption9': '自适应控制',
501
+ 'ControlOption6': '自适应',
502
+ 'ControlOption9': '方案生成',
503
503
  'ControlOption10': '无电缆控制',
504
504
  'ControlOption12': '行人过街控制',
505
505
  'ControlOption19': '感应式行人过街控制',
@@ -1065,6 +1065,15 @@ const zh = {
1065
1065
  'opensourceagreement': '开源协议'
1066
1066
  },
1067
1067
  'message': {
1068
+ // 全局异常错误
1069
+ '0001': '空指针',
1070
+ '0002': '错误请求方式',
1071
+ '0003': '输入参数类型不正确',
1072
+ '0004': '输入参数不全',
1073
+ '0005': '输入参数不满足约束',
1074
+ '0006': '系统错误',
1075
+ '0007': '名称为空',
1076
+ '0008': '服务过期 !',
1068
1077
  'errorcode': '错误码',
1069
1078
  '10000': '参数为空',
1070
1079
  '10001': '参数长度错误',
@@ -1078,13 +1087,6 @@ const zh = {
1078
1087
  '20008': '文件读取失败!',
1079
1088
  '20009': '文件不存在!',
1080
1089
  '20010': 'I/O关闭错误!',
1081
- // 全局异常错误
1082
- '0001': '空指针',
1083
- '0002': '错误请求方式',
1084
- '0003': '输入参数类型不正确',
1085
- '0004': '输入参数不全',
1086
- '0005': '输入参数不满足约束',
1087
- '0006': '系统错误',
1088
1090
  // 用户管理错误
1089
1091
  '3001': '用户名不存在',
1090
1092
  '3002': '认证失败',
@@ -1111,6 +1113,7 @@ const zh = {
1111
1113
  '3024': '当前用户没有被创建!',
1112
1114
  '3025': 'token未启用!',
1113
1115
  '3026': '角色存在关联的用户!',
1116
+ '3027': '角色不存在!',
1114
1117
  // 消息通讯错误
1115
1118
  '4001': '错误请求',
1116
1119
  '4002': '错误应答',
@@ -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, '单点感应控制'], [7, '协调感应控制'], [8, '方案选择控制'], [9, '自适应控制'], [10, '无电缆控制'], [11, '有电缆控制'], [12, '行人过街控制'], [13, '方案恢复过渡'], [14, '相位驻留'], [15, '通道检测'], [16, '方向锁定'], [17, '韦伯斯特单点控制'], [18, '预留18'], [19, '感应式行人过街'], [20, '方案干预'], [100, '方案干预'], [21, '预留21'], [22, '相位锁定'], [23, '相位放行控制'], [24, '紧急控制'], [99, '设备维护']]),
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="(this.contrloType === 'ring' || !this.contrloType) && patternType !== 'rcp'">
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 = 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, '单点感应控制'], [7, '协调感应控制'], [8, '方案选择控制'], [9, '自适应控制'], [10, '无电缆控制'], [11, '有电缆控制'], [12, '行人过街控制'], [13, '方案恢复过渡'], [14, '相位驻留'], [15, '通道检测'], [16, '方向锁定'], [17, '韦伯斯特单点控制'], [18, '预留18'], [19, '感应式行人过街'], [20, '方案干预'], [100, '方案干预'], [21, '预留21'], [22, '相位锁定'], [23, '相位放行控制'], [24, '紧急控制'], [99, '设备维护']]),
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 === '') {
@@ -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 === 'basicFunc'&& basicFuncControlId.indexOf(item.id) !== -1))">
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, 22, 100, 24, 25],
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' && funcSort === 'allFunc'"
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: {},