Conformance: Time Range done.

This commit is contained in:
chiayin
2023-08-29 15:47:31 +08:00
parent 2b90c02a8c
commit 1e49e11a1b
2 changed files with 24 additions and 2 deletions

View File

@@ -25,7 +25,7 @@
:isSubmitDurationData="isSubmitDurationData" :isSubmitDurationData="isSubmitDurationData"
></ConformanceSelectResult> ></ConformanceSelectResult>
<!-- time range --> <!-- time range -->
<ConformanceTimeRange v-if="selectedRuleType === 'Activity duration' || selectedRuleType === 'Processing time' || selectedRuleType === 'Waiting time' || selectedRuleType === 'Cycle time'" :time="selectDurationTime"></ConformanceTimeRange> <ConformanceTimeRange v-if="selectedRuleType === 'Activity duration' || selectedRuleType === 'Processing time' || selectedRuleType === 'Waiting time' || selectedRuleType === 'Cycle time'" :time="selectDurationTime" @min-total-seconds="minTotalSeconds" @max-total-seconds="maxTotalSeconds" ></ConformanceTimeRange>
</div> </div>
<!-- button --> <!-- button -->
<div class="space-x-4 p-4 flex justify-center items-content border-t border-neutral-300"> <div class="space-x-4 p-4 flex justify-center items-content border-t border-neutral-300">
@@ -76,6 +76,8 @@ export default {
listSeq: [], listSeq: [],
selectDurationData: null, selectDurationData: null,
selectDurationTime: null, selectDurationTime: null,
selectTimeRangeMin: 0, // Time Range min
selectTimeRangeMax: 0, // Time Range max
selectCfmPtEteStart: null, // Processing time selectCfmPtEteStart: null, // Processing time
selectCfmPtEteEnd: null, selectCfmPtEteEnd: null,
selectCfmPtEteSEStart: null, selectCfmPtEteSEStart: null,
@@ -142,6 +144,20 @@ export default {
break; break;
}; };
}, },
/**
* get min total seconds
* @param {Number} e
*/
minTotalSeconds(e) {
this.selectTimeRangeMin = e;
},
/**
* get min total seconds
* @param {Number} e
*/
maxTotalSeconds(e) {
this.selectTimeRangeMax = e;
},
/** /**
* select Time Reset * select Time Reset
*/ */
@@ -154,7 +170,9 @@ export default {
this.selectConformanceFrom = null; this.selectConformanceFrom = null;
this.selectConformanceTo = null; this.selectConformanceTo = null;
this.listSeq = []; this.listSeq = [];
this.selectDurationData = null; // Activity duration this.selectDurationData = null; // Activity durations
this.selectTimeRangeMin = 0; // Time Range min
this.selectTimeRangeMax = 0; // Time Range max
this.selectCfmPtEteStart = null; // Processing time this.selectCfmPtEteStart = null; // Processing time
this.selectCfmPtEteEnd = null; this.selectCfmPtEteEnd = null;
this.selectCfmPtEteSEStart = null; this.selectCfmPtEteSEStart = null;
@@ -229,6 +247,8 @@ export default {
default: default:
break; break;
}; };
this.selectDurationTime.min = this.selectTimeRangeMin;
this.selectDurationTime.max = this.selectTimeRangeMax;
switch (this.selectedRuleType) { switch (this.selectedRuleType) {
case 'Have activity': // Rule Type 選 Have activity 的行為 case 'Have activity': // Rule Type 選 Have activity 的行為

View File

@@ -70,6 +70,7 @@ export default {
*/ */
minTotalSeconds(e) { minTotalSeconds(e) {
this.timeRangeMin = e; this.timeRangeMin = e;
this.$emit('min-total-seconds', e);
}, },
/** /**
* get min total seconds * get min total seconds
@@ -78,6 +79,7 @@ export default {
maxTotalSeconds(e) { maxTotalSeconds(e) {
this.timeRangeMax = e; this.timeRangeMax = e;
this.updateMax = e; this.updateMax = e;
this.$emit('max-total-seconds', e);
}, },
}, },
} }