Fix pirometro in Dashboard
This commit is contained in:
@@ -10,18 +10,6 @@
|
||||
<line :x1="0" :x2="width" :y1="height*2/3" :y2="height*2/3" stroke="#353535" stroke-width="1" />
|
||||
<line :x1="0" :x2="width" :y1="height" :y2="height" stroke="#353535" stroke-width="1" />
|
||||
</g>
|
||||
<!--<g chart="chart-axis">
|
||||
<line
|
||||
v-for="(i,idx) in Values"
|
||||
:key="idx"
|
||||
:x1="idx * (width / 19)"
|
||||
:x2="idx * (width / 19)"
|
||||
:y1="0"
|
||||
:y2="height"
|
||||
stroke="#35353550"
|
||||
stroke-width="1"
|
||||
/>
|
||||
</g>-->
|
||||
<g>
|
||||
<polygon :points="calcPointFill" style="fill:#1791ff;stroke-width:0" fill-opacity="0.3" />
|
||||
<path fill="none" :d="pathData" v-if="pathData" stroke="#1791ff" stroke-width="4" />
|
||||
|
||||
@@ -205,12 +205,32 @@ export default class Dashboard extends Vue {
|
||||
|
||||
incrementPyr() {
|
||||
this.recipe.pyrometer_pyrometer_setpoint.setpointHMI++;
|
||||
this.recipe.pyrometer_upperthermoregulator_start_adjustment.setpointHMI++;
|
||||
this.recipe.pyrometer_upperthermoregulator_end_adjustment.setpointHMI++;
|
||||
this.recipe.pyrometer_lowerthermoregulator_start_adjustment.setpointHMI++;
|
||||
this.recipe.pyrometer_lowerthermoregulator_end_adjustment.setpointHMI++;
|
||||
this.debouncedRecipeSave();
|
||||
}
|
||||
decrementPyr() {
|
||||
this.recipe.pyrometer_pyrometer_setpoint.setpointHMI--;
|
||||
this.recipe.pyrometer_upperthermoregulator_start_adjustment.setpointHMI--;
|
||||
this.recipe.pyrometer_upperthermoregulator_end_adjustment.setpointHMI--;
|
||||
this.recipe.pyrometer_lowerthermoregulator_start_adjustment.setpointHMI--;
|
||||
this.recipe.pyrometer_lowerthermoregulator_end_adjustment.setpointHMI--;
|
||||
this.debouncedRecipeSave();
|
||||
}
|
||||
|
||||
togglePyr() {
|
||||
if(this.recipe.pyrometer_pyrometer_enabled.setpointHMI == 1)
|
||||
this.recipe.pyrometer_pyrometer_enabled.setpointHMI = 0;
|
||||
else
|
||||
this.recipe.pyrometer_pyrometer_enabled.setpointHMI = 1;
|
||||
|
||||
this.debouncedRecipeSave();
|
||||
}
|
||||
get pyrOn(){
|
||||
return this.recipe.pyrometer_pyrometer_enabled.setpointHMI == 1;
|
||||
}
|
||||
debouncedRecipeSave = debounce(this.savePyr, 1000);
|
||||
|
||||
public async savePyr(){
|
||||
@@ -229,7 +249,11 @@ export default class Dashboard extends Vue {
|
||||
get payload() {
|
||||
return {
|
||||
pyrometer_pyrometer_enabled: this.recipe.pyrometer_pyrometer_enabled,
|
||||
pyrometer_pyrometer_setpoint: this.recipe.pyrometer_pyrometer_setpoint
|
||||
pyrometer_pyrometer_setpoint: this.recipe.pyrometer_pyrometer_setpoint,
|
||||
pyrometer_upperthermoregulator_start_adjustment: this.recipe.pyrometer_upperthermoregulator_start_adjustment,
|
||||
pyrometer_upperthermoregulator_end_adjustment: this.recipe.pyrometer_upperthermoregulator_end_adjustment,
|
||||
pyrometer_lowerthermoregulator_start_adjustment: this.recipe.pyrometer_lowerthermoregulator_start_adjustment,
|
||||
pyrometer_lowerthermoregulator_end_adjustment: this.recipe.pyrometer_lowerthermoregulator_end_adjustment,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -118,9 +118,11 @@
|
||||
<button @click="decrementPyr()" :disabled="!recipe.pyrometer_pyrometer_setpoint.status.enabled" >
|
||||
<i class="fa fa-minus"></i>
|
||||
</button>
|
||||
<div :class="{'notenabled': recipe.pyrometer_pyrometer_enabled.setpointHMI == 0}">
|
||||
<div :class="{'notenabled': recipe.pyrometer_pyrometer_enabled.setpointHMI == 0}" @click="togglePyr">
|
||||
<small>{{'dashboard-setpoint' | localize('set point')}}</small>
|
||||
<span :class="{'strike': recipe.pyrometer_pyrometer_enabled.setpointHMI == 0}">{{recipe.pyrometer_pyrometer_setpoint.setpointHMI}}{{recipe.pyrometer_pyrometer_setpoint.unitMeasure}}</span>
|
||||
<div v-if="pyrOn">ON</div>
|
||||
<div v-else>OFF</div>
|
||||
</div>
|
||||
<button @click="incrementPyr()" :disabled="!recipe.pyrometer_pyrometer_setpoint.status.enabled" >
|
||||
<i class="fa fa-plus"></i>
|
||||
|
||||
Reference in New Issue
Block a user