openatc-components 0.3.106 → 0.3.107

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 (61) hide show
  1. package/config/index.js +0 -1
  2. package/package/kisscomps/components/BoardCard/BoardCard.vue +11 -0
  3. package/package/kisscomps/components/Channelization/Channelization.vue +1 -1
  4. package/package/kisscomps/components/ChannelizationFlowStatistic/ChannelizationFlowStatistic.vue +1 -1
  5. package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/motorwayIconSvg.vue +46 -145
  6. package/package/kisscomps/components/DrawChannelization/drawsvg/index.draw.vue +4 -4
  7. package/package/kisscomps/components/DrawChannelization/drawsvg/index.vue +1 -1
  8. package/package/kisscomps/components/IntersectionMap/crossDirection/crossDiagram.vue +3 -7
  9. package/package/kisscomps/components/IntersectionMap/intersectionmap.vue +0 -5
  10. package/package/kisscomps/components/IntersectionWithInterface/IntersectionWithInterface.vue +12 -17
  11. package/package/kisscomps/components/OverviewComponent/index.vue +34 -31
  12. package/package/kisscomps/components/PatternOptimize/PatternOptimize.vue +11 -2
  13. package/package/kisscomps/components/PatternStatus/PatternStatus.vue +92 -33
  14. package/package/kisscomps/components/SchemeConfig/SchemeConfig.vue +13 -30
  15. package/package/kisscomps/components/SchemeConfig/lockingPhaselControlModal/index.vue +9 -11
  16. package/package/kisscomps/components/SchemeConfig/manualControlModalNew/controlModelGroup.vue +3 -6
  17. package/package/kisscomps/components/SchemeConfig/manualControlModalNew/index.vue +11 -18
  18. package/package/kisscomps/components/overView/index.vue +23 -0
  19. package/package/kisscomps/components/patternConfig/index.vue +1 -1
  20. package/package/kisscomps/components/patternConfig/pattern/patternTable.vue +13 -33
  21. package/package/kisscomps/components/patternConfig/planContent.vue +3 -3
  22. package/package/kisscomps/components/patternList/patternList.vue +11 -0
  23. package/package/kissui.min.js +1 -1
  24. package/package.json +1 -1
  25. package/src/i18n/language/en.js +4 -3
  26. package/src/i18n/language/zh.js +4 -3
  27. package/src/kisscomps/components/BoardCard/BoardCard.vue +11 -0
  28. package/src/kisscomps/components/Channelization/Channelization.vue +1 -1
  29. package/src/kisscomps/components/ChannelizationFlowStatistic/ChannelizationFlowStatistic.vue +1 -1
  30. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/motorwayIconSvg.vue +46 -145
  31. package/src/kisscomps/components/DrawChannelization/drawsvg/index.draw.vue +4 -4
  32. package/src/kisscomps/components/DrawChannelization/drawsvg/index.vue +1 -1
  33. package/src/kisscomps/components/IntersectionMap/crossDirection/crossDiagram.vue +3 -7
  34. package/src/kisscomps/components/IntersectionMap/intersectionmap.vue +0 -5
  35. package/src/kisscomps/components/IntersectionWithInterface/IntersectionWithInterface.vue +12 -17
  36. package/src/kisscomps/components/OverviewComponent/index.vue +34 -31
  37. package/src/kisscomps/components/PatternOptimize/PatternOptimize.vue +11 -2
  38. package/src/kisscomps/components/PatternStatus/PatternStatus.vue +92 -33
  39. package/src/kisscomps/components/SchemeConfig/SchemeConfig.vue +13 -30
  40. package/src/kisscomps/components/SchemeConfig/lockingPhaselControlModal/index.vue +9 -11
  41. package/src/kisscomps/components/SchemeConfig/manualControlModalNew/controlModelGroup.vue +3 -6
  42. package/src/kisscomps/components/SchemeConfig/manualControlModalNew/index.vue +11 -18
  43. package/src/kisscomps/components/overView/index.vue +23 -0
  44. package/src/kisscomps/components/patternConfig/index.vue +1 -1
  45. package/src/kisscomps/components/patternConfig/pattern/patternTable.vue +13 -33
  46. package/src/kisscomps/components/patternConfig/planContent.vue +3 -3
  47. package/src/kisscomps/components/patternList/patternList.vue +11 -0
  48. package/src/views/intersection.vue +7 -6
  49. package/src/views/intersection2.vue +2 -2
  50. package/src/views/overView.vue +23 -5
  51. package/src/views/patternConfig.vue +8 -38
  52. package/src/views/schemeconfig.vue +6 -4
  53. package/static/apiconfig.json +0 -10
  54. package/static/styles/common.scss +3 -3
  55. package/static/styles/dark/theme/element-dark.scss +1 -1
  56. package/static/styles/intersection.scss +5 -15
  57. package/static/styles/light/theme/element-light.scss +1 -1
  58. package/static/styles/schemeconfig.scss +6 -3
  59. package/package/kisscomps/components/SchemeConfig/utils/thirdPartypermission.js +0 -95
  60. package/src/api/permission.js +0 -33
  61. package/src/kisscomps/components/SchemeConfig/utils/thirdPartypermission.js +0 -95
