openatc-components 0.2.9 → 0.2.11

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.9",
3
+ "version": "0.2.11",
4
4
  "description": "A Vue.js project",
5
5
  "author": "openatc developer",
6
6
  "private": false,
@@ -47,7 +47,8 @@ export default {
47
47
  },
48
48
  data () {
49
49
  return {
50
- overlapDatas: []
50
+ overlapDatas: [],
51
+ max: ''
51
52
  }
52
53
  },
53
54
  props: {
@@ -67,6 +68,10 @@ export default {
67
68
  type: Boolean,
68
69
  default: false
69
70
  },
71
+ cycleChange: {
72
+ type: Boolean,
73
+ default: true
74
+ },
70
75
  cycle: {
71
76
  type: Number
72
77
  },
@@ -82,6 +87,13 @@ export default {
82
87
  // 深度观察监听
83
88
  deep: true
84
89
  },
90
+ cycleChange: {
91
+ handler: function (val, oldVal) {
92
+ this.doAdd(this.stageList, this.overlap)
93
+ },
94
+ // 深度观察监听
95
+ deep: true
96
+ },
85
97
  stageList: {
86
98
  handler: function (val, oldVal) {
87
99
  this.doAdd(this.stageList, this.overlap)
@@ -140,6 +152,15 @@ export default {
140
152
  if (findItems.length) findIndexs.push(...findItems.map(m => m.key))
141
153
  })
142
154
  findIndexs = Array.from(new Set(findIndexs))
155
+ if (this.cycleChange) {
156
+ const globalParamModel = this.$store.getters.globalParamModel
157
+ let pattern = globalParamModel.getParamsByType('patternList')
158
+ const allCycle = pattern.map(item => item.cycle)
159
+ let cycle = Math.max(...allCycle)
160
+ this.max = cycle
161
+ } else {
162
+ this.max = ''
163
+ }
143
164
  return {
144
165
  ...item,
145
166
  peddirection: this.getPedPhasePos(item.peddirection),
@@ -150,8 +171,8 @@ export default {
150
171
  ...sta,
151
172
  direction: this.getRoad(item),
152
173
  // peddirection: this.getPedPhasePos(item.peddirection),
153
- greenWidth: find ? (sta.split / this.cycle * 100).toFixed(3) + '%' : '0%',
154
- redWidth: !find ? (sta.split / this.cycle * 100).toFixed(3) + '%' : '0%'
174
+ greenWidth: find ? (sta.split / (this.max ? this.max : this.cycle) * 100).toFixed(3) + '%' : '0%',
175
+ redWidth: !find ? (sta.split / (this.max ? this.max : this.cycle) * 100).toFixed(3) + '%' : '0%'
155
176
  }
156
177
  })
157
178
  }
@@ -1051,9 +1051,9 @@ export default {
1051
1051
  this.fillGap(ringTeams, val)
1052
1052
  }
1053
1053
  if (this.cycleChange) {
1054
- // const globalParamModel = this.$store.getters.globalParamModel
1055
- // let pattern = globalParamModel.getParamsByType('patternList')
1056
- const allCycle = this.patternList.map(item => item.cycle)
1054
+ const globalParamModel = this.$store.getters.globalParamModel
1055
+ let pattern = globalParamModel.getParamsByType('patternList')
1056
+ const allCycle = pattern.map(item => item.cycle)
1057
1057
  let cycle = Math.max(...allCycle)
1058
1058
  this.max = cycle
1059
1059
  } else {
@@ -212,7 +212,7 @@
212
212
  @onStageAdvanceendChange="onStageAdvanceendChange"
213
213
  >
214
214
  </stage-bord>
215
- <div v-if="isRing" style="margin-left: 10px">
215
+ <div v-if="isRing" style="margin-left: 20px">
216
216
  <el-button
217
217
  type="primary"
218
218
  @click="
@@ -80,6 +80,6 @@
80
80
  }
81
81
 
82
82
  .components-container {
83
- margin: 12px 12px;
83
+ margin: 30px 50px;
84
84
  position: relative;
85
85
  }
@@ -345,9 +345,6 @@
345
345
  .optimizetype {
346
346
  color: $--color-text-primary;
347
347
  }
348
- .todo {
349
- float: left;
350
- }
351
348
  .stage-item {
352
349
  cursor: pointer;
353
350
  width: 100%;
@@ -435,7 +432,7 @@
435
432
  margin-bottom: 13PX;
436
433
  }
437
434
  .common-board-column {
438
- // max-width: unset !important;
435
+ max-width: unset !important;
439
436
  .el-select {
440
437
  width: 100% !important;
441
438
  }