Compare commits

...

28 Commits

Author SHA1 Message Date
Samuele Locatelli a6df5719f0 Merge remote-tracking branch 'origin/develop' into feature/prodMgmt 2020-09-08 09:49:07 +02:00
Samuele Locatelli d23f6fd4c5 new rel 2020-09-08 09:48:58 +02:00
= 91a554d616 utilities 2020-09-08 09:43:12 +02:00
= e96d97890f cancel della ricetta 2020-09-08 09:37:52 +02:00
= 42186c9509 fix remainging time negativo 2020-09-08 09:19:51 +02:00
= b0391855f5 fix numeric 2020-09-08 08:54:52 +02:00
= 305e2220f8 valueact 2020-09-08 08:48:31 +02:00
= a5d2323dea fix combo status 2020-09-08 08:41:17 +02:00
= 95db7bbdd9 Merge remote-tracking branch 'CMS/develop' into develop 2020-09-08 08:35:44 +02:00
= 345918cdaf valueAct 2020-09-08 08:35:19 +02:00
Samuele Locatelli 8bc9fc97c8 new rel 2020-09-07 13:55:09 +02:00
Samuele Locatelli cd5ea6c6cc Merge remote-tracking branch 'origin/develop' into feature/prodMgmt 2020-09-07 13:53:07 +02:00
= fb91158ee6 fix gant print & slider. 2020-09-07 12:52:53 +02:00
= 7b724b070f slider 2020-09-07 11:16:11 +02:00
= 7bb8602595 Merge remote-tracking branch 'CMS/develop' into develop 2020-09-07 10:32:55 +02:00
Samuele Locatelli 02b1b3b4c6 Merge branch 'feature/prodMgmt' into develop 2020-09-04 19:25:10 +02:00
Samuele Locatelli f499cdc203 new rel intermedia 71 2020-09-04 19:24:32 +02:00
Samuele Locatelli fa9db02e0e Aggiornamento gestione moduli x avere categorie + sub 2020-09-04 19:24:18 +02:00
Samuele Locatelli 136f3c40ff Update xml e validatore modBlock 2020-09-04 19:23:57 +02:00
= 0e02b0ca3f fixes 2020-09-04 17:14:15 +02:00
= 913834a34d Merge remote-tracking branch 'CMS/develop' into develop 2020-09-04 15:14:54 +02:00
= 6b0d5e2c03 fix generali e gestione produzione 2020-09-04 15:14:32 +02:00
Samuele Locatelli 3ead2b7283 Merge branch 'feature/prodMgmt' into develop 2020-09-04 11:52:21 +02:00
Samuele Locatelli 66ba44868e Update x nuova gest codici errore in core library 2020-09-04 11:46:30 +02:00
= 9be02d4666 dashboard & toggle.. 2020-09-02 17:52:54 +02:00
= 2f2fc02730 clock & dashboard 2020-09-02 15:44:10 +02:00
= cccd8f2c36 gantt printing 2020-09-02 15:15:41 +02:00
= 71a1333c12 gantt print 2020-09-01 16:52:24 +02:00
44 changed files with 420 additions and 104 deletions
@@ -71,6 +71,9 @@
<idParam>80</idParam>
<showDelay>true</showDelay>
<priority>3</priority>
<category>Pyrometer</category>
<subCategory_1>Pyrometer</subCategory_1>
<subCategory_2></subCategory_2>
</block>
<block>
<id>9</id>
@@ -116,6 +119,9 @@
<idParam>99</idParam>
<showDelay>true</showDelay>
<priority>2</priority>
<category>Drawing</category>
<subCategory_1></subCategory_1>
<subCategory_2></subCategory_2>
</block>
<block>
<id>14</id>
@@ -152,6 +158,9 @@
<idParam>139</idParam>
<showDelay>true</showDelay>
<priority>4</priority>
<category>Cooling</category>
<subCategory_1>Pyrometer</subCategory_1>
<subCategory_2></subCategory_2>
</block>
<block>
<id>19</id>
@@ -16,6 +16,9 @@
<xs:element name="priority" type="xs:int" />
<xs:element name="scaleFactor" type="xs:int" minOccurs="0" />
<xs:element name="numDec" type="xs:int" minOccurs="0" />
<xs:element name="category" type="param_type" minOccurs="0" />
<xs:element name="subCategory_1" type="xs:string" minOccurs="0" />
<xs:element name="subCategory_2" type="xs:string" minOccurs="0" />
</xs:all>
</xs:complexType>
</xs:element>
@@ -23,6 +26,23 @@
</xs:complexType>
</xs:element>
<!-- Head Type -->
<xs:simpleType name="param_type" final="restriction">
<xs:restriction base="xs:string">
<xs:enumeration value="General" />
<xs:enumeration value="Positions" />
<xs:enumeration value="Cycle"/>
<xs:enumeration value="Heats"/>
<xs:enumeration value="Pyrometer"/>
<xs:enumeration value="Drawing"/>
<xs:enumeration value="UpperPlate"/>
<xs:enumeration value="Cooling"/>
<xs:enumeration value="Vacuum"/>
<xs:enumeration value="Extraction"/>
<xs:enumeration value="Options"/>
</xs:restriction>
</xs:simpleType>
<!-- Language Type -->
<xs:complexType name="langType">
<xs:simpleContent>
@@ -654,7 +654,10 @@ namespace Thermo.Active.Config
Priority = Convert.ToInt16(x.Element("priority").Value),
// attributi presi da default se NON presenti...
ScaleFactor = x.Element("scaleFactor") != null ? Convert.ToInt16(x.Element("scaleFactor").Value) : 1000,
NumDec = x.Element("numDec") != null ? Convert.ToInt16(x.Element("numDec").Value) : 1
NumDec = x.Element("numDec") != null ? Convert.ToInt16(x.Element("numDec").Value) : 1,
Category = x.Element("category") != null ? x.Element("category").Value : "",
SubCategory_1 = x.Element("subCategory_1") != null ? x.Element("subCategory_1").Value : "",
SubCategory_2 = x.Element("subCategory_2") != null ? x.Element("subCategory_2").Value : ""
})
.ToList();
}
@@ -14,5 +14,8 @@ namespace Thermo.Active.Model.ConfigModels
public int Priority { get; set; }
public int ScaleFactor { get; set; } = 1000;
public int NumDec { get; set; } = 1;
public string Category { get; set; }
public string SubCategory_1 { get; set; }
public string SubCategory_2 { get; set; }
}
}
@@ -24,6 +24,9 @@ namespace Thermo.Active.Model.DTOModels.ThModules
public bool Running { get; set; } = false;
public bool HasError { get; set; } = false;
public bool Terminated { get; set; } = false;
public string Category { get; set; } = "";
public string SubCategory_1 { get; set; } = "";
public string SubCategory_2 { get; set; } = "";
public override bool Equals(object obj)
@@ -67,6 +70,12 @@ namespace Thermo.Active.Model.DTOModels.ThModules
return false;
if (Terminated != item.Terminated)
return false;
if (Category != item.Category)
return false;
if (SubCategory_1 != item.SubCategory_1)
return false;
if (SubCategory_2 != item.SubCategory_2)
return false;
return true;
}
+4 -1
View File
@@ -2489,7 +2489,10 @@ namespace Thermo.Active.NC
Visible = currModule.Visible,
Running = currModule.Running,
HasError = currModule.HasError,
Terminated = currModule.Terminated
Terminated = currModule.Terminated,
Category = item.Category,
SubCategory_1 = item.SubCategory_1,
SubCategory_2 = item.SubCategory_2
};
currModules.Add(item.Id, currVal);
}
+1 -1
View File
@@ -30,4 +30,4 @@ using System.Runtime.InteropServices;
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("0.12.69")]
[assembly: AssemblyVersion("0.12.73")]
@@ -256,11 +256,11 @@
align-items: center;
display: flex;
border-radius: 7px;
&.fa-check-circle {
color: #90BF3D;
}
&.fa-check-circle.undone-step {
color: #1791FF;
}
@@ -474,6 +474,8 @@ article {
padding-bottom: 10px;
padding-top: 5px;
border: 2px solid #979797;
box-sizing: border-box;
align-items: center;
}
.submit {
@@ -385,6 +385,8 @@ article .box .body {
padding-bottom: 10px;
padding-top: 5px;
border: 2px solid #979797;
box-sizing: border-box;
align-items: center;
}
.box .submit {
margin: auto;
@@ -2,7 +2,7 @@
"env": "development",
"api": {
"enabled": true,
"apiServerUrl": "http://localhost:9000/"
"apiServerUrl": "http://seriate.steamware.net:9000/"
},
"allUIVisible": true
}
+2 -1
View File
@@ -13,13 +13,14 @@
<script src="Scripts/jquery.mousewheel.js"></script>
<script src="Scripts/jquery.signalR-2.2.2.min.js"></script>
<script src="Scripts/raphael-2.1.4.min.js"></script>
<script src="http://localhost:9000/signalr/hubs" async></script>
<script src="http://seriate.steamware.net:9000/signalr/hubs" async></script>
<link href="assets/styles/style.css" rel="stylesheet" />
</head>
<body>
<app>
<img src="/assets/icons/png/bg.png" style="display:hidden">
<div id="loading-spinner"><i class="fa fa-circle-o-notch fa-spin"></i></div>
</app>
<script src="/dist/vendors~main.js" type="text/javascript"></script>
+6
View File
@@ -64,6 +64,12 @@ export default class app extends Vue {
mounted() {
let ms = messageService;
window.oncontextmenu = function (event) {
event.preventDefault();
event.stopPropagation();
return false;
};
// if cms is connected
if (typeof cmsClient != "undefined")
this.HMIsrc = cmsClient.getScreenBase64();
@@ -23,7 +23,7 @@
justify-content: center;
height: 100%;
font-family: "Work Sans";
font-size: 47px;
font-size: 40px;
font-weight: 500;
line-height: 1.01;
padding-right: 1rem;
@@ -1,6 +1,10 @@
<template>
<div class="combo">
<div class="form" @click="showList" :class="{'error': value.status && value.status.hasError}">
<div
class="form"
@click="showList"
:class="{'error': value && value.status && value.status.hasError}"
>
{{currentValue}}
<i v-if="opened" class="fa fa-chevron-up" />
<i v-else class="fa fa-chevron-down" />
@@ -18,29 +18,39 @@ export default class Keyboard extends Vue {
@Prop()
value: string;
get Value() {
return this.actualValue.setpointHMI;
}
set Value(v: number) {
let scale = Math.pow(10, this.actualValue.numDec);
this.actualValue.setpointHMI = Math.round(v * scale) / scale;
}
del() {
this.actualValue.setpointHMI = 0;
this.Value = 0;
}
canc() {
let temp = String(this.actualValue.setpointHMI);
this.actualValue.setpointHMI = Number(temp.slice(0, -1))
let temp = String(this.Value);
this.Value = Number(temp.slice(0, -1))
}
add(num: string) {
if (this.point) {
this.point += num;
this.actualValue.setpointHMI = Number(this.point)
this.Value = Number(this.point)
} else {
let temp = String(this.actualValue.setpointHMI);
let temp = String(this.Value);
temp += num;
this.actualValue.setpointHMI = Number(temp)
this.Value = Number(temp)
}
}
addpoint() {
if (!this.point) {
this.point = String(this.actualValue.setpointHMI);
this.point = String(this.Value);
this.point += ".";
}
}
@@ -29,6 +29,15 @@ export default class Numeric extends Vue {
focused: boolean = false;
get Value() {
return this.value.setpointHMI;
}
set Value(v: number) {
let scale = Math.pow(10, this.value.numDec);
this.value.setpointHMI = Math.round(v * scale) / scale;
}
onFocus() {
if (this.value && this.value.status && !this.value.status.enabled) return;
let rect = this.$el.getBoundingClientRect();
@@ -6,7 +6,7 @@
<input
type="number"
ref="input"
v-model.number="value.setpointHMI"
v-model.number="Value"
@focus="onFocus"
@blur="onBlur"
:id="id"
@@ -4,6 +4,7 @@ import { Prop } from 'vue-property-decorator';
import { Hub } from "@/services";
import Numeric from "./numeric";
import { unitOfTime } from "moment";
@Component({ name: "slider" })
export default class Slider extends Vue {
@@ -33,19 +34,24 @@ export default class Slider extends Vue {
this.value.setpointHMI = v;
}
get step() {
// var s = ((this.value.range.max - this.value.range.min) / (this.lines + 1));
// var m = Math.pow(10, this.decimal);
// return Math.round(s * m) / m
return 1;
};
@Prop({ default: .7 })
incrementingStep: number;
step: number = 1;
// get step() {
// var s = ((this.value.range.max - this.value.range.min) / (this.lines + 1));
// var m = Math.pow(10, this.decimal);
// return Math.round(s * m) / m
// return 1;
// };
startIncrement() {
if (!this.value.status.enabled) return;
this.incrementing = setInterval(() => {
var v = this.value.setpointHMI;
if (v < this.value.range.max) {
v += this.step;
v += Math.floor(this.step);
this.step += this.incrementingStep;
}
if (v > this.value.range.max) {
v = this.value.range.max;
@@ -59,7 +65,8 @@ export default class Slider extends Vue {
this.incrementing = setInterval(() => {
var v = this.value.setpointHMI;
if (v > this.value.range.min) {
v -= this.step;
v -= Math.floor(this.step);
this.step += this.incrementingStep;
}
if (v < this.value.range.min) {
v = this.value.range.min;
@@ -74,7 +81,7 @@ export default class Slider extends Vue {
clearInterval(this.incrementing);
this.incrementing = 0;
this.step = 1;
};
@@ -1,7 +1,13 @@
<template>
<div class="slider-container">
<div class="slider">
<button @mousedown="startDecrement()" @mouseup="confirm()" @mouseout="confirm()">
<button
@mousedown="startDecrement()"
v-on:touchstart="startDecrement()"
v-on:touchend="confirm()"
@mouseup="confirm()"
@mouseout="confirm()"
>
<img src="assets/icons/png/min.png" />
</button>
<div class="control">
@@ -21,7 +27,13 @@
<small>{{`${this.value.range.max} ${this.value.unitMeasure}`}}</small>
</div>
</div>
<button @mousedown="startIncrement()" @mouseup="confirm()" @mouseout="confirm()">
<button
@mousedown="startIncrement()"
v-on:touchstart="startIncrement()"
v-on:touchend="confirm()"
@mouseup="confirm()"
@mouseout="confirm()"
>
<img src="assets/icons/png/max.png" />
</button>
</div>
@@ -40,5 +52,13 @@
justify-items: center;
width: 100%;
}
input[type="range"] {
pointer-events: none;
}
input[type="range"]::-webkit-slider-thumb {
pointer-events: auto;
}
</style>
<script lang="ts" src="./slider.ts"></script>
@@ -12,6 +12,7 @@ import { prodService } from '@/services/prodService';
import moment from 'moment';
import stats from "./base-components/stats.vue";
import hitem from "./base-components/item.vue";
import { Hub } from '@/services';
@Component({
components: {
@@ -54,7 +55,7 @@ export default class Dashboard extends Vue {
}
get remainingTime() {
return this.endEstimation.diff(this.now);
return Math.max(this.endEstimation.diff(this.now), 0);
}
get currentUser() {
@@ -95,7 +96,6 @@ export default class Dashboard extends Vue {
}
public get ribbonStatus(): ribbonStatusEnum {
// Controllo se ci sono allarmi
let s = this.$store.state as AppModel;
@@ -103,7 +103,6 @@ export default class Dashboard extends Vue {
if (s.alarms.warnings.length > 0) return ribbonStatusEnum.Warning;
if (s.process.running) return ribbonStatusEnum.Working;
return ribbonStatusEnum.Idle;
}
public get alarmTitle() {
@@ -120,7 +119,6 @@ export default class Dashboard extends Vue {
default:
return "";
}
}
public get alarmCount() {
@@ -148,6 +146,10 @@ export default class Dashboard extends Vue {
}
}
sendSoftKey(id: number) {
Hub.Current.sendUserSoftKey(id);
}
public sendMessage(name: string) {
messageService.publishToChannel(name);
}
@@ -99,7 +99,12 @@
</div>
<div class="end">
<small>{{'dashboard-timing-end' | localize('fine')}}</small>
<time v-if="panel.stimaDurata">~{{endEstimation | date('HH:mm')}}</time>
<time v-if="panel.stimaDurata">
<span>~{{endEstimation | date('HH:mm')}}</span>
<small
style="text-transform:lowercase"
>+{{Math.floor(remainingTime /1000 / 3600 /24)}} {{'remainging__days' | localize("gg")}}</small>
</time>
<time v-else>--:--</time>
</div>
</div>
@@ -107,14 +112,14 @@
<div class="setpoint">
<img src="assets/icons/png/inv.png" />
<label>{{panel.tempAct}}°C</label>
<button>
<button @click="sendSoftKey(37)">
<i class="fa fa-minus"></i>
</button>
<div>
<small>{{'dashboard-setpoint' | localize('set point')}}</small>
<span>{{panel.tempSetpoint}}°C</span>
</div>
<button>
<button @click="sendSoftKey(36)">
<i class="fa fa-plus"></i>
</button>
</div>
@@ -124,7 +129,9 @@
<gauge></gauge>
<div class="remaining_time">
<small>{{'dashboard-remaining-time' | localize('tempo rimanente')}}</small>
<time v-if="panel.stimaDurata">{{remainingTime | date('HH:mm:ss')}}</time>
<time
v-if="panel.stimaDurata"
>{{Math.floor(remainingTime /1000 / 3600)}}:{{remainingTime | date('mm:ss')}}</time>
<time v-else>--:--:--</time>
</div>
</div>
@@ -4,6 +4,19 @@ import { Prop, InjectReactive } from 'vue-property-decorator';
import { IGanttOptions } from './gantt';
import { store } from '@/store';
import { RecipeGetters } from '@/store/recipe.store';
import { ModalHelper } from '@/components/modals';
import ShowRiscaldamentoInfo from "@/app_modules_thermo/setup/riscaldi/components/show-riscaldi-info.vue";
import ShowFormatoInfo from "@/app_modules_thermo/setup/formato/components/show-formato-info.vue";
import ShowPirometroInfo from "@/app_modules_thermo/setup/pirometro/components/show-pirometro-info.vue";
import ShowCicloInfo from "@/app_modules_thermo/setup/ciclo/components/show-ciclo-info.vue";
import ShowRaffreddamentoInfo from "@/app_modules_thermo/setup/raffreddamento/components/show-raffreddamento-info.vue";
import ShowControstampoInfo from "@/app_modules_thermo/setup/controstampo_setup/components/show-controstampo-info.vue";
import ShowQuoteVelocitaInfo from "@/app_modules_thermo/setup/quote-velocita/components/show-quote-velocita-info.vue";
import ShowEstrazioneInfo from "@/app_modules_thermo/setup/estrazione/components/show-estrazione-info.vue";
import ShowVuotoInfo from "@/app_modules_thermo/setup/vuoto/show-vuoto-info.vue";
import ShowImbutituraInfo from "@/app_modules_thermo/setup/imbutitura/show-imbutitura-info.vue";
import ShowOpzioniInfo from "@/app_modules_thermo/setup/opzioni/show-opzioni-info.vue";
@Component({})
export default class GanttComponent extends Vue {
@@ -71,6 +84,47 @@ export default class GanttComponent extends Vue {
return this.showStatus ? this.ganttOptions.block_status_minDuration : 0;
}
openModal() {
switch (this.blockType) {
case "movement": this.showModalAtStep(2); break;
case "heating": this.showModalAtStep(3); break;
case "drawing": this.showModalAtStep(5); break;
case "vacuum": this.showModalAtStep(8); break;
case "cooling": this.showModalAtStep(7); break;
case "extraction": this.showModalAtStep(9); break;
}
}
async showModalAtStep(step: number) {
try {
let next = await this.showModalStep(step);
if (next == null) return;
this.showModalAtStep(step + next);
} catch {
}
}
showModalStep(step: number): Promise<number> {
switch (step) {
case 0: return ModalHelper.ShowModalAsync(ShowFormatoInfo);
case 1: return ModalHelper.ShowModalAsync(ShowQuoteVelocitaInfo);
case 2: return ModalHelper.ShowModalAsync(ShowCicloInfo);
case 3: return ModalHelper.ShowModalAsync(ShowRiscaldamentoInfo);
case 4: return ModalHelper.ShowModalAsync(ShowPirometroInfo);
case 5: return ModalHelper.ShowModalAsync(ShowImbutituraInfo);
case 6: return ModalHelper.ShowModalAsync(ShowControstampoInfo);
case 7: return ModalHelper.ShowModalAsync(ShowRaffreddamentoInfo);
case 8: return ModalHelper.ShowModalAsync(ShowVuotoInfo);
case 9: return ModalHelper.ShowModalAsync(ShowEstrazioneInfo);
case 10: return ModalHelper.ShowModalAsync(ShowOpzioniInfo);
// case 11: return ModalHelper.ShowModalAsync(AvvioProduzione);
}
return null;
}
// mounted() {
// this.value.showDelay = true;
// }
@@ -36,7 +36,7 @@
x="0"
y="0"
>
<div class="body-header">{{value.label | localize(value.label)}}</div>
<div class="body-header" @click="openModal()">{{value.label | localize(value.label)}}</div>
</foreignObject>
<foreignObject
:width="(duration - (showStatus && recipeValue?statusDuration:0)) * ganttOptions.secondSize"
@@ -5,6 +5,22 @@ import ganttHeader from "./gantt-header.vue";
import ganttRow from "./gantt-row.vue"
import timeLine from "./timeline.vue";
var ContainerElements = ["svg", "g", "foreignobject"];
var RelevantStyles = {
"rect": ["fill", "stroke", "stroke-width"],
"path": ["fill", "stroke", "stroke-width"],
"circle": ["fill", "stroke", "stroke-width"],
"line": ["stroke", "stroke-width"],
"text": ["fill", "font-size", "text-anchor"],
"polygon": ["stroke", "fill"],
"foreignobject": [],
"div": [
"align-items", "justify-content", "font-family", "flex-flow", "font-size",
"height", "padding", "color", "display", "width", "border-radius",
"background-color", "transform"],
"span": ["letter-spacing", "text-transform", "background-color"]
};
@Component({
components: {
ganttHeader, ganttRow, timeLine
@@ -18,12 +34,61 @@ export default class Gantt extends Vue {
padX: number = 0;
padY: number = 0;
public print() {
this.ganttOptions.printing = true;
this.$nextTick(() => {
var oDOM = (this.$refs.mainContainer as SVGElement).cloneNode(true)
this.exportSVGWithStyle(oDOM, this.$refs.mainContainer)
var data = new XMLSerializer().serializeToString(oDOM);
var DOMURL = (window.URL || window.webkitURL);
var svgBlob = new Blob([data], { type: 'image/svg+xml;charset=utf-8' });
var url = DOMURL.createObjectURL(svgBlob);
this.ganttOptions.printing = false;
window.open(url, '_blank')
});
}
exportSVGWithStyle(ParentNode, OrigData) {
var Children = ParentNode.childNodes;
var OrigChildDat = OrigData.childNodes;
for (var cd = 0; cd < Children.length; cd++) {
var Child = Children[cd];
var TagName = (Child.tagName as string)?.toLowerCase();
if (ContainerElements.indexOf(TagName) != -1) {
this.exportSVGWithStyle(Child, OrigChildDat[cd])
} else if (TagName in RelevantStyles) {
var StyleDef = window.getComputedStyle(OrigChildDat[cd]);
var StyleString = "";
for (var st = 0; st < RelevantStyles[TagName].length; st++) {
StyleString += RelevantStyles[TagName][st] + ":" + StyleDef.getPropertyValue(RelevantStyles[TagName][st]) + "; ";
}
Child.setAttribute("style", StyleString);
}
}
}
get PadX() {
let w = ((this.$refs.mainContainer as any)?.clientWidth ?? 0) / 3;
if (this.follow && w && this.currentTime * this.ganttOptions.secondSize > w)
return -(this.currentTime * this.ganttOptions.secondSize - w);
return this.padX;
}
set PadX(value: number) {
if (!this.follow)
this.padX = value;
@@ -69,7 +134,8 @@ export default class Gantt extends Vue {
block_body_Vacuum_minDuration: 5,
block_body_Cooling_minDuration: 10,
block_body_Extraction_minDuration: 5,
block_padding: 0.01
block_padding: 0.01,
printing: false
};
@Prop({ default: 0 })
@@ -179,4 +245,5 @@ export interface IGanttOptions {
block_body_Cooling_minDuration: number;
block_body_Extraction_minDuration: number;
block_padding: number;
printing: boolean;
}
@@ -55,7 +55,7 @@
</g>
<gantt-header :padding-horizontal="PadX " :zoom-factor="zoomFactor" />
<time-line
v-if="!!getRowHeight($refs.section1) && !!getRowHeight($refs.section2)"
v-if="!!getRowHeight($refs.section1) && !!getRowHeight($refs.section2) && !ganttOptions.printing"
:padding-horizontal="PadX"
:zoom-factor="zoomFactor"
:speed="1"
@@ -19,7 +19,9 @@
@checkChanged="softKeyChanged(b.id, b.operatorConfirmationNeeded)"
></soft-key>
</template>
<label><span v-if="tot">{{actual}}/{{tot}}</span></label>
<label>
<span v-if="tot">{{actual}}/{{tot}}</span>
</label>
</div>
<gantt
ref="gantt"
@@ -40,6 +42,7 @@
class="realign"
v-if="$refs.gantt"
@click="$refs.gantt.toggleFollow()"
@dblclick="$refs.gantt.print()"
:class="{active: $refs.gantt.follow}"
>
<img src="/assets/icons/png/recenter-time.png" />
@@ -3,7 +3,7 @@ import { Modal, ModalHelper } from "@/components/modals";
import { Factory, messageService, awaiter } from "@/_base";
import Component from "vue-class-component";
import { Prop } from 'vue-property-decorator';
import { appModelActions } from "@/store/app.store";
import { appModelActions, store } from "@/store/app.store";
import { prodService } from "@/services/prodService";
@Component({
@@ -13,7 +13,7 @@ import { prodService } from "@/services/prodService";
})
export default class AvvioProduzione extends Vue {
enabling: boolean = true;
newjob: boolean = true;
pieces: Recipe.IValue = {
setpointHMI: 0,
@@ -25,13 +25,27 @@ export default class AvvioProduzione extends Vue {
}
} as Recipe.IValue;
warmuppieces: Recipe.IValue = {
setpointHMI: 0,
range: { min: 0, max: 999999 },
status: {
enabled: true,
hasError: false,
visible: true
}
} as Recipe.IValue;
annulla() {
ModalHelper.HideModal();
};
get prod() { return store.state.prod.panel }
showDashboard() {
prodService.Start(this.pieces.setpointHMI);
prodService.Start(this.pieces.setpointHMI, this.newjob, this.warmuppieces.setpointHMI);
ModalHelper.HideModal();
appModelActions.ShowDashboard(this.$store);
@@ -53,4 +67,8 @@ export default class AvvioProduzione extends Vue {
ModalHelper.HideModal();
}
mounted() {
this.pieces.setpointHMI = this.prod.numTarget;
}
}
@@ -11,13 +11,36 @@
</div>
<section>
<article>
<div class="input-area mb-10">
<label>{{'enabling'|localize('Settaggio numero pezzi')}}</label>
<toggle-button v-model="enabling"></toggle-button>
<div class="input-area mb-10" style="margin:auto">
<label>{{'new'|localize('Nuova produzione')}}</label>
<toggle-button v-model="newjob"></toggle-button>
</div>
<div class="input-area" v-if="enabling">
<label>{{'mock_pieces'|localize('Numero pezzi')}}</label>
<numeric v-model="pieces" :keyboardPosition="'bottom'" />
<div class="box mt-10">
<div class="header">
<label>{{'warmup_cycles' | localize("Preriscaldo")}}</label>
</div>
<div class="body">
<div class="input-area mb-10">
<label>{{'warmup_cycles_pieces'|localize('Cicli preriscaldo')}}</label>
<numeric v-model="warmuppieces" :keyboardPosition="'bottom'" />
</div>
</div>
</div>
<div class="box mt-10">
<div class="header">
<label>{{'production_management' | localize("Gestione produzione")}}</label>
</div>
<article class="body">
<div class="input-area mb-10">
<label>{{'production_enabling'|localize('Modifica numero pezzi')}}</label>
<toggle-button v-model="pieces.status.enabled"></toggle-button>
</div>
<div class="input-area mb-10">
<label style="flex:1;">{{'mock_pieces'|localize('Numero pezzi')}}</label>
<label>{{prod.numDone}}/</label>
<numeric v-model="pieces" :keyboardPosition="'bottom'" />
</div>
</article>
</div>
</article>
</section>
@@ -15,7 +15,7 @@ import ShowEstrazioneInfo from "@/app_modules_thermo/setup/estrazione/components
import ShowVuotoInfo from "@/app_modules_thermo/setup/vuoto/show-vuoto-info.vue";
import ShowImbutituraInfo from "@/app_modules_thermo/setup/imbutitura/show-imbutitura-info.vue";
import ShowOpzioniInfo from "@/app_modules_thermo/setup/opzioni/show-opzioni-info.vue";
import AvvioProduzione from "@/app_modules_thermo/setup/avvio-produzione/avvio-produzione.vue";
// import AvvioProduzione from "@/app_modules_thermo/setup/avvio-produzione/avvio-produzione.vue";
import { store } from '@/store';
@@ -54,7 +54,7 @@ export default class Setup extends Vue {
case 8: return ModalHelper.ShowModalAsync(ShowVuotoInfo);
case 9: return ModalHelper.ShowModalAsync(ShowEstrazioneInfo);
case 10: return ModalHelper.ShowModalAsync(ShowOpzioniInfo);
case 11: return ModalHelper.ShowModalAsync(AvvioProduzione);
// case 11: return ModalHelper.ShowModalAsync(AvvioProduzione);
}
return null;
@@ -79,9 +79,9 @@
:status="overview.options"
></setup-button>
<div class="setup-play" @click="showModalAtStep(11);">
<!-- <div class="setup-play" @click="showModalAtStep(11);">
<img class="dim" src="assets/icons/svg/setup-play.svg" />
</div>
</div>-->
</div>
</modal>
</div>
@@ -4,7 +4,7 @@
<div class="borded_label" id="quota1" v-focus-on:general_sizes_upperplate_max_height>
<div>
<img src="assets/icons/png/quota.png" />
<span>{{recipe.general_sizes_upperplate_max_height.setpointHMI}}</span>
<span>{{recipe.general_sizes_upperplate_max_height.valueAct}}</span>
<small>{{recipe.general_sizes_upperplate_max_height.unitMeasure}}</small>
</div>
</div>
@@ -4,14 +4,14 @@
<div class="borded_label" id="quota1" v-focus-on:general_sizes_frame_dim_y>
<div>
<img src="assets/icons/png/quota.png" />
<span>{{recipe.general_sizes_frame_dim_y.setpointHMI}}</span>
<span>{{recipe.general_sizes_frame_dim_y.valueAct}}</span>
<small>{{recipe.general_sizes_frame_dim_y.unitMeasure}}</small>
</div>
</div>
<div class="borded_label" id="quota2" v-focus-on:general_sizes_frame_dim_x>
<div>
<img src="assets/icons/png/quota.png" />
<span>{{recipe.general_sizes_frame_dim_x.setpointHMI}}</span>
<span>{{recipe.general_sizes_frame_dim_x.valueAct}}</span>
<small>{{recipe.general_sizes_frame_dim_x.unitMeasure}}</small>
</div>
</div>
@@ -4,21 +4,21 @@
<div class="borded_label" id="quota1" v-focus-on:general_sizes_sheet_dim_x>
<div>
<img src="assets/icons/png/quota.png" />
<span>{{recipe.general_sizes_sheet_dim_x.setpointHMI}}</span>
<span>{{recipe.general_sizes_sheet_dim_x.valueAct}}</span>
<small>{{recipe.general_sizes_sheet_dim_x.unitMeasure}}</small>
</div>
</div>
<div class="borded_label" id="quota2" v-focus-on:general_sizes_sheet_dim_y>
<div>
<img src="assets/icons/png/quota.png" />
<span>{{recipe.general_sizes_sheet_dim_y.setpointHMI}}</span>
<span>{{recipe.general_sizes_sheet_dim_y.valueAct}}</span>
<small>{{recipe.general_sizes_sheet_dim_y.unitMeasure}}</small>
</div>
</div>
<div class="borded_label" id="quota3" v-focus-on:general_sizes_sheet_thickness>
<div>
<img src="assets/icons/png/quota.png" />
<span>{{recipe.general_sizes_sheet_thickness.setpointHMI}}</span>
<span>{{recipe.general_sizes_sheet_thickness.valueAct}}</span>
<small>{{recipe.general_sizes_sheet_thickness.unitMeasure}}</small>
</div>
</div>
@@ -4,14 +4,14 @@
<div class="borded_label" id="quota1" v-focus-on:general_sizes_plate_dim_y>
<div>
<img src="assets/icons/png/quota.png" />
<span>{{recipe.general_sizes_plate_dim_y.setpointHMI}}</span>
<span>{{recipe.general_sizes_plate_dim_y.valueAct}}</span>
<small>{{recipe.general_sizes_plate_dim_y.unitMeasure}}</small>
</div>
</div>
<div class="borded_label" id="quota2" v-focus-on:general_sizes_plate_dim_x>
<div>
<img src="assets/icons/png/quota.png" />
<span>{{recipe.general_sizes_plate_dim_x.setpointHMI}}</span>
<span>{{recipe.general_sizes_plate_dim_x.valueAct}}</span>
<small>{{recipe.general_sizes_plate_dim_x.unitMeasure}}</small>
</div>
</div>
@@ -4,35 +4,35 @@
<div class="borded_label" id="quota1" v-focus-on:general_sizes_mould_dim_x>
<div>
<img src="assets/icons/png/quota.png" />
<span>{{recipe.general_sizes_mould_dim_x.setpointHMI}}</span>
<span>{{recipe.general_sizes_mould_dim_x.valueAct}}</span>
<small>{{recipe.general_sizes_mould_dim_x.unitMeasure}}</small>
</div>
</div>
<div class="borded_label" id="quota2" v-focus-on:general_sizes_mould_dim_y>
<div>
<img src="assets/icons/png/quota.png" />
<span>{{recipe.general_sizes_mould_dim_y.setpointHMI}}</span>
<span>{{recipe.general_sizes_mould_dim_y.valueAct}}</span>
<small>{{recipe.general_sizes_mould_dim_y.unitMeasure}}</small>
</div>
</div>
<div class="borded_label" id="quota3" v-focus-on:general_sizes_mould_max_height>
<div>
<img src="assets/icons/png/quota.png" />
<span>{{recipe.general_sizes_mould_max_height.setpointHMI}}</span>
<span>{{recipe.general_sizes_mould_max_height.valueAct}}</span>
<small>{{recipe.general_sizes_mould_max_height.unitMeasure}}</small>
</div>
</div>
<div class="borded_label" id="quota4" v-focus-on:general_sizes_mould_base_height>
<div>
<img src="assets/icons/png/quota.png" />
<span>{{recipe.general_sizes_mould_base_height.setpointHMI}}</span>
<span>{{recipe.general_sizes_mould_base_height.valueAct}}</span>
<small>{{recipe.general_sizes_mould_base_height.unitMeasure}}</small>
</div>
</div>
<div class="borded_label" id="quota5" v-focus-on:general_sizes_mould_min_height>
<div>
<img src="assets/icons/png/quota.png" />
<span>{{recipe.general_sizes_mould_min_height.setpointHMI}}</span>
<span>{{recipe.general_sizes_mould_min_height.valueAct}}</span>
<small>{{recipe.general_sizes_mould_min_height.unitMeasure}}</small>
</div>
</div>
@@ -4,24 +4,24 @@
<div class="borded_label" id="quota1">
<div v-focus-on:positions_frame_intermediate_position>
<img src="assets/icons/png/salita.png" />
<span>{{recipe.positions_frame_intermediate_position.setpointHMI}}</span>
<span>{{recipe.positions_frame_intermediate_position.valueAct}}</span>
<small>{{recipe.positions_frame_intermediate_position.unitMeasure}}</small>
</div>
<div v-focus-on:positions_frame_intermediate_speed>
<img src="assets/icons/png/bassa.png" />
<span>{{recipe.positions_frame_intermediate_speed.setpointHMI}}</span>
<span>{{recipe.positions_frame_intermediate_speed.valueAct}}</span>
<small>{{recipe.positions_frame_intermediate_speed.unitMeasure}}</small>
</div>
</div>
<div class="borded_label" id="quota5">
<div v-focus-on:positions_frame_lower_position>
<img src="assets/icons/png/discesa.png" />
<span>{{recipe.positions_frame_lower_position.setpointHMI}}</span>
<span>{{recipe.positions_frame_lower_position.valueAct}}</span>
<small>{{recipe.positions_frame_lower_position.unitMeasure}}</small>
</div>
<div v-focus-on:positions_frame_lower_speed>
<img src="assets/icons/png/alta.png" />
<span>{{recipe.positions_frame_lower_speed.setpointHMI}}</span>
<span>{{recipe.positions_frame_lower_speed.valueAct}}</span>
<small>{{recipe.positions_frame_lower_speed.unitMeasure}}</small>
</div>
</div>
@@ -4,7 +4,7 @@
<div class="borded_label" id="quota1" v-focus-on:positions_mould_intermediate_position>
<div>
<img src="assets/icons/png/quota.png" />
<span>{{recipe.positions_mould_intermediate_position.setpointHMI}}</span>
<span>{{recipe.positions_mould_intermediate_position.valueAct}}</span>
<small>{{recipe.positions_mould_intermediate_position.unitMeasure}}</small>
</div>
</div>
@@ -18,21 +18,21 @@
<div class="borded_label" id="quota3" v-focus-on>
<div>
<img src="assets/icons/png/quota.png" />
<span>{{recipe.general_sizes_mould_min_height.setpointHMI}}</span>
<span>{{recipe.general_sizes_mould_min_height.valueAct}}</span>
<small>{{recipe.general_sizes_mould_min_height.unitMeasure}}</small>
</div>
</div>
<div class="borded_label" id="quota4" v-focus-on>
<div>
<img src="assets/icons/png/quota.png" />
<span>{{recipe.general_sizes_mould_base_height.setpointHMI}}</span>
<span>{{recipe.general_sizes_mould_base_height.valueAct}}</span>
<small>{{recipe.general_sizes_mould_base_height.unitMeasure}}</small>
</div>
</div>
<div class="borded_label" id="quota5" v-focus-on>
<div>
<img src="assets/icons/png/quota.png" />
<span>{{recipe.general_sizes_mould_max_height.setpointHMI}}</span>
<span>{{recipe.general_sizes_mould_max_height.valueAct}}</span>
<small>{{recipe.general_sizes_mould_max_height.unitMeasure}}</small>
</div>
</div>
@@ -40,48 +40,48 @@
<div class="borded_label" id="quota6">
<div v-focus-on:positions_mould_upperdeceleration_position>
<img src="assets/icons/png/salita.png" />
<span>{{recipe.positions_mould_upperdeceleration_position.setpointHMI}}</span>
<span>{{recipe.positions_mould_upperdeceleration_position.valueAct}}</span>
<small>{{recipe.positions_mould_upperdeceleration_position.unitMeasure}}</small>
</div>
<div v-focus-on:positions_mould_upperdeceleration_speed>
<img src="assets/icons/png/bassa.png" />
<span>{{recipe.positions_mould_upperdeceleration_speed.setpointHMI}}</span>
<span>{{recipe.positions_mould_upperdeceleration_speed.valueAct}}</span>
<small>{{recipe.positions_mould_upperdeceleration_speed.unitMeasure}}</small>
</div>
</div>
<div class="borded_label" id="quota7">
<div v-focus-on:positions_mould_upper_position>
<img src="assets/icons/png/salita.png" />
<span>{{recipe.positions_mould_upper_position.setpointHMI}}</span>
<span>{{recipe.positions_mould_upper_position.valueAct}}</span>
<small>{{recipe.positions_mould_upper_position.unitMeasure}}</small>
</div>
<div v-focus-on:positions_mould_upper_speed>
<img src="assets/icons/png/alta.png" />
<span>{{recipe.positions_mould_upper_speed.setpointHMI}}</span>
<span>{{recipe.positions_mould_upper_speed.valueAct}}</span>
<small>{{recipe.positions_mould_upper_speed.unitMeasure}}</small>
</div>
</div>
<div class="borded_label" id="quota8">
<div v-focus-on:positions_mould_lowerdeceleration_position>
<img src="assets/icons/png/discesa.png" />
<span>{{recipe.positions_mould_lowerdeceleration_position.setpointHMI}}</span>
<span>{{recipe.positions_mould_lowerdeceleration_position.valueAct}}</span>
<small>{{recipe.positions_mould_lowerdeceleration_position.unitMeasure}}</small>
</div>
<div v-focus-on:positions_mould_lowerdeceleration_speed>
<img src="assets/icons/png/bassa.png" />
<span>{{recipe.positions_mould_lowerdeceleration_speed.setpointHMI}}</span>
<span>{{recipe.positions_mould_lowerdeceleration_speed.valueAct}}</span>
<small>{{recipe.positions_mould_lowerdeceleration_speed.unitMeasure}}</small>
</div>
</div>
<div class="borded_label" id="quota9">
<div v-focus-on:positions_mould_lower_position>
<img src="assets/icons/png/discesa.png" />
<span>{{recipe.positions_mould_lower_position.setpointHMI}}</span>
<span>{{recipe.positions_mould_lower_position.valueAct}}</span>
<small>{{recipe.positions_mould_lower_position.unitMeasure}}</small>
</div>
<div v-focus-on:positions_mould_lower_speed>
<img src="assets/icons/png/alta.png" />
<span>{{recipe.positions_mould_lower_speed.setpointHMI}}</span>
<span>{{recipe.positions_mould_lower_speed.valueAct}}</span>
<small>{{recipe.positions_mould_lower_speed.unitMeasure}}</small>
</div>
</div>
@@ -4,55 +4,55 @@ e<template>
<div class="borded_label" id="quota3">
<div v-focus-on:positions_upperplate_lower_position>
<img src="assets/icons/png/discesa.png" />
<span>{{recipe.positions_upperplate_lower_position.setpointHMI}}</span>
<span>{{recipe.positions_upperplate_lower_position.valueAct}}</span>
<small>{{recipe.positions_upperplate_lower_position.unitMeasure}}</small>
</div>
<div v-focus-on:positions_upperplate_lower_speed>
<img src="assets/icons/png/alta.png" />
<span>{{recipe.positions_upperplate_lower_speed.setpointHMI}}</span>
<span>{{recipe.positions_upperplate_lower_speed.valueAct}}</span>
<small>{{recipe.positions_upperplate_lower_speed.unitMeasure}}</small>
</div>
</div>
<div class="borded_label" id="quota4">
<div v-focus-on:positions_upperplate_lowerdeceleration_position>
<img src="assets/icons/png/discesa.png" />
<span>{{recipe.positions_upperplate_lowerdeceleration_position.setpointHMI}}</span>
<span>{{recipe.positions_upperplate_lowerdeceleration_position.valueAct}}</span>
<small>{{recipe.positions_upperplate_lowerdeceleration_position.unitMeasure}}</small>
</div>
<div v-focus-on:positions_upperplate_lowerdeceleration_speed>
<img src="assets/icons/png/bassa.png" />
<span>{{recipe.positions_upperplate_lowerdeceleration_speed.setpointHMI}}</span>
<span>{{recipe.positions_upperplate_lowerdeceleration_speed.valueAct}}</span>
<small>{{recipe.positions_upperplate_lowerdeceleration_speed.unitMeasure}}</small>
</div>
</div>
<div class="borded_label" id="quota1">
<div v-focus-on:positions_upperplate_upper_position>
<img src="assets/icons/png/salita.png" />
<span>{{recipe.positions_upperplate_upper_position.setpointHMI}}</span>
<span>{{recipe.positions_upperplate_upper_position.valueAct}}</span>
<small>{{recipe.positions_upperplate_upper_position.unitMeasure}}</small>
</div>
<div v-focus-on:positions_upperplate_upper_speed>
<img src="assets/icons/png/alta.png" />
<span>{{recipe.positions_upperplate_upper_speed.setpointHMI}}</span>
<span>{{recipe.positions_upperplate_upper_speed.valueAct}}</span>
<small>{{recipe.positions_upperplate_upper_speed.unitMeasure}}</small>
</div>
</div>
<div class="borded_label" id="quota2">
<div v-focus-on:positions_upperplate_upperdeceleration_position>
<img src="assets/icons/png/salita.png" />
<span>{{recipe.positions_upperplate_upperdeceleration_position.setpointHMI}}</span>
<span>{{recipe.positions_upperplate_upperdeceleration_position.valueAct}}</span>
<small>{{recipe.positions_upperplate_upperdeceleration_position.unitMeasure}}</small>
</div>
<div v-focus-on:positions_upperplate_upperdeceleration_speed>
<img src="assets/icons/png/bassa.png" />
<span>{{recipe.positions_upperplate_upperdeceleration_speed.setpointHMI}}</span>
<span>{{recipe.positions_upperplate_upperdeceleration_speed.valueAct}}</span>
<small>{{recipe.positions_upperplate_upperdeceleration_speed.unitMeasure}}</small>
</div>
</div>
<div class="borded_label" id="quota5">
<div v-focus-on:general_sizes_upperplate_max_height>
<img src="assets/icons/png/quota.png" />
<span>{{recipe.general_sizes_upperplate_max_height.setpointHMI}}</span>
<span>{{recipe.general_sizes_upperplate_max_height.valueAct}}</span>
<small>{{recipe.general_sizes_upperplate_max_height.unitMeasure}}</small>
</div>
</div>
@@ -1,7 +1,11 @@
<template>
<div class="togglebutton big" v-if="status.visible">
<div class="togglebutton big" v-if="!status || status.visible">
<label>
<input type="checkbox" v-model="bindingValue" :disabled="readOnly || !status.enabled" />
<input
type="checkbox"
v-model="bindingValue"
:disabled="readOnly || (status && !status.enabled)"
/>
<span
class="toggle"
:class="{'error': status && status.hasError}"
@@ -2,6 +2,8 @@ import Vue from "vue";
import Component from "vue-class-component";
import { appModelActions, store, machineStatusActions } from "@/store";
import { prodService } from "@/services/prodService";
import AvvioProduzione from "@/app_modules_thermo/setup/avvio-produzione/avvio-produzione.vue";
import { ModalHelper } from "@/components/modals";
// import VueGesture from "@/_base/gestures.vue";
// import { Factory, messageService } from "src/_base";
@@ -53,15 +55,15 @@ export default class AppFooter extends Vue {
}
public getUtilities(): Array<Object> {
// if (typeof cmsClient != "undefined")
// return JSON.parse(cmsClient.getConfiguredProcessesInMainMenu());
// else
return new Array<Object>();
if (typeof cmsClient != "undefined")
return JSON.parse(cmsClient.getConfiguredProcessesInMainMenu());
else
return new Array<Object>();
}
public startUtility(id: any) {
// if (typeof cmsClient != "undefined")
// cmsClient.openOrStartProcess(id);
if (typeof cmsClient != "undefined")
cmsClient.openOrStartProcess(id);
}
showDashboard() {
@@ -73,6 +75,6 @@ export default class AppFooter extends Vue {
}
async runAuto() {
await prodService.Auto();
await ModalHelper.ShowModalAsync(AvvioProduzione);
}
}
@@ -66,6 +66,23 @@
class="oval clock"
:class="{ big:isInPath('clock') && !state.isMainViewLiftedUp}"
></button>
<div v-if="isAreaVisible('utilities') && getUtilities().length > 0" class="divider">
<i class="fa fa-circle"></i>
</div>
<template v-for="software in getUtilities()">
<button
@click="startUtility(software.id)"
:title="software.longName"
:key="software.id"
:disabled="!isAreaEnabled('utilities')"
v-if="isAreaVisible('utilities')"
class="oval externUtility"
>
<img v-if="software.iconBase64 && software.iconBase64!=''" :src="software.iconBase64" />
<div v-if="!software.iconBase64 || software.iconBase64==''">{{software.shortName}}</div>
</button>
</template>
</div>
<div class="machine-area">
@@ -33,8 +33,8 @@ export class ProdService extends baseRestService {
await this.Put<any>((await this.BASE_URL()) + "mode/auto", null);
}
async Start(qty: number, newWorkOrder: boolean = true) {
await this.Put<any>((await this.BASE_URL()) + `start?requestQty=${qty}&newWorkOrder=${newWorkOrder}`, null);
async Start(qty: number, newWorkOrder: boolean, riscqty: number) {
await this.Put<any>((await this.BASE_URL()) + `start?requestQty=${qty}&newWorkOrder=${newWorkOrder}&numCicliRisc=${riscqty}`, null);
}
}
export const prodService = new ProdService();
@@ -60,6 +60,7 @@ export class RecipeService extends baseRestService {
}
async Cancel() {
recipeActions.reset(store);
let result = await this.Put<any>((await this.BASE_URL()) + "cancel", null, true);
return result;
}
@@ -8,6 +8,7 @@ export interface RecipeStoreModel {
export interface RecipeActions {
reset(context);
setCurrent(context, model: Recipe.IRecipe, avoidSetpointHMI: boolean);
setOverview(context, model: Overview.IOverview);
}
@@ -35,6 +36,7 @@ export const recipeStore = {
upperPlate: "",
vacuum: ""
},
canUpdateRecipe: true,
_map: new Map<number, Recipe.IValue>()
} as RecipeStoreModel,
@@ -45,7 +47,13 @@ export const recipeStore = {
},
mutations: {
Reset(state) {
for (const key in state.current)
if (state.current.hasOwnProperty(key)) {
let m = state.current[key] as Recipe.IValue;
m.setpointHMI = m.setpointPLC;
}
},
SetCurrent(state, model: { avoidSetpoint: boolean, recipe: Recipe.IRecipe }) {
for (const key in model.recipe) {
if (model.recipe.hasOwnProperty(key)) {
@@ -86,7 +94,9 @@ export const recipeStore = {
},
actions: {
reset(context) {
context.commit("Reset")
},
async setCurrent(context, model: Recipe.IRecipe, avoidSetpointHMI: boolean = false) {
context.commit("SetCurrent", { avoidSetpoint: avoidSetpointHMI, recipe: model });