riscaldi inferiore

This commit is contained in:
=
2020-06-19 18:07:34 +02:00
parent fdeb79c7e2
commit b5d1bc37cf
2 changed files with 57 additions and 28 deletions
@@ -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;
}
}
@@ -4,17 +4,17 @@
<div class="box transparent">
<div class="body">
<template v-if="recipe.heats_upperheaters_enabled.status.visible">
<div class="input-area">
<label>{{'heats_upperheaters_enabled'|localize('Abilitazione riscaldo')}}</label>
<toggle-button v-model="recipe.heats_upperheaters_enabled.status.enabled"></toggle-button>
</div>
<div class="input-area">
<label>{{'heats_upperheaters_enabled'|localize('Abilitazione riscaldo')}}</label>
<toggle-button v-model="recipe.heats_upperheaters_enabled.status.enabled"></toggle-button>
</div>
</template>
<template v-if="recipe.heats_upperheaters_max_time.status.visible">
<div class="input-area">
<label>{{'heats_upperheaters_max_time'|localize('Durata massima')}}</label>
<numeric v-model="recipe.heats_upperheaters_max_time" />
</div>
<slider v-model="recipe.heats_upperheaters_max_time"></slider>
<div class="input-area">
<label>{{'heats_upperheaters_max_time'|localize('Durata massima')}}</label>
<numeric v-model="recipe.heats_upperheaters_max_time" />
</div>
<slider v-model="recipe.heats_upperheaters_max_time"></slider>
</template>
<div class="divider"></div>
@@ -22,18 +22,18 @@
<label>Selezione</label>
</div>
<div class="input-area left grid grid-5">
<button class="btn btn-info square">
<button class="btn btn-info square" @click="$refs.warmers.toggleSelection('rect')">
<img src="assets/icons/png/rett.png" />
</button>
<button class="btn btn-info square">
<button class="btn btn-info square" @click="$refs.warmers.toggleSelection('poly')">
<img src="assets/icons/png/libera.png" />
</button>
<label></label>
<button class="btn btn-info">
<label>Tutti</label>
<button class="btn btn-info" @click="$refs.warmers.selectAll()">
<label>{{'warmers-select-all' | localize('Tutti')}}</label>
</button>
<button class="btn btn-info">
<label>Nessuno</label>
<button class="btn btn-info" @click="$refs.warmers.selectNone()">
<label>{{'warmers-select-none' | localize('Nessuno')}}</label>
</button>
</div>
<div class="divider"></div>
@@ -41,13 +41,13 @@
<label>Gestione potenza</label>
</div>
<div class="input-area left grid grid-5">
<button class="btn btn-info square">
<button class="btn btn-info square" @click="remove5()">
<img src="assets/icons/png/meno5.png" />
</button>
<button class="btn btn-info square">
<button class="btn btn-info square" @click="add5()">
<img src="assets/icons/png/piu5.png" />
</button>
<select class="form-control">
<select class="form-control" v-model="uniformChannelValue">
<option value="0">0%</option>
<option value="25">25%</option>
<option value="50">50%</option>
@@ -61,16 +61,16 @@
<div class="divider"></div>
<div class="input-area grid left">
<template v-if="recipe.heats_upperheaters_oscillation.status.visible">
<div>
<label>{{'heats_upperheaters_oscillation'|localize('Oscillazione')}}</label>
<toggle-button v-model="recipe.heats_upperheaters_oscillation.status.enabled"></toggle-button>
</div>
<div>
<label>{{'heats_upperheaters_oscillation'|localize('Oscillazione')}}</label>
<toggle-button v-model="recipe.heats_upperheaters_oscillation.status.enabled"></toggle-button>
</div>
</template>
<template v-if="recipe.heats_upperheaters_movement_enabled.status.visible">
<div>
<label>{{'heats_upperheaters_movement_enabled'|localize('Movimento')}}</label>
<toggle-button v-model="recipe.heats_upperheaters_movement_enabled.status.enabled"></toggle-button>
</div>
<div>
<label>{{'heats_upperheaters_movement_enabled'|localize('Movimento')}}</label>
<toggle-button v-model="recipe.heats_upperheaters_movement_enabled.status.enabled"></toggle-button>
</div>
</template>
</div>
</div>
@@ -79,7 +79,7 @@
<hr />
<article class="warmers">
<warmers :id-reflector="1"></warmers>
<warmers ref="warmers" :id-reflector="1" @select="selectionChanged"></warmers>
<div class="absolute bottom right">
<button class="btn btn-info square" @click="zoomIn()">
<img src="assets/icons/png/zoomIn.png" />