fix gant timing & setpoingHMI

This commit is contained in:
=
2020-07-17 14:32:55 +02:00
parent 61afcc2d01
commit 00a9634b76
6 changed files with 27 additions and 23 deletions
@@ -4,7 +4,7 @@
<label>{{value.numDone}}</label>
<div class="col">
<small>{{'history-item_warmup' | localize("tempo riscaldo")}}</small>
<span>{{value.timeWarm / 60 | round(0)}}'{{value.timeWarm % 60 | round(0)}}''</span>
<span>{{Math.floor(value.timeWarm / 60) | round(0)}}'{{value.timeWarm % 60 | round(0)}}''</span>
</div>
<div class="col">
<small>{{'history-item_vacuum' | localize("vuoto")}}</small>
@@ -12,7 +12,7 @@
</div>
<div class="col">
<small>{{'history-item_cycletime' | localize("tempo ciclo netto")}}</small>
<span>{{value.timeCycleNet / 60 | round(0)}}'{{value.timeCycleNet % 60 | round(0)}}''</span>
<span>{{Math.floor(value.timeCycleNet / 60) | round(0)}}'{{value.timeCycleNet % 60 | round(0)}}''</span>
</div>
<div class="col">
<i class="fa fa-caret-left" @click="showDetails = !showDetails" v-if="!showDetails"></i>
@@ -32,7 +32,7 @@
</div>
<div class="col">
<small>{{'history-item_cycletimegross' | localize("tempo ciclo lordo")}}</small>
<span>{{value.timeCycleGross / 60 | round(0)}}'{{value.timeCycleGross % 60 | round(0)}}''</span>
<span>{{Math.floor(value.timeCycleGross / 60) | round(0)}}'{{value.timeCycleGross % 60 | round(0)}}''</span>
</div>
</div>
<div class="row">
@@ -52,7 +52,7 @@
<div class="row">
<div class="col">
<small>{{'history-item_vacuumtime' | localize("tempo vuoto")}}</small>
<span>{{value.timeVacuum / 60 | round(0)}}'{{value.timeVacuum % 60 | round(0)}}''</span>
<span>{{Math.floor(value.timeVacuum / 60) | round(0)}}'{{value.timeVacuum % 60 | round(0)}}''</span>
</div>
<div class="col">
<small>{{'history-item_mouldEnergyIN' | localize("energia utilizzata in")}}</small>
@@ -143,7 +143,7 @@
<span>{{'dashboard-time-cycle' | localize('tempo/ciclo')}}</span>
<span
v-if="panel.lastTCiclo"
>{{panel.lastTCiclo / 60 | round(0)}}'{{panel.lastTCiclo % 60 | round(0)}}''</span>
>{{Math.floor(panel.lastTCiclo / 60) | round(0)}}'{{panel.lastTCiclo % 60 | round(0)}}''</span>
<span v-else>--</span>
</div>
<stats class="stats" :width="614" :height="65" :value="panel.tS_TCiclo"></stats>
@@ -29,7 +29,7 @@ export default class Gantt extends Vue {
secondSize: 20,
stepDuration: 2,
labelInterval: 10,
maxGanttDuration: 500,
maxGanttDuration: 5000,
block_status_minDuration: 4,
block_delay_minDuration: 1.5,
block_body_Heating_minDuration: 5,
+1 -1
View File
@@ -154,7 +154,7 @@ export class Hub {
}
public static recipeFullData(data) {
recipeActions.setCurrent(store, data);
recipeActions.setCurrent(store, data, true);
}
public static recipeOverData(data) {
@@ -2,6 +2,7 @@ import { baseRestService } from "../_base/baseRestService";
import { CONFIGURATION } from "@/config";
import { recipeActions } from "@/store/recipe.store";
import { store } from "@/store";
import { dataService } from "./dataService";
export class RecipeService extends baseRestService {
@@ -9,7 +10,7 @@ export class RecipeService extends baseRestService {
async GetCurrent() {
let result = await this.Get((await this.BASE_URL()) + "current");
recipeActions.setCurrent(store, result);
recipeActions.setCurrent(store, result, false);
return result;
}
+18 -15
View File
@@ -8,7 +8,7 @@ export interface RecipeStoreModel {
export interface RecipeActions {
setCurrent(context, model: Recipe.IRecipe);
setCurrent(context, model: Recipe.IRecipe, avoidSetpointHMI: boolean);
setOverview(context, model: Overview.IOverview);
}
@@ -46,16 +46,22 @@ export const recipeStore = {
mutations: {
SetCurrent(state, model: Recipe.IRecipe) {
for (const key in model) {
if (model.hasOwnProperty(key)) {
if (model[key]) {
const m = model[key] as Recipe.IValue;
Vue.set(state.current, key, m);
if ((state._map as Map<number, Recipe.IValue>).has(m.id))
Object.assign((state._map as Map<number, Recipe.IValue>).get(m.id), m)
else
SetCurrent(state, model: { avoidSetpoint: boolean, recipe: Recipe.IRecipe }) {
for (const key in model.recipe) {
if (model.recipe.hasOwnProperty(key)) {
if (model.recipe[key]) {
const m = model.recipe[key] as Recipe.IValue;
if ((state._map as Map<number, Recipe.IValue>).has(m.id)) {
let v = (state._map as Map<number, Recipe.IValue>).get(m.id);
if (model.avoidSetpoint)
m.setpointHMI = undefined;
Object.assign(v, m);
}
else {
(state._map as Map<number, Recipe.IValue>).set(m.id, m)
Vue.set(state.current, key, m);
}
}
}
}
@@ -75,15 +81,13 @@ export const recipeStore = {
state.current[key].status.visible = true;
}
}
}
},
actions: {
async setCurrent(context, model: Recipe.IRecipe) {
context.commit("SetCurrent", model);
async setCurrent(context, model: Recipe.IRecipe, avoidSetpointHMI: boolean = false) {
context.commit("SetCurrent", { avoidSetpoint: avoidSetpointHMI, recipe: model });
var c = await CONFIGURATION;
if (c.allUIVisible) context.commit("SetAllVisible")
@@ -92,7 +96,6 @@ export const recipeStore = {
setOverview(context, model: Overview.IOverview) {
context.commit("SetOverview", model);
},
} as RecipeActions
}