711 lines
27 KiB
Vue
711 lines
27 KiB
Vue
<template>
|
|
<section class="h-full shadow-[1px_0px_4px_rgba(0,0,0,0.25)] bg-neutral-100 absolute inset-y-0 left-0 z-10" :class="isShowBar?'w-full':'w-[312px]'">
|
|
<!-- header -->
|
|
<div class="bg-neutral-200 px-4">
|
|
<p class="h2">Rule Settings</p>
|
|
</div>
|
|
<!-- contanier -->
|
|
<div class="p-4 h-[calc(100%_-_40px)] flex">
|
|
<div class="h-full flex flex-col justify-between w-[280px]">
|
|
<!-- select -->
|
|
<div class="h-full overflow-y-auto scrollbar w-[280px]">
|
|
<!-- radio group -->
|
|
<ConformanceRadioGroup></ConformanceRadioGroup>
|
|
<!-- show and hidden button -->
|
|
<div class="flex items-center justify-between mr-1" :class="isShowBar ? 'text-primary' : ''">
|
|
<p class="h2">Activity Selector</p>
|
|
<span class="material-symbols-outlined cursor-pointer duration-300 hover:bg-primary/50 hover:rounded" @click="isShowBar = !isShowBar">{{ isShowBar ? 'keyboard_double_arrow_right' : 'keyboard_double_arrow_left' }}</span>
|
|
</div>
|
|
<!-- select result -->
|
|
<ConformanceSelectResult
|
|
:isSubmit="isSubmit"
|
|
:isSubmitTask="isSubmitTask"
|
|
:isSubmitStartAndEnd="isSubmitStartAndEnd"
|
|
:isSubmitListSeq="isSubmitListSeq"
|
|
:isSubmitDurationData="isSubmitDurationData"
|
|
></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>
|
|
</div>
|
|
<!-- button -->
|
|
<div class="space-x-4 p-4 flex justify-center items-content border-t border-neutral-300">
|
|
<button type="button" class="btn btn-sm btn-neutral" @click="reset">Clear</button>
|
|
<button type="button" class="btn btn-sm btn-neutral" @click="submit">Apply</button>
|
|
</div>
|
|
</div>
|
|
<!-- show bar -->
|
|
<ConformanceShowBar :class="isShowBar?'':'hidden'"
|
|
:isSubmit="isSubmit"
|
|
:isSubmitTask="isSubmitTask"
|
|
:isSubmitStartAndEnd="isSubmitStartAndEnd"
|
|
:isSubmitListSeq="isSubmitListSeq"
|
|
:isSubmitDurationData="isSubmitDurationData"
|
|
></ConformanceShowBar>
|
|
</div>
|
|
</section>
|
|
</template>
|
|
|
|
<script>
|
|
import { storeToRefs } from 'pinia';
|
|
import LoadingStore from '@/stores/loading.js';
|
|
import ConformanceStore from '@/stores/conformance.js';
|
|
import ConformanceRadioGroup from './ConformanceSidebar/ConformanceRadioGroup.vue';
|
|
import ConformanceShowBar from './ConformanceSidebar/ConformanceShowBar.vue';
|
|
import ConformanceTimeRange from './ConformanceSidebar/ConformanceTimeRange.vue';
|
|
import ConformanceSelectResult from './ConformanceSidebar/ConformanceSelectResult.vue';
|
|
|
|
export default {
|
|
setup() {
|
|
const loadingStore = LoadingStore();
|
|
const conformanceStore = ConformanceStore();
|
|
const { isLoading } = storeToRefs(loadingStore);
|
|
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, cfmPtEteWhole, cfmPtEteStart, cfmPtEteEnd, cfmPtEteSE, cfmPtPStart, cfmPtPEnd, cfmPtPSE, cfmWtEteWhole, cfmWtEteStart, cfmWtEteEnd, cfmWtEteSE, cfmWtPStart, cfmWtPEnd, cfmWtPSE, cfmCtEteWhole, cfmCtEteStart, cfmCtEteEnd, cfmCtEteSE }
|
|
},
|
|
data() {
|
|
return {
|
|
isShowBar: false,
|
|
visibleLeft: false,
|
|
selectConformanceTask: null,
|
|
selectConformanceStartAndEnd: null,
|
|
selectConformanceStart: null,
|
|
selectConformanceEnd: null,
|
|
selectConformanceFrom: null,
|
|
selectConformanceTo: null,
|
|
listSeq: [],
|
|
selectDurationData: null,
|
|
selectDurationTime: null,
|
|
selectTimeRangeMin: 0, // Time Range min
|
|
selectTimeRangeMax: 0, // Time Range max
|
|
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,
|
|
isSubmit: false,
|
|
isSubmitTask: null,
|
|
isSubmitStartAndEnd: null,
|
|
isSubmitListSeq: [],
|
|
isSubmitDurationData: null,
|
|
}
|
|
},
|
|
components: {
|
|
ConformanceRadioGroup,
|
|
ConformanceShowBar,
|
|
ConformanceTimeRange,
|
|
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
|
|
*/
|
|
minTotalSeconds(e) {
|
|
this.selectTimeRangeMin = e;
|
|
},
|
|
/**
|
|
* get min total seconds
|
|
* @param {Number} e
|
|
*/
|
|
maxTotalSeconds(e) {
|
|
this.selectTimeRangeMax = e;
|
|
},
|
|
/**
|
|
* select Time Reset
|
|
*/
|
|
selectTimeReset() {
|
|
// 不包含 this.selectDurationTime
|
|
this.selectConformanceTask = null; // Have activity
|
|
this.selectConformanceStartAndEnd = null; // Activity Sequence
|
|
this.selectConformanceStart = null;
|
|
this.selectConformanceEnd = null;
|
|
this.selectConformanceFrom = null;
|
|
this.selectConformanceTo = null;
|
|
this.listSeq = [];
|
|
this.selectDurationData = null; // Activity durations
|
|
this.selectTimeRangeMin = 0; // Time Range min
|
|
this.selectTimeRangeMax = 0; // Time Range max
|
|
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 清空選單選項, 選擇的結果
|
|
*/
|
|
reset() {
|
|
// Results page Cover Plate(遮罩為 ture)
|
|
this.$emitter.emit('coverPlate', true);
|
|
// Have activity
|
|
this.isSubmitTask = null;
|
|
// Activity sequence
|
|
this.isSubmitStartAndEnd = null;
|
|
this.isSubmitListSeq = [];
|
|
// Activity duration
|
|
this.isSubmitDurationData = null;
|
|
// isSubmit
|
|
this.isSubmit = false;
|
|
|
|
// 其他子元件 reset
|
|
this.selectTimeReset();
|
|
this.$emitter.emit('reset', null);
|
|
// reset 成功訊息
|
|
this.$toast.success('Reset Success.');
|
|
},
|
|
/**
|
|
* Apply button 發送選項,取得 Checker Id.
|
|
*/
|
|
async submit() {
|
|
let data;
|
|
let isMode = '';
|
|
switch (this.selectedMode) {
|
|
case 'Directly follows':
|
|
isMode = 'directly-follows';
|
|
break;
|
|
case 'Eventually follows':
|
|
isMode = 'eventually-follows';
|
|
break;
|
|
case 'Short loop(s)':
|
|
isMode = 'short-loops';
|
|
break;
|
|
case 'Self loop(s)':
|
|
isMode = 'self-loops';
|
|
break;
|
|
default:
|
|
break;
|
|
};
|
|
this.selectDurationTime.min = this.selectTimeRangeMin;
|
|
this.selectDurationTime.max = this.selectTimeRangeMax;
|
|
|
|
switch (this.selectedRuleType) {
|
|
case 'Have activity': // Rule Type 選 Have activity 的行為
|
|
if(!this.selectConformanceTask?.length) return this.$toast.error('Not selected.');
|
|
else {
|
|
data = {
|
|
type: 'contains-tasks',
|
|
tasks: this.selectConformanceTask,
|
|
};
|
|
// 其他 isSubmitData 為 null
|
|
this.isSubmitReset();
|
|
this.isSubmitTask = this.selectConformanceTask;
|
|
|
|
}
|
|
break;
|
|
case 'Activity sequence': // Rule Type 選 Activity sequence 的行為
|
|
switch (this.selectedActivitySequence) {
|
|
case 'Start & End': // Activity Sequence 選 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.isSubmitReset();
|
|
this.isSubmitStartAndEnd = [
|
|
{category: 'Start', task: this.selectConformanceStartAndEnd[0]},
|
|
{category: 'End', task: this.selectConformanceStartAndEnd[1]},
|
|
];
|
|
};
|
|
break;
|
|
case '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.isSubmitReset();
|
|
this.isSubmitListSeq = this.listSeq;
|
|
};
|
|
default:
|
|
break;
|
|
}
|
|
break;
|
|
case '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.isSubmitReset();
|
|
this.isSubmitDurationData = this.selectDurationData;
|
|
};
|
|
break;
|
|
case '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':
|
|
if(!this.selectCfmPtEteStart) return this.$toast.error('Not selected.');
|
|
else data = {
|
|
task: this.selectCfmPtEteStart,
|
|
min: this.selectDurationTime.min,
|
|
max: this.selectDurationTime.max,
|
|
type: 'processing-time-end-to-end-starts-with',
|
|
};
|
|
break;
|
|
case 'End':
|
|
if(!this.selectCfmPtEteEnd) return this.$toast.error('Not selected.');
|
|
else data = {
|
|
task: this.selectCfmPtEteEnd,
|
|
min: this.selectDurationTime.min,
|
|
max: this.selectDurationTime.max,
|
|
type: 'processing-time-end-to-end-ends-with',
|
|
};
|
|
break;
|
|
case 'Start & End':
|
|
if(!this.selectCfmPtEteSEStart || !this.selectCfmPtEteSEEnd) return this.$toast.error('Both Start and End must be selected.');
|
|
else 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':
|
|
if(!this.selectCfmPtPStart) return this.$toast.error('Not selected.');
|
|
else data = {
|
|
task: this.selectCfmPtPStart,
|
|
min: this.selectDurationTime.min,
|
|
max: this.selectDurationTime.max,
|
|
type: 'processing-time-partial-starts-with',
|
|
};
|
|
break;
|
|
case 'To':
|
|
if(!this.selectCfmPtPEnd) return this.$toast.error('Not selected.');
|
|
else data = {
|
|
task: this.selectCfmPtPEnd,
|
|
min: this.selectDurationTime.min,
|
|
max: this.selectDurationTime.max,
|
|
type: 'processing-time-partial-ends-with',
|
|
};
|
|
break;
|
|
case 'From & To':
|
|
if(!this.selectCfmPtPSEStart || !this.selectCfmPtPSEEnd) return this.$toast.error('Both Start and End must be selected.');
|
|
else 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;
|
|
};
|
|
break;
|
|
case 'Waiting time': // Rule Type 選 Waiting time 的行為
|
|
switch (this.selectedProcessScope) {
|
|
case 'End to end':
|
|
switch (this.selectedActSeqMore) {
|
|
case 'All':
|
|
data = {
|
|
min: this.selectDurationTime.min,
|
|
max: this.selectDurationTime.max,
|
|
type: 'waiting-time-end-to-end-whole',
|
|
};
|
|
break;
|
|
case 'Start':
|
|
if(!this.selectCfmWtEteStart) return this.$toast.error('Not selected.');
|
|
else data = {
|
|
task: this.selectCfmWtEteStart,
|
|
min: this.selectDurationTime.min,
|
|
max: this.selectDurationTime.max,
|
|
type: 'waiting-time-end-to-end-starts-with',
|
|
};
|
|
break;
|
|
case 'End':
|
|
if(!this.selectCfmWtEteEnd) return this.$toast.error('Not selected.');
|
|
else data = {
|
|
task: this.selectCfmWtEteEnd,
|
|
min: this.selectDurationTime.min,
|
|
max: this.selectDurationTime.max,
|
|
type: 'waiting-time-end-to-end-ends-with',
|
|
};
|
|
break;
|
|
case 'Start & End':
|
|
if(!this.selectCfmWtEteSEStart || !this.selectCfmWtEteSEEnd) return this.$toast.error('Both Start and End must be selected.');
|
|
else data = {
|
|
start: this.selectCfmWtEteSEStart,
|
|
end: this.selectCfmWtEteSEEnd,
|
|
min: this.selectDurationTime.min,
|
|
max: this.selectDurationTime.max,
|
|
type: 'waiting-time-end-to-end-start-end',
|
|
};
|
|
break;
|
|
default:
|
|
break;
|
|
};
|
|
break;
|
|
case 'Partial':
|
|
switch (this.selectedActSeqFromTo) {
|
|
case 'From':
|
|
if(!this.selectCfmWtPStart) return this.$toast.error('Not selected.');
|
|
else data = {
|
|
task: this.selectCfmWtPStart,
|
|
min: this.selectDurationTime.min,
|
|
max: this.selectDurationTime.max,
|
|
type: 'waiting-time-partial-starts-with',
|
|
};
|
|
break;
|
|
case 'To':
|
|
if(!this.selectCfmWtPEnd) return this.$toast.error('Not selected.');
|
|
else data = {
|
|
task: this.selectCfmWtPEnd,
|
|
min: this.selectDurationTime.min,
|
|
max: this.selectDurationTime.max,
|
|
type: 'waiting-time-partial-ends-with',
|
|
};
|
|
break;
|
|
case 'From & To':
|
|
if(!this.selectCfmWtPSEStart || !this.selectCfmWtPSEEnd) return this.$toast.error('Both Start and End must be selected.');
|
|
else data = {
|
|
start: this.selectCfmWtPSEStart,
|
|
end: this.selectCfmWtPSEEnd,
|
|
min: this.selectDurationTime.min,
|
|
max: this.selectDurationTime.max,
|
|
type: 'waiting-time-partial-start-end',
|
|
};
|
|
break;
|
|
default:
|
|
break;
|
|
};
|
|
break;
|
|
default:
|
|
break;
|
|
};
|
|
break;
|
|
case 'Cycle time': // Rule Type 選 Cycle time 的行為
|
|
switch (this.selectedActSeqMore) {
|
|
case 'All':
|
|
data = {
|
|
min: this.selectDurationTime.min,
|
|
max: this.selectDurationTime.max,
|
|
type: 'cycle-time-end-to-end-whole',
|
|
};
|
|
break;
|
|
case 'Start':
|
|
if(!this.selectCfmCtEteStart) return this.$toast.error('Not selected.');
|
|
else data = {
|
|
task: this.selectCfmCtEteStart,
|
|
min: this.selectDurationTime.min,
|
|
max: this.selectDurationTime.max,
|
|
type: 'cycle-time-end-to-end-starts-with',
|
|
};
|
|
break;
|
|
case 'End':
|
|
if(!this.selectCfmCtEteEnd) return this.$toast.error('Not selected.');
|
|
else data = {
|
|
task: this.selectCfmCtEteEnd,
|
|
min: this.selectDurationTime.min,
|
|
max: this.selectDurationTime.max,
|
|
type: 'cycle-time-end-to-end-ends-with',
|
|
};
|
|
break;
|
|
case 'Start & End':
|
|
if(!this.selectCfmCtEteSEStart || !this.selectCfmCtEteSEEnd) return this.$toast.error('Both Start and End must be selected.');
|
|
else data = {
|
|
start: this.selectCfmCtEteSEStart,
|
|
end: this.selectCfmCtEteSEEnd,
|
|
min: this.selectDurationTime.min,
|
|
max: this.selectDurationTime.max,
|
|
type: 'cycle-time-end-to-end-start-end',
|
|
};
|
|
break;
|
|
default:
|
|
break;
|
|
};
|
|
break;
|
|
default:
|
|
break;
|
|
};
|
|
|
|
this.isLoading = true;
|
|
this.isSubmit = true;
|
|
await this.conformanceStore.addLogConformanceTempCheckerId(data);
|
|
await this.conformanceStore.getLogConformanceTempReport();
|
|
this.isShowBar = false;
|
|
this.isLoading = false;
|
|
// Results page Cover Plate
|
|
this.$emitter.emit('coverPlate', false);
|
|
this.$toast.success('Apply Success. View the Conformance Checking Results.');
|
|
},
|
|
},
|
|
created() {
|
|
this.isShowBar = true;
|
|
this.$emitter.on('actListData', (data) => {
|
|
this.selectConformanceTask = data;
|
|
});
|
|
this.$emitter.on('actRadioData', (data) => {
|
|
switch (data.category) {
|
|
case 'Start':
|
|
this.selectConformanceStart = data.task;
|
|
break;
|
|
case 'End':
|
|
this.selectConformanceEnd = data.task;
|
|
break;
|
|
case 'From':
|
|
this.selectConformanceFrom = data.task;
|
|
break;
|
|
case 'To':
|
|
this.selectConformanceTo = data.task;
|
|
break;
|
|
// 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;
|
|
};
|
|
if(this.selectConformanceStart !== null && this.selectConformanceEnd !== null){
|
|
this.selectConformanceStartAndEnd = [this.selectConformanceStart, this.selectConformanceEnd];
|
|
};
|
|
});
|
|
this.$emitter.on('getListSequence', (data) => {
|
|
this.listSeq = data;
|
|
});
|
|
// Radio 切換時,資料要清空
|
|
this.$emitter.on('isRadioChange', (data) => {
|
|
if(data) {
|
|
this.selectTimeReset();
|
|
this.selectDurationTime = null;
|
|
};
|
|
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) {
|
|
this.selectConformanceStartAndEnd = null;
|
|
this.listSeq = [];
|
|
};
|
|
});
|
|
this.$emitter.on('isRadioProcessScopeChange', (data) => {
|
|
if(data) {
|
|
this.selectDurationTime = null;
|
|
};
|
|
});
|
|
this.$emitter.on('isRadioActSeqMoreChange', (data) => {
|
|
if(data) {
|
|
if(this.selectedActSeqMore === 'All') {
|
|
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;
|
|
};
|
|
}else{
|
|
this.selectDurationTime = null;
|
|
};
|
|
};
|
|
});
|
|
this.$emitter.on('isRadioActSeqFromToChange', (data) => {
|
|
if(data) {
|
|
this.selectDurationTime = null;
|
|
};
|
|
});
|
|
},
|
|
}
|
|
</script>
|
|
<style>
|
|
.text-shadow{
|
|
text-shadow: 1.5px 1px 8px black;
|
|
}
|
|
</style>
|