Merge remote-tracking branch 'origin/develop' into new/UnderTheHood

This commit is contained in:
Samuele E. Locatelli
2021-02-05 17:38:18 +01:00
12 changed files with 71 additions and 36 deletions
@@ -47,7 +47,7 @@
<button :class="{forced: item.forceZero}">0</button>
<button :class="{forced: item.forceOne}">1</button>
</div>
<input v-model="item.forcedValue" v-if="group=='ao'" />
<numeric v-model="item.forcedValue" v-if="group=='ao'" keyboard-position="left" />
<button class="btn-force" v-if="item.isForced">
<i class="fa fa-times" />
</button>
@@ -1,9 +1,7 @@
<template>
<div class="main-container">
<div class="column-page-one-column">
<LogCicloAutomaticoTable></LogCicloAutomaticoTable>
</div>
</div>
<div class="column-page-one-column">
<LogCicloAutomaticoTable></LogCicloAutomaticoTable>
</div>
</template>
<style lang="less">
@import "log-ciclo-automatico.less";
@@ -1,9 +1,7 @@
<template>
<div class="main-container">
<div class="column-page-one-column">
<LogMisurazioniTable></LogMisurazioniTable>
</div>
</div>
<div class="column-page-one-column">
<LogMisurazioniTable></LogMisurazioniTable>
</div>
</template>
<style lang="less">
@import "log-misurazioni.less";
@@ -1,6 +1,5 @@
@import "../../../../variable.less";
th,
td {
&.misurazioni-value {
@@ -17,7 +16,6 @@ td {
}
&.misurazioni-type {
width: 187px;
max-width:187px;
max-width: 187px;
}
}
@@ -1,9 +1,7 @@
<template>
<div class="main-container">
<div class="column-page-one-column">
<RiscaldiTable></RiscaldiTable>
</div>
</div>
<div class="column-page-one-column">
<RiscaldiTable></RiscaldiTable>
</div>
</template>
<style lang="less">
@import "riscaldi.less";
@@ -26,8 +26,10 @@ td {
border-radius: 2px;
}
label {
margin: 3px 16px 3px 16px;
.main-container {
label {
margin: 3px 16px 3px 16px;
}
}
.ok-button {
@@ -1,10 +1,11 @@
@import "../variable.less";
.rettangle {
width: calc(~"100% - 72px");
height: 72px;
background-color: @fill-under-grey-4-2;
background-color: @fill-under-grey-2-2;
box-sizing: border-box;
border: 1px solid @fill-under-grey-1-2;
cursor: pointer;
display: flex;
flex-flow: row;
padding: 0 36px;
@@ -17,11 +18,13 @@
&.white {
color: @white;
font-weight: bold;
background-color: @fill-under-grey-4-2;
border: none;
}
}
.BG-fascia-sx {
width: 496px;
width: 495px;
height: 886px;
background-color: @fill-under-grey-1-2;
}
@@ -19,7 +19,7 @@
class="rettangle"
@click="go('assi')"
:class="{white: this.value == 'assi'}"
>{{'log-assi' | localize('Log assi')}}</div> -->
>{{'log-assi' | localize('Log assi')}}</div>-->
<div
class="rettangle"
@click="go('riscaldi')"
@@ -137,12 +137,12 @@
background-color: @fill-under-grey-2-2;
display: grid;
> table {
margin: 20px 0 0 20px
margin: 20px 0 0 20px;
}
}
.one-column-table-container {
height: 800px;
height: 750px;
margin: 20px 0 0 20px;
> table {
width: -webkit-fill-available;
@@ -39,14 +39,14 @@ export default class AppFooter extends Vue {
openProgram(path: string) {
this.$router.push(path);
//appModelActions.MainViewLiftDown(this.$store);
appModelActions.MainViewLiftDown(this.$store);
}
isInPath(value: string) {
return this.$route.path.indexOf(value) >= 0;
}
isInMainPage(){
isInMainPage() {
return this.$route.path == "/";
}
@@ -76,11 +76,11 @@ export default class AppFooter extends Vue {
async runManual() {
ModalHelper.AskConfirm(this.$options.filters.localize("modal_confirm_title", "Richiesta di conferma"),
this.$options.filters.localize("modal_confirm_mode_manual", "Confermi di voler passare alla modalità manuale?"),
() => {
prodService.Manual();
}, null, "modal");
this.$options.filters.localize("modal_confirm_mode_manual", "Confermi di voler passare alla modalità manuale?"),
() => {
prodService.Manual();
}, null, "modal");
}
async runAuto() {
+6 -1
View File
@@ -29,6 +29,7 @@ import { recipeService } from "./recipeService";
import { warmersActions, warmersStore } from "@/store/warmers.store";
import { cmsConnectActions } from "@/store/cmsConnect.store";
import { warmersService } from "./warmersService";
import { underTheHoodActions } from "@/store/underTheHood.store";
declare const PRODUCTION;
@@ -120,6 +121,7 @@ export class Hub {
this._hub.client.prodCycleData = Hub.prodCycleData;
this._hub.client.gaugeData = Hub.gaugeData;
this._hub.client.axisInfo = Hub.axisInfoData;
this._hub.client.channelsIoVal = Hub.channelsIOUpdate;
@@ -160,6 +162,9 @@ export class Hub {
}
public static channelsIOUpdate(data: server.channels) {
underTheHoodActions.UpdateIOChannels(store, data);
}
public cmsConnectUpdateActivationData(authData) {
cmsConnectActions.updateActivationData(store, authData);
@@ -195,7 +200,7 @@ export class Hub {
recipeActions.setCurrent(store, data, true);
}
public static warmersData(data){
public static warmersData(data) {
warmersActions.setChannels(store, data as { [id: number]: Warmers.IChannel });
}
@@ -4,12 +4,14 @@ import { CONFIGURATION } from "@/config";
export interface UnderTheHoodStoreModel {
ioChannels: server.channels;
ioChannelsConfig: { [id: string]: number[] }
_channels: Map<string, Map<string | number, any>>
}
export interface UnderTheHoodActions {
SetIOChannels(context, model: server.channels)
SetIOChannelsConfig(context, model: { [id: string]: number[] })
UpdateIOChannels(context, model: server.channels)
}
export interface UnderTheHoodGetters {
@@ -20,6 +22,7 @@ export const underTheHoodStore = {
state: {
ioChannels: {},
ioChannelsConfig: {},
_channels: new Map<string, Map<string | number, any>>()
} as UnderTheHoodStoreModel,
getters: {
@@ -29,10 +32,37 @@ export const underTheHoodStore = {
SetIOChannels(state: UnderTheHoodStoreModel, model: server.channels) {
state.ioChannels = model;
// reset maps for fast updating
state._channels = new Map<string, Map<string | number, any>>()
for (const key in model) {
if (Object.prototype.hasOwnProperty.call(model, key)) {
const element = model[key];
state._channels.set(key, new Map<string | number, any>());
let g = state._channels.get(key);
for (const item of element) {
g.set(item.id, item);
}
}
}
},
SetIOChannelsConfig(state: UnderTheHoodStoreModel, model: { [id: string]: number[] }) {
state.ioChannelsConfig = model;
},
UpdateIOChannels(state: UnderTheHoodStoreModel, model: server.channels) {
for (const key in model) {
let g = state._channels.get(key);
const values = model[key];
for (const item of values) {
let v = g.get(item.id);
Object.assign(v, item);
}
}
}
},
actions: {
@@ -43,6 +73,9 @@ export const underTheHoodStore = {
async SetIOChannelsConfig(context, model: { [id: string]: number[] }) {
context.commit("SetIOChannelsConfig", model);
},
async UpdateIOChannels(context, model: server.channels) {
context.commit("UpdateIOChannels", model);
}
} as UnderTheHoodActions
}