openatc-components 0.3.99 → 0.3.101

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 (55) hide show
  1. package/config/index.js +1 -0
  2. package/package/kisscomps/components/BoardCard/BoardCard.vue +0 -11
  3. package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/motorwayIconSvg.vue +145 -46
  4. package/package/kisscomps/components/DrawChannelization/drawsvg/index.draw.vue +4 -4
  5. package/package/kisscomps/components/IntersectionMap/crossDirection/crossDiagram.vue +7 -3
  6. package/package/kisscomps/components/IntersectionMap/intersectionmap.vue +5 -0
  7. package/package/kisscomps/components/IntersectionWithInterface/IntersectionWithInterface.vue +17 -12
  8. package/package/kisscomps/components/OverviewComponent/index.vue +30 -33
  9. package/package/kisscomps/components/PatternOptimize/PatternOptimize.vue +2 -11
  10. package/package/kisscomps/components/PatternStatus/PatternStatus.vue +33 -92
  11. package/package/kisscomps/components/SchemeConfig/SchemeConfig.vue +31 -13
  12. package/package/kisscomps/components/SchemeConfig/lockingPhaselControlModal/index.vue +11 -9
  13. package/package/kisscomps/components/SchemeConfig/manualControlModalNew/controlModelGroup.vue +6 -2
  14. package/package/kisscomps/components/SchemeConfig/manualControlModalNew/index.vue +19 -6
  15. package/package/kisscomps/components/SchemeConfig/utils/thirdPartypermission.js +68 -0
  16. package/package/kisscomps/components/overView/index.vue +0 -23
  17. package/package/kisscomps/components/patternConfig/index.vue +1 -1
  18. package/package/kisscomps/components/patternConfig/pattern/patternTable.vue +33 -13
  19. package/package/kisscomps/components/patternConfig/planContent.vue +3 -3
  20. package/package/kisscomps/components/patternList/patternList.vue +0 -11
  21. package/package/kissui.min.js +1 -1
  22. package/package.json +1 -1
  23. package/src/api/permission.js +33 -0
  24. package/src/i18n/language/en.js +3 -4
  25. package/src/i18n/language/zh.js +3 -4
  26. package/src/kisscomps/components/BoardCard/BoardCard.vue +0 -11
  27. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/motorwayIconSvg.vue +145 -46
  28. package/src/kisscomps/components/DrawChannelization/drawsvg/index.draw.vue +4 -4
  29. package/src/kisscomps/components/IntersectionMap/crossDirection/crossDiagram.vue +7 -3
  30. package/src/kisscomps/components/IntersectionMap/intersectionmap.vue +5 -0
  31. package/src/kisscomps/components/IntersectionWithInterface/IntersectionWithInterface.vue +17 -12
  32. package/src/kisscomps/components/OverviewComponent/index.vue +30 -33
  33. package/src/kisscomps/components/PatternOptimize/PatternOptimize.vue +2 -11
  34. package/src/kisscomps/components/PatternStatus/PatternStatus.vue +33 -92
  35. package/src/kisscomps/components/SchemeConfig/SchemeConfig.vue +31 -13
  36. package/src/kisscomps/components/SchemeConfig/lockingPhaselControlModal/index.vue +11 -9
  37. package/src/kisscomps/components/SchemeConfig/manualControlModalNew/controlModelGroup.vue +6 -2
  38. package/src/kisscomps/components/SchemeConfig/manualControlModalNew/index.vue +19 -6
  39. package/src/kisscomps/components/SchemeConfig/utils/thirdPartypermission.js +68 -0
  40. package/src/kisscomps/components/overView/index.vue +0 -23
  41. package/src/kisscomps/components/patternConfig/index.vue +1 -1
  42. package/src/kisscomps/components/patternConfig/pattern/patternTable.vue +33 -13
  43. package/src/kisscomps/components/patternConfig/planContent.vue +3 -3
  44. package/src/kisscomps/components/patternList/patternList.vue +0 -11
  45. package/src/views/intersection.vue +6 -7
  46. package/src/views/intersection2.vue +2 -2
  47. package/src/views/overView.vue +5 -23
  48. package/src/views/patternConfig.vue +38 -8
  49. package/src/views/schemeconfig.vue +4 -6
  50. package/static/apiconfig.json +10 -0
  51. package/static/styles/common.scss +3 -3
  52. package/static/styles/dark/theme/element-dark.scss +1 -1
  53. package/static/styles/intersection.scss +15 -5
  54. package/static/styles/light/theme/element-light.scss +1 -1
  55. package/static/styles/schemeconfig.scss +3 -6
