From 592984bd2219e494de2e50a87d383c0ca58014ef Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Thu, 8 Oct 2020 18:09:46 +0200 Subject: [PATCH] Fix UI components --- .../wwwroot/assets/styles/base/dashboard-gauge.less | 8 +++++++- .../wwwroot/assets/styles/base/dashboard.less | 2 +- Thermo.Active/wwwroot/assets/styles/style.css | 12 ++++++++++-- .../src/app_modules_thermo/components/slider.ts | 10 +++++----- .../dashboard/base-components/gauge.vue | 1 + .../dashboard/base-components/item.vue | 6 +++--- .../src/app_modules_thermo/dashboard/dashboard.ts | 2 ++ .../src/app_modules_thermo/dashboard/dashboard.vue | 6 +++--- .../processo/components/gantt/gantt-component.ts | 13 +++++++++++++ .../processo/components/gantt/gantt-component.vue | 9 ++++++--- 10 files changed, 51 insertions(+), 18 deletions(-) diff --git a/Thermo.Active/wwwroot/assets/styles/base/dashboard-gauge.less b/Thermo.Active/wwwroot/assets/styles/base/dashboard-gauge.less index 55106dd3..d866af4d 100644 --- a/Thermo.Active/wwwroot/assets/styles/base/dashboard-gauge.less +++ b/Thermo.Active/wwwroot/assets/styles/base/dashboard-gauge.less @@ -57,9 +57,15 @@ .gauge { .dial { - fill: rgba(153, 207, 255, 0.6); stroke: #003366; stroke-width: 2.5; + fill: rgba(153, 207, 255, 0.0); + &.ok{ + fill: rgba(153, 207, 255, 0.6); + } + &.pre{ + fill: rgba(250, 163, 70, 0.6); + } } .value { diff --git a/Thermo.Active/wwwroot/assets/styles/base/dashboard.less b/Thermo.Active/wwwroot/assets/styles/base/dashboard.less index 44bc93be..10a3693b 100644 --- a/Thermo.Active/wwwroot/assets/styles/base/dashboard.less +++ b/Thermo.Active/wwwroot/assets/styles/base/dashboard.less @@ -404,6 +404,7 @@ flex-flow: column nowrap; align-items: center; justify-content: flex-end; + cursor: pointer; .body { display: grid; @@ -462,7 +463,6 @@ i { font-size: 32px; - cursor: pointer; } } diff --git a/Thermo.Active/wwwroot/assets/styles/style.css b/Thermo.Active/wwwroot/assets/styles/style.css index f7a2981b..aed58c34 100644 --- a/Thermo.Active/wwwroot/assets/styles/style.css +++ b/Thermo.Active/wwwroot/assets/styles/style.css @@ -4193,9 +4193,17 @@ article .box .body { } .gauge-container .gauge1 .gauge .dial, .gauge-container .gauge2 .gauge .dial { - fill: rgba(153, 207, 255, 0.6); stroke: #003366; stroke-width: 2.5; + fill: rgba(153, 207, 255, 0); +} +.gauge-container .gauge1 .gauge .dial.ok, +.gauge-container .gauge2 .gauge .dial.ok { + fill: rgba(153, 207, 255, 0.6); +} +.gauge-container .gauge1 .gauge .dial.pre, +.gauge-container .gauge2 .gauge .dial.pre { + fill: rgba(250, 163, 70, 0.6); } .gauge-container .gauge1 .gauge .value, .gauge-container .gauge2 .gauge .value { @@ -4546,6 +4554,7 @@ article .box .body { flex-flow: column nowrap; align-items: center; justify-content: flex-end; + cursor: pointer; } .history-item .body { display: grid; @@ -4595,7 +4604,6 @@ article .box .body { } .history-item .col i { font-size: 32px; - cursor: pointer; } .history-item button.trash { border-radius: 25px; 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 ce4dd3ee..268873ea 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/components/slider.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/components/slider.ts @@ -55,23 +55,23 @@ export default class Slider extends Vue { startIncrement() { if (!this.value.status.enabled) return; this.incrementValue(); - this.incrementing = setInterval(this.incrementValue, 100); + this.incrementing = setInterval(this.incrementValue, 500); } startDecrement() { if (!this.value.status.enabled) return; this.decrementValue(); - this.incrementing = setInterval(this.decrementValue, 100); + this.incrementing = setInterval(this.decrementValue, 500); } decrementValue(){ var v = this.value.setpointHMI; - if (v < this.value.range.max) { + if (v > this.value.range.min) { v -= this.step; this.step += this.incrementingStep * this.initalStep; } - if (v > this.value.range.max) { - v = this.value.range.max; + if (v < this.value.range.min) { + v = this.value.range.min; } this.actualvalue = parseFloat(v.toFixed(this.value.numDec)); } diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/dashboard/base-components/gauge.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/dashboard/base-components/gauge.vue index 1a8ab2f5..506b5eac 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/dashboard/base-components/gauge.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/dashboard/base-components/gauge.vue @@ -5,6 +5,7 @@
-
+
{{'history-item_warmup' | localize("tempo riscaldo")}} @@ -15,8 +15,8 @@ {{Math.floor(value.timeCycleNet / 60) | round(0)}}'{{value.timeCycleNet % 60 | round(0)}}''
- - + +
diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/dashboard/dashboard.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/dashboard/dashboard.ts index ba2cece8..f2a515ff 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/dashboard/dashboard.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/dashboard/dashboard.ts @@ -27,6 +27,8 @@ import { SoftKeysConfigurationModel } from '@/store/machineInfo.store'; }) export default class Dashboard extends Vue { + recipe: Recipe.IRecipe = this.$store.getters.getCurrent(); + selectedChart: 'tempociclo' | 'pezziora' = "pezziora"; get panel() { diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/dashboard/dashboard.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/dashboard/dashboard.vue index d92ab221..68c925e1 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/dashboard/dashboard.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/dashboard/dashboard.vue @@ -109,15 +109,15 @@
-
+
- +
{{'dashboard-setpoint' | localize('set point')}} - {{panel.tempSetpoint}}°C + {{recipe.pyrometer_pyrometer_setpoint.setpointHMI}}{{recipe.pyrometer_pyrometer_setpoint.unitMeasure}}