openatc-components 0.1.43 → 0.1.45

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.1.43",
3
+ "version": "0.1.45",
4
4
  "description": "A Vue.js project",
5
5
  "author": "openatc developer",
6
6
  "private": false,
@@ -133,7 +133,7 @@
133
133
  :overlap="overlap"
134
134
  :checked="true"
135
135
  :tentative="true"
136
- :cycle="patternOne.length===0?planPattern.cycle:patternOne[0].cycle"
136
+ :cycle="overLapCycle"
137
137
  >
138
138
  </over-lap>
139
139
  </el-col>
@@ -200,6 +200,7 @@ export default {
200
200
  return {
201
201
  stagesList: [],
202
202
  phaseRings: [],
203
+ overLapCycle: 0,
203
204
  options: {
204
205
  group: 'pattern'
205
206
  },
@@ -470,6 +471,7 @@ export default {
470
471
  let stageItem = this.getStageItem(stage, rings, i)
471
472
  stagesList.push(JSON.parse(JSON.stringify(stageItem)))
472
473
  }
474
+ this.overLapCycle = stagesList.reduce((prev, curr) => prev + parseInt(curr.split), 0)
473
475
  this.stagesList = JSON.parse(JSON.stringify(stagesList))
474
476
  }
475
477
  }
@@ -576,25 +578,25 @@ export default {
576
578
  }
577
579
  return maxCycle
578
580
  },
579
- checkPatternRules (rings) {
580
- if (!this.isRingCycleEqual(rings)) {
581
- this.patternCycleEqual = false
582
- } else {
583
- this.patternCycleEqual = true
584
- }
585
- if (!this.patternCycleEqual) {
586
- let mess = `方案中存在环周期时长不一致`
587
- if (this.$i18n.locale === 'en') {
588
- mess = `Inconsistent loop cycle durations exist in the scheme`
589
- }
590
- this.$message({
591
- message: mess,
592
- type: 'error',
593
- dangerouslyUseHTMLString: true
594
- })
595
- return false
596
- }
597
- },
581
+ // checkPatternRules (rings) {
582
+ // if (!this.isRingCycleEqual(rings)) {
583
+ // this.patternCycleEqual = false
584
+ // } else {
585
+ // this.patternCycleEqual = true
586
+ // }
587
+ // if (!this.patternCycleEqual) {
588
+ // let mess = `方案中存在环周期时长不一致`
589
+ // if (this.$i18n.locale === 'en') {
590
+ // mess = `Inconsistent loop cycle durations exist in the scheme`
591
+ // }
592
+ // this.$message({
593
+ // message: mess,
594
+ // type: 'error',
595
+ // dangerouslyUseHTMLString: true
596
+ // })
597
+ // return false
598
+ // }
599
+ // },
598
600
  handleManualControl () {
599
601
  let submitdata = {
600
602
  control: 100,
@@ -610,7 +612,7 @@ export default {
610
612
  }
611
613
  submitdata.data.offset = this.offset
612
614
  submitdata.data.rings = this.rings
613
- this.checkPatternRules(submitdata.data.rings)
615
+ // this.checkPatternRules(submitdata.data.rings)
614
616
  if (this.patternCycleEqual) {
615
617
  this.$emit('closePhaseControl', submitdata)
616
618
  }