Merge branch 'new/UnderTheHood' of https://bitbucket.org/ncarminati/cms_thermo_active into new/UnderTheHood

This commit is contained in:
Thermo_SIM
2021-02-06 10:39:56 +01:00
25 changed files with 461 additions and 814 deletions
@@ -21,11 +21,26 @@ namespace Thermo.Active.Model.DTOModels.ThIO
{
if (!(obj is DigitalIN item))
return false;
if (Id != item.Id)
return false;
if (Bank != item.Bank)
return false;
if (Position != item.Position)
return false;
if (Page != item.Page)
return false;
if (Wire != Wire)
return false;
if (Profinet != item.Profinet)
return false;
if (Label != item.Label)
return false;
if (Visible != item.Visible)
return false;
if (Value != item.Value)
return false;
return base.Equals((IoItemConf)obj);
return true;
}
/// <summary>
/// Hash gen
@@ -45,10 +60,26 @@ namespace Thermo.Active.Model.DTOModels.ThIO
if (!(obj is AnalogIN item))
return false;
if (Id != item.Id)
return false;
if (Bank != item.Bank)
return false;
if (Position != item.Position)
return false;
if (Page != item.Page)
return false;
if (Wire != Wire)
return false;
if (Profinet != item.Profinet)
return false;
if (Label != item.Label)
return false;
if (Visible != item.Visible)
return false;
if (Value != item.Value)
return false;
return base.Equals((IoItemConf)obj);
return true;
}
/// <summary>
/// Hash gen
@@ -71,6 +102,24 @@ namespace Thermo.Active.Model.DTOModels.ThIO
if (!(obj is DigitalOUT item))
return false;
if (Id != item.Id)
return false;
if (Bank != item.Bank)
return false;
if (Position != item.Position)
return false;
if (Page != item.Page)
return false;
if (Wire != Wire)
return false;
if (Profinet != item.Profinet)
return false;
if (Label != item.Label)
return false;
if (Visible != item.Visible)
return false;
if (Value != item.Value)
return false;
if (ForceEnabled != item.ForceEnabled)
return false;
if (ForceZero != item.ForceZero)
@@ -80,7 +129,7 @@ namespace Thermo.Active.Model.DTOModels.ThIO
if (IsForced != item.IsForced)
return false;
return base.Equals((DigitalIN)obj);
return true;
}
/// <summary>
/// Hash gen
@@ -102,6 +151,24 @@ namespace Thermo.Active.Model.DTOModels.ThIO
if (!(obj is AnalogOUT item))
return false;
if (Id != item.Id)
return false;
if (Bank != item.Bank)
return false;
if (Position != item.Position)
return false;
if (Page != item.Page)
return false;
if (Wire != Wire)
return false;
if (Profinet != item.Profinet)
return false;
if (Label != item.Label)
return false;
if (Visible != item.Visible)
return false;
if (Value != item.Value)
return false;
if (ForceEnabled != item.ForceEnabled)
return false;
if (ForcedValue != item.ForcedValue)
@@ -109,7 +176,7 @@ namespace Thermo.Active.Model.DTOModels.ThIO
if (IsForced != item.IsForced)
return false;
return base.Equals((AnalogIN)obj);
return true;
}
/// <summary>
/// Hash gen
@@ -19,13 +19,15 @@ namespace Thermo.Active.Model.DTOModels.ThIO
public override bool Equals(object obj)
{
if (!(obj is DigitalIN item))
if (!(obj is DigInVal item))
return false;
if (Id != item.Id)
return false;
if (Value != item.Value)
return false;
return base.Equals((IoItemConf)obj);
return true;
}
/// <summary>
/// Hash gen
@@ -42,13 +44,15 @@ namespace Thermo.Active.Model.DTOModels.ThIO
public override bool Equals(object obj)
{
if (!(obj is AnalogIN item))
if (!(obj is AnalInVal item))
return false;
if (Id != item.Id)
return false;
if (Value != item.Value)
return false;
return base.Equals((IoItemConf)obj);
return true;
}
/// <summary>
/// Hash gen
@@ -68,9 +72,11 @@ namespace Thermo.Active.Model.DTOModels.ThIO
public override bool Equals(object obj)
{
if (!(obj is DigitalOUT item))
if (!(obj is DigOutVal item))
return false;
if (Id != item.Id)
return false;
if (ForceEnabled != item.ForceEnabled)
return false;
if (ForceZero != item.ForceZero)
@@ -79,8 +85,10 @@ namespace Thermo.Active.Model.DTOModels.ThIO
return false;
if (IsForced != item.IsForced)
return false;
if (Value != item.Value)
return false;
return base.Equals((DigitalIN)obj);
return true;
}
/// <summary>
/// Hash gen
@@ -99,17 +107,21 @@ namespace Thermo.Active.Model.DTOModels.ThIO
public override bool Equals(object obj)
{
if (!(obj is AnalogOUT item))
if (!(obj is AnalOutVal item))
return false;
if (Id != item.Id)
return false;
if (ForceEnabled != item.ForceEnabled)
return false;
if (ForcedValue != item.ForcedValue)
return false;
if (IsForced != item.IsForced)
return false;
if (Value != item.Value)
return false;
return base.Equals((AnalogIN)obj);
return true;
}
/// <summary>
/// Hash gen
@@ -562,7 +562,7 @@ namespace Thermo.Active.Listeners.SignalR
{
// recupero
var element = LastChannelsIoData.DI.Find(x => x.Id == item.Id);
if ((element == null) || (!item.Value.Equals(element)))
if ((element == null) || (!item.Equals(element)))
{
diffChannelsData.DI.Add(item);
}
@@ -572,7 +572,7 @@ namespace Thermo.Active.Listeners.SignalR
{
// recupero
var element = LastChannelsIoData.DO.Find(x => x.Id == item.Id);
if ((element == null) || (!item.Value.Equals(element)))
if ((element == null) || (!item.Equals(element)))
{
diffChannelsData.DO.Add(item);
}
@@ -582,7 +582,7 @@ namespace Thermo.Active.Listeners.SignalR
{
// recupero
var element = LastChannelsIoData.AI.Find(x => x.Id == item.Id);
if ((element == null) || (!item.Value.Equals(element)))
if ((element == null) || (!item.Value.Equals(element.Value)))
{
diffChannelsData.AI.Add(item);
}
@@ -592,7 +592,7 @@ namespace Thermo.Active.Listeners.SignalR
{
// recupero
var element = LastChannelsIoData.AO.Find(x => x.Id == item.Id);
if ((element == null) || (!item.Value.Equals(element)))
if ((element == null) || (!item.Value.Equals(element.Value)))
{
diffChannelsData.AO.Add(item);
}
@@ -602,10 +602,10 @@ namespace Thermo.Active.Listeners.SignalR
if (diffChannelsData.DI.Count + diffChannelsData.DO.Count + diffChannelsData.AI.Count + diffChannelsData.AO.Count > 0)
{
// salvo update CLONANDO
LastChannelsIoData.DI = currChannelsIoData.DI.Clone();
LastChannelsIoData.DO = currChannelsIoData.DO.Clone();
LastChannelsIoData.AI = currChannelsIoData.AI.Clone();
LastChannelsIoData.AO = currChannelsIoData.AO.Clone();
LastChannelsIoData.DI = currChannelsIoData.DI;
LastChannelsIoData.DO = currChannelsIoData.DO;
LastChannelsIoData.AI = currChannelsIoData.AI;
LastChannelsIoData.AO = currChannelsIoData.AO;
var context = GlobalHost.ConnectionManager.GetHubContext<NcHub>();
context.Clients.Group("ncData").channelsIoVal(diffChannelsData);
}
@@ -662,6 +662,8 @@ namespace Thermo.Active.Listeners.SignalR
group.headsData(LastHeadsData);
// Send Axis Info data
group.axisInfo(LastAxisInfoData);
// Send Axis Info data
group.SendThermoChannelsIoData(LastChannelsIoData);
// Send active program data
group.activeProgramData(LastProgramData);
// Send magazine is active data
+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("1.1.156")]
[assembly: AssemblyVersion("1.1.158")]
@@ -1,3 +1,4 @@
import { TimeLineChartHeader } from "@/components/timeline-chart";
import { debounce } from "@/_base/debounce";
import Vue from "vue";
import Component from "vue-class-component";
@@ -103,6 +104,8 @@ export default class Numeric extends Vue {
this.focused = false;
this.value.setpointHMI = this.setPoint.setpointHMI;
})
this.$emit("update", this.setPoint.setpointHMI);
}
}
@@ -1,9 +1,7 @@
<template>
<div class="main-container">
<div class="column-page">
<AssiTable></AssiTable>
</div>
</div>
<div class="column-page-one-column">
<AssiTable></AssiTable>
</div>
</template>
<style lang="less">
@import "assi.less";
@@ -1,551 +1,102 @@
@import "../../../../variable.less";
.log-assi-table {
width: 1384px;
height: 886px;
margin: 20px 20px 0 20px;
tbody {
height: 752px;
.assi-table {
th,
td {
width: 114px;
max-width: 114px;
&.assi-axis {
width: 183px;
max-width: 183px;
}
&.velocity {
width: 63px;
max-width: 63px;
}
&.position {
width: 63px;
max-width: 63px;
}
&.assi-buttons {
width: 445px;
max-width: 445px;
}
}
thead {
width: 1400px;
height: 34px;
opacity: 0.5;
.fill-under-grey-3-2 {
background-color: @fill-under-grey-3-2;
}
.fill-under-grey-1-2 {
background-color: @fill-under-grey-1-2;
}
th {
display: inline-block;
}
tbody {
vertical-align: unset;
border-color: unset;
tr {
display: table;
}
}
}
.fill-under-grey-3-2 {
background-color: @fill-under-grey-3-2;
}
.fill-under-grey-1-2 {
background-color: @fill-under-grey-1-2;
}
.axis-assi {
width: 63px;
height: 12px;
margin: 10px 0px 12px 9px;
font-size: 14px;
font-weight: normal;
font-stretch: normal;
font-style: normal;
line-height: 0.86;
letter-spacing: normal;
color: @white;
text-align: left !important;
float: left;
&-inner {
}
}
.position-assi {
width: 63px;
height: 12px;
margin: 10px 0px 12px 111px;
font-size: 14px;
font-weight: normal;
font-stretch: normal;
font-style: normal;
line-height: 0.86;
letter-spacing: normal;
text-align: left !important;
float: left;
color: @white;
&-inner {
}
}
.velocity-assi {
width: 63px;
height: 12px;
margin: 10px 0 12px 60px;
font-size: 14px;
font-weight: normal;
font-stretch: normal;
font-style: normal;
line-height: 0.86;
letter-spacing: normal;
text-align: left !important;
float: left;
color: @white;
&-inner {
}
}
.torque-assi {
width: 114px;
height: 12px;
margin: 10px 0px 12px 34px;
font-size: 14px;
font-weight: normal;
font-stretch: normal;
font-style: normal;
line-height: 0.86;
letter-spacing: normal;
text-align: center;
text-align: left !important;
color: @white;
&-inner {
width: 253px;
height: 16px;
margin: 24px 69px 24px 142px;
font-size: 14px;
font-weight: normal;
font-stretch: normal;
font-style: normal;
line-height: normal;
letter-spacing: normal;
float: left;
text-align: initial;
color: @very-light-pink;
}
}
.status-assi {
width: 114px;
height: 12px;
margin: 10px 0px 12px 7px;
font-size: 14px;
font-weight: normal;
font-stretch: normal;
font-style: normal;
line-height: 0.86;
letter-spacing: normal;
text-align: center;
text-align: left !important;
color: @white;
&-inner {
}
}
.error-code-assi {
width: 114px;
height: 12px;
margin: 0 34px 0 13px;
font-size: 14px;
font-weight: normal;
font-stretch: normal;
font-style: normal;
line-height: 0.86;
letter-spacing: normal;
text-align: center;
text-align: left !important;
color: @white;
&-inner {
}
}
.fase-motion-assi {
width: 114px;
height: 12px;
margin: 10px 430px 12px 0px;
font-size: 14px;
font-weight: normal;
font-stretch: normal;
font-style: normal;
line-height: 0.86;
letter-spacing: normal;
text-align: center;
text-align: left !important;
color: @white;
&-inner {
}
}
.tr-zero-level {
width: 1400px;
.icon-toggle {
width: 16px;
height: 16px;
margin: 20px 0px 23px 7px;
float: left;
.icon-closed {
width: 16px;
height: 11px;
width: 0;
height: 0;
border-left: 8px solid transparent;
border-right: 8px solid transparent;
border-top: 8px solid @white;
cursor: pointer;
}
.icon-open {
width: 16px;
height: 11px;
width: 0;
height: 0;
border-top: 8px solid transparent;
border-bottom: 8px solid transparent;
border-left: 8px solid @white;
cursor: pointer;
}
}
.axis {
width: 21px;
height: 16px;
margin: 24px 0px 24px 10px;
font-size: 14px;
font-weight: bold;
font-stretch: normal;
font-style: normal;
line-height: normal;
letter-spacing: normal;
float: left;
color: @very-light-pink;
}
.position {
width: 42px;
height: 16px;
margin: 24px 0px 24px 133px;
font-size: 14px;
font-weight: normal;
font-stretch: normal;
font-style: normal;
line-height: normal;
letter-spacing: normal;
text-align: center;
float: left;
color: @very-light-pink;
}
.velocity {
width: 25px;
height: 16px;
margin: 24px 0px 24px 95px;
font-size: 14px;
font-weight: normal;
font-stretch: normal;
font-style: normal;
line-height: normal;
letter-spacing: normal;
text-align: center;
float: left;
color: @very-light-pink;
}
.torque {
width: 58px;
height: 16px;
margin: 24px 0px 24px 55px;
font-size: 14px;
font-weight: normal;
font-stretch: normal;
font-style: normal;
line-height: normal;
letter-spacing: normal;
text-align: center !important;
float: left;
color: @very-light-pink;
}
.status {
width: 58px;
height: 16px;
margin: 24px 0px 24px 42px;
font-size: 14px;
font-weight: normal;
font-stretch: normal;
font-style: normal;
line-height: normal;
letter-spacing: normal;
text-align: right;
float: left;
color: @very-light-pink;
}
.error-code {
width: 21px;
height: 16px;
margin: 24px 0px 24px 100px;
font-size: 14px;
font-weight: normal;
font-stretch: normal;
font-style: normal;
line-height: normal;
letter-spacing: normal;
text-align: center;
float: left;
color: @very-light-pink;
}
.fase-motion {
width: 21px;
height: 16px;
margin: 24px 0px 24px 119px;
font-size: 14px;
font-weight: normal;
font-stretch: normal;
font-style: normal;
line-height: normal;
letter-spacing: normal;
text-align: center;
float: left;
color: @very-light-pink;
}
}
.tr-n-level {
margin-left: 33px;
width: 1370px;
.axis {
width: 23px;
height: 16px;
margin: 24px 0px 24px 19px;
font-size: 14px;
font-weight: bold;
font-stretch: normal;
font-style: normal;
line-height: normal;
letter-spacing: normal;
float: left;
color: @very-light-pink;
}
.position {
width: 45px;
height: 16px;
margin: 24px 0px 24px 110px;
font-size: 14px;
font-weight: normal;
font-stretch: normal;
font-style: normal;
line-height: normal;
letter-spacing: normal;
text-align: center;
float: left;
color: @very-light-pink;
}
.velocity {
width: 26px;
height: 16px;
margin: 24px 0px 24px 94px;
font-size: 14px;
font-weight: normal;
font-stretch: normal;
font-style: normal;
line-height: normal;
letter-spacing: normal;
text-align: center;
float: left;
color: @very-light-pink;
}
.torque {
width: 55px;
height: 16px;
margin: 24px 0px 24px 55px;
font-size: 14px;
font-weight: normal;
font-stretch: normal;
font-style: normal;
line-height: normal;
letter-spacing: normal;
text-align: center;
float: left;
color: @very-light-pink;
}
.status {
width: 43px;
height: 16px;
margin: 24px 0px 24px 59px;
font-size: 14px;
font-weight: normal;
font-stretch: normal;
font-style: normal;
line-height: normal;
letter-spacing: normal;
text-align: right;
float: left;
color: @very-light-pink;
}
.error-code {
width: 21px;
height: 16px;
margin: 24px 0px 24px 100px;
font-size: 14px;
font-weight: normal;
font-stretch: normal;
font-style: normal;
line-height: normal;
letter-spacing: normal;
text-align: center;
float: left;
color: @very-light-pink;
}
.fase-motion {
width: 42px;
height: 16px;
margin: 24px 40px 24px 119px;
font-size: 14px;
font-weight: normal;
font-stretch: normal;
font-style: normal;
line-height: normal;
letter-spacing: normal;
text-align: center;
float: left;
color: @very-light-pink;
}
}
.button-align {
width: 81px;
height: 48px;
object-fit: contain;
margin: 8px 0 8px 100px;
border-radius: 2px;
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
background-image: linear-gradient(to bottom, #818a8f 0%, #42494e 98%);
&-label {
width: 44px;
height: 21px;
padding: 14px 18px 13px 19px;
object-fit: contain;
font-size: 18px;
font-weight: 500;
font-stretch: normal;
font-style: normal;
line-height: normal;
letter-spacing: normal;
text-align: center;
color: @very-light-pink;
}
}
.button-slaves-position {
width: 205px;
height: 48px;
margin-left: 10px;
object-fit: contain;
border-radius: 2px;
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
background-image: linear-gradient(to bottom, #818a8f 0%, #42494e 98%);
&-label {
width: 168px;
height: 21px;
padding: 14px 18px 13px 19px;
object-fit: contain;
font-size: 18px;
font-weight: 500;
font-stretch: normal;
font-style: normal;
line-height: normal;
letter-spacing: normal;
text-align: center;
color: @very-light-pink;
}
}
.button-probe {
width: 89px;
height: 48px;
margin: 0 18px 0 10px;
object-fit: contain;
border-radius: 2px;
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
background-image: linear-gradient(to bottom, #818a8f 0%, #42494e 98%);
&-label {
width: 52px;
height: 21px;
padding: 14px 18px 13px 19px;
object-fit: contain;
font-size: 18px;
font-weight: 500;
font-stretch: normal;
font-style: normal;
line-height: normal;
letter-spacing: normal;
text-align: center;
color: @very-light-pink;
}
}
.controlli-button-group-container {
display: inline-block;
margin-left: 30px;
margin-right: 187px;
.controlli-button-group-n {
position: relative;
.axis-container {
display: flex;
align-items: center;
.button-control-minus {
width: 48px;
height: 48px;
margin: 8px;
display: flex;
justify-content: center;
object-fit: contain;
border-radius: 2px;
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
background-image: linear-gradient(to bottom, #818a8f 0%, #42494e 98%);
.fa {
font-size: 30px;
padding: 5px;
}
}
.button-control-plus {
width: 48px;
height: 48px;
margin: 8px;
display: flex;
justify-content: center;
object-fit: contain;
border-radius: 2px;
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
background-image: linear-gradient(to bottom, #818a8f 0%, #42494e 98%);
}
.controlli-field {
width: 106px;
height: 48px;
.buttons-container {
display: inline-flex;
margin: 0 0 0 10px;
}
.buttons-container {
> button {
cursor: pointer;
border: none;
margin: 0px 8px 0px 8px;
display: flex;
justify-content: center;
align-items: center;
border-radius: 2px;
box-shadow: 0 1px 3px 0 @black-50;
background-color: @very-light-pink-two;
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
background-image: linear-gradient(to bottom, #818a8f 0%, #42494e 98%);
}
}
.button-align-probe {
width: 81px;
height: 48px;
> label {
cursor: pointer;
font-size: 18px;
color: @very-light-pink;
}
}
.button-slaves-position {
width: 205px;
height: 48px;
> label {
cursor: pointer;
font-size: 18px;
color: @very-light-pink;
}
}
.assi-input-container {
display: flex;
align-items: center;
input {
width: 106px;
height: 48px;
background-color: #dddddd;
box-shadow: inset 0 1px 3px 0 rgb(0 0 0 / 50%);
border: none;
box-sizing: border-box;
font-size: 18px;
font-weight: bold;
padding: 0 10px;
color: #4b4b4b;
text-align: right;
}
}
tbody {
.tr-n-level {
margin-left: 33px;
}
}
}
.button-control-value-label {
margin: 8px 8px 8px 8px;
}
.controlli-button-minus-icon {
margin-top: 4px;
}
.controlli-button-plus-icon {
margin-top: 4px;
}
.controlli {
object-fit: contain;
}
@@ -32,39 +32,39 @@ export default class AssiTable extends Vue {
errorCode: 150,
faseMotion: 123654
},
{
axis: "W3",
group: "W",
level: 1,
position: 227.71,
velocity: 374,
torque: "0.85 Nm",
status: "Upper",
errorCode: 150,
faseMotion: 123654
},
{
axis: "Z1",
group: "Z",
level: 0,
position: 227.71,
velocity: 374,
torque: "0.85 Nm",
status: "Upper",
errorCode: 150,
faseMotion: 123654
},
{
axis: "Z2",
group: "Z",
level: 1,
position: 227.71,
velocity: 374,
torque: "0.85 Nm",
status: "Upper",
errorCode: 150,
faseMotion: 123654
}
// {
// axis: "W3",
// group: "W",
// level: 1,
// position: 227.71,
// velocity: 374,
// torque: "0.85 Nm",
// status: "Upper",
// errorCode: 150,
// faseMotion: 123654
// },
// {
// axis: "Z1",
// group: "Z",
// level: 0,
// position: 227.71,
// velocity: 374,
// torque: "0.85 Nm",
// status: "Upper",
// errorCode: 150,
// faseMotion: 123654
// },
// {
// axis: "Z2",
// group: "Z",
// level: 1,
// position: 227.71,
// velocity: 374,
// torque: "0.85 Nm",
// status: "Upper",
// errorCode: 150,
// faseMotion: 123654
// }
];
this.groupReduce(this.data);
}
@@ -1,176 +1,107 @@
<template>
<div>
<table class="log-assi-table">
<thead>
<tr>
<th class="axis-assi">Axis</th>
<th class="position-assi">Position</th>
<th class="velocity-assi">Velocity</th>
<th class="torque-assi">Torque</th>
<th class="status-assi">Status</th>
<th class="error-code-assi">Error Code</th>
<th class="fase-motion-assi">Fase Motion</th>
</tr>
</thead>
<tbody>
<div v-for="group of groupedData" :key="group.level">
<div v-for="(item, index) of group" :key="`${item.axis}_${index}`">
<tr
v-if="item.level === 0"
:class="[
index % 2 === 0
? 'tr-zero-level fill-under-grey-3-2'
: 'tr-zero-level fill-under-grey-1-2'
]"
>
<td data-toggle="toggle">
<span class="icon-toggle">
<span
v-if="groupVisible.includes(item.group)"
class="icon-closed"
@click="openCollapse(item.group)"
></span>
<span
v-else
class="icon-open"
@click="openCollapse(item.group)"
></span>
</span>
</td>
<td>
<span class="axis">
{{ item.axis }}
</span>
</td>
<td>
<span class="position">
{{ item.position }}
</span>
</td>
<td>
<span class="velocity">
{{ item.velocity }}
</span>
</td>
<td>
<span class="torque">
{{ item.torque }}
</span>
</td>
<td>
<span class="status">
{{ item.status }}
</span>
</td>
<td>
<span class="error-code">
{{ item.errorCode }}
</span>
</td>
<td>
<span class="fase-motion">
{{ item.faseMotion }}
</span>
</td>
<td class="">
<span class="button-align pointer">
<span class="button-align-label">Align</span>
</span>
<span class="button-slaves-position pointer">
<span class="button-slaves-position-label"
>Set Slaves Position</span
>
</span>
<span class="button-probe pointer">
<span class="button-probe-label">Probe</span>
</span>
</td>
</tr>
<tr
v-else-if="groupVisible.includes(item.group)"
:ref="`${item.axis.charAt(0)}`"
:class="[
<div class="one-column-table-container scrollable">
<table class="assi-table">
<thead>
<tr>
<th class="assi-axis">Axis</th>
<th class="position">Position</th>
<th class="velocity">Velocity</th>
<th>Torque</th>
<th>Status</th>
<th>Error Code</th>
<th class="fase-motion">Fase Motion</th>
<th class="assi-buttons"></th>
</tr>
</thead>
<tbody>
<template v-for="group of groupedData">
<template v-for="(item, index) of group">
<tr v-if="item.level === 0" :key="`${item.axis}_${index}`">
<td>
<span class="axis-container">
<i
v-if="groupVisible.includes(item.group)"
@click="openCollapse(item.group)"
class="fa fa-caret-down"
></i>
<i v-else @click="openCollapse(item.group)" class="fa fa-caret-right"></i>
{{ item.axis }}
</span>
</td>
<td>{{ item.position }}</td>
<td>{{ item.velocity }}</td>
<td>{{ item.torque }}</td>
<td>{{ item.status }}</td>
<td>{{ item.errorCode }}</td>
<td>{{ item.faseMotion }}</td>
<td>
<span class="buttons-container">
<button class="button-align-probe">
<label>Align</label>
</button>
<button class="button-slaves-position">
<label>Set slaves position</label>
</button>
<button class="button-align-probe">
<label>Probe</label>
</button>
</span>
</td>
</tr>
<tr
v-else-if="groupVisible.includes(item.group)"
:key="`${item.axis}_${index}`"
:ref="`${item.axis.charAt(0)}`"
:class="[
index % 2 === 0
? 'tr-n-level fill-under-grey-3-2'
: 'tr-n-level fill-under-grey-1-2'
]"
>
<td>
<span class="axis">
{{ item.axis }}
</span>
</td>
<td>
<span class="position">
{{ item.position }}
</span>
</td>
<td>
<span class="velocity">
{{ item.velocity }}
</span>
</td>
<td>
<span class="torque">
{{ item.torque }}
</span>
</td>
<td>
<span class="status">
{{ item.status }}
</span>
</td>
<td>
<span class="error-code">
{{ item.errorCode }}
</span>
</td>
<td>
<span class="fase-motion">
{{ item.faseMotion }}
</span>
</td>
<td>
<div class="controlli-button-group-container">
<span class="controlli-button-group-n">
<span class="button-control-minus pointer">
<span class="controlli-button-minus-icon">
<img
src="assets/icons/sotto-cofano/png/ico-bt-minus.png"
srcset="
assets/icons/sotto-cofano/png/ico-bt-minus@2x.png 2x,
assets/icons/sotto-cofano/png//ico-bt-minus@3x.png 3x
"
class="icobt-"
/>
</span>
</span>
<span class="controlli">
<span class="controlli-field">
<span class="label">00000</span>
</span>
</span>
<span class="button-control-plus pointer">
<span class="controlli-button-plus-icon">
<img
src="assets/icons/sotto-cofano/png/ico-bt-plus.png"
srcset="
assets/icons/sotto-cofano/png/ico-bt-plus@2x.png 2x,
assets/icons/sotto-cofano/png/ico-bt-plus@3x.png 3x
"
class="icobt-"
/>
</span>
</span>
</span>
</div>
</td>
</tr>
</div>
</div>
</tbody>
</table>
</div>
>
<td>
<span>{{ item.axis }}</span>
</td>
<td>
<span>{{ item.position }}</span>
</td>
<td>
<span>{{ item.velocity }}</span>
</td>
<td>
<span>{{ item.torque }}</span>
</td>
<td>
<span>{{ item.status }}</span>
</td>
<td>
<span>{{ item.errorCode }}</span>
</td>
<td>
<span>{{ item.faseMotion }}</span>
</td>
<td>
<span class="buttons-container">
<button class="pointer">
<span class="controlli-icon pointer">
<img src="assets/icons/sotto-cofano/png/ico-bt-minus.png" />
</span>
</button>
<div class="assi-input-container">
<input />
</div>
<button class="pointer">
<span class="controlli-icon pointer">
<img src="assets/icons/sotto-cofano/png/ico-bt-plus.png" />
</span>
</button>
</span>
</td>
</tr>
</template>
</template>
</tbody>
</table>
</div>
</template>
<style lang="less">
@import "assi-table.less";
@@ -1,6 +1,7 @@
import Component from "vue-class-component";
import Vue from "vue";
import { Prop } from "vue-property-decorator";
import { Prop, Watch } from "vue-property-decorator";
import { underTheHoodService } from "@/services/underTheHoodService";
@Component({})
export default class outputRow extends Vue {
@@ -14,4 +15,19 @@ export default class outputRow extends Vue {
@Prop()
group: string;
get forcedValue() { return { setpointHMI: this.item.forcedValue, range: { min: -32768, max: 32767 } }; }
forceValueChanged(n) {
this.force(n);
}
async force(value: number) {
await underTheHoodService.forceChannel(this.group, this.item, value);
}
async reset() {
await underTheHoodService.resetChannel(this.group, this.item);
}
}
@@ -38,21 +38,29 @@
<span v-if="item.value == 0" class="value-button-input-container-off-label">OFF</span>
</span>
</td>
<td v-if="group=='ao'" class="ao">
<span>{{item.value}}</span>
</td>
<td>
<div class="do-container">
<div class="io-buttons" v-if="group=='do'">
<button :class="{forced: item.forceZero}">0</button>
<button :class="{forced: item.forceOne}">1</button>
<template v-if="item.forceEnabled">
<td v-if="group=='ao'" class="ao">
<span>{{item.value}}</span>
</td>
<td>
<div class="do-container">
<div class="io-buttons" v-if="group=='do'">
<button :class="{forced: item.forceZero}" @click="force( 0)">0</button>
<button :class="{forced: item.forceOne}" @click="force( 1)">1</button>
</div>
<numeric
v-model="forcedValue"
v-if="group=='ao'"
keyboard-position="left"
@update="forceValueChanged"
/>
<button class="btn-force" v-if="item.isForced" @click="reset()">
<i class="fa fa-times" />
</button>
</div>
<input v-model="item.forcedValue" v-if="group=='ao'" />
<button class="btn-force" v-if="item.isForced">
<i class="fa fa-times" />
</button>
</div>
</td>
</td>
</template>
<td v-else></td>
</tr>
</template>
<script src="./output-row-item.ts" lang="ts">
@@ -1,9 +1,7 @@
<template>
<div class="main-container">
<div class="column-page-one-column">
<LogCicloAutomaticoTable></LogCicloAutomaticoTable>
</div>
</div>
<div class="column-page-one-column">
<LogCicloAutomaticoTable></LogCicloAutomaticoTable>
</div>
</template>
<style lang="less">
@import "log-ciclo-automatico.less";
@@ -1,9 +1,7 @@
<template>
<div class="main-container">
<div class="column-page-one-column">
<LogMisurazioniTable></LogMisurazioniTable>
</div>
</div>
<div class="column-page-one-column">
<LogMisurazioniTable></LogMisurazioniTable>
</div>
</template>
<style lang="less">
@import "log-misurazioni.less";
@@ -1,6 +1,5 @@
@import "../../../../variable.less";
th,
td {
&.misurazioni-value {
@@ -17,7 +16,6 @@ td {
}
&.misurazioni-type {
width: 187px;
max-width:187px;
max-width: 187px;
}
}
@@ -1,9 +1,7 @@
<template>
<div class="main-container">
<div class="column-page-one-column">
<RiscaldiTable></RiscaldiTable>
</div>
</div>
<div class="column-page-one-column">
<RiscaldiTable></RiscaldiTable>
</div>
</template>
<style lang="less">
@import "riscaldi.less";
@@ -26,8 +26,10 @@ td {
border-radius: 2px;
}
label {
margin: 3px 16px 3px 16px;
.main-container {
label {
margin: 3px 16px 3px 16px;
}
}
.ok-button {
@@ -1,10 +1,11 @@
@import "../variable.less";
.rettangle {
width: calc(~"100% - 72px");
height: 72px;
background-color: @fill-under-grey-4-2;
background-color: @fill-under-grey-2-2;
box-sizing: border-box;
border: 1px solid @fill-under-grey-1-2;
cursor: pointer;
display: flex;
flex-flow: row;
padding: 0 36px;
@@ -17,11 +18,13 @@
&.white {
color: @white;
font-weight: bold;
background-color: @fill-under-grey-4-2;
border: none;
}
}
.BG-fascia-sx {
width: 496px;
width: 495px;
height: 886px;
background-color: @fill-under-grey-1-2;
}
@@ -15,11 +15,11 @@
@click="go('log-misurazioni')"
:class="{white: this.value == 'log-misurazioni'}"
>{{'log-misurazioni' | localize("Log misurazioni")}}</div>
<!-- <div
<div
class="rettangle"
@click="go('assi')"
:class="{white: this.value == 'assi'}"
>{{'log-assi' | localize('Log assi')}}</div> -->
>{{'Assi' | localize('Assi')}}</div>
<div
class="rettangle"
@click="go('riscaldi')"
@@ -137,12 +137,12 @@
background-color: @fill-under-grey-2-2;
display: grid;
> table {
margin: 20px 0 0 20px
margin: 20px 0 0 20px;
}
}
.one-column-table-container {
height: 800px;
height: 750px;
margin: 20px 0 0 20px;
> table {
width: -webkit-fill-available;
@@ -6,6 +6,9 @@ import logCicloAutomatico from "./LogCicloAutomatico/components/log-ciclo-automa
import logMisurazioni from "./LogMisurazioni/components/log-misurazioni/log-misurazioni.vue";
import assi from "./Assi/components/assi/assi.vue";
import riscaldi from "./Riscaldi/components/riscaldi/riscaldi.vue";
import { store } from "@/store";
import { Watch } from "vue-property-decorator";
import { underTheHoodService } from "@/services/underTheHoodService";
@Component({
components: { menuSx, io, logCicloAutomatico, logMisurazioni, assi, riscaldi }
@@ -14,4 +17,12 @@ export default class Sottocofano extends Vue {
panel: string = 'io';
get isLifted(): boolean {
return store.state.isMainViewLiftedUp;
}
@Watch("isLifted")
async liftedChanged() {
await underTheHoodService.setFastSample(this.isLifted)
}
}
@@ -39,14 +39,14 @@ export default class AppFooter extends Vue {
openProgram(path: string) {
this.$router.push(path);
//appModelActions.MainViewLiftDown(this.$store);
appModelActions.MainViewLiftDown(this.$store);
}
isInPath(value: string) {
return this.$route.path.indexOf(value) >= 0;
}
isInMainPage(){
isInMainPage() {
return this.$route.path == "/";
}
@@ -76,11 +76,11 @@ export default class AppFooter extends Vue {
async runManual() {
ModalHelper.AskConfirm(this.$options.filters.localize("modal_confirm_title", "Richiesta di conferma"),
this.$options.filters.localize("modal_confirm_mode_manual", "Confermi di voler passare alla modalità manuale?"),
() => {
prodService.Manual();
}, null, "modal");
this.$options.filters.localize("modal_confirm_mode_manual", "Confermi di voler passare alla modalità manuale?"),
() => {
prodService.Manual();
}, null, "modal");
}
async runAuto() {
+6 -1
View File
@@ -29,6 +29,7 @@ import { recipeService } from "./recipeService";
import { warmersActions, warmersStore } from "@/store/warmers.store";
import { cmsConnectActions } from "@/store/cmsConnect.store";
import { warmersService } from "./warmersService";
import { underTheHoodActions } from "@/store/underTheHood.store";
declare const PRODUCTION;
@@ -120,6 +121,7 @@ export class Hub {
this._hub.client.prodCycleData = Hub.prodCycleData;
this._hub.client.gaugeData = Hub.gaugeData;
this._hub.client.axisInfo = Hub.axisInfoData;
this._hub.client.channelsIoVal = Hub.channelsIOUpdate;
@@ -160,6 +162,9 @@ export class Hub {
}
public static channelsIOUpdate(data: server.channels) {
underTheHoodActions.UpdateIOChannels(store, data);
}
public cmsConnectUpdateActivationData(authData) {
cmsConnectActions.updateActivationData(store, authData);
@@ -195,7 +200,7 @@ export class Hub {
recipeActions.setCurrent(store, data, true);
}
public static warmersData(data){
public static warmersData(data) {
warmersActions.setChannels(store, data as { [id: number]: Warmers.IChannel });
}
@@ -16,6 +16,19 @@ export class UnderTheHoodService extends baseRestService {
underTheHoodActions.SetIOChannelsConfig(store, result);
return result;
}
async forceChannel(group: string, item: server.channel, value: number) {
await this.Put((await this.BASE_URL()) + `/api/underthehood/io_force_ch_${group}`, [{ id: item.id, value }]);
}
async resetChannel(group: string, item: server.channel) {
await this.Put((await this.BASE_URL()) + `/api/underthehood/io_reset_ch_${group}`, [item.id]);
}
async setFastSample(value: boolean) {
await this.Put((await this.BASE_URL()) + `/api/underthehood/io_sample_fast?value=${value}`, {});
}
}
export const underTheHoodService = new UnderTheHoodService();
+1 -1
View File
@@ -78,7 +78,7 @@ const _store = {
state: {
currentUser: null,
isMainViewLiftedUp: true,
isMainViewLiftedUp: false,
isFavSoftkeySelection: false,
isShowDashboard: false,
isShowPreDashboard: false
@@ -4,12 +4,14 @@ import { CONFIGURATION } from "@/config";
export interface UnderTheHoodStoreModel {
ioChannels: server.channels;
ioChannelsConfig: { [id: string]: number[] }
_channels: Map<string, Map<string | number, any>>
}
export interface UnderTheHoodActions {
SetIOChannels(context, model: server.channels)
SetIOChannelsConfig(context, model: { [id: string]: number[] })
UpdateIOChannels(context, model: server.channels)
}
export interface UnderTheHoodGetters {
@@ -20,6 +22,7 @@ export const underTheHoodStore = {
state: {
ioChannels: {},
ioChannelsConfig: {},
_channels: new Map<string, Map<string | number, any>>()
} as UnderTheHoodStoreModel,
getters: {
@@ -29,10 +32,37 @@ export const underTheHoodStore = {
SetIOChannels(state: UnderTheHoodStoreModel, model: server.channels) {
state.ioChannels = model;
// reset maps for fast updating
state._channels = new Map<string, Map<string | number, any>>()
for (const key in model) {
if (Object.prototype.hasOwnProperty.call(model, key)) {
const element = model[key];
state._channels.set(key, new Map<string | number, any>());
let g = state._channels.get(key);
for (const item of element) {
g.set(item.id, item);
}
}
}
},
SetIOChannelsConfig(state: UnderTheHoodStoreModel, model: { [id: string]: number[] }) {
state.ioChannelsConfig = model;
},
UpdateIOChannels(state: UnderTheHoodStoreModel, model: server.channels) {
for (const key in model) {
let g = state._channels.get(key);
const values = model[key];
for (const item of values) {
let v = g.get(item.id);
Object.assign(v, item);
}
}
}
},
actions: {
@@ -43,6 +73,9 @@ export const underTheHoodStore = {
async SetIOChannelsConfig(context, model: { [id: string]: number[] }) {
context.commit("SetIOChannelsConfig", model);
},
async UpdateIOChannels(context, model: server.channels) {
context.commit("UpdateIOChannels", model);
}
} as UnderTheHoodActions
}