openatc-components 0.5.75 → 0.5.77

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.
@@ -41,19 +41,22 @@
41
41
 
42
42
  <div class="stage-part" v-if="preselecttype === '阶段锁定'">
43
43
  <div class="stage-label">{{$t('openatccomponents.overview.stage')}}</div>
44
- <div style="width: 100%; height: auto;overflow: hidden;display: flex;align-items: center;" v-if="isHasPermission('configer:manual:dwell')">
45
- <div style="flex: 1;">
46
- <Stages :crossStatusData="manuals?manualsStage:realtimeStage"
47
- :phaseList="phaseList"
48
- :preselectStages="preselectStages"
49
- :preselectModel="preselectModel"
50
- :isShowCurrentStage="false"
51
- @onSelectStages="selectStages"></Stages>
52
- </div>
53
- <div style="display: flex;gap: 10px;margin-left: 15px;">
54
- <div class="single-model stage-btn stage-btn-extend" @click="selectStages(998)" :class="preselectStages === 998 ? 'stage-btn-active' : ''">延长</div>
55
- <div class="single-model stage-btn stage-btn-shorten" @click="selectStages(999)" :class="preselectStages === 999 ? 'stage-btn-active' : ''">缩短</div>
56
- </div>
44
+ <div style="width: 100%; height: auto;overflow: hidden;" v-if="isHasPermission('configer:manual:dwell')">
45
+ <Stages :crossStatusData="manuals?manualsStage:realtimeStage"
46
+ :phaseList="phaseList"
47
+ :preselectStages="preselectStages"
48
+ :preselectModel="preselectModel"
49
+ :isShowCurrentStage="false"
50
+ @onSelectStages="selectStages">
51
+ <template v-slot:after-stages>
52
+ <div class="control-model">
53
+ <div class="single-model stage-btn stage-btn-extend" style="width: 70px; height: 80px;" @click="selectStages(998)" :class="preselectStages === 998 ? 'stage-btn-active' : ''">延长</div>
54
+ </div>
55
+ <div class="control-model">
56
+ <div class="single-model stage-btn stage-btn-shorten" style="width: 70px; height: 80px;" @click="selectStages(999)" :class="preselectStages === 999 ? 'stage-btn-active' : ''">缩短</div>
57
+ </div>
58
+ </template>
59
+ </Stages>
57
60
  </div>
58
61
  </div>
59
62
 
@@ -46,6 +46,7 @@
46
46
  </div>
47
47
  </div>
48
48
  </div>
49
+ <slot name="after-stages"></slot>
49
50
  </div>
50
51
  </div>
51
52
  </template>
@@ -203,16 +204,19 @@ export default {
203
204
  }
204
205
  },
205
206
  watch: {
206
- preselectStages: {
207
+ preselectStages: {
207
208
  handler: function (val, oldVal) {
208
- if(this.preselectStages === -1 && this.preselectModel !== -1) {
209
+ if (this.preselectStages > 0 && this.preselectStages <= this.stagesList.length) {
210
+ this.currentStage = this.preselectStages
211
+ } else {
209
212
  this.currentStage = -1
210
213
  }
214
+ this.clickType(this.stagesList, this.currentStage)
211
215
  },
212
216
  // 深度观察监听
213
217
  deep: true
214
218
  },
215
- preselectModel: {
219
+ preselectModel: {
216
220
  handler: function (val, oldVal) {
217
221
  if(this.preselectStages === -1 && this.preselectModel !== -1) {
218
222
  this.currentStage = -1
@@ -228,6 +232,12 @@ export default {
228
232
  } else {
229
233
  this.presetStageIndex = this.presetIndex
230
234
  }
235
+ if (this.preselectStages > 0 && this.preselectStages <= this.stagesList.length) {
236
+ this.currentStage = this.preselectStages
237
+ } else {
238
+ this.currentStage = -1
239
+ }
240
+ this.clickType(this.stagesList, this.currentStage)
231
241
  },
232
242
  // 深度观察监听
233
243
  deep: true