Merge branch 'develop' of https://bitbucket.org/ncarminati/cms_thermo_active into feature/recipe
This commit is contained in:
+9
-3
@@ -1,6 +1,6 @@
|
||||
import Vue from 'vue';
|
||||
import Component from 'vue-class-component';
|
||||
import { Prop } from 'vue-property-decorator';
|
||||
import { Prop, Watch } from 'vue-property-decorator';
|
||||
import StepFooter from "@/app_modules_thermo/setup/components/step-footer.vue";
|
||||
import { Modal, ModalHelper } from "@/components/modals";
|
||||
import { Factory, messageService, awaiter } from "@/_base";
|
||||
@@ -26,8 +26,9 @@ export default class ShowCicloInfo extends Vue {
|
||||
// this.deferred.resolve(-1);
|
||||
};
|
||||
|
||||
async conferma() {
|
||||
// recipeActions.setCurrent(store, this.recipe);
|
||||
|
||||
@Watch('recipe', { deep: true })
|
||||
async recipeChanged(n, o) {
|
||||
await recipeService.Update(
|
||||
{
|
||||
cycle_forming_type: this.recipe.cycle_forming_type,
|
||||
@@ -54,6 +55,11 @@ export default class ShowCicloInfo extends Vue {
|
||||
cycle_loader_manualunloading_enabled: this.recipe.cycle_loader_manualunloading_enabled,
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
async conferma() {
|
||||
// recipeActions.setCurrent(store, this.recipe);
|
||||
|
||||
await recipeService.Confirm('Cycle');
|
||||
ModalHelper.HideModal();
|
||||
this.deferred.resolve(1);
|
||||
|
||||
+9
-3
@@ -1,6 +1,6 @@
|
||||
import Vue from 'vue';
|
||||
import Component from 'vue-class-component';
|
||||
import { Prop } from 'vue-property-decorator';
|
||||
import { Prop, Watch } from 'vue-property-decorator';
|
||||
import { Factory, messageService, awaiter } from "@/_base";
|
||||
import { Modal, ModalHelper } from "@/components/modals";
|
||||
import StepFooter from "@/app_modules_thermo/setup/components/step-footer.vue";
|
||||
@@ -37,8 +37,8 @@ export default class ShowControstampoInfo extends Vue {
|
||||
// this.deferred.resolve(-1);
|
||||
};
|
||||
|
||||
async conferma() {
|
||||
// recipeActions.setCurrent(store, this.recipe);
|
||||
@Watch('recipe', { deep: true })
|
||||
async recipeChanged(n, o) {
|
||||
await recipeService.Update(
|
||||
{
|
||||
upperplate_cycle_type: this.recipe.upperplate_cycle_type,
|
||||
@@ -71,6 +71,12 @@ export default class ShowControstampoInfo extends Vue {
|
||||
upperplate_extraction_manual: this.recipe.upperplate_extraction_manual,
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
async conferma() {
|
||||
// recipeActions.setCurrent(store, this.recipe);
|
||||
|
||||
await recipeService.Confirm('UpperPlate');
|
||||
ModalHelper.HideModal();
|
||||
this.deferred.resolve(1);
|
||||
|
||||
+9
-3
@@ -1,6 +1,6 @@
|
||||
import Vue from 'vue';
|
||||
import Component from 'vue-class-component';
|
||||
import { Prop } from 'vue-property-decorator';
|
||||
import { Prop, Watch } from 'vue-property-decorator';
|
||||
import { Factory, messageService, awaiter } from "@/_base";
|
||||
import { Modal, ModalHelper } from "@/components/modals";
|
||||
import StepFooter from "@/app_modules_thermo/setup/components/step-footer.vue";
|
||||
@@ -34,8 +34,9 @@ export default class ShowEstrazioneInfo extends Vue {
|
||||
// this.deferred.resolve(-1);
|
||||
};
|
||||
|
||||
async conferma() {
|
||||
// recipeActions.setCurrent(store, this.recipe);
|
||||
@Watch('recipe', { deep: true })
|
||||
async recipeChanged(n, o) {
|
||||
|
||||
await recipeService.Update(
|
||||
{
|
||||
extraction_main_type: this.recipe.extraction_main_type,
|
||||
@@ -51,6 +52,11 @@ export default class ShowEstrazioneInfo extends Vue {
|
||||
extraction_aux_manual: this.recipe.extraction_aux_manual,
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
async conferma() {
|
||||
// recipeActions.setCurrent(store, this.recipe);
|
||||
|
||||
await recipeService.Confirm('Extraction');
|
||||
ModalHelper.HideModal();
|
||||
this.deferred.resolve(1);
|
||||
|
||||
+8
-3
@@ -2,7 +2,7 @@ import Vue from "vue";
|
||||
import { Modal, ModalHelper } from "@/components/modals";
|
||||
import { Factory, messageService, awaiter } from "@/_base";
|
||||
import Component from "vue-class-component";
|
||||
import { Prop } from 'vue-property-decorator';
|
||||
import { Prop, Watch } from 'vue-property-decorator';
|
||||
import Stampo from "./stampo.vue";
|
||||
import Lastra from "./lastra.vue";
|
||||
import Piastra from "./piastra_riduzione.vue";
|
||||
@@ -55,8 +55,8 @@ export default class ShowFormatoInfo extends Vue {
|
||||
// this.deferred.resolve(-1);
|
||||
};
|
||||
|
||||
async conferma() {
|
||||
// recipeActions.setCurrent(store, this.recipe);
|
||||
@Watch('recipe', { deep: true })
|
||||
async recipeChanged(n, o) {
|
||||
await recipeService.Update(
|
||||
{
|
||||
general_sizes_mould_dim_x: this.recipe.general_sizes_mould_dim_x,
|
||||
@@ -78,6 +78,11 @@ export default class ShowFormatoInfo extends Vue {
|
||||
general_area_working_dxsx: this.recipe.general_area_working_dxsx,
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
async conferma() {
|
||||
// recipeActions.setCurrent(store, this.recipe);
|
||||
|
||||
await recipeService.Confirm('General');
|
||||
ModalHelper.HideModal();
|
||||
this.deferred.resolve(1);
|
||||
|
||||
+6
-3
@@ -3,7 +3,7 @@ import { Modal, ModalHelper } from "@/components/modals";
|
||||
import { Factory, messageService, awaiter } from "@/_base";
|
||||
import Component from "vue-class-component";
|
||||
import StepFooter from "@/app_modules_thermo/setup/components/step-footer.vue"
|
||||
import { Prop } from "vue-property-decorator";
|
||||
import { Prop, Watch } from "vue-property-decorator";
|
||||
import Slider from "@/app_modules_thermo/components/slider.vue";
|
||||
import Scheda from "@/app_modules_thermo/components/scheda.vue";
|
||||
import { recipeActions } from "@/store/recipe.store";
|
||||
@@ -45,8 +45,8 @@ export default class ShowImbutituraInfo extends Vue {
|
||||
// this.deferred.resolve(-1);
|
||||
};
|
||||
|
||||
async conferma(name: string) {
|
||||
// recipeActions.setCurrent(store, this.recipe);
|
||||
@Watch('recipe', { deep: true })
|
||||
async recipeChanged(n, o) {
|
||||
await recipeService.Update(
|
||||
{
|
||||
drawing_type: this.recipe.drawing_type,
|
||||
@@ -60,6 +60,9 @@ export default class ShowImbutituraInfo extends Vue {
|
||||
drawing_mould_up_delay: this.recipe.drawing_mould_up_delay,
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
async conferma(name: string) {
|
||||
await recipeService.Confirm('Drawing');
|
||||
ModalHelper.HideModal();
|
||||
this.deferred.resolve(1);
|
||||
|
||||
@@ -8,7 +8,7 @@ import SottosquadraControstampo from "./components/sottosquadra-controstampo.vue
|
||||
import Termoregolatori from "./components/termoregolatori.vue";
|
||||
import { recipeActions } from "@/store/recipe.store";
|
||||
import { store } from "@/store";
|
||||
import { Prop } from "vue-property-decorator";
|
||||
import { Prop, Watch } from "vue-property-decorator";
|
||||
import { Deferred } from "@/services";
|
||||
import { recipeService } from "@/services/recipeService";
|
||||
|
||||
@@ -35,8 +35,9 @@ export default class ShowOpzioniInfo extends Vue {
|
||||
// this.deferred.resolve(-1);
|
||||
};
|
||||
|
||||
async conferma() {
|
||||
// recipeActions.setCurrent(store, this.recipe);
|
||||
|
||||
@Watch('recipe', { deep: true })
|
||||
async recipeChanged(n, o) {
|
||||
await recipeService.Update(
|
||||
{
|
||||
options_undercutmould_1_mode: this.recipe.options_undercutmould_1_mode,
|
||||
@@ -141,6 +142,11 @@ export default class ShowOpzioniInfo extends Vue {
|
||||
options_thermoregulator_10_setpoint: this.recipe.options_thermoregulator_10_setpoint,
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
async conferma() {
|
||||
// recipeActions.setCurrent(store, this.recipe);
|
||||
|
||||
await recipeService.Confirm('Options');
|
||||
ModalHelper.HideModal();
|
||||
this.deferred.resolve(1);
|
||||
|
||||
+8
-3
@@ -2,7 +2,7 @@ import Vue from "vue";
|
||||
import { Modal, ModalHelper } from "@/components/modals";
|
||||
import { Factory, messageService, awaiter } from "@/_base";
|
||||
import Component from "vue-class-component";
|
||||
import { Prop } from 'vue-property-decorator';
|
||||
import { Prop, Watch } from 'vue-property-decorator';
|
||||
import Pirometro from "./base-components/pirometro.vue";
|
||||
import TermoregolazioneSuperiore from "./base-components/termo-superiore.vue";
|
||||
import TermoregolazioneInferiore from "./base-components/termo-inferiore.vue";
|
||||
@@ -27,8 +27,8 @@ export default class ShowPirometroInfo extends Vue {
|
||||
// this.deferred.resolve(-1);
|
||||
};
|
||||
|
||||
async conferma() {
|
||||
// recipeActions.setCurrent(store, this.recipe);
|
||||
@Watch('recipe', { deep: true })
|
||||
async recipeChanged(n, o) {
|
||||
await recipeService.Update(
|
||||
{
|
||||
pyrometer_pyrometer_enabled: this.recipe.pyrometer_pyrometer_enabled,
|
||||
@@ -52,6 +52,11 @@ export default class ShowPirometroInfo extends Vue {
|
||||
pyrometer_lowerthermoregulator_working_temperature: this.recipe.pyrometer_lowerthermoregulator_working_temperature,
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
async conferma() {
|
||||
// recipeActions.setCurrent(store, this.recipe);
|
||||
|
||||
await recipeService.Confirm('Pyrometer');
|
||||
ModalHelper.HideModal();
|
||||
this.deferred.resolve(1);
|
||||
|
||||
+8
-3
@@ -8,7 +8,7 @@ import Controstampo from "./controstampo.vue";
|
||||
import StepFooter from "@/app_modules_thermo/setup/components/step-footer.vue";
|
||||
import { recipeActions } from "@/store/recipe.store";
|
||||
import { store } from "@/store";
|
||||
import { Prop } from "vue-property-decorator";
|
||||
import { Prop, Watch } from "vue-property-decorator";
|
||||
import { Deferred } from "@/services";
|
||||
import { recipeService } from "@/services/recipeService";
|
||||
|
||||
@@ -35,8 +35,8 @@ export default class ShowQuoteVelocitaInfo extends Vue {
|
||||
// this.deferred.resolve(-1);
|
||||
};
|
||||
|
||||
async conferma() {
|
||||
// recipeActions.setCurrent(store, this.recipe);
|
||||
@Watch('recipe', { deep: true })
|
||||
async recipeChanged(n, o) {
|
||||
await recipeService.Update(
|
||||
{
|
||||
positions_mould_lower_position: this.recipe.positions_mould_lower_position,
|
||||
@@ -65,6 +65,11 @@ export default class ShowQuoteVelocitaInfo extends Vue {
|
||||
positions_upperplate_lowerdeceleration_speed: this.recipe.positions_upperplate_lowerdeceleration_speed,
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
async conferma() {
|
||||
// recipeActions.setCurrent(store, this.recipe);
|
||||
|
||||
await recipeService.Confirm('Positions');
|
||||
ModalHelper.HideModal();
|
||||
this.deferred.resolve(1);
|
||||
|
||||
+8
-3
@@ -1,6 +1,6 @@
|
||||
import Vue from 'vue';
|
||||
import Component from 'vue-class-component';
|
||||
import { Prop } from 'vue-property-decorator';
|
||||
import { Prop, Watch } from 'vue-property-decorator';
|
||||
import StepFooter from "@/app_modules_thermo/setup/components/step-footer.vue";
|
||||
import { Modal, ModalHelper } from "@/components/modals";
|
||||
import { Factory, messageService, awaiter } from "@/_base";
|
||||
@@ -39,8 +39,8 @@ export default class Raffreddamento extends Vue {
|
||||
// this.deferred.resolve(-1);
|
||||
};
|
||||
|
||||
async conferma() {
|
||||
// recipeActions.setCurrent(store, this.recipe);
|
||||
@Watch('recipe', { deep: true })
|
||||
async recipeChanged(n, o) {
|
||||
await recipeService.Update(
|
||||
{
|
||||
cooling_blowing_type: this.recipe.cooling_blowing_type,
|
||||
@@ -74,6 +74,11 @@ export default class Raffreddamento extends Vue {
|
||||
cooling_shutter_16_opening_perc: this.recipe.cooling_shutter_16_opening_perc,
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
async conferma() {
|
||||
// recipeActions.setCurrent(store, this.recipe);
|
||||
|
||||
await recipeService.Confirm('Cooling');
|
||||
ModalHelper.HideModal();
|
||||
this.deferred.resolve(1);
|
||||
|
||||
+8
-3
@@ -2,7 +2,7 @@ import Vue from "vue";
|
||||
import { Modal, ModalHelper } from "@/components/modals";
|
||||
import { Factory, messageService, awaiter } from "@/_base";
|
||||
import Component from "vue-class-component";
|
||||
import { Prop } from 'vue-property-decorator';
|
||||
import { Prop, Watch } from 'vue-property-decorator';
|
||||
import StepFooter from "@/app_modules_thermo/setup/components/step-footer.vue";
|
||||
import RiscaldiSup from "./base-components/riscaldi-superiori.vue";
|
||||
import RiscaldiInf from "./base-components/riscaldi-inferiori.vue";
|
||||
@@ -28,8 +28,8 @@ export default class ShowRiscaldamentoSuperioreInfo extends Vue {
|
||||
// this.deferred.resolve(-1);
|
||||
};
|
||||
|
||||
async conferma(name: string) {
|
||||
// recipeActions.setCurrent(store, this.recipe);
|
||||
@Watch('recipe', { deep: true })
|
||||
async recipeChanged(n, o) {
|
||||
await recipeService.Update(
|
||||
{
|
||||
heats_lowerheaters_max_time: this.recipe.heats_lowerheaters_max_time,
|
||||
@@ -49,6 +49,11 @@ export default class ShowRiscaldamentoSuperioreInfo extends Vue {
|
||||
heats_decomsustain_smoke_function_enabled: this.recipe.heats_decomsustain_smoke_function_enabled,
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
async conferma(name: string) {
|
||||
// recipeActions.setCurrent(store, this.recipe);
|
||||
|
||||
await warmersService.Update(store.state.warmers.channels.reduce((p, c) => { p[c.idChannel] = c.setpointHMI; return p; }, {}));
|
||||
await warmersService.Confirm();
|
||||
await recipeService.Confirm('Heats');
|
||||
|
||||
@@ -2,7 +2,7 @@ import Vue from "vue";
|
||||
import { Modal, ModalHelper } from "@/components/modals";
|
||||
import { Factory, messageService, awaiter } from "@/_base";
|
||||
import Component from "vue-class-component";
|
||||
import { Prop } from 'vue-property-decorator';
|
||||
import { Prop, Watch } from 'vue-property-decorator';
|
||||
import StepFooter from "@/app_modules_thermo/setup/components/step-footer.vue";
|
||||
import VuotoPrincipale from "./base-components/vuoto-principale.vue";
|
||||
import VuotoDiretto from "./base-components/vuoto-diretto.vue";
|
||||
@@ -38,8 +38,9 @@ export default class ShowVuotoInfo extends Vue {
|
||||
// this.deferred.resolve(-1);
|
||||
};
|
||||
|
||||
async conferma() {
|
||||
// recipeActions.setCurrent(store, this.recipe);
|
||||
|
||||
@Watch('recipe', { deep: true })
|
||||
async recipeChanged(n, o) {
|
||||
await recipeService.Update(
|
||||
{
|
||||
vacuum_main_start: this.recipe.vacuum_main_start,
|
||||
@@ -76,6 +77,11 @@ export default class ShowVuotoInfo extends Vue {
|
||||
vacuum_pre_3_chart_setpointy: this.recipe.vacuum_pre_3_chart_setpointy,
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
async conferma() {
|
||||
// recipeActions.setCurrent(store, this.recipe);
|
||||
|
||||
await recipeService.Confirm('Vacuum');
|
||||
ModalHelper.HideModal();
|
||||
this.deferred.resolve(1);
|
||||
|
||||
@@ -149,7 +149,7 @@ export class Hub {
|
||||
}
|
||||
|
||||
public static modulesData(data) {
|
||||
modulesActions.set(store, data);
|
||||
modulesActions.setBlock(store, data);
|
||||
}
|
||||
|
||||
public static recipeFullData(data) {
|
||||
|
||||
@@ -36,6 +36,23 @@ export class RecipeService extends baseRestService {
|
||||
return result;
|
||||
}
|
||||
|
||||
async UpdateChanges(newmodel: { [id: string]: Recipe.IValue }, oldmodel: { [id: string]: Recipe.IValue }) {
|
||||
let toupdate: { [id: string]: Recipe.IValue } = {};
|
||||
let needsUpdate: boolean = false
|
||||
for (const key in newmodel) {
|
||||
let n = newmodel[key];
|
||||
let o = oldmodel[key];
|
||||
|
||||
if (n.setpointHMI != o.setpointPLC) {
|
||||
toupdate[key] = n;
|
||||
needsUpdate = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (needsUpdate)
|
||||
await this.Update(toupdate);
|
||||
}
|
||||
|
||||
async Confirm(section: string) {
|
||||
let result = await this.Put<any>((await this.BASE_URL()) + "confirm?section=" + section, true);
|
||||
return result;
|
||||
|
||||
@@ -7,7 +7,7 @@ export interface ModulesStoreModel {
|
||||
|
||||
|
||||
export interface ModulesActions {
|
||||
set(context, model: { [id: string]: server.Modblock });
|
||||
setBlock(context, model: { [id: string]: server.Modblock });
|
||||
}
|
||||
|
||||
export interface ModulesGetters {
|
||||
@@ -24,7 +24,7 @@ export const modulesStore = {
|
||||
|
||||
mutations: {
|
||||
|
||||
SetCurrent(state: ModulesStoreModel, model: { [id: string]: server.Modblock }) {
|
||||
SetModule(state: ModulesStoreModel, model: { [id: string]: server.Modblock }) {
|
||||
for (const key in model) {
|
||||
let result = state.blocks.find(i => i.id.toString() == key.toString())
|
||||
if (result)
|
||||
@@ -39,8 +39,8 @@ export const modulesStore = {
|
||||
|
||||
actions: {
|
||||
|
||||
async set(context, model: { [id: string]: server.Modblock }) {
|
||||
context.commit("SetCurrent", model);
|
||||
async setBlock(context, model: { [id: string]: server.Modblock }) {
|
||||
context.commit("SetModule", model);
|
||||
},
|
||||
|
||||
} as ModulesActions
|
||||
|
||||
Reference in New Issue
Block a user