+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
+
+
\ No newline at end of file
diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/sostentamento-decompressione.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/sostentamento-decompressione.ts
index ca81dcb8..21ca67e2 100644
--- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/sostentamento-decompressione.ts
+++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/sostentamento-decompressione.ts
@@ -2,12 +2,11 @@ import Vue from 'vue';
import Component from 'vue-class-component';
import { Prop } from 'vue-property-decorator';
import Slider from "@/app_modules_thermo/components/slider.vue"
-import toggleButton from "@/components/toggleButton.vue";
-@Component({ name: "sostdecomp", components: { slider: Slider, toggleButton } })
+@Component({ name: "sostdecomp", components: { slider: Slider } })
export default class SostDecomp extends Vue {
- @Prop()
- recipe:Recipe.IRecipe;
+ @Prop()
+ recipe: Recipe.IRecipe;
}
\ No newline at end of file
diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/sostentamento-decompressione.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/sostentamento-decompressione.vue
index 7f82e544..b69a7a00 100644
--- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/sostentamento-decompressione.vue
+++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/sostentamento-decompressione.vue
@@ -1,41 +1,44 @@
-
-
+
diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/warmers.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/warmers.ts
new file mode 100644
index 00000000..d0745add
--- /dev/null
+++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/warmers.ts
@@ -0,0 +1,81 @@
+import Component from "vue-class-component";
+import Vue from "vue";
+import { store } from "@/store";
+import { warmersService } from "@/services/warmersService";
+import { Prop, Watch } from "vue-property-decorator";
+import resistance from "./resistance.vue";
+import svgPanZoom from "svg-pan-zoom";
+
+@Component({
+ components: {
+ resistance
+ }
+})
+export default class Warmers extends Vue {
+
+ width = 180;
+ height = 48;
+
+ @Prop({ default: 0 })
+ idReflector: number;
+
+ selectedChannels: number[] = []
+
+ get channels() {
+ return store.state.warmers.channels.filter(i => i.idReflector == this.idReflector);
+ }
+
+ get resistances() {
+ let cc = this.channels.map(i => i.idChannel);
+ return store.state.warmers.resistances.filter(r => cc.findIndex(i => i == r.idChannel) >= 0);
+ }
+
+ get rows() {
+ let result = this.resistances.reduce((p, c) => {
+ p.add(c.row);
+ return p;
+ }, new Set
());
+ return Array.from(result.values());
+ }
+
+ getChannel(id: number) {
+ return this.channels.find(i => i.idChannel == id);
+ }
+
+ // Ottengo le resistenze per ogni riga
+ resistancesPerRow(row: number) {
+ return this.resistances.filter(i => i.row == row);
+ }
+
+ // Calcolo la posizione di ogni resitenza in base alla dimensione delle resistenze precedenti.
+ resistanceXPosition(row, col) {
+ let cells = this.resistancesPerRow(row).filter(i => i.column < col);
+ let result = cells.reduce((p, c) => p + c.dimension, 0);
+ return result;
+ }
+
+
+ zoomController: any = null;
+
+ zoomIn() {
+ this.zoomController?.zoomIn();
+ }
+
+ zoomOut() {
+ this.zoomController?.zoomOut();
+ }
+
+ mounted() {
+ let $this = this;
+ setTimeout(() => {
+ $this.zoomController = svgPanZoom('#warmer', {
+ zoomEnabled: true,
+ controlIconsEnabled: false,
+ fit: true,
+ center: true,
+ });
+ }, 500)
+
+ }
+
+}
diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/warmers.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/warmers.vue
new file mode 100644
index 00000000..3700788c
--- /dev/null
+++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/base-components/warmers.vue
@@ -0,0 +1,18 @@
+
+
+
+
\ No newline at end of file
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 fb276190..5d0ff435 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
@@ -5,12 +5,13 @@ import Component from "vue-class-component";
import { Prop } from 'vue-property-decorator';
import StepFooter from "@/app_modules_thermo/setup/components/step-footer.vue";
import RiscaldiSup from "./base-components/riscaldi-superiori.vue";
+import RiscaldiInf from "./base-components/riscaldi-inferiori.vue";
import SostDecomp from "./base-components/sostentamento-decompressione.vue";
import { recipeActions } from "@/store/recipe.store";
import { store } from "@/store";
import { Deferred } from "@/services";
-@Component({ components: { modal: Modal, stepfooter: StepFooter, riscaldisup: RiscaldiSup, sostdecomp: SostDecomp } })
+@Component({ components: { modal: Modal, stepfooter: StepFooter, riscaldiinf: RiscaldiInf,riscaldisup: RiscaldiSup, sostdecomp: SostDecomp } })
export default class ShowRiscaldamentoSuperioreInfo extends Vue {
recipe: Recipe.IRecipe = this.$store.getters.getCurrent();
@@ -30,6 +31,12 @@ export default class ShowRiscaldamentoSuperioreInfo extends Vue {
this.deferred.resolve(1);
};
+ goTo(step) {
+ recipeActions.setCurrent(store, this.recipe);
+ ModalHelper.HideModal();
+ this.deferred.resolve(step);
+ }
+
async beforeMount() {
// this.contactInfo = await awaiter(new machineService().getContactConfiguration());
messageService.subscribeToChannel("esc_pressed", args => {
diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/show-riscaldi-info.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/show-riscaldi-info.vue
index 58cfcc84..11b3c8f6 100644
--- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/show-riscaldi-info.vue
+++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/riscaldi/components/show-riscaldi-info.vue
@@ -11,13 +11,13 @@
@click="show = 'activeSD'"
>Sostentamento/Decompressione
-
+
-
+
diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/base-components/prevuoto.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/base-components/prevuoto.ts
new file mode 100644
index 00000000..9a4b6641
--- /dev/null
+++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/base-components/prevuoto.ts
@@ -0,0 +1,13 @@
+import Vue from 'vue';
+import Component from 'vue-class-component';
+import { Prop } from 'vue-property-decorator';
+import Slider from "@/app_modules_thermo/components/slider.vue";
+import Scheda from "@/app_modules_thermo/components/scheda.vue";
+
+@Component({ name: 'prevuoto', components: { slider: Slider } })
+export default class Prevuoto extends Vue {
+
+ @Prop()
+ recipe: Recipe.IRecipe;
+
+}
\ No newline at end of file
diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/base-components/prevuoto.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/base-components/prevuoto.vue
new file mode 100644
index 00000000..051e8690
--- /dev/null
+++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/base-components/prevuoto.vue
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/base-components/vuoto-ausiliario.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/base-components/vuoto-ausiliario.ts
new file mode 100644
index 00000000..f43f143a
--- /dev/null
+++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/base-components/vuoto-ausiliario.ts
@@ -0,0 +1,13 @@
+import Vue from 'vue';
+import Component from 'vue-class-component';
+import { Prop } from 'vue-property-decorator';
+import Slider from "@/app_modules_thermo/components/slider.vue";
+import Scheda from "@/app_modules_thermo/components/scheda.vue";
+
+@Component({ name: 'vuotoausiliario', components: { slider: Slider, scheda: Scheda } })
+export default class VuotoAusiliario extends Vue {
+
+ @Prop()
+ recipe: Recipe.IRecipe;
+
+}
\ No newline at end of file
diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/base-components/vuoto-ausiliario.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/base-components/vuoto-ausiliario.vue
new file mode 100644
index 00000000..7dbd32eb
--- /dev/null
+++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/base-components/vuoto-ausiliario.vue
@@ -0,0 +1,62 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/base-components/vuoto-diretto.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/base-components/vuoto-diretto.ts
new file mode 100644
index 00000000..7b71b555
--- /dev/null
+++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/base-components/vuoto-diretto.ts
@@ -0,0 +1,16 @@
+import Vue from 'vue';
+import Component from 'vue-class-component';
+import {Prop} from 'vue-property-decorator';
+import Slider from "@/app_modules_thermo/components/slider.vue";
+
+@Component({name:"vuotodiretto",
+components: {
+ slider:Slider
+}
+})
+export default class VuotoDiretto extends Vue{
+
+ @Prop()
+ recipe:Recipe.IRecipe;
+
+}
\ No newline at end of file
diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/base-components/vuoto-diretto.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/base-components/vuoto-diretto.vue
new file mode 100644
index 00000000..584d4657
--- /dev/null
+++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/base-components/vuoto-diretto.vue
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/base-components/vuoto-principale.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/base-components/vuoto-principale.ts
index 01e0de33..9bd28bb1 100644
--- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/base-components/vuoto-principale.ts
+++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/base-components/vuoto-principale.ts
@@ -1,8 +1,8 @@
import Vue from 'vue';
import Component from 'vue-class-component';
import {Prop} from 'vue-property-decorator';
-import Slider from "@/app_modules_thermo/components/slider.vue"
-import Scheda from "@/app_modules_thermo/components/scheda.vue"
+import Slider from "@/app_modules_thermo/components/slider.vue";
+import Scheda from "@/app_modules_thermo/components/scheda.vue";
@Component({name:'vuotoprincipale', components: { slider:Slider, scheda:Scheda}})
export default class VuotoPrincipale extends Vue{
diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/base-components/vuoto-principale.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/base-components/vuoto-principale.vue
index bf29c4db..9f5fabfa 100644
--- a/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/base-components/vuoto-principale.vue
+++ b/Thermo.Active/wwwroot/src/app_modules_thermo/setup/vuoto/base-components/vuoto-principale.vue
@@ -1,67 +1,61 @@
diff --git a/Thermo.Active/wwwroot/src/main.ts b/Thermo.Active/wwwroot/src/main.ts
index ad0c21e1..5b46c839 100644
--- a/Thermo.Active/wwwroot/src/main.ts
+++ b/Thermo.Active/wwwroot/src/main.ts
@@ -25,9 +25,10 @@ import "./_base/gestures";
import "./app.business-logic";
import "./app.modules";
import { messageService } from "src/_base";
-import { recipeService } from "@/services/recipeService";
-recipeService.GetCurrent();
-recipeService.GetOverview();
+
+import { warmersService } from "./services/warmersService";
+warmersService.GetChannels();
+warmersService.GetResistances();
// import VueDragDrop from 'vue-drag-drop';
// Vue.use(VueDragDrop);
@@ -119,6 +120,9 @@ for (let name in components) {
Vue.component(name, components[name]);
}
+import toggleButton from "@/components/toggleButton.vue";
+Vue.component('toggleButton', toggleButton);
+
// polyfills !!
if (!(String.prototype as any).format) {
(String.prototype as any).format = function () {
diff --git a/Thermo.Active/wwwroot/src/services/hub.ts b/Thermo.Active/wwwroot/src/services/hub.ts
index b79a87a1..f2c1b692 100644
--- a/Thermo.Active/wwwroot/src/services/hub.ts
+++ b/Thermo.Active/wwwroot/src/services/hub.ts
@@ -22,6 +22,7 @@ import { scadaService } from "./scadaService";
import { loginService } from "./loginService";
import { ToolingService } from "./toolingService";
import { CONFIGURATION } from "@/config";
+import { recipeActions } from "@/store/recipe.store";
declare let $: any;
@@ -96,13 +97,12 @@ export class Hub {
this._hub.client.partProgramQueue = Hub.partProgramQueue;
-
// this._hub.client.scadaData = Hub.scadaDataChanged;
this._hub.client.cmsConnectGatewayRebbot = Hub.cmsConnectGatewayRebbot;
// qui i NUOVI metodi NUOVI dal server (Recipe, gauges) da completare lato HUB
- // this._hub.client.recipeFullData = Hub.recipeFullData;
- // this._hub.client.recipeOverData = Hub.recipeOverData;
+ this._hub.client.recipeFullData = Hub.recipeFullData;
+ this._hub.client.recipeOverData = Hub.recipeOverData;
// this._hub.client.modulesData = Hub.modulesData;
// this._hub.client.warmersData = Hub.warmersData;
this._hub.client.gaugeData = Hub.gaugeData;
@@ -147,6 +147,14 @@ export class Hub {
}
+ public static recipeFullData(data) {
+ recipeActions.setCurrent(store, data);
+ }
+
+ public static recipeOverData(data) {
+ recipeActions.setOverview(store, data);
+ }
+
public updateAuthToken() {
// Set or update authorization token
let authData = JSON.parse(window.localStorage.getItem("authorizationData") || window.sessionStorage.getItem("authorizationData")) as AuthToken;
diff --git a/Thermo.Active/wwwroot/src/services/recipeService.ts b/Thermo.Active/wwwroot/src/services/recipeService.ts
index 3291fe29..7431d02b 100644
--- a/Thermo.Active/wwwroot/src/services/recipeService.ts
+++ b/Thermo.Active/wwwroot/src/services/recipeService.ts
@@ -1,23 +1,43 @@
import { baseRestService } from "../_base/baseRestService";
-import {CONFIGURATION} from "@/config";
+import { CONFIGURATION } from "@/config";
import { recipeActions } from "@/store/recipe.store";
import { store } from "@/store";
export class RecipeService extends baseRestService {
- BASE_URL = async () => (await CONFIGURATION).api.apiServerUrl + "/api/recipe/";
+ BASE_URL = async () => (await CONFIGURATION).api.apiServerUrl + "/api/recipe/";
- async GetCurrent(){
- let result = await this.Get((await this.BASE_URL()) + "current");
- recipeActions.setCurrent(store, result);
- return result;
+ async GetCurrent() {
+ let result = await this.Get((await this.BASE_URL()) + "current");
+ recipeActions.setCurrent(store, result);
+ return result;
+ }
+
+ async GetOverview() {
+ let result = await this.Get((await this.BASE_URL()) + "overview");
+ recipeActions.setOverview(store, result);
+ return result;
+ }
+
+ async Update(model: { [id: string]: Recipe.IValue }) {
+
+ let payload = {}
+
+ for (const key in model) {
+ if (model.hasOwnProperty(key)) {
+ payload[key] = model[key].valueAct;
+ }
}
- async GetOverview(){
- let result = await this.Get((await this.BASE_URL()) + "overview");
- recipeActions.setOverview(store, result);
- return result;
- }
+ let result = await this.Put
((await this.BASE_URL()) + "update", payload, true);
+ // recipeActions.Update(store, result);
+ return result;
+ }
+
+ async Confirm() {
+ let result = await this.Put((await this.BASE_URL()) + "confirm", true);
+ return result;
+ }
}
export const recipeService = new RecipeService();
diff --git a/Thermo.Active/wwwroot/src/services/warmersService.ts b/Thermo.Active/wwwroot/src/services/warmersService.ts
new file mode 100644
index 00000000..24a8007b
--- /dev/null
+++ b/Thermo.Active/wwwroot/src/services/warmersService.ts
@@ -0,0 +1,44 @@
+import { baseRestService } from "../_base/baseRestService";
+import { CONFIGURATION } from "@/config";
+import { warmersActions } from "@/store/warmers.store";
+import { store } from "@/store";
+import Warmers from "@/app_modules_thermo/setup/riscaldi/components/base-components/warmers";
+
+export class WarmersService extends baseRestService {
+
+ BASE_URL = async () => (await CONFIGURATION).api.apiServerUrl + "api/warmers/";
+
+ async GetChannels() {
+ let result = await this.Get((await this.BASE_URL()) + "channels");
+ warmersActions.setChannels(store, result as { [id: number]: Warmers.IChannel });
+ return result;
+ }
+
+ async GetResistances() {
+ let result = await this.Get((await this.BASE_URL()) + "resistances");
+ warmersActions.setResistances(store, result as { [id: number]: Warmers.IResistance });
+ return result;
+ }
+
+ async Update(model: any) {
+ let result = await this.Put((await this.BASE_URL()) + "update", model, true);
+ return result;
+ }
+
+ async Confirm() {
+ let result = await this.Put((await this.BASE_URL()) + "confirm", true);
+ return result;
+ }
+
+ async Cancel() {
+ let result = await this.Put((await this.BASE_URL()) + "cancel", true);
+ return result;
+ }
+
+ async SetConfig() {
+ let result = await this.Put((await this.BASE_URL()) + "setConfig", true);
+ return result;
+ }
+
+}
+export const warmersService = new WarmersService();
\ No newline at end of file
diff --git a/Thermo.Active/wwwroot/src/store/app.store.ts b/Thermo.Active/wwwroot/src/store/app.store.ts
index 911d66ea..4fb325a8 100644
--- a/Thermo.Active/wwwroot/src/store/app.store.ts
+++ b/Thermo.Active/wwwroot/src/store/app.store.ts
@@ -15,9 +15,10 @@ import { LocalizationService, localizationService } from "@/services/localizatio
import { ProductionStoreModel, productionStore } from "./production.store";
import { jobEditorStore } from "./jobEditor.store";
import { scadaStore, ScadaModel } from "./scada";
-import { reportStore, ReportStoreModel} from "./report.store";
-import { recipeStore, RecipeStoreModel} from "./recipe.store";
-import { usersStore,UsersStoreModel } from "./users.store";
+import { reportStore, ReportStoreModel } from "./report.store";
+import { recipeStore, RecipeStoreModel } from "./recipe.store";
+import { usersStore, UsersStoreModel } from "./users.store";
+import { warmersStore, WarmersStoreModel } from "./warmers.store";
Vue.use(Vuex);
@@ -44,7 +45,7 @@ export interface AppModel {
report: ReportStoreModel;
recipe: RecipeStoreModel;
users: UsersStoreModel;
-
+ warmers: WarmersStoreModel;
}
// Mutations Name
@@ -92,7 +93,8 @@ const _store = {
scada: scadaStore,
report: reportStore,
recipe: recipeStore,
- users: usersStore
+ users: usersStore,
+ warmers: warmersStore,
},
mutations: {
@@ -114,7 +116,7 @@ const _store = {
state.isShowDashboard = !state.isShowDashboard;
},
setShowPreDashboard(state) {
-
+
state.isShowPreDashboard = !state.isShowPreDashboard;
}
},
@@ -136,11 +138,11 @@ const _store = {
FavSoftkeyStop(context) {
context.commit("favSoftkey", false);
},
- ShowDashboard(context){
+ ShowDashboard(context) {
context.commit("setShowDashboard");
},
- ShowPreDashboard(context){
-
+ ShowPreDashboard(context) {
+
context.commit("setShowPreDashboard");
},
SetCurrentUser(context, userinfo) {
diff --git a/Thermo.Active/wwwroot/src/store/index.ts b/Thermo.Active/wwwroot/src/store/index.ts
index 6860fe59..ae0074e5 100644
--- a/Thermo.Active/wwwroot/src/store/index.ts
+++ b/Thermo.Active/wwwroot/src/store/index.ts
@@ -6,28 +6,30 @@ import { AlarmsModel, alarmsModelActions, alarmsStore, AlarmModel } from "./alar
import { processModelActions, processStore, RunningProcessModel } from "./runningProcess.store";
import { LocalizationModel, languageModel, localizationModelActions } from "./localization.store";
import { jobEditorStoreActions } from "./jobEditor.store";
-import { UsersStoreModel,UsersActions } from "./users.store";
+import { UsersStoreModel, UsersActions } from "./users.store";
+import { WarmersStoreModel, warmersActions } from "./warmers.store";
export {
- store,
- AppModel,
- appModelActions,
- machineInfoActions,
- MachineInfoModel,
- machineStatusActions,
- paddleActions,
- PaddleModel,
- MachineStatusModel,
- AlarmsModel,
- alarmsModelActions,
- processModelActions,
- RunningProcessModel,
- LocalizationModel,
- languageModel,
- localizationModelActions,
- AlarmModel,
- buttonStatus,
- jobEditorStoreActions,
- UsersActions,
- UsersStoreModel
+ store,
+ AppModel,
+ appModelActions,
+ machineInfoActions,
+ MachineInfoModel,
+ machineStatusActions,
+ paddleActions,
+ PaddleModel,
+ MachineStatusModel,
+ AlarmsModel,
+ alarmsModelActions,
+ processModelActions,
+ RunningProcessModel,
+ LocalizationModel,
+ languageModel,
+ localizationModelActions,
+ AlarmModel,
+ buttonStatus,
+ jobEditorStoreActions,
+ UsersActions,
+ UsersStoreModel,
+ WarmersStoreModel, warmersActions
}
diff --git a/Thermo.Active/wwwroot/src/store/warmers.store.ts b/Thermo.Active/wwwroot/src/store/warmers.store.ts
new file mode 100644
index 00000000..f464ec52
--- /dev/null
+++ b/Thermo.Active/wwwroot/src/store/warmers.store.ts
@@ -0,0 +1,62 @@
+export interface WarmersStoreModel {
+ channels: Warmers.IChannel[];
+ resistances: Warmers.IResistance[];
+}
+
+
+export interface WarmersActions {
+ setChannels(context, model: { [id: number]: Warmers.IChannel });
+ setResistances(context, model: { [id: number]: Warmers.IResistance });
+}
+
+export interface WarmersGetters {
+ getChannels: () => Warmers.IChannel[];
+ getResistances: () => Warmers.IResistance[];
+}
+
+export const warmersStore = {
+
+ state: {
+ channels: [],
+ resistances: [],
+ } as WarmersStoreModel,
+
+ getters: {
+ getChannels: (state) => (): Warmers.IChannel[] => (state as WarmersStoreModel).channels,
+ getResistances: (state) => (): Warmers.IResistance[] => (state as WarmersStoreModel).resistances,
+ },
+
+ mutations: {
+
+ SetChannels(state, model: { [id: number]: Warmers.IChannel }) {
+ for (const key in model) {
+ if (model.hasOwnProperty(key)) {
+ const element = model[key];
+ state.channels.push(element);
+ }
+ }
+ },
+
+ SetResistances(state, model: { [id: number]: Warmers.IResistance }) {
+ for (const key in model) {
+ if (model.hasOwnProperty(key)) {
+ const element = model[key];
+ state.resistances.push(element);
+ }
+ }
+ },
+
+ },
+ actions: {
+ setChannels(context, model: { [id: number]: Warmers.IChannel }) {
+ context.commit("SetChannels", model);
+ },
+ setResistances(context, model: { [id: number]: Warmers.IResistance }) {
+ context.commit("SetResistances", model);
+ },
+
+ } as WarmersActions
+
+}
+
+export const warmersActions = warmersStore.actions as WarmersActions;
\ No newline at end of file
diff --git a/Thermo.Active/wwwroot/webpack.config.js b/Thermo.Active/wwwroot/webpack.config.js
index f2c99b9b..bde3fe95 100644
--- a/Thermo.Active/wwwroot/webpack.config.js
+++ b/Thermo.Active/wwwroot/webpack.config.js
@@ -97,7 +97,11 @@ module.exports = {
name: "[name].[ext]"
}
}
- }
+ },
+ {
+ test: /\.css$/i,
+ use: ['style-loader', 'css-loader'],
+ },
]
},