openatc-components 0.1.17 → 0.1.19

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.
@@ -243,42 +243,52 @@ export default {
243
243
  modelList: [{
244
244
  id: 1,
245
245
  iconClass: 'huangshan',
246
+ permission: 'configer:manual:senior',
246
247
  iconName: '黄闪'
247
248
  }, {
248
249
  id: 2,
249
250
  iconClass: 'quanhong',
251
+ permission: 'configer:manual:senior',
250
252
  iconName: '全红'
251
253
  }, {
252
254
  id: 3,
253
255
  iconClass: 'guandeng',
256
+ permission: 'configer:manual:senior',
254
257
  iconName: '关灯'
255
258
  }, {
256
259
  id: 4,
257
260
  iconClass: 'bujin',
261
+ permission: 'configer:manual:dwell',
258
262
  iconName: '步进'
259
263
  }, {
260
264
  id: 5,
261
265
  iconClass: 'dingzhouqi',
266
+ permission: 'configer:manual:base',
262
267
  iconName: '定周期'
263
268
  }, {
264
269
  id: 6,
265
270
  iconClass: 'ganyingkongzhi',
271
+ permission: 'configer:manual:base',
266
272
  iconName: '感应控制'
267
273
  }, {
268
274
  id: 9,
269
275
  iconClass: 'zishiying',
276
+ permission: 'configer:manual:base',
270
277
  iconName: '自适应控制'
271
278
  }, {
272
279
  id: 10,
273
280
  iconClass: 'wuxianlan',
281
+ permission: 'configer:manual:base',
274
282
  iconName: '无电缆协调'
275
283
  }, {
276
284
  id: 12,
277
285
  iconClass: 'xingrenguojie',
286
+ permission: 'configer:manual:base',
278
287
  iconName: '行人过街'
279
288
  }, {
280
289
  id: 19,
281
290
  iconClass: 'ganyingshixingrenguojie',
291
+ permission: 'configer:manual:base',
282
292
  iconName: '感应式行人过街控制'
283
293
  }],
284
294
  currModel: -1,
@@ -295,15 +305,19 @@ export default {
295
305
  toPage: 1, // 与哪一个页面交互,1 代表路口信息页面,3代表 相位关断页面
296
306
  specialcontrolList: [{ // 特殊控制
297
307
  id: 23,
308
+ permission: 'configer:manual:optimize',
298
309
  iconClass: 'closephase'
299
310
  }, {
300
311
  id: 22,
312
+ permission: 'configer:manual:optimize',
301
313
  iconClass: 'lockingphase'
302
314
  }, {
303
315
  id: 100,
316
+ permission: 'configer:manual:optimize',
304
317
  iconClass: 'tentativeplan'
305
318
  }, {
306
319
  id: 24,
320
+ permission: 'configer:manual:preempt',
307
321
  iconClass: 'tentativeplan'
308
322
  }],
309
323
  phaseRings: [],
@@ -443,6 +457,7 @@ export default {
443
457
  let autonomyControl = {
444
458
  id: 0,
445
459
  iconClass: 'zizhukongzhi',
460
+ permission: 'configer:manual:renew',
446
461
  iconName: '自主控制'
447
462
  }
448
463
  this.modelList.push(autonomyControl)
@@ -50,9 +50,9 @@
50
50
  <div style="width: 100%; overflow: hidden;">
51
51
  <div class="control-model" v-for="(item, index) in modelList" :key="index">
52
52
  <div class="single-model"
53
- @click="selectModel(item.id)"
54
- :class="(preselectModel == item.id && preselectStages == -1)? 'single-model-select' : ''"
55
- v-if="funcSort === 'allFunc' || (funcSort === 'basicFunc'&& basicFuncControlId.indexOf(item.id) !== -1)">
53
+ @click="selectModel(item.id)"
54
+ :class="(preselectModel == item.id && preselectStages == -1)? 'single-model-select' : ''"
55
+ v-if="isHasPermission(item.permission) && (funcSort === 'allFunc' || (funcSort === 'basicFunc'&& basicFuncControlId.indexOf(item.id) !== -1))">
56
56
  <svg-icon :icon-class="item.iconClass" className="model-icon"></svg-icon>
57
57
  <div class="single-model-name">{{$t('openatccomponents.overview.modelList' + item.id)}}</div>
58
58
  </div>
@@ -68,7 +68,7 @@
68
68
  <div class="stage-label" v-if="funcSort === 'allFunc'">{{$t('openatccomponents.overview.specialcontrol')}}:</div>
69
69
  <div style="width: 100%; height: auto;overflow: hidden;" v-if="funcSort === 'allFunc'">
70
70
  <div class="control-model" v-for="(item, index) in specialcontrolList" :key="index">
71
- <div class="single-model" @click="selectSpecialStages(item.id)">
71
+ <div class="single-model" @click="selectSpecialStages(item.id)" v-if="isHasPermission(item.permission)">
72
72
  <svg-icon :icon-class="item.iconClass" className="closephase-icon"></svg-icon>
73
73
  <div class="single-model-name">{{$t('openatccomponents.overview.modelList' + item.id)}}</div>
74
74
  </div>
@@ -88,6 +88,7 @@
88
88
  <script>
89
89
  import xdrdirselector from '../../XRDDirSelector/XRDDirSelector'
90
90
  import Stages from '../../Stages/index'
91
+ import { hasPermission } from '../../../../utils/auth'
91
92
  export default {
92
93
  name: 'manualControl',
93
94
  components: {
@@ -175,6 +176,10 @@ export default {
175
176
  }
176
177
  },
177
178
  methods: {
179
+ isHasPermission (path) {
180
+ let res = hasPermission(path)
181
+ return res
182
+ },
178
183
  changeStage (value) {
179
184
  if (value) {
180
185
  this.manualsStage = {}
@@ -82,6 +82,7 @@
82
82
  type="primary"
83
83
  style="float: right; margin-right: 20px;margin-top: 40px;"
84
84
  size="mini"
85
+ v-if="isHasPermission('configer:manual') && isHasPermission('configer:manual:renew')"
85
86
  @click="changeStatus"
86
87
  >{{$t('openatccomponents.overview.manual')}}</el-button>
87
88
  <!-- <el-button type="primary" style="float: right; margin-right: 40px;" size="mini" @click="changeStatus" v-show="isOperation">{{$t('openatccomponents.overview.exitmanual')}}</el-button> -->
@@ -175,6 +176,7 @@
175
176
 
176
177
  <script>
177
178
  import xdrdirselector from '../../XRDDirSelector/XRDDirSelector'
179
+ import { hasPermission } from '../../../../utils/auth'
178
180
  export default {
179
181
  name: 'realtimestatus',
180
182
  components: {
@@ -255,6 +257,10 @@ export default {
255
257
  }
256
258
  },
257
259
  methods: {
260
+ isHasPermission (path) {
261
+ let res = hasPermission(path)
262
+ return res
263
+ },
258
264
  onSelectStages (val) {},
259
265
  changeStatus () {
260
266
  this.$emit('changeStatus')