Compare commits
31 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 50e76bd30c | |||
| 6f6559ce67 | |||
| 5c2f69b8d2 | |||
| 0f7ce076f9 | |||
| 127b4ba1de | |||
| 9e2ee7d5b6 | |||
| 2a0b3f7e72 | |||
| 36dc4171e5 | |||
| 29057c5431 | |||
| a1336f9918 | |||
| 7ded45280f | |||
| ef139a2365 | |||
| fe6498f6ed | |||
| 22ad46ab8c | |||
| e098409b83 | |||
| 083be20f02 | |||
| f7ff6629ce | |||
| 2a4c0e8335 | |||
| bd1488bc02 | |||
| bab9bf504a | |||
| c7f7c4f9c8 | |||
| 36e0927bd1 | |||
| 7b132793d0 | |||
| d01fcf7578 | |||
| 539ed2508d | |||
| cacae4eebf | |||
| 34e31666cd | |||
| 3b0dd98018 | |||
| 76fdf01d38 | |||
| 7918787ac6 | |||
| e797afabcb |
@@ -31,6 +31,8 @@
|
|||||||
<CMSConnectReady>true</CMSConnectReady>
|
<CMSConnectReady>true</CMSConnectReady>
|
||||||
<maxAlarmsRows>50000</maxAlarmsRows>
|
<maxAlarmsRows>50000</maxAlarmsRows>
|
||||||
<alarmToDelete>5000</alarmToDelete>
|
<alarmToDelete>5000</alarmToDelete>
|
||||||
|
<maxSheetHistoryRows>10000</maxSheetHistoryRows>
|
||||||
|
<sheetHistoryToDelete>500</sheetHistoryToDelete>
|
||||||
</serverConfig>
|
</serverConfig>
|
||||||
<extSoftwares>
|
<extSoftwares>
|
||||||
<software>
|
<software>
|
||||||
|
|||||||
@@ -42,6 +42,8 @@
|
|||||||
<xs:element name="MTCApplicationName" type="xs:string" minOccurs="1" maxOccurs="1"/>
|
<xs:element name="MTCApplicationName" type="xs:string" minOccurs="1" maxOccurs="1"/>
|
||||||
<xs:element name="maxAlarmsRows" type="xs:int" minOccurs="1" maxOccurs="1"/>
|
<xs:element name="maxAlarmsRows" type="xs:int" minOccurs="1" maxOccurs="1"/>
|
||||||
<xs:element name="alarmToDelete" type="xs:int" minOccurs="1" maxOccurs="1"/>
|
<xs:element name="alarmToDelete" type="xs:int" minOccurs="1" maxOccurs="1"/>
|
||||||
|
<xs:element name="maxSheetHistoryRows" type="xs:int" minOccurs="1" maxOccurs="1"/>
|
||||||
|
<xs:element name="sheetHistoryToDelete" type="xs:int" minOccurs="1" maxOccurs="1"/>
|
||||||
<xs:element name="CMSConnectReady" type="xs:boolean" minOccurs="1" maxOccurs="1"/>
|
<xs:element name="CMSConnectReady" type="xs:boolean" minOccurs="1" maxOccurs="1"/>
|
||||||
</xs:all>
|
</xs:all>
|
||||||
</xs:complexType>
|
</xs:complexType>
|
||||||
|
|||||||
@@ -1033,6 +1033,8 @@ namespace Thermo.Active.Config
|
|||||||
MTCApplicationName = x.Element("MTCApplicationName").Value,
|
MTCApplicationName = x.Element("MTCApplicationName").Value,
|
||||||
MaxAlarmsRows = Convert.ToInt32(x.Element("maxAlarmsRows").Value),
|
MaxAlarmsRows = Convert.ToInt32(x.Element("maxAlarmsRows").Value),
|
||||||
AlarmToDelete = Convert.ToInt32(x.Element("alarmToDelete").Value),
|
AlarmToDelete = Convert.ToInt32(x.Element("alarmToDelete").Value),
|
||||||
|
MaxSheetHistoryRows = Convert.ToInt32(x.Element("maxSheetHistoryRows").Value),
|
||||||
|
SheetHistoryToDelete = Convert.ToInt32(x.Element("sheetHistoryToDelete").Value),
|
||||||
CmsConnectReady = Convert.ToBoolean(x.Element("CMSConnectReady").Value)
|
CmsConnectReady = Convert.ToBoolean(x.Element("CMSConnectReady").Value)
|
||||||
}).FirstOrDefault();
|
}).FirstOrDefault();
|
||||||
|
|
||||||
|
|||||||
@@ -390,13 +390,19 @@ public static class ThreadsFunctions
|
|||||||
}
|
}
|
||||||
// salvo dati temp sul PLC
|
// salvo dati temp sul PLC
|
||||||
ncAdapter.WriteRecipeWarmChTCamTempAct(actualTemp);
|
ncAdapter.WriteRecipeWarmChTCamTempAct(actualTemp);
|
||||||
|
NcAdapter.lastImageTaken = DateTime.Now;
|
||||||
// give PLC strobe for uploaded Actual TEMP from image
|
// give PLC strobe for uploaded Actual TEMP from image
|
||||||
ncAdapter.SendTCamImageReadyStrb();
|
ncAdapter.SendTCamImageReadyStrb();
|
||||||
|
|
||||||
|
|
||||||
|
MessageServices.Current.Publish(SEND_NEWTCAMIMAGE, null, NcAdapter.lastImageTaken);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// salvo status thermocam...
|
// salvo status thermocam...
|
||||||
NcAdapter.cameraIsConnected = TCCom.CameraIsConnected;
|
NcAdapter.cameraIsConnected = TCCom.CameraIsConnected;
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
RestoreConnection();
|
RestoreConnection();
|
||||||
@@ -412,9 +418,12 @@ public static class ThreadsFunctions
|
|||||||
catch (ThreadAbortException)
|
catch (ThreadAbortException)
|
||||||
{
|
{
|
||||||
ncAdapter.Dispose();
|
ncAdapter.Dispose();
|
||||||
|
// chiudo thermocam
|
||||||
|
TCCom.Dispose();
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
|
ncAdapter.Dispose();
|
||||||
// chiudo thermocam
|
// chiudo thermocam
|
||||||
TCCom.Dispose();
|
TCCom.Dispose();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,83 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Thermo.Active.Model.DatabaseModels;
|
||||||
|
using static Thermo.Active.Config.ServerConfig;
|
||||||
|
|
||||||
|
namespace Thermo.Active.Database.Controllers
|
||||||
|
{
|
||||||
|
public class HistorySheetsController : IDisposable
|
||||||
|
{
|
||||||
|
private DatabaseContext dbCtx;
|
||||||
|
|
||||||
|
public HistorySheetsController()
|
||||||
|
{
|
||||||
|
// Initialize database context
|
||||||
|
dbCtx = new DatabaseContext();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Dispose()
|
||||||
|
{
|
||||||
|
dbCtx.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
public HistorySheetModel Create(string recipe, short piece, float value1, float value2, float value3, ushort typeval)
|
||||||
|
{
|
||||||
|
HistorySheetModel mod = new HistorySheetModel()
|
||||||
|
{
|
||||||
|
DtEvent = DateTime.Now,
|
||||||
|
RecipeName = recipe,
|
||||||
|
NumDone = piece,
|
||||||
|
FirstVal = value1,
|
||||||
|
SecondVal = value2,
|
||||||
|
ThirdVal = value3,
|
||||||
|
TypeVal = typeval
|
||||||
|
};
|
||||||
|
|
||||||
|
// Add to database
|
||||||
|
dbCtx.HistorySheet.Add(mod);
|
||||||
|
// Commit changes
|
||||||
|
dbCtx.SaveChanges();
|
||||||
|
|
||||||
|
return mod;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void Clean()
|
||||||
|
{
|
||||||
|
if (this.count() >= ServerStartupConfig.MaxSheetHistoryRows)
|
||||||
|
{
|
||||||
|
dbCtx.Database.ExecuteSqlCommand("DELETE FROM historysheets LIMIT {0}", ServerStartupConfig.SheetHistoryToDelete);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<HistorySheetModel> GetData(int start, int number)
|
||||||
|
{
|
||||||
|
// Get page numbers
|
||||||
|
return dbCtx
|
||||||
|
.HistorySheet
|
||||||
|
.OrderByDescending(x => x.DtEvent).Skip(start).Take(number).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<HistorySheetModel> GetData()
|
||||||
|
{
|
||||||
|
// Get page numbers
|
||||||
|
return dbCtx
|
||||||
|
.HistorySheet
|
||||||
|
.OrderByDescending(x => x.DtEvent).ToList();
|
||||||
|
}
|
||||||
|
public int count()
|
||||||
|
{
|
||||||
|
// Get page numbers
|
||||||
|
return dbCtx
|
||||||
|
.HistorySheet.Count();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -44,7 +44,7 @@ namespace Thermo.Active.Database
|
|||||||
|
|
||||||
// thermo!
|
// thermo!
|
||||||
public DbSet<ProdInfoModel> ProdInfo { get; set; }
|
public DbSet<ProdInfoModel> ProdInfo { get; set; }
|
||||||
|
public DbSet<HistorySheetModel> HistorySheet { get; set; }
|
||||||
|
|
||||||
// Create migration string
|
// Create migration string
|
||||||
public static string CONNECTION_STRING = "Server = " + "localhost" + "; Database=" + DATABASE_NAME + ";Uid=" + DATABASE_USER + ";Pwd=" + DATABASE_PWD + ";";
|
public static string CONNECTION_STRING = "Server = " + "localhost" + "; Database=" + DATABASE_NAME + ";Uid=" + DATABASE_USER + ";Pwd=" + DATABASE_PWD + ";";
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
// <auto-generated />
|
||||||
|
namespace Thermo.Active.Database.Migrations
|
||||||
|
{
|
||||||
|
using System.CodeDom.Compiler;
|
||||||
|
using System.Data.Entity.Migrations;
|
||||||
|
using System.Data.Entity.Migrations.Infrastructure;
|
||||||
|
using System.Resources;
|
||||||
|
|
||||||
|
[GeneratedCode("EntityFramework.Migrations", "6.2.0-61023")]
|
||||||
|
public sealed partial class HistorySheets : IMigrationMetadata
|
||||||
|
{
|
||||||
|
private readonly ResourceManager Resources = new ResourceManager(typeof(HistorySheets));
|
||||||
|
|
||||||
|
string IMigrationMetadata.Id
|
||||||
|
{
|
||||||
|
get { return "202103191608500_HistorySheets"; }
|
||||||
|
}
|
||||||
|
|
||||||
|
string IMigrationMetadata.Source
|
||||||
|
{
|
||||||
|
get { return null; }
|
||||||
|
}
|
||||||
|
|
||||||
|
string IMigrationMetadata.Target
|
||||||
|
{
|
||||||
|
get { return Resources.GetString("Target"); }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
namespace Thermo.Active.Database.Migrations
|
||||||
|
{
|
||||||
|
using System;
|
||||||
|
using System.Data.Entity.Migrations;
|
||||||
|
|
||||||
|
public partial class HistorySheets : DbMigration
|
||||||
|
{
|
||||||
|
public override void Up()
|
||||||
|
{
|
||||||
|
CreateTable(
|
||||||
|
"dbo.HistorySheets",
|
||||||
|
c => new
|
||||||
|
{
|
||||||
|
DtEvent = c.DateTime(nullable: false, precision: 0),
|
||||||
|
Recipe = c.String(unicode: false),
|
||||||
|
FirstVal = c.Single(nullable: false),
|
||||||
|
SecondVal = c.Single(nullable: false),
|
||||||
|
ThirdVal = c.Single(nullable: false),
|
||||||
|
})
|
||||||
|
.PrimaryKey(t => t.DtEvent);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Down()
|
||||||
|
{
|
||||||
|
DropTable("dbo.HistorySheets");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because one or more lines are too long
+29
@@ -0,0 +1,29 @@
|
|||||||
|
// <auto-generated />
|
||||||
|
namespace Thermo.Active.Database.Migrations
|
||||||
|
{
|
||||||
|
using System.CodeDom.Compiler;
|
||||||
|
using System.Data.Entity.Migrations;
|
||||||
|
using System.Data.Entity.Migrations.Infrastructure;
|
||||||
|
using System.Resources;
|
||||||
|
|
||||||
|
[GeneratedCode("EntityFramework.Migrations", "6.2.0-61023")]
|
||||||
|
public sealed partial class HistorySheetsCycle : IMigrationMetadata
|
||||||
|
{
|
||||||
|
private readonly ResourceManager Resources = new ResourceManager(typeof(HistorySheetsCycle));
|
||||||
|
|
||||||
|
string IMigrationMetadata.Id
|
||||||
|
{
|
||||||
|
get { return "202103191626072_HistorySheetsCycle"; }
|
||||||
|
}
|
||||||
|
|
||||||
|
string IMigrationMetadata.Source
|
||||||
|
{
|
||||||
|
get { return null; }
|
||||||
|
}
|
||||||
|
|
||||||
|
string IMigrationMetadata.Target
|
||||||
|
{
|
||||||
|
get { return Resources.GetString("Target"); }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
namespace Thermo.Active.Database.Migrations
|
||||||
|
{
|
||||||
|
using System;
|
||||||
|
using System.Data.Entity.Migrations;
|
||||||
|
|
||||||
|
public partial class HistorySheetsCycle : DbMigration
|
||||||
|
{
|
||||||
|
public override void Up()
|
||||||
|
{
|
||||||
|
AddColumn("dbo.HistorySheets", "NumDone", c => c.Short(nullable: false));
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Down()
|
||||||
|
{
|
||||||
|
DropColumn("dbo.HistorySheets", "NumDone");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because one or more lines are too long
+29
@@ -0,0 +1,29 @@
|
|||||||
|
// <auto-generated />
|
||||||
|
namespace Thermo.Active.Database.Migrations
|
||||||
|
{
|
||||||
|
using System.CodeDom.Compiler;
|
||||||
|
using System.Data.Entity.Migrations;
|
||||||
|
using System.Data.Entity.Migrations.Infrastructure;
|
||||||
|
using System.Resources;
|
||||||
|
|
||||||
|
[GeneratedCode("EntityFramework.Migrations", "6.2.0-61023")]
|
||||||
|
public sealed partial class addedTypeValHistory : IMigrationMetadata
|
||||||
|
{
|
||||||
|
private readonly ResourceManager Resources = new ResourceManager(typeof(addedTypeValHistory));
|
||||||
|
|
||||||
|
string IMigrationMetadata.Id
|
||||||
|
{
|
||||||
|
get { return "202103221323362_addedTypeValHistory"; }
|
||||||
|
}
|
||||||
|
|
||||||
|
string IMigrationMetadata.Source
|
||||||
|
{
|
||||||
|
get { return null; }
|
||||||
|
}
|
||||||
|
|
||||||
|
string IMigrationMetadata.Target
|
||||||
|
{
|
||||||
|
get { return Resources.GetString("Target"); }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
namespace Thermo.Active.Database.Migrations
|
||||||
|
{
|
||||||
|
using System;
|
||||||
|
using System.Data.Entity.Migrations;
|
||||||
|
|
||||||
|
public partial class addedTypeValHistory : DbMigration
|
||||||
|
{
|
||||||
|
public override void Up()
|
||||||
|
{
|
||||||
|
AddColumn("dbo.HistorySheets", "TypeVal", c => c.Int(nullable: false));
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Down()
|
||||||
|
{
|
||||||
|
DropColumn("dbo.HistorySheets", "TypeVal");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because one or more lines are too long
@@ -124,6 +124,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Controllers\AlarmsController.cs" />
|
<Compile Include="Controllers\AlarmsController.cs" />
|
||||||
<Compile Include="Controllers\FunctionsAccessController.cs" />
|
<Compile Include="Controllers\FunctionsAccessController.cs" />
|
||||||
|
<Compile Include="Controllers\HistorySheetsController.cs" />
|
||||||
<Compile Include="Controllers\ProdInfoController.cs" />
|
<Compile Include="Controllers\ProdInfoController.cs" />
|
||||||
<Compile Include="Controllers\MachinesController.cs" />
|
<Compile Include="Controllers\MachinesController.cs" />
|
||||||
<Compile Include="Controllers\MaintenancesController.cs" />
|
<Compile Include="Controllers\MaintenancesController.cs" />
|
||||||
@@ -158,6 +159,18 @@
|
|||||||
<Compile Include="Migrations\202102171753226_Added_ThermoImage_prodInfo.Designer.cs">
|
<Compile Include="Migrations\202102171753226_Added_ThermoImage_prodInfo.Designer.cs">
|
||||||
<DependentUpon>202102171753226_Added_ThermoImage_prodInfo.cs</DependentUpon>
|
<DependentUpon>202102171753226_Added_ThermoImage_prodInfo.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="Migrations\202103191608500_HistorySheets.cs" />
|
||||||
|
<Compile Include="Migrations\202103191608500_HistorySheets.Designer.cs">
|
||||||
|
<DependentUpon>202103191608500_HistorySheets.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Migrations\202103191626072_HistorySheetsCycle.cs" />
|
||||||
|
<Compile Include="Migrations\202103191626072_HistorySheetsCycle.Designer.cs">
|
||||||
|
<DependentUpon>202103191626072_HistorySheetsCycle.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Migrations\202103221323362_addedTypeValHistory.cs" />
|
||||||
|
<Compile Include="Migrations\202103221323362_addedTypeValHistory.Designer.cs">
|
||||||
|
<DependentUpon>202103221323362_addedTypeValHistory.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="Migrations\Configuration.cs" />
|
<Compile Include="Migrations\Configuration.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="Redis\redUtil.cs" />
|
<Compile Include="Redis\redUtil.cs" />
|
||||||
@@ -212,6 +225,15 @@
|
|||||||
<EmbeddedResource Include="Migrations\202102171753226_Added_ThermoImage_prodInfo.resx">
|
<EmbeddedResource Include="Migrations\202102171753226_Added_ThermoImage_prodInfo.resx">
|
||||||
<DependentUpon>202102171753226_Added_ThermoImage_prodInfo.cs</DependentUpon>
|
<DependentUpon>202102171753226_Added_ThermoImage_prodInfo.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Migrations\202103191608500_HistorySheets.resx">
|
||||||
|
<DependentUpon>202103191608500_HistorySheets.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Migrations\202103191626072_HistorySheetsCycle.resx">
|
||||||
|
<DependentUpon>202103191626072_HistorySheetsCycle.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Migrations\202103221323362_addedTypeValHistory.resx">
|
||||||
|
<DependentUpon>202103221323362_addedTypeValHistory.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
</Project>
|
</Project>
|
||||||
@@ -18,5 +18,9 @@ namespace Thermo.Active.Model.ConfigModels
|
|||||||
|
|
||||||
public int MaxAlarmsRows { get; set; }
|
public int MaxAlarmsRows { get; set; }
|
||||||
public int AlarmToDelete { get; set; }
|
public int AlarmToDelete { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public int MaxSheetHistoryRows { get; set; }
|
||||||
|
public int SheetHistoryToDelete { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -104,6 +104,7 @@ namespace Thermo.Active.Model
|
|||||||
|
|
||||||
public const string SEND_AXIS_INFO = "SEND_AXIS_INFO";
|
public const string SEND_AXIS_INFO = "SEND_AXIS_INFO";
|
||||||
public const string SEND_CHANNELS_IO_DATA = "SEND_CHANNELS_IO_DATA";
|
public const string SEND_CHANNELS_IO_DATA = "SEND_CHANNELS_IO_DATA";
|
||||||
|
public const string SEND_NEWTCAMIMAGE = "SEND_NEWTCAMIMAGE";
|
||||||
public const string SEND_CMSCONNECT_GW_REBOOT_STATUS = "SEND_CMSCONNECT_GW_REBOOT_STATUS";
|
public const string SEND_CMSCONNECT_GW_REBOOT_STATUS = "SEND_CMSCONNECT_GW_REBOOT_STATUS";
|
||||||
public const string SEND_ERROR_TO_UI = "SEND_ERROR_TO_UI";
|
public const string SEND_ERROR_TO_UI = "SEND_ERROR_TO_UI";
|
||||||
public const string SEND_EXPIRED_MAINTENANCES_DATA = "SEND_EXPIRED_MAINTENANCES_DATA";
|
public const string SEND_EXPIRED_MAINTENANCES_DATA = "SEND_EXPIRED_MAINTENANCES_DATA";
|
||||||
|
|||||||
@@ -40,6 +40,11 @@ namespace Thermo.Active.Model.DTOModels.ThWarmers
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public bool ThermoOptionActive { get; set; } = false;
|
public bool ThermoOptionActive { get; set; } = false;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Data ultima acquisizione
|
||||||
|
/// </summary>
|
||||||
|
public DateTime LastTakenImage { get; set; } = new DateTime(0);
|
||||||
|
|
||||||
#endregion Public Properties
|
#endregion Public Properties
|
||||||
|
|
||||||
#region Public Methods
|
#region Public Methods
|
||||||
@@ -64,7 +69,9 @@ namespace Thermo.Active.Model.DTOModels.ThWarmers
|
|||||||
return false;
|
return false;
|
||||||
if (RangeTemperature != item.RangeTemperature)
|
if (RangeTemperature != item.RangeTemperature)
|
||||||
return false;
|
return false;
|
||||||
|
if (LastTakenImage != item.LastTakenImage)
|
||||||
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,38 @@
|
|||||||
|
using System;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
|
namespace Thermo.Active.Model.DatabaseModels
|
||||||
|
{
|
||||||
|
[Table("HistorySheets")]
|
||||||
|
public class HistorySheetModel
|
||||||
|
{
|
||||||
|
#region Public Properties
|
||||||
|
|
||||||
|
[Key]
|
||||||
|
[DatabaseGenerated(DatabaseGeneratedOption.None)]
|
||||||
|
[Column("DtEvent", Order = 0)]
|
||||||
|
public DateTime DtEvent { get; set; }
|
||||||
|
|
||||||
|
[Column("Recipe")]
|
||||||
|
public string RecipeName { get; set; }
|
||||||
|
|
||||||
|
[Column("NumDone")]
|
||||||
|
public short NumDone { get; set; }
|
||||||
|
|
||||||
|
[Column("FirstVal")]
|
||||||
|
public float FirstVal { get; set; }
|
||||||
|
|
||||||
|
[Column("SecondVal")]
|
||||||
|
public float SecondVal { get; set; }
|
||||||
|
|
||||||
|
[Column("ThirdVal")]
|
||||||
|
public float ThirdVal { get; set; }
|
||||||
|
|
||||||
|
[Column("TypeVal")]
|
||||||
|
public int TypeVal { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
#endregion Public Properties
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -85,6 +85,7 @@
|
|||||||
<Compile Include="DatabaseModels\AlarmNoteModel.cs" />
|
<Compile Include="DatabaseModels\AlarmNoteModel.cs" />
|
||||||
<Compile Include="DatabaseModels\AlarmOccurrencesModel.cs" />
|
<Compile Include="DatabaseModels\AlarmOccurrencesModel.cs" />
|
||||||
<Compile Include="DatabaseModels\AlarmUserModel.cs" />
|
<Compile Include="DatabaseModels\AlarmUserModel.cs" />
|
||||||
|
<Compile Include="DatabaseModels\HistorySheetModel.cs" />
|
||||||
<Compile Include="DatabaseModels\FavoriteUserSoftKeyModel.cs" />
|
<Compile Include="DatabaseModels\FavoriteUserSoftKeyModel.cs" />
|
||||||
<Compile Include="DatabaseModels\FunctionAccessModel.cs" />
|
<Compile Include="DatabaseModels\FunctionAccessModel.cs" />
|
||||||
<Compile Include="ConfigModels\MessageModel.cs" />
|
<Compile Include="ConfigModels\MessageModel.cs" />
|
||||||
|
|||||||
@@ -140,6 +140,11 @@ namespace Thermo.Active.NC
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool cameraIsConnected = false;
|
public static bool cameraIsConnected = false;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Indica se la FLIR camera è connessa
|
||||||
|
/// </summary>
|
||||||
|
public static DateTime lastImageTaken = new DateTime(0);
|
||||||
|
|
||||||
#endregion Public Fields
|
#endregion Public Fields
|
||||||
|
|
||||||
#region Public Constructors
|
#region Public Constructors
|
||||||
@@ -2515,7 +2520,7 @@ namespace Thermo.Active.NC
|
|||||||
{
|
{
|
||||||
imgName = "UNDEFINED";
|
imgName = "UNDEFINED";
|
||||||
}
|
}
|
||||||
prodInfoController.Create(pInfoRaw.NumTarget, pInfoRaw.NumDone, pInfoRaw.TimeWarm, pInfoRaw.TimeVent, pInfoRaw.TimeVacuum, pInfoRaw.TimeCycleGross, pInfoRaw.TimeCycleNet, pInfoRaw.MaterialTempEndWarm, pInfoRaw.MaterialTempEndVent, pInfoRaw.MoldTemp, pInfoRaw.VacuumReadVal, pInfoRaw.MouldEnergyOUT, pInfoRaw.MouldEnergyIN, false, pInfoRaw.ThermoImage);
|
prodInfoController.Create(pInfoRaw.NumTarget, pInfoRaw.NumDone, pInfoRaw.TimeWarm, pInfoRaw.TimeVent, pInfoRaw.TimeVacuum, pInfoRaw.TimeCycleGross, pInfoRaw.TimeCycleNet, pInfoRaw.MaterialTempEndWarm, pInfoRaw.MaterialTempEndVent, pInfoRaw.MoldTemp, pInfoRaw.VacuumReadVal, pInfoRaw.MouldEnergyOUT, pInfoRaw.MouldEnergyIN, false, imgName);
|
||||||
// indico di rileggere il DB...
|
// indico di rileggere il DB...
|
||||||
forceProdPanelDbReload = true;
|
forceProdPanelDbReload = true;
|
||||||
}
|
}
|
||||||
@@ -2561,6 +2566,26 @@ namespace Thermo.Active.NC
|
|||||||
lastProdStart = DateTime.Now;
|
lastProdStart = DateTime.Now;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ThermoModels.HistorySheet sheetRaw = new ThermoModels.HistorySheet();
|
||||||
|
libraryError = numericalControl.PLC_RHistorySheets(ref sheetRaw);
|
||||||
|
if (libraryError.IsError())
|
||||||
|
return libraryError;
|
||||||
|
|
||||||
|
if (sheetRaw.newData)
|
||||||
|
{
|
||||||
|
|
||||||
|
using (HistorySheetsController HSC = new HistorySheetsController())
|
||||||
|
{
|
||||||
|
HSC.Create(NcFileAdapter.RecipeLiveData.RecipeName, prodInfoData.NumDone, (float) sheetRaw.Value1, (float) sheetRaw.Value2, (float) sheetRaw.Value3,sheetRaw.TypeVal);
|
||||||
|
|
||||||
|
// manage strobe/ack!
|
||||||
|
libraryError = numericalControl.PLC_WAckHistorySheets();
|
||||||
|
if (libraryError.IsError())
|
||||||
|
return libraryError;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return libraryError;
|
return libraryError;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3172,6 +3197,9 @@ namespace Thermo.Active.NC
|
|||||||
};
|
};
|
||||||
// controllo se connessa
|
// controllo se connessa
|
||||||
currTCamData.ThermoCamConnected = cameraIsConnected;
|
currTCamData.ThermoCamConnected = cameraIsConnected;
|
||||||
|
|
||||||
|
// DataOra ultima immagine scattata
|
||||||
|
currTCamData.LastTakenImage = lastImageTaken;
|
||||||
}
|
}
|
||||||
return libraryError;
|
return libraryError;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -430,4 +430,6 @@
|
|||||||
<axis_info_position>In posizione:</axis_info_position>
|
<axis_info_position>In posizione:</axis_info_position>
|
||||||
<axis_info_error>In errore:</axis_info_error>
|
<axis_info_error>In errore:</axis_info_error>
|
||||||
<axis_info_brakealm>Allarme test freno:</axis_info_brakealm>
|
<axis_info_brakealm>Allarme test freno:</axis_info_brakealm>
|
||||||
|
<bitselect_select_none>Nessuno</bitselect_select_none>
|
||||||
|
<bitselect_select_all>Tutti</bitselect_select_all>
|
||||||
</root>
|
</root>
|
||||||
@@ -430,4 +430,6 @@
|
|||||||
<axis_info_position>In Position:</axis_info_position>
|
<axis_info_position>In Position:</axis_info_position>
|
||||||
<axis_info_error>In Error:</axis_info_error>
|
<axis_info_error>In Error:</axis_info_error>
|
||||||
<axis_info_brakealm>Brake Test Alarm:</axis_info_brakealm>
|
<axis_info_brakealm>Brake Test Alarm:</axis_info_brakealm>
|
||||||
|
<bitselect_select_none>None</bitselect_select_none>
|
||||||
|
<bitselect_select_all>All</bitselect_select_all>
|
||||||
</root>
|
</root>
|
||||||
@@ -100,7 +100,8 @@ namespace Thermo.Active.Controllers.WebApi
|
|||||||
}
|
}
|
||||||
|
|
||||||
// read recipe!
|
// read recipe!
|
||||||
libraryError = ncAdapter.ReadFullRecipe(out Dictionary<string, DTORecipeParam> prevRecipe);
|
//libraryError = ncAdapter.ReadFullRecipe(out Dictionary<string, DTORecipeParam> prevRecipe);
|
||||||
|
libraryError = ncAdapter.ReadRecipeData(true, true, out Dictionary<string, DTORecipeParam> prevRecipe);
|
||||||
if (libraryError.IsError())
|
if (libraryError.IsError())
|
||||||
{
|
{
|
||||||
ThermoActiveLogger.LogError($"GetRecipeOverview error | {libraryError.exception}");
|
ThermoActiveLogger.LogError($"GetRecipeOverview error | {libraryError.exception}");
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ using System.Windows.Media.Animation;
|
|||||||
using TeamDev.SDK.MVVM;
|
using TeamDev.SDK.MVVM;
|
||||||
using Thermo.Active.Config;
|
using Thermo.Active.Config;
|
||||||
using Thermo.Active.Database.Controllers;
|
using Thermo.Active.Database.Controllers;
|
||||||
|
using Thermo.Active.Model.DatabaseModels;
|
||||||
using Thermo.Active.Model.DTOModels;
|
using Thermo.Active.Model.DTOModels;
|
||||||
using Thermo.Active.Model.DTOModels.ThIO;
|
using Thermo.Active.Model.DTOModels.ThIO;
|
||||||
using Thermo.Active.Model.DTOModels.ThRecipe;
|
using Thermo.Active.Model.DTOModels.ThRecipe;
|
||||||
@@ -364,5 +365,41 @@ namespace Thermo.Active.Controllers.WebApi
|
|||||||
// ritorno solo fatto!
|
// ritorno solo fatto!
|
||||||
return Ok(expires);
|
return Ok(expires);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
[ResponseType(typeof(List<HistorySheetModel>))]
|
||||||
|
[Route("SheetHistory"), HttpGet]
|
||||||
|
public IHttpActionResult GetSheetHistory()
|
||||||
|
{
|
||||||
|
using (HistorySheetsController hsc = new HistorySheetsController())
|
||||||
|
{
|
||||||
|
List<HistorySheetModel> models = hsc.GetData();
|
||||||
|
return Ok(models);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[ResponseType(typeof(List<HistorySheetModel>))]
|
||||||
|
[Route("SheetHistoryFiltered"), HttpGet]
|
||||||
|
public IHttpActionResult GetSheetHistoryFiltered(int start, int number)
|
||||||
|
{
|
||||||
|
using (HistorySheetsController hsc = new HistorySheetsController())
|
||||||
|
{
|
||||||
|
|
||||||
|
List<HistorySheetModel> models = hsc.GetData(start, number);
|
||||||
|
return Ok(models);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[ResponseType(typeof(int))]
|
||||||
|
[Route("SheetHistoryCount"), HttpGet]
|
||||||
|
public IHttpActionResult GetSheetHistoryCount()
|
||||||
|
{
|
||||||
|
using (HistorySheetsController hsc = new HistorySheetsController())
|
||||||
|
{
|
||||||
|
return Ok(hsc.count());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -50,7 +50,13 @@ namespace Thermo.Active.Listeners.Database
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public static void cleanHistorySheets()
|
||||||
|
{
|
||||||
|
using (HistorySheetsController HSC = new HistorySheetsController())
|
||||||
|
{
|
||||||
|
HSC.Clean();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static void UpdateAlarms(object alarmsObj)
|
public static void UpdateAlarms(object alarmsObj)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -68,6 +68,10 @@ namespace Thermo.Active.Listeners
|
|||||||
{
|
{
|
||||||
SignalRListener.SendThermoChannelsIoData(a);
|
SignalRListener.SendThermoChannelsIoData(a);
|
||||||
}));
|
}));
|
||||||
|
infos.Add(MessageServices.Current.Subscribe(SEND_NEWTCAMIMAGE, (a, b) =>
|
||||||
|
{
|
||||||
|
SignalRListener.SendTCamNewImage(a);
|
||||||
|
}));
|
||||||
infos.Add(MessageServices.Current.Subscribe(SEND_ACTIVE_PROGRAM_DATA, (a, b) =>
|
infos.Add(MessageServices.Current.Subscribe(SEND_ACTIVE_PROGRAM_DATA, (a, b) =>
|
||||||
{
|
{
|
||||||
SignalRListener.SendActiveProgramData(a);
|
SignalRListener.SendActiveProgramData(a);
|
||||||
@@ -130,6 +134,7 @@ namespace Thermo.Active.Listeners
|
|||||||
}));
|
}));
|
||||||
infos.Add(MessageServices.Current.Subscribe(SEND_THERMO_PROD_INFO_DATA, (a, b) =>
|
infos.Add(MessageServices.Current.Subscribe(SEND_THERMO_PROD_INFO_DATA, (a, b) =>
|
||||||
{
|
{
|
||||||
|
SignalRDatabaseHandler.cleanHistorySheets();
|
||||||
SignalRListener.SendThermoProdInfoData(a);
|
SignalRListener.SendThermoProdInfoData(a);
|
||||||
}));
|
}));
|
||||||
infos.Add(MessageServices.Current.Subscribe(SEND_THERMO_PROD_CYCLE_DATA, (a, b) =>
|
infos.Add(MessageServices.Current.Subscribe(SEND_THERMO_PROD_CYCLE_DATA, (a, b) =>
|
||||||
|
|||||||
@@ -611,6 +611,13 @@ namespace Thermo.Active.Listeners.SignalR
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void SendTCamNewImage(object newImageDate)
|
||||||
|
{
|
||||||
|
DateTime imageDate = (DateTime)newImageDate;
|
||||||
|
var context = GlobalHost.ConnectionManager.GetHubContext<NcHub>();
|
||||||
|
context.Clients.Group("ncData").newThermoCamImage(newImageDate);
|
||||||
|
}
|
||||||
|
|
||||||
public static void SetGatewayRebootStatus(object status)
|
public static void SetGatewayRebootStatus(object status)
|
||||||
{
|
{
|
||||||
string msg = status.ToString();
|
string msg = status.ToString();
|
||||||
|
|||||||
@@ -30,4 +30,4 @@ using System.Runtime.InteropServices;
|
|||||||
//
|
//
|
||||||
// You can specify all the values or you can default the Revision and Build Numbers
|
// You can specify all the values or you can default the Revision and Build Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
[assembly: AssemblyVersion("1.1.182")]
|
[assembly: AssemblyVersion("1.1.185")]
|
||||||
|
|||||||
Generated
+3
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"lockfileVersion": 1
|
||||||
|
}
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
@@ -5,7 +5,7 @@
|
|||||||
<label :class="{red: value.isScrap}" v-else>{{value.numDone}}</label>
|
<label :class="{red: value.isScrap}" v-else>{{value.numDone}}</label>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<small>{{'history-item_warmup' | localize("tempo riscaldo")}}</small>
|
<small>{{'history-item_warmup' | localize("tempo riscaldo")}}</small>
|
||||||
<span>{{Math.floor(value.timeWarm / 60) | round(0)}}'{{value.timeWarm % 60 | round(0)}}''</span>
|
<span>{{value.timeWarm | round(0)}}''</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<small>{{'history-item_vacuum' | localize("vuoto")}}</small>
|
<small>{{'history-item_vacuum' | localize("vuoto")}}</small>
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<small>{{'history_item_venttime' | localize("tempo ventilazione")}}</small>
|
<small>{{'history_item_venttime' | localize("tempo ventilazione")}}</small>
|
||||||
<span>{{value.timeVent / 60 | round(0)}}'{{value.timeVent % 60 | round(0)}}''</span>
|
<span>{{value.timeVent | round(0)}}''</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<small>{{'history_item_cycletimegross' | localize("tempo ciclo lordo")}}</small>
|
<small>{{'history_item_cycletimegross' | localize("tempo ciclo lordo")}}</small>
|
||||||
@@ -53,7 +53,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<small>{{'history_item_vacuumtime' | localize("tempo vuoto")}}</small>
|
<small>{{'history_item_vacuumtime' | localize("tempo vuoto")}}</small>
|
||||||
<span>{{Math.floor(value.timeVacuum / 60) | round(0)}}'{{value.timeVacuum % 60 | round(0)}}''</span>
|
<span>{{value.timeVacuum | round(0)}}''</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<small>{{'history_item_mouldenergyin' | localize("energia utilizzata in")}}</small>
|
<small>{{'history_item_mouldenergyin' | localize("energia utilizzata in")}}</small>
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ export default class stats extends Vue {
|
|||||||
value: { [id: number]: number };
|
value: { [id: number]: number };
|
||||||
|
|
||||||
get Values(): number[] {
|
get Values(): number[] {
|
||||||
console.log(this.value);
|
|
||||||
var r: number[] = [];
|
var r: number[] = [];
|
||||||
if (this.value)
|
if (this.value)
|
||||||
for (const i in this.value) {
|
for (const i in this.value) {
|
||||||
|
|||||||
@@ -10,18 +10,6 @@
|
|||||||
<line :x1="0" :x2="width" :y1="height*2/3" :y2="height*2/3" stroke="#353535" stroke-width="1" />
|
<line :x1="0" :x2="width" :y1="height*2/3" :y2="height*2/3" stroke="#353535" stroke-width="1" />
|
||||||
<line :x1="0" :x2="width" :y1="height" :y2="height" stroke="#353535" stroke-width="1" />
|
<line :x1="0" :x2="width" :y1="height" :y2="height" stroke="#353535" stroke-width="1" />
|
||||||
</g>
|
</g>
|
||||||
<!--<g chart="chart-axis">
|
|
||||||
<line
|
|
||||||
v-for="(i,idx) in Values"
|
|
||||||
:key="idx"
|
|
||||||
:x1="idx * (width / 19)"
|
|
||||||
:x2="idx * (width / 19)"
|
|
||||||
:y1="0"
|
|
||||||
:y2="height"
|
|
||||||
stroke="#35353550"
|
|
||||||
stroke-width="1"
|
|
||||||
/>
|
|
||||||
</g>-->
|
|
||||||
<g>
|
<g>
|
||||||
<polygon :points="calcPointFill" style="fill:#1791ff;stroke-width:0" fill-opacity="0.3" />
|
<polygon :points="calcPointFill" style="fill:#1791ff;stroke-width:0" fill-opacity="0.3" />
|
||||||
<path fill="none" :d="pathData" v-if="pathData" stroke="#1791ff" stroke-width="4" />
|
<path fill="none" :d="pathData" v-if="pathData" stroke="#1791ff" stroke-width="4" />
|
||||||
|
|||||||
@@ -118,8 +118,6 @@ export default class Dashboard extends Vue {
|
|||||||
this.itemsMap.set(i.numDone, i);
|
this.itemsMap.set(i.numDone, i);
|
||||||
}
|
}
|
||||||
this.items = Array.from(this.itemsMap.values()).sort((a, b) => b.numDone - a.numDone);
|
this.items = Array.from(this.itemsMap.values()).sort((a, b) => b.numDone - a.numDone);
|
||||||
|
|
||||||
console.log(this.items);
|
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -204,13 +202,33 @@ export default class Dashboard extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
incrementPyr() {
|
incrementPyr() {
|
||||||
this.recipe.pyrometer_pyrometer_setpoint.setpointHMI++;
|
this.recipe.pyrometer_pyrometer_setpoint.setpointHMI++;
|
||||||
|
this.recipe.pyrometer_upperthermoregulator_start_adjustment.setpointHMI++;
|
||||||
|
this.recipe.pyrometer_upperthermoregulator_end_adjustment.setpointHMI++;
|
||||||
|
this.recipe.pyrometer_lowerthermoregulator_start_adjustment.setpointHMI++;
|
||||||
|
this.recipe.pyrometer_lowerthermoregulator_end_adjustment.setpointHMI++;
|
||||||
this.debouncedRecipeSave();
|
this.debouncedRecipeSave();
|
||||||
}
|
}
|
||||||
decrementPyr() {
|
decrementPyr() {
|
||||||
this.recipe.pyrometer_pyrometer_setpoint.setpointHMI--;
|
this.recipe.pyrometer_pyrometer_setpoint.setpointHMI--;
|
||||||
|
this.recipe.pyrometer_upperthermoregulator_start_adjustment.setpointHMI--;
|
||||||
|
this.recipe.pyrometer_upperthermoregulator_end_adjustment.setpointHMI--;
|
||||||
|
this.recipe.pyrometer_lowerthermoregulator_start_adjustment.setpointHMI--;
|
||||||
|
this.recipe.pyrometer_lowerthermoregulator_end_adjustment.setpointHMI--;
|
||||||
this.debouncedRecipeSave();
|
this.debouncedRecipeSave();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
togglePyr() {
|
||||||
|
if(this.recipe.pyrometer_pyrometer_enabled.setpointHMI == 1)
|
||||||
|
this.recipe.pyrometer_pyrometer_enabled.setpointHMI = 0;
|
||||||
|
else
|
||||||
|
this.recipe.pyrometer_pyrometer_enabled.setpointHMI = 1;
|
||||||
|
|
||||||
|
this.debouncedRecipeSave();
|
||||||
|
}
|
||||||
|
get pyrOn(){
|
||||||
|
return this.recipe.pyrometer_pyrometer_enabled.setpointHMI == 1;
|
||||||
|
}
|
||||||
debouncedRecipeSave = debounce(this.savePyr, 1000);
|
debouncedRecipeSave = debounce(this.savePyr, 1000);
|
||||||
|
|
||||||
public async savePyr(){
|
public async savePyr(){
|
||||||
@@ -229,7 +247,11 @@ export default class Dashboard extends Vue {
|
|||||||
get payload() {
|
get payload() {
|
||||||
return {
|
return {
|
||||||
pyrometer_pyrometer_enabled: this.recipe.pyrometer_pyrometer_enabled,
|
pyrometer_pyrometer_enabled: this.recipe.pyrometer_pyrometer_enabled,
|
||||||
pyrometer_pyrometer_setpoint: this.recipe.pyrometer_pyrometer_setpoint
|
pyrometer_pyrometer_setpoint: this.recipe.pyrometer_pyrometer_setpoint,
|
||||||
|
pyrometer_upperthermoregulator_start_adjustment: this.recipe.pyrometer_upperthermoregulator_start_adjustment,
|
||||||
|
pyrometer_upperthermoregulator_end_adjustment: this.recipe.pyrometer_upperthermoregulator_end_adjustment,
|
||||||
|
pyrometer_lowerthermoregulator_start_adjustment: this.recipe.pyrometer_lowerthermoregulator_start_adjustment,
|
||||||
|
pyrometer_lowerthermoregulator_end_adjustment: this.recipe.pyrometer_lowerthermoregulator_end_adjustment,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -118,9 +118,11 @@
|
|||||||
<button @click="decrementPyr()" :disabled="!recipe.pyrometer_pyrometer_setpoint.status.enabled" >
|
<button @click="decrementPyr()" :disabled="!recipe.pyrometer_pyrometer_setpoint.status.enabled" >
|
||||||
<i class="fa fa-minus"></i>
|
<i class="fa fa-minus"></i>
|
||||||
</button>
|
</button>
|
||||||
<div :class="{'notenabled': recipe.pyrometer_pyrometer_enabled.setpointHMI == 0}">
|
<div :class="{'notenabled': recipe.pyrometer_pyrometer_enabled.setpointHMI == 0}" @click="togglePyr">
|
||||||
<small>{{'dashboard-setpoint' | localize('set point')}}</small>
|
<small>{{'dashboard-setpoint' | localize('set point')}}</small>
|
||||||
<span :class="{'strike': recipe.pyrometer_pyrometer_enabled.setpointHMI == 0}">{{recipe.pyrometer_pyrometer_setpoint.setpointHMI}}{{recipe.pyrometer_pyrometer_setpoint.unitMeasure}}</span>
|
<span :class="{'strike': recipe.pyrometer_pyrometer_enabled.setpointHMI == 0}">{{recipe.pyrometer_pyrometer_setpoint.setpointHMI}}{{recipe.pyrometer_pyrometer_setpoint.unitMeasure}}</span>
|
||||||
|
<div v-if="pyrOn">ON</div>
|
||||||
|
<div v-else>OFF</div>
|
||||||
</div>
|
</div>
|
||||||
<button @click="incrementPyr()" :disabled="!recipe.pyrometer_pyrometer_setpoint.status.enabled" >
|
<button @click="incrementPyr()" :disabled="!recipe.pyrometer_pyrometer_setpoint.status.enabled" >
|
||||||
<i class="fa fa-plus"></i>
|
<i class="fa fa-plus"></i>
|
||||||
|
|||||||
@@ -122,10 +122,6 @@ export default class ShowCicloInfo extends Vue {
|
|||||||
if (el.status.visible && el.status.enabled)
|
if (el.status.visible && el.status.enabled)
|
||||||
if (el.setpointHMI != el.setpointPLC) result = true;
|
if (el.setpointHMI != el.setpointPLC) result = true;
|
||||||
}
|
}
|
||||||
for (const key in store.state.warmers.channels) {
|
|
||||||
const el = store.state.warmers.channels[key];
|
|
||||||
if (el.setpointHMI != el.setpointPLC) result = true;
|
|
||||||
}
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -40,6 +40,18 @@
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
height: auto !important;
|
height: auto !important;
|
||||||
width: 500px !important;
|
width: 500px !important;
|
||||||
|
border-top: 1px solid #979797;
|
||||||
|
border-left: 1px solid #979797;
|
||||||
|
}
|
||||||
|
.bitSelect > section.bitsections .selall {
|
||||||
|
grid-column-start: 1;
|
||||||
|
grid-column-end: 3;
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
align-items: center;
|
||||||
|
margin: 24px 0px 0 0;
|
||||||
|
height: 64px;
|
||||||
|
border-top: 2px solid #bbbcbc;
|
||||||
}
|
}
|
||||||
.bitSelect > section.bitsections > article {
|
.bitSelect > section.bitsections > article {
|
||||||
height: 70px !important;
|
height: 70px !important;
|
||||||
@@ -47,7 +59,8 @@
|
|||||||
grid-template-columns: 68px 1fr;
|
grid-template-columns: 68px 1fr;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-items: center;
|
justify-items: center;
|
||||||
border: 1px solid #979797;
|
border-bottom: 1px solid #979797;
|
||||||
|
border-right: 1px solid #979797;
|
||||||
}
|
}
|
||||||
.bitSelect > section.bitsections > article label {
|
.bitSelect > section.bitsections > article label {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
> section.bitsections {
|
> section.bitsections {
|
||||||
position: absolute !important;
|
position: absolute !important;
|
||||||
top: 48px;
|
top: 48px;
|
||||||
right: 0;
|
right: 0;
|
||||||
@@ -42,13 +42,28 @@
|
|||||||
height: auto !important;
|
height: auto !important;
|
||||||
width: 500px !important;
|
width: 500px !important;
|
||||||
|
|
||||||
|
border-top: 1px solid #979797;
|
||||||
|
border-left: 1px solid #979797;
|
||||||
|
|
||||||
|
.selall{
|
||||||
|
grid-column-start:1;
|
||||||
|
grid-column-end:3;
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
align-items: center;
|
||||||
|
margin: 24px 0px 0 0;
|
||||||
|
height: 64px;
|
||||||
|
border-top: 2px solid #bbbcbc;
|
||||||
|
}
|
||||||
|
|
||||||
> article {
|
> article {
|
||||||
height: 70px !important;
|
height: 70px !important;
|
||||||
display: grid !important;
|
display: grid !important;
|
||||||
grid-template-columns: 68px 1fr;
|
grid-template-columns: 68px 1fr;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-items: center;
|
justify-items: center;
|
||||||
border: 1px solid #979797;
|
border-bottom: 1px solid #979797;
|
||||||
|
border-right: 1px solid #979797;
|
||||||
|
|
||||||
label {
|
label {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
@@ -66,4 +66,20 @@ export default class bitSelect extends Vue {
|
|||||||
return this.bit_test(this.value.range.max,bit-1);
|
return this.bit_test(this.value.range.max,bit-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setAll(){
|
||||||
|
this.Value = this.value.range.max;
|
||||||
|
|
||||||
|
for (let i = 0; i < this.bitSize; i++) {
|
||||||
|
Vue.set(this.bits, i, this.bit_test(this.Value, i))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
clearAll(){
|
||||||
|
this.Value = 0;
|
||||||
|
|
||||||
|
for (let i = 0; i < this.bitSize; i++) {
|
||||||
|
Vue.set(this.bits, i, this.bit_test(this.Value, i))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -23,7 +23,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<label :for="`cb-${b}`">{{`${key}_${b}` | localize((b).toString())}}</label>
|
<label :for="`cb-${b}`">{{`${key}_${b}` | localize((b).toString())}}</label>
|
||||||
</article>
|
</article>
|
||||||
</template>
|
</template>
|
||||||
|
<div class="selall">
|
||||||
|
<button class="btn" @click="clearAll">{{'bitselect_select_none' | localize('Nessuno')}}</button>
|
||||||
|
<button class="btn btn-success" @click="setAll">{{'bitselect_select_all' | localize('Tutti')}}</button>
|
||||||
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
+11
-2
@@ -68,17 +68,26 @@
|
|||||||
.modal.prophetimages section .image-selector .timeseries {
|
.modal.prophetimages section .image-selector .timeseries {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
flex-flow: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
.modal.prophetimages section .image-selector .timeseries time {
|
.modal.prophetimages section .image-selector .timeseries time {
|
||||||
color: #002680;
|
color: #002680;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
width: 200px;
|
width: 200px;
|
||||||
position: absolute;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-flow: column;
|
flex-flow: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
.modal.prophetimages section .image-selector .timeseries time:last-child {
|
||||||
|
align-items: flex-end;
|
||||||
|
}
|
||||||
|
.modal.prophetimages section .image-selector .timeseries time:first-child {
|
||||||
|
align-items: flex-start;
|
||||||
|
}
|
||||||
.modal.prophetimages section .image-selector .selector {
|
.modal.prophetimages section .image-selector .selector {
|
||||||
color: #002680;
|
color: #002680;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
@@ -101,7 +110,7 @@
|
|||||||
}
|
}
|
||||||
.modal.prophetimages section .color-bar .color-line {
|
.modal.prophetimages section .color-bar .color-line {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-image: linear-gradient(to bottom, #fff, #ffdf00 16%, #e40000 37%, #ab00a5 62%, #000ca4 86%, #000000);
|
background-image: linear-gradient(to bottom, #ffffff, #ffffcc 16%, #ff9900 48%, #ff0066 64%, #3300ff 80%, #000033);
|
||||||
}
|
}
|
||||||
.modal.prophetimages section .color-bar .legend {
|
.modal.prophetimages section .color-bar .legend {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
+16
-7
@@ -69,17 +69,26 @@
|
|||||||
.timeseries {
|
.timeseries {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
flex-flow: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
time {
|
time {
|
||||||
color: #002680;
|
color: #002680;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
width: 200px;
|
width: 200px;
|
||||||
position: absolute;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-flow: column;
|
flex-flow: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
time:last-child{
|
||||||
|
align-items:flex-end;
|
||||||
|
}
|
||||||
|
time:first-child{
|
||||||
|
align-items:flex-start;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.selector {
|
.selector {
|
||||||
@@ -109,12 +118,12 @@
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
background-image: linear-gradient(
|
background-image: linear-gradient(
|
||||||
to bottom,
|
to bottom,
|
||||||
#fff,
|
rgba(255,255,255,1),
|
||||||
#ffdf00 16%,
|
rgba(255,255,204,1) 16%,
|
||||||
#e40000 37%,
|
rgba(255,153,0,1) 48%,
|
||||||
#ab00a5 62%,
|
rgba(255,0,102,1) 64%,
|
||||||
#000ca4 86%,
|
rgba(51,0,255,1) 80%,
|
||||||
#000000
|
rgba(0,0,51,1)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+6
@@ -32,6 +32,7 @@ export default class ThermoModal extends Vue {
|
|||||||
selectedImage: number = 0;
|
selectedImage: number = 0;
|
||||||
serverPath = "/thermoprophet/colored";
|
serverPath = "/thermoprophet/colored";
|
||||||
items: Prod.IProd[] = [];
|
items: Prod.IProd[] = [];
|
||||||
|
|
||||||
get images() {
|
get images() {
|
||||||
return this.items.map(i => i.thermoImage)
|
return this.items.map(i => i.thermoImage)
|
||||||
}
|
}
|
||||||
@@ -48,6 +49,7 @@ export default class ThermoModal extends Vue {
|
|||||||
this.TCamData = await warmersService.GetTCamData();
|
this.TCamData = await warmersService.GetTCamData();
|
||||||
await warmersService.ResetMeasurePoints();
|
await warmersService.ResetMeasurePoints();
|
||||||
|
|
||||||
|
console.log(this.lastItem);
|
||||||
let min = Math.min(this.lastItem.numDone);
|
let min = Math.min(this.lastItem.numDone);
|
||||||
this.items.push(...await prodService.History(min - 1, min - 1))
|
this.items.push(...await prodService.History(min - 1, min - 1))
|
||||||
}
|
}
|
||||||
@@ -63,6 +65,10 @@ export default class ThermoModal extends Vue {
|
|||||||
this.reloadMeasuresDelayed(this.images[this.selectedImage], this.measurePoints);
|
this.reloadMeasuresDelayed(this.images[this.selectedImage], this.measurePoints);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getImageCycle(Sel){
|
||||||
|
return this.items[Sel];
|
||||||
|
}
|
||||||
|
|
||||||
@Watch("selectedImage")
|
@Watch("selectedImage")
|
||||||
reloadMeasuresDelayed = debounce(async (image, points) => {
|
reloadMeasuresDelayed = debounce(async (image, points) => {
|
||||||
let result = await warmersService.GetMeasurePoints(image);
|
let result = await warmersService.GetMeasurePoints(image);
|
||||||
|
|||||||
+20
-6
@@ -6,10 +6,16 @@
|
|||||||
<div class="imagecontainer">
|
<div class="imagecontainer">
|
||||||
<img
|
<img
|
||||||
:src="`${serverPath}/${images[parseInt(selectedImage)]}.jpg`"
|
:src="`${serverPath}/${images[parseInt(selectedImage)]}.jpg`"
|
||||||
|
v-if="images.length && images[selectedImage]!='UNDEFINED'"
|
||||||
@click="imageclick"
|
@click="imageclick"
|
||||||
v-if="images.length"
|
|
||||||
ref="mainimage"
|
ref="mainimage"
|
||||||
/>
|
/>
|
||||||
|
<img
|
||||||
|
src="assets\icons\png\NOCamera.png"
|
||||||
|
v-if="images.length && images[selectedImage]=='UNDEFINED'"
|
||||||
|
ref="mainimage"
|
||||||
|
/>
|
||||||
|
|
||||||
<span>{{'thermo-long-tap-info' | localize("Long tap on image to add temperature inspectors")}}</span>
|
<span>{{'thermo-long-tap-info' | localize("Long tap on image to add temperature inspectors")}}</span>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
@@ -29,14 +35,21 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="image-selector">
|
<div class="image-selector">
|
||||||
<div class="timeseries">
|
<div class="timeseries">
|
||||||
<!-- <time>{{'first-image' | localize("First image")}}</time>
|
<time>{{'last-image' | localize("Last image")}}</time>
|
||||||
<time>{{'last-image' | localize("Last image")}}</time>-->
|
<time class="center"> </time>
|
||||||
|
<time>{{'first-image' | localize("First image")}}</time>
|
||||||
</div>
|
</div>
|
||||||
<img
|
<img
|
||||||
:src="`${serverPath}/${images[parseInt(selectedImage)]}.jpg`"
|
:src="`${serverPath}/${images[parseInt(selectedImage)]}.jpg`"
|
||||||
v-if="showPreview"
|
v-if="showPreview && images[selectedImage]!='UNDEFINED'"
|
||||||
class="selector"
|
class="selector"
|
||||||
:style="`left:${(parseInt(selectedImage) / (images.length-1)) * 858}px`"
|
:style="`left:${(parseInt(selectedImage) / (images.length-1)) * 858}px`"
|
||||||
|
/>
|
||||||
|
<img
|
||||||
|
src="assets\icons\png\NOCamera.png"
|
||||||
|
v-if="showPreview && images[selectedImage]=='UNDEFINED'"
|
||||||
|
class="selector"
|
||||||
|
:style="`left:${(parseInt(selectedImage) / (images.length-1)) * 858}px; background-color:#ffffff;`"
|
||||||
/>
|
/>
|
||||||
<input
|
<input
|
||||||
v-if="images.length"
|
v-if="images.length"
|
||||||
@@ -50,8 +63,9 @@
|
|||||||
<div class="selectorarea">
|
<div class="selectorarea">
|
||||||
<span
|
<span
|
||||||
class="selector"
|
class="selector"
|
||||||
|
v-if="getImageCycle(selectedImage)"
|
||||||
:style="`left:${(parseInt(selectedImage) / (images.length-1)) * 858}px`"
|
:style="`left:${(parseInt(selectedImage) / (images.length-1)) * 858}px`"
|
||||||
>{{'thermo-cycle' | localize("Cycle")}} {{selectedImage}}</span>
|
>{{'thermo-cycle' | localize("Cycle")}} {{getImageCycle(selectedImage).numDone}}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</modal>
|
</modal>
|
||||||
|
|||||||
+54
@@ -8,6 +8,8 @@ import { warmersService } from "@/services/warmersService";
|
|||||||
import { awaiter } from '@/_base';
|
import { awaiter } from '@/_base';
|
||||||
import termoModal from "./thermoProphet-modal.vue";
|
import termoModal from "./thermoProphet-modal.vue";
|
||||||
import { ModalHelper } from '@/components/modals';
|
import { ModalHelper } from '@/components/modals';
|
||||||
|
import moment from "moment";
|
||||||
|
import { messageService } from "src/_base";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
name: "thermocamera", components: {
|
name: "thermocamera", components: {
|
||||||
@@ -29,9 +31,15 @@ export default class Thermocamera extends Vue {
|
|||||||
thermoImageOpacity: number = 0;
|
thermoImageOpacity: number = 0;
|
||||||
resistanceMode = 0;
|
resistanceMode = 0;
|
||||||
|
|
||||||
|
timeoutLastTakenImage = 0;
|
||||||
|
timeCamDiff = " ";
|
||||||
|
|
||||||
TCamData: {
|
TCamData: {
|
||||||
imageSize: { x: number, y: number },
|
imageSize: { x: number, y: number },
|
||||||
rangeTemperature: { max: number, min: number },
|
rangeTemperature: { max: number, min: number },
|
||||||
|
thermoCamConnected: boolean,
|
||||||
|
thermoOptionActive: boolean,
|
||||||
|
lastTakenImage: Date,
|
||||||
} = null;
|
} = null;
|
||||||
|
|
||||||
@Watch("warmers", { deep: true })
|
@Watch("warmers", { deep: true })
|
||||||
@@ -53,6 +61,13 @@ export default class Thermocamera extends Vue {
|
|||||||
async mounted() {
|
async mounted() {
|
||||||
this.ChangedTemps();
|
this.ChangedTemps();
|
||||||
this.TCamData = await warmersService.GetTCamData();
|
this.TCamData = await warmersService.GetTCamData();
|
||||||
|
|
||||||
|
messageService.subscribeToChannel("new-thermocam-image", (args)=>{
|
||||||
|
if(this.TCamData){
|
||||||
|
console.log(args)
|
||||||
|
this.TCamData.lastTakenImage = args[0];
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
get selectedChannels(): Warmers.IChannel[] {
|
get selectedChannels(): Warmers.IChannel[] {
|
||||||
@@ -75,6 +90,45 @@ export default class Thermocamera extends Vue {
|
|||||||
// return (store.state.warmers.tCamStatus.thermoCamMode);
|
// return (store.state.warmers.tCamStatus.thermoCamMode);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
get thermocameraImageUrl(){
|
||||||
|
if(!this.TCamData || moment(this.TCamData.lastTakenImage).year() <= 2000)
|
||||||
|
return "/thermoprophet/colored/_last.jpg?lastmod=NOTAVAILABLE";
|
||||||
|
return "/thermoprophet/colored/_last.jpg?lastmod=" + this.TCamData.lastTakenImage;
|
||||||
|
}
|
||||||
|
|
||||||
|
get thermocameraImageOk(): boolean {
|
||||||
|
clearInterval(this.timeoutLastTakenImage);
|
||||||
|
this.timeCamDiff = " "
|
||||||
|
|
||||||
|
if(!this.TCamData)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if(moment(this.TCamData.lastTakenImage).year() > 2000)
|
||||||
|
{
|
||||||
|
this.lastTakenImageFuncion();
|
||||||
|
this.timeoutLastTakenImage = setInterval(this.lastTakenImageFuncion,10000);
|
||||||
|
return true;
|
||||||
|
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
lastTakenImageFuncion(){
|
||||||
|
var today = moment(new Date());
|
||||||
|
var end = moment(this.TCamData.lastTakenImage);
|
||||||
|
var diff = (moment.duration(today.diff(end)) as any)._data;
|
||||||
|
var seconds = diff.seconds;
|
||||||
|
var minutes = diff.minutes;
|
||||||
|
var hours = diff.hours;
|
||||||
|
|
||||||
|
if(hours >0)
|
||||||
|
this.timeCamDiff = hours + "h " + minutes + "m ";
|
||||||
|
else if(minutes >0)
|
||||||
|
this.timeCamDiff = minutes + "m " + seconds + "s ";
|
||||||
|
else
|
||||||
|
this.timeCamDiff = seconds + "s";
|
||||||
|
}
|
||||||
|
|
||||||
get thermocameraModeBTN(): boolean {
|
get thermocameraModeBTN(): boolean {
|
||||||
return (store.state.warmers.tCamStatus.thermoCamOnOff);
|
return (store.state.warmers.tCamStatus.thermoCamOnOff);
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-3
@@ -111,8 +111,8 @@
|
|||||||
@methodChanged="m => selectionMethod = m"
|
@methodChanged="m => selectionMethod = m"
|
||||||
:recipe="recipe"
|
:recipe="recipe"
|
||||||
:resistanceMode="resistanceMode"
|
:resistanceMode="resistanceMode"
|
||||||
thermoImage="/thermoprophet/colored/_last.jpg"
|
:thermoImage="thermocameraImageUrl"
|
||||||
:thermoImageVisible="thermocameraModeBTN"
|
:thermoImageVisible="true"
|
||||||
:thermoImageOpacity="thermoImageOpacity"
|
:thermoImageOpacity="thermoImageOpacity"
|
||||||
:isThermoProphet="true"
|
:isThermoProphet="true"
|
||||||
></warmers>
|
></warmers>
|
||||||
@@ -128,8 +128,9 @@
|
|||||||
<button class="btn btn-info square" @click="openThermoModal()">
|
<button class="btn btn-info square" @click="openThermoModal()">
|
||||||
<img src="/assets/icons/png/ico-bt-selez-image.png" />
|
<img src="/assets/icons/png/ico-bt-selez-image.png" />
|
||||||
</button>
|
</button>
|
||||||
|
<span>{{timeCamDiff}}</span>
|
||||||
<input
|
<input
|
||||||
:disabled="!thermocameraModeBTN"
|
:disabled="!thermocameraImageOk"
|
||||||
type="range"
|
type="range"
|
||||||
orient="vertical"
|
orient="vertical"
|
||||||
v-model="thermoImageOpacity"
|
v-model="thermoImageOpacity"
|
||||||
|
|||||||
-1
@@ -90,7 +90,6 @@ export default class Warmers extends Vue {
|
|||||||
|
|
||||||
// Ottengo le resistenze per ogni riga
|
// Ottengo le resistenze per ogni riga
|
||||||
resistancesPerRow(row: number) {
|
resistancesPerRow(row: number) {
|
||||||
console.log(row,this.resistances.filter(i => i.row == row))
|
|
||||||
return this.resistances.filter(i => i.row == row);
|
return this.resistances.filter(i => i.row == row);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+6
@@ -70,6 +70,9 @@ export default class VuotoPrincipale extends Vue {
|
|||||||
if(this.recipe.vacuum_main_2_chart_setpointx.setpointHMI <= 0 && this.recipe.vacuum_main_3_chart_setpointx.setpointHMI <= 0){
|
if(this.recipe.vacuum_main_2_chart_setpointx.setpointHMI <= 0 && this.recipe.vacuum_main_3_chart_setpointx.setpointHMI <= 0){
|
||||||
|
|
||||||
this.recipe.vacuum_main_1_chart_setpointx.setpointHMI = this.recipe.vacuum_main_max_time.setpointHMI;
|
this.recipe.vacuum_main_1_chart_setpointx.setpointHMI = this.recipe.vacuum_main_max_time.setpointHMI;
|
||||||
|
this.recipe.vacuum_main_2_chart_setpointx.setpointHMI = 0;
|
||||||
|
this.recipe.vacuum_main_3_chart_setpointx.setpointHMI = 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (this.recipe.vacuum_main_3_chart_setpointx.setpointHMI > 0){
|
else if (this.recipe.vacuum_main_3_chart_setpointx.setpointHMI > 0){
|
||||||
diff = this.recipe.vacuum_main_max_time.setpointHMI -
|
diff = this.recipe.vacuum_main_max_time.setpointHMI -
|
||||||
@@ -86,6 +89,7 @@ export default class VuotoPrincipale extends Vue {
|
|||||||
this.recipe.vacuum_main_3_chart_setpointx.setpointHMI;
|
this.recipe.vacuum_main_3_chart_setpointx.setpointHMI;
|
||||||
|
|
||||||
this.recipe.vacuum_main_2_chart_setpointx.setpointHMI = diff;
|
this.recipe.vacuum_main_2_chart_setpointx.setpointHMI = diff;
|
||||||
|
this.recipe.vacuum_main_3_chart_setpointx.setpointHMI = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
@@ -103,6 +107,7 @@ export default class VuotoPrincipale extends Vue {
|
|||||||
this.recipe.vacuum_main_3_chart_setpointx.setpointHMI;
|
this.recipe.vacuum_main_3_chart_setpointx.setpointHMI;
|
||||||
|
|
||||||
this.recipe.vacuum_main_2_chart_setpointx.setpointHMI = diff;
|
this.recipe.vacuum_main_2_chart_setpointx.setpointHMI = diff;
|
||||||
|
this.recipe.vacuum_main_3_chart_setpointx.setpointHMI = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -130,6 +135,7 @@ export default class VuotoPrincipale extends Vue {
|
|||||||
{
|
{
|
||||||
if(this.recipe.vacuum_main_3_chart_setpointx.setpointHMI <= 0){
|
if(this.recipe.vacuum_main_3_chart_setpointx.setpointHMI <= 0){
|
||||||
this.recipe.vacuum_main_2_chart_setpointx.setpointHMI = this.recipe.vacuum_main_max_time.setpointHMI - this.recipe.vacuum_main_1_chart_setpointx.setpointHMI;
|
this.recipe.vacuum_main_2_chart_setpointx.setpointHMI = this.recipe.vacuum_main_max_time.setpointHMI - this.recipe.vacuum_main_1_chart_setpointx.setpointHMI;
|
||||||
|
this.recipe.vacuum_main_3_chart_setpointx.setpointHMI = 0;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
diff = this.recipe.vacuum_main_max_time.setpointHMI -
|
diff = this.recipe.vacuum_main_max_time.setpointHMI -
|
||||||
|
|||||||
+31
-2
@@ -2,8 +2,37 @@ import { Component, Vue } from "vue-property-decorator";
|
|||||||
import Header from "../../../header/my-header.vue";
|
import Header from "../../../header/my-header.vue";
|
||||||
import MenuSx from "../../../menu-sx/menu-sx.vue";
|
import MenuSx from "../../../menu-sx/menu-sx.vue";
|
||||||
import LogMisurazioniTable from "../../../LogMisurazioni/components/tables/log-misurazioni-table/log-misurazioni-table.vue";
|
import LogMisurazioniTable from "../../../LogMisurazioni/components/tables/log-misurazioni-table/log-misurazioni-table.vue";
|
||||||
|
import { awaiter, messageService } from "@/_base";
|
||||||
|
import { CustomPagination } from "@/components/pagination";
|
||||||
|
import { Watch } from "vue-property-decorator";
|
||||||
|
import { underTheHoodService } from "@/services/underTheHoodService";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
components: { Header, MenuSx, LogMisurazioniTable }
|
components: { Header, MenuSx, LogMisurazioniTable,CustomPagination }
|
||||||
})
|
})
|
||||||
export default class LogMisurazioni extends Vue {}
|
export default class LogMisurazioni extends Vue {
|
||||||
|
|
||||||
|
currentPage: number = 0;
|
||||||
|
itemsPerPage: number = 10;
|
||||||
|
totalPages: number = 1;
|
||||||
|
|
||||||
|
rowData = [];
|
||||||
|
|
||||||
|
async mounted(){
|
||||||
|
this.reload();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Watch("currentPage", { deep: true })
|
||||||
|
async getLogs(){
|
||||||
|
var from = ((this.currentPage) * 10);
|
||||||
|
this.rowData = (await awaiter(underTheHoodService.GetHistorySheetsFitered(from,this.itemsPerPage)));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
async reload(){
|
||||||
|
this.currentPage = 0;
|
||||||
|
this.totalPages = await awaiter(underTheHoodService.GetHistorySheetsCount()) / this.itemsPerPage;
|
||||||
|
this.getLogs();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
+13
-1
@@ -1,6 +1,18 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="column-page-one-column">
|
<div class="column-page-one-column">
|
||||||
<LogMisurazioniTable></LogMisurazioniTable>
|
<LogMisurazioniTable :rowData="rowData"></LogMisurazioniTable>
|
||||||
|
<div class="menu">
|
||||||
|
<div class="load">
|
||||||
|
<custom-pagination
|
||||||
|
v-model="currentPage"
|
||||||
|
:items-per-page="itemsPerPage"
|
||||||
|
:total-pages="totalPages"
|
||||||
|
></custom-pagination>
|
||||||
|
</div>
|
||||||
|
<div class="toReload">
|
||||||
|
<button class="btn" @click="reload()"><i class="fa fa-refresh"></i></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<style lang="less">
|
<style lang="less">
|
||||||
|
|||||||
+28
@@ -0,0 +1,28 @@
|
|||||||
|
.main-container th,
|
||||||
|
.main-container td {
|
||||||
|
padding: 0 5px;
|
||||||
|
}
|
||||||
|
.main-container th.left,
|
||||||
|
.main-container td.left {
|
||||||
|
text-align: end;
|
||||||
|
}
|
||||||
|
.main-container th.lastre-date,
|
||||||
|
.main-container td.lastre-date {
|
||||||
|
width: 20%;
|
||||||
|
}
|
||||||
|
.main-container th.lastre-recipe,
|
||||||
|
.main-container td.lastre-recipe {
|
||||||
|
width: 20%;
|
||||||
|
}
|
||||||
|
.main-container th.lastre-numpezzo,
|
||||||
|
.main-container td.lastre-numpezzo {
|
||||||
|
width: 10%;
|
||||||
|
}
|
||||||
|
.main-container th.lastre-type,
|
||||||
|
.main-container td.lastre-type {
|
||||||
|
width: 20%;
|
||||||
|
}
|
||||||
|
.main-container th.lastre-value,
|
||||||
|
.main-container td.lastre-value {
|
||||||
|
width: 30%;
|
||||||
|
}
|
||||||
+15
-12
@@ -3,21 +3,24 @@
|
|||||||
.main-container {
|
.main-container {
|
||||||
th,
|
th,
|
||||||
td {
|
td {
|
||||||
&.misurazioni-value {
|
padding: 0 5px;
|
||||||
width: 322px;
|
&.left{
|
||||||
max-width: 322px;
|
text-align: end;
|
||||||
}
|
}
|
||||||
&.misurazioni-recipe {
|
&.lastre-date {
|
||||||
width: 539px;
|
width: 20%;
|
||||||
max-width: 539px;
|
|
||||||
}
|
}
|
||||||
&.misurazioni-date {
|
&.lastre-recipe {
|
||||||
width: 313px;
|
width: 20%;
|
||||||
max-width: 313px;
|
|
||||||
}
|
}
|
||||||
&.misurazioni-type {
|
&.lastre-numpezzo {
|
||||||
width: 187px;
|
width: 10%;
|
||||||
max-width: 187px;
|
}
|
||||||
|
&.lastre-type {
|
||||||
|
width: 20%;
|
||||||
|
}
|
||||||
|
&.lastre-value {
|
||||||
|
width: 30%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+25
-75
@@ -1,83 +1,33 @@
|
|||||||
import { Component, Vue } from "vue-property-decorator";
|
import { Component, Vue } from "vue-property-decorator";
|
||||||
|
import { Prop } from "vue-property-decorator";
|
||||||
|
import moment from "moment";
|
||||||
|
|
||||||
@Component({})
|
@Component({})
|
||||||
export default class LogMisurazioniTable extends Vue {
|
export default class LogMisurazioniTable extends Vue {
|
||||||
rowData = [];
|
|
||||||
|
@Prop({ default: []})
|
||||||
|
rowData:any;
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
this.rowData = [
|
}
|
||||||
{
|
|
||||||
date: "2020-09-16 00:23:20 UTC",
|
convertDate(date) {
|
||||||
recipe: "Recipe name [30]",
|
return moment(date).format('L');
|
||||||
type: "Lenght",
|
}
|
||||||
value: "568.08 mm [589.92 mm - 21.84 mm]"
|
convertDateToTime(date) {
|
||||||
},
|
return moment(date).format('LTS');
|
||||||
{
|
}
|
||||||
date: "2020-09-16 00:23:20 UTC",
|
|
||||||
recipe: "Recipe name [30]",
|
convertType(item){
|
||||||
type: "Lenght",
|
if (!item || item == 0)
|
||||||
value: "568.08 mm [589.92 mm - 21.84 mm]"
|
return "ND"
|
||||||
},
|
else if (item == 1)
|
||||||
{
|
return "PALLET HEIGHT"
|
||||||
date: "2020-09-16 00:23:20 UTC",
|
else if (item == 2)
|
||||||
recipe: "Recipe name [30]",
|
return "SHEET TICKNESS"
|
||||||
type: "Lenght",
|
else if (item == 2)
|
||||||
value: "568.08 mm [589.92 mm - 21.84 mm]"
|
return "SHEET LENGTH"
|
||||||
},
|
else
|
||||||
{
|
return "ND"
|
||||||
date: "2020-09-16 00:23:20 UTC",
|
|
||||||
recipe: "Recipe name [30]",
|
|
||||||
type: "Lenght",
|
|
||||||
value: "568.08 mm [589.92 mm - 21.84 mm]"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
date: "2020-09-16 00:23:20 UTC",
|
|
||||||
recipe: "Recipe name [30]",
|
|
||||||
type: "Lenght",
|
|
||||||
value: "568.08 mm [589.92 mm - 21.84 mm]"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
date: "2020-09-16 00:23:20 UTC",
|
|
||||||
recipe: "Recipe name [30]",
|
|
||||||
type: "Lenght",
|
|
||||||
value: "568.08 mm [589.92 mm - 21.84 mm]"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
date: "2020-09-16 00:23:20 UTC",
|
|
||||||
recipe: "Recipe name [30]",
|
|
||||||
type: "Lenght",
|
|
||||||
value: "568.08 mm [589.92 mm - 21.84 mm]"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
date: "2020-09-16 00:23:20 UTC",
|
|
||||||
recipe: "Recipe name [30]",
|
|
||||||
type: "Lenght",
|
|
||||||
value: "568.08 mm [589.92 mm - 21.84 mm]"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
date: "2020-09-16 00:23:20 UTC",
|
|
||||||
recipe: "Recipe name [30]",
|
|
||||||
type: "Lenght",
|
|
||||||
value: "568.08 mm [589.92 mm - 21.84 mm]"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
date: "2020-09-16 00:23:20 UTC",
|
|
||||||
recipe: "Recipe name [30]",
|
|
||||||
type: "Lenght",
|
|
||||||
value: "568.08 mm [589.92 mm - 21.84 mm]"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
date: "2020-09-16 00:23:20 UTC",
|
|
||||||
recipe: "Recipe name [30]",
|
|
||||||
type: "Lenght",
|
|
||||||
value: "568.08 mm [589.92 mm - 21.84 mm]"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
date: "2020-09-16 00:23:20 UTC",
|
|
||||||
recipe: "Recipe name [30]",
|
|
||||||
type: "Lenght",
|
|
||||||
value: "568.08 mm [589.92 mm - 21.84 mm]"
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+16
-28
@@ -3,40 +3,28 @@
|
|||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="misurazioni-date">Date</th>
|
<th class="lastre-date ">{{'underthehood_label_date' | localize("Date")}}</th>
|
||||||
<th class="misurazioni-recipe">Recipe</th>
|
<th class="lastre-recipe">{{'underthehood_label_recipe' | localize("Ricetta")}}</th>
|
||||||
<th class="misurazioni-type">Type</th>
|
<th class="lastre-numpezzo left">{{'underthehood_label_numpiece' | localize("N. Pezzo")}}</th>
|
||||||
<th class="misurazioni-value">Value</th>
|
<th class="lastre-type left">{{'underthehood_label_type' | localize("Type")}}</th>
|
||||||
|
<th class="lastre-value left">{{'underthehood_label_value' | localize("Value")}}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody class="autocolor">
|
<tbody class="autocolor">
|
||||||
<tr v-for="(item, i) of rowData" :key="i" class="tr-inner">
|
<template v-for="(item, idx) in rowData">
|
||||||
<td>
|
<tr :key="`c-${idx}`">
|
||||||
<span>
|
<td>{{convertDate(item.dtEvent)}} - {{convertDateToTime(item.dtEvent)}}</td>
|
||||||
{{ item.date }}
|
<td>{{item.recipeName}}</td>
|
||||||
</span>
|
<td class="left">{{item.numDone}}</td>
|
||||||
</td>
|
<td class="left">{{convertType(item.typeVal)}}</td>
|
||||||
<td>
|
<td class="left">{{item.firstVal | round(1)}} [{{item.secondVal | round(1)}}, {{item.thirdVal | round(1)}}]</td>
|
||||||
<span>
|
</tr>
|
||||||
{{ item.recipe }}
|
</template>
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<span>
|
|
||||||
{{ item.type }}
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<span>
|
|
||||||
{{ item.value }}
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<style lang="less">
|
<style lang="less">
|
||||||
@import "log-misurazioni-table.less";
|
@import "log-misurazioni-table.less";
|
||||||
</style>
|
</style>
|
||||||
<script lang="ts" src="./log-misurazioni-table.ts"></script>
|
<script lang="ts" src="./log-misurazioni-table.ts"></script>
|
||||||
-1
@@ -14,7 +14,6 @@ export default class RiscaldiTable extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getChannelInfo(id) {
|
getChannelInfo(id) {
|
||||||
console.log(store.state.warmers.channels.filter(i => i.idChannel == 5)[0]);
|
|
||||||
return store.state.warmers.channels.filter(i => i.idChannel == id)[0];
|
return store.state.warmers.channels.filter(i => i.idChannel == id)[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,11 +10,11 @@
|
|||||||
@click="go('log-ciclo-automatico')"
|
@click="go('log-ciclo-automatico')"
|
||||||
:class="{white: this.value == 'log-ciclo-automatico'}"
|
:class="{white: this.value == 'log-ciclo-automatico'}"
|
||||||
>{{'underthehood_label_loga' | localize("Log ciclo automatico")}}</div>
|
>{{'underthehood_label_loga' | localize("Log ciclo automatico")}}</div>
|
||||||
<!-- <div
|
<div
|
||||||
class="rettangle"
|
class="rettangle"
|
||||||
@click="go('log-misurazioni')"
|
@click="go('log-misurazioni')"
|
||||||
:class="{white: this.value == 'log-misurazioni'}"
|
:class="{white: this.value == 'log-misurazioni'}"
|
||||||
>{{'underthehood_label_logm' | localize("Log misurazioni")}}</div>-->
|
>{{'underthehood_label_logm' | localize("Log misurazioni")}}</div>
|
||||||
<div
|
<div
|
||||||
class="rettangle"
|
class="rettangle"
|
||||||
@click="go('assi')"
|
@click="go('assi')"
|
||||||
|
|||||||
@@ -124,8 +124,7 @@ export class Hub {
|
|||||||
this._hub.client.gaugeData = Hub.gaugeData;
|
this._hub.client.gaugeData = Hub.gaugeData;
|
||||||
this._hub.client.axisInfo = Hub.axisInfoData;
|
this._hub.client.axisInfo = Hub.axisInfoData;
|
||||||
this._hub.client.channelsIoVal = Hub.channelsIOUpdate;
|
this._hub.client.channelsIoVal = Hub.channelsIOUpdate;
|
||||||
|
this._hub.client.newThermoCamImage = Hub.newThermoCamImage;
|
||||||
|
|
||||||
|
|
||||||
this._hub.client.logout = this.logout;
|
this._hub.client.logout = this.logout;
|
||||||
|
|
||||||
@@ -219,6 +218,11 @@ export class Hub {
|
|||||||
recipeActions.setOverview(store, data);
|
recipeActions.setOverview(store, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static newThermoCamImage(data) {
|
||||||
|
messageService.publishToChannel("new-thermocam-image", data);
|
||||||
|
}
|
||||||
|
|
||||||
public static prodPanelData(data) {
|
public static prodPanelData(data) {
|
||||||
prodActions.setProdPanel(store, data);
|
prodActions.setProdPanel(store, data);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,6 +43,17 @@ export class UnderTheHoodService extends baseRestService {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
async GetHistorySheetsCount() {
|
||||||
|
let result = await this.Get<number>((await this.BASE_URL()) + "/api/underthehood/SheetHistoryCount", true);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
async GetHistorySheetsFitered(from,num) {
|
||||||
|
let result = await this.Get<number>((await this.BASE_URL()) + `/api/underthehood/SheetHistoryFiltered?start=${from}&number=${num}`, true);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export const underTheHoodService = new UnderTheHoodService();
|
export const underTheHoodService = new UnderTheHoodService();
|
||||||
@@ -71,10 +71,14 @@ export class WarmersService extends baseRestService {
|
|||||||
let result = await this.Get<{
|
let result = await this.Get<{
|
||||||
imageSize: { x: number, y: number },
|
imageSize: { x: number, y: number },
|
||||||
rangeTemperature: { max: number, min: number },
|
rangeTemperature: { max: number, min: number },
|
||||||
|
thermoCamConnected: boolean,
|
||||||
|
thermoOptionActive: boolean,
|
||||||
|
lastTakenImage: Date,
|
||||||
}>((await this.BASE_URL()) + "TCamData", true);
|
}>((await this.BASE_URL()) + "TCamData", true);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async GetMeasurePoints(setname: string): Promise<any> {
|
async GetMeasurePoints(setname: string): Promise<any> {
|
||||||
return await this.Get<any>((await this.BASE_URL()) + `getMeasurePoints?setName=${setname}`, true);
|
return await this.Get<any>((await this.BASE_URL()) + `getMeasurePoints?setName=${setname}`, true);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user