Compare commits
41 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 | |||
| c31edb94d5 | |||
| 86fd710aaa | |||
| f1f8f3aa97 | |||
| 83d6f40491 | |||
| 21cb4050b0 | |||
| 027eed8770 | |||
| 43de959bca | |||
| 5a56d53d90 | |||
| 89b0ce5f96 | |||
| e57d16d690 |
@@ -51,6 +51,14 @@
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Flir.Atlas.Image, Version=2.0.14266.1000, Culture=neutral, PublicKeyToken=caa391fd8e07c76b, processorArchitecture=x86">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\..\..\Program Files (x86)\FLIR Systems\FLIR Atlas SDK 6\bin\x86\Flir.Atlas.Image.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Flir.Atlas.Live, Version=2.0.14266.1000, Culture=neutral, PublicKeyToken=caa391fd8e07c76b, processorArchitecture=x86">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\..\..\Program Files (x86)\FLIR Systems\FLIR Atlas SDK 6\bin\x86\Flir.Atlas.Live.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Core" />
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using Flir.Atlas.Live.Device;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
@@ -26,6 +27,11 @@ namespace Thermo.Active.Thermocamera
|
||||
|
||||
public static readonly string BASE_PATH = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);
|
||||
|
||||
/// <summary>
|
||||
/// Indica se la camera sia connessa
|
||||
/// </summary>
|
||||
public bool CameraIsConnected = false;
|
||||
|
||||
#endregion Public Fields
|
||||
|
||||
#region Public Constructors
|
||||
@@ -33,12 +39,15 @@ namespace Thermo.Active.Thermocamera
|
||||
/// <summary>
|
||||
/// Init classe
|
||||
/// </summary>
|
||||
/// <param name="isLive">Indica aabilitazione alive straming vs load dati storici</param>
|
||||
/// <param name="isLive">Indica aabilitazione a live straming vs load dati storici</param>
|
||||
public ThermoCamComunicator(bool isLive)
|
||||
{
|
||||
// init classe controllo camera
|
||||
TCamLive = new TCContr($"{Constants.WEBSITE_DIRECTORY}\\{Constants.THERMO_DATA_FOLDER}", $"{BASE_PATH}\\{Constants.CONFIG_DIRECTORY}");
|
||||
|
||||
// aggancio evento connesisone/disconnessione
|
||||
TCamLive.eh_CameraConnStatusChanged += TCamLive_eh_CameraConnStatusChanged;
|
||||
|
||||
// avvio classe gestione thermocamera...
|
||||
TCamLive.tryReloadConf();
|
||||
|
||||
@@ -49,6 +58,12 @@ namespace Thermo.Active.Thermocamera
|
||||
}
|
||||
}
|
||||
|
||||
private void TCamLive_eh_CameraConnStatusChanged(object sender, Flir.Atlas.Live.ConnectionStatusChangedEventArgs e)
|
||||
{
|
||||
// salvo stato connessione
|
||||
CameraIsConnected = e.Status == ConnectionStatus.Connected;
|
||||
}
|
||||
|
||||
#endregion Public Constructors
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
@@ -31,6 +31,8 @@
|
||||
<CMSConnectReady>true</CMSConnectReady>
|
||||
<maxAlarmsRows>50000</maxAlarmsRows>
|
||||
<alarmToDelete>5000</alarmToDelete>
|
||||
<maxSheetHistoryRows>10000</maxSheetHistoryRows>
|
||||
<sheetHistoryToDelete>500</sheetHistoryToDelete>
|
||||
</serverConfig>
|
||||
<extSoftwares>
|
||||
<software>
|
||||
@@ -113,6 +115,10 @@
|
||||
<key>RangeTempMax</key>
|
||||
<value>100</value>
|
||||
</entry>
|
||||
<entry>
|
||||
<key>EnableThermocam</key>
|
||||
<value>true</value>
|
||||
</entry>
|
||||
</additionalParameters>
|
||||
<unitOfMeasures>
|
||||
<unitOfMeasure id="0" value="" />
|
||||
@@ -129,7 +135,7 @@
|
||||
<thread name="axis" value="200" />
|
||||
<thread name="channelsIoFast" value="300" />
|
||||
<thread name="channelsIoSlow" value="5000" />
|
||||
<thread name="area" value="500" />
|
||||
<thread name="area" value="2500" />
|
||||
<thread name="confReq" value="2000" />
|
||||
<thread name="expMan" value="30000" />
|
||||
<thread name="functionEnab" value="300" />
|
||||
@@ -141,12 +147,12 @@
|
||||
<thread name="prodInfo" value="1000" />
|
||||
<thread name="prodPanel" value="500" />
|
||||
<thread name="modules" value="200" />
|
||||
<thread name="recipe" value="4000" />
|
||||
<thread name="recipe" value="1000" />
|
||||
<thread name="scada" value="1000" />
|
||||
<thread name="statusCommand" value="250" />
|
||||
<thread name="FlirCamera" value="500" />
|
||||
<thread name="userSK" value="250" />
|
||||
<thread name="warmers" value="500" />
|
||||
<thread name="warmers" value="2000" />
|
||||
<thread name="watchdog" value="250" />
|
||||
<thread name="stats" value="2000" />
|
||||
</sampling>
|
||||
|
||||
@@ -42,6 +42,8 @@
|
||||
<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="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:all>
|
||||
</xs:complexType>
|
||||
|
||||
@@ -1033,6 +1033,8 @@ namespace Thermo.Active.Config
|
||||
MTCApplicationName = x.Element("MTCApplicationName").Value,
|
||||
MaxAlarmsRows = Convert.ToInt32(x.Element("maxAlarmsRows").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)
|
||||
}).FirstOrDefault();
|
||||
|
||||
|
||||
@@ -339,77 +339,94 @@ public static class ThreadsFunctions
|
||||
public static void ManageFlirCamera()
|
||||
{
|
||||
NcAdapter ncAdapter = new NcAdapter();
|
||||
ThermoCamComunicator TCCom = new ThermoCamComunicator(true);
|
||||
Stopwatch sw = new Stopwatch();
|
||||
try
|
||||
// verifica abilitazione thermocam
|
||||
if (NcAdapter.EnableThermocam)
|
||||
{
|
||||
// Try connection
|
||||
CmsError libraryError = ncAdapter.Connect();
|
||||
if (libraryError.errorCode != 0)
|
||||
ManageLibraryError(libraryError);
|
||||
|
||||
while (true)
|
||||
// avvio oggetto thermocam
|
||||
ThermoCamComunicator TCCom = new ThermoCamComunicator(true);
|
||||
Stopwatch sw = new Stopwatch();
|
||||
try
|
||||
{
|
||||
bool flirImageReq = false;
|
||||
sw.Restart();
|
||||
// Try connection
|
||||
CmsError libraryError = ncAdapter.Connect();
|
||||
if (libraryError.errorCode != 0)
|
||||
ManageLibraryError(libraryError);
|
||||
|
||||
// Check if client is connected
|
||||
if (ncAdapter.numericalControl.NC_IsConnected())
|
||||
while (true)
|
||||
{
|
||||
// check if there is a photo request pending
|
||||
libraryError = ncAdapter.checkFlirImageRequest(out flirImageReq);
|
||||
if (libraryError.IsError())
|
||||
ManageLibraryError(libraryError);
|
||||
bool flirImageReq = false;
|
||||
sw.Restart();
|
||||
|
||||
if (flirImageReq)
|
||||
// Check if client is connected
|
||||
if (ncAdapter.numericalControl.NC_IsConnected())
|
||||
{
|
||||
bool done = false;
|
||||
// if requested --> give ack!
|
||||
ncAdapter.ManageFlirStrobe();
|
||||
// requesto photo from library
|
||||
NcAdapter.lastThermoImage = TCCom.takePicture();
|
||||
done = !string.IsNullOrEmpty(NcAdapter.lastThermoImage);
|
||||
if (done)
|
||||
// check if there is a photo request pending
|
||||
libraryError = ncAdapter.checkFlirImageRequest(out flirImageReq);
|
||||
if (libraryError.IsError())
|
||||
ManageLibraryError(libraryError);
|
||||
|
||||
if (flirImageReq)
|
||||
{
|
||||
// init
|
||||
List<Thermo.Cam.Utils.MeasurePoint> measuredpoints = new List<Thermo.Cam.Utils.MeasurePoint>();
|
||||
Dictionary<int, double> actualTemp = new Dictionary<int, double>();
|
||||
Dictionary<int, ThermoPoint> chPoints = new Dictionary<int, ThermoPoint>();
|
||||
// recupero punti centrali resistenze
|
||||
ncAdapter.GetWarmersChannelCenterPoints(out chPoints);
|
||||
// richiesta temperature per i punti
|
||||
done = TCCom.readMultiTemperatures("", chPoints, out measuredpoints);
|
||||
// converto in actualTemp
|
||||
foreach (var item in measuredpoints)
|
||||
bool done = false;
|
||||
// if requested --> give ack!
|
||||
ncAdapter.ManageFlirStrobe();
|
||||
// requesto photo from library
|
||||
NcAdapter.lastThermoImage = TCCom.takePicture();
|
||||
done = !string.IsNullOrEmpty(NcAdapter.lastThermoImage);
|
||||
if (done)
|
||||
{
|
||||
actualTemp.Add(item.Id, item.Temperature);
|
||||
// init
|
||||
List<Thermo.Cam.Utils.MeasurePoint> measuredpoints = new List<Thermo.Cam.Utils.MeasurePoint>();
|
||||
Dictionary<int, double> actualTemp = new Dictionary<int, double>();
|
||||
Dictionary<int, ThermoPoint> chPoints = new Dictionary<int, ThermoPoint>();
|
||||
// recupero punti centrali resistenze
|
||||
ncAdapter.GetWarmersChannelCenterPoints(out chPoints);
|
||||
// richiesta temperature per i punti
|
||||
done = TCCom.readMultiTemperatures("", chPoints, out measuredpoints);
|
||||
// converto in actualTemp
|
||||
foreach (var item in measuredpoints)
|
||||
{
|
||||
actualTemp.Add(item.Id, item.Temperature);
|
||||
}
|
||||
// salvo dati temp sul PLC
|
||||
ncAdapter.WriteRecipeWarmChTCamTempAct(actualTemp);
|
||||
NcAdapter.lastImageTaken = DateTime.Now;
|
||||
// give PLC strobe for uploaded Actual TEMP from image
|
||||
ncAdapter.SendTCamImageReadyStrb();
|
||||
|
||||
|
||||
MessageServices.Current.Publish(SEND_NEWTCAMIMAGE, null, NcAdapter.lastImageTaken);
|
||||
|
||||
}
|
||||
// salvo dati temp sul PLC
|
||||
ncAdapter.WriteRecipeWarmChTCamTempAct(actualTemp);
|
||||
// give PLC strobe for uploaded Actual TEMP from image
|
||||
ncAdapter.SendTCamImageReadyStrb();
|
||||
}
|
||||
|
||||
// salvo status thermocam...
|
||||
NcAdapter.cameraIsConnected = TCCom.CameraIsConnected;
|
||||
|
||||
}
|
||||
else
|
||||
RestoreConnection();
|
||||
|
||||
sw.Stop();
|
||||
|
||||
// Update thread timer
|
||||
UpdateStat(MethodBase.GetCurrentMethod().Name, sw.ElapsedMilliseconds);
|
||||
// Wait
|
||||
Thread.Sleep(CalcSleepTime(samplMsec("FlirCamera"), (int)sw.ElapsedMilliseconds));
|
||||
}
|
||||
else
|
||||
RestoreConnection();
|
||||
|
||||
sw.Stop();
|
||||
|
||||
// Update thread timer
|
||||
UpdateStat(MethodBase.GetCurrentMethod().Name, sw.ElapsedMilliseconds);
|
||||
// Wait
|
||||
Thread.Sleep(CalcSleepTime(samplMsec("FlirCamera"), (int)sw.ElapsedMilliseconds));
|
||||
}
|
||||
}
|
||||
catch (ThreadAbortException)
|
||||
{
|
||||
ncAdapter.Dispose();
|
||||
}
|
||||
finally
|
||||
{
|
||||
// chiudo thermocam
|
||||
TCCom.Dispose();
|
||||
catch (ThreadAbortException)
|
||||
{
|
||||
ncAdapter.Dispose();
|
||||
// chiudo thermocam
|
||||
TCCom.Dispose();
|
||||
}
|
||||
finally
|
||||
{
|
||||
ncAdapter.Dispose();
|
||||
// chiudo thermocam
|
||||
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!
|
||||
public DbSet<ProdInfoModel> ProdInfo { get; set; }
|
||||
|
||||
public DbSet<HistorySheetModel> HistorySheet { get; set; }
|
||||
|
||||
// Create migration string
|
||||
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>
|
||||
<Compile Include="Controllers\AlarmsController.cs" />
|
||||
<Compile Include="Controllers\FunctionsAccessController.cs" />
|
||||
<Compile Include="Controllers\HistorySheetsController.cs" />
|
||||
<Compile Include="Controllers\ProdInfoController.cs" />
|
||||
<Compile Include="Controllers\MachinesController.cs" />
|
||||
<Compile Include="Controllers\MaintenancesController.cs" />
|
||||
@@ -158,6 +159,18 @@
|
||||
<Compile Include="Migrations\202102171753226_Added_ThermoImage_prodInfo.Designer.cs">
|
||||
<DependentUpon>202102171753226_Added_ThermoImage_prodInfo.cs</DependentUpon>
|
||||
</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="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Redis\redUtil.cs" />
|
||||
@@ -212,6 +225,15 @@
|
||||
<EmbeddedResource Include="Migrations\202102171753226_Added_ThermoImage_prodInfo.resx">
|
||||
<DependentUpon>202102171753226_Added_ThermoImage_prodInfo.cs</DependentUpon>
|
||||
</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>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
@@ -18,5 +18,9 @@ namespace Thermo.Active.Model.ConfigModels
|
||||
|
||||
public int MaxAlarmsRows { 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_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_ERROR_TO_UI = "SEND_ERROR_TO_UI";
|
||||
public const string SEND_EXPIRED_MAINTENANCES_DATA = "SEND_EXPIRED_MAINTENANCES_DATA";
|
||||
|
||||
@@ -30,11 +30,21 @@ namespace Thermo.Active.Model.DTOModels.ThWarmers
|
||||
/// </summary>
|
||||
public bool ThermoCamOnOff { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Stato connessione ThermoCamera (in rete)
|
||||
/// </summary>
|
||||
public bool ThermoCamConnected { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Opzione ThermoCamera (set by PLC)
|
||||
/// </summary>
|
||||
public bool ThermoOptionActive { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Data ultima acquisizione
|
||||
/// </summary>
|
||||
public DateTime LastTakenImage { get; set; } = new DateTime(0);
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Public Methods
|
||||
@@ -59,7 +69,9 @@ namespace Thermo.Active.Model.DTOModels.ThWarmers
|
||||
return false;
|
||||
if (RangeTemperature != item.RangeTemperature)
|
||||
return false;
|
||||
|
||||
if (LastTakenImage != item.LastTakenImage)
|
||||
return false;
|
||||
|
||||
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\AlarmOccurrencesModel.cs" />
|
||||
<Compile Include="DatabaseModels\AlarmUserModel.cs" />
|
||||
<Compile Include="DatabaseModels\HistorySheetModel.cs" />
|
||||
<Compile Include="DatabaseModels\FavoriteUserSoftKeyModel.cs" />
|
||||
<Compile Include="DatabaseModels\FunctionAccessModel.cs" />
|
||||
<Compile Include="ConfigModels\MessageModel.cs" />
|
||||
|
||||
@@ -135,6 +135,16 @@ namespace Thermo.Active.NC
|
||||
/// </summary>
|
||||
public NcThermo numericalControl;
|
||||
|
||||
/// <summary>
|
||||
/// Indica se la FLIR camera è connessa
|
||||
/// </summary>
|
||||
public static bool cameraIsConnected = false;
|
||||
|
||||
/// <summary>
|
||||
/// Indica se la FLIR camera è connessa
|
||||
/// </summary>
|
||||
public static DateTime lastImageTaken = new DateTime(0);
|
||||
|
||||
#endregion Public Fields
|
||||
|
||||
#region Public Constructors
|
||||
@@ -1409,7 +1419,9 @@ namespace Thermo.Active.NC
|
||||
|
||||
// leggo la ricetta dal PLC!
|
||||
var currRecipe = new Dictionary<string, DTORecipeParam>();
|
||||
libraryError = ReadFullRecipe(out currRecipe);
|
||||
//libraryError = ReadFullRecipe(out currRecipe);
|
||||
libraryError = ReadRecipeData(true, true, out currRecipe);
|
||||
|
||||
if (libraryError.IsError())
|
||||
return libraryError;
|
||||
|
||||
@@ -1680,7 +1692,7 @@ namespace Thermo.Active.NC
|
||||
var currRecipe = new Dictionary<string, DTORecipeParam>();
|
||||
|
||||
// read recipe
|
||||
libraryError = ReadRecipeData(false, true, out currRecipe);
|
||||
libraryError = ReadRecipeData(true, true, out currRecipe);
|
||||
if (libraryError.IsError())
|
||||
return libraryError;
|
||||
|
||||
@@ -2508,7 +2520,7 @@ namespace Thermo.Active.NC
|
||||
{
|
||||
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...
|
||||
forceProdPanelDbReload = true;
|
||||
}
|
||||
@@ -2554,6 +2566,26 @@ namespace Thermo.Active.NC
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -3120,6 +3152,16 @@ namespace Thermo.Active.NC
|
||||
return libraryError;
|
||||
}
|
||||
|
||||
public static bool EnableThermocam
|
||||
{
|
||||
get
|
||||
{
|
||||
bool answ = false;
|
||||
bool.TryParse(AdditionalParametersConfig["EnableThermocam"], out answ);
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
public CmsError ReadTCamData(out DTOThermoCam currTCamData)
|
||||
{
|
||||
CmsError libraryError = NO_ERROR;
|
||||
@@ -3153,6 +3195,11 @@ namespace Thermo.Active.NC
|
||||
Min = minVal,
|
||||
Max = maxVal
|
||||
};
|
||||
// controllo se connessa
|
||||
currTCamData.ThermoCamConnected = cameraIsConnected;
|
||||
|
||||
// DataOra ultima immagine scattata
|
||||
currTCamData.LastTakenImage = lastImageTaken;
|
||||
}
|
||||
return libraryError;
|
||||
}
|
||||
|
||||
@@ -430,4 +430,6 @@
|
||||
<axis_info_position>In posizione:</axis_info_position>
|
||||
<axis_info_error>In errore:</axis_info_error>
|
||||
<axis_info_brakealm>Allarme test freno:</axis_info_brakealm>
|
||||
<bitselect_select_none>Nessuno</bitselect_select_none>
|
||||
<bitselect_select_all>Tutti</bitselect_select_all>
|
||||
</root>
|
||||
@@ -430,4 +430,6 @@
|
||||
<axis_info_position>In Position:</axis_info_position>
|
||||
<axis_info_error>In Error:</axis_info_error>
|
||||
<axis_info_brakealm>Brake Test Alarm:</axis_info_brakealm>
|
||||
<bitselect_select_none>None</bitselect_select_none>
|
||||
<bitselect_select_all>All</bitselect_select_all>
|
||||
</root>
|
||||
@@ -100,7 +100,8 @@ namespace Thermo.Active.Controllers.WebApi
|
||||
}
|
||||
|
||||
// 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())
|
||||
{
|
||||
ThermoActiveLogger.LogError($"GetRecipeOverview error | {libraryError.exception}");
|
||||
|
||||
@@ -15,6 +15,7 @@ using System.Windows.Media.Animation;
|
||||
using TeamDev.SDK.MVVM;
|
||||
using Thermo.Active.Config;
|
||||
using Thermo.Active.Database.Controllers;
|
||||
using Thermo.Active.Model.DatabaseModels;
|
||||
using Thermo.Active.Model.DTOModels;
|
||||
using Thermo.Active.Model.DTOModels.ThIO;
|
||||
using Thermo.Active.Model.DTOModels.ThRecipe;
|
||||
@@ -364,5 +365,41 @@ namespace Thermo.Active.Controllers.WebApi
|
||||
// ritorno solo fatto!
|
||||
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)
|
||||
{
|
||||
|
||||
@@ -68,6 +68,10 @@ namespace Thermo.Active.Listeners
|
||||
{
|
||||
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) =>
|
||||
{
|
||||
SignalRListener.SendActiveProgramData(a);
|
||||
@@ -130,6 +134,7 @@ namespace Thermo.Active.Listeners
|
||||
}));
|
||||
infos.Add(MessageServices.Current.Subscribe(SEND_THERMO_PROD_INFO_DATA, (a, b) =>
|
||||
{
|
||||
SignalRDatabaseHandler.cleanHistorySheets();
|
||||
SignalRListener.SendThermoProdInfoData(a);
|
||||
}));
|
||||
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)
|
||||
{
|
||||
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
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.1.179")]
|
||||
[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>
|
||||
<div class="col">
|
||||
<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 class="col">
|
||||
<small>{{'history-item_vacuum' | localize("vuoto")}}</small>
|
||||
@@ -29,7 +29,7 @@
|
||||
</div>
|
||||
<div class="col">
|
||||
<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 class="col">
|
||||
<small>{{'history_item_cycletimegross' | localize("tempo ciclo lordo")}}</small>
|
||||
@@ -53,7 +53,7 @@
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<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 class="col">
|
||||
<small>{{'history_item_mouldenergyin' | localize("energia utilizzata in")}}</small>
|
||||
|
||||
@@ -9,7 +9,6 @@ export default class stats extends Vue {
|
||||
value: { [id: number]: number };
|
||||
|
||||
get Values(): number[] {
|
||||
console.log(this.value);
|
||||
var r: number[] = [];
|
||||
if (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" :y2="height" stroke="#353535" stroke-width="1" />
|
||||
</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>
|
||||
<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" />
|
||||
|
||||
@@ -118,8 +118,6 @@ export default class Dashboard extends Vue {
|
||||
this.itemsMap.set(i.numDone, i);
|
||||
}
|
||||
this.items = Array.from(this.itemsMap.values()).sort((a, b) => b.numDone - a.numDone);
|
||||
|
||||
console.log(this.items);
|
||||
this.loading = false;
|
||||
}
|
||||
|
||||
@@ -204,13 +202,33 @@ export default class Dashboard extends Vue {
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
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();
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
public async savePyr(){
|
||||
@@ -229,7 +247,11 @@ export default class Dashboard extends Vue {
|
||||
get payload() {
|
||||
return {
|
||||
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" >
|
||||
<i class="fa fa-minus"></i>
|
||||
</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>
|
||||
<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>
|
||||
<button @click="incrementPyr()" :disabled="!recipe.pyrometer_pyrometer_setpoint.status.enabled" >
|
||||
<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.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;
|
||||
}
|
||||
|
||||
|
||||
@@ -40,6 +40,18 @@
|
||||
overflow: hidden;
|
||||
height: auto !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 {
|
||||
height: 70px !important;
|
||||
@@ -47,7 +59,8 @@
|
||||
grid-template-columns: 68px 1fr;
|
||||
align-items: center;
|
||||
justify-items: center;
|
||||
border: 1px solid #979797;
|
||||
border-bottom: 1px solid #979797;
|
||||
border-right: 1px solid #979797;
|
||||
}
|
||||
.bitSelect > section.bitsections > article label {
|
||||
width: 100%;
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
> section.bitsections {
|
||||
> section.bitsections {
|
||||
position: absolute !important;
|
||||
top: 48px;
|
||||
right: 0;
|
||||
@@ -42,13 +42,28 @@
|
||||
height: auto !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 {
|
||||
height: 70px !important;
|
||||
display: grid !important;
|
||||
grid-template-columns: 68px 1fr;
|
||||
align-items: center;
|
||||
justify-items: center;
|
||||
border: 1px solid #979797;
|
||||
border-bottom: 1px solid #979797;
|
||||
border-right: 1px solid #979797;
|
||||
|
||||
label {
|
||||
width: 100%;
|
||||
|
||||
@@ -66,4 +66,20 @@ export default class bitSelect extends Vue {
|
||||
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>
|
||||
<label :for="`cb-${b}`">{{`${key}_${b}` | localize((b).toString())}}</label>
|
||||
</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>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
+11
-2
@@ -68,17 +68,26 @@
|
||||
.modal.prophetimages section .image-selector .timeseries {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-flow: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.modal.prophetimages section .image-selector .timeseries time {
|
||||
color: #002680;
|
||||
font-size: 18px;
|
||||
font-weight: 500;
|
||||
width: 200px;
|
||||
position: absolute;
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
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 {
|
||||
color: #002680;
|
||||
font-size: 18px;
|
||||
@@ -101,7 +110,7 @@
|
||||
}
|
||||
.modal.prophetimages section .color-bar .color-line {
|
||||
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 {
|
||||
display: flex;
|
||||
|
||||
+16
-7
@@ -69,17 +69,26 @@
|
||||
.timeseries {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-flow: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
time {
|
||||
color: #002680;
|
||||
font-size: 18px;
|
||||
font-weight: 500;
|
||||
width: 200px;
|
||||
position: absolute;
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
align-items: center;
|
||||
}
|
||||
time:last-child{
|
||||
align-items:flex-end;
|
||||
}
|
||||
time:first-child{
|
||||
align-items:flex-start;
|
||||
}
|
||||
}
|
||||
|
||||
.selector {
|
||||
@@ -109,12 +118,12 @@
|
||||
height: 100%;
|
||||
background-image: linear-gradient(
|
||||
to bottom,
|
||||
#fff,
|
||||
#ffdf00 16%,
|
||||
#e40000 37%,
|
||||
#ab00a5 62%,
|
||||
#000ca4 86%,
|
||||
#000000
|
||||
rgba(255,255,255,1),
|
||||
rgba(255,255,204,1) 16%,
|
||||
rgba(255,153,0,1) 48%,
|
||||
rgba(255,0,102,1) 64%,
|
||||
rgba(51,0,255,1) 80%,
|
||||
rgba(0,0,51,1)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
+6
@@ -32,6 +32,7 @@ export default class ThermoModal extends Vue {
|
||||
selectedImage: number = 0;
|
||||
serverPath = "/thermoprophet/colored";
|
||||
items: Prod.IProd[] = [];
|
||||
|
||||
get images() {
|
||||
return this.items.map(i => i.thermoImage)
|
||||
}
|
||||
@@ -48,6 +49,7 @@ export default class ThermoModal extends Vue {
|
||||
this.TCamData = await warmersService.GetTCamData();
|
||||
await warmersService.ResetMeasurePoints();
|
||||
|
||||
console.log(this.lastItem);
|
||||
let min = Math.min(this.lastItem.numDone);
|
||||
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);
|
||||
}
|
||||
|
||||
getImageCycle(Sel){
|
||||
return this.items[Sel];
|
||||
}
|
||||
|
||||
@Watch("selectedImage")
|
||||
reloadMeasuresDelayed = debounce(async (image, points) => {
|
||||
let result = await warmersService.GetMeasurePoints(image);
|
||||
|
||||
+20
-6
@@ -6,10 +6,16 @@
|
||||
<div class="imagecontainer">
|
||||
<img
|
||||
:src="`${serverPath}/${images[parseInt(selectedImage)]}.jpg`"
|
||||
v-if="images.length && images[selectedImage]!='UNDEFINED'"
|
||||
@click="imageclick"
|
||||
v-if="images.length"
|
||||
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>
|
||||
|
||||
<div
|
||||
@@ -29,14 +35,21 @@
|
||||
</div>
|
||||
<div class="image-selector">
|
||||
<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>
|
||||
<img
|
||||
:src="`${serverPath}/${images[parseInt(selectedImage)]}.jpg`"
|
||||
v-if="showPreview"
|
||||
v-if="showPreview && images[selectedImage]!='UNDEFINED'"
|
||||
class="selector"
|
||||
: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
|
||||
v-if="images.length"
|
||||
@@ -50,8 +63,9 @@
|
||||
<div class="selectorarea">
|
||||
<span
|
||||
class="selector"
|
||||
v-if="getImageCycle(selectedImage)"
|
||||
: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>
|
||||
</modal>
|
||||
|
||||
+54
@@ -8,6 +8,8 @@ import { warmersService } from "@/services/warmersService";
|
||||
import { awaiter } from '@/_base';
|
||||
import termoModal from "./thermoProphet-modal.vue";
|
||||
import { ModalHelper } from '@/components/modals';
|
||||
import moment from "moment";
|
||||
import { messageService } from "src/_base";
|
||||
|
||||
@Component({
|
||||
name: "thermocamera", components: {
|
||||
@@ -29,9 +31,15 @@ export default class Thermocamera extends Vue {
|
||||
thermoImageOpacity: number = 0;
|
||||
resistanceMode = 0;
|
||||
|
||||
timeoutLastTakenImage = 0;
|
||||
timeCamDiff = " ";
|
||||
|
||||
TCamData: {
|
||||
imageSize: { x: number, y: number },
|
||||
rangeTemperature: { max: number, min: number },
|
||||
thermoCamConnected: boolean,
|
||||
thermoOptionActive: boolean,
|
||||
lastTakenImage: Date,
|
||||
} = null;
|
||||
|
||||
@Watch("warmers", { deep: true })
|
||||
@@ -53,6 +61,13 @@ export default class Thermocamera extends Vue {
|
||||
async mounted() {
|
||||
this.ChangedTemps();
|
||||
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[] {
|
||||
@@ -75,6 +90,45 @@ export default class Thermocamera extends Vue {
|
||||
// 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 {
|
||||
return (store.state.warmers.tCamStatus.thermoCamOnOff);
|
||||
}
|
||||
|
||||
+4
-3
@@ -111,8 +111,8 @@
|
||||
@methodChanged="m => selectionMethod = m"
|
||||
:recipe="recipe"
|
||||
:resistanceMode="resistanceMode"
|
||||
thermoImage="/thermoprophet/colored/_last.jpg"
|
||||
:thermoImageVisible="thermocameraModeBTN"
|
||||
:thermoImage="thermocameraImageUrl"
|
||||
:thermoImageVisible="true"
|
||||
:thermoImageOpacity="thermoImageOpacity"
|
||||
:isThermoProphet="true"
|
||||
></warmers>
|
||||
@@ -128,8 +128,9 @@
|
||||
<button class="btn btn-info square" @click="openThermoModal()">
|
||||
<img src="/assets/icons/png/ico-bt-selez-image.png" />
|
||||
</button>
|
||||
<span>{{timeCamDiff}}</span>
|
||||
<input
|
||||
:disabled="!thermocameraModeBTN"
|
||||
:disabled="!thermocameraImageOk"
|
||||
type="range"
|
||||
orient="vertical"
|
||||
v-model="thermoImageOpacity"
|
||||
|
||||
-1
@@ -90,7 +90,6 @@ export default class Warmers extends Vue {
|
||||
|
||||
// Ottengo le resistenze per ogni riga
|
||||
resistancesPerRow(row: number) {
|
||||
console.log(row,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){
|
||||
|
||||
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){
|
||||
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_2_chart_setpointx.setpointHMI = diff;
|
||||
this.recipe.vacuum_main_3_chart_setpointx.setpointHMI = 0;
|
||||
}
|
||||
}
|
||||
else{
|
||||
@@ -103,6 +107,7 @@ export default class VuotoPrincipale extends Vue {
|
||||
this.recipe.vacuum_main_3_chart_setpointx.setpointHMI;
|
||||
|
||||
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){
|
||||
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{
|
||||
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 MenuSx from "../../../menu-sx/menu-sx.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({
|
||||
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>
|
||||
<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>
|
||||
</template>
|
||||
<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 {
|
||||
th,
|
||||
td {
|
||||
&.misurazioni-value {
|
||||
width: 322px;
|
||||
max-width: 322px;
|
||||
padding: 0 5px;
|
||||
&.left{
|
||||
text-align: end;
|
||||
}
|
||||
&.misurazioni-recipe {
|
||||
width: 539px;
|
||||
max-width: 539px;
|
||||
&.lastre-date {
|
||||
width: 20%;
|
||||
}
|
||||
&.misurazioni-date {
|
||||
width: 313px;
|
||||
max-width: 313px;
|
||||
&.lastre-recipe {
|
||||
width: 20%;
|
||||
}
|
||||
&.misurazioni-type {
|
||||
width: 187px;
|
||||
max-width: 187px;
|
||||
&.lastre-numpezzo {
|
||||
width: 10%;
|
||||
}
|
||||
&.lastre-type {
|
||||
width: 20%;
|
||||
}
|
||||
&.lastre-value {
|
||||
width: 30%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+25
-75
@@ -1,83 +1,33 @@
|
||||
import { Component, Vue } from "vue-property-decorator";
|
||||
import { Prop } from "vue-property-decorator";
|
||||
import moment from "moment";
|
||||
|
||||
@Component({})
|
||||
export default class LogMisurazioniTable extends Vue {
|
||||
rowData = [];
|
||||
|
||||
@Prop({ default: []})
|
||||
rowData:any;
|
||||
|
||||
mounted() {
|
||||
this.rowData = [
|
||||
{
|
||||
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]"
|
||||
},
|
||||
{
|
||||
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]"
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
convertDate(date) {
|
||||
return moment(date).format('L');
|
||||
}
|
||||
convertDateToTime(date) {
|
||||
return moment(date).format('LTS');
|
||||
}
|
||||
|
||||
convertType(item){
|
||||
if (!item || item == 0)
|
||||
return "ND"
|
||||
else if (item == 1)
|
||||
return "PALLET HEIGHT"
|
||||
else if (item == 2)
|
||||
return "SHEET TICKNESS"
|
||||
else if (item == 2)
|
||||
return "SHEET LENGTH"
|
||||
else
|
||||
return "ND"
|
||||
}
|
||||
}
|
||||
|
||||
+16
-28
@@ -3,40 +3,28 @@
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="misurazioni-date">Date</th>
|
||||
<th class="misurazioni-recipe">Recipe</th>
|
||||
<th class="misurazioni-type">Type</th>
|
||||
<th class="misurazioni-value">Value</th>
|
||||
<th class="lastre-date ">{{'underthehood_label_date' | localize("Date")}}</th>
|
||||
<th class="lastre-recipe">{{'underthehood_label_recipe' | localize("Ricetta")}}</th>
|
||||
<th class="lastre-numpezzo left">{{'underthehood_label_numpiece' | localize("N. Pezzo")}}</th>
|
||||
<th class="lastre-type left">{{'underthehood_label_type' | localize("Type")}}</th>
|
||||
<th class="lastre-value left">{{'underthehood_label_value' | localize("Value")}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="autocolor">
|
||||
<tr v-for="(item, i) of rowData" :key="i" class="tr-inner">
|
||||
<td>
|
||||
<span>
|
||||
{{ item.date }}
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<span>
|
||||
{{ item.recipe }}
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<span>
|
||||
{{ item.type }}
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<span>
|
||||
{{ item.value }}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<template v-for="(item, idx) in rowData">
|
||||
<tr :key="`c-${idx}`">
|
||||
<td>{{convertDate(item.dtEvent)}} - {{convertDateToTime(item.dtEvent)}}</td>
|
||||
<td>{{item.recipeName}}</td>
|
||||
<td class="left">{{item.numDone}}</td>
|
||||
<td class="left">{{convertType(item.typeVal)}}</td>
|
||||
<td class="left">{{item.firstVal | round(1)}} [{{item.secondVal | round(1)}}, {{item.thirdVal | round(1)}}]</td>
|
||||
</tr>
|
||||
</template>
|
||||
</tbody>
|
||||
</table>
|
||||
</table>
|
||||
</div>
|
||||
</template>
|
||||
<style lang="less">
|
||||
@import "log-misurazioni-table.less";
|
||||
</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) {
|
||||
console.log(store.state.warmers.channels.filter(i => i.idChannel == 5)[0]);
|
||||
return store.state.warmers.channels.filter(i => i.idChannel == id)[0];
|
||||
}
|
||||
|
||||
|
||||
@@ -10,11 +10,11 @@
|
||||
@click="go('log-ciclo-automatico')"
|
||||
:class="{white: this.value == 'log-ciclo-automatico'}"
|
||||
>{{'underthehood_label_loga' | localize("Log ciclo automatico")}}</div>
|
||||
<!-- <div
|
||||
<div
|
||||
class="rettangle"
|
||||
@click="go('log-misurazioni')"
|
||||
:class="{white: this.value == 'log-misurazioni'}"
|
||||
>{{'underthehood_label_logm' | localize("Log misurazioni")}}</div>-->
|
||||
>{{'underthehood_label_logm' | localize("Log misurazioni")}}</div>
|
||||
<div
|
||||
class="rettangle"
|
||||
@click="go('assi')"
|
||||
|
||||
@@ -124,8 +124,7 @@ export class Hub {
|
||||
this._hub.client.gaugeData = Hub.gaugeData;
|
||||
this._hub.client.axisInfo = Hub.axisInfoData;
|
||||
this._hub.client.channelsIoVal = Hub.channelsIOUpdate;
|
||||
|
||||
|
||||
this._hub.client.newThermoCamImage = Hub.newThermoCamImage;
|
||||
|
||||
this._hub.client.logout = this.logout;
|
||||
|
||||
@@ -219,6 +218,11 @@ export class Hub {
|
||||
recipeActions.setOverview(store, data);
|
||||
}
|
||||
|
||||
|
||||
public static newThermoCamImage(data) {
|
||||
messageService.publishToChannel("new-thermocam-image", data);
|
||||
}
|
||||
|
||||
public static prodPanelData(data) {
|
||||
prodActions.setProdPanel(store, data);
|
||||
}
|
||||
|
||||
@@ -43,6 +43,17 @@ export class UnderTheHoodService extends baseRestService {
|
||||
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();
|
||||
@@ -71,10 +71,14 @@ export class WarmersService extends baseRestService {
|
||||
let result = await this.Get<{
|
||||
imageSize: { x: number, y: number },
|
||||
rangeTemperature: { max: number, min: number },
|
||||
thermoCamConnected: boolean,
|
||||
thermoOptionActive: boolean,
|
||||
lastTakenImage: Date,
|
||||
}>((await this.BASE_URL()) + "TCamData", true);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
async GetMeasurePoints(setname: string): Promise<any> {
|
||||
return await this.Get<any>((await this.BASE_URL()) + `getMeasurePoints?setName=${setname}`, true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user