Conformance: processing time, waiting time, cycle time, update all tiem range.

This commit is contained in:
chiayin
2023-08-23 18:01:37 +08:00
parent ca359436e4
commit 70b4193275

View File

@@ -59,9 +59,9 @@ export default {
const loadingStore = LoadingStore(); const loadingStore = LoadingStore();
const conformanceStore = ConformanceStore(); const conformanceStore = ConformanceStore();
const { isLoading } = storeToRefs(loadingStore); const { isLoading } = storeToRefs(loadingStore);
const { selectedRuleType, selectedActivitySequence, selectedMode, selectedProcessScope, selectedActSeqMore, selectedActSeqFromTo, conformanceAllTasks, cfmPtEteStart, cfmPtEteEnd, cfmPtEteSE, cfmPtPStart, cfmPtPEnd, cfmPtPSE, cfmWtEteStart, cfmWtEteEnd, cfmWtEteSE, cfmWtPStart, cfmWtPEnd, cfmWtPSE, cfmCtEteStart, cfmCtEteEnd, cfmCtEteSE } = storeToRefs(conformanceStore); const { selectedRuleType, selectedActivitySequence, selectedMode, selectedProcessScope, selectedActSeqMore, selectedActSeqFromTo, conformanceAllTasks, cfmPtEteWhole, cfmPtEteStart, cfmPtEteEnd, cfmPtEteSE, cfmPtPStart, cfmPtPEnd, cfmPtPSE, cfmWtEteWhole, cfmWtEteStart, cfmWtEteEnd, cfmWtEteSE, cfmWtPStart, cfmWtPEnd, cfmWtPSE, cfmCtEteWhole, cfmCtEteStart, cfmCtEteEnd, cfmCtEteSE } = storeToRefs(conformanceStore);
return { isLoading, selectedRuleType, selectedActivitySequence, selectedMode, selectedProcessScope, selectedActSeqMore, selectedActSeqFromTo, conformanceStore, conformanceAllTasks, cfmPtEteStart, cfmPtEteEnd, cfmPtEteSE, cfmPtPStart, cfmPtPEnd, cfmPtPSE, cfmWtEteStart, cfmWtEteEnd, cfmWtEteSE, cfmWtPStart, cfmWtPEnd, cfmWtPSE, cfmCtEteStart, cfmCtEteEnd, cfmCtEteSE } return { isLoading, selectedRuleType, selectedActivitySequence, selectedMode, selectedProcessScope, selectedActSeqMore, selectedActSeqFromTo, conformanceStore, conformanceAllTasks, cfmPtEteWhole, cfmPtEteStart, cfmPtEteEnd, cfmPtEteSE, cfmPtPStart, cfmPtPEnd, cfmPtPSE, cfmWtEteWhole, cfmWtEteStart, cfmWtEteEnd, cfmWtEteSE, cfmWtPStart, cfmWtPEnd, cfmWtPSE, cfmCtEteWhole, cfmCtEteStart, cfmCtEteEnd, cfmCtEteSE }
}, },
data() { data() {
return { return {
@@ -135,11 +135,12 @@ export default {
if(i.start === task && i.end === taskTwo) this.selectDurationTime = i.time; if(i.start === task && i.end === taskTwo) this.selectDurationTime = i.time;
}); });
break; break;
case 'all':
this.selectDurationTime = data;
break
default: default:
break; break;
} };
}, },
/** /**
* select Time Reset * select Time Reset
@@ -210,7 +211,7 @@ export default {
break; break;
}; };
if(this.selectedRuleType === 'Have activity') { // Activity Sequence 選 Have activity 的行為 if(this.selectedRuleType === 'Have activity') { // Rule Type 選 Have activity 的行為
if(!this.selectConformanceTask?.length) return this.$toast.error('Not selected.'); if(!this.selectConformanceTask?.length) return this.$toast.error('Not selected.');
else { else {
data = { data = {
@@ -254,7 +255,7 @@ export default {
this.isSubmitDurationData = null; this.isSubmitDurationData = null;
} }
} }
}else if(this.selectedRuleType === 'Activity duration') { // Activity Sequence 選 Activity duration 的行為 }else if(this.selectedRuleType === 'Activity duration') { // Rule Type 選 Activity duration 的行為
if(!this.selectDurationData?.length) return this.$toast.error('Not selected.'); if(!this.selectDurationData?.length) return this.$toast.error('Not selected.');
else { else {
data = { data = {
@@ -269,7 +270,33 @@ export default {
this.isSubmitStartAndEnd = null; this.isSubmitStartAndEnd = null;
this.isSubmitListSeq = []; this.isSubmitListSeq = [];
} }
}else if(this.selectedRuleType === 'Processing time') { // Rule Type 選 Processing time 的行為
if(this.selectedProcessScope === 'selectedProcessScope') {
switch (this.selectedActSeqMore) {
case 'All':
data = {
min: this.selectDurationTime.min,
max: this.selectDurationTime.max,
type: 'processing-time-end-to-end-whole',
}
break;
case 'Start':
break;
case 'End':
break;
case 'Start & End':
break;
default:
break;
}
}
}; };
// selectedActSeqMore, selectedActSeqFromTo,
this.isLoading = true; this.isLoading = true;
this.isSubmit = true; this.isSubmit = true;
@@ -412,6 +439,21 @@ export default {
this.selectDurationData = null; this.selectDurationData = null;
this.selectDurationTime = null; this.selectDurationTime = null;
}; };
switch (this.selectedRuleType) {
case 'Processing time':
console.log(this.cfmPtEteWhole);
this.getDurationTime(this.cfmPtEteWhole, 'all');
break;
case 'Waiting time':
console.log(this.cfmWtEteWhole);
this.getDurationTime(this.cfmWtEteWhole, 'all');
break;
case 'Cycle time':
this.getDurationTime(this.cfmCtEteWhole, 'all');
break;
default:
break;
};
}); });
this.$emitter.on('isRadioSeqChange', (data) => { this.$emitter.on('isRadioSeqChange', (data) => {
if(data) { if(data) {
@@ -425,9 +467,29 @@ export default {
}; };
}); });
this.$emitter.on('isRadioActSeqMoreChange', (data) => { this.$emitter.on('isRadioActSeqMoreChange', (data) => {
if(data) { if(data) {
if(this.selectedActSeqMore === 'All') {
switch (this.selectedRuleType) {
case 'Processing time':
console.log(this.cfmPtEteWhole);
this.getDurationTime(this.cfmPtEteWhole, 'all');
break;
case 'Waiting time':
console.log(this.cfmWtEteWhole);
this.getDurationTime(this.cfmWtEteWhole, 'all');
break;
case 'Cycle time':
this.getDurationTime(this.cfmCtEteWhole, 'all');
break;
default:
break;
};
}else{
this.selectDurationTime = null; this.selectDurationTime = null;
}; };
};
}); });
this.$emitter.on('isRadioActSeqFromToChange', (data) => { this.$emitter.on('isRadioActSeqFromToChange', (data) => {
if(data) { if(data) {