Conformance: Activity sequence Start & End linkage done.
This commit is contained in:
@@ -18,8 +18,8 @@ export default defineStore('conformanceStore', {
|
||||
conformanceFilterId: null,
|
||||
conformanceTempCheckerId: null,
|
||||
allConformanceTask: [],
|
||||
allConformanceStart: [],
|
||||
allConformanceEnd: [],
|
||||
allCfmSeqStart: [],
|
||||
allCfmSeqEnd: [],
|
||||
allProcessingTime: {},
|
||||
allWaitingTime: {},
|
||||
allCycleTime: {},
|
||||
@@ -45,11 +45,11 @@ export default defineStore('conformanceStore', {
|
||||
conformanceTask: state => {
|
||||
return state.allConformanceTask.map(i => i.label);
|
||||
},
|
||||
conformanceStart: state => {
|
||||
return state.allConformanceStart;
|
||||
cfmSeqStart: state => {
|
||||
return state.allCfmSeqStart;
|
||||
},
|
||||
conformanceEnd: state => {
|
||||
return state.allConformanceEnd;
|
||||
cfmSeqEnd: state => {
|
||||
return state.allCfmSeqEnd;
|
||||
},
|
||||
cfmPtEteWhole: state => {
|
||||
return state.allProcessingTime.end_to_end.whole;
|
||||
@@ -116,9 +116,20 @@ export default defineStore('conformanceStore', {
|
||||
},
|
||||
cases: state => {
|
||||
if(state.allCases !== null){
|
||||
state.allCases.map(c => {
|
||||
const newData = state.allCases.map(c => {
|
||||
c.started_at = moment(c.started_at).format('YYYY/MM/DD HH:MM');
|
||||
c.completed_at = moment(c.completed_at).format('YYYY/MM/DD HH:MM');
|
||||
c.facets.map(fac => {
|
||||
switch(fac.type) {
|
||||
case 'float-list':
|
||||
fac.value = fac.value.map(v => v !== null ? new Decimal(v.toFixed(2)) : null);
|
||||
fac.value = fac.value.join(', ');
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
};
|
||||
return fac;
|
||||
});
|
||||
c.attributes.map(att => {
|
||||
switch (att.type) {
|
||||
case 'date':
|
||||
@@ -131,11 +142,12 @@ export default defineStore('conformanceStore', {
|
||||
break;
|
||||
}
|
||||
return att;
|
||||
})
|
||||
return c;
|
||||
});
|
||||
const { facets, attributes, ...rest } = c;
|
||||
return { ...rest, facets, attributes };
|
||||
});
|
||||
return newData
|
||||
};
|
||||
return state.allCases;
|
||||
},
|
||||
loopTraces: state => {
|
||||
return state.allLoopTraces;
|
||||
@@ -145,25 +157,9 @@ export default defineStore('conformanceStore', {
|
||||
},
|
||||
loopCases: state => {
|
||||
if(state.allLoopCases !== null){
|
||||
state.allLoopCases.map(c => {
|
||||
const newData = state.allLoopCases.map(c => {
|
||||
c.started_at = moment(c.started_at).format('YYYY/MM/DD HH:MM');
|
||||
c.completed_at = moment(c.completed_at).format('YYYY/MM/DD HH:MM');
|
||||
// if(c.facets) {
|
||||
// c.facets = '111';
|
||||
// c.facets.map(att => {
|
||||
// switch(att.type) {
|
||||
// case 'float-list':
|
||||
// console.log(att.value);
|
||||
// att.value ='111'
|
||||
// // att.value = att.value.map(v => v !== null ? new Decimal(v.toFixed(2)) : null);
|
||||
// // att.value = att.value.join(', ');
|
||||
// break;
|
||||
// default:
|
||||
// break;
|
||||
// };
|
||||
// return att;
|
||||
// });
|
||||
// };
|
||||
c.attributes.map(att => {
|
||||
switch (att.type) {
|
||||
case 'date':
|
||||
@@ -179,8 +175,8 @@ export default defineStore('conformanceStore', {
|
||||
});
|
||||
return c;
|
||||
});
|
||||
return newData;
|
||||
};
|
||||
return state.allLoopCases;
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
@@ -194,8 +190,8 @@ export default defineStore('conformanceStore', {
|
||||
try {
|
||||
const response = await this.$axios.get(api);
|
||||
this.allConformanceTask = response.data.tasks;
|
||||
this.allConformanceStart = response.data.sources;
|
||||
this.allConformanceEnd = response.data.sinks;
|
||||
this.allCfmSeqStart = response.data.sources;
|
||||
this.allCfmSeqEnd = response.data.sinks;
|
||||
this.allProcessingTime = response.data.processing_time;
|
||||
this.allWaitingTime = response.data.waiting_time;
|
||||
this.allCycleTime = response.data.cycle_time;
|
||||
|
||||
Reference in New Issue
Block a user