From 8d31628cc206c5f30ad7ee44bd50a91d3513f951 Mon Sep 17 00:00:00 2001 From: = Date: Thu, 4 Feb 2021 17:15:15 +0100 Subject: [PATCH 1/2] fix output layout con dati --- .../components/tables/inputTab/input.ts | 5 +- .../components/tables/inputTab/input.vue | 5 +- .../tables/outputTab/output-row-item.ts | 4 +- .../tables/outputTab/output-row-item.vue | 19 ++++- .../components/tables/outputTab/output.less | 76 +++++++++++++++++++ .../components/tables/outputTab/output.ts | 9 ++- .../components/tables/outputTab/output.vue | 34 +++++---- .../sotto-cofano/sotto-cofano.less | 2 +- 8 files changed, 133 insertions(+), 21 deletions(-) diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/sotto-cofano/InputOutput/components/tables/inputTab/input.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/sotto-cofano/InputOutput/components/tables/inputTab/input.ts index 8381f4cf..e87c6d7e 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/sotto-cofano/InputOutput/components/tables/inputTab/input.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/sotto-cofano/InputOutput/components/tables/inputTab/input.ts @@ -11,11 +11,14 @@ export default class InputTable extends Vue { - pin(item: server.channel) { + pin(item: server.channel, group: string) { let found = this.pinned.findIndex(i => i == item); if (found >= 0) this.pinned.splice(found, 1); else this.pinned.push(item); + + if (group) + Vue.set(item, '__group', group); } isPinned(item: server.channel): boolean { diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/sotto-cofano/InputOutput/components/tables/inputTab/input.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/sotto-cofano/InputOutput/components/tables/inputTab/input.vue index a89435ae..cb9b337c 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/sotto-cofano/InputOutput/components/tables/inputTab/input.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/sotto-cofano/InputOutput/components/tables/inputTab/input.vue @@ -17,11 +17,12 @@ {{'pinned' | localize('Pinned')}} @@ -33,7 +34,7 @@ {{ item.label | localize(item.label) }} - + OFF - + + {{item.value}} + + +
+
+ + +
+ + +
+ \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/sotto-cofano/InputOutput/components/tables/outputTab/output.less b/Thermo.Active/wwwroot/src/app_modules_thermo/sotto-cofano/InputOutput/components/tables/outputTab/output.less index 09023be6..45b5b954 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/sotto-cofano/InputOutput/components/tables/outputTab/output.less +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/sotto-cofano/InputOutput/components/tables/outputTab/output.less @@ -10,5 +10,81 @@ td { &.force { width: 130px; max-width: 130px; + + input { + max-width: 100px; + height: 48px; + } + } + + &.ai { + font-weight: bold; + text-align: right; + span { + margin: 0 20px 0 10px; + } + } + + .do-container { + width: 130px; + display: flex; + flex-flow: row nowrap; + align-items: center; + justify-content: space-between; + + .io-buttons { + box-sizing: border-box; + width: 86px; + height: 40px; + border-radius: 40px; + background-color: #545454; + display: flex; + flex-flow: row nowrap; + justify-content: space-between; + align-items: center; + padding: 3px; + } + + button { + border: none; + background: @light-grey-blue; + color: #fff; + width: 34px; + height: 34px; + display: flex; + align-items: center; + justify-content: center; + border-radius: 20px; + font-size: 18px; + font-weight: bold; + box-shadow: inset 0 2px 2px 0 rgba(0, 0, 0, 0.19); + + &.forced { + background: @clear-blue; + box-shadow: 0 3px 5px 0 rgba(0, 0, 0, 0.4); + } + + &.btn-force { + background: @scarlet; + box-shadow: 0 3px 5px 0 rgba(0, 0, 0, 0.4); + width: 28px; + height: 28px; + margin: 3px; + } + } + + input { + width: 84px; + height: 48px; + background-color: #dddddd; + box-shadow: inset 0 1px 3px 0 @black-50; + border: none; + box-sizing: border-box; + font-size: 18px; + font-weight: bold; + padding: 0 10px; + color: #4b4b4b; + text-align: right; + } } } diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/sotto-cofano/InputOutput/components/tables/outputTab/output.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/sotto-cofano/InputOutput/components/tables/outputTab/output.ts index f3f5ddf3..d376d964 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/sotto-cofano/InputOutput/components/tables/outputTab/output.ts +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/sotto-cofano/InputOutput/components/tables/outputTab/output.ts @@ -10,11 +10,14 @@ export default class OutputTable extends Vue { pinned = []; - pin(item: server.channel) { + pin(item: server.channel, group: string) { let found = this.pinned.findIndex(i => i == item); if (found >= 0) this.pinned.splice(found, 1); else this.pinned.push(item); + + if (group) + Vue.set(item, '__group', group); } isPinned(item: server.channel): boolean { @@ -24,4 +27,8 @@ export default class OutputTable extends Vue { get items(): server.channels { return store.state.underTheHood.ioChannels; } + + get config(): { [id: string]: number[] } { + return store.state.underTheHood.ioChannelsConfig; + } } diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/sotto-cofano/InputOutput/components/tables/outputTab/output.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/sotto-cofano/InputOutput/components/tables/outputTab/output.vue index bc93d67d..63f889ac 100644 --- a/Thermo.Active/wwwroot/src/app_modules_thermo/sotto-cofano/InputOutput/components/tables/outputTab/output.vue +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/sotto-cofano/InputOutput/components/tables/outputTab/output.vue @@ -18,31 +18,39 @@ {{'pinned' | localize('Pinned')}} - + + +