@@ -14,8 +14,9 @@
14
14
  <!-- 环模式true -->
15
15
  <div v-if="this.contrloType === 'ring' || !this.contrloType">
16
16
  <div class="ring-first" v-for="(list, index1) in patternInfo" :key="index1">
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': ''">
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'}">
17
+ <draggable :move="move" @end="endDrag(index1)" :disabled="isMove" :list="list">
18
+ <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': ''">
19
+ <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'}">
19
20
  <el-tooltip placement="top-start" effect="light">
20
21
  <div slot="content">{{$t('openatccomponents.phase.phase')}}{{item.id}}:{{item.split}}</div>
21
22
  <div style="cursor:pointer;">
@@ -25,7 +26,18 @@
25
26
  </div>
26
27
  <div v-if="isShowTip" class="box" style="position: absolute; left:40px; width:40px; top: -1px;">
27
28
  <div class="ring-nums">{{$t('openatccomponents.phase.phase')}}{{item.id}}</div>
28
- <div class="ring-nums">{{item.split}}</div>
29
+ <div v-if="isMove" class="ring-nums">{{item.split}}</div>
30
+ <el-input-number
31
+ v-if="!isMove"
32
+ class="ring-nums"
33
+ size="small"
34
+ :controls="false"
35
+ :min="0"
36
+ :step="1"
37
+ v-model.number="item.split"
38
+ @change="handleEdit(item)"
39
+ style="width: 24px"
40
+ ></el-input-number>
29
41
  </div>
30
42
  </div>
31
43
  </el-tooltip>
@@ -41,7 +53,8 @@
41
53
  <div class="first-1" :class="item.mode === 8 ? 'mask' : item.mode === 9 ? 'yellowClass' : ''" :style="{'width':Number(item.flashgreen.replace('%', ''))/Number((((item.split+(item.sum?item.sum:0)) / (max?max:item.cycle) * 100).toFixed(3) + '%').replace('%', ''))*100+'%','height':'34px','float':'left','background': 'linear-gradient(to right, #ffffff 50%, #7ccc66 0)','background-size': '4px 100%'}"></div>
42
54
  <div class="first-1" :class="item.mode === 8 ? 'mask' : item.mode === 9 ? 'yellowClass' : ''" :style="{'width':Number(item.yellowWidth.replace('%', ''))/Number((((item.split+(item.sum?item.sum:0)) / (max?max:item.cycle) * 100) + '%').replace('%', ''))*100+'%','height':'34px','background':'#f9dc6a'}"></div>
43
55
  <div class="first-1" :class="item.mode === 8 ? 'mask' : item.mode === 9 ? 'yellowClass' : ''" :style="{'width':Number(item.redWidth.replace('%', ''))/Number((((item.split+(item.sum?item.sum:0)) / (max?max:item.cycle) * 100).toFixed(3) + '%').replace('%', ''))*100+'%','height':'34px','background':'#f27979'}"></div>
