Conformance: processing time, waiting time, cycle time, add show activity selector not done.

This commit is contained in:
chiayin
2023-08-28 09:30:08 +08:00
parent 45e7d5a0a1
commit 83485fa8aa
3 changed files with 269 additions and 85 deletions

View File

@@ -146,30 +146,44 @@ export default {
* select Time Reset
*/
selectTimeReset() {
// 不包含 this.selectDurationTime
this.selectConformanceTask = null; // Have activity
selectConformanceStartAndEnd = null; // Activity Sequence
this.selectConformanceStartAndEnd = null; // Activity Sequence
this.selectConformanceStart = null;
this.selectConformanceEnd = null;
this.selectConformanceFrom = null;
this.selectConformanceTo = null;
this.listSeq = [];
this.selectDurationData = null; // Activity duration
selectCfmPtEteStart = null; // Processing time
selectCfmPtEteEnd = null;
selectCfmPtEteSEStart = null;
selectCfmPtEteSEEnd = null;
selectCfmPtPStart = null;
selectCfmPtPEnd = null;
selectCfmPtPSEStart = null;
selectCfmPtPSEEnd = null;
selectCfmWtEteStart = null; // Waiting time
selectCfmWtEteEnd = null;
selectCfmWtEteSEStart = null;
selectCfmWtEteSEEnd = null;
selectCfmWtPStart = null;
selectCfmWtPEnd = null;
selectCfmWtPSEStart = null;
selectCfmWtPSEEnd = null;
selectCfmCtEteStart = null; // Cycle time
selectCfmCtEteEnd = null;
selectCfmCtEteSEStart = null;
selectCfmCtEteSEEnd = null;
this.selectCfmPtEteStart = null; // Processing time
this.selectCfmPtEteEnd = null;
this.selectCfmPtEteSEStart = null;
this.selectCfmPtEteSEEnd = null;
this.selectCfmPtPStart = null;
this.selectCfmPtPEnd = null;
this.selectCfmPtPSEStart = null;
this.selectCfmPtPSEEnd = null;
this.selectCfmWtEteStart = null; // Waiting time
this.selectCfmWtEteEnd = null;
this.selectCfmWtEteSEStart = null;
this.selectCfmWtEteSEEnd = null;
this.selectCfmWtPStart = null;
this.selectCfmWtPEnd = null;
this.selectCfmWtPSEStart = null;
this.selectCfmWtPSEEnd = null;
this.selectCfmCtEteStart = null; // Cycle time
this.selectCfmCtEteEnd = null;
this.selectCfmCtEteSEStart = null;
this.selectCfmCtEteSEEnd = null;
},
/**
* is submit select Reset
*/
isSubmitReset() {
this.isSubmitTask = null;
this.isSubmitStartAndEnd = null;
this.isSubmitListSeq = [];
this.isSubmitDurationData = null;
},
/**
* @param {boolean} massage true | false 清空選單選項, 選擇的結果
@@ -224,11 +238,10 @@ export default {
type: 'contains-tasks',
tasks: this.selectConformanceTask,
};
this.isSubmitTask = this.selectConformanceTask;
// 其他 isSubmitData 為 null
this.isSubmitStartAndEnd = null;
this.isSubmitListSeq = [];
this.isSubmitDurationData = null;
this.isSubmitReset();
this.isSubmitTask = this.selectConformanceTask;
}
break;
case 'Activity sequence': // Rule Type 選 Activity sequence 的行為
@@ -241,14 +254,11 @@ export default {
starts_with: this.selectConformanceStartAndEnd[0],
ends_with: this.selectConformanceStartAndEnd[1],
};
this.isSubmitReset();
this.isSubmitStartAndEnd = [
{category: 'Start', task: this.selectConformanceStartAndEnd[0]},
{category: 'End', task: this.selectConformanceStartAndEnd[1]},
];
// 其他 isSubmitData 為 null
this.isSubmitTask = null;
this.isSubmitListSeq = [];
this.isSubmitDurationData = null;
};
break;
case 'Sequence': // Activity Sequence 選 Sequence 的行為
@@ -258,10 +268,8 @@ export default {
type: isMode,
task_seq: this.listSeq,
};
this.isSubmitReset();
this.isSubmitListSeq = this.listSeq;
this.isSubmitTask = null;
this.isSubmitStartAndEnd = null;
this.isSubmitDurationData = null;
};
default:
break;
@@ -276,11 +284,8 @@ export default {
min: this.selectDurationTime.min,
max: this.selectDurationTime.max,
};
this.isSubmitReset();
this.isSubmitDurationData = this.selectDurationData;
// 其他 isSubmitData 為 null
this.isSubmitTask = null;
this.isSubmitStartAndEnd = null;
this.isSubmitListSeq = [];
};
break;
case 'Processing time': // Rule Type 選 Processing time 的行為
@@ -295,7 +300,6 @@ export default {
};
break;
case 'Start':
this.selectCfmPtEteStart = null
if(!this.selectCfmPtEteStart) return this.$toast.error('Not selected.');
else data = {
task: this.selectCfmPtEteStart,
@@ -622,14 +626,7 @@ export default {
// Radio 切換時,資料要清空
this.$emitter.on('isRadioChange', (data) => {
if(data) {
this.selectConformanceTask = null;
this.selectConformanceStartAndEnd = null;
this.selectConformanceStart = null;
this.selectConformanceEnd = null;
this.selectConformanceFrom = null;
this.selectConformanceTo = null;
this.listSeq = [];
this.selectDurationData = null;
this.selectTimeReset();
this.selectDurationTime = null;
};
switch (this.selectedRuleType) {
@@ -662,11 +659,9 @@ export default {
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':