Here is the data I have received.
{name: "Sinto 6", val: {…}, line: "Sinto 6"}
line: "Sinto 6"
name: "Sinto 6"
val:
AvgMachTime: 253
AvgManTime: 1343
CollectMachTimer: 359
CollectManTimer: 108
CycleTimeMach: 359
CycleTimeMan: 140
FaultTime: 15297
MachTargetSeconds: 330
ManTargetSeconds: 95
NGPartCount: 63
OnHeatTime: 11201
PartCount: 12
PartTarget: 78
I'm attempting to update the state values using Vue.js like this:
const PERFORMANCE_COMMIT = (state, payload) => {
Vue.set(state["Performance"][payload.line], [payload.val], payload.val);
}
I have recognized that one of the values in my payload.val should be the identifier of the value rather than the name itself. How can I accurately reference this?
This is how my current state is structured:
Performance: {
TotalPartTarget: 0,
TotalPartCount: 0,
Difference: 0,
OEE: 0,
OEETarget: 100,
"Sinto 6" :{
PartTarget: 0,
PartCount: 0,
NGPartCount: 0,
OEE: 0,
FaultTime: 0,
OnHeatTime: 0,
CycleTimeMan: 0,
CycleTimeMach: 0,
CollectManTimer: 0,
CollectMachTimer: 0,
AvgManTime: 0,
AvgMachTime: 0,
ManTargetSeconds: 0,
MachTargetSeconds: 0
Edit: Corrections made on spelling errors