diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/riscaldi-inferiori.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/riscaldi-inferiori.ts index 0c65d26f..36d89e0c 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/riscaldi-inferiori.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/riscaldi-inferiori.ts @@ -2,6 +2,7 @@ import Vue from 'vue'; import Component from 'vue-class-component'; import { Prop } from 'vue-property-decorator'; import warmers from "./warmers.vue"; +import { store } from '@/store'; @Component({ name: "riscaldiinf", components: { @@ -13,11 +14,39 @@ export default class RiscaldiInferiori extends Vue { @Prop() recipe: Recipe.IRecipe; - zoomIn() { + selectedChannelIds: number[] = []; + _uniformChannelValue = 0; + + get uniformChannelValue() { return this._uniformChannelValue; } + set uniformChannelValue(v) { + this._uniformChannelValue = v; + for (const c of this.selectedChannels) c.setpointHMI = v; + } + + get selectedChannels(): Warmers.IChannel[] { + return store.state.warmers.channels.filter(i => this.selectedChannelIds.indexOf(i.idChannel) >= 0); + } + + zoomIn() { + (this.$refs.warmers as any).zoomIn(); } zoomOut() { + (this.$refs.warmers as any).zoomOut(); + } + add5() { + for (const c of this.selectedChannels) c.setpointHMI += 5; + } + + remove5() { + for (const c of this.selectedChannels) c.setpointHMI -= 5; + } + + selectionChanged(selected: number[]) { + this.selectedChannelIds = [] + this.uniformChannelValue = 0; + this.selectedChannelIds = selected; } } \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/riscaldi-inferiori.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/riscaldi-inferiori.vue index d3f88a5c..da4af5f7 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/riscaldi-inferiori.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/riscaldi-inferiori.vue @@ -4,17 +4,17 @@
@@ -22,18 +22,18 @@
- - - -
@@ -41,13 +41,13 @@
- - - @@ -61,16 +61,16 @@
@@ -79,7 +79,7 @@
- +