Compare commits
18 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c45c81dbf7 | |||
| 7417c20dcc | |||
| a98500bade | |||
| 154897e835 | |||
| 587f4b3e82 | |||
| 8714898228 | |||
| 49ccfe10e7 | |||
| 1168c826c1 | |||
| 4c5f1e975f | |||
| 4a5d0b9770 | |||
| 1e4dc168ac | |||
| d2fd9675fd | |||
| 9440a01ff7 | |||
| 968dab090d | |||
| b47975c7f6 | |||
| cc9527fbad | |||
| 208b2122ac | |||
| a379fc96d3 |
@@ -0,0 +1,16 @@
|
||||
# Progetto Thermo.Active CMS
|
||||
|
||||
|
||||
## Struttura Progetto
|
||||
|
||||
## Ambiente sviluppo e simulazione
|
||||
|
||||
## Procedura Riavvio su SIM
|
||||
|
||||
Step come indicati da M.Carissoni:
|
||||
* Dai un paio di ResetSK
|
||||
* fai cicloReset
|
||||
* quando si spegne ciclo reset auto
|
||||
* Inizia a lampeggiare start e lo clicchi e parte
|
||||
* Quando si spegne cicloReset fai cicloAuto
|
||||
|
||||
@@ -552,17 +552,17 @@
|
||||
"233": 0
|
||||
},
|
||||
"RecipeOverview": {
|
||||
"General": "HasError",
|
||||
"Positions": "HasError",
|
||||
"Cycle": "ChangedOk",
|
||||
"Heats": "ChangedOk",
|
||||
"Pyrometer": "ChangedOk",
|
||||
"Drawing": "ChangedOk",
|
||||
"UpperPlate": "ChangedOk",
|
||||
"Cooling": "HasError",
|
||||
"Vacuum": "ChangedOk",
|
||||
"Extraction": "ChangedOk",
|
||||
"Options": "HasError"
|
||||
"General": "Unchanged",
|
||||
"Positions": "Unchanged",
|
||||
"Cycle": "Unchanged",
|
||||
"Heats": "Unchanged",
|
||||
"Pyrometer": "Unchanged",
|
||||
"Drawing": "Unchanged",
|
||||
"UpperPlate": "Unchanged",
|
||||
"Cooling": "Unchanged",
|
||||
"Vacuum": "Unchanged",
|
||||
"Extraction": "Unchanged",
|
||||
"Options": "Unchanged"
|
||||
},
|
||||
"TC_last": 2532.940840175
|
||||
}
|
||||
@@ -552,17 +552,17 @@
|
||||
"233": 0
|
||||
},
|
||||
"RecipeOverview": {
|
||||
"General": "HasError",
|
||||
"Positions": "HasError",
|
||||
"Cycle": "ChangedOk",
|
||||
"Heats": "ChangedOk",
|
||||
"Pyrometer": "ChangedOk",
|
||||
"Drawing": "ChangedOk",
|
||||
"UpperPlate": "ChangedOk",
|
||||
"Cooling": "HasError",
|
||||
"Vacuum": "ChangedOk",
|
||||
"Extraction": "ChangedOk",
|
||||
"Options": "HasError"
|
||||
"General": "Unchanged",
|
||||
"Positions": "Unchanged",
|
||||
"Cycle": "Unchanged",
|
||||
"Heats": "Unchanged",
|
||||
"Pyrometer": "Unchanged",
|
||||
"Drawing": "Unchanged",
|
||||
"UpperPlate": "Unchanged",
|
||||
"Cooling": "Unchanged",
|
||||
"Vacuum": "Unchanged",
|
||||
"Extraction": "Unchanged",
|
||||
"Options": "Unchanged"
|
||||
},
|
||||
"TC_last": 2532.940840175
|
||||
}
|
||||
@@ -1443,31 +1443,6 @@ namespace Thermo.Active.NC
|
||||
numTcOk++;
|
||||
}
|
||||
}
|
||||
#if DEBUG
|
||||
|
||||
// creo una perturubazione...
|
||||
var rand = new Random();
|
||||
int slope = TS_TC.Count / 2;
|
||||
Dictionary<int, double> origTcData = new Dictionary<int, double>();
|
||||
foreach (var item2fix in TS_TC)
|
||||
{
|
||||
origTcData.Add(item2fix.Key, item2fix.Value);
|
||||
}
|
||||
foreach (var origVal in origTcData)
|
||||
{
|
||||
TS_TC[origVal.Key] = Math.Round(origVal.Value + (rand.NextDouble() * 20 - 10) + slope, 2);
|
||||
slope--;
|
||||
if (TS_Cad.ContainsKey(origVal.Key))
|
||||
{
|
||||
TS_Cad[origVal.Key] = Math.Round((double)3600 / TS_TC[origVal.Key], 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
TS_Cad.Add(origVal.Key, Math.Round((double)3600 / TS_TC[origVal.Key], 2));
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
// accodo!
|
||||
currentProdPanel.TS_Cadenza = TS_Cad;
|
||||
currentProdPanel.TS_TCiclo = TS_TC;
|
||||
@@ -2284,6 +2259,7 @@ namespace Thermo.Active.NC
|
||||
CmsError libraryError = NO_ERROR;
|
||||
// overview di base: ultima salvata...
|
||||
currOverview = new Dictionary<RecipeSection, RecipeCatStatus>();
|
||||
var err2fix = new Dictionary<RecipeSection, RecipeCatStatus>();
|
||||
|
||||
// leggo la ricetta dal PLC!
|
||||
var currRecipe = new Dictionary<string, DTORecipeParam>();
|
||||
@@ -2309,15 +2285,13 @@ namespace Thermo.Active.NC
|
||||
|
||||
RecipeCatStatus currStatus = RecipeCatStatus.Unchanged;
|
||||
|
||||
// 2020.08.27: faccio SEMPRE il calcolo degli stati, non rileggo e poi verifico...
|
||||
#if false
|
||||
// da conf ricetta --> se ci sono li leggo da li...
|
||||
if (NcFileAdapter.RecipeLiveData.RecipeOverview != null)
|
||||
{
|
||||
currOverview = NcFileAdapter.RecipeLiveData.RecipeOverview;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// verifico eventualmente se mancasse qualcosa...
|
||||
bool changed = false;
|
||||
foreach (var item in recipeConfig)
|
||||
{
|
||||
@@ -2327,6 +2301,19 @@ namespace Thermo.Active.NC
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
// ricerco SE co fossero errori --> reset come changedOK
|
||||
foreach (var item in currOverview)
|
||||
{
|
||||
if (item.Value == RecipeCatStatus.HasError)
|
||||
err2fix.Add(item.Key, RecipeCatStatus.ChangedOk);
|
||||
}
|
||||
foreach (var item in err2fix)
|
||||
{
|
||||
currOverview[item.Key] = item.Value;
|
||||
changed = true;
|
||||
}
|
||||
|
||||
// se cambiato --> salvo in live data...
|
||||
if (changed)
|
||||
{
|
||||
@@ -2360,8 +2347,6 @@ namespace Thermo.Active.NC
|
||||
}
|
||||
}
|
||||
}
|
||||
// salvo!
|
||||
NcFileAdapter.RecipeLiveData.RecipeOverview = currOverview;
|
||||
|
||||
// restituisco cod errore se trovato
|
||||
return libraryError;
|
||||
|
||||
@@ -146,7 +146,8 @@
|
||||
<!-- Specifies the trace writer for output -->
|
||||
<sharedListeners>
|
||||
<!-- Listener for transport events -->
|
||||
<add name="SignalR-Transports" type="System.Diagnostics.TextWriterTraceListener" initializeData="logs/transports.log" />
|
||||
<add name="SignalR-Transports" type="System.Diagnostics.TextWriterTraceListener" initializeData="logs/transports.log" traceOutputOptions="None"/>
|
||||
<!--<add name="SignalR-Transports" type="System.Diagnostics.TextWriterTraceListener" initializeData="logs/transports.log" />-->
|
||||
<!-- Listener for scaleout provider events -->
|
||||
<add name="SignalR-Bus" type="System.Diagnostics.TextWriterTraceListener" initializeData="logs/bus.log" />
|
||||
<!-- Listener for hub discovery events -->
|
||||
|
||||
@@ -166,16 +166,13 @@ namespace Thermo.Active.Controllers.WebApi
|
||||
}
|
||||
|
||||
// SE HO una section != null/empty --> salvo come modificata...
|
||||
if (section != null)
|
||||
try
|
||||
{
|
||||
try
|
||||
{
|
||||
NcFileAdapter.upsRecipeOverview(section, RecipeCatStatus.ChangedOk);
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
ThermoActiveLogger.LogError($"Error on set recipe overview | section: {section}{Environment.NewLine}{exc}");
|
||||
}
|
||||
NcFileAdapter.upsRecipeOverview(section, RecipeCatStatus.ChangedOk);
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
ThermoActiveLogger.LogError($"Error on set recipe overview | section: {section}{Environment.NewLine}{exc}");
|
||||
}
|
||||
|
||||
// recupero i dati LIVE dei parametri HMI della ricetta...
|
||||
@@ -506,7 +503,7 @@ namespace Thermo.Active.Controllers.WebApi
|
||||
}
|
||||
|
||||
// salvo note...
|
||||
if(!string.IsNullOrEmpty(recipeNotes))
|
||||
if (!string.IsNullOrEmpty(recipeNotes))
|
||||
{
|
||||
NcFileAdapter.RecipeLiveData.recipeNotes = recipeNotes.Trim();
|
||||
}
|
||||
|
||||
@@ -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.11.62")]
|
||||
[assembly: AssemblyVersion("0.12.64")]
|
||||
@@ -439,18 +439,19 @@ fieldset[disabled] .form-group.is-focused .togglebutton label {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.togglebutton.big {
|
||||
.togglebutton.big,
|
||||
.togglebutton.big[disabled] {
|
||||
span.toggle {
|
||||
height: 40px;
|
||||
width: 112px;
|
||||
border-radius: 20px;
|
||||
font-size: 17px;
|
||||
line-height: 40px;
|
||||
font-weight: bold;
|
||||
height: 40px !important;
|
||||
width: 112px !important;
|
||||
border-radius: 20px !important;
|
||||
font-size: 17px !important;
|
||||
line-height: 40px !important;
|
||||
font-weight: bold !important;
|
||||
|
||||
&:after {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
width: 36px !important;
|
||||
height: 36px !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -143,6 +143,60 @@
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.context-menu {
|
||||
position: relative;
|
||||
|
||||
.context-area {
|
||||
top: 50px;
|
||||
display: none;
|
||||
background-color: #fff;
|
||||
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
|
||||
position: absolute;
|
||||
width: 300px;
|
||||
left: -150px + 24px;
|
||||
padding-inline-start: 0;
|
||||
padding-inline-end: 0;
|
||||
|
||||
|
||||
&.show {
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
li {
|
||||
list-style-type: none;
|
||||
height: 62px;
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.5);
|
||||
color: #545454;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
padding: 0 28px;
|
||||
font-weight: 500;
|
||||
font-size: 18px;
|
||||
|
||||
cursor: pointer;
|
||||
|
||||
&:last-of-type {
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
|
||||
&:before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: -15px;
|
||||
left: calc(~'50% - 8px');
|
||||
display: block;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-left: 15px solid transparent;
|
||||
border-right: 15px solid transparent;
|
||||
border-bottom: 15px solid #fff;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.colorWhite {
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
@import "report.less";
|
||||
@import "users.less";
|
||||
@import "tooltip.less";
|
||||
@import "saveas.less";
|
||||
|
||||
|
||||
@background-color: rgb(216, 216, 216);
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
// out: false, sourceMap: false, main: ../style.less
|
||||
.modal.save-as {
|
||||
width: 500px;
|
||||
height: 300px;
|
||||
top: calc(~'50% - 200px');
|
||||
|
||||
article {
|
||||
|
||||
label {
|
||||
color: #002680;
|
||||
font-size: 24px;
|
||||
font-weight: 500;
|
||||
overflow: hidden;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
input {
|
||||
padding: 5px;
|
||||
font-size: 18px;
|
||||
font-weight: 500;
|
||||
color: #6d6d6d;
|
||||
width: 100%;
|
||||
height: 48px;
|
||||
border-radius: 2px;
|
||||
box-shadow: inset 0 1px 3px 0 rgba(0, 0, 0, 0.5);
|
||||
border: none;
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
padding: 0 4px;
|
||||
align-items: center;
|
||||
justify-content: stretch;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6032,19 +6032,22 @@ fieldset[disabled] .form-group.is-focused .togglebutton label {
|
||||
background-image: linear-gradient(to bottom, #3fa4ff, #1791ff);
|
||||
color: #fff;
|
||||
}
|
||||
.togglebutton.big span.toggle {
|
||||
height: 40px;
|
||||
width: 112px;
|
||||
border-radius: 20px;
|
||||
font-size: 17px;
|
||||
line-height: 40px;
|
||||
font-weight: bold;
|
||||
.togglebutton.big span.toggle,
|
||||
.togglebutton.big[disabled] span.toggle {
|
||||
height: 40px !important;
|
||||
width: 112px !important;
|
||||
border-radius: 20px !important;
|
||||
font-size: 17px !important;
|
||||
line-height: 40px !important;
|
||||
font-weight: bold !important;
|
||||
}
|
||||
.togglebutton.big span.toggle:after {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
.togglebutton.big span.toggle:after,
|
||||
.togglebutton.big[disabled] span.toggle:after {
|
||||
width: 36px !important;
|
||||
height: 36px !important;
|
||||
}
|
||||
.togglebutton.big input[type=checkbox]:checked + .toggle:after {
|
||||
.togglebutton.big input[type=checkbox]:checked + .toggle:after,
|
||||
.togglebutton.big[disabled] input[type=checkbox]:checked + .toggle:after {
|
||||
left: 74px;
|
||||
}
|
||||
.custom-checkbox {
|
||||
@@ -6284,6 +6287,57 @@ fieldset[disabled] .form-group.is-focused .togglebutton label {
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
#app > header .context-menu,
|
||||
.dashboard > header .context-menu {
|
||||
position: relative;
|
||||
}
|
||||
#app > header .context-menu .context-area,
|
||||
.dashboard > header .context-menu .context-area {
|
||||
top: 50px;
|
||||
display: none;
|
||||
background-color: #fff;
|
||||
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
|
||||
position: absolute;
|
||||
width: 300px;
|
||||
left: -126px;
|
||||
padding-inline-start: 0;
|
||||
padding-inline-end: 0;
|
||||
}
|
||||
#app > header .context-menu .context-area.show,
|
||||
.dashboard > header .context-menu .context-area.show {
|
||||
display: block !important;
|
||||
}
|
||||
#app > header .context-menu .context-area li,
|
||||
.dashboard > header .context-menu .context-area li {
|
||||
list-style-type: none;
|
||||
height: 62px;
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.5);
|
||||
color: #545454;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
padding: 0 28px;
|
||||
font-weight: 500;
|
||||
font-size: 18px;
|
||||
cursor: pointer;
|
||||
}
|
||||
#app > header .context-menu .context-area li:last-of-type,
|
||||
.dashboard > header .context-menu .context-area li:last-of-type {
|
||||
border-bottom: none;
|
||||
}
|
||||
#app > header .context-menu .context-area:before,
|
||||
.dashboard > header .context-menu .context-area:before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: -15px;
|
||||
left: calc(50% - 8px);
|
||||
display: block;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-left: 15px solid transparent;
|
||||
border-right: 15px solid transparent;
|
||||
border-bottom: 15px solid #fff;
|
||||
}
|
||||
.colorWhite {
|
||||
color: #fff !important;
|
||||
}
|
||||
@@ -23739,6 +23793,34 @@ footer .container button.big:before {
|
||||
text-align: center;
|
||||
color: #4b4b4b;
|
||||
}
|
||||
.modal.save-as {
|
||||
width: 500px;
|
||||
height: 300px;
|
||||
top: calc(50% - 200px);
|
||||
}
|
||||
.modal.save-as article label {
|
||||
color: #002680;
|
||||
font-size: 24px;
|
||||
font-weight: 500;
|
||||
overflow: hidden;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.modal.save-as article input {
|
||||
padding: 5px;
|
||||
font-size: 18px;
|
||||
font-weight: 500;
|
||||
color: #6d6d6d;
|
||||
width: 100%;
|
||||
height: 48px;
|
||||
border-radius: 2px;
|
||||
box-shadow: inset 0 1px 3px 0 rgba(0, 0, 0, 0.5);
|
||||
border: none;
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
padding: 0 4px;
|
||||
align-items: center;
|
||||
justify-content: stretch;
|
||||
}
|
||||
a,
|
||||
a:visited,
|
||||
a:hover,
|
||||
|
||||
Generated
+124
-124
@@ -1960,6 +1960,37 @@
|
||||
"yorkie": "^2.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"ajv": {
|
||||
"version": "6.12.4",
|
||||
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.4.tgz",
|
||||
"integrity": "sha512-eienB2c9qVQs2KWexhkrdMLVDoIQCz5KSeLxwg9Lzk4DOfBtIK9PQwwufcsn1jjGuf9WZmqPMbGxOzfcuphJCQ==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"fast-deep-equal": "^3.1.1",
|
||||
"fast-json-stable-stringify": "^2.0.0",
|
||||
"json-schema-traverse": "^0.4.1",
|
||||
"uri-js": "^4.2.2"
|
||||
}
|
||||
},
|
||||
"ajv-keywords": {
|
||||
"version": "3.5.2",
|
||||
"resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz",
|
||||
"integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"ansi-styles": {
|
||||
"version": "4.2.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
|
||||
"integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"@types/color-name": "^1.1.1",
|
||||
"color-convert": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"braces": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
|
||||
@@ -1969,6 +2000,30 @@
|
||||
"fill-range": "^7.0.1"
|
||||
}
|
||||
},
|
||||
"color-convert": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
||||
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"color-name": "~1.1.4"
|
||||
}
|
||||
},
|
||||
"color-name": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
|
||||
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"fast-deep-equal": {
|
||||
"version": "3.1.3",
|
||||
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
|
||||
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"fill-range": {
|
||||
"version": "7.0.1",
|
||||
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
|
||||
@@ -1978,6 +2033,46 @@
|
||||
"to-regex-range": "^5.0.1"
|
||||
}
|
||||
},
|
||||
"fork-ts-checker-webpack-plugin-v5": {
|
||||
"version": "npm:fork-ts-checker-webpack-plugin@5.1.0",
|
||||
"resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-5.1.0.tgz",
|
||||
"integrity": "sha512-vuKyEjSLGbhQbEr5bifXXOkr9iV73L6n72mHoHIv7okvrf7O7z6RKeplM6C6ATPsukoQivij+Ba1vcptL60Z2g==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"@babel/code-frame": "^7.8.3",
|
||||
"@types/json-schema": "^7.0.5",
|
||||
"chalk": "^4.1.0",
|
||||
"cosmiconfig": "^6.0.0",
|
||||
"deepmerge": "^4.2.2",
|
||||
"fs-extra": "^9.0.0",
|
||||
"memfs": "^3.1.2",
|
||||
"minimatch": "^3.0.4",
|
||||
"schema-utils": "2.7.0",
|
||||
"semver": "^7.3.2",
|
||||
"tapable": "^1.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"chalk": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
|
||||
"integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"ansi-styles": "^4.1.0",
|
||||
"supports-color": "^7.1.0"
|
||||
}
|
||||
},
|
||||
"semver": {
|
||||
"version": "7.3.2",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz",
|
||||
"integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"globby": {
|
||||
"version": "9.2.0",
|
||||
"resolved": "https://registry.npmjs.org/globby/-/globby-9.2.0.tgz",
|
||||
@@ -1994,6 +2089,13 @@
|
||||
"slash": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"has-flag": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
|
||||
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"ignore": {
|
||||
"version": "4.0.6",
|
||||
"resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz",
|
||||
@@ -2022,6 +2124,18 @@
|
||||
"integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==",
|
||||
"dev": true
|
||||
},
|
||||
"schema-utils": {
|
||||
"version": "2.7.0",
|
||||
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.0.tgz",
|
||||
"integrity": "sha512-0ilKFI6QQF5nxDZLFn2dMjvc4hjg/Wkg7rHd3jK6/A4a1Hl9VFdQWvgB1UMGoU94pad1P/8N7fMcEnLnSiju8A==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"@types/json-schema": "^7.0.4",
|
||||
"ajv": "^6.12.2",
|
||||
"ajv-keywords": "^3.4.1"
|
||||
}
|
||||
},
|
||||
"semver": {
|
||||
"version": "6.3.0",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
|
||||
@@ -2034,6 +2148,16 @@
|
||||
"integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==",
|
||||
"dev": true
|
||||
},
|
||||
"supports-color": {
|
||||
"version": "7.2.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
|
||||
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"has-flag": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"to-regex-range": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
|
||||
@@ -8327,130 +8451,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"fork-ts-checker-webpack-plugin-v5": {
|
||||
"version": "npm:fork-ts-checker-webpack-plugin@5.1.0",
|
||||
"resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-5.1.0.tgz",
|
||||
"integrity": "sha512-vuKyEjSLGbhQbEr5bifXXOkr9iV73L6n72mHoHIv7okvrf7O7z6RKeplM6C6ATPsukoQivij+Ba1vcptL60Z2g==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"@babel/code-frame": "^7.8.3",
|
||||
"@types/json-schema": "^7.0.5",
|
||||
"chalk": "^4.1.0",
|
||||
"cosmiconfig": "^6.0.0",
|
||||
"deepmerge": "^4.2.2",
|
||||
"fs-extra": "^9.0.0",
|
||||
"memfs": "^3.1.2",
|
||||
"minimatch": "^3.0.4",
|
||||
"schema-utils": "2.7.0",
|
||||
"semver": "^7.3.2",
|
||||
"tapable": "^1.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"ajv": {
|
||||
"version": "6.12.4",
|
||||
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.4.tgz",
|
||||
"integrity": "sha512-eienB2c9qVQs2KWexhkrdMLVDoIQCz5KSeLxwg9Lzk4DOfBtIK9PQwwufcsn1jjGuf9WZmqPMbGxOzfcuphJCQ==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"fast-deep-equal": "^3.1.1",
|
||||
"fast-json-stable-stringify": "^2.0.0",
|
||||
"json-schema-traverse": "^0.4.1",
|
||||
"uri-js": "^4.2.2"
|
||||
}
|
||||
},
|
||||
"ajv-keywords": {
|
||||
"version": "3.5.2",
|
||||
"resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz",
|
||||
"integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"ansi-styles": {
|
||||
"version": "4.2.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
|
||||
"integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"@types/color-name": "^1.1.1",
|
||||
"color-convert": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"chalk": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
|
||||
"integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"ansi-styles": "^4.1.0",
|
||||
"supports-color": "^7.1.0"
|
||||
}
|
||||
},
|
||||
"color-convert": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
||||
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"color-name": "~1.1.4"
|
||||
}
|
||||
},
|
||||
"color-name": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
|
||||
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"fast-deep-equal": {
|
||||
"version": "3.1.3",
|
||||
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
|
||||
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"has-flag": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
|
||||
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"schema-utils": {
|
||||
"version": "2.7.0",
|
||||
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.0.tgz",
|
||||
"integrity": "sha512-0ilKFI6QQF5nxDZLFn2dMjvc4hjg/Wkg7rHd3jK6/A4a1Hl9VFdQWvgB1UMGoU94pad1P/8N7fMcEnLnSiju8A==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"@types/json-schema": "^7.0.4",
|
||||
"ajv": "^6.12.2",
|
||||
"ajv-keywords": "^3.4.1"
|
||||
}
|
||||
},
|
||||
"semver": {
|
||||
"version": "7.3.2",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz",
|
||||
"integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"supports-color": {
|
||||
"version": "7.1.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz",
|
||||
"integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"has-flag": "^4.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"form-data": {
|
||||
"version": "2.3.3",
|
||||
"resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz",
|
||||
|
||||
@@ -9,6 +9,7 @@ import { UserInfoDialog, MachineInfoDialog, ContactInfoDialog } from "@/app_modu
|
||||
import { ModalHelper } from "./components/modals/ModalHelper";
|
||||
import Vue from "vue";
|
||||
import { loginService, machineService, localizationService } from "./services";
|
||||
import { prodService } from "./services/prodService";
|
||||
|
||||
// import { UsersService } from "./services/usersService";
|
||||
|
||||
@@ -61,6 +62,8 @@ async function loadMachineConfig() {
|
||||
|
||||
let mcresult = await machine.getMachineConfiguration();
|
||||
|
||||
await prodService.GetProdPanel();
|
||||
|
||||
// load default language
|
||||
if (!(store.state as AppModel).localization.currentLanguage) {
|
||||
localizationService.changeCurrentLanguage(mcresult.defaultLanguage);
|
||||
|
||||
@@ -48,9 +48,10 @@ export default class Numeric extends Vue {
|
||||
KeyboardHelper.showKeyboard(x, y, this.value);
|
||||
|
||||
let textBox = (this.$refs.input as any);
|
||||
textBox.SelectionStart = textBox.value.length;
|
||||
textBox.SelectionLength = 0;
|
||||
this.$nextTick(() => { this.focused = true; })
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.focused = true;
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import Vue from "vue";
|
||||
import Component from "vue-class-component";
|
||||
import { Prop } from 'vue-property-decorator';
|
||||
import { debounce } from "@/_base/debounce";
|
||||
|
||||
import { Hub } from "@/services";
|
||||
import Numeric from "./numeric";
|
||||
@Component({ name: "slider" })
|
||||
export default class Slider extends Vue {
|
||||
|
||||
@@ -17,6 +18,8 @@ export default class Slider extends Vue {
|
||||
@Prop({ default: 1 })
|
||||
decimal: number;
|
||||
|
||||
incrementing: number = 0;
|
||||
tempValue: number = null;
|
||||
|
||||
get actualvalue() {
|
||||
return this.value.setpointHMI;
|
||||
@@ -27,11 +30,9 @@ export default class Slider extends Vue {
|
||||
}
|
||||
|
||||
set actualvalue(v: number) {
|
||||
this.debouncedActualValue(v)
|
||||
this.value.setpointHMI = v;
|
||||
}
|
||||
|
||||
debouncedActualValue = debounce((v: number) => this.value.setpointHMI = v, 200);
|
||||
|
||||
get step() {
|
||||
// var s = ((this.value.range.max - this.value.range.min) / (this.lines + 1));
|
||||
// var m = Math.pow(10, this.decimal);
|
||||
@@ -39,31 +40,43 @@ export default class Slider extends Vue {
|
||||
return 1;
|
||||
};
|
||||
|
||||
increment() {
|
||||
startIncrement() {
|
||||
if (!this.value.status.enabled) return;
|
||||
this.incrementing = setInterval(() => {
|
||||
var v = this.value.setpointHMI;
|
||||
if (v < this.value.range.max) {
|
||||
v += this.step;
|
||||
}
|
||||
if (v > this.value.range.max) {
|
||||
v = this.value.range.max;
|
||||
}
|
||||
this.actualvalue = v;
|
||||
}, 50);
|
||||
}
|
||||
|
||||
startDecrement() {
|
||||
if (!this.value.status.enabled) return;
|
||||
this.incrementing = setInterval(() => {
|
||||
var v = this.value.setpointHMI;
|
||||
if (v > this.value.range.min) {
|
||||
v -= this.step;
|
||||
}
|
||||
if (v < this.value.range.min) {
|
||||
v = this.value.range.min;
|
||||
}
|
||||
this.actualvalue = v;
|
||||
}, 50);
|
||||
}
|
||||
|
||||
confirm() {
|
||||
if (!this.value.status.enabled) return;
|
||||
if (this.incrementing)
|
||||
clearInterval(this.incrementing);
|
||||
|
||||
this.incrementing = 0;
|
||||
|
||||
var v = this.value.setpointHMI;
|
||||
if (v < this.value.range.max) {
|
||||
v += this.step;
|
||||
}
|
||||
if (v > this.value.range.max) {
|
||||
v = this.value.range.max;
|
||||
}
|
||||
this.actualvalue = v;
|
||||
};
|
||||
|
||||
decrement() {
|
||||
if (!this.value.status.enabled) return;
|
||||
|
||||
var v = this.value.setpointHMI;
|
||||
if (v > this.value.range.min) {
|
||||
v -= this.step;
|
||||
}
|
||||
if (v < this.value.range.min) {
|
||||
v = this.value.range.min;
|
||||
}
|
||||
this.actualvalue = v;
|
||||
};
|
||||
|
||||
doSoftKeyClick() {
|
||||
Hub.Current.sendUserSoftKey(this.softKey.id);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="slider-container">
|
||||
<div class="slider">
|
||||
<button @click="decrement()">
|
||||
<button @mousedown="startDecrement()" @mouseup="confirm()" @mouseout="confirm()">
|
||||
<img src="assets/icons/png/min.png" />
|
||||
</button>
|
||||
<div class="control">
|
||||
@@ -21,7 +21,7 @@
|
||||
<small>{{`${this.value.range.max} ${this.value.unitMeasure}`}}</small>
|
||||
</div>
|
||||
</div>
|
||||
<button @click="increment()">
|
||||
<button @mousedown="startIncrement()" @mouseup="confirm()" @mouseout="confirm()">
|
||||
<img src="assets/icons/png/max.png" />
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -56,11 +56,11 @@
|
||||
</div>
|
||||
<div class="col">
|
||||
<small>{{'history-item_mouldEnergyIN' | localize("energia utilizzata in")}}</small>
|
||||
<span>{{value.mouldEnergyIN | round(1)}}kW</span>
|
||||
<span>{{value.mouldEnergyIN | round(1)}}kWh</span>
|
||||
</div>
|
||||
<div class="col">
|
||||
<small>{{'history-item_mouldEnergyOUT' | localize("energia utilizzata out")}}</small>
|
||||
<span>{{value.mouldEnergyOUT | round(1)}}kW</span>
|
||||
<span>{{value.mouldEnergyOUT | round(1)}}kWh</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
import Vue from "vue";
|
||||
import Component from "vue-class-component";
|
||||
import { Prop } from "vue-property-decorator";
|
||||
import { Deferred } from "@/services";
|
||||
import { Modal, ModalHelper } from "@/components/modals";
|
||||
import { messageService } from "@/_base";
|
||||
|
||||
@Component({ components: { modal: Modal } })
|
||||
export default class Notes extends Vue {
|
||||
@Prop()
|
||||
deferred: Deferred<string>;
|
||||
|
||||
@Prop()
|
||||
value: string;
|
||||
|
||||
note: string = null;
|
||||
get Note() {
|
||||
return this.note || this.value;
|
||||
}
|
||||
set Note(value: string) {
|
||||
this.note = value;
|
||||
}
|
||||
|
||||
save(value: string) {
|
||||
this.deferred.resolve(this.Note);
|
||||
ModalHelper.HideModal();
|
||||
}
|
||||
|
||||
close() {
|
||||
messageService.deleteChannel("esc_pressed");
|
||||
this.deferred.reject();
|
||||
ModalHelper.HideModal();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
<template>
|
||||
<div class="setup">
|
||||
<modal type="save-as" :title="'save-as' | localize('Salva con nome')">
|
||||
<div slot="header-buttons">
|
||||
<button class="modal-close" @click="close()">
|
||||
<i class="fa fa-remove"></i>
|
||||
</button>
|
||||
</div>
|
||||
<section>
|
||||
<article>
|
||||
<label>{{'recipe_note' | localize('Note della ricetta')}}</label>
|
||||
<textarea
|
||||
rows="3"
|
||||
v-model="Note"
|
||||
:placeholder="'recipe_note' | localize('Note della ricetta')"
|
||||
/>
|
||||
</article>
|
||||
</section>
|
||||
<footer>
|
||||
<button class="btn" @click="annulla()">{{'cancel' | localize("Annulla")}}</button>
|
||||
<button class="btn btn-success" @click="save()">{{'confirm' | localize("Conferma")}}</button>
|
||||
</footer>
|
||||
</modal>
|
||||
</div>
|
||||
</template>
|
||||
<script src="./changeNotes.ts" lang="ts"></script>
|
||||
@@ -1,7 +1,36 @@
|
||||
import Vue from "vue";
|
||||
import Component from "vue-class-component";
|
||||
import modal from "@/components/modals/modal.vue";
|
||||
import { Deferred } from "@/services";
|
||||
import { Prop } from "vue-property-decorator";
|
||||
import { messageService } from "@/_base";
|
||||
import { Modal, ModalHelper } from "@/components/modals";
|
||||
|
||||
@Component({})
|
||||
@Component({ components: { modal: Modal } })
|
||||
export default class SaveAs extends Vue {
|
||||
|
||||
@Prop()
|
||||
deferred: Deferred<string>;
|
||||
|
||||
@Prop()
|
||||
value: string;
|
||||
|
||||
recipeName: string = null;
|
||||
get RecipeName() {
|
||||
return this.recipeName || this.value;
|
||||
}
|
||||
set RecipeName(value: string) {
|
||||
this.recipeName = value;
|
||||
}
|
||||
|
||||
save(value: string) {
|
||||
this.deferred.resolve(this.RecipeName);
|
||||
ModalHelper.HideModal();
|
||||
}
|
||||
|
||||
close() {
|
||||
messageService.deleteChannel("esc_pressed");
|
||||
this.deferred.reject();
|
||||
ModalHelper.HideModal();
|
||||
}
|
||||
}
|
||||
@@ -8,18 +8,12 @@
|
||||
</div>
|
||||
<section>
|
||||
<article>
|
||||
<div class="input-area mb-10">
|
||||
<label>{{'recipe_name' | localize('Nome della ricetta')}}</label>
|
||||
<input
|
||||
class="custom"
|
||||
v-model="searchText"
|
||||
:placeholder="'recipe_name' | localize('Nome della ricetta')"
|
||||
/>
|
||||
</div>
|
||||
<label>{{'recipe_name' | localize('Nome della ricetta')}}</label>
|
||||
<input v-model="RecipeName" :placeholder="'recipe_name' | localize('Nome della ricetta')" />
|
||||
</article>
|
||||
</section>
|
||||
<footer>
|
||||
<button class="btn" @click="annulla()">{{'cancel' | localize("Annulla")}}</button>
|
||||
<button class="btn" @click="close()">{{'cancel' | localize("Annulla")}}</button>
|
||||
<button class="btn btn-success" @click="save()">{{'confirm' | localize("Conferma")}}</button>
|
||||
</footer>
|
||||
</modal>
|
||||
|
||||
+18
-6
@@ -10,6 +10,7 @@ import { recipeActions } from "@/store/recipe.store";
|
||||
import { store } from "@/store";
|
||||
import { Deferred } from '@/services';
|
||||
import { recipeService } from "@/services/recipeService";
|
||||
import { debounce } from '@/_base/debounce';
|
||||
|
||||
@Component({ components: { modal: Modal, stepfooter: StepFooter, caricatore: Caricatore, cicloformatura: CicloFormatura } })
|
||||
export default class ShowCicloInfo extends Vue {
|
||||
@@ -27,7 +28,7 @@ export default class ShowCicloInfo extends Vue {
|
||||
};
|
||||
|
||||
|
||||
preparePayload() {
|
||||
get payload() {
|
||||
return {
|
||||
cycle_forming_type: this.recipe.cycle_forming_type,
|
||||
cycle_forming_pause_cycle: this.recipe.cycle_forming_pause_cycle,
|
||||
@@ -57,19 +58,30 @@ export default class ShowCicloInfo extends Vue {
|
||||
|
||||
@Watch('recipe', { deep: true })
|
||||
async recipeChanged(n, o) {
|
||||
await recipeService.Update(this.preparePayload());
|
||||
this.debouncedRecipeSave()
|
||||
};
|
||||
|
||||
debouncedRecipeSave = debounce(async () => await recipeService.Update(this.payload), 200);
|
||||
|
||||
hasErrors() {
|
||||
let payload = this.preparePayload();
|
||||
let payload = this.recipe;
|
||||
let errors = false;
|
||||
for (const key in this.preparePayload()) {
|
||||
for (const key in this.recipe) {
|
||||
const el = payload[key] as Recipe.IValue;
|
||||
if (el.status.hasError) errors = true;
|
||||
}
|
||||
return errors;
|
||||
}
|
||||
|
||||
hasChanges() {
|
||||
let result = false;
|
||||
for (const key in this.payload) {
|
||||
const el = this.payload[key] as Recipe.IValue;
|
||||
if (el.setpointHMI != el.setpointPLC) result = true;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
hasEnabledFields(...fields: string[]) {
|
||||
let result = false;
|
||||
for (const field of fields) {
|
||||
@@ -114,8 +126,8 @@ export default class ShowCicloInfo extends Vue {
|
||||
// recipeActions.setCurrent(store, this.recipe);
|
||||
|
||||
await recipeService.Confirm('Cycle');
|
||||
ModalHelper.HideModal();
|
||||
this.deferred.resolve(1);
|
||||
// ModalHelper.HideModal();
|
||||
// this.deferred.resolve(1);
|
||||
};
|
||||
|
||||
goTo(step) {
|
||||
|
||||
+6
-2
@@ -17,11 +17,15 @@
|
||||
<cicloformatura v-if="show==0" :recipe="recipe"></cicloformatura>
|
||||
<caricatore v-if="show==1" :recipe="recipe"></caricatore>
|
||||
<footer>
|
||||
<button class="btn" @click="annulla()">{{'cancel' | localize('Annulla')}}</button>
|
||||
<button
|
||||
class="btn"
|
||||
@click="annulla()"
|
||||
:disabled="!hasChanges()"
|
||||
>{{'cancel' | localize('Annulla')}}</button>
|
||||
<button
|
||||
class="btn btn-success"
|
||||
@click="conferma()"
|
||||
:disabled="hasErrors()"
|
||||
:disabled="hasErrors() || !hasChanges()"
|
||||
>{{'confirm' | localize('Conferma')}}</button>
|
||||
</footer>
|
||||
</modal>
|
||||
|
||||
+19
-7
@@ -12,6 +12,7 @@ import { recipeActions } from "@/store/recipe.store";
|
||||
import { store } from "@/store";
|
||||
import { Deferred } from '@/services';
|
||||
import { recipeService } from "@/services/recipeService";
|
||||
import { debounce } from '@/_base/debounce';
|
||||
|
||||
@Component({
|
||||
components: {
|
||||
@@ -39,10 +40,12 @@ export default class ShowControstampoInfo extends Vue {
|
||||
|
||||
@Watch('recipe', { deep: true })
|
||||
async recipeChanged(n, o) {
|
||||
await recipeService.Update(this.preparePayload());
|
||||
}
|
||||
this.debouncedRecipeSave()
|
||||
};
|
||||
|
||||
preparePayload() {
|
||||
debouncedRecipeSave = debounce(async () => await recipeService.Update(this.payload), 200);
|
||||
|
||||
get payload() {
|
||||
return {
|
||||
upperplate_cycle_type: this.recipe.upperplate_cycle_type,
|
||||
upperplate_cycle_delay: this.recipe.upperplate_cycle_delay,
|
||||
@@ -76,15 +79,24 @@ export default class ShowControstampoInfo extends Vue {
|
||||
}
|
||||
|
||||
hasErrors() {
|
||||
let payload = this.preparePayload();
|
||||
let payload = this.recipe;
|
||||
let errors = false;
|
||||
for (const key in this.preparePayload()) {
|
||||
for (const key in this.recipe) {
|
||||
const el = payload[key] as Recipe.IValue;
|
||||
if (el.status.hasError) errors = true;
|
||||
}
|
||||
return errors;
|
||||
}
|
||||
|
||||
hasChanges() {
|
||||
let result = false;
|
||||
for (const key in this.payload) {
|
||||
const el = this.payload[key] as Recipe.IValue;
|
||||
if (el.setpointHMI != el.setpointPLC) result = true;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
hasEnabledFields(...fields: string[]) {
|
||||
let result = false;
|
||||
for (const field of fields) {
|
||||
@@ -146,8 +158,8 @@ export default class ShowControstampoInfo extends Vue {
|
||||
// recipeActions.setCurrent(store, this.recipe);
|
||||
|
||||
await recipeService.Confirm('UpperPlate');
|
||||
ModalHelper.HideModal();
|
||||
this.deferred.resolve(1);
|
||||
// ModalHelper.HideModal();
|
||||
// this.deferred.resolve(1);
|
||||
};
|
||||
|
||||
goTo(step) {
|
||||
|
||||
+6
-2
@@ -33,11 +33,15 @@
|
||||
<vuotocontrostampo v-if="show==2" :recipe="recipe"></vuotocontrostampo>
|
||||
<estrazionecontrostampo v-if="show==3" :recipe="recipe"></estrazionecontrostampo>
|
||||
<footer>
|
||||
<button class="btn" @click="annulla()">{{'cancel' | localize('Annulla')}}</button>
|
||||
<button
|
||||
class="btn"
|
||||
@click="annulla()"
|
||||
:disabled="!hasChanges()"
|
||||
>{{'cancel' | localize('Annulla')}}</button>
|
||||
<button
|
||||
class="btn btn-success"
|
||||
@click="conferma()"
|
||||
:disabled="hasErrors()"
|
||||
:disabled="hasErrors() || !hasChanges()"
|
||||
>{{'confirm' | localize('Conferma')}}</button>
|
||||
</footer>
|
||||
</modal>
|
||||
|
||||
+18
-7
@@ -10,6 +10,7 @@ import { recipeActions } from "@/store/recipe.store";
|
||||
import { store } from "@/store";
|
||||
import { Deferred } from '@/services';
|
||||
import { recipeService } from "@/services/recipeService";
|
||||
import { debounce } from '@/_base/debounce';
|
||||
|
||||
@Component({
|
||||
components:
|
||||
@@ -36,11 +37,12 @@ export default class ShowEstrazioneInfo extends Vue {
|
||||
|
||||
@Watch('recipe', { deep: true })
|
||||
async recipeChanged(n, o) {
|
||||
this.debouncedRecipeSave()
|
||||
};
|
||||
|
||||
await recipeService.Update(this.preparePayload());
|
||||
}
|
||||
debouncedRecipeSave = debounce(async () => await recipeService.Update(this.payload), 200);
|
||||
|
||||
preparePayload() {
|
||||
get payload() {
|
||||
return {
|
||||
extraction_main_type: this.recipe.extraction_main_type,
|
||||
extraction_main_mould_dw_delay: this.recipe.extraction_main_mould_dw_delay,
|
||||
@@ -57,15 +59,24 @@ export default class ShowEstrazioneInfo extends Vue {
|
||||
}
|
||||
|
||||
hasErrors() {
|
||||
let payload = this.preparePayload();
|
||||
let payload = this.recipe;
|
||||
let errors = false;
|
||||
for (const key in this.preparePayload()) {
|
||||
for (const key in this.recipe) {
|
||||
const el = payload[key] as Recipe.IValue;
|
||||
if (el.status.hasError) errors = true;
|
||||
}
|
||||
return errors;
|
||||
}
|
||||
|
||||
hasChanges() {
|
||||
let result = false;
|
||||
for (const key in this.payload) {
|
||||
const el = this.payload[key] as Recipe.IValue;
|
||||
if (el.setpointHMI != el.setpointPLC) result = true;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
hasEnabledFields(...fields: string[]) {
|
||||
let result = false;
|
||||
for (const field of fields) {
|
||||
@@ -98,8 +109,8 @@ export default class ShowEstrazioneInfo extends Vue {
|
||||
// recipeActions.setCurrent(store, this.recipe);
|
||||
|
||||
await recipeService.Confirm('Extraction');
|
||||
ModalHelper.HideModal();
|
||||
this.deferred.resolve(1);
|
||||
// ModalHelper.HideModal();
|
||||
// this.deferred.resolve(1);
|
||||
};
|
||||
|
||||
goTo(step) {
|
||||
|
||||
+6
-2
@@ -21,11 +21,15 @@
|
||||
<estrprincipale v-if="show==0" :recipe="recipe"></estrprincipale>
|
||||
<estrsecondaria v-if="show==1" :recipe="recipe"></estrsecondaria>
|
||||
<footer>
|
||||
<button class="btn" @click="annulla()">{{'cancel' | localize('Annulla')}}</button>
|
||||
<button
|
||||
class="btn"
|
||||
@click="annulla()"
|
||||
:disabled="!hasChanges()"
|
||||
>{{'cancel' | localize('Annulla')}}</button>
|
||||
<button
|
||||
class="btn btn-success"
|
||||
@click="conferma()"
|
||||
:disabled="hasErrors()"
|
||||
:disabled="hasErrors() || !hasChanges()"
|
||||
>{{'confirm' | localize('Conferma')}}</button>
|
||||
</footer>
|
||||
</modal>
|
||||
|
||||
+19
-7
@@ -19,6 +19,7 @@ import { recipeActions } from "@/store/recipe.store";
|
||||
import { store } from "@/store";
|
||||
import { Deferred } from "@/services";
|
||||
import { recipeService } from "@/services/recipeService";
|
||||
import { debounce } from "@/_base/debounce";
|
||||
|
||||
@Component({
|
||||
components: {
|
||||
@@ -57,10 +58,12 @@ export default class ShowFormatoInfo extends Vue {
|
||||
|
||||
@Watch('recipe', { deep: true })
|
||||
async recipeChanged(n, o) {
|
||||
await recipeService.Update(this.preparePayload());
|
||||
}
|
||||
this.debouncedRecipeSave()
|
||||
};
|
||||
|
||||
preparePayload() {
|
||||
debouncedRecipeSave = debounce(async () => await recipeService.Update(this.payload), 200);
|
||||
|
||||
get payload() {
|
||||
return {
|
||||
general_sizes_mould_dim_x: this.recipe.general_sizes_mould_dim_x,
|
||||
general_sizes_mould_dim_y: this.recipe.general_sizes_mould_dim_y,
|
||||
@@ -83,21 +86,30 @@ export default class ShowFormatoInfo extends Vue {
|
||||
}
|
||||
|
||||
hasErrors() {
|
||||
let payload = this.preparePayload();
|
||||
let payload = this.recipe;
|
||||
let errors = false;
|
||||
for (const key in this.preparePayload()) {
|
||||
for (const key in this.recipe) {
|
||||
const el = payload[key] as Recipe.IValue;
|
||||
if (el.status.hasError) errors = true;
|
||||
}
|
||||
return errors;
|
||||
}
|
||||
|
||||
hasChanges() {
|
||||
let result = false;
|
||||
for (const key in this.payload) {
|
||||
const el = this.payload[key] as Recipe.IValue;
|
||||
if (el.setpointHMI != el.setpointPLC) result = true;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
async conferma() {
|
||||
// recipeActions.setCurrent(store, this.recipe);
|
||||
|
||||
await recipeService.Confirm('General');
|
||||
ModalHelper.HideModal();
|
||||
this.deferred.resolve(1);
|
||||
// ModalHelper.HideModal();
|
||||
// this.deferred.resolve(1);
|
||||
};
|
||||
|
||||
goTo(step) {
|
||||
|
||||
+6
-2
@@ -70,11 +70,15 @@
|
||||
</article>
|
||||
</section>
|
||||
<footer>
|
||||
<button class="btn" @click="annulla()">{{'cancel' | localize('Annulla')}}</button>
|
||||
<button
|
||||
class="btn"
|
||||
@click="annulla()"
|
||||
:disabled="!hasChanges()"
|
||||
>{{'cancel' | localize('Annulla')}}</button>
|
||||
<button
|
||||
class="btn btn-success"
|
||||
@click="conferma()"
|
||||
:disabled="hasErrors()"
|
||||
:disabled="hasErrors() || !hasChanges()"
|
||||
>{{'confirm' | localize('Conferma')}}</button>
|
||||
</footer>
|
||||
</modal>
|
||||
|
||||
+19
-7
@@ -11,6 +11,7 @@ import { store } from "@/store";
|
||||
import { Deferred } from "@/services";
|
||||
import { recipeService } from "@/services/recipeService";
|
||||
import svgChart from "@/app_modules_thermo/components/svgChart.vue";
|
||||
import { debounce } from "@/_base/debounce";
|
||||
|
||||
@Component({
|
||||
components: {
|
||||
@@ -47,10 +48,12 @@ export default class ShowImbutituraInfo extends Vue {
|
||||
|
||||
@Watch('recipe', { deep: true })
|
||||
async recipeChanged(n, o) {
|
||||
await recipeService.Update(this.preparePayload());
|
||||
}
|
||||
this.debouncedRecipeSave()
|
||||
};
|
||||
|
||||
preparePayload() {
|
||||
debouncedRecipeSave = debounce(async () => await recipeService.Update(this.payload), 200);
|
||||
|
||||
get payload() {
|
||||
return {
|
||||
drawing_type: this.recipe.drawing_type,
|
||||
drawing_height: this.recipe.drawing_height,
|
||||
@@ -65,19 +68,28 @@ export default class ShowImbutituraInfo extends Vue {
|
||||
}
|
||||
|
||||
hasErrors() {
|
||||
let payload = this.preparePayload();
|
||||
let payload = this.recipe;
|
||||
let errors = false;
|
||||
for (const key in this.preparePayload()) {
|
||||
for (const key in this.recipe) {
|
||||
const el = payload[key] as Recipe.IValue;
|
||||
if (el.status.hasError) errors = true;
|
||||
}
|
||||
return errors;
|
||||
}
|
||||
|
||||
hasChanges() {
|
||||
let result = false;
|
||||
for (const key in this.payload) {
|
||||
const el = this.payload[key] as Recipe.IValue;
|
||||
if (el.setpointHMI != el.setpointPLC) result = true;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
async conferma(name: string) {
|
||||
await recipeService.Confirm('Drawing');
|
||||
ModalHelper.HideModal();
|
||||
this.deferred.resolve(1);
|
||||
// ModalHelper.HideModal();
|
||||
// this.deferred.resolve(1);
|
||||
};
|
||||
|
||||
goTo(step) {
|
||||
|
||||
+6
-2
@@ -80,11 +80,15 @@
|
||||
</article>
|
||||
</section>
|
||||
<footer>
|
||||
<button class="btn" @click="annulla()">{{'cancel' | localize('Annulla')}}</button>
|
||||
<button
|
||||
class="btn"
|
||||
@click="annulla()"
|
||||
:disabled="!hasChanges()"
|
||||
>{{'cancel' | localize('Annulla')}}</button>
|
||||
<button
|
||||
class="btn btn-success"
|
||||
@click="conferma()"
|
||||
:disabled="hasErrors()"
|
||||
:disabled="hasErrors() || !hasChanges()"
|
||||
>{{'confirm' | localize('Conferma')}}</button>
|
||||
</footer>
|
||||
</modal>
|
||||
|
||||
@@ -11,6 +11,7 @@ import { store } from "@/store";
|
||||
import { Prop, Watch } from "vue-property-decorator";
|
||||
import { Deferred } from "@/services";
|
||||
import { recipeService } from "@/services/recipeService";
|
||||
import { debounce } from "@/_base/debounce";
|
||||
|
||||
@Component({
|
||||
components: {
|
||||
@@ -38,10 +39,12 @@ export default class ShowOpzioniInfo extends Vue {
|
||||
|
||||
@Watch('recipe', { deep: true })
|
||||
async recipeChanged(n, o) {
|
||||
await recipeService.Update(this.preparePayload());
|
||||
}
|
||||
this.debouncedRecipeSave()
|
||||
};
|
||||
|
||||
preparePayload() {
|
||||
debouncedRecipeSave = debounce(async () => await recipeService.Update(this.payload), 200);
|
||||
|
||||
get payload() {
|
||||
return {
|
||||
options_undercutmould_1_mode: this.recipe.options_undercutmould_1_mode,
|
||||
options_undercutmould_1_position: this.recipe.options_undercutmould_1_position,
|
||||
@@ -147,21 +150,30 @@ export default class ShowOpzioniInfo extends Vue {
|
||||
}
|
||||
|
||||
hasErrors() {
|
||||
let payload = this.preparePayload();
|
||||
let payload = this.recipe;
|
||||
let errors = false;
|
||||
for (const key in this.preparePayload()) {
|
||||
for (const key in this.recipe) {
|
||||
const el = payload[key] as Recipe.IValue;
|
||||
if (el.status.hasError) errors = true;
|
||||
}
|
||||
return errors;
|
||||
}
|
||||
|
||||
hasChanges() {
|
||||
let result = false;
|
||||
for (const key in this.payload) {
|
||||
const el = this.payload[key] as Recipe.IValue;
|
||||
if (el.setpointHMI != el.setpointPLC) result = true;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
async conferma() {
|
||||
// recipeActions.setCurrent(store, this.recipe);
|
||||
|
||||
await recipeService.Confirm('Options');
|
||||
ModalHelper.HideModal();
|
||||
this.deferred.resolve(1);
|
||||
// ModalHelper.HideModal();
|
||||
// this.deferred.resolve(1);
|
||||
};
|
||||
|
||||
goTo(step) {
|
||||
|
||||
@@ -18,11 +18,15 @@
|
||||
<sottosquadracontrostampo v-if="showOpzioni==2" :recipe="recipe"></sottosquadracontrostampo>
|
||||
</section>
|
||||
<footer>
|
||||
<button class="btn" @click="annulla()">{{'cancel' | localize('Annulla')}}</button>
|
||||
<button
|
||||
class="btn"
|
||||
@click="annulla()"
|
||||
:disabled="!hasChanges()"
|
||||
>{{'cancel' | localize('Annulla')}}</button>
|
||||
<button
|
||||
class="btn btn-success"
|
||||
@click="conferma()"
|
||||
:disabled="hasErrors()"
|
||||
:disabled="hasErrors() || !hasChanges()"
|
||||
>{{'confirm' | localize('Conferma')}}</button>
|
||||
</footer>
|
||||
</modal>
|
||||
|
||||
+19
-7
@@ -11,6 +11,7 @@ import { recipeActions } from "@/store/recipe.store";
|
||||
import { store } from "@/store";
|
||||
import { Deferred } from "@/services";
|
||||
import { recipeService } from "@/services/recipeService";
|
||||
import { debounce } from "@/_base/debounce";
|
||||
|
||||
@Component({ components: { modal: Modal, pirometro: Pirometro, stepfooter: StepFooter, termosuperiore: TermoregolazioneSuperiore, termoinferiore: TermoregolazioneInferiore } })
|
||||
export default class ShowPirometroInfo extends Vue {
|
||||
@@ -29,10 +30,12 @@ export default class ShowPirometroInfo extends Vue {
|
||||
|
||||
@Watch('recipe', { deep: true })
|
||||
async recipeChanged(n, o) {
|
||||
await recipeService.Update(this.preparePayload());
|
||||
}
|
||||
this.debouncedRecipeSave()
|
||||
};
|
||||
|
||||
preparePayload() {
|
||||
debouncedRecipeSave = debounce(async () => await recipeService.Update(this.payload), 200);
|
||||
|
||||
get payload() {
|
||||
return {
|
||||
pyrometer_pyrometer_enabled: this.recipe.pyrometer_pyrometer_enabled,
|
||||
pyrometer_pyrometer_setpoint: this.recipe.pyrometer_pyrometer_setpoint,
|
||||
@@ -57,15 +60,24 @@ export default class ShowPirometroInfo extends Vue {
|
||||
}
|
||||
|
||||
hasErrors() {
|
||||
let payload = this.preparePayload();
|
||||
let payload = this.recipe;
|
||||
let errors = false;
|
||||
for (const key in this.preparePayload()) {
|
||||
for (const key in this.recipe) {
|
||||
const el = payload[key] as Recipe.IValue;
|
||||
if (el.status.hasError) errors = true;
|
||||
}
|
||||
return errors;
|
||||
}
|
||||
|
||||
hasChanges() {
|
||||
let result = false;
|
||||
for (const key in this.payload) {
|
||||
const el = this.payload[key] as Recipe.IValue;
|
||||
if (el.setpointHMI != el.setpointPLC) result = true;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
hasEnabledFields(...fields: string[]) {
|
||||
let result = false;
|
||||
for (const field of fields) {
|
||||
@@ -103,8 +115,8 @@ export default class ShowPirometroInfo extends Vue {
|
||||
// recipeActions.setCurrent(store, this.recipe);
|
||||
|
||||
await recipeService.Confirm('Pyrometer');
|
||||
ModalHelper.HideModal();
|
||||
this.deferred.resolve(1);
|
||||
// ModalHelper.HideModal();
|
||||
// this.deferred.resolve(1);
|
||||
};
|
||||
|
||||
goTo(step) {
|
||||
|
||||
+6
-2
@@ -23,11 +23,15 @@
|
||||
<termosuperiore v-if="show==1" :recipe="recipe"></termosuperiore>
|
||||
<termoinferiore v-if="show==2" :recipe="recipe"></termoinferiore>
|
||||
<footer>
|
||||
<button class="btn" @click="annulla()">{{'cancel' | localize('Annulla')}}</button>
|
||||
<button
|
||||
class="btn"
|
||||
@click="annulla()"
|
||||
:disabled="!hasChanges()"
|
||||
>{{'cancel' | localize('Annulla')}}</button>
|
||||
<button
|
||||
class="btn btn-success"
|
||||
@click="conferma()"
|
||||
:disabled="hasErrors()"
|
||||
:disabled="hasErrors() || !hasChanges()"
|
||||
>{{'confirm' | localize('Conferma')}}</button>
|
||||
</footer>
|
||||
</modal>
|
||||
|
||||
+19
-7
@@ -11,6 +11,7 @@ import { store } from "@/store";
|
||||
import { Prop, Watch } from "vue-property-decorator";
|
||||
import { Deferred } from "@/services";
|
||||
import { recipeService } from "@/services/recipeService";
|
||||
import { debounce } from "@/_base/debounce";
|
||||
|
||||
@Component({
|
||||
components: {
|
||||
@@ -37,10 +38,12 @@ export default class ShowQuoteVelocitaInfo extends Vue {
|
||||
|
||||
@Watch('recipe', { deep: true })
|
||||
async recipeChanged(n, o) {
|
||||
await recipeService.Update(this.preparePayload());
|
||||
}
|
||||
this.debouncedRecipeSave()
|
||||
};
|
||||
|
||||
preparePayload() {
|
||||
debouncedRecipeSave = debounce(async () => await recipeService.Update(this.payload), 200);
|
||||
|
||||
get payload() {
|
||||
return {
|
||||
positions_mould_lower_position: this.recipe.positions_mould_lower_position,
|
||||
positions_mould_lower_speed: this.recipe.positions_mould_lower_speed,
|
||||
@@ -70,15 +73,24 @@ export default class ShowQuoteVelocitaInfo extends Vue {
|
||||
}
|
||||
|
||||
hasErrors() {
|
||||
let payload = this.preparePayload();
|
||||
let payload = this.recipe;
|
||||
let errors = false;
|
||||
for (const key in this.preparePayload()) {
|
||||
for (const key in this.recipe) {
|
||||
const el = payload[key] as Recipe.IValue;
|
||||
if (el.status.hasError) errors = true;
|
||||
}
|
||||
return errors;
|
||||
}
|
||||
|
||||
hasChanges() {
|
||||
let result = false;
|
||||
for (const key in this.payload) {
|
||||
const el = this.payload[key] as Recipe.IValue;
|
||||
if (el.setpointHMI != el.setpointPLC) result = true;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
hasEnabledFields(...fields: string[]) {
|
||||
let result = false;
|
||||
for (const field of fields) {
|
||||
@@ -130,8 +142,8 @@ export default class ShowQuoteVelocitaInfo extends Vue {
|
||||
// recipeActions.setCurrent(store, this.recipe);
|
||||
|
||||
await recipeService.Confirm('Positions');
|
||||
ModalHelper.HideModal();
|
||||
this.deferred.resolve(1);
|
||||
// ModalHelper.HideModal();
|
||||
// this.deferred.resolve(1);
|
||||
};
|
||||
|
||||
goTo(step) {
|
||||
|
||||
+6
-2
@@ -27,11 +27,15 @@
|
||||
<discesacornice v-if="show==1" :recipe="recipe"></discesacornice>
|
||||
<controstampo v-if="show==2" :recipe="recipe"></controstampo>
|
||||
<footer>
|
||||
<button class="btn" @click="annulla()">{{'cancel' | localize('Annulla')}}</button>
|
||||
<button
|
||||
class="btn"
|
||||
@click="annulla()"
|
||||
:disabled="!hasChanges()"
|
||||
>{{'cancel' | localize('Annulla')}}</button>
|
||||
<button
|
||||
class="btn btn-success"
|
||||
@click="conferma()"
|
||||
:disabled="hasErrors()"
|
||||
:disabled="hasErrors() || !hasChanges()"
|
||||
>{{'confirm' | localize('Conferma')}}</button>
|
||||
</footer>
|
||||
</modal>
|
||||
|
||||
+19
-7
@@ -13,6 +13,7 @@ import { recipeActions } from "@/store/recipe.store";
|
||||
import { store } from "@/store";
|
||||
import { Deferred } from '@/services';
|
||||
import { recipeService } from "@/services/recipeService";
|
||||
import { debounce } from '@/_base/debounce';
|
||||
|
||||
@Component({
|
||||
components: {
|
||||
@@ -41,11 +42,13 @@ export default class Raffreddamento extends Vue {
|
||||
|
||||
@Watch('recipe', { deep: true })
|
||||
async recipeChanged(n, o) {
|
||||
await recipeService.Update(this.preparePayload());
|
||||
}
|
||||
this.debouncedRecipeSave()
|
||||
};
|
||||
|
||||
debouncedRecipeSave = debounce(async () => await recipeService.Update(this.payload), 200);
|
||||
|
||||
|
||||
preparePayload() {
|
||||
get payload() {
|
||||
return {
|
||||
cooling_blowing_type: this.recipe.cooling_blowing_type,
|
||||
cooling_blowing_delay: this.recipe.cooling_blowing_delay,
|
||||
@@ -80,15 +83,24 @@ export default class Raffreddamento extends Vue {
|
||||
}
|
||||
|
||||
hasErrors() {
|
||||
let payload = this.preparePayload();
|
||||
let payload = this.recipe;
|
||||
let errors = false;
|
||||
for (const key in this.preparePayload()) {
|
||||
for (const key in this.recipe) {
|
||||
const el = payload[key] as Recipe.IValue;
|
||||
if (el.status.hasError) errors = true;
|
||||
}
|
||||
return errors;
|
||||
}
|
||||
|
||||
hasChanges() {
|
||||
let result = false;
|
||||
for (const key in this.payload) {
|
||||
const el = this.payload[key] as Recipe.IValue;
|
||||
if (el.setpointHMI != el.setpointPLC) result = true;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
hasEnabledFields(...fields: string[]) {
|
||||
let result = false;
|
||||
@@ -150,8 +162,8 @@ export default class Raffreddamento extends Vue {
|
||||
// recipeActions.setCurrent(store, this.recipe);
|
||||
|
||||
await recipeService.Confirm('Cooling');
|
||||
ModalHelper.HideModal();
|
||||
this.deferred.resolve(1);
|
||||
// ModalHelper.HideModal();
|
||||
// this.deferred.resolve(1);
|
||||
};
|
||||
|
||||
goTo(step) {
|
||||
|
||||
+6
-2
@@ -39,11 +39,15 @@
|
||||
<telescopi v-if="show==3" :recipe="recipe"></telescopi>
|
||||
<otturatori v-if="show==4" :recipe="recipe"></otturatori>
|
||||
<footer>
|
||||
<button class="btn" @click="annulla()">{{'cancel' | localize('Annulla')}}</button>
|
||||
<button
|
||||
class="btn"
|
||||
@click="annulla()"
|
||||
:disabled="!hasChanges()"
|
||||
>{{'cancel' | localize('Annulla')}}</button>
|
||||
<button
|
||||
class="btn btn-success"
|
||||
@click="conferma()"
|
||||
:disabled="hasErrors()"
|
||||
:disabled="hasErrors() || !hasChanges()"
|
||||
>{{'confirm' | localize('Conferma')}}</button>
|
||||
</footer>
|
||||
</modal>
|
||||
|
||||
+19
-7
@@ -12,6 +12,7 @@ import { store } from "@/store";
|
||||
import { Deferred } from "@/services";
|
||||
import { recipeService } from "@/services/recipeService";
|
||||
import { warmersService } from "@/services/warmersService";
|
||||
import { debounce } from "@/_base/debounce";
|
||||
|
||||
@Component({ components: { modal: Modal, stepfooter: StepFooter, riscaldiinf: RiscaldiInf, riscaldisup: RiscaldiSup, sostdecomp: SostDecomp } })
|
||||
export default class ShowRiscaldamentoSuperioreInfo extends Vue {
|
||||
@@ -30,10 +31,12 @@ export default class ShowRiscaldamentoSuperioreInfo extends Vue {
|
||||
|
||||
@Watch('recipe', { deep: true })
|
||||
async recipeChanged(n, o) {
|
||||
await recipeService.Update(this.preparePayload());
|
||||
}
|
||||
this.debouncedRecipeSave()
|
||||
};
|
||||
|
||||
preparePayload() {
|
||||
debouncedRecipeSave = debounce(async () => await recipeService.Update(this.payload), 200);
|
||||
|
||||
get payload() {
|
||||
return {
|
||||
heats_lowerheaters_max_time: this.recipe.heats_lowerheaters_max_time,
|
||||
heats_lowerheaters_movement_enabled: this.recipe.heats_lowerheaters_movement_enabled,
|
||||
@@ -54,15 +57,24 @@ export default class ShowRiscaldamentoSuperioreInfo extends Vue {
|
||||
}
|
||||
|
||||
hasErrors() {
|
||||
let payload = this.preparePayload();
|
||||
let payload = this.recipe;
|
||||
let errors = false;
|
||||
for (const key in this.preparePayload()) {
|
||||
for (const key in this.recipe) {
|
||||
const el = payload[key] as Recipe.IValue;
|
||||
if (el.status.hasError) errors = true;
|
||||
}
|
||||
return errors;
|
||||
}
|
||||
|
||||
hasChanges() {
|
||||
let result = false;
|
||||
for (const key in this.payload) {
|
||||
const el = this.payload[key] as Recipe.IValue;
|
||||
if (el.setpointHMI != el.setpointPLC) result = true;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
hasEnabledFields(...fields: string[]) {
|
||||
let result = false;
|
||||
for (const field of fields) {
|
||||
@@ -107,8 +119,8 @@ export default class ShowRiscaldamentoSuperioreInfo extends Vue {
|
||||
await warmersService.Update(store.state.warmers.channels.reduce((p, c) => { p[c.idChannel] = c.setpointHMI; return p; }, {}));
|
||||
await warmersService.Confirm();
|
||||
await recipeService.Confirm('Heats');
|
||||
ModalHelper.HideModal();
|
||||
this.deferred.resolve(1);
|
||||
// ModalHelper.HideModal();
|
||||
// this.deferred.resolve(1);
|
||||
};
|
||||
|
||||
goTo(step) {
|
||||
|
||||
+7
-3
@@ -26,12 +26,16 @@
|
||||
<riscaldiinf v-if="show == 1" :recipe="recipe"></riscaldiinf>
|
||||
<riscaldisup v-if="show == 0" :recipe="recipe"></riscaldisup>
|
||||
<sostdecomp v-if="show == 2" :recipe="recipe"></sostdecomp>
|
||||
<footer>
|
||||
<button class="btn" @click="annulla()">{{'cancel' | localize('Annulla')}}</button>
|
||||
<footer>
|
||||
<button
|
||||
class="btn"
|
||||
@click="annulla()"
|
||||
:disabled="!hasChanges()"
|
||||
>{{'cancel' | localize('Annulla')}}</button>
|
||||
<button
|
||||
class="btn btn-success"
|
||||
@click="conferma()"
|
||||
:disabled="hasErrors()"
|
||||
:disabled="hasErrors() || !hasChanges()"
|
||||
>{{'confirm' | localize('Conferma')}}</button>
|
||||
</footer>
|
||||
</modal>
|
||||
|
||||
@@ -12,6 +12,7 @@ import { recipeActions } from "@/store/recipe.store";
|
||||
import { store } from "@/store";
|
||||
import { Deferred } from "@/services";
|
||||
import { recipeService } from "@/services/recipeService";
|
||||
import { debounce } from "@/_base/debounce";
|
||||
|
||||
@Component({
|
||||
components:
|
||||
@@ -41,10 +42,12 @@ export default class ShowVuotoInfo extends Vue {
|
||||
|
||||
@Watch('recipe', { deep: true })
|
||||
async recipeChanged(n, o) {
|
||||
await recipeService.Update(this.preparePayload());
|
||||
}
|
||||
this.debouncedRecipeSave()
|
||||
};
|
||||
|
||||
preparePayload() {
|
||||
debouncedRecipeSave = debounce(async () => await recipeService.Update(this.payload), 200);
|
||||
|
||||
get payload() {
|
||||
return {
|
||||
vacuum_main_start: this.recipe.vacuum_main_start,
|
||||
vacuum_main_delay: this.recipe.vacuum_main_delay,
|
||||
@@ -82,15 +85,24 @@ export default class ShowVuotoInfo extends Vue {
|
||||
}
|
||||
|
||||
hasErrors() {
|
||||
let payload = this.preparePayload();
|
||||
let payload = this.recipe;
|
||||
let errors = false;
|
||||
for (const key in this.preparePayload()) {
|
||||
for (const key in this.recipe) {
|
||||
const el = payload[key] as Recipe.IValue;
|
||||
if (el.status.hasError) errors = true;
|
||||
}
|
||||
return errors;
|
||||
}
|
||||
|
||||
hasChanges() {
|
||||
let result = false;
|
||||
for (const key in this.payload) {
|
||||
const el = this.payload[key] as Recipe.IValue;
|
||||
if (el.setpointHMI != el.setpointPLC) result = true;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
hasEnabledFields(...fields: string[]) {
|
||||
let result = false;
|
||||
for (const field of fields) {
|
||||
@@ -154,8 +166,8 @@ export default class ShowVuotoInfo extends Vue {
|
||||
// recipeActions.setCurrent(store, this.recipe);
|
||||
|
||||
await recipeService.Confirm('Vacuum');
|
||||
ModalHelper.HideModal();
|
||||
this.deferred.resolve(1);
|
||||
// ModalHelper.HideModal();
|
||||
// this.deferred.resolve(1);
|
||||
};
|
||||
|
||||
goTo(step) {
|
||||
|
||||
@@ -33,11 +33,15 @@
|
||||
<vuotoausiliario v-if="show==2" :recipe="recipe"></vuotoausiliario>
|
||||
<prevuoto v-if="show==3" :recipe="recipe"></prevuoto>
|
||||
<footer>
|
||||
<button class="btn" @click="annulla()">{{'cancel' | localize('Annulla')}}</button>
|
||||
<button
|
||||
class="btn"
|
||||
@click="annulla()"
|
||||
:disabled="!hasChanges()"
|
||||
>{{'cancel' | localize('Annulla')}}</button>
|
||||
<button
|
||||
class="btn btn-success"
|
||||
@click="conferma()"
|
||||
:disabled="hasErrors()"
|
||||
:disabled="hasErrors() || !hasChanges()"
|
||||
>{{'confirm' | localize('Conferma')}}</button>
|
||||
</footer>
|
||||
</modal>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import Vue from "vue";
|
||||
import Component from "vue-class-component";
|
||||
import ProcessInfo from "@/modules/base-components/process-info.vue";
|
||||
import { AppModel, buttonStatus } from "@/store";
|
||||
import { AppModel, buttonStatus, store } from "@/store";
|
||||
import { /*Factory,*/ messageService } from "@/_base";
|
||||
//import { Hub } from "src/services/hub";
|
||||
//import { Watch } from "vue-property-decorator";
|
||||
@@ -11,6 +11,11 @@ import { Prop } from "vue-property-decorator";
|
||||
import Archinterface from "@/app_modules_thermo/components/arch-interface/arch-interface.vue";
|
||||
import { recipeService } from "@/services/recipeService";
|
||||
|
||||
import saveAsModal from "@/app_modules_thermo/save/save.vue";
|
||||
import changeNotesModal from "@/app_modules_thermo/save/changeNotes.vue";
|
||||
import { ModalHelper } from "@/components/modals";
|
||||
import { recipeStore } from "@/store/recipe.store";
|
||||
|
||||
|
||||
declare let $: any;
|
||||
|
||||
@@ -23,6 +28,8 @@ declare let $: any;
|
||||
export default class AppHeader extends Vue {
|
||||
$store: any;
|
||||
|
||||
showSaveAsMenu: boolean = false;
|
||||
|
||||
public get state() { return this.$store.state.machineStatus; };
|
||||
public get isMainViewLiftedUp() { return this.$store.state.isMainViewLiftedUp; }
|
||||
public get mainStatus() { return this.$store.getters.mainStatus; };
|
||||
@@ -84,6 +91,16 @@ export default class AppHeader extends Vue {
|
||||
}
|
||||
}
|
||||
|
||||
public async showSaveAsModal() {
|
||||
let result = await ModalHelper.ShowModalAsync(saveAsModal, (this.$store.state as AppModel).prod.panel.nomeRicetta);
|
||||
await recipeService.SaveAs(result);
|
||||
}
|
||||
|
||||
public async showChangeNoteModal() {
|
||||
let result = await ModalHelper.ShowModalAsync(changeNotesModal, "");
|
||||
await recipeService.UpdateNotes(result);
|
||||
}
|
||||
|
||||
public get ribbonStatus(): ribbonStatusEnum {
|
||||
|
||||
// Controllo se ci sono allarmi
|
||||
@@ -93,7 +110,6 @@ export default class AppHeader extends Vue {
|
||||
if (s.alarms.warnings.length > 0) return ribbonStatusEnum.Warning;
|
||||
if (s.process.running) return ribbonStatusEnum.Working;
|
||||
return ribbonStatusEnum.Idle;
|
||||
|
||||
}
|
||||
|
||||
public get serviceRequired() {
|
||||
@@ -113,7 +129,6 @@ export default class AppHeader extends Vue {
|
||||
// Hub.Current.sendPowerCommand(btn.id);
|
||||
}
|
||||
|
||||
|
||||
async saveRecipe() {
|
||||
await recipeService.Save();
|
||||
}
|
||||
|
||||
@@ -159,6 +159,24 @@
|
||||
<button class="over blue" :title="'recipe_save' | localize('save')" @click="saveRecipe()">
|
||||
<i class="fa fa-save"></i>
|
||||
</button>
|
||||
<div class="context-menu">
|
||||
<button
|
||||
class="over blue"
|
||||
:title="'recipe_saveas_button' | localize('saveas-button')"
|
||||
@click="showSaveAsMenu = !showSaveAsMenu"
|
||||
>
|
||||
<i class="fa fa-ellipsis-h"></i>
|
||||
</button>
|
||||
<ul class="context-area" :class="{'show': showSaveAsMenu}">
|
||||
<li
|
||||
@click="showSaveAsMenu = false; showSaveAsModal()"
|
||||
>{{'recipe_saveas' | localize('Salva con nome')}}</li>
|
||||
<li
|
||||
@click="showSaveAsMenu = false; showChangeNoteModal()"
|
||||
>{{'recipe_change_note' | localize('Modifica nota')}}</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<archinterface></archinterface>
|
||||
<user-info></user-info>
|
||||
</header>
|
||||
|
||||
@@ -86,5 +86,10 @@ export class RecipeService extends baseRestService {
|
||||
return result;
|
||||
}
|
||||
|
||||
async UpdateNotes(note: string) {
|
||||
let result = await this.Post<any>((await this.BASE_URL()) + `updateNote?recipeNotes=${note}`, null, true);
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
export const recipeService = new RecipeService();
|
||||
|
||||
Reference in New Issue
Block a user