Conformance: Time Range show after Apply time done.
This commit is contained in:
@@ -39,12 +39,29 @@
|
||||
:isSubmitCfmCtEteEnd="isSubmitCfmCtEteEnd"
|
||||
:isSubmitCfmCtEteSE="isSubmitCfmCtEteSE"
|
||||
></ConformanceSelectResult>
|
||||
<!-- time range -->
|
||||
<!-- <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> -->
|
||||
<ConformanceTimeRange
|
||||
@min-total-seconds="minTotalSeconds"
|
||||
@max-total-seconds="maxTotalSeconds"
|
||||
:isSubmitDurationTime="isSubmitDurationTime" ></ConformanceTimeRange>
|
||||
:isSubmitDurationTime="isSubmitDurationTime"
|
||||
:isSubmitTimeCfmPtEteAll="isSubmitTimeCfmPtEteAll"
|
||||
:isSubmitTimeCfmPtEteStart="isSubmitTimeCfmPtEteStart"
|
||||
:isSubmitTimeCfmPtEteEnd="isSubmitTimeCfmPtEteEnd"
|
||||
:isSubmitTimeCfmPtEteSE="isSubmitTimeCfmPtEteSE"
|
||||
:isSubmitTimeCfmPtPStart="isSubmitTimeCfmPtPStart"
|
||||
:isSubmitTimeCfmPtPEnd="isSubmitTimeCfmPtPEnd"
|
||||
:isSubmitTimeCfmPtPSE="isSubmitTimeCfmPtPSE"
|
||||
:isSubmitTimeCfmWtEteAll="isSubmitTimeCfmWtEteAll"
|
||||
:isSubmitTimeCfmWtEteStart="isSubmitTimeCfmWtEteStart"
|
||||
:isSubmitTimeCfmWtEteEnd="isSubmitTimeCfmWtEteEnd"
|
||||
:isSubmitTimeCfmWtEteSE="isSubmitTimeCfmWtEteSE"
|
||||
:isSubmitTimeCfmWtPStart="isSubmitTimeCfmWtPStart"
|
||||
:isSubmitTimeCfmWtPEnd="isSubmitTimeCfmWtPEnd"
|
||||
:isSubmitTimeCfmWtPSE="isSubmitTimeCfmWtPSE"
|
||||
:isSubmitTimeCfmCtEteAll="isSubmitTimeCfmCtEteAll"
|
||||
:isSubmitTimeCfmCtEteStart="isSubmitTimeCfmCtEteStart"
|
||||
:isSubmitTimeCfmCtEteEnd="isSubmitTimeCfmCtEteEnd"
|
||||
:isSubmitTimeCfmCtEteSE="isSubmitTimeCfmCtEteSE"
|
||||
></ConformanceTimeRange>
|
||||
</div>
|
||||
<!-- button -->
|
||||
<div class="space-x-4 p-4 flex justify-center items-content border-t border-neutral-300">
|
||||
@@ -136,8 +153,7 @@ export default {
|
||||
isSubmitTask: null,
|
||||
isSubmitStartAndEnd: null,
|
||||
isSubmitListSeq: [],
|
||||
isSubmitDurationData: null,
|
||||
isSubmitDurationTime: null,
|
||||
isSubmitDurationData: null, // Activity duration
|
||||
isSubmitCfmPtEteStart: null, // Processing time
|
||||
isSubmitCfmPtEteEnd: null,
|
||||
isSubmitCfmPtEteSE: null,
|
||||
@@ -153,6 +169,25 @@ export default {
|
||||
isSubmitCfmCtEteStart: null, // Cycle time
|
||||
isSubmitCfmCtEteEnd: null,
|
||||
isSubmitCfmCtEteSE: null,
|
||||
isSubmitDurationTime: null, // Activity duration Time Range
|
||||
isSubmitTimeCfmPtEteAll: null, // Processing time Time Range
|
||||
isSubmitTimeCfmPtEteStart: null,
|
||||
isSubmitTimeCfmPtEteEnd: null,
|
||||
isSubmitTimeCfmPtEteSE: null,
|
||||
isSubmitTimeCfmPtPStart: null,
|
||||
isSubmitTimeCfmPtPEnd: null,
|
||||
isSubmitTimeCfmPtPSE: null,
|
||||
isSubmitTimeCfmWtEteAll: null, // Waiting time Time Range
|
||||
isSubmitTimeCfmWtEteStart: null,
|
||||
isSubmitTimeCfmWtEteEnd: null,
|
||||
isSubmitTimeCfmWtEteSE: null,
|
||||
isSubmitTimeCfmWtPStart: null,
|
||||
isSubmitTimeCfmWtPEnd: null,
|
||||
isSubmitTimeCfmWtPSE: null,
|
||||
isSubmitTimeCfmCtEteAll: null, // Cycle time Time Range
|
||||
isSubmitTimeCfmCtEteStart: null,
|
||||
isSubmitTimeCfmCtEteEnd: null,
|
||||
isSubmitTimeCfmCtEteSE: null,
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@@ -162,38 +197,6 @@ export default {
|
||||
ConformanceSelectResult,
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* get Time Range(duration)
|
||||
* @param {array} data API data
|
||||
* @param {string} category act | single | double
|
||||
* @param {string} task select Radio task or start
|
||||
* @param {string} taskTwo end
|
||||
* @returns {object} {min:12, max:345}
|
||||
*/
|
||||
// getDurationTime(data, category, task, taskTwo) {
|
||||
// switch (category) {
|
||||
// case 'act':
|
||||
// data.forEach(i => {
|
||||
// if(i.label === task) this.selectDurationTime = i.duration;
|
||||
// });
|
||||
// break;
|
||||
// case 'single':
|
||||
// data.forEach(i => {
|
||||
// if(i.task === task) this.selectDurationTime = i.time;
|
||||
// });
|
||||
// break;
|
||||
// case 'double':
|
||||
// data.forEach(i => {
|
||||
// if(i.start === task && i.end === taskTwo) this.selectDurationTime = i.time;
|
||||
// });
|
||||
// break;
|
||||
// case 'all':
|
||||
// this.selectDurationTime = data;
|
||||
// break
|
||||
// default:
|
||||
// break;
|
||||
// };
|
||||
// },
|
||||
/**
|
||||
* get min total seconds
|
||||
* @param {Number} e
|
||||
@@ -268,6 +271,25 @@ export default {
|
||||
this.isSubmitCfmCtEteStart = null; // Cycle time
|
||||
this.isSubmitCfmCtEteEnd = null;
|
||||
this.isSubmitCfmCtEteSE = null;
|
||||
this.isSubmitTimeCfmPtEteAll = null; // Processing time Time Range
|
||||
this.isSubmitTimeCfmPtEteStart = null;
|
||||
this.isSubmitTimeCfmPtEteEnd = null;
|
||||
this.isSubmitTimeCfmPtEteSE = null;
|
||||
this.isSubmitTimeCfmPtPStart = null;
|
||||
this.isSubmitTimeCfmPtPEnd = null;
|
||||
this.isSubmitTimeCfmPtPSE = null;
|
||||
this.isSubmitTimeCfmWtEteAll = null; // Waiting time Time Range
|
||||
this.isSubmitTimeCfmWtEteStart = null;
|
||||
this.isSubmitTimeCfmWtEteEnd = null;
|
||||
this.isSubmitTimeCfmWtEteSE = null;
|
||||
this.isSubmitTimeCfmWtPStart = null;
|
||||
this.isSubmitTimeCfmWtPEnd = null;
|
||||
this.isSubmitTimeCfmWtPSE = null;
|
||||
this.isSubmitTimeCfmCtEteAll = null; // Cycle time Time Range
|
||||
this.isSubmitTimeCfmCtEteStart = null;
|
||||
this.isSubmitTimeCfmCtEteEnd = null;
|
||||
this.isSubmitTimeCfmCtEteSE = null;
|
||||
|
||||
},
|
||||
/**
|
||||
* @param {boolean} massage true | false 清空選單選項, 選擇的結果
|
||||
@@ -295,8 +317,6 @@ export default {
|
||||
min: this.selectTimeRangeMin,
|
||||
max: this.selectTimeRangeMax
|
||||
};
|
||||
// this.selectDurationTime.min = this.selectTimeRangeMin;
|
||||
// this.selectDurationTime.max = this.selectTimeRangeMax;
|
||||
this.$emitter.emit('timeRangeMaxMin', this.selectDurationTime);
|
||||
|
||||
switch (this.selectedRuleType) {
|
||||
@@ -388,6 +408,8 @@ export default {
|
||||
max: this.selectDurationTime.max,
|
||||
type: 'processing-time-end-to-end-whole',
|
||||
};
|
||||
this.isSubmitReset();
|
||||
this.isSubmitTimeCfmPtEteAll = this.selectDurationTime;
|
||||
break;
|
||||
case 'Start':
|
||||
if(!this.selectCfmPtEteStart) return this.$toast.error('Not selected.');
|
||||
@@ -402,6 +424,7 @@ export default {
|
||||
this.isSubmitCfmPtEteStart = [
|
||||
{category: 'Start', task: this.selectCfmPtEteStart},
|
||||
];
|
||||
this.isSubmitTimeCfmPtEteStart = this.selectDurationTime;
|
||||
}
|
||||
break;
|
||||
case 'End':
|
||||
@@ -417,6 +440,7 @@ export default {
|
||||
this.isSubmitCfmPtEteEnd = [
|
||||
{category: 'End', task: this.selectCfmPtEteEnd},
|
||||
];
|
||||
this.isSubmitTimeCfmPtEteEnd = this.selectDurationTime;
|
||||
}
|
||||
break;
|
||||
case 'Start & End':
|
||||
@@ -434,6 +458,7 @@ export default {
|
||||
{category: 'Start', task: this.selectCfmPtEteStart},
|
||||
{category: 'End', task: this.selectCfmPtEteSEEnd},
|
||||
];
|
||||
this.isSubmitTimeCfmPtEteSE = this.selectDurationTime;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@@ -455,6 +480,7 @@ export default {
|
||||
this.isSubmitCfmPtPStart = [
|
||||
{category: 'From', task: this.selectCfmPtPStart},
|
||||
];
|
||||
this.isSubmitTimeCfmPtPStart = this.selectDurationTime;
|
||||
}
|
||||
break;
|
||||
case 'To':
|
||||
@@ -470,6 +496,7 @@ export default {
|
||||
this.isSubmitCfmPtPEnd = [
|
||||
{category: 'To', task: this.selectCfmPtPEnd},
|
||||
];
|
||||
this.isSubmitTimeCfmPtPEnd = this.selectDurationTime;
|
||||
}
|
||||
break;
|
||||
case 'From & To':
|
||||
@@ -487,6 +514,7 @@ export default {
|
||||
{category: 'From', task: this.selectCfmPtPSEStart},
|
||||
{category: 'To', task: this.selectCfmPtPSEEnd},
|
||||
];
|
||||
this.isSubmitTimeCfmPtPSEd = this.selectDurationTime;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@@ -507,6 +535,8 @@ export default {
|
||||
max: this.selectDurationTime.max,
|
||||
type: 'waiting-time-end-to-end-whole',
|
||||
};
|
||||
this.isSubmitReset();
|
||||
this.isSubmitTimeCfmWtEteAll = this.selectDurationTime;
|
||||
break;
|
||||
case 'Start':
|
||||
if(!this.selectCfmWtEteStart) return this.$toast.error('Not selected.');
|
||||
@@ -521,6 +551,7 @@ export default {
|
||||
this.isSubmitCfmWtEteStart = [
|
||||
{category: 'Start', task: this.selectCfmWtEteStart},
|
||||
];
|
||||
this.isSubmitTimeCfmWtEteStart = this.selectDurationTime;
|
||||
}
|
||||
break;
|
||||
case 'End':
|
||||
@@ -536,6 +567,7 @@ export default {
|
||||
this.isSubmitCfmWtEteEnd = [
|
||||
{category: 'End', task: this.selectCfmWtEteEnd},
|
||||
];
|
||||
this.isSubmitTimeCfmWtEteEnd = this.selectDurationTime;
|
||||
}
|
||||
break;
|
||||
case 'Start & End':
|
||||
@@ -553,6 +585,7 @@ export default {
|
||||
{category: 'Start', task: this.selectCfmWtEteSEStart},
|
||||
{category: 'End', task: this.selectCfmWtEteSEEnd},
|
||||
];
|
||||
this.isSubmitTimeCfmWtEteSE = this.selectDurationTime;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@@ -574,6 +607,7 @@ export default {
|
||||
this.isSubmitCfmWtPStart = [
|
||||
{category: 'From', task: this.selectCfmWtPStart},
|
||||
];
|
||||
this.isSubmitTimeCfmWtPStart = this.selectDurationTime;
|
||||
}
|
||||
break;
|
||||
case 'To':
|
||||
@@ -589,6 +623,7 @@ export default {
|
||||
this.isSubmitCfmWtPEnd = [
|
||||
{category: 'To', task: this.selectCfmWtPEnd},
|
||||
];
|
||||
this.isSubmitTimeCfmWtPEnd = this.selectDurationTime;
|
||||
}
|
||||
break;
|
||||
case 'From & To':
|
||||
@@ -606,6 +641,7 @@ export default {
|
||||
{category: 'From', task: this.selectCfmWtPSEStart},
|
||||
{category: 'To', task: this.selectCfmWtPSEEnd},
|
||||
];
|
||||
this.isSubmitTimeCfmWtPSE = this.selectDurationTime;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@@ -624,6 +660,8 @@ export default {
|
||||
max: this.selectDurationTime.max,
|
||||
type: 'cycle-time-end-to-end-whole',
|
||||
};
|
||||
this.isSubmitReset();
|
||||
this.isSubmitTimeCfmCtEteAll = this.selectDurationTime;
|
||||
break;
|
||||
case 'Start':
|
||||
if(!this.selectCfmCtEteStart) return this.$toast.error('Not selected.');
|
||||
@@ -637,6 +675,7 @@ export default {
|
||||
this.isSubmitCfmCtEteStart = [
|
||||
{category: 'Start', task: this.selectCfmCtEteStart},
|
||||
];
|
||||
this.isSubmitTimeCfmCtEteStart = this.selectDurationTime;
|
||||
break;
|
||||
case 'End':
|
||||
if(!this.selectCfmCtEteEnd) return this.$toast.error('Not selected.');
|
||||
@@ -651,6 +690,7 @@ export default {
|
||||
this.isSubmitCfmCtEteEnd = [
|
||||
{category: 'End', task: this.selectCfmCtEteEnd},
|
||||
];
|
||||
this.isSubmitTimeCfmCtEteEnd = this.selectDurationTime;
|
||||
}
|
||||
break;
|
||||
case 'Start & End':
|
||||
@@ -668,6 +708,7 @@ export default {
|
||||
{category: 'Start', task: this.selectCfmCtEteSEStart},
|
||||
{category: 'End', task: this.selectCfmCtEteSEEnd},
|
||||
];
|
||||
this.isSubmitTimeCfmCtEteSE = this.selectDurationTime;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@@ -706,91 +747,70 @@ export default {
|
||||
// Processing time
|
||||
case 'cfmPtEteStart':
|
||||
this.selectCfmPtEteStart = data.task;
|
||||
// this.getDurationTime(this.cfmPtEteStart, 'single', data.task);
|
||||
break;
|
||||
case 'cfmPtEteEnd':
|
||||
this.selectCfmPtEteEnd = data.task;
|
||||
// this.getDurationTime(this.cfmPtEteEnd, 'single', data.task);
|
||||
break;
|
||||
case 'cfmPtEteSEStart':
|
||||
this.selectCfmPtEteSEStart = data.task;
|
||||
// if(this.selectCfmPtEteSEEnd)this.getDurationTime(this.cfmPtEteSE, 'double', data.task, this.selectCfmPtEteSEEnd);
|
||||
break;
|
||||
case 'cfmPtEteSEEnd':
|
||||
this.selectCfmPtEteSEEnd = data.task;
|
||||
// if(this.selectCfmPtEteSEStart)this.getDurationTime(this.cfmPtEteSE, 'double', this.selectCfmPtEteSEStart, data.task);
|
||||
break;
|
||||
case 'cfmPtPStart':
|
||||
this.selectCfmPtPStart = data.task;
|
||||
// this.getDurationTime(this.cfmPtPStart, 'single', data.task);
|
||||
break;
|
||||
case 'cfmPtPEnd':
|
||||
this.selectCfmPtPEnd = data.task;
|
||||
// this.getDurationTime(this.cfmPtPEnd, 'single', data.task);
|
||||
break;
|
||||
case 'cfmPtPSEStart':
|
||||
this.selectCfmPtPSEStart = data.task;
|
||||
// if(this.selectCfmPtPSEEnd)this.getDurationTime(this.cfmPtPSE, 'double', data.task, this.selectCfmPtPSEEnd);
|
||||
break;
|
||||
case 'cfmPtPSEEnd':
|
||||
this.selectCfmPtPSEEnd = data.task;
|
||||
// if(this.selectCfmPtPSEStart)this.getDurationTime(this.cfmPtPSE, 'double', this.selectCfmPtPSEStart, data.task);
|
||||
break;
|
||||
// Waiting time
|
||||
case 'cfmWtEteStart':
|
||||
this.selectCfmWtEteStart = data.task;
|
||||
// this.getDurationTime(this.cfmWtEteStart, 'single', data.task);
|
||||
break;
|
||||
case 'cfmWtEteEnd':
|
||||
this.selectCfmWtEteEnd = data.task;
|
||||
// this.getDurationTime(this.cfmWtEteEnd, 'single', data.task);
|
||||
break;
|
||||
case 'cfmWtEteSEStart':
|
||||
this.selectCfmWtEteSEStart = data.task;
|
||||
// if(this.selectCfmWtEteSEEnd)this.getDurationTime(this.cfmWtEteSE, 'double', data.task, this.selectCfmWtEteSEEnd);
|
||||
break;
|
||||
case 'cfmWtEteSEEnd':
|
||||
this.selectCfmWtEteSEEnd = data.task;
|
||||
// if(this.selectCfmWtEteSEStart)this.getDurationTime(this.cfmWtEteSE, 'double', this.selectCfmWtEteSEStart, data.task);
|
||||
break;
|
||||
case 'cfmWtPStart':
|
||||
this.selectCfmWtPStart = data.task;
|
||||
// this.getDurationTime(this.cfmWtPStart, 'single', data.task);
|
||||
break;
|
||||
case 'cfmWtPEnd':
|
||||
this.selectCfmWtPEnd = data.task;
|
||||
// this.getDurationTime(this.cfmWtPEnd, 'single', data.task);
|
||||
break;
|
||||
case 'cfmWtPSEStart':
|
||||
this.selectCfmWtPSEStart = data.task;
|
||||
// if(this.selectCfmWtPSEEnd)this.getDurationTime(this.cfmWtPSE, 'double', data.task, this.selectCfmWtPSEEnd);
|
||||
break;
|
||||
case 'cfmWtPSEEnd':
|
||||
this.selectCfmWtPSEEnd = data.task;
|
||||
// if(this.selectCfmWtPSEStart)this.getDurationTime(this.cfmWtPSE, 'double', this.selectCfmWtPSEStart, data.task);
|
||||
break;
|
||||
// Cycle time
|
||||
case 'cfmCtEteStart':
|
||||
this.selectCfmCtEteStart = data.task;
|
||||
// this.getDurationTime(this.cfmPtEteStart, 'single', data.task);
|
||||
break;
|
||||
case 'cfmCtEteEnd':
|
||||
this.selectCfmCtEteEnd = data.task;
|
||||
// this.getDurationTime(this.cfmCtEteEnd, 'single', data.task);
|
||||
break;
|
||||
case 'cfmCtEteSEStart':
|
||||
this.selectCfmCtEteSEStart = data.task;
|
||||
// if(this.selectCfmCtEteSEEnd)this.getDurationTime(this.cfmCtEteSE, 'double', data.task, this.selectCfmCtEteSEEnd);
|
||||
break;
|
||||
case 'cfmCtEteSEEnd':
|
||||
this.selectCfmCtEteSEEnd = data.task;
|
||||
// if(this.selectCfmCtEteSEStart)this.getDurationTime(this.cfmCtEteSE, 'double', this.selectCfmCtEteSEStart, data.task);
|
||||
break;
|
||||
default:
|
||||
if(this.selectedRuleType === 'Activity sequence') this.listSequence = [data.task];
|
||||
else if(this.selectedRuleType === 'Activity duration') {
|
||||
this.selectDurationData = [data.task];
|
||||
// this.getDurationTime(this.conformanceAllTasks, 'act', data.task);
|
||||
};
|
||||
break;
|
||||
};
|
||||
@@ -804,19 +824,6 @@ export default {
|
||||
this.selectTimeReset();
|
||||
this.selectDurationTime = { min: 0, max: 0};
|
||||
};
|
||||
// switch (this.selectedRuleType) {
|
||||
// case 'Processing time':
|
||||
// this.getDurationTime(this.cfmPtEteWhole, 'all');
|
||||
// break;
|
||||
// case 'Waiting time':
|
||||
// this.getDurationTime(this.cfmWtEteWhole, 'all');
|
||||
// break;
|
||||
// case 'Cycle time':
|
||||
// this.getDurationTime(this.cfmCtEteWhole, 'all');
|
||||
// break;
|
||||
// default:
|
||||
// break;
|
||||
// };
|
||||
});
|
||||
this.$emitter.on('isRadioSeqChange', (data) => {
|
||||
if(data) {
|
||||
|
||||
Reference in New Issue
Block a user