diff --git a/Thermo.Active/wwwroot/assets/styles/base/riscaldi.less b/Thermo.Active/wwwroot/assets/styles/base/riscaldi.less
index 6b904d41..5c36215d 100644
--- a/Thermo.Active/wwwroot/assets/styles/base/riscaldi.less
+++ b/Thermo.Active/wwwroot/assets/styles/base/riscaldi.less
@@ -31,6 +31,9 @@
font-size: 32px;
font-weight: bold;
color: #fff;
+ &.disabled{
+ cursor:not-allowed;
+ }
&.temp{
grid-template-columns: 50% 50%;
diff --git a/Thermo.Active/wwwroot/assets/styles/style.css b/Thermo.Active/wwwroot/assets/styles/style.css
index 0700134f..7bcbdf48 100644
--- a/Thermo.Active/wwwroot/assets/styles/style.css
+++ b/Thermo.Active/wwwroot/assets/styles/style.css
@@ -4736,6 +4736,9 @@ article .box .body {
font-weight: bold;
color: #fff;
}
+.warmers svg .resistance.disabled {
+ cursor: not-allowed;
+}
.warmers svg .resistance.temp {
grid-template-columns: 50% 50%;
grid-template-rows: 50% 50%;
diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/resistance.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/resistance.ts
index efa2cea8..38cc91bd 100644
--- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/resistance.ts
+++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/resistance.ts
@@ -11,6 +11,9 @@ export default class Resistance extends Vue {
@Prop()
channel: Warmers.IChannel;
+
+ @Prop({ default: true })
+ editable: boolean;
@Prop({ default: false })
selected: boolean;
@@ -36,25 +39,33 @@ export default class Resistance extends Vue {
@Prop({ default: function () { return [23, 86, 173] } })
selectedColorTo: number[];
+ click(){
+ if(this.editable)
+ this.$emit('click');
+ }
+
get currentStandardTempColor() {
//Not linear, but quadratic
- if(!this.channel.tCamActive || this.channel.tCamTempSet==0)
+ if(!this.channel.tCamActive || this.channel.setpointHMI==0)
return "179, 179, 179";
var delta = this.channel.tCamTempSet - this.channel.tCamTempAct;
- if(delta=> - 5 && delta<=5)
+ console.log(delta);
+ if(delta >= - 5 && delta <= 5)
{
+ console.log("delta");
return "144,191,61";
}
else if(delta>5){
- return [this.colorFrom[0] - (this.colorFrom[0] - this.colorTo[0]) * delta / 100,
- this.colorFrom[1] - (this.colorFrom[1] - this.colorTo[1]) * delta / 100,
- this.colorFrom[2] - (this.colorFrom[2] - this.colorTo[2]) * delta / 100];
+ return [this.colorFrom[0] - (this.colorFrom[0] - this.colorTo[0]) * delta / 300,
+ this.colorFrom[1] - (this.colorFrom[1] - this.colorTo[1]) * delta / 300,
+ this.colorFrom[2] - (this.colorFrom[2] - this.colorTo[2]) * delta / 300];
}
else {
- return [this.ColorColdFrom[0] - (this.ColorColdFrom[0] - this.colorColdTo[0]) * delta / 100,
- this.ColorColdFrom[1] - (this.ColorColdFrom[1] - this.colorColdTo[1]) * delta / 100,
- this.ColorColdFrom[2] - (this.ColorColdFrom[2] - this.colorColdTo[2]) * delta / 100];
+ delta = delta* (-1);
+ return [this.ColorColdFrom[0] - (this.ColorColdFrom[0] - this.colorColdTo[0]) * delta / 300,
+ this.ColorColdFrom[1] - (this.ColorColdFrom[1] - this.colorColdTo[1]) * delta / 300,
+ this.ColorColdFrom[2] - (this.ColorColdFrom[2] - this.colorColdTo[2]) * delta / 300];
}
diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/resistance.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/resistance.vue
index ad7a62ac..cd8e0a23 100644
--- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/resistance.vue
+++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/resistance.vue
@@ -3,19 +3,20 @@
class="resistance"
:key="selected"
v-if="!temperature"
- @click="$emit('click')"
- v-on:touchend="$emit('click')"
+ @click="click"
+ v-on:touchend="click"
:style="{backgroundColor:`rgb(${currentColor})`}"
>{{channel.setpointHMI}} %
- --
+ --
{{channel.tCamTempSet}} °C
{{channel.tCamTempAct}} °C
{{channel.setpointHMI}} %
diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/thermocamera.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/thermocamera.ts
index f86c6393..bbd27281 100644
--- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/thermocamera.ts
+++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/thermocamera.ts
@@ -34,7 +34,7 @@ export default class Thermocamera extends Vue {
setpointHMI: this.thermocameraOnOff,
range: { min: 0, max: 999999 },
status: {
- enabled: true,
+ enabled: this.isOnOffRunEnabled,
hasError: false,
visible: true
}
@@ -67,6 +67,19 @@ export default class Thermocamera extends Vue {
return store.state.warmers.channels.filter(i => this.selectedChannelIds.indexOf(i.idChannel) >= 0);
}
+
+ get isEnableDisableEnabled(): Boolean{
+ return !store.state.warmers.tCamStatus.thermoCamOnOff;
+ }
+
+ get isOnOffRunEnabled(): Boolean{
+ for(const ch of store.state.warmers.channels){
+ if(ch.tCamTempSet > 0)
+ return true;
+ }
+ return false;
+ }
+
get thermocameraMode(): number {
if(store.state.warmers.tCamStatus.thermoCamMode)
return 1
@@ -130,7 +143,7 @@ export default class Thermocamera extends Vue {
}
clearAllTemperature(){
- for (const c of this.selectedChannels) c.tCamTempSet = 0;
+ (this.$refs.warmers as any).clearTemp();
this.$emit("tempsChanged");
}
diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/thermocamera.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/thermocamera.vue
index 15391911..39227c86 100644
--- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/thermocamera.vue
+++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/thermocamera.vue
@@ -12,17 +12,14 @@
:status="modeEnabled.status"
>
-
-
-
-
-
-
-
-
+
+
+
+
+
@@ -49,13 +46,7 @@
-
-
-
-
+
@@ -63,10 +54,12 @@
@@ -87,12 +80,24 @@
-
+
+
+
+
+
+
+
+
diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/warmers.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/warmers.ts
index ec5ac924..67396a99 100644
--- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/warmers.ts
+++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/warmers.ts
@@ -48,6 +48,7 @@ export default class Warmers extends Vue {
selectedChannels: number[] = []
+
selectionMethod: SelectionMethod = SelectionMethod.none;
get parameters() {
@@ -100,7 +101,11 @@ export default class Warmers extends Vue {
}
selectAll() {
- this.selectedChannels.splice(0, this.selectedChannels.length, ...this.channels.map(c => c.idChannel));
+ this.selectedChannels = [];
+ for (var ch of this.channels) {
+ if(!this.isdisabled(ch.idChannel))
+ this.selectedChannels.push(ch.idChannel);
+ }
this.$emit('select', this.selectedChannels)
}
@@ -150,6 +155,7 @@ export default class Warmers extends Vue {
}
async mounted() {
+
let $this = this;
if (this.usePanZoom)
setTimeout(() => {
@@ -157,6 +163,7 @@ export default class Warmers extends Vue {
zoomEnabled: true,
controlIconsEnabled: false,
center: true,
+ dblClickZoomEnabled: false
});
}, 500);
}
@@ -199,7 +206,8 @@ export default class Warmers extends Vue {
this.resistancePosition(row, cell, point1, point2, point3, point4);
if (lazo.isPointInFill(point1) || lazo.isPointInFill(point2) || lazo.isPointInFill(point3) || lazo.isPointInFill(point4)) {
- captured.add(cell.idChannel);
+ if(!this.isdisabled(cell.idChannel))
+ captured.add(cell.idChannel);
}
}
}
@@ -224,6 +232,19 @@ export default class Warmers extends Vue {
}
+ isdisabled(id){
+ if(!this.temperature)
+ return false;
+ let channel = this.channels.find(c => c.idChannel == id);
+ return channel.setpointHMI==0;
+ }
+
+ clearTemp() {
+ for (const chan of this.channels) {
+ chan.tCamTempSet = 0;
+ }
+ }
+
automateTemp() {
var min = parseFloat(this.parameters.warmerAutocompStartValue.toString());
@@ -236,9 +257,6 @@ export default class Warmers extends Vue {
let result = new Map();
- for (const c of this.channels) c.setpointHMI = 0;
-
-
for (const row of this.rows) {
for (const cell of this.resistancesPerRow(row)) {
this.resistancePosition(row, cell, point1, point2, point3, point4);
@@ -251,12 +269,6 @@ export default class Warmers extends Vue {
}
}
- let mink = Math.min(...Array.from(result.keys()));
- let maxk = Math.max(...Array.from(result.keys()));
-
- let dk = maxk - mink;
- let dv = max - min;
-
for (const i of Array.from(result.keys())) {
for (const res of result.get(i)) {
let channel = this.channels.find(c => c.idChannel == res.idChannel);
@@ -265,9 +277,6 @@ export default class Warmers extends Vue {
}
}
- // console.log('automate', result);
-
-
}
automate() {
diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/warmers.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/warmers.vue
index f82ff8bc..e37318ae 100644
--- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/warmers.vue
+++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/warmers.vue
@@ -27,6 +27,7 @@
@click="select(cell)"
:selected="isSelected(cell.idChannel)"
:temperature="temperature"
+ :editable="!isdisabled(cell.idChannel)"
/>
diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/show-riscaldi-info.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/show-riscaldi-info.ts
index 86ce6457..1234f525 100644
--- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/show-riscaldi-info.ts
+++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/show-riscaldi-info.ts
@@ -167,15 +167,21 @@ export default class ShowRiscaldamentoSuperioreInfo extends Vue {
// recipeActions.setCurrent(store, this.recipe);
this.isLoading = true;
- if(this.warmersEdited)
+ if(this.warmersEdited){
+ for (const ch of store.state.warmers.channels) {
+ if(ch.setpointHMI==0)
+ ch.tCamActive = false;
+ }
await warmersService.Update(store.state.warmers.channels.reduce((p, c) => { p[c.idChannel] = c.setpointHMI; return p; }, {}));
+ }
if(this.tempsEdited)
await warmersService.UpdateTemp(store.state.warmers.channels.reduce((p, c) => { p[c.idChannel] = c.tCamTempSet; return p; }, {}));
- if(this.tempEnabledEdited){
+ if(this.warmersEdited || this.tempEnabledEdited){
await warmersService.UpdateEnable(store.state.warmers.channels.reduce((p, c) => { p[c.idChannel] = c.tCamActive; return p; }, {}));
await warmersService.setTCamMode(store.state.warmers.tCamStatus.thermoCamMode);
await warmersService.setTCamOn(store.state.warmers.tCamStatus.thermoCamOnOff);
}
+
if(this.warmersEdited || this.tempsEdited || this.tempEnabledEdited)
await warmersService.Confirm();