@@ -39,6 +39,9 @@
39
39
  :overlap="overlap"
40
40
  :patternSelect="patternSelect"
41
41
  :allPatternList="allPatternList"
42
+ :funcSort="funcSort"
43
+ :thirdPartyControlMenu="thirdPartyControlMenu"
44
+ :thirdPartyControl="thirdPartyControl"
42
45
  :isShowBack="isShowBack"
43
46
  :isShowRecovery="isShowRecovery"
44
47
  :isShowImplement="isShowImplement"
@@ -102,6 +105,9 @@
102
105
  :overlap="overlap"
103
106
  :patternSelect="patternSelect"
104
107
  :allPatternList="allPatternList"
108
+ :funcSort="funcSort"
109
+ :thirdPartyControlMenu="thirdPartyControlMenu"
110
+ :thirdPartyControl="thirdPartyControl"
105
111
  :isShowBack="isShowBack"
106
112
  :isShowRecovery="isShowRecovery"
107
113
  :isShowImplement="isShowImplement"
@@ -136,6 +142,8 @@ import CrossDiagramMgr from '../../../EdgeMgr/controller/crossDiagramMgr.js'
136
142
  import { setToken, setHost, getTheme } from '../../../utils/auth.js'
137
143
  import RingDataModel from '../../../utils/RingDataModel.js'
138
144
  import { getIntersectionInfo } from '../../../api/template'
145
+ import { GetRoleByName } from '../../../api/permission.js'
146
+ import { getPermissionMenu, getPermissionControl } from './utils/thirdPartypermission.js'
139
147
 