44
- </div>
56
+ </div>
57
+ </draggable>
45
58
  </div>
46
59
  <div v-if="showBarrier">
47
60
  <div v-for="(item, index) in barrierList" :key="index + '1'">
@@ -100,6 +113,7 @@
100
113
  <script>
101
114
  // import patternwalksvg from '../PatternWalkSvg/PatternWalkSvg'
102
115
  import xdrdirselector from '../XRDDirSelector/XRDDirSelector'
116
+ import draggable from 'vuedraggable'
103
117
  // import PatternWalkSvg from '../IntersectionMap/crossDirection/baseImg/PatternWalkSvg'
104
118
  import PhaseDataModel from '../IntersectionMap/crossDirection/utils.js'
105
119
  import CrossDiagramMgr from '../../../EdgeMgr/controller/crossDiagramMgr.js'
@@ -107,6 +121,7 @@ export default {
107
121
  name: 'pattern-list',
108
122
  components: {
109
123
  // patternwalksvg,
124
+ draggable,
110
125
  xdrdirselector
111
126
  },
112
127
  data () {
@@ -114,6 +129,7 @@ export default {
114
129
  barrierHeight: '',
115
130
  stageCycle: '',
116
131
  barrierList: [],
132
+ barrierArr: [],
117
133
  newCycle: this.cycles,
118
134
  patternIds: this.patternId,
119
135
  newPatterns: [],
@@ -142,6 +158,10 @@ export default {
142
158
  stagesChange: {
143
159
  type: Array
144
160
  },
161
+ isMove: {
162
+ type: Boolean,
163
+ default: true
164
+ },
145
165
  controlPhase: {
146
166
  type: Object
147
167
  },
@@ -343,11 +363,11 @@ export default {
343
363
  handler: function (val, oldVal) {
344
364
  this.handleBarrierHeight() // 计算屏障高度
345
365
  if (this.patternStatusList && this.newCycle) {
346
- setTimeout(() => {
347
- this.handleCurrentChange(this.patternStatusList)
348
- this.handleBarrierHeight()
349
- }, 10)
366
+ // setTimeout(() => {
367
+ this.handleCurrentChange(this.patternStatusList)
350
368
  this.handleBarrierHeight()
369
+ // }, 10)
370
+ // this.handleBarrierHeight()
351
371
  }
352
372
  },
353
373
  // 深度观察监听
@@ -375,6 +395,60 @@ export default {
375
395
  }
376
396
  },
377
397
  methods: {
398
+ move (e) {
399
+ // 这里的e表示即将停靠的元素。
400
+ let result = this.barrierArr.filter(item => item.includes(e.relatedContext.element.id))[0]
401
+ if (!result.includes(e.draggedContext.element.id)) {
402
+ return false
403
+ }
404
+ },
405
+ endDrag (index) {
406
+ // 拖动后对原数据排序
407
+ const idIndexMap = {}
408
+ this.patternInfo.forEach((subArray, subArrayIndex) => {
409
+ subArray.forEach((item, index) => {
410
+ idIndexMap[item.id] = { subArrayIndex, index }
411
+ })
412
+ })
413
+ this.patternStatusList.forEach((subArray, subArrayIndex) => {
414
+ if (subArray.length > 0) {
415
+ subArray.sort((aItem, bItem) => {
416
+ const aIndex = idIndexMap[aItem.id] ? idIndexMap[aItem.id].index : Infinity
417
+ const bIndex = idIndexMap[bItem.id] ? idIndexMap[bItem.id].index : Infinity
418
+ return aIndex - bIndex
419
+ })
420
+ }
421
+ })
422
+ },
423
+ handleEdit (val) {
424
+ this.patternStatusList.map(d => {
425
+ d.map(r => {
426
+ if (r.id === val.id) {
427
+ r.value = val.split
428
+ }
429
+ })
430
+ })
431
+ // this.handleCurrentChange(this.patternStatusList)
432
+ this.$emit('handleSplitMove', this.patternId)
433
+ },
434
+ getMaxCycle (pattern) {
435
+ // let rings = pattern.rings
436
+ let maxCycle = 0
437
+ for (let ring of pattern) {
438
+ if (ring.length === 0) continue
439
+ let cycle = 0
440
+ for (let r of ring) {
441
+ if (r.mode === 7) { // 忽略相位不计周期
442
+ continue
443
+ }
444
+ cycle = cycle + r.value
445
+ }
446
+ if (cycle > maxCycle) {
447
+ maxCycle = cycle
448
+ }
449
+ }
450
+ return maxCycle
451
+ },
378
452
  getPed (data) {
379
453
  let ped = []
380
454
  for (let stg of data) {
@@ -1179,6 +1253,7 @@ export default {
1179
1253
  }
1180
1254
  }
1181
1255
  let resArr = ringArr.map(item => item.data)
1256
+ this.barrierArr = resArr
1182
1257
  let ringTeam = this.step1(this.phaseList, resArr)
1183
1258
  let ringTeams = ringTeam.filter(item => item.length !== 0)
1184
1259
  if (this.patternList) {
@@ -1267,30 +1342,16 @@ export default {
1267
1342
  }
1268
1343
  obj.split = split
1269
1344
  obj.cycle = cycle
1270
- const isZero = split - currPhase.redclear - currPhase.yellow - currPhase.flashgreen
1271
- const allAdd = split + currPhase.redclear + currPhase.yellow + currPhase.flashgreen
1272
- if (isZero <= 0) {
1273
- if (ring.sum) {
1274
- obj.sum = ring.sum
1275
- obj.redWidth = ((((currPhase.redclear + ring.sum) / allAdd) / (this.fixCycle ? this.fixCycle : this.max ? this.max : this.newCycle)) * 100) + '%'
1276
- } else {
1277
- obj.redWidth = (((currPhase.redclear / allAdd) / (this.fixCycle ? this.fixCycle : this.max ? this.max : this.newCycle)) * 100) + '%'
1278
- }
1279
- obj.greenWidth = (((split - (currPhase.redclear / allAdd) - (currPhase.yellow / allAdd) - (currPhase.flashgreen / allAdd)) / (this.fixCycle ? this.fixCycle : this.max ? this.max : this.newCycle)) * 100) + '%'
1280
- obj.yellowWidth = (((currPhase.yellow / allAdd) / (this.fixCycle ? this.fixCycle : this.max ? this.max : this.newCycle)) * 100) + '%'
1281
- obj.flashgreen = (((currPhase.flashgreen / allAdd) / (this.fixCycle ? this.fixCycle : this.max ? this.max : this.newCycle)) * 100) + '%'
1345
+ if (ring.sum) {
1346
+ obj.sum = ring.sum
1347
+ obj.redWidth = ((currPhase.redclear + ring.sum) / (this.max ? this.max : cycle) * 100) + '%'
1282
1348
  } else {
1283
- if (ring.sum) {
1284
- obj.sum = ring.sum
1285
- obj.redWidth = ((currPhase.redclear + ring.sum) / (this.fixCycle ? this.fixCycle : this.max ? this.max : this.newCycle) * 100) + '%'
1286
- } else {
1287
- obj.redWidth = (currPhase.redclear / (this.fixCycle ? this.fixCycle : this.max ? this.max : this.newCycle) * 100) + '%'
1288
- }
1289
- obj.mode = ring.mode
1290
- obj.greenWidth = ((split - currPhase.redclear - currPhase.yellow - currPhase.flashgreen) / (this.fixCycle ? this.fixCycle : this.max ? this.max : this.newCycle) * 100) + '%'
1291
- obj.flashgreen = (currPhase.flashgreen / (this.fixCycle ? this.fixCycle : this.max ? this.max : this.newCycle) * 100) + '%'
1292
- obj.yellowWidth = (currPhase.yellow / (this.fixCycle ? this.fixCycle : this.max ? this.max : this.newCycle) * 100) + '%'
1349
+ obj.redWidth = (currPhase.redclear / (this.max ? this.max : cycle) * 100) + '%'
1293
1350
  }
1351
+ obj.mode = ring.mode
1352
+ obj.greenWidth = ((split - currPhase.redclear - currPhase.yellow - currPhase.flashgreen) / (this.max ? this.max : cycle) * 100) + '%'
1353
+ obj.flashgreen = (currPhase.flashgreen / (this.max ? this.max : cycle) * 100) + '%'
1354
+ obj.yellowWidth = (currPhase.yellow / (this.max ? this.max : cycle) * 100) + '%'
1294
1355
  // 忽略相位不显示
1295
1356
  // let mode = ring.mode
1296
1357
  // if (mode !== 7) { // 忽略相位不显示
@@ -1456,9 +1517,7 @@ export default {
1456
1517
  newMin.push(minNum)
1457
1518
  let newmaxNum = Math.max.apply(Math, newMax)// 每组最大值
1458
1519
  let newminNum = Math.min.apply(Math, newMin)
1459
- if (newArr.length > 1) {
1460
- this.newCycle = newmaxNum + newminNum
1461
- }
1520
+ this.newCycle = newmaxNum + newminNum
1462
1521
  if (newmaxNum === newminNum) {
1463
1522
  this.max = newmaxNum + newminNum
1464
1523
  pattern.map(d => {
@@ -39,9 +39,6 @@
39
39
  :overlap="overlap"
40
40
  :patternSelect="patternSelect"
41
41
  :allPatternList="allPatternList"
42
- :funcSort="funcSort"
43
- :thirdPartyControlMenu="thirdPartyControlMenu"
44
- :thirdPartyControl="thirdPartyControl"
45
42
  :isShowBack="isShowBack"
46
43
  :isShowRecovery="isShowRecovery"
47
44
  :isShowImplement="isShowImplement"
@@ -105,9 +102,6 @@
105
102
  :overlap="overlap"
106
103
  :patternSelect="patternSelect"
107
104
  :allPatternList="allPatternList"
108
- :funcSort="funcSort"
109
- :thirdPartyControlMenu="thirdPartyControlMenu"
110
- :thirdPartyControl="thirdPartyControl"
111
105
  :isShowBack="isShowBack"
112
106
  :isShowRecovery="isShowRecovery"
113
107
  :isShowImplement="isShowImplement"
@@ -142,8 +136,6 @@ import CrossDiagramMgr from '../../../EdgeMgr/controller/crossDiagramMgr.js'
142
136
  import { setToken, setHost, getTheme } from '../../../utils/auth.js'
143
137
  import RingDataModel from '../../../utils/RingDataModel.js'
144
138
  import { getIntersectionInfo } from '../../../api/template'
145
- import { GetRoleByName } from '../../../api/permission.js'
146
- import { getPermissionMenu, getPermissionControl } from './utils/thirdPartypermission.js'
147
139
 
148
140
  export default {
149
141
  name: 'scheme-config',
@@ -206,6 +198,10 @@ export default {
206
198
  type: String,
207
199
  default: ''
208
200
  },
201
+ funcSort: {
202
+ type: String,
203
+ default: 'allFunc'
204
+ },
209
205
  roadDirection: {
210
206
  type: String,
211
207
  default: 'right'
@@ -467,10 +463,7 @@ export default {
467
463
  patternSelect: [], // 所有方案id
468
464
  specialPage: '', // 哪一个特殊控制页面
469
465
  nextcycleefficcontrol: [5, 6, 9, 10, 12, 19], // 下周期生效的控制方式
470
- resetcomponent: false,
471
- funcSort: 'allFunc',
472
- thirdPartyControlMenu: [],
473
- thirdPartyControl: []
466
+ resetcomponent: false
474
467
  }
475
468
  },
476
469
  watch: {
@@ -520,6 +513,14 @@ export default {
520
513
  async mounted () {
521
514
  this.resetcomponent = true
522
515
  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()
523
524
  },
524
525
  methods: {
525
526
  resetComponent () {
@@ -535,7 +536,6 @@ export default {
535
536
  this.changeStatus()
536
537
  }
537
538
  this.setPropsToken(this.Token)
538
- this.hiddenPartControl()
539
539
  // await this.getPhase()
540
540
  this.getFault()
541
541
  this.initData()
@@ -618,25 +618,8 @@ 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
- }
624
621
  this.$refs.ManualControlModalNew.init()
625
622
  },
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
- },
640
623
  handleGetData (data) {
641
624
  let that = this
642
625
  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.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>
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>
27
27
 
28
28
  <el-form-item
29
29
  :label="$t('openatccomponents.overview.yellowflash')"
@@ -44,13 +44,11 @@
44
44
  label-position="left"
45
45
  :model="manualInfo"
46
46
  label-width="90px">
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
-
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>
54
52
  <el-form-item
55
53
  :label="$t('openatccomponents.overview.allred')"
56
54
  prop="intersection">
@@ -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) && (funcSort === 'allFunc' || (funcSort === 'thirdPartyFunc'&& thirdPartyControl.indexOf(item.id) !== -1))">
21
+ v-if="isHasPermission(item.permission)">
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 === 'thirdPartyFunc'&& thirdPartyControl.indexOf(item.id) !== -1))">
34
+ v-if="isHasPermission(item.permission) && (funcSort === 'allFunc' || (funcSort === 'basicFunc'&& basicFuncControlId.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,16 +70,13 @@ export default {
70
70
  othersControl: {
71
71
  type: Boolean,
72
72
  default: false
73
- },
74
- thirdPartyControl: {
75
- type: Array
76
73
  }
77
74
  },
78
75
  data () {
79
76
  return {
80
77
  preselecttype: '',
81
78
  controllist: [],
82
- specialControl: [23, 24, 100]
79
+ specialControl: [23, 22, 100, 24, 25]
83
80
  }
84
81
  },
85
82
  computed: {
@@ -12,15 +12,13 @@
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"
16
- v-if="(funcSort === 'allFunc' || (funcSort === 'thirdPartyFunc'&& thirdPartyControlMenu.indexOf('residentcontrol') !== -1))">
15
+ <el-tab-pane :label="$t('openatccomponents.overview.residentcontrol')" name="residentcontrol">
17
16
  <ControlModelGroup
18
17
  v-if="activeName === 'residentcontrol'"
19
18
  ref="ControlModelGroup"
20
19
  className="residentcontrol"
21
20
  :controlList="residentControlList"
22
21
  :funcSort="funcSort"
23
- :thirdPartyControl="thirdPartyControl"
24
22
  @selectModel="selectModel"
25
23
  />
26
24
 
@@ -82,15 +80,13 @@
82
80
  <el-button v-if="!isShowImplement" type="primary" @click="handleManualControl()">{{$t('openatccomponents.overview.comfirm')}}</el-button>
83
81
  </div>
84
82
  </el-tab-pane>
85
- <el-tab-pane :label="$t('openatccomponents.overview.specialcontrol')" name="specialcontrol"
86
- v-if="(funcSort === 'allFunc' || (funcSort === 'thirdPartyFunc'&& thirdPartyControlMenu.indexOf('specialcontrol') !== -1))">
83
+ <el-tab-pane :label="$t('openatccomponents.overview.specialcontrol')" name="specialcontrol">
87
84
  <ControlModelGroup
88
85
  v-if="activeName === 'specialcontrol'"
89
86
  ref="ControlModelGroup"
90
87
  className="specialcontrol"
91
88
  :controlList="specialControlList"
92
89
  :funcSort="funcSort"
93
- :thirdPartyControl="thirdPartyControl"
94
90
  @selectModel="selectModel"
95
91
  />
96
92
 
@@ -116,15 +112,13 @@
116
112
  </div>
117
113
 
118
114
  </el-tab-pane>
119
- <el-tab-pane :label="$t('openatccomponents.overview.schemeselection')" name="schemeselection"
120
- v-if="(funcSort === 'allFunc' || (funcSort === 'thirdPartyFunc'&& thirdPartyControlMenu.indexOf('schemeselection') !== -1))">
115
+ <el-tab-pane :label="$t('openatccomponents.overview.schemeselection')" name="schemeselection">
121
116
  <ControlModelGroup
122
117
  v-if="activeName === 'schemeselection'"
123
118
  ref="ControlModelGroup"
124
119
  className="otherscontrol"
125
120
  :controlList="patternChooseControlList"
126
121
  :funcSort="funcSort"
127
- :thirdPartyControl="thirdPartyControl"
128
122
  @selectModel="selectModel"
129
123
  @selectSpecialModel="selectSpecialModel" />
130
124
 
@@ -183,8 +177,7 @@
183
177
  <el-button v-if="!isShowImplement" type="primary" @click="handleManualControl()">{{$t('openatccomponents.overview.comfirm')}}</el-button>
184
178
  </div>
185
179
  </el-tab-pane>
186
- <el-tab-pane :label="$t('openatccomponents.overview.others')" name="others"
187
- v-if="(funcSort === 'allFunc' || (funcSort === 'thirdPartyFunc'&& thirdPartyControlMenu.indexOf('others') !== -1))">
180
+ <el-tab-pane :label="$t('openatccomponents.overview.others')" name="others">
188
181
  <ControlModelGroup
189
182
  v-if="activeName === 'others'"
190
183
  ref="ControlModelGroup"
@@ -192,7 +185,6 @@
192
185
  othersControl
193
186
  :controlList="othersControlList"
194
187
  :funcSort="funcSort"
195
- :thirdPartyControl="thirdPartyControl"
196
188
  @selectModel="selectModel"
197
189
  @selectSpecialModel="selectSpecialModel"
198
190
  />
@@ -356,15 +348,15 @@ export default {
356
348
  isShowImplement: {
357
349
  type: Boolean,
358
350
  default: true
359
- },
360
- thirdPartyControlMenu: {
361
- type: Array
362
- },
363
- thirdPartyControl: {
364
- type: Array
365
351
  }
366
352
  },
367
353
  watch: {
354
+ activeName: {
355
+ handler: function (val) {
356
+ },
357
+ // 深度观察监听
358
+ deep: true
359
+ },
368
360
  patternSelect: {
369
361
  handler: function (val) {
370
362
  this.manualInfo.tempPatternid = this.crossStatusData.patternid
@@ -383,6 +375,7 @@ export default {
383
375
  },
384
376
  data () {
385
377
  return {
378
+ basicFuncControlId: [0, 1, 4, 5], // 基础功能包含的控制方式: 自主控制(手动下)、黄闪、步进、定周期
386
379
  visible: this.Visible,
387
380
  manuals: false,
388
381
  realtimeStage: {},
@@ -74,6 +74,7 @@
74
74
  :agentId="agentId"
75
75
  :ip="ip"
76
76
  :platform="platform"
77
+ :funcSort="FuncSort"
77
78
  :roadDirection="roadDirection" />
78
79
  </div>
79
80
  </div>
@@ -139,6 +140,7 @@ export default {
139
140
  stateName: this.$t('openatccomponents.overview.offline'),
140
141
  curBodyWidth: 1920,
141
142
  graphicMode: false,
143
+ FuncSort: 'allFunc',
142
144
  controlData: {},
143
145
  checked: false,
144
146
  overlap: [],
@@ -182,6 +184,7 @@ export default {
182
184
  ...mapState({
183
185
  // curBodyWidth: state => state.globalParam.curBodyWidth,
184
186
  curBodyHeight: state => state.globalParam.curBodyHeight,
187
+ // FuncSort: state => state.globalParam.FuncSort,
185
188
  hideMenu: state => state.globalParam.hideMenu
186
189
  // graphicMode: state => state.globalParam.graphicMode
187
190
  // isShowGui: state => state.globalParam.isShowGui,
@@ -610,6 +613,12 @@ export default {
610
613
  this.agentName = res.data.data.name
611
614
  }
612
615
  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
+ }
613
622
  this.$refs.intersectionMap.resetCrossDiagram()
614
623
  this.registerMessage() // 注册消息
615
624
  this.initData()
@@ -654,6 +663,20 @@ export default {
654
663
  } else {
655
664
  this.stateName = this.$t('openatccomponents.overview.offline')
656
665
  }
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
+ }
657
680
  })
658
681
  },
659
682
  isJsonString (str) {
@@ -11,7 +11,7 @@
11
11
  **/
12
12
  <template>
13
13
  <div class="patternConfig">
14
- <el-container v-if="!isShowSingle" style="height: 100%;" >
14
+ <el-container v-if="!isShowSingle" >
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="isAllowedExpand ? 'expand' : ''" v-if="isAllowedExpand">
15
+ <el-table-column type="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.overview.crossname')" width="120" minWidth="40" v-if="isShowColumn('name')">
54
+ <el-table-column align="center" :label="$t('openatccomponents.greenwaveoptimize.period')" width="100" minWidth="40" v-if="isShowColumn('period')">
55
55
  <template slot-scope="scope">
56
- <span>{{getDevName(scope.row)}}</span>
56
+ <span>{{getPeriod(scope.row)}}</span>
57
57
  </template>
58
58
  </el-table-column>
59
- <el-table-column align="center" :label="$t('openatccomponents.greenwaveoptimize.period')" width="100" minWidth="40" v-if="isShowColumn('period')">
59
+ <el-table-column align="center" :label="$t('openatccomponents.overview.crossname')" width="120" minWidth="40" v-if="isShowColumn('name')">
60
60
  <template slot-scope="scope">
61
- <span>{{getPeriod(scope.row)}}</span>
61
+ <span>{{getDevName(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,9 +200,7 @@ export default {
200
200
  },
201
201
  watch: {
202
202
  maxTableHeight: function () {
203
- this.$nextTick(() => {
204
- this.tableHeight = this.maxTableHeight // 动态更新高度
205
- })
203
+ this.tableHeight = this.maxTableHeight
206
204
  },
207
205
  optList: {
208
206
  handler: function (val) {
@@ -223,6 +221,11 @@ export default {
223
221
  }
224
222
  },
225
223
  mounted: function () {
224
+ // var _this = this
225
+ // _this.$nextTick(function () {
226
+ // _this.tableHeight = _this.maxTableHeight
227
+ // })
228
+ // _this.tableHeight = _this.maxTableHeight
226
229
  },
227
230
  methods: {
228
231
  onOptimizeClick (row, index) {
@@ -313,7 +316,7 @@ export default {
313
316
  return res
314
317
  },
315
318
  getPeriod (row) {
316
- let period = row.timeperiodrange || row.period
319
+ let period = row.period || row.timeperiodrange
317
320
  let res = ''
318
321
  if (period && period.length > 0) {
319
322
  res = period[0].substring(0, 5) + '-' + period[1].substring(0, 5)
@@ -342,30 +345,9 @@ export default {
342
345
  // this.phaseList = phaseList
343
346
  this.handlePatternList(routeData, patternList, phaseList)
344
347
  },
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
- },
365
348
  handlePatternList (routeData, patternList, phaseList) {
366
349
  this.newPatternList = []
367
350
  let devs = routeData.devs
368
- let index = 0
369
351
  for (let pattern of patternList) {
370
352
  let obj = {}
371
353
  let id = pattern.agentid
@@ -373,9 +355,7 @@ export default {
373
355
  let count = [] // 计算相位有几个环
374
356
  if (pattern.feature !== undefined && pattern.feature.patternList.length !== 0) {
375
357
  let currPatternList = pattern.feature.patternList
376
- // let dev = devs.filter(ist => ist.agentid === id)[0]
377
- let dev = this.getDevFromDevsOrIndex(devs, id, index)
378
- index = index + 1
358
+ let dev = devs.filter(ist => ist.agentid === id)[0]
379
359
  let patternId = dev.patternid
380
360
  let currPattern
381
361
  if (Array.isArray(currPatternList)) {