Remove pure passthrough getters from conformance store
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RaRBJFZKSTA7naHGuQHfnQ
This commit is contained in:
@@ -358,8 +358,8 @@
|
|||||||
<MoreModal
|
<MoreModal
|
||||||
:listModal="issuesModal"
|
:listModal="issuesModal"
|
||||||
@closeModal="issuesModal = $event"
|
@closeModal="issuesModal = $event"
|
||||||
:listTraces="issueTraces"
|
:listTraces="allIssueTraces"
|
||||||
:taskSeq="taskSeq"
|
:taskSeq="allTaskSeq"
|
||||||
:cases="cases"
|
:cases="cases"
|
||||||
:listNo="issuesNo"
|
:listNo="issuesNo"
|
||||||
:traceId="traceId"
|
:traceId="traceId"
|
||||||
@@ -369,8 +369,8 @@
|
|||||||
<MoreModal
|
<MoreModal
|
||||||
:listModal="loopModal"
|
:listModal="loopModal"
|
||||||
@closeModal="loopModal = $event"
|
@closeModal="loopModal = $event"
|
||||||
:listTraces="loopTraces"
|
:listTraces="allLoopTraces"
|
||||||
:taskSeq="loopTaskSeq"
|
:taskSeq="allLoopTaskSeq"
|
||||||
:cases="loopCases"
|
:cases="loopCases"
|
||||||
:listNo="loopNo"
|
:listNo="loopNo"
|
||||||
:traceId="looptraceId"
|
:traceId="looptraceId"
|
||||||
@@ -413,12 +413,12 @@ import emitter from "@/utils/emitter";
|
|||||||
|
|
||||||
const conformanceStore = useConformanceStore();
|
const conformanceStore = useConformanceStore();
|
||||||
const {
|
const {
|
||||||
conformanceTempReportData,
|
allConformanceTempReportData,
|
||||||
issueTraces,
|
allIssueTraces,
|
||||||
taskSeq,
|
allTaskSeq,
|
||||||
cases,
|
cases,
|
||||||
loopTraces,
|
allLoopTraces,
|
||||||
loopTaskSeq,
|
allLoopTaskSeq,
|
||||||
loopCases,
|
loopCases,
|
||||||
} = storeToRefs(conformanceStore);
|
} = storeToRefs(conformanceStore);
|
||||||
|
|
||||||
@@ -525,11 +525,11 @@ const openMore = async (no) => {
|
|||||||
// Use async/await to prevent errors caused by asynchronous data not being available yet
|
// Use async/await to prevent errors caused by asynchronous data not being available yet
|
||||||
issuesNo.value = no;
|
issuesNo.value = no;
|
||||||
await conformanceStore.getConformanceIssue(no);
|
await conformanceStore.getConformanceIssue(no);
|
||||||
if (issueTraces.value.length === 0) return;
|
if (allIssueTraces.value.length === 0) return;
|
||||||
traceId.value = issueTraces.value[0].id;
|
traceId.value = allIssueTraces.value[0].id;
|
||||||
firstCases.value = await conformanceStore.getConformanceTraceDetail(
|
firstCases.value = await conformanceStore.getConformanceTraceDetail(
|
||||||
no,
|
no,
|
||||||
issueTraces.value[0].id,
|
allIssueTraces.value[0].id,
|
||||||
0,
|
0,
|
||||||
);
|
);
|
||||||
issuesModal.value = true;
|
issuesModal.value = true;
|
||||||
@@ -543,11 +543,11 @@ const openLoopMore = async (no) => {
|
|||||||
// Use async/await to prevent errors caused by asynchronous data not being available yet
|
// Use async/await to prevent errors caused by asynchronous data not being available yet
|
||||||
loopNo.value = no;
|
loopNo.value = no;
|
||||||
await conformanceStore.getConformanceLoop(no);
|
await conformanceStore.getConformanceLoop(no);
|
||||||
if (loopTraces.value.length === 0) return;
|
if (allLoopTraces.value.length === 0) return;
|
||||||
looptraceId.value = loopTraces.value[0].id;
|
looptraceId.value = allLoopTraces.value[0].id;
|
||||||
loopFirstCases.value = await conformanceStore.getConformanceLoopsTraceDetail(
|
loopFirstCases.value = await conformanceStore.getConformanceLoopsTraceDetail(
|
||||||
no,
|
no,
|
||||||
loopTraces.value[0].id,
|
allLoopTraces.value[0].id,
|
||||||
0,
|
0,
|
||||||
);
|
);
|
||||||
loopModal.value = true;
|
loopModal.value = true;
|
||||||
@@ -959,7 +959,7 @@ const setTimeChartData = (chartData, xMax, xMin, yMax, yMin) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// watch
|
// watch
|
||||||
watch(conformanceTempReportData, (newValue) => {
|
watch(allConformanceTempReportData, (newValue) => {
|
||||||
if (newValue?.rule && newValue.rule.min !== null) {
|
if (newValue?.rule && newValue.rule.min !== null) {
|
||||||
selectDurationTime.value = {
|
selectDurationTime.value = {
|
||||||
min: newValue.rule.min,
|
min: newValue.rule.min,
|
||||||
|
|||||||
@@ -180,7 +180,7 @@ const {
|
|||||||
selectedProcessScope,
|
selectedProcessScope,
|
||||||
selectedActSeqMore,
|
selectedActSeqMore,
|
||||||
selectedActSeqFromTo,
|
selectedActSeqFromTo,
|
||||||
conformanceAllTasks,
|
allConformanceTask,
|
||||||
cfmPtEteWhole,
|
cfmPtEteWhole,
|
||||||
cfmPtEteStart: cfmPtEteStartStore,
|
cfmPtEteStart: cfmPtEteStartStore,
|
||||||
cfmPtEteEnd: cfmPtEteEndStore,
|
cfmPtEteEnd: cfmPtEteEndStore,
|
||||||
@@ -204,7 +204,7 @@ const {
|
|||||||
conformanceRuleData,
|
conformanceRuleData,
|
||||||
conformanceLogCreateCheckId,
|
conformanceLogCreateCheckId,
|
||||||
conformanceFilterCreateCheckId,
|
conformanceFilterCreateCheckId,
|
||||||
conformanceTempReportData,
|
allConformanceTempReportData,
|
||||||
} = storeToRefs(conformanceStore);
|
} = storeToRefs(conformanceStore);
|
||||||
const { activityRadioData } = storeToRefs(conformanceInputStore);
|
const { activityRadioData } = storeToRefs(conformanceInputStore);
|
||||||
|
|
||||||
@@ -391,7 +391,7 @@ const isApplyBtnDisabled = computed(() => {
|
|||||||
|
|
||||||
// When opening a rule file, display the saved options, rules, and time
|
// When opening a rule file, display the saved options, rules, and time
|
||||||
let reportWatchTimerId = null;
|
let reportWatchTimerId = null;
|
||||||
watch(conformanceTempReportData, (newValue) => {
|
watch(allConformanceTempReportData, (newValue) => {
|
||||||
if (reportWatchTimerId) clearTimeout(reportWatchTimerId);
|
if (reportWatchTimerId) clearTimeout(reportWatchTimerId);
|
||||||
reportWatchTimerId = setTimeout(() => {
|
reportWatchTimerId = setTimeout(() => {
|
||||||
if (newValue !== null) {
|
if (newValue !== null) {
|
||||||
|
|||||||
@@ -376,8 +376,8 @@ const {
|
|||||||
selectedActSeqMore,
|
selectedActSeqMore,
|
||||||
selectedActSeqFromTo,
|
selectedActSeqFromTo,
|
||||||
conformanceTask,
|
conformanceTask,
|
||||||
cfmSeqStart,
|
allCfmSeqStart,
|
||||||
cfmSeqEnd,
|
allCfmSeqEnd,
|
||||||
cfmPtEteStart,
|
cfmPtEteStart,
|
||||||
cfmPtEteEnd,
|
cfmPtEteEnd,
|
||||||
cfmPtEteSE,
|
cfmPtEteSE,
|
||||||
@@ -435,14 +435,14 @@ const taskEnd = ref(null);
|
|||||||
const cfmSeqStartData = computed(() => {
|
const cfmSeqStartData = computed(() => {
|
||||||
const selectedTask = task.value ?? props.isSubmitShowDataSeq?.task ?? null;
|
const selectedTask = task.value ?? props.isSubmitShowDataSeq?.task ?? null;
|
||||||
return isEndSelected.value
|
return isEndSelected.value
|
||||||
? setSeqStartAndEndData(cfmSeqEnd.value, "sources", selectedTask)
|
? setSeqStartAndEndData(allCfmSeqEnd.value, "sources", selectedTask)
|
||||||
: cfmSeqStart.value.map((i) => i.label);
|
: allCfmSeqStart.value.map((i) => i.label);
|
||||||
});
|
});
|
||||||
const cfmSeqEndData = computed(() => {
|
const cfmSeqEndData = computed(() => {
|
||||||
const selectedTask = task.value ?? props.isSubmitShowDataSeq?.task ?? null;
|
const selectedTask = task.value ?? props.isSubmitShowDataSeq?.task ?? null;
|
||||||
return isStartSelected.value
|
return isStartSelected.value
|
||||||
? setSeqStartAndEndData(cfmSeqStart.value, "sinks", selectedTask)
|
? setSeqStartAndEndData(allCfmSeqStart.value, "sinks", selectedTask)
|
||||||
: cfmSeqEnd.value.map((i) => i.label);
|
: allCfmSeqEnd.value.map((i) => i.label);
|
||||||
});
|
});
|
||||||
// Processing time
|
// Processing time
|
||||||
const cfmPtEteStartData = computed(() => {
|
const cfmPtEteStartData = computed(() => {
|
||||||
@@ -584,7 +584,7 @@ watch(
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the start and end radio data.
|
* Sets the start and end radio data.
|
||||||
* @param {object} data - Activities list data from the backend (cfmSeqStart, cfmSeqEnd, cfmPtEteSE, etc.).
|
* @param {object} data - Activities list data from the backend (allCfmSeqStart, allCfmSeqEnd, cfmPtEteSE, etc.).
|
||||||
* @param {string} category - 'start' or 'end'.
|
* @param {string} category - 'start' or 'end'.
|
||||||
* @returns {array}
|
* @returns {array}
|
||||||
*/
|
*/
|
||||||
@@ -615,7 +615,7 @@ function setStartAndEndData(data, category, taskVal) {
|
|||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Resets the activity sequence linked start and end radio data.
|
* Resets the activity sequence linked start and end radio data.
|
||||||
* @param {object} data - Activities list data from the backend (cfmSeqStart or cfmSeqEnd).
|
* @param {object} data - Activities list data from the backend (allCfmSeqStart or allCfmSeqEnd).
|
||||||
* @param {string} category - 'sources' or 'sinks'.
|
* @param {string} category - 'sources' or 'sinks'.
|
||||||
* @param {string} task - The selected activity task.
|
* @param {string} task - The selected activity task.
|
||||||
* @returns {array}
|
* @returns {array}
|
||||||
|
|||||||
@@ -250,10 +250,10 @@ const {
|
|||||||
selectedProcessScope,
|
selectedProcessScope,
|
||||||
selectedActSeqMore,
|
selectedActSeqMore,
|
||||||
selectedActSeqFromTo,
|
selectedActSeqFromTo,
|
||||||
conformanceAllTasks,
|
allConformanceTask,
|
||||||
conformanceTask,
|
conformanceTask,
|
||||||
cfmSeqStart,
|
allCfmSeqStart,
|
||||||
cfmSeqEnd,
|
allCfmSeqEnd,
|
||||||
cfmPtEteStart,
|
cfmPtEteStart,
|
||||||
cfmPtEteEnd,
|
cfmPtEteEnd,
|
||||||
cfmPtEteSE,
|
cfmPtEteSE,
|
||||||
@@ -471,7 +471,7 @@ emitter.on("actRadioData", (data) => {
|
|||||||
// Activity duration
|
// Activity duration
|
||||||
case "cfmDur":
|
case "cfmDur":
|
||||||
state.timeDuration = getDurationTime(
|
state.timeDuration = getDurationTime(
|
||||||
conformanceAllTasks.value,
|
allConformanceTask.value,
|
||||||
"act",
|
"act",
|
||||||
task,
|
task,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -91,18 +91,9 @@ export const useConformanceStore = defineStore("conformanceStore", {
|
|||||||
conformanceFileName: null, // File name displayed in the save success modal
|
conformanceFileName: null, // File name displayed in the save success modal
|
||||||
}),
|
}),
|
||||||
getters: {
|
getters: {
|
||||||
conformanceAllTasks: (state) => {
|
|
||||||
return state.allConformanceTask;
|
|
||||||
},
|
|
||||||
conformanceTask: (state) => {
|
conformanceTask: (state) => {
|
||||||
return state.allConformanceTask.map((i) => i.label);
|
return state.allConformanceTask.map((i) => i.label);
|
||||||
},
|
},
|
||||||
cfmSeqStart: (state) => {
|
|
||||||
return state.allCfmSeqStart;
|
|
||||||
},
|
|
||||||
cfmSeqEnd: (state) => {
|
|
||||||
return state.allCfmSeqEnd;
|
|
||||||
},
|
|
||||||
cfmPtEteWhole: (state) => {
|
cfmPtEteWhole: (state) => {
|
||||||
return state.allProcessingTime.end_to_end.whole;
|
return state.allProcessingTime.end_to_end.whole;
|
||||||
},
|
},
|
||||||
@@ -157,18 +148,6 @@ export const useConformanceStore = defineStore("conformanceStore", {
|
|||||||
cfmCtEteSE: (state) => {
|
cfmCtEteSE: (state) => {
|
||||||
return state.allCycleTime.end_to_end.start_end;
|
return state.allCycleTime.end_to_end.start_end;
|
||||||
},
|
},
|
||||||
conformanceTempReportData: (state) => {
|
|
||||||
return state.allConformanceTempReportData;
|
|
||||||
},
|
|
||||||
routeFile: (state) => {
|
|
||||||
return state.allRouteFile;
|
|
||||||
},
|
|
||||||
issueTraces: (state) => {
|
|
||||||
return state.allIssueTraces;
|
|
||||||
},
|
|
||||||
taskSeq: (state) => {
|
|
||||||
return state.allTaskSeq;
|
|
||||||
},
|
|
||||||
cases: (state) => {
|
cases: (state) => {
|
||||||
if (state.allCases !== null) {
|
if (state.allCases !== null) {
|
||||||
return state.allCases.map((c) => {
|
return state.allCases.map((c) => {
|
||||||
@@ -220,12 +199,6 @@ export const useConformanceStore = defineStore("conformanceStore", {
|
|||||||
}
|
}
|
||||||
return [];
|
return [];
|
||||||
},
|
},
|
||||||
loopTraces: (state) => {
|
|
||||||
return state.allLoopTraces;
|
|
||||||
},
|
|
||||||
loopTaskSeq: (state) => {
|
|
||||||
return state.allLoopTaskSeq;
|
|
||||||
},
|
|
||||||
loopCases: (state) => {
|
loopCases: (state) => {
|
||||||
if (state.allLoopCases !== null) {
|
if (state.allLoopCases !== null) {
|
||||||
return state.allLoopCases.map((c) => {
|
return state.allLoopCases.map((c) => {
|
||||||
|
|||||||
@@ -138,7 +138,7 @@ export default {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
await conformanceStore.getConformanceReport(true);
|
await conformanceStore.getConformanceReport(true);
|
||||||
to.meta.file = conformanceStore.routeFile;
|
to.meta.file = conformanceStore.allRouteFile;
|
||||||
}
|
}
|
||||||
next();
|
next();
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ defineOptions({
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
await conformanceStore.getConformanceReport();
|
await conformanceStore.getConformanceReport();
|
||||||
to.meta.file = await conformanceStore.conformanceTempReportData?.file;
|
to.meta.file = await conformanceStore.allConformanceTempReportData?.file;
|
||||||
}
|
}
|
||||||
next();
|
next();
|
||||||
},
|
},
|
||||||
@@ -68,7 +68,7 @@ const {
|
|||||||
selectedActSeqMore,
|
selectedActSeqMore,
|
||||||
selectedActSeqFromTo,
|
selectedActSeqFromTo,
|
||||||
conformanceRuleData,
|
conformanceRuleData,
|
||||||
conformanceTempReportData,
|
allConformanceTempReportData,
|
||||||
conformanceFileName,
|
conformanceFileName,
|
||||||
} = storeToRefs(conformanceStore);
|
} = storeToRefs(conformanceStore);
|
||||||
|
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ export default {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
await conformanceStore.getConformanceReport(true);
|
await conformanceStore.getConformanceReport(true);
|
||||||
to.meta.file = conformanceStore.routeFile;
|
to.meta.file = conformanceStore.allRouteFile;
|
||||||
}
|
}
|
||||||
next();
|
next();
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -263,7 +263,7 @@ export default {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
await conformanceStore.getConformanceReport(true);
|
await conformanceStore.getConformanceReport(true);
|
||||||
to.meta.file = conformanceStore.routeFile;
|
to.meta.file = conformanceStore.allRouteFile;
|
||||||
}
|
}
|
||||||
next();
|
next();
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user