140
148
  export default {
141
149
  name: 'scheme-config',
@@ -198,10 +206,6 @@ export default {
198
206
  type: String,
199
207
  default: ''
200
208
  },
201
- funcSort: {
202
- type: String,
203
- default: 'allFunc'
204
- },
205
209
  roadDirection: {
206
210
  type: String,
207
211
  default: 'right'
@@ -463,7 +467,10 @@ export default {
463
467
  patternSelect: [], // 所有方案id
464
468
  specialPage: '', // 哪一个特殊控制页面
465
469
  nextcycleefficcontrol: [5, 6, 9, 10, 12, 19], // 下周期生效的控制方式
466
- resetcomponent: false
470
+ resetcomponent: false,
471
+ funcSort: 'allFunc',
472
+ thirdPartyControlMenu: [],
473
+ thirdPartyControl: []
467
474
  }
468
475
  },
469
476
  watch: {
@@ -513,14 +520,6 @@ export default {
513
520
  async mounted () {
514
521
  this.resetcomponent = true
515
522
  this.init()
516
- if (this.realtimeStatusModalvisible === false) {
517
- this.changeStatus()
518
- }
519
- this.setPropsToken(this.Token)
520
- this.hiddenPartControl()
521
- // await this.getPhase()
522
- this.getFault()
523
- this.initData()
524
523
  },
525
524
  methods: {
526
525
  resetComponent () {
@@ -536,6 +535,7 @@ export default {
536
535
  this.changeStatus()
537
536
  }
538
537
  this.setPropsToken(this.Token)
538
+ this.hiddenPartControl()
539
539
  // await this.getPhase()
540
540
  this.getFault()
541
541
  this.initData()
@@ -618,8 +618,26 @@ export default {
618
618
  changeStatus () {
619
619
  this.toPage = 1
620
620
  this.isOperation = true
621
+ if (this.platform !== undefined && this.platform !== 'OpenATC') {
622
+ this.queryThirdParty()
623
+ }
621
624
  this.$refs.ManualControlModalNew.init()
622
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
+ if (res.data.data.length > 0) {
635
+ this.funcSort = 'thirdPartyFunc'
636
+ this.thirdPartyControlMenu = getPermissionMenu(res.data.data)
637
+ this.thirdPartyControl = getPermissionControl(res.data.data)
638
+ }
639
+ })
640
+ },
623
641
  handleGetData (data) {
624
642
  let that = this
625
643
  if (data.name === '') {
@@ -20,10 +20,10 @@
20
20
  :model="manualInfo"
21
21
  label-width="90px">
22
22
  <el-form-item
23
- :label="$t('openatccomponents.overview.duration')"
24
- prop="count">
25
- <el-input-number :min="0" :max="65535" :precision="0" :step="1" :controls="false" v-model.number="manualInfo.tempDuration" size="small"></el-input-number>
26
- </el-form-item>
23
+ :label="$t('openatccomponents.overview.greenclear')"
24
+ prop="intersection">
25
+ <el-input-number :min="0" :max="65535" :precision="0" :step="1" :controls="false" v-model.number="manualInfo.tempGreenflash" size="small"></el-input-number>
26
+ </el-form-item>
27
27
 
28
28
  <el-form-item
29
29
  :label="$t('openatccomponents.overview.yellowflash')"
@@ -44,11 +44,13 @@
44
44
  label-position="left"
45
45
  :model="manualInfo"
46
46
  label-width="90px">
47
- <el-form-item
48
- :label="$t('openatccomponents.overview.greenclear')"
49
- prop="intersection">
50
- <el-input-number :min="0" :max="65535" :precision="0" :step="1" :controls="false" v-model.number="manualInfo.tempGreenflash" size="small"></el-input-number>
51
- </el-form-item>
47
+
48
+ <el-form-item
49
+ :label="$t('openatccomponents.overview.duration')"
50
+ prop="count">
51
+ <el-input-number :min="0" :max="65535" :precision="0" :step="1" :controls="false" v-model.number="manualInfo.tempDuration" size="small"></el-input-number>
52
+ </el-form-item>
53
+
52
54
  <el-form-item
53
55
  :label="$t('openatccomponents.overview.allred')"
54
56
  prop="intersection">
@@ -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,13 +70,17 @@ 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]
82
+ specialControl: [23, 22, 100, 24, 25],
83
+ basicFuncControlId: [0, 1, 4, 5] // 基础功能包含的控制方式: 自主控制(手动下)、黄闪、步进、定周期
80
84
  }
81
85
  },
82
86
  computed: {
@@ -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('驻留控制') !== -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('特殊控制') !== -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('方案选择') !== -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('其他') !== -1))">>
181
188
  <ControlModelGroup
182
- v-if="activeName === 'others'"
189
+ v-if="activeName === 'others' && funcSort === 'allFunc'"
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,6 +356,12 @@ 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: {
@@ -375,7 +389,6 @@ export default {
375
389
  },
376
390
  data () {
377
391
  return {
378
- basicFuncControlId: [0, 1, 4, 5], // 基础功能包含的控制方式: 自主控制(手动下)、黄闪、步进、定周期
379
392
  visible: this.Visible,
380
393
  manuals: false,
381
394
  realtimeStage: {},
@@ -0,0 +1,68 @@
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:step', [4]
12
+ ], [
13
+ 'configer:manual:stage', [4]
14
+ ], [
15
+ 'configer:manual:phaselock', [22]
16
+ ], [
17
+ 'configer:manual:directionlock', [25]
18
+ ], [
19
+ 'configer:manual:yellowfalsh', [1]
20
+ ], [
21
+ 'configer:manual:allred', [2]
22
+ ], [
23
+ 'configer:manual:close', [3]
24
+ ], [
25
+ 'configer:manual:fix', [5]
26
+ ], [
27
+ 'configer:manual:free', [6]
28
+ ], [
29
+ 'configer:manual:adapter', [9]
30
+ ], [
31
+ 'configer:manual:coordinate', [10]
32
+ ], [
33
+ 'configer:manual:ped', [12]
34
+ ], [
35
+ 'configer:manual:pedfree', [19]
36
+ ], [
37
+ 'configer:manual:procedure', [23]
38
+ ], [
39
+ 'configer:manual:temp', [100]
40
+ ], [
41
+ 'configer:manual:preempt', [24]
42
+ ]])
43
+
44
+ export function getPermissionMenu (permissionList) {
45
+ // 按第三方平台角色的权限处理可显示的手动控制菜单
46
+ let thirdPartyControlMenu = []
47
+ for (let i = 0; i < permissionList.length; i++) {
48
+ let per = permissionList[i].permission_code
49
+ if (permissionMenuMap.get(per)) {
50
+ thirdPartyControlMenu = thirdPartyControlMenu.concat(permissionMenuMap.get(per))
51
+ }
52
+ }
53
+ console.log(thirdPartyControlMenu)
54
+ return thirdPartyControlMenu
55
+ }
56
+
57
+ export function getPermissionControl (permissionList) {
58
+ // 按第三方平台角色的权限处理可显示的手动控制按钮
59
+ let thirdPartyControl = []
60
+ for (let i = 0; i < permissionList.length; i++) {
61
+ let per = permissionList[i].permission_code
62
+ if (permissionControlMap.get(per)) {
63
+ thirdPartyControl = thirdPartyControl.concat(permissionControlMap.get(per))
64
+ }
65
+ }
66
+ console.log(thirdPartyControl)
67
+ return thirdPartyControl
68
+ }
@@ -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: [],
@@ -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) {
@@ -11,7 +11,7 @@
11
11
  **/
12
12
  <template>
13
13
  <div class="patternConfig">
14
- <el-container v-if="!isShowSingle" >
14
+ <el-container v-if="!isShowSingle" style="height: 100%;" >
15
15
  <div class="main-container" style="height: 100%;width: 100%;">
16
16
  <el-tabs v-model="editableTabsValue" type="card" @edit="handleTabsEdit" :before-leave="beforeLeave" style="height: 100%;">
17
17
  <el-tab-pane
@@ -12,7 +12,7 @@
12
12
  <template>
13
13
  <div class="app-container" ref="pattern-container">
14
14
  <el-table :data="newPatternList" :max-height="tableHeight" id="footerBtn" :show-header="isShowTableHeader">
15
- <el-table-column type="expand" v-if="isAllowedExpand">
15
+ <el-table-column :type="isAllowedExpand ? 'expand' : ''" v-if="isAllowedExpand">
16
16
  <template slot-scope="scope">
17
17
  <div v-if="isAllowedExpand && isSingleCrossMode" class="optimizetype">
18
18
  <span>{{$t('openatccomponents.pattern.optimizetype')}}</span>
@@ -51,14 +51,14 @@
51
51
  <span>{{scope.row.agentid}}</span>
52
52
  </template>
53
53
  </el-table-column>
54
- <el-table-column align="center" :label="$t('openatccomponents.greenwaveoptimize.period')" width="100" minWidth="40" v-if="isShowColumn('period')">
54
+ <el-table-column align="center" :label="$t('openatccomponents.overview.crossname')" width="120" minWidth="40" v-if="isShowColumn('name')">
55
55
  <template slot-scope="scope">
56
- <span>{{getPeriod(scope.row)}}</span>
56
+ <span>{{getDevName(scope.row)}}</span>
57
57
  </template>
58
58
  </el-table-column>
59
- <el-table-column align="center" :label="$t('openatccomponents.overview.crossname')" width="120" minWidth="40" v-if="isShowColumn('name')">
59
+ <el-table-column align="center" :label="$t('openatccomponents.greenwaveoptimize.period')" width="100" minWidth="40" v-if="isShowColumn('period')">
60
60
  <template slot-scope="scope">
61
- <span>{{getDevName(scope.row)}}</span>
61
+ <span>{{getPeriod(scope.row)}}</span>
62
62
  </template>
63
63
  </el-table-column>
64
64
  <el-table-column property="isValid" :label="$t('openatccomponents.token.isValid')" align="center" width="80" prop="isused" v-if="isShowColumn('isused')">
@@ -200,7 +200,9 @@ export default {
200
200
  },
201
201
  watch: {
202
202
  maxTableHeight: function () {
203
- this.tableHeight = this.maxTableHeight
203
+ this.$nextTick(() => {
204
+ this.tableHeight = this.maxTableHeight // 动态更新高度
205
+ })
204
206
  },
205
207
  optList: {
206
208
  handler: function (val) {
@@ -221,11 +223,6 @@ export default {
221
223
  }
222
224
  },
223
225
  mounted: function () {
224
- // var _this = this
225
- // _this.$nextTick(function () {
226
- // _this.tableHeight = _this.maxTableHeight
227
- // })
228
- // _this.tableHeight = _this.maxTableHeight
229
226
  },
230
227
  methods: {
231
228
  onOptimizeClick (row, index) {
@@ -316,7 +313,7 @@ export default {
316
313
  return res
317
314
  },
318
315
  getPeriod (row) {
319
- let period = row.period || row.timeperiodrange
316
+ let period = row.timeperiodrange || row.period
320
317
  let res = ''
321
318
  if (period && period.length > 0) {
322
319
  res = period[0].substring(0, 5) + '-' + period[1].substring(0, 5)
@@ -345,9 +342,30 @@ export default {
345
342
  // this.phaseList = phaseList
346
343
  this.handlePatternList(routeData, patternList, phaseList)
347
344
  },
345
+ // 依据anengid获取设备信息,同时兼容单路口数据按序index取值
346
+ getDevFromDevsOrIndex (devs, agentid, index) {
347
+ let res
348
+ // check special
349
+ let isSingleCrossMode = false
350
+ if (devs && devs.length > 1 && devs[0].agentid === devs[1].agentid) {
351
+ isSingleCrossMode = true
352
+ // check errData
353
+ if (index === undefined || index === null) {
354
+ console.log('getDevFromDevsOrIndex Err: index is null')
355
+ }
356
+ }
357
+ if (!isSingleCrossMode) {
358
+ res = devs.filter(ist => ist.agentid === agentid)[0]
359
+ } else {
360
+ res = devs[index]
361
+ console.log('getDevByIndex:', res)
362
+ }
363
+ return res
364
+ },
348
365
  handlePatternList (routeData, patternList, phaseList) {
349
366
  this.newPatternList = []
350
367
  let devs = routeData.devs
368
+ let index = 0
351
369
  for (let pattern of patternList) {
352
370
  let obj = {}
353
371
  let id = pattern.agentid
@@ -355,7 +373,9 @@ export default {
355
373
  let count = [] // 计算相位有几个环
356
374
  if (pattern.feature !== undefined && pattern.feature.patternList.length !== 0) {
357
375
  let currPatternList = pattern.feature.patternList
358
- let dev = devs.filter(ist => ist.agentid === id)[0]
376
+ // let dev = devs.filter(ist => ist.agentid === id)[0]
377
+ let dev = this.getDevFromDevsOrIndex(devs, id, index)
378
+ index = index + 1
359
379
  let patternId = dev.patternid
360
380
  let currPattern
361
381
  if (Array.isArray(currPatternList)) {
@@ -115,7 +115,7 @@ export default {
115
115
  // this.getRouteInfo()
116
116
  this.routeData = editableTab
117
117
  let patternList = this.getPatternListFromTab(editableTab, this.patternList)
118
- let phaseList = this.getPatternListFromTab(editableTab, this.patternList)
118
+ let phaseList = this.getPhaseListFromTab(editableTab, this.phaseList)
119
119
  if (patternList && patternList.length > 0 && phaseList && phaseList.length > 0) {
120
120
  this.patternList = patternList
121
121
  this.phaseList = phaseList
@@ -153,14 +153,14 @@ export default {
153
153
  return res
154
154
  }
155
155
  }
156
- let devPatternList = devs.map(item => {
156
+ let devPhaseList = devs.map(item => {
157
157
  let pattern = {
158
158
  agentid: item.agentid,
159
159
  feature: item.feature
160
160
  }
161
161
  return pattern
162
162
  })
163
- res = devPatternList
163
+ res = devPhaseList
164
164
  return res
165
165
  },
166
166
  closeInterval () {
@@ -5,7 +5,6 @@
5
5
  :contrloType="contrloType"
6
6
  :stagesChange="stagesChange"
7
7
  :isShowTip="isShowTip"
8
- :isMove="isMove"
9
8
  :patternStatusList="patternStatusList"
10
9
  :cycles="cycles"
11
10
  :cycle="cycle"
@@ -20,7 +19,6 @@
20
19
  :agentId="agentId"
21
20
  :controlData="controlData"
22
21
  :syncTime="syncTime"
23
- @handleSplitMove="handleSplitMove"
24
22
  :isPhase="isPhase"
25
23
  >
26
24
  </BoardCard>
@@ -504,10 +502,6 @@ export default {
504
502
  type: Boolean,
505
503
  default: true
506
504
  },
507
- isMove: {
508
- type: Boolean,
509
- default: true
510
- },
511
505
  contrloType: {
512
506
  type: String
513
507
  },
@@ -587,11 +581,6 @@ export default {
587
581
  // if (this.$route.query !== undefined && Object.keys(this.$route.query).length) {
588
582
  // this.resetCrossDiagram()
589
583
  // }
590
- },
591
- methods: {
592
- handleSplitMove (data) {
593
- this.$emit('handleSplitMove', data)
594
- }
595
584
  }
596
585
  }
597
586
  </script>
@@ -1,16 +1,15 @@
1
1
  <template>
2
2
  <div>
3
- <intersection-with-interface :AgentId="agentId" />
4
3
  <h2 class="text">实时通道路口图</h2>
5
- <!-- <channel-realtime-intersection
4
+ <channel-realtime-intersection
6
5
  :agentId="this.agentId"
7
6
  :roadDirection="roadDirection"
8
7
  :channelRealtimeStatusData="channelRealtimeStatusData"
9
- /> -->
8
+ />
10
9
 
11
10
  <!-- 按通道获取相位的方向选择列表,特殊路口显示列表,普通路口显示模版路口图 -->
12
11
  <h2 class="text">非第三方配置路口图(按通道显示相位方向)</h2>
13
- <!-- <intersection-direction-selection
12
+ <intersection-direction-selection
14
13
  :agentId="this.agentId"
15
14
  :choosedDirection="[14,6,13,8]"
16
15
  :choosedPedDirection="[1]"
@@ -26,7 +25,7 @@
26
25
  :choosedPedDirection="[1,2]"
27
26
  :roadDirection="roadDirection"
28
27
  @handleClickCrossIcon="handleClickCrossIcon" />
29
- </div> -->
28
+ </div>
30
29
 
31
30
  <!-- 显示按通道获取相位的模版路口图 -->
32
31
  <h2 class="text">显示配置的相位路口图</h2>
@@ -162,12 +161,12 @@ export default {
162
161
  return {
163
162
  roadDirection: 'right',
164
163
  // reqUrl: 'http://192.168.13.103:10003/openatc',
165
- agentId: '32050101041121000001',
164
+ agentId: 'tjblfql',
166
165
  // agentId: '13013',
167
166
  // agentId: '12007_390',
168
167
  // agentId: '12014',
169
168
  reqUrl: 'http://192.168.13.103:10003/openatc',
170
- Token: 'eyJraWQiOiIxNzMzODkzOTEyNDQwIiwidHlwIjoiSldUIiwiYWxnIjoiSFMyNTYifQ.eyJzdWIiOiJhZG1pbiIsImV4cCI6MTczMzg5NzUxMiwiaWF0IjoxNzMzODkwMzEyfQ.OItRhpJG9WM4KRZ04Nhzedyj1WhTKw2r-oKCQN8dA04',
169
+ Token: 'eyJraWQiOiIxNzIxOTc3OTkzMTY4IiwidHlwIjoiSldUIiwiYWxnIjoiSFMyNTYifQ.eyJzdWIiOiJhZG1pbiIsImV4cCI6MTcyMTk4MTU5MywiaWF0IjoxNzIxOTc0MzkzfQ.vjgAFMJlM4FEHxT9K9lJQ_VsUx1fDubr4tYgMaVffS0',
171
170
  // agentId: '30003-352',
172
171
  // reqUrl: 'https://kints-dev.devdolphin.com/openatc',
173
172
  // Token: 'eyJraWQiOiIxNjUwNTA5MDI2ODk2IiwidHlwIjoiSldUIiwiYWxnIjoiSFMyNTYifQ.eyJzdWIiOiJ4aWFvbWluZyIsImV4cCI6MTczNjkwOTAyNiwiaWF0IjoxNjUwNTA5MDI2fQ.-s4T-uMRmB2zf9yer87USKQXLY1a12Zq5lCOnqjNmfA',
@@ -102,12 +102,12 @@ export default {
102
102
  return {
103
103
  roadDirection: 'left',
104
104
  // reqUrl: 'http://192.168.13.103:10003/openatc',
105
- agentId: '32050101041121000001',
105
+ agentId: 'cllzpl',
106
106
  // agentId: '13013',
107
107
  // agentId: '12007_390',
108
108
  // agentId: '12014',
109
109
  reqUrl: 'http://192.168.13.103:10003/openatc',
110
- Token: 'eyJraWQiOiIxNjkzMjkyMzI0NzUyIiwidHlwIjoiSldUIiwiYWxnIjoiSFMyNTYifQ.eyJzdWIiOiJhZG1pbiIsImV4cCI6NDA5MjEzNDQwMCwiaWF0IjoxNjkwODE5MjAwfQ.97bSPcUdh4xgAqkbw96Q-NfLVhFbgK0Yo1S8KYkSwz8',
110
+ Token: 'eyJraWQiOiIxNzEwNzU4MTU3Njk0IiwidHlwIjoiSldUIiwiYWxnIjoiSFMyNTYifQ.eyJzdWIiOiIxMjM0NTYiLCJleHAiOjE3MTM4ODgwMDAsImlhdCI6MTcxMDY5MTIwMH0.vicLABPjoZEWmHr12-5FXMbjYmEKv-WSTVRROR1eOME',
111
111
  // agentId: '30003-352',
112
112
  // reqUrl: 'https://kints-dev.devdolphin.com/openatc',
113
113
  // Token: 'eyJraWQiOiIxNjUwNTA5MDI2ODk2IiwidHlwIjoiSldUIiwiYWxnIjoiSFMyNTYifQ.eyJzdWIiOiJ4aWFvbWluZyIsImV4cCI6MTczNjkwOTAyNiwiaWF0IjoxNjUwNTA5MDI2fQ.-s4T-uMRmB2zf9yer87USKQXLY1a12Zq5lCOnqjNmfA',
@@ -1,16 +1,13 @@
1
1
  <template>
2
2
  <div id="test1">
3
- <!-- <overview
3
+ <overview
4
4
  :AgentId="agentId"
5
5
  :reqUrl="reqUrl"
6
6
  :modeName="modeName"
7
7
  :controlName="controlName"
8
8
  :isShowState="isShowState"
9
9
  :isShowMode="isShowMode"
10
- :Token="Token"></overview> -->
11
- <el-button @click="handleChangeOverview">切换overview组件</el-button>
12
- <el-button @click="reverseOverviewBtMap">切换路口图和overview</el-button>
13
- <overview-component :AgentId="agentId" :onlyShowIntersectionMap="isOnlyMap" />
10
+ :Token="Token"></overview>
14
11
  </div>
15
12
  </template>
16
13
 
@@ -22,27 +19,12 @@ export default {
22
19
  isShowMode: true,
23
20
  modeName: '交警遥控',
24
21
  controlName: '步进',
25
- agentId: '13013',
26
- agentid1: 'gjnlahql',
27
- agentid2: '13013',
28
- sum: 0,
29
- Token: 'eyJraWQiOiIxNzMzODg3MDYyMjgwIiwidHlwIjoiSldUIiwiYWxnIjoiSFMyNTYifQ.eyJzdWIiOiJhZG1pbiIsImV4cCI6MTczMzg5MDY2MiwiaWF0IjoxNzMzODgzNDYyfQ.qUJZ4lKv0WU3s3lWfYwl5ZM77n2rriYeFQ8qOwRFuzk',
30
- reqUrl: 'http://192.168.13.103:10003/openatc',
31
- isOnlyMap: true
22
+ agentId: 'jmlxhl',
23
+ Token: 'eyJraWQiOiIxNzA4OTA5NDk2ODcxIiwidHlwIjoiSldUIiwiYWxnIjoiSFMyNTYifQ.eyJzdWIiOiJhZG1pbiIsImV4cCI6MTcwODk1MjY5NiwiaWF0IjoxNzA4OTA5NDk2fQ.FI0gzBQFLyQsj95LG56lVZxb6WYlr2-datNsyv6fF-I',
24
+ reqUrl: 'http://192.168.13.103:10003/openatc'
32
25
  }
33
26
  },
34
27
  methods: {
35
- handleChangeOverview () {
36
- if (this.sum % 2 === 0) {
37
- this.agentId = this.agentid1
38
- } else {
39
- this.agentId = this.agentid2
40
- }
41
- this.sum++
42
- },
43
- reverseOverviewBtMap () {
44
- this.isOnlyMap = !this.isOnlyMap
45
- }
46
28
  },
47
29
  watch: {
48
30
  },