diff --git a/Libs/CMS_CORE_Library.dll b/Libs/CMS_CORE_Library.dll index 213f8498..cbffedda 100644 Binary files a/Libs/CMS_CORE_Library.dll and b/Libs/CMS_CORE_Library.dll differ diff --git a/Step/Controllers/WebApi/ApiAlarmController.cs b/Step/Controllers/WebApi/ApiAlarmController.cs index ad207c75..4ff605bb 100644 --- a/Step/Controllers/WebApi/ApiAlarmController.cs +++ b/Step/Controllers/WebApi/ApiAlarmController.cs @@ -119,7 +119,7 @@ namespace Step.Controllers.WebApi [Route("data"), HttpPost] - public IHttpActionResult GetAlarmsData(int pageSize) + public IHttpActionResult GetAlarmsData(int pageSize) { using (AlarmsController alarmController = new AlarmsController()) { diff --git a/Step/wwwroot/assets/styles/base/scada.less b/Step/wwwroot/assets/styles/base/scada.less index 28b53080..2dfd2341 100644 --- a/Step/wwwroot/assets/styles/base/scada.less +++ b/Step/wwwroot/assets/styles/base/scada.less @@ -43,9 +43,41 @@ input[type=number]{ border: solid 1px #ccc; } + input[type=number]:disabled{ border: solid 1px #FFFFFF; } + + .input-group{ + display: flex; + input::-webkit-outer-spin-button, + input::-webkit-inner-spin-button { + /* display: none; <- Crashes Chrome on hover */ + -webkit-appearance: none; + margin: 0; /* <-- Apparently some margin are still there even though it's hidden */ + } + } + + .input-group-append{ + display: flex; + margin-left: 0px; + align-items: center; + justify-content: center; + } + + .appended-btn { + position: relative; + z-index: 2; + background-image: linear-gradient(to bottom, @button-success-color-from, @button-success-color-to); + color: white; + border: #001e48 1px solid; + &:active { + background-image: linear-gradient(to bottom, @button-success-color-to, @button-success-color-from) !important; + box-shadow: inset @button-shadow; + border: #001e48 1px solid !important; + color: #8eb5e2 + } + } } } diff --git a/Step/wwwroot/assets/styles/style.css b/Step/wwwroot/assets/styles/style.css index f610090a..bd9dc9a4 100644 --- a/Step/wwwroot/assets/styles/style.css +++ b/Step/wwwroot/assets/styles/style.css @@ -19654,6 +19654,35 @@ footer .container button.big:before { .card-scada-production .card-scada-prod-body input[type=number]:disabled { border: solid 1px #FFFFFF; } +.card-scada-production .card-scada-prod-body .input-group { + display: flex; +} +.card-scada-production .card-scada-prod-body .input-group input::-webkit-outer-spin-button, +.card-scada-production .card-scada-prod-body .input-group input::-webkit-inner-spin-button { + /* display: none; <- Crashes Chrome on hover */ + -webkit-appearance: none; + margin: 0; + /* <-- Apparently some margin are still there even though it's hidden */ +} +.card-scada-production .card-scada-prod-body .input-group-append { + display: flex; + margin-left: 0px; + align-items: center; + justify-content: center; +} +.card-scada-production .card-scada-prod-body .appended-btn { + position: relative; + z-index: 2; + background-image: linear-gradient(to bottom, #1756ad, #002680); + color: white; + border: #001e48 1px solid; +} +.card-scada-production .card-scada-prod-body .appended-btn:active { + background-image: linear-gradient(to bottom, #002680, #1756ad) !important; + box-shadow: inset 0 1px 2px 0 rgba(0, 0, 0, 0.4); + border: #001e48 1px solid !important; + color: #8eb5e2; +} .scada-container { height: 100%; width: 100%; diff --git a/Step/wwwroot/src/app_modules/alarms/components/alarm-history.ts b/Step/wwwroot/src/app_modules/alarms/components/alarm-history.ts index 19052ee3..2783a94d 100644 --- a/Step/wwwroot/src/app_modules/alarms/components/alarm-history.ts +++ b/Step/wwwroot/src/app_modules/alarms/components/alarm-history.ts @@ -151,6 +151,7 @@ export default class AlarmHistory extends Vue { this.$options.filters.localize("modal_confirm_delete_alarms", "Confermi la cancellazione di tutti gli allarmi salvati?"), async () => { await awaiter(alarmsService.DeleteAlarms()) + this.filterChanged("","") }, null); } diff --git a/Step/wwwroot/src/app_modules/scada/components/card-scada-production.ts b/Step/wwwroot/src/app_modules/scada/components/card-scada-production.ts index 076977ae..09b75152 100644 --- a/Step/wwwroot/src/app_modules/scada/components/card-scada-production.ts +++ b/Step/wwwroot/src/app_modules/scada/components/card-scada-production.ts @@ -64,8 +64,12 @@ export default class CardScadaProduction extends Vue { await scadaService.SendButtonValue(this.scadaId, itemId); } - async sendInputValue(itemId: number, value: any) { - await scadaService.SendInputValue(this.scadaId, itemId, value); + async sendInputValue(item:any, value: any) { + item.value.notUpdated = true; + item.value.oldVal = item.value.value; + await scadaService.SendInputValue(this.scadaId, item.id, value); + item.value.notUpdated = false; + } mounted() { @@ -78,4 +82,15 @@ export default class CardScadaProduction extends Vue { e.returnValue = false; return false; } + + onFocus(item){ + item.value.oldVal = item.value.value; + item.value.notUpdated = false; + + } + + onBlur(item){ + if(!item.value.notUpdated) + item.value.value = item.value.oldVal; + } } diff --git a/Step/wwwroot/src/app_modules/scada/components/card-scada-production.vue b/Step/wwwroot/src/app_modules/scada/components/card-scada-production.vue index a4266ca8..514e478d 100644 --- a/Step/wwwroot/src/app_modules/scada/components/card-scada-production.vue +++ b/Step/wwwroot/src/app_modules/scada/components/card-scada-production.vue @@ -60,25 +60,48 @@ }" >{{item.label.textContent}} - +
- + +
+ +
+
+ diff --git a/Step/wwwroot/src/app_modules/scada/components/scada.ts b/Step/wwwroot/src/app_modules/scada/components/scada.ts index b50d9020..4544b9c7 100644 --- a/Step/wwwroot/src/app_modules/scada/components/scada.ts +++ b/Step/wwwroot/src/app_modules/scada/components/scada.ts @@ -23,7 +23,7 @@ export default class Scada extends Vue { } @Prop() - currentScadaId:number ; + currentScadaId: number ; public selectTab(value: number) { // this.currentScadaId = value; @@ -99,8 +99,11 @@ export default class Scada extends Vue { await scadaService.SendButtonValue(this.currentScadaId, itemId); } - async sendInputValue(itemId: number, value: any) { - await scadaService.SendInputValue(this.currentScadaId, itemId, value); + async sendInputValue(item: any, value: any) { + item.value.updated = false; + item.value.oldVal = item.value.value; + await scadaService.SendInputValue(this.currentScadaId, item.id, value); + item.value.updated = true; } async mounted() { @@ -122,4 +125,15 @@ export default class Scada extends Vue { e.returnValue = false; return false; } + + onFocus(item){ + item.value.oldVal = item.value.value; + item.value.updated = true; + + } + + onBlur(item){ + if(item.value.updated) + item.value.value = item.value.oldVal; + } } diff --git a/Step/wwwroot/src/components/doughnut-chart/doughnut-chart-animated.ts b/Step/wwwroot/src/components/doughnut-chart/doughnut-chart-animated.ts index 0486c2ed..83281489 100644 --- a/Step/wwwroot/src/components/doughnut-chart/doughnut-chart-animated.ts +++ b/Step/wwwroot/src/components/doughnut-chart/doughnut-chart-animated.ts @@ -140,6 +140,9 @@ export default class DoughnutChartAnimated extends Vue { } getEmptyStroke(radius, value) { + if(value > 100) + value = 100; + // If value is equal to 100, remove 0.05 in order to fix gap between internal line & intervals semicircle let pct = value == 100 ? 0.745 : 0.75 // Perimeter of circumferences * blank pct