diff --git a/Thermo.Active/wwwroot/config.development.json b/Thermo.Active/wwwroot/config.development.json index 8c7723c2..58ce0f2f 100644 --- a/Thermo.Active/wwwroot/config.development.json +++ b/Thermo.Active/wwwroot/config.development.json @@ -2,7 +2,7 @@ "env": "development", "api": { "enabled": true, - "apiServerUrl": "http://localhost:9000/" + "apiServerUrl": "http://seriate.steamware.net:9000/" }, "allUIVisible": true } \ No newline at end of file diff --git a/Thermo.Active/wwwroot/index.html b/Thermo.Active/wwwroot/index.html index e00637af..ac35876a 100644 --- a/Thermo.Active/wwwroot/index.html +++ b/Thermo.Active/wwwroot/index.html @@ -13,7 +13,7 @@ - + diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/components/slider.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/components/slider.ts index 9f60bb8e..291e9314 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/components/slider.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/components/slider.ts @@ -1,8 +1,9 @@ import Vue from "vue"; import Component from "vue-class-component"; import { Prop } from 'vue-property-decorator'; -import { debounce } from "@/_base/debounce"; + import { Hub } from "@/services"; +import Numeric from "./numeric"; @Component({ name: "slider" }) export default class Slider extends Vue { @@ -17,6 +18,8 @@ export default class Slider extends Vue { @Prop({ default: 1 }) decimal: number; + incrementing: number = 0; + tempValue: number = null; get actualvalue() { return this.value.setpointHMI; @@ -27,11 +30,9 @@ export default class Slider extends Vue { } set actualvalue(v: number) { - this.debouncedActualValue(v) + this.value.setpointHMI = v; } - debouncedActualValue = debounce((v: number) => this.value.setpointHMI = v, 200); - get step() { // var s = ((this.value.range.max - this.value.range.min) / (this.lines + 1)); // var m = Math.pow(10, this.decimal); @@ -39,31 +40,43 @@ export default class Slider extends Vue { return 1; }; - increment() { + startIncrement() { if (!this.value.status.enabled) return; + this.incrementing = setInterval(() => { + var v = this.value.setpointHMI; + if (v < this.value.range.max) { + v += this.step; + } + if (v > this.value.range.max) { + v = this.value.range.max; + } + this.actualvalue = v; + }, 50); + } + + startDecrement() { + if (!this.value.status.enabled) return; + this.incrementing = setInterval(() => { + var v = this.value.setpointHMI; + if (v > this.value.range.min) { + v -= this.step; + } + if (v < this.value.range.min) { + v = this.value.range.min; + } + this.actualvalue = v; + }, 50); + } + + confirm() { + if (!this.value.status.enabled) return; + if (this.incrementing) + clearInterval(this.incrementing); + + this.incrementing = 0; - var v = this.value.setpointHMI; - if (v < this.value.range.max) { - v += this.step; - } - if (v > this.value.range.max) { - v = this.value.range.max; - } - this.actualvalue = v; }; - decrement() { - if (!this.value.status.enabled) return; - - var v = this.value.setpointHMI; - if (v > this.value.range.min) { - v -= this.step; - } - if (v < this.value.range.min) { - v = this.value.range.min; - } - this.actualvalue = v; - }; doSoftKeyClick() { Hub.Current.sendUserSoftKey(this.softKey.id); diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/components/slider.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/components/slider.vue index 49e20882..b8809087 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/components/slider.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/components/slider.vue @@ -1,7 +1,7 @@ - + @@ -21,7 +21,7 @@ {{`${this.value.range.max} ${this.value.unitMeasure}`}} - + diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/ciclo/components/show-ciclo-info.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/ciclo/components/show-ciclo-info.ts index 8f170232..07d26c06 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/ciclo/components/show-ciclo-info.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/ciclo/components/show-ciclo-info.ts @@ -10,6 +10,7 @@ import { recipeActions } from "@/store/recipe.store"; import { store } from "@/store"; import { Deferred } from '@/services'; import { recipeService } from "@/services/recipeService"; +import { debounce } from '@/_base/debounce'; @Component({ components: { modal: Modal, stepfooter: StepFooter, caricatore: Caricatore, cicloformatura: CicloFormatura } }) export default class ShowCicloInfo extends Vue { @@ -57,9 +58,11 @@ export default class ShowCicloInfo extends Vue { @Watch('recipe', { deep: true }) async recipeChanged(n, o) { - await recipeService.Update(this.payload); + this.debouncedRecipeSave() }; + debouncedRecipeSave = debounce(async () => await recipeService.Update(this.payload), 200); + hasErrors() { let payload = this.recipe; let errors = false; diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/controstampo_setup/components/show-controstampo-info.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/controstampo_setup/components/show-controstampo-info.ts index 826ab3e4..0a980eac 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/controstampo_setup/components/show-controstampo-info.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/controstampo_setup/components/show-controstampo-info.ts @@ -12,6 +12,7 @@ import { recipeActions } from "@/store/recipe.store"; import { store } from "@/store"; import { Deferred } from '@/services'; import { recipeService } from "@/services/recipeService"; +import { debounce } from '@/_base/debounce'; @Component({ components: { @@ -39,8 +40,10 @@ export default class ShowControstampoInfo extends Vue { @Watch('recipe', { deep: true }) async recipeChanged(n, o) { - await recipeService.Update(this.payload); - } + this.debouncedRecipeSave() + }; + + debouncedRecipeSave = debounce(async () => await recipeService.Update(this.payload), 200); get payload() { return { diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/estrazione/components/show-estrazione-info.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/estrazione/components/show-estrazione-info.ts index 441140e0..91170bbc 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/estrazione/components/show-estrazione-info.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/estrazione/components/show-estrazione-info.ts @@ -10,6 +10,7 @@ import { recipeActions } from "@/store/recipe.store"; import { store } from "@/store"; import { Deferred } from '@/services'; import { recipeService } from "@/services/recipeService"; +import { debounce } from '@/_base/debounce'; @Component({ components: @@ -36,9 +37,10 @@ export default class ShowEstrazioneInfo extends Vue { @Watch('recipe', { deep: true }) async recipeChanged(n, o) { + this.debouncedRecipeSave() + }; - await recipeService.Update(this.payload); - } + debouncedRecipeSave = debounce(async () => await recipeService.Update(this.payload), 200); get payload() { return { diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/show-formato-info.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/show-formato-info.ts index 44796bfe..6886c76d 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/show-formato-info.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/formato/components/show-formato-info.ts @@ -19,6 +19,7 @@ import { recipeActions } from "@/store/recipe.store"; import { store } from "@/store"; import { Deferred } from "@/services"; import { recipeService } from "@/services/recipeService"; +import { debounce } from "@/_base/debounce"; @Component({ components: { @@ -57,8 +58,10 @@ export default class ShowFormatoInfo extends Vue { @Watch('recipe', { deep: true }) async recipeChanged(n, o) { - await recipeService.Update(this.payload); - } + this.debouncedRecipeSave() + }; + + debouncedRecipeSave = debounce(async () => await recipeService.Update(this.payload), 200); get payload() { return { diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/imbutitura/show-imbutitura-info.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/imbutitura/show-imbutitura-info.ts index 5ff8c5d3..a279f818 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/imbutitura/show-imbutitura-info.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/imbutitura/show-imbutitura-info.ts @@ -11,6 +11,7 @@ import { store } from "@/store"; import { Deferred } from "@/services"; import { recipeService } from "@/services/recipeService"; import svgChart from "@/app_modules_thermo/components/svgChart.vue"; +import { debounce } from "@/_base/debounce"; @Component({ components: { @@ -47,8 +48,10 @@ export default class ShowImbutituraInfo extends Vue { @Watch('recipe', { deep: true }) async recipeChanged(n, o) { - await recipeService.Update(this.payload); - } + this.debouncedRecipeSave() + }; + + debouncedRecipeSave = debounce(async () => await recipeService.Update(this.payload), 200); get payload() { return { diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/opzioni/show-opzioni-info.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/opzioni/show-opzioni-info.ts index ba1ea5a5..033f25b5 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/opzioni/show-opzioni-info.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/opzioni/show-opzioni-info.ts @@ -11,6 +11,7 @@ import { store } from "@/store"; import { Prop, Watch } from "vue-property-decorator"; import { Deferred } from "@/services"; import { recipeService } from "@/services/recipeService"; +import { debounce } from "@/_base/debounce"; @Component({ components: { @@ -38,8 +39,10 @@ export default class ShowOpzioniInfo extends Vue { @Watch('recipe', { deep: true }) async recipeChanged(n, o) { - await recipeService.Update(this.payload); - } + this.debouncedRecipeSave() + }; + + debouncedRecipeSave = debounce(async () => await recipeService.Update(this.payload), 200); get payload() { return { diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/show-pirometro-info.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/show-pirometro-info.ts index 1399b8c5..d145bd56 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/show-pirometro-info.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/pirometro/components/show-pirometro-info.ts @@ -11,6 +11,7 @@ import { recipeActions } from "@/store/recipe.store"; import { store } from "@/store"; import { Deferred } from "@/services"; import { recipeService } from "@/services/recipeService"; +import { debounce } from "@/_base/debounce"; @Component({ components: { modal: Modal, pirometro: Pirometro, stepfooter: StepFooter, termosuperiore: TermoregolazioneSuperiore, termoinferiore: TermoregolazioneInferiore } }) export default class ShowPirometroInfo extends Vue { @@ -29,8 +30,10 @@ export default class ShowPirometroInfo extends Vue { @Watch('recipe', { deep: true }) async recipeChanged(n, o) { - await recipeService.Update(this.payload); - } + this.debouncedRecipeSave() + }; + + debouncedRecipeSave = debounce(async () => await recipeService.Update(this.payload), 200); get payload() { return { diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/show-quote-velocita-info.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/show-quote-velocita-info.ts index 5a32df06..91923b3e 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/show-quote-velocita-info.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/quote-velocita/components/show-quote-velocita-info.ts @@ -11,6 +11,7 @@ import { store } from "@/store"; import { Prop, Watch } from "vue-property-decorator"; import { Deferred } from "@/services"; import { recipeService } from "@/services/recipeService"; +import { debounce } from "@/_base/debounce"; @Component({ components: { @@ -37,8 +38,10 @@ export default class ShowQuoteVelocitaInfo extends Vue { @Watch('recipe', { deep: true }) async recipeChanged(n, o) { - await recipeService.Update(this.payload); - } + this.debouncedRecipeSave() + }; + + debouncedRecipeSave = debounce(async () => await recipeService.Update(this.payload), 200); get payload() { return { diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/raffreddamento/components/show-raffreddamento-info.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/raffreddamento/components/show-raffreddamento-info.ts index f4d6ae2c..8341f8d0 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/raffreddamento/components/show-raffreddamento-info.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/raffreddamento/components/show-raffreddamento-info.ts @@ -13,6 +13,7 @@ import { recipeActions } from "@/store/recipe.store"; import { store } from "@/store"; import { Deferred } from '@/services'; import { recipeService } from "@/services/recipeService"; +import { debounce } from '@/_base/debounce'; @Component({ components: { @@ -41,8 +42,10 @@ export default class Raffreddamento extends Vue { @Watch('recipe', { deep: true }) async recipeChanged(n, o) { - await recipeService.Update(this.payload); - } + this.debouncedRecipeSave() + }; + + debouncedRecipeSave = debounce(async () => await recipeService.Update(this.payload), 200); get payload() { 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 180c1bdc..50a3cfe2 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 @@ -12,6 +12,7 @@ import { store } from "@/store"; import { Deferred } from "@/services"; import { recipeService } from "@/services/recipeService"; import { warmersService } from "@/services/warmersService"; +import { debounce } from "@/_base/debounce"; @Component({ components: { modal: Modal, stepfooter: StepFooter, riscaldiinf: RiscaldiInf, riscaldisup: RiscaldiSup, sostdecomp: SostDecomp } }) export default class ShowRiscaldamentoSuperioreInfo extends Vue { @@ -30,8 +31,10 @@ export default class ShowRiscaldamentoSuperioreInfo extends Vue { @Watch('recipe', { deep: true }) async recipeChanged(n, o) { - await recipeService.Update(this.payload); - } + this.debouncedRecipeSave() + }; + + debouncedRecipeSave = debounce(async () => await recipeService.Update(this.payload), 200); get payload() { return { diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/show-vuoto-info.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/show-vuoto-info.ts index bc4ecac1..e14d8c79 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/show-vuoto-info.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/show-vuoto-info.ts @@ -12,6 +12,7 @@ import { recipeActions } from "@/store/recipe.store"; import { store } from "@/store"; import { Deferred } from "@/services"; import { recipeService } from "@/services/recipeService"; +import { debounce } from "@/_base/debounce"; @Component({ components: @@ -41,8 +42,10 @@ export default class ShowVuotoInfo extends Vue { @Watch('recipe', { deep: true }) async recipeChanged(n, o) { - await recipeService.Update(this.payload); - } + this.debouncedRecipeSave() + }; + + debouncedRecipeSave = debounce(async () => await recipeService.Update(this.payload), 200); get payload() { return {