openatc-components 0.2.8 → 0.2.10

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openatc-components",
3
- "version": "0.2.8",
3
+ "version": "0.2.10",
4
4
  "description": "A Vue.js project",
5
5
  "author": "openatc developer",
6
6
  "private": false,
@@ -455,7 +455,10 @@ const en = {
455
455
  'phase': 'Phase',
456
456
  'agentidError': 'Failed to get agentid!',
457
457
  'splitCheckMsg': 'The green letter ratio must be greater than the phase transition time or the pedestrian crossing + pedestrian transition time!',
458
- 'pattern': 'Pattern'
458
+ 'pattern': 'Pattern',
459
+ 'green': 'Green',
460
+ 'yellow': 'Yellow',
461
+ 'red': 'Red'
459
462
  },
460
463
  'plan': {
461
464
  'tipcontext': 'Please input your plan_name',
@@ -890,6 +893,8 @@ const en = {
890
893
  'common': {
891
894
  'confirm': 'Confirm',
892
895
  'query': 'Query',
896
+ 'stageStyle': 'Stage Style',
897
+ 'ringStyle': 'Ring Style',
893
898
  'cancel': 'Cancel',
894
899
  'add': 'Add',
895
900
  'delete': 'Delete',
@@ -453,7 +453,10 @@ const zh = {
453
453
  'phase': '相位',
454
454
  'agentidError': '获取设备ID失败!',
455
455
  'splitCheckMsg': '绿信比需大于相位过渡时间或绿信比需大于行人过街+行人过渡时间!',
456
- 'pattern': '方案'
456
+ 'pattern': '方案',
457
+ 'green': '绿灯',
458
+ 'yellow': '黄灯',
459
+ 'red': '红灯清空'
457
460
  },
458
461
  'plan': {
459
462
  'tipcontext': '请输入计划名!',
@@ -888,6 +891,8 @@ const zh = {
888
891
  'common': {
889
892
  'confirm': '确认',
890
893
  'query': '查询',
894
+ 'stageStyle': '阶段配置',
895
+ 'ringStyle': '环配置',
891
896
  'cancel': '取消',
892
897
  'add': '添加',
893
898
  'delete': '删除',
@@ -13,6 +13,7 @@
13
13
  :localPatternList="localPatternList"
14
14
  :showCondition="showCondition"
15
15
  :contrloType="contrloType"
16
+ :allPatternList="allPatternList"
16
17
  :stagesChange="stagesChange"
17
18
  :cycleChange="cycleChange"
18
19
  :patternList="patternList"
@@ -54,6 +55,9 @@ export default {
54
55
  controlPhase: {
55
56
  type: Object
56
57
  },
58
+ allPatternList: {
59
+ type: Array
60
+ },
57
61
  localPatternList: {
58
62
  type: Array
59
63
  },
@@ -144,6 +144,9 @@ export default {
144
144
  type: Boolean,
145
145
  default: false
146
146
  },
147
+ allPatternList: {
148
+ type: Array
149
+ },
147
150
  localPatternList: {
148
151
  type: Array
149
152
  },
@@ -429,11 +432,11 @@ export default {
429
432
  },
430
433
  getStage () {
431
434
  if (!this.stagesChange) return
432
- const globalParamModel = this.$store.getters.globalParamModel
433
- let pattern = globalParamModel.getParamsByType('patternList')
434
- let mapAdd = pattern.map(item => item.stagesList).map(item => {
435
+ // const globalParamModel = this.$store.getters.globalParamModel
436
+ // let pattern = globalParamModel.getParamsByType('patternList')
437
+ let mapAdd = this.allPatternList.map(item => item.stagesList).map(item => {
435
438
  return item.map(val => {
436
- return val.stageSplit
439
+ return val.stageSplit ? val.stageSplit : val.split
437
440
  })
438
441
  })
439
442
  let maxCycle = mapAdd.length > 0 ? mapAdd.map(item => {
@@ -441,6 +444,7 @@ export default {
441
444
  return a + b
442
445
  }) : 0
443
446
  }) : 0
447
+ console.log(maxCycle, 'maxCycle')
444
448
  let stageMaxCyle = Math.max(...maxCycle)// 每个环的周期最大值
445
449
  if (!this.cycleChange) {
446
450
  let stageCycleList = this.stagesChange.map(item => {
@@ -460,6 +464,7 @@ export default {
460
464
  redWidth: (item.red / stageMaxCyle * 100).toFixed(3) + '%'
461
465
  }
462
466
  })
467
+ console.log(this.stageLists, '011')
463
468
  },
464
469
  getBusPos () {
465
470
  // 公交相位信息
@@ -1046,9 +1051,9 @@ export default {
1046
1051
  this.fillGap(ringTeams, val)
1047
1052
  }
1048
1053
  if (this.cycleChange) {
1049
- const globalParamModel = this.$store.getters.globalParamModel
1050
- let pattern = globalParamModel.getParamsByType('patternList')
1051
- const allCycle = pattern.map(item => item.cycle)
1054
+ // const globalParamModel = this.$store.getters.globalParamModel
1055
+ // let pattern = globalParamModel.getParamsByType('patternList')
1056
+ const allCycle = this.patternList.map(item => item.cycle)
1052
1057
  let cycle = Math.max(...allCycle)
1053
1058
  this.max = cycle
1054
1059
  } else {