From cbd3561cb59dc093d84333be29b4cba2ba5b26be Mon Sep 17 00:00:00 2001 From: = Date: Mon, 22 Feb 2021 18:20:08 +0100 Subject: [PATCH 1/9] layout --- .../riscaldi/components/base-components/thermoProphet-modal.css | 1 + .../riscaldi/components/base-components/thermoProphet-modal.less | 1 + 2 files changed, 2 insertions(+) diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/thermoProphet-modal.css b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/thermoProphet-modal.css index c22cb4dc..b4e9ae63 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/thermoProphet-modal.css +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/thermoProphet-modal.css @@ -73,6 +73,7 @@ height: 140px; transform: translateX(-100px); bottom: 70px; + box-shadow: 0 2px 8px 0 rga(0, 0, 0, 0.5); } .modal.prophetimages section .color-bar { display: grid; diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/thermoProphet-modal.less b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/thermoProphet-modal.less index 545c385b..3e88190e 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/thermoProphet-modal.less +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/thermoProphet-modal.less @@ -76,6 +76,7 @@ height: 140px; transform: translateX(-100px); bottom: 70px; + box-shadow: 0 2px 8px 0 rga(0, 0, 0, 0.5); } } From 0ba2c8305ca91b232ab0935433dce7d0f05c3a02 Mon Sep 17 00:00:00 2001 From: = Date: Tue, 23 Feb 2021 16:31:13 +0100 Subject: [PATCH 2/9] modal show & get tcamdata --- Thermo.Active/wwwroot/src/App.vue | 1 + .../base-components/thermoProphet-modal.ts | 12 ++++++++---- .../components/base-components/thermocamera.ts | 8 +++++++- .../wwwroot/src/services/warmersService.ts | 16 ++++++++++++---- 4 files changed, 28 insertions(+), 9 deletions(-) diff --git a/Thermo.Active/wwwroot/src/App.vue b/Thermo.Active/wwwroot/src/App.vue index 9730b272..32fdca0f 100644 --- a/Thermo.Active/wwwroot/src/App.vue +++ b/Thermo.Active/wwwroot/src/App.vue @@ -31,6 +31,7 @@ + diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/thermoProphet-modal.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/thermoProphet-modal.ts index 83b8bb75..4033d93b 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/thermoProphet-modal.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/thermoProphet-modal.ts @@ -1,12 +1,19 @@ import Component from "vue-class-component"; import Vue from "vue"; import { ModalHelper, Modal } from "@/components/modals"; +import { Prop } from "vue-property-decorator"; @Component({ components: { modal: Modal }, }) export default class ThermoModal extends Vue { + @Prop() + TCamData: { + imageSize: { x: number, y: number }, + rangeTemperature: { max: number, min: number }, + } + showPreview = 0; selectedImage: number = 0; serverPath = "/thermoprophet/colored"; @@ -127,12 +134,9 @@ export default class ThermoModal extends Vue { '20201116-110618.jpg']; close() { - ModalHelper.HideModal(); + ModalHelper.HideModal("modal2"); } mounted() { - for (const iterator of this.images) { - - } } } \ No newline at end of file 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 2fb88a2c..ba96d595 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 @@ -29,6 +29,11 @@ export default class Thermocamera extends Vue { thermoImageOpacity: number = 0; resistanceMode = 0; + TCamData: { + imageSize: { x: number, y: number }, + rangeTemperature: { max: number, min: number }, + } = null; + @Watch("warmers", { deep: true }) async ChangedTemps() { @@ -47,6 +52,7 @@ export default class Thermocamera extends Vue { } async mounted() { this.ChangedTemps(); + this.TCamData = await warmersService.GetTCamData(); } get selectedChannels(): Warmers.IChannel[] { @@ -169,6 +175,6 @@ export default class Thermocamera extends Vue { } async openThermoModal() { - ModalHelper.ShowModal(termoModal); + ModalHelper.ShowModal(termoModal, "modal2"); } } \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/services/warmersService.ts b/Thermo.Active/wwwroot/src/services/warmersService.ts index 9e6af3d0..e335190a 100644 --- a/Thermo.Active/wwwroot/src/services/warmersService.ts +++ b/Thermo.Active/wwwroot/src/services/warmersService.ts @@ -10,7 +10,7 @@ export class WarmersService extends baseRestService { async GetThermocameraStatus() { let result = await this.Get((await this.BASE_URL()) + "TCamData"); - warmersActions.setTcamStatus(store, result as Warmers.ICamStatus ); + warmersActions.setTcamStatus(store, result as Warmers.ICamStatus); return result; } @@ -42,12 +42,12 @@ export class WarmersService extends baseRestService { } async setTCamMode(model: boolean) { - let result = await this.Put((await this.BASE_URL()) + "setTCamMode?enableTCam="+model, {}, true); + let result = await this.Put((await this.BASE_URL()) + "setTCamMode?enableTCam=" + model, {}, true); return result; } - + async setTCamOn(model: boolean) { - let result = await this.Put((await this.BASE_URL()) + "setTCamOn?setTCamOn="+model,{}, true); + let result = await this.Put((await this.BASE_URL()) + "setTCamOn?setTCamOn=" + model, {}, true); return result; } @@ -66,5 +66,13 @@ export class WarmersService extends baseRestService { return result; } + async GetTCamData() { + let result = await this.Get<{ + imageSize: { x: number, y: number }, + rangeTemperature: { max: number, min: number }, + }>((await this.BASE_URL()) + "TCamData", true); + return result; + } + } export const warmersService = new WarmersService(); \ No newline at end of file From 9c54f3aaa9cfb79f9808eb68b39b2b7895ee44d8 Mon Sep 17 00:00:00 2001 From: = Date: Tue, 23 Feb 2021 17:37:13 +0100 Subject: [PATCH 3/9] layout termo - manca storico immagini da leggere correttamente per fare prove --- .../base-components/thermoProphet-modal.ts | 137 ++++-------------- .../base-components/thermoProphet-modal.vue | 25 ++-- .../wwwroot/src/services/warmersService.ts | 12 ++ 3 files changed, 56 insertions(+), 118 deletions(-) diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/thermoProphet-modal.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/thermoProphet-modal.ts index 4033d93b..af7d9a35 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/thermoProphet-modal.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/thermoProphet-modal.ts @@ -1,126 +1,34 @@ import Component from "vue-class-component"; import Vue from "vue"; import { ModalHelper, Modal } from "@/components/modals"; -import { Prop } from "vue-property-decorator"; +import { Prop, Watch } from "vue-property-decorator"; +import { warmersService } from "@/services/warmersService"; @Component({ components: { modal: Modal }, }) export default class ThermoModal extends Vue { - @Prop() + TCamData: { imageSize: { x: number, y: number }, rangeTemperature: { max: number, min: number }, + } = { + imageSize: { x: 1024, y: 768 }, + rangeTemperature: { max: 100, min: 0 } + } + get tstep() { + return (this.TCamData.rangeTemperature.max - this.TCamData.rangeTemperature.min) / 6; } + measurePoints: { + x: number, y: number, temp: number + }[] = []; + showPreview = 0; selectedImage: number = 0; serverPath = "/thermoprophet/colored"; images = ['20201104-163047.jpg', - '20201104-163309.jpg', - '20201104-163547.jpg', - '20201104-163826.jpg', - '20201104-164544.jpg', - '20201104-164850.jpg', - '20201104-165142.jpg', - '20201104-165418.jpg', - '20201104-165658.jpg', - '20201104-170154.jpg', - '20201104-170504.jpg', - '20201104-170741.jpg', - '20201104-171015.jpg', - '20201104-171256.jpg', - '20201110-141036.jpg', - '20201110-141318.jpg', - '20201110-141600.jpg', - '20201110-141842.jpg', - '20201110-142125.jpg', - '20201110-142333.jpg', - '20201110-142610.jpg', - '20201110-142852.jpg', - '20201110-143132.jpg', - '20201110-143434.jpg', - '20201110-155540.jpg', - '20201112-161151.jpg', - '20201112-161427.jpg', - '20201112-161701.jpg', - '20201112-161935.jpg', - '20201112-162221.jpg', - '20201112-163046.jpg', - '20201112-163107.jpg', - '20201112-163134.jpg', - '20201112-163141.jpg', - '20201112-163152.jpg', - '20201112-163235.jpg', - '20201112-163249.jpg', - '20201112-163313.jpg', - '20201112-163355.jpg', - '20201112-163435.jpg', - '20201112-163946.jpg', - '20201112-165438.jpg', - '20201112-165908.jpg', - '20201112-165931.jpg', - '20201112-165952.jpg', - '20201112-170518.jpg', - '20201112-170531.jpg', - '20201112-170604.jpg', - '20201112-170654.jpg', - '20201112-171322.jpg', - '20201112-171842.jpg', - '20201112-171946.jpg', - '20201112-172249.jpg', - '20201112-172440.jpg', - '20201112-172636.jpg', - '20201112-172834.jpg', - '20201112-173642.jpg', - '20201112-174108.jpg', - '20201112-174216.jpg', - '20201112-175159.jpg', - '20201113-141151.jpg', - '20201113-145345.jpg', - '20201113-145524.jpg', - '20201113-145707.jpg', - '20201113-145915.jpg', - '20201113-150118.jpg', - '20201113-150321.jpg', - '20201113-150527.jpg', - '20201113-150740.jpg', - '20201113-150959.jpg', - '20201113-153100.jpg', - '20201113-153143.jpg', - '20201113-153302.jpg', - '20201113-162158.jpg', - '20201113-162335.jpg', - '20201116-091043.jpg', - '20201116-091230.jpg', - '20201116-091419.jpg', - '20201116-091615.jpg', - '20201116-091828.jpg', - '20201116-092041.jpg', - '20201116-092301.jpg', - '20201116-092528.jpg', - '20201116-092802.jpg', - '20201116-093040.jpg', - '20201116-093327.jpg', - '20201116-093616.jpg', - '20201116-093914.jpg', - '20201116-100141.jpg', - '20201116-100404.jpg', - '20201116-100632.jpg', - '20201116-100858.jpg', - '20201116-101125.jpg', - '20201116-101403.jpg', - '20201116-101629.jpg', - '20201116-101858.jpg', - '20201116-102128.jpg', - '20201116-102356.jpg', - '20201116-102623.jpg', - '20201116-102847.jpg', - '20201116-103108.jpg', - '20201116-103332.jpg', - '20201116-103557.jpg', - '20201116-103819.jpg', '20201116-104042.jpg', '20201116-104305.jpg', '20201116-104529.jpg', @@ -137,6 +45,23 @@ export default class ThermoModal extends Vue { ModalHelper.HideModal("modal2"); } - mounted() { + async mounted() { + this.TCamData = await warmersService.GetTCamData(); + await warmersService.ResetMeasurePoints(); + } + + async imageclick(evt: MouseEvent) { + + let t = evt.target as HTMLImageElement; + let x = (evt.offsetX / t.clientWidth) * t.naturalWidth; + let y = (evt.offsetY / t.clientHeight) * t.naturalHeight; + + await warmersService.SetMeasurePoints(x, y); + await this.ReloadMeasures(); + } + + @Watch("selectedImage") + async ReloadMeasures() { + this.measurePoints = await warmersService.GetMeasurePoints(this.images[this.selectedImage]) } } \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/thermoProphet-modal.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/thermoProphet-modal.vue index bc26cbc5..5bae8103 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/thermoProphet-modal.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/thermoProphet-modal.vue @@ -4,31 +4,32 @@
- + {{'thermo-long-tap-info' | localize("Long tap on image to add temperature inspectors")}} + +
{{m.temp}} °C
- 300° C - 270° C - 240° C - 210° C - 180° C - 150° C - 120° C + {{Math.round(TCamData.rangeTemperature.max - tstep*(c-1))}}° C
- - +
{{'thermo-cycle' | localize("Cycle")}} {{selectedImage}}
diff --git a/Thermo.Active/wwwroot/src/services/warmersService.ts b/Thermo.Active/wwwroot/src/services/warmersService.ts index e335190a..6648a066 100644 --- a/Thermo.Active/wwwroot/src/services/warmersService.ts +++ b/Thermo.Active/wwwroot/src/services/warmersService.ts @@ -3,6 +3,7 @@ import { CONFIGURATION } from "@/config"; import { warmersActions } from "@/store/warmers.store"; import { store } from "@/store"; import Warmers from "@/app_modules_thermo/setup/riscaldi/components/base-components/warmers"; +import Numeric from "@/app_modules_thermo/components/numeric"; export class WarmersService extends baseRestService { @@ -74,5 +75,16 @@ export class WarmersService extends baseRestService { return result; } + async GetMeasurePoints(setname: string): Promise { + return await this.Get((await this.BASE_URL()) + `getMeasurePoints?setName=${setname}`, true); + } + + async SetMeasurePoints(x: number, y: number) { + return await this.Put((await this.BASE_URL()) + `addMeasurePoint?posX=${Math.round(x)}&posY=${Math.round(y)}`, null, true); + } + + async ResetMeasurePoints() { + return this.Put((await this.BASE_URL()) + `resetMeasurePoint`, null, true); + } } export const warmersService = new WarmersService(); \ No newline at end of file From 7ebf5013b3c04ec525abddde85d23dd4686033e9 Mon Sep 17 00:00:00 2001 From: Thermo_SIM Date: Thu, 25 Feb 2021 10:26:37 +0100 Subject: [PATCH 4/9] Fix Resistances Watt --- .../setup/riscaldi/components/base-components/resistance.ts | 4 ++++ .../setup/riscaldi/components/base-components/resistance.vue | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) 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 848a3dc0..58b9c5a6 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 @@ -122,4 +122,8 @@ export default class Resistance extends Vue { } + get Watt() { + return (this.channel.maxPower * this.channel.setpointHMI) / 100; + } + } \ No newline at end of file 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 b5910ca1..82494cad 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 @@ -24,7 +24,7 @@ @click="click" v-on:touchend="click" :style="{backgroundColor:`rgba(${currentColor})`}" - >{{channel.actualCurrent}} W + >{{Watt}} W
Date: Thu, 25 Feb 2021 10:51:48 +0100 Subject: [PATCH 5/9] Fix IO visible --- .../sotto-cofano/InputOutput/components/io/io.ts | 13 +++++++++++++ .../sotto-cofano/InputOutput/components/io/io.vue | 2 ++ .../components/tables/inputTab/input-row-item.vue | 2 +- .../components/tables/inputTab/input.ts | 14 ++++++++++++++ .../components/tables/inputTab/input.vue | 2 +- .../tables/outputTab/output-row-item.vue | 2 +- .../components/tables/outputTab/output.ts | 13 +++++++++++++ .../components/tables/outputTab/output.vue | 4 ++-- 8 files changed, 47 insertions(+), 5 deletions(-) diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/sotto-cofano/InputOutput/components/io/io.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/sotto-cofano/InputOutput/components/io/io.ts index 338de28f..4ff40f0c 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/sotto-cofano/InputOutput/components/io/io.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/sotto-cofano/InputOutput/components/io/io.ts @@ -41,4 +41,17 @@ export default class IO extends Vue { } + isConfigVisible(group,bankid){ + var vis = false; + var it = this.items[group].filter(i => i.bank == bankid); + + for (let index = 0; index < it.length; index++) { + if(it[index].visible){ + vis = true; + break; + } + } + return vis + } + } diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/sotto-cofano/InputOutput/components/io/io.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/sotto-cofano/InputOutput/components/io/io.vue index b918884a..c01f8768 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/sotto-cofano/InputOutput/components/io/io.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/sotto-cofano/InputOutput/components/io/io.vue @@ -9,6 +9,7 @@ @click="scrollto(true,`input-${group}-${inputid}`)" class="upper" v-for="(inputid, idx2) in config[group]" + v-if="isConfigVisible(group,inputid)" :key="`h-${idx}-${idx2}`" >{{`${group} ${inputid}`}} @@ -24,6 +25,7 @@ @click="scrollto(false,`output-${group}-${inputid}`)" class="upper" v-for="(inputid, idx2) in config[group]" + v-if="isConfigVisible(group,inputid)" :key="`h-${idx}-${idx2}`" >{{`${group} ${inputid}`}} diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/sotto-cofano/InputOutput/components/tables/inputTab/input-row-item.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/sotto-cofano/InputOutput/components/tables/inputTab/input-row-item.vue index 15155b20..b9cd4a70 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/sotto-cofano/InputOutput/components/tables/inputTab/input-row-item.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/sotto-cofano/InputOutput/components/tables/inputTab/input-row-item.vue @@ -1,5 +1,5 @@