Conformance: processing time, waiting time, cycle time, add not select show toast done.
This commit is contained in:
@@ -146,6 +146,10 @@ export default {
|
|||||||
* select Time Reset
|
* select Time Reset
|
||||||
*/
|
*/
|
||||||
selectTimeReset() {
|
selectTimeReset() {
|
||||||
|
this.selectConformanceTask = null; // Have activity
|
||||||
|
selectConformanceStartAndEnd = null; // Activity Sequence
|
||||||
|
this.listSeq = [];
|
||||||
|
this.selectDurationData = null; // Activity duration
|
||||||
selectCfmPtEteStart = null; // Processing time
|
selectCfmPtEteStart = null; // Processing time
|
||||||
selectCfmPtEteEnd = null;
|
selectCfmPtEteEnd = null;
|
||||||
selectCfmPtEteSEStart = null;
|
selectCfmPtEteSEStart = null;
|
||||||
@@ -184,6 +188,7 @@ export default {
|
|||||||
this.isSubmit = false;
|
this.isSubmit = false;
|
||||||
|
|
||||||
// 其他子元件 reset
|
// 其他子元件 reset
|
||||||
|
this.selectTimeReset();
|
||||||
this.$emitter.emit('reset', null);
|
this.$emitter.emit('reset', null);
|
||||||
// reset 成功訊息
|
// reset 成功訊息
|
||||||
this.$toast.success('Reset Success.');
|
this.$toast.success('Reset Success.');
|
||||||
@@ -290,7 +295,9 @@ export default {
|
|||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
case 'Start':
|
case 'Start':
|
||||||
data = {
|
this.selectCfmPtEteStart = null
|
||||||
|
if(!this.selectCfmPtEteStart) return this.$toast.error('Not selected.');
|
||||||
|
else data = {
|
||||||
task: this.selectCfmPtEteStart,
|
task: this.selectCfmPtEteStart,
|
||||||
min: this.selectDurationTime.min,
|
min: this.selectDurationTime.min,
|
||||||
max: this.selectDurationTime.max,
|
max: this.selectDurationTime.max,
|
||||||
@@ -298,22 +305,24 @@ export default {
|
|||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
case 'End':
|
case 'End':
|
||||||
data = {
|
if(!this.selectCfmPtEteEnd) return this.$toast.error('Not selected.');
|
||||||
|
else data = {
|
||||||
task: this.selectCfmPtEteEnd,
|
task: this.selectCfmPtEteEnd,
|
||||||
min: this.selectDurationTime.min,
|
min: this.selectDurationTime.min,
|
||||||
max: this.selectDurationTime.max,
|
max: this.selectDurationTime.max,
|
||||||
type: 'processing-time-end-to-end-ends-with',
|
type: 'processing-time-end-to-end-ends-with',
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
case 'Start & End':
|
case 'Start & End':
|
||||||
data = {
|
if(!this.selectCfmPtEteSEStart || !this.selectCfmPtEteSEEnd) return this.$toast.error('Both Start and End must be selected.');
|
||||||
start: this.selectCfmPtEteSEStart,
|
else data = {
|
||||||
end: this.selectCfmPtEteSEEnd,
|
start: this.selectCfmPtEteSEStart,
|
||||||
min: this.selectDurationTime.min,
|
end: this.selectCfmPtEteSEEnd,
|
||||||
max: this.selectDurationTime.max,
|
min: this.selectDurationTime.min,
|
||||||
type: 'processing-time-end-to-end-start-end',
|
max: this.selectDurationTime.max,
|
||||||
};
|
type: 'processing-time-end-to-end-start-end',
|
||||||
break;
|
};
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
};
|
};
|
||||||
@@ -321,7 +330,8 @@ export default {
|
|||||||
case 'Partial':
|
case 'Partial':
|
||||||
switch (this.selectedActSeqFromTo) {
|
switch (this.selectedActSeqFromTo) {
|
||||||
case 'From':
|
case 'From':
|
||||||
data = {
|
if(!this.selectCfmPtPStart) return this.$toast.error('Not selected.');
|
||||||
|
else data = {
|
||||||
task: this.selectCfmPtPStart,
|
task: this.selectCfmPtPStart,
|
||||||
min: this.selectDurationTime.min,
|
min: this.selectDurationTime.min,
|
||||||
max: this.selectDurationTime.max,
|
max: this.selectDurationTime.max,
|
||||||
@@ -329,22 +339,24 @@ export default {
|
|||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
case 'To':
|
case 'To':
|
||||||
data = {
|
if(!this.selectCfmPtPEnd) return this.$toast.error('Not selected.');
|
||||||
|
else data = {
|
||||||
task: this.selectCfmPtPEnd,
|
task: this.selectCfmPtPEnd,
|
||||||
min: this.selectDurationTime.min,
|
min: this.selectDurationTime.min,
|
||||||
max: this.selectDurationTime.max,
|
max: this.selectDurationTime.max,
|
||||||
type: 'processing-time-partial-ends-with',
|
type: 'processing-time-partial-ends-with',
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
case 'From & To':
|
case 'From & To':
|
||||||
data = {
|
if(!this.selectCfmPtPSEStart || !this.selectCfmPtPSEEnd) return this.$toast.error('Both Start and End must be selected.');
|
||||||
|
else data = {
|
||||||
start: this.selectCfmPtPSEStart,
|
start: this.selectCfmPtPSEStart,
|
||||||
end: this.selectCfmPtPSEEnd,
|
end: this.selectCfmPtPSEEnd,
|
||||||
min: this.selectDurationTime.min,
|
min: this.selectDurationTime.min,
|
||||||
max: this.selectDurationTime.max,
|
max: this.selectDurationTime.max,
|
||||||
type: 'processing-time-partial-start-end',
|
type: 'processing-time-partial-start-end',
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
};
|
};
|
||||||
@@ -365,7 +377,8 @@ export default {
|
|||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
case 'Start':
|
case 'Start':
|
||||||
data = {
|
if(!this.selectCfmWtEteStart) return this.$toast.error('Not selected.');
|
||||||
|
else data = {
|
||||||
task: this.selectCfmWtEteStart,
|
task: this.selectCfmWtEteStart,
|
||||||
min: this.selectDurationTime.min,
|
min: this.selectDurationTime.min,
|
||||||
max: this.selectDurationTime.max,
|
max: this.selectDurationTime.max,
|
||||||
@@ -373,15 +386,17 @@ export default {
|
|||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
case 'End':
|
case 'End':
|
||||||
data = {
|
if(!this.selectCfmWtEteEnd) return this.$toast.error('Not selected.');
|
||||||
|
else data = {
|
||||||
task: this.selectCfmWtEteEnd,
|
task: this.selectCfmWtEteEnd,
|
||||||
min: this.selectDurationTime.min,
|
min: this.selectDurationTime.min,
|
||||||
max: this.selectDurationTime.max,
|
max: this.selectDurationTime.max,
|
||||||
type: 'waiting-time-end-to-end-ends-with',
|
type: 'waiting-time-end-to-end-ends-with',
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
case 'Start & End':
|
case 'Start & End':
|
||||||
data = {
|
if(!this.selectCfmWtEteSEStart || !this.selectCfmWtEteSEEnd) return this.$toast.error('Both Start and End must be selected.');
|
||||||
|
else data = {
|
||||||
start: this.selectCfmWtEteSEStart,
|
start: this.selectCfmWtEteSEStart,
|
||||||
end: this.selectCfmWtEteSEEnd,
|
end: this.selectCfmWtEteSEEnd,
|
||||||
min: this.selectDurationTime.min,
|
min: this.selectDurationTime.min,
|
||||||
@@ -396,7 +411,8 @@ export default {
|
|||||||
case 'Partial':
|
case 'Partial':
|
||||||
switch (this.selectedActSeqFromTo) {
|
switch (this.selectedActSeqFromTo) {
|
||||||
case 'From':
|
case 'From':
|
||||||
data = {
|
if(!this.selectCfmWtPStart) return this.$toast.error('Not selected.');
|
||||||
|
else data = {
|
||||||
task: this.selectCfmWtPStart,
|
task: this.selectCfmWtPStart,
|
||||||
min: this.selectDurationTime.min,
|
min: this.selectDurationTime.min,
|
||||||
max: this.selectDurationTime.max,
|
max: this.selectDurationTime.max,
|
||||||
@@ -404,15 +420,17 @@ export default {
|
|||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
case 'To':
|
case 'To':
|
||||||
data = {
|
if(!this.selectCfmWtPEnd) return this.$toast.error('Not selected.');
|
||||||
|
else data = {
|
||||||
task: this.selectCfmWtPEnd,
|
task: this.selectCfmWtPEnd,
|
||||||
min: this.selectDurationTime.min,
|
min: this.selectDurationTime.min,
|
||||||
max: this.selectDurationTime.max,
|
max: this.selectDurationTime.max,
|
||||||
type: 'waiting-time-partial-ends-with',
|
type: 'waiting-time-partial-ends-with',
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
case 'From & To':
|
case 'From & To':
|
||||||
data = {
|
if(!this.selectCfmWtPSEStart || !this.selectCfmWtPSEEnd) return this.$toast.error('Both Start and End must be selected.');
|
||||||
|
else data = {
|
||||||
start: this.selectCfmWtPSEStart,
|
start: this.selectCfmWtPSEStart,
|
||||||
end: this.selectCfmWtPSEEnd,
|
end: this.selectCfmWtPSEEnd,
|
||||||
min: this.selectDurationTime.min,
|
min: this.selectDurationTime.min,
|
||||||
@@ -438,7 +456,8 @@ export default {
|
|||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
case 'Start':
|
case 'Start':
|
||||||
data = {
|
if(!this.selectCfmCtEteStart) return this.$toast.error('Not selected.');
|
||||||
|
else data = {
|
||||||
task: this.selectCfmCtEteStart,
|
task: this.selectCfmCtEteStart,
|
||||||
min: this.selectDurationTime.min,
|
min: this.selectDurationTime.min,
|
||||||
max: this.selectDurationTime.max,
|
max: this.selectDurationTime.max,
|
||||||
@@ -446,15 +465,17 @@ export default {
|
|||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
case 'End':
|
case 'End':
|
||||||
data = {
|
if(!this.selectCfmCtEteEnd) return this.$toast.error('Not selected.');
|
||||||
|
else data = {
|
||||||
task: this.selectCfmCtEteEnd,
|
task: this.selectCfmCtEteEnd,
|
||||||
min: this.selectDurationTime.min,
|
min: this.selectDurationTime.min,
|
||||||
max: this.selectDurationTime.max,
|
max: this.selectDurationTime.max,
|
||||||
type: 'cycle-time-end-to-end-ends-with',
|
type: 'cycle-time-end-to-end-ends-with',
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
case 'Start & End':
|
case 'Start & End':
|
||||||
data = {
|
if(!this.selectCfmCtEteSEStart || !this.selectCfmCtEteSEEnd) return this.$toast.error('Both Start and End must be selected.');
|
||||||
|
else data = {
|
||||||
start: this.selectCfmCtEteSEStart,
|
start: this.selectCfmCtEteSEStart,
|
||||||
end: this.selectCfmCtEteSEEnd,
|
end: this.selectCfmCtEteSEEnd,
|
||||||
min: this.selectDurationTime.min,
|
min: this.selectDurationTime.min,
|
||||||
@@ -470,144 +491,6 @@ export default {
|
|||||||
break;
|
break;
|
||||||
};
|
};
|
||||||
|
|
||||||
// if(this.selectedRuleType === 'Have activity') { // Rule Type 選 Have activity 的行為
|
|
||||||
// if(!this.selectConformanceTask?.length) return this.$toast.error('Not selected.');
|
|
||||||
// else {
|
|
||||||
// data = {
|
|
||||||
// type: 'contains-tasks',
|
|
||||||
// tasks: this.selectConformanceTask,
|
|
||||||
// };
|
|
||||||
// this.isSubmitTask = this.selectConformanceTask;
|
|
||||||
// // 其他 isSubmitData 為 null
|
|
||||||
// this.isSubmitStartAndEnd = null;
|
|
||||||
// this.isSubmitListSeq = [];
|
|
||||||
// this.isSubmitDurationData = null;
|
|
||||||
// }
|
|
||||||
// }else if(this.selectedRuleType === 'Activity sequence') { // Activity Sequence 選 Start & End 的行為
|
|
||||||
// if(this.selectedActivitySequence === 'Start & End'){
|
|
||||||
// if(this.selectConformanceStartAndEnd === null || this.selectConformanceStartAndEnd.length === 0) return this.$toast.error('Both Start and End must be selected.');
|
|
||||||
// else {
|
|
||||||
// data = {
|
|
||||||
// type: 'start-end',
|
|
||||||
// starts_with: this.selectConformanceStartAndEnd[0],
|
|
||||||
// ends_with: this.selectConformanceStartAndEnd[1],
|
|
||||||
// };
|
|
||||||
// this.isSubmitStartAndEnd = [
|
|
||||||
// {category: 'Start', task: this.selectConformanceStartAndEnd[0]},
|
|
||||||
// {category: 'End', task: this.selectConformanceStartAndEnd[1]},
|
|
||||||
// ];
|
|
||||||
// // 其他 isSubmitData 為 null
|
|
||||||
// this.isSubmitTask = null;
|
|
||||||
// this.isSubmitListSeq = [];
|
|
||||||
// this.isSubmitDurationData = null;
|
|
||||||
// }
|
|
||||||
// }else if(this.selectedActivitySequence === 'Sequence'){ // Activity Sequence 選 Sequence 的行為
|
|
||||||
// if(this.listSeq.length < 2) return this.$toast.error('Select two or more.');
|
|
||||||
// else {
|
|
||||||
// data = {
|
|
||||||
// type: isMode,
|
|
||||||
// task_seq: this.listSeq,
|
|
||||||
// };
|
|
||||||
// this.isSubmitListSeq = this.listSeq;
|
|
||||||
// this.isSubmitTask = null;
|
|
||||||
// this.isSubmitStartAndEnd = null;
|
|
||||||
// this.isSubmitDurationData = null;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }else if(this.selectedRuleType === 'Activity duration') { // Rule Type 選 Activity duration 的行為
|
|
||||||
// if(!this.selectDurationData?.length) return this.$toast.error('Not selected.');
|
|
||||||
// else {
|
|
||||||
// data = {
|
|
||||||
// type: 'task-duration',
|
|
||||||
// task: this.selectDurationData[0],
|
|
||||||
// min: this.selectDurationTime.min,
|
|
||||||
// max: this.selectDurationTime.max,
|
|
||||||
// };
|
|
||||||
// this.isSubmitDurationData = this.selectDurationData;
|
|
||||||
// // 其他 isSubmitData 為 null
|
|
||||||
// this.isSubmitTask = null;
|
|
||||||
// this.isSubmitStartAndEnd = null;
|
|
||||||
// this.isSubmitListSeq = [];
|
|
||||||
// }
|
|
||||||
// }else if(this.selectedRuleType === 'Processing time') { // Rule Type 選 Processing time 的行為
|
|
||||||
// switch (this.selectedProcessScope) {
|
|
||||||
// case 'End to end':
|
|
||||||
// switch (this.selectedActSeqMore) {
|
|
||||||
// case 'All':
|
|
||||||
// data = {
|
|
||||||
// min: this.selectDurationTime.min,
|
|
||||||
// max: this.selectDurationTime.max,
|
|
||||||
// type: 'processing-time-end-to-end-whole',
|
|
||||||
// };
|
|
||||||
// break;
|
|
||||||
// case 'Start':
|
|
||||||
// data = {
|
|
||||||
// task: this.selectCfmPtEteStart,
|
|
||||||
// min: this.selectDurationTime.min,
|
|
||||||
// max: this.selectDurationTime.max,
|
|
||||||
// type: 'processing-time-end-to-end-starts-with',
|
|
||||||
// };
|
|
||||||
// break;
|
|
||||||
// case 'End':
|
|
||||||
// data = {
|
|
||||||
// task: this.selectCfmPtEteEnd,
|
|
||||||
// min: this.selectDurationTime.min,
|
|
||||||
// max: this.selectDurationTime.max,
|
|
||||||
// type: 'processing-time-end-to-end-ends-with',
|
|
||||||
// };
|
|
||||||
// break;
|
|
||||||
// case 'Start & End':
|
|
||||||
// data = {
|
|
||||||
// start: this.selectCfmPtEteSEStart,
|
|
||||||
// end: this.selectCfmPtEteSEEnd,
|
|
||||||
// min: this.selectDurationTime.min,
|
|
||||||
// max: this.selectDurationTime.max,
|
|
||||||
// type: 'processing-time-end-to-end-start-end',
|
|
||||||
// };
|
|
||||||
// break;
|
|
||||||
// default:
|
|
||||||
// break;
|
|
||||||
// };
|
|
||||||
// break;
|
|
||||||
// case 'Partial':
|
|
||||||
// switch (this.selectedActSeqFromTo) {
|
|
||||||
// case 'From':
|
|
||||||
// data = {
|
|
||||||
// task: this.selectCfmPtPStart,
|
|
||||||
// min: this.selectDurationTime.min,
|
|
||||||
// max: this.selectDurationTime.max,
|
|
||||||
// type: 'processing-time-partial-starts-with',
|
|
||||||
// };
|
|
||||||
// break;
|
|
||||||
// case 'To':
|
|
||||||
// data = {
|
|
||||||
// task: this.selectCfmPtPEnd,
|
|
||||||
// min: this.selectDurationTime.min,
|
|
||||||
// max: this.selectDurationTime.max,
|
|
||||||
// type: 'processing-time-partial-ends-with',
|
|
||||||
// };
|
|
||||||
// break;
|
|
||||||
// case 'From & To':
|
|
||||||
// data = {
|
|
||||||
// start: this.selectCfmPtPSEStart,
|
|
||||||
// end: this.selectCfmPtPSEEnd,
|
|
||||||
// min: this.selectDurationTime.min,
|
|
||||||
// max: this.selectDurationTime.max,
|
|
||||||
// type: 'processing-time-partial-start-end',
|
|
||||||
// };
|
|
||||||
// break;
|
|
||||||
// default:
|
|
||||||
// break;
|
|
||||||
// };
|
|
||||||
// break;
|
|
||||||
// default:
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
// };
|
|
||||||
// selectedActSeqMore, selectedActSeqFromTo,
|
|
||||||
|
|
||||||
this.isLoading = true;
|
this.isLoading = true;
|
||||||
this.isSubmit = true;
|
this.isSubmit = true;
|
||||||
await this.conformanceStore.addLogConformanceTempCheckerId(data);
|
await this.conformanceStore.addLogConformanceTempCheckerId(data);
|
||||||
|
|||||||
Reference in New Issue
Block a user