diff --git a/Libs/CMS_CORE_Library.dll b/Libs/CMS_CORE_Library.dll index 1905b604..b8b6ce91 100644 Binary files a/Libs/CMS_CORE_Library.dll and b/Libs/CMS_CORE_Library.dll differ diff --git a/Step.Config/ServerConfigController.cs b/Step.Config/ServerConfigController.cs index 84a077fe..3021db0d 100644 --- a/Step.Config/ServerConfigController.cs +++ b/Step.Config/ServerConfigController.cs @@ -170,7 +170,7 @@ namespace Step.Config "Error while reading XML file \"" + actualFileName + "\" \n\n" + e.Message, true ); - } + } } public static bool CheckAreaStatus(string areaName) @@ -179,7 +179,7 @@ namespace Step.Config { case AREAS.PRODUCTION_KEY: return ProductionConfig.Enabled; - + case AREAS.TOOLING_KEY: return ToolingConfig.Enabled; diff --git a/Step.Model/Constants.cs b/Step.Model/Constants.cs index 75691856..1a8abe06 100644 --- a/Step.Model/Constants.cs +++ b/Step.Model/Constants.cs @@ -5,6 +5,7 @@ namespace Step.Model { public static class Constants { + public static bool IS_BETA = true; public static string NOT_FOUND_ALARM_MESSAGE = "Alarm_id_{0} : Message not found"; public static string NOT_CONFIGURATED_ALARM_MESSAGE = "Alarm_id_{0} : Message not configurated"; public static int DATABASE_PROCESS_TIMEOUT = 5; diff --git a/Step.Model/DTOModels/DTOHeadModel.cs b/Step.Model/DTOModels/DTOHeadModel.cs index 6d51ec8e..65141a4f 100644 --- a/Step.Model/DTOModels/DTOHeadModel.cs +++ b/Step.Model/DTOModels/DTOHeadModel.cs @@ -65,6 +65,14 @@ namespace Step.Model.DTOModels // Fanuc-Osai public int FamilyId; public int ShankId; + + public bool Disabled { get; set; } + public bool Broken { get; set; } + public bool Measured { get; set; } + public int ResidualLife { get; set; } + + public int MaxSpeed { get; set; } + public byte MaxLoad { get; set; } } public class DTOSpindleModel : DTOHeadModel diff --git a/Step.NC/NcHandler.cs b/Step.NC/NcHandler.cs index 6faa5536..8c5e153d 100644 --- a/Step.NC/NcHandler.cs +++ b/Step.NC/NcHandler.cs @@ -5,7 +5,7 @@ using CMS_CORE_Library.Models; using CMS_CORE_Library.Osai; using CMS_CORE_Library.Siemens; using Step.Database.Controllers; -using Step.Model.DatabaseModels; +using Step.Model.DatabaseModels; using Step.Model.DTOModels; using Step.Model.DTOModels.AlarmModels; using Step.Model.DTOModels.MaintenanceModels; diff --git a/Step.Utils/supportFunctions.cs b/Step.Utils/supportFunctions.cs index b7a0d700..ac142322 100644 --- a/Step.Utils/supportFunctions.cs +++ b/Step.Utils/supportFunctions.cs @@ -383,16 +383,18 @@ namespace Step.Utils public static string GetSoftwareVersionAndBuildDate() { - Version v = Assembly.GetEntryAssembly()?.GetName().Version; + Version v = Assembly.GetEntryAssembly()?.GetName().Version; if (v != null) { // Get first 2 number of the version - var tmp = v.ToString().Split('.').Take(3).ToArray(); + var version = v.ToString().Split('.').Take(3).ToArray(); + + string betaString = IS_BETA ? " BETA " : " "; // Get Server version - return $"" + - $"{string.Join(".", tmp)} (" + - $"{GetLinkerTime(Assembly.GetEntryAssembly(), null).ToString("d")}" + + return $"{string.Join(".", version)}" + + betaString + + $"({GetLinkerTime(Assembly.GetEntryAssembly(), null).ToString("d")}" + $")"; } diff --git a/Step/Controllers/WebApi/LanguageController.cs b/Step/Controllers/WebApi/LanguageController.cs index 055eb880..7aac1859 100644 --- a/Step/Controllers/WebApi/LanguageController.cs +++ b/Step/Controllers/WebApi/LanguageController.cs @@ -253,7 +253,7 @@ namespace Step.Controllers.WebApi foreach(var label in layer.Labels) { // Find selected language - var translatedValue = label.Label.TextContents.Where(y => y.LangKey == language).FirstOrDefault(); + var translatedValue = label.Label.TextContents?.Where(y => y.LangKey == language).FirstOrDefault(); if (translatedValue != null) translatedNames.Add("scada_label_" + label.Id, translatedValue.TextContent); else diff --git a/Step/Controllers/WebApi/NcToolManagerController.cs b/Step/Controllers/WebApi/NcToolManagerController.cs index 5ec6f7d7..15bd9a86 100644 --- a/Step/Controllers/WebApi/NcToolManagerController.cs +++ b/Step/Controllers/WebApi/NcToolManagerController.cs @@ -163,7 +163,7 @@ namespace Step.Controllers.WebApi public IHttpActionResult PutTool(int toolId, [FromBody][Required]DTONewNcToolWithFamilyModel dtoToolWithFamily) { if (!ModelState.IsValid) - return BadRequest(ModelState); + return BadRequest(ModelState); DbNcToolModel tool = null; using (NcToolManagerController toolsManager = new NcToolManagerController()) diff --git a/Step/Listeners/Database/SignalRDatabaseHandler.cs b/Step/Listeners/Database/SignalRDatabaseHandler.cs index 7d4175cd..9f114d8d 100644 --- a/Step/Listeners/Database/SignalRDatabaseHandler.cs +++ b/Step/Listeners/Database/SignalRDatabaseHandler.cs @@ -72,6 +72,10 @@ namespace Step.Listeners.Database // Update nc data ncHandler.UpdateNcTools(controller); } + + // I need to update tool in spindle data + // Clean the heads cache, so the heads thread will be sent to the next cycle + LastHeadsData = new List(); } } } diff --git a/Step/Listeners/SignalR/SignalRListener.cs b/Step/Listeners/SignalR/SignalRListener.cs index dd3acc1a..15e560fe 100644 --- a/Step/Listeners/SignalR/SignalRListener.cs +++ b/Step/Listeners/SignalR/SignalRListener.cs @@ -174,12 +174,18 @@ namespace Step.Listeners.SignalR // Convert head into child model var spindle = (head as DTOSpindleModel); // Get tool data - var tool = controller.FindTool(spindle.MountedTool); + var tool = controller.FindToolWithDependencies(spindle.MountedTool); if( tool != null) spindle.ToolData = new DTOToolInSpindleModel() { FamilyId = tool.FamilyId, - ShankId = tool.ShankId ?? 0 + ShankId = tool.ShankId ?? 0, + Broken = ((DTONcToolModel)tool).Broken, + Disabled = ((DTONcToolModel)tool).Disabled, + Measured = ((DTONcToolModel)tool).Measured, + MaxLoad = tool.Family.MaxLoad, + MaxSpeed = tool.Family.MaxSpeed, + ResidualLife = tool.ResidualLife }; } } diff --git a/Step/Properties/AssemblyInfo.cs b/Step/Properties/AssemblyInfo.cs index f1edfae4..450f2ca5 100644 --- a/Step/Properties/AssemblyInfo.cs +++ b/Step/Properties/AssemblyInfo.cs @@ -31,4 +31,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.2.2")] +[assembly: AssemblyVersion("1.3")] diff --git a/Step/wwwroot/assets/icons/Tools/Psd/Tool_Broken.psd b/Step/wwwroot/assets/icons/Tools/Psd/Tool_Broken.psd new file mode 100644 index 00000000..f58768ee Binary files /dev/null and b/Step/wwwroot/assets/icons/Tools/Psd/Tool_Broken.psd differ diff --git a/Step/wwwroot/assets/icons/Tools/Psd/Tool_Disabled.psd b/Step/wwwroot/assets/icons/Tools/Psd/Tool_Disabled.psd new file mode 100644 index 00000000..e6137391 Binary files /dev/null and b/Step/wwwroot/assets/icons/Tools/Psd/Tool_Disabled.psd differ diff --git a/Step/wwwroot/assets/icons/Tools/Psd/Tool_Measured.psd b/Step/wwwroot/assets/icons/Tools/Psd/Tool_Measured.psd new file mode 100644 index 00000000..1b516a94 Binary files /dev/null and b/Step/wwwroot/assets/icons/Tools/Psd/Tool_Measured.psd differ diff --git a/Step/wwwroot/assets/icons/Tools/ToolBroken.png b/Step/wwwroot/assets/icons/Tools/ToolBroken.png new file mode 100644 index 00000000..89558223 Binary files /dev/null and b/Step/wwwroot/assets/icons/Tools/ToolBroken.png differ diff --git a/Step/wwwroot/assets/icons/Tools/ToolDisabled.png b/Step/wwwroot/assets/icons/Tools/ToolDisabled.png new file mode 100644 index 00000000..3a02f0ea Binary files /dev/null and b/Step/wwwroot/assets/icons/Tools/ToolDisabled.png differ diff --git a/Step/wwwroot/assets/icons/Tools/ToolMeasured.png b/Step/wwwroot/assets/icons/Tools/ToolMeasured.png new file mode 100644 index 00000000..e8a0a9a9 Binary files /dev/null and b/Step/wwwroot/assets/icons/Tools/ToolMeasured.png differ diff --git a/Step/wwwroot/assets/styles/base/head.css b/Step/wwwroot/assets/styles/base/head.css new file mode 100644 index 00000000..e97ffb15 --- /dev/null +++ b/Step/wwwroot/assets/styles/base/head.css @@ -0,0 +1,723 @@ +.text-success { + color: #002680; +} +.head-spindle, +.head-production, +.head-awj { + border-top: 0; + border-bottom: 0; + width: 512px; + min-height: 96px; + margin: 4px; + background-color: white; + border-radius: 2px; + box-shadow: 0px 1px 2px 0 rgba(0, 0, 0, 0.4); + display: flex; + flex-wrap: wrap; +} +.head-spindle > *, +.head-production > *, +.head-awj > *, +.head-spindle, +.head-production, +.head-awj { + box-sizing: border-box; +} +.head-spindle label, +.head-production label, +.head-awj label { + color: #4b4b4b; + font-size: 18px; + line-height: 20px; + font-weight: 600; + margin: 8px 0; + text-align: center; +} +.head-spindle header, +.head-production header, +.head-awj header { + width: 94px; + flex-shrink: 0; + height: 100%; + border-right: 2px solid #979797; + display: flex; + flex-flow: column; + justify-content: center; + align-items: center; + font-size: 20px; + font-weight: 600; + color: #002680; +} +.head-spindle header span.process, +.head-production header span.process, +.head-awj header span.process { + color: #002680; + width: 64px; + font-size: 14px; + height: 21px; + line-height: 21px; + flex-grow: 0; + text-transform: uppercase; + text-align: center; + border: 1px solid #002680; + margin: 8px; +} +.head-spindle section, +.head-production section, +.head-awj section { + width: 218px; + flex-shrink: 0; + display: flex; + flex-flow: column; + justify-content: space-between; +} +.head-spindle section div, +.head-production section div, +.head-awj section div { + padding: 10px 8px; + padding-top: 0; + display: flex; + flex-flow: row nowrap; + justify-content: space-between; +} +.head-spindle section div button, +.head-production section div button, +.head-awj section div button { + width: 48px; + height: 48px; + border: none; + background-image: linear-gradient(to bottom, #f1f1f1, #bbbcbc); + box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.5); + border-radius: 2px; +} +.head-spindle section div button i, +.head-production section div button i, +.head-awj section div button i { + color: #002680; + font-size: 22px; +} +.head-spindle section div button:active, +.head-production section div button:active, +.head-awj section div button:active { + background-image: linear-gradient(to bottom, #404040, #657178); + color: white; + box-shadow: inset 0px 0px 3px 0px rgba(0, 0, 0, 0.5); +} +.head-spindle section div button:disabled, +.head-production section div button:disabled, +.head-awj section div button:disabled { + background-color: #dddddd !important; + background-image: none !important; + box-shadow: none !important; +} +.head-spindle section div button:disabled i, +.head-production section div button:disabled i, +.head-awj section div button:disabled i { + color: #878787; +} +.head-spindle section div span, +.head-production section div span, +.head-awj section div span { + text-align: center; + color: #4b4b4b; + font-size: 14px; + display: flex; + flex-flow: column; + justify-content: center; +} +.head-spindle section div span h5, +.head-production section div span h5, +.head-awj section div span h5 { + margin: 0; + font-size: 18px; + font-weight: 600; +} +.head-spindle .tool-box, +.head-production .tool-box, +.head-awj .tool-box { + overflow: hidden; + width: 102px; +} +.head-spindle .tool-box .tool-name, +.head-production .tool-box .tool-name, +.head-awj .tool-box .tool-name { + white-space: pre; + line-height: 41px; +} +.head-spindle .tool-box .tool-duplo, +.head-production .tool-box .tool-duplo, +.head-awj .tool-box .tool-duplo { + font-size: 14px; + line-height: 18px; +} +.head-spindle .detailBoxOpened, +.head-production .detailBoxOpened, +.head-awj .detailBoxOpened { + background-color: rgba(23, 145, 255, 0.3); +} +.head-spindle .tool-box, +.head-production .tool-box, +.head-awj .tool-box, +.head-spindle .load-box, +.head-production .load-box, +.head-awj .load-box, +.head-spindle .abrasive, +.head-production .abrasive, +.head-awj .abrasive, +.head-spindle .vacuum, +.head-production .vacuum, +.head-awj .vacuum { + display: flex; + flex-flow: column; + align-items: center; + border-left: 2px solid #979797; + color: #4b4b4b; + position: relative; +} +.head-spindle .tool-box span, +.head-production .tool-box span, +.head-awj .tool-box span, +.head-spindle .load-box span, +.head-production .load-box span, +.head-awj .load-box span, +.head-spindle .abrasive span, +.head-production .abrasive span, +.head-awj .abrasive span, +.head-spindle .vacuum span, +.head-production .vacuum span, +.head-awj .vacuum span { + font-weight: 600; + font-size: 30px; + line-height: 30px; +} +.head-spindle .tool-box.disabled > label, +.head-production .tool-box.disabled > label, +.head-awj .tool-box.disabled > label, +.head-spindle .load-box.disabled > label, +.head-production .load-box.disabled > label, +.head-awj .load-box.disabled > label, +.head-spindle .abrasive.disabled > label, +.head-production .abrasive.disabled > label, +.head-awj .abrasive.disabled > label, +.head-spindle .vacuum.disabled > label, +.head-production .vacuum.disabled > label, +.head-awj .vacuum.disabled > label, +.head-spindle .tool-box.disabled > span, +.head-production .tool-box.disabled > span, +.head-awj .tool-box.disabled > span, +.head-spindle .load-box.disabled > span, +.head-production .load-box.disabled > span, +.head-awj .load-box.disabled > span, +.head-spindle .abrasive.disabled > span, +.head-production .abrasive.disabled > span, +.head-awj .abrasive.disabled > span, +.head-spindle .vacuum.disabled > span, +.head-production .vacuum.disabled > span, +.head-awj .vacuum.disabled > span, +.head-spindle .tool-box.disabled > small, +.head-production .tool-box.disabled > small, +.head-awj .tool-box.disabled > small, +.head-spindle .load-box.disabled > small, +.head-production .load-box.disabled > small, +.head-awj .load-box.disabled > small, +.head-spindle .abrasive.disabled > small, +.head-production .abrasive.disabled > small, +.head-awj .abrasive.disabled > small, +.head-spindle .vacuum.disabled > small, +.head-production .vacuum.disabled > small, +.head-awj .vacuum.disabled > small { + color: #4b4b4b !important; +} +.head-spindle .tool-box.disabled::after, +.head-production .tool-box.disabled::after, +.head-awj .tool-box.disabled::after, +.head-spindle .load-box.disabled::after, +.head-production .load-box.disabled::after, +.head-awj .load-box.disabled::after, +.head-spindle .abrasive.disabled::after, +.head-production .abrasive.disabled::after, +.head-awj .abrasive.disabled::after, +.head-spindle .vacuum.disabled::after, +.head-production .vacuum.disabled::after, +.head-awj .vacuum.disabled::after { + content: " "; + position: absolute; + display: block; + top: 0; + bottom: 0; + left: 0; + right: 0; + background-color: rgba(216, 216, 216, 0.5); +} +.head-spindle .load-box span, +.head-production .load-box span, +.head-awj .load-box span { + color: #1791ff; +} +.head-spindle .load-box.danger span, +.head-production .load-box.danger span, +.head-awj .load-box.danger span { + color: #d0021b !important; +} +.head-spindle .load-box.warning span, +.head-production .load-box.warning span, +.head-awj .load-box.warning span { + color: #f5a623 !important; +} +.head-spindle .vacuum, +.head-production .vacuum, +.head-awj .vacuum { + width: 88px; + flex-shrink: 0; +} +.head-spindle .abrasive, +.head-production .abrasive, +.head-awj .abrasive { + width: 100%; +} +.head-spindle .load-box, +.head-production .load-box, +.head-awj .load-box { + width: 102px; +} +.head-spindle .tool-box, +.head-production .tool-box, +.head-awj .tool-box { + width: 116px; +} +.head-spindle.selected, +.head-production.selected, +.head-awj.selected { + box-shadow: inset 0px 0px 0px 2px #51adff; +} +.head-spindle.selected *, +.head-production.selected *, +.head-awj.selected * { + border-color: #51adff !important; +} +.head-spindle.selected header, +.head-production.selected header, +.head-awj.selected header { + background-color: #51adff; + color: #fff; +} +.head-spindle.selected header span.process, +.head-production.selected header span.process, +.head-awj.selected header span.process { + border-color: #fff !important; + color: #fff; +} +.head-spindle .detail-box, +.head-production .detail-box, +.head-awj .detail-box { + background-color: white; + height: 104px; + width: 416px; + display: flex; + position: absolute; + right: 154px; +} +.head-spindle .detail-box span, +.head-production .detail-box span, +.head-awj .detail-box span { + width: 156px; + font-size: 18px; + line-height: 20px; + font-weight: 600; +} +.head-spindle .detailBoxTransition-enter-active, +.head-production .detailBoxTransition-enter-active, +.head-awj .detailBoxTransition-enter-active, +.head-spindle .detailBoxTransition-leave-active, +.head-production .detailBoxTransition-leave-active, +.head-awj .detailBoxTransition-leave-active { + width: 416px; + transition: width .5s; + overflow: hidden; +} +.head-spindle .detailBoxTransition-enter-active .column-right, +.head-production .detailBoxTransition-enter-active .column-right, +.head-awj .detailBoxTransition-enter-active .column-right, +.head-spindle .detailBoxTransition-leave-active .column-right, +.head-production .detailBoxTransition-leave-active .column-right, +.head-awj .detailBoxTransition-leave-active .column-right { + box-shadow: inset -7px 0 9px -7px rgba(0, 0, 0, 0.5); +} +.head-spindle .detailBoxTransition-enter-active-to, +.head-production .detailBoxTransition-enter-active-to, +.head-awj .detailBoxTransition-enter-active-to { + width: 416px; +} +.head-spindle .detailBoxTransition-enter, +.head-production .detailBoxTransition-enter, +.head-awj .detailBoxTransition-enter, +.head-spindle .detailBoxTransition-leave-to, +.head-production .detailBoxTransition-leave-to, +.head-awj .detailBoxTransition-leave-to { + width: 0; + transition: width .5s; +} +.head-spindle .column-left, +.head-production .column-left, +.head-awj .column-left { + display: flex; + flex-direction: column; + width: 247px; + border-right: 2px solid #979797; +} +.head-spindle .column-left .row, +.head-production .column-left .row, +.head-awj .column-left .row { + display: flex; + flex-direction: row; + flex-wrap: wrap; + width: 247px; + justify-content: space-between; + align-items: center; + flex: 1; +} +.head-spindle .column-left .row span, +.head-production .column-left .row span, +.head-awj .column-left .row span { + margin-left: 5px; +} +.head-spindle .column-left .row .number, +.head-production .column-left .row .number, +.head-awj .column-left .row .number { + width: 70px; + height: 25px; + border-radius: 2px; + display: flex; + justify-content: flex-end; + align-items: center; + margin-right: 8px; + color: #4b4b4b; + padding-right: 8px; + font-size: 20px; +} +.head-spindle .column-left .row:nth-child(odd) .number, +.head-production .column-left .row:nth-child(odd) .number, +.head-awj .column-left .row:nth-child(odd) .number { + background-color: #f3f3f3; +} +.head-spindle .column-left .row:nth-child(even) .number, +.head-production .column-left .row:nth-child(even) .number, +.head-awj .column-left .row:nth-child(even) .number { + background-color: rgba(23, 145, 255, 0.3); +} +.head-spindle .column-right, +.head-production .column-right, +.head-awj .column-right { + display: flex; + flex-direction: row; + width: 167px; + justify-content: center; + align-items: center; +} +.head-spindle .column-right .column, +.head-production .column-right .column, +.head-awj .column-right .column { + width: 56px; + flex: 1; + text-align: center; + flex-direction: column; +} +.head-spindle .column-right .column img, +.head-production .column-right .column img, +.head-awj .column-right .column img { + opacity: 0.2; + width: 45px; + padding: 5px; + height: auto; +} +.head-spindle .column-right .column .iconActive, +.head-production .column-right .column .iconActive, +.head-awj .column-right .column .iconActive { + opacity: 1; + color: #f1f1f1; +} +.head-place-holder { + width: 240px; + height: 102px; + margin: 4px; + margin-bottom: 6px; + margin-top: 6px; + background-color: #4e585e; + border-radius: 2px; +} +.head-std { + width: 240px; + height: 102px; + margin: 4px; + margin-bottom: 6px; + margin-top: 6px; + background-color: white; + border-radius: 2px; + box-sizing: border-box; + box-shadow: 0px 1px 2px 0 rgba(0, 0, 0, 0.4); + display: flex; +} +.head-std > * { + box-sizing: border-box; +} +.head-std header { + display: flex; + font-size: 18px; + color: #002680; + padding: 0 4px; + height: 24px; + line-height: 24px; + flex-shrink: 0; + border-bottom: 1px solid #dfdfdf; + justify-content: space-between; + font-weight: 600; +} +.head-std header span.title { + font-size: 16px; + flex-grow: 1; + width: 100%; + overflow: hidden; + margin-right: 4px; + white-space: nowrap; +} +.head-std header span.process, +.head-std header span.isRunning { + color: #002680; + width: 32px; + font-size: 14px; + height: 20px; + flex-grow: 0; + line-height: 20px; + margin-top: 1px; + text-transform: uppercase; + text-align: center; + border: 1px solid #002680; +} +.head-std header span.process i, +.head-std header span.isRunning i { + line-height: 20px; +} +.head-std header span.isRunning { + margin-right: 4px; +} +.head-std section { + width: calc(100% - 56px); + display: flex; + flex-flow: column; + justify-content: space-between; + position: relative; +} +.head-std section div { + padding: 7px 8px; + display: flex; + flex-flow: row nowrap; + justify-content: space-between; +} +.head-std section div button { + width: 48px; + min-width: 48px; + height: 48px; + border: none; + background-image: linear-gradient(to bottom, #f1f1f1, #bbbcbc); + box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.5); + border-radius: 2px; +} +.head-std section div button i { + color: #002680; + font-size: 22px; +} +.head-std section div button:active { + background-image: linear-gradient(to bottom, #bbbcbc, #f1f1f1); + box-shadow: inset 0px 0px 3px 0px rgba(0, 0, 0, 0.5); +} +.head-std section div button:disabled { + background-color: #dddddd !important; + background-image: none !important; + box-shadow: none !important; +} +.head-std section div button:disabled i { + color: #878787; +} +.head-std section div span { + text-align: center; + color: #4b4b4b; + font-size: 14px; + display: flex; + flex-flow: column; + justify-content: center; + width: 70px; + overflow: hidden; +} +.head-std section div span h5 { + margin: 0; + font-size: 18px; + font-weight: 600; +} +.head-std section span.progress { + position: absolute; + font-size: 12px; + color: #1791ff; + bottom: 6px; + width: 100%; + text-align: center; + font-weight: 600; +} +.head-std section progress { + width: 100%; + height: 6px; + background-color: #fff; +} +.head-std section progress::-moz-progress-bar { + background-color: #fff; +} +.head-std section progress::-webkit-progress-value { + background-image: linear-gradient(to right, #1791ff, #33c4ff); + transition: width 0.3s; +} +.head-std aside { + width: 56px; + height: 100%; + display: flex; + flex-flow: column; +} +.head-std aside .tool-box { + overflow: hidden; +} +.head-std aside .tool-box .tool-name { + white-space: pre; + line-height: 20px; +} +.head-std aside .tool-box .tool-duplo { + font-size: 11px; + font-weight: normal; +} +.head-std aside .tool-box, +.head-std aside .load-box { + height: 50%; + display: flex; + flex-flow: column; + align-items: center; + justify-content: center; + border-left: 1px solid #dfdfdf; + overflow: hidden; + position: relative; +} +.head-std aside .tool-box label, +.head-std aside .load-box label { + color: #4b4b4b; + font-size: 14px; + line-height: 20px; + font-weight: normal; +} +.head-std aside .tool-box span, +.head-std aside .load-box span { + font-weight: 600; + font-size: 18px; + line-height: 14px; +} +.head-std aside .tool-box small, +.head-std aside .load-box small { + color: #4b4b4b; + font-size: 10px; +} +.head-std aside .tool-box.disabled > label, +.head-std aside .load-box.disabled > label, +.head-std aside .tool-box.disabled > span, +.head-std aside .load-box.disabled > span, +.head-std aside .tool-box.disabled > small, +.head-std aside .load-box.disabled > small { + color: #4b4b4b !important; +} +.head-std aside .tool-box.disabled::after, +.head-std aside .load-box.disabled::after { + content: " "; + position: absolute; + display: block; + top: 0; + bottom: 0; + left: 0; + right: 0; + background-color: rgba(216, 216, 216, 0.5); +} +.head-std aside .load-box { + border-top: 1px solid #dfdfdf; +} +.head-std aside .load-box label, +.head-std aside .load-box span { + color: #1791ff; +} +.head-std aside .load-box.danger label, +.head-std aside .load-box.danger span { + color: #d0021b !important; +} +.head-std aside .load-box.warning label, +.head-std aside .load-box.warning span { + color: #f5a623 !important; +} +.head-std.selected header { + background-image: linear-gradient(to right, #1791ff, #33c4ff); + color: #fff; + border-right: none; +} +.head-std.selected header span.process { + border-color: #fff !important; + color: #fff; +} +.head-std.selected header span.isRunning { + border-color: #fff !important; + color: #fff; +} +.heads-container { + position: absolute; + top: -6px; + right: 4px; + display: flex; + flex-flow: row wrap; + width: 512px; + height: 230px; + overflow-x: hidden; +} +.mini { + width: 262px; +} +.heads-container-lt4 { + right: -12px; +} +.head-production { + max-width: 530px; + width: 530px; + min-height: 96px; +} +.width-small { + width: 512px; +} +.head-production header { + min-height: 96px; + justify-content: start; +} +.head-production header .title { + display: flex; + flex-flow: row; + font-size: 18px; + line-height: 20px; + font-weight: 600; + margin: 8px 0; + width: 100%; + text-align: center; +} +.head-production header > div { + display: flex; + flex-flow: row; + align-items: center; + justify-content: center; + margin-top: 3px; +} +.head-production header > div span.process { + width: 27px; + font-size: 16px; + height: 27px; + line-height: 27px; +} +.head-production.selected header { + min-height: 94px; +} diff --git a/Step/wwwroot/assets/styles/base/head.less b/Step/wwwroot/assets/styles/base/head.less index db6f529e..8437b557 100644 --- a/Step/wwwroot/assets/styles/base/head.less +++ b/Step/wwwroot/assets/styles/base/head.less @@ -1,4 +1,5 @@ // out: false, sourceMap: false, main: ../style.less +@import "colors.less"; .head-spindle, .head-production, @@ -104,20 +105,46 @@ } } } + .tool-box{ - overflow: hidden; - width: 102px; - .tool-name { - white-space: pre; - line-height: 41px; + display: flex; + width: 116px; + height: 104px; + border-left: 2px solid #979797; + + .tool-box-data{ + border: none; + overflow: hidden; + height: 104px; + width: 114px; + .tool-name { + white-space: pre; + line-height: 41px; + } + .tool-duplo{ + font-size: 14px; + line-height: 18px; + } } - .tool-duplo{ - font-size: 14px; - line-height: 18px; + + .arrow-box { + display: flex; + align-items: center; + width: 0px; + height: 114px; + font-size: 23px; + + i { + padding-left: 5px; + } } } - .tool-box, + .detailBoxOpened { + background-color: @color-clear-blue-30; + } + + .tool-box-data, .load-box, .abrasive, .vacuum { @@ -171,9 +198,6 @@ .load-box { width: 102px; } - .tool-box{ - width: 116px; - } &.selected { box-shadow: inset 0px 0px 0px 2px #51adff; @@ -189,23 +213,107 @@ } } } + + .detail-box { + background-color: white; + height: 104px; + width: 416px; + display: flex; + position: absolute; + right: 154px; + span { + width: 156px; + font-size: 18px; + line-height: 20px; + font-weight: 600; + } + } - .smooth-enter-active, .smooth-leave-active { - height:94px; - transition: height .5s; + .detailBoxTransition-enter-active, .detailBoxTransition-leave-active { + width: 416px; + transition: width .5s; overflow: hidden; } - .smooth-enter-active-to { - height:94px; + + .detailBoxTransition-enter, .detailBoxTransition-leave-to { + width: 0; + transition: width .5s; + + .column-right{ + box-shadow: none; + } } - .detail-box { - height:94px; + .column-left { + display: flex; + flex-direction: column; + width: 247px; + border-right: 2px solid #979797; + + .row { + display: flex; + flex-direction: row; + flex-wrap: wrap; + width: 247px; + justify-content: space-between; + align-items: center; + flex:1; + + span{ + margin-left: 5px; + } + + .number { + color: #4b4b4b; + width: 70px; + height: 25px; + border-radius: 2px; + display: flex; + justify-content: flex-end; + align-items: center; + margin-right: 8px; + color: #4b4b4b; + padding-right: 8px; + font-size: 20px; + } + } + + .row:nth-child(odd) .number { + background-color: @color-white4; + } + + .row:nth-child(even) .number { + background-color: @color-clear-blue-30; + } } - .smooth-enter, .smooth-leave-to { - height: 0; - transition: height .5s; + + .column-right { + display: flex; + flex-direction: row; + width: 167px; + justify-content: center; + align-items: center; + box-shadow: inset -7px 0 9px -7px rgba(0,0,0,0.5); + + .column { + width: 56px; + flex:1; + text-align: center; + flex-direction: column; + img { + opacity: 0.2; + width: 45px; + padding: 5px; + height: auto; + } + + .iconActive { + opacity: 1; + color: #f1f1f1; + } + } } + } .head-place-holder{ diff --git a/Step/wwwroot/assets/styles/base/scada.less b/Step/wwwroot/assets/styles/base/scada.less index e32c9487..051c20fa 100644 --- a/Step/wwwroot/assets/styles/base/scada.less +++ b/Step/wwwroot/assets/styles/base/scada.less @@ -103,6 +103,17 @@ display: flex; flex-direction: row; border: none !important; + overflow-x: auto; + overflow-y: hidden; + &::-webkit-scrollbar { + width: 5px; + height: 10px; + } + &::-webkit-scrollbar-thumb { + border-radius: 5px; + height: 1px; + background-color: rgba(0, 0, 0, 0.3); + } .tab { flex-grow: 0; flex-shrink: 0; diff --git a/Step/wwwroot/assets/styles/style.css b/Step/wwwroot/assets/styles/style.css index 9c8bedf8..29a98a89 100644 --- a/Step/wwwroot/assets/styles/style.css +++ b/Step/wwwroot/assets/styles/style.css @@ -6436,24 +6436,53 @@ footer .container button.big:before { .head-spindle .tool-box, .head-production .tool-box, .head-awj .tool-box { - overflow: hidden; - width: 102px; + display: flex; + width: 116px; + height: 104px; + border-left: 2px solid #979797; } -.head-spindle .tool-box .tool-name, -.head-production .tool-box .tool-name, -.head-awj .tool-box .tool-name { +.head-spindle .tool-box .tool-box-data, +.head-production .tool-box .tool-box-data, +.head-awj .tool-box .tool-box-data { + border: none; + overflow: hidden; + height: 104px; + width: 114px; +} +.head-spindle .tool-box .tool-box-data .tool-name, +.head-production .tool-box .tool-box-data .tool-name, +.head-awj .tool-box .tool-box-data .tool-name { white-space: pre; line-height: 41px; } -.head-spindle .tool-box .tool-duplo, -.head-production .tool-box .tool-duplo, -.head-awj .tool-box .tool-duplo { +.head-spindle .tool-box .tool-box-data .tool-duplo, +.head-production .tool-box .tool-box-data .tool-duplo, +.head-awj .tool-box .tool-box-data .tool-duplo { font-size: 14px; line-height: 18px; } -.head-spindle .tool-box, -.head-production .tool-box, -.head-awj .tool-box, +.head-spindle .tool-box .arrow-box, +.head-production .tool-box .arrow-box, +.head-awj .tool-box .arrow-box { + display: flex; + align-items: center; + width: 0px; + height: 114px; + font-size: 23px; +} +.head-spindle .tool-box .arrow-box i, +.head-production .tool-box .arrow-box i, +.head-awj .tool-box .arrow-box i { + padding-left: 5px; +} +.head-spindle .detailBoxOpened, +.head-production .detailBoxOpened, +.head-awj .detailBoxOpened { + background-color: rgba(23, 145, 255, 0.3); +} +.head-spindle .tool-box-data, +.head-production .tool-box-data, +.head-awj .tool-box-data, .head-spindle .load-box, .head-production .load-box, .head-awj .load-box, @@ -6470,9 +6499,9 @@ footer .container button.big:before { color: #4b4b4b; position: relative; } -.head-spindle .tool-box span, -.head-production .tool-box span, -.head-awj .tool-box span, +.head-spindle .tool-box-data span, +.head-production .tool-box-data span, +.head-awj .tool-box-data span, .head-spindle .load-box span, .head-production .load-box span, .head-awj .load-box span, @@ -6486,9 +6515,9 @@ footer .container button.big:before { font-size: 30px; line-height: 30px; } -.head-spindle .tool-box.disabled > label, -.head-production .tool-box.disabled > label, -.head-awj .tool-box.disabled > label, +.head-spindle .tool-box-data.disabled > label, +.head-production .tool-box-data.disabled > label, +.head-awj .tool-box-data.disabled > label, .head-spindle .load-box.disabled > label, .head-production .load-box.disabled > label, .head-awj .load-box.disabled > label, @@ -6498,9 +6527,9 @@ footer .container button.big:before { .head-spindle .vacuum.disabled > label, .head-production .vacuum.disabled > label, .head-awj .vacuum.disabled > label, -.head-spindle .tool-box.disabled > span, -.head-production .tool-box.disabled > span, -.head-awj .tool-box.disabled > span, +.head-spindle .tool-box-data.disabled > span, +.head-production .tool-box-data.disabled > span, +.head-awj .tool-box-data.disabled > span, .head-spindle .load-box.disabled > span, .head-production .load-box.disabled > span, .head-awj .load-box.disabled > span, @@ -6510,9 +6539,9 @@ footer .container button.big:before { .head-spindle .vacuum.disabled > span, .head-production .vacuum.disabled > span, .head-awj .vacuum.disabled > span, -.head-spindle .tool-box.disabled > small, -.head-production .tool-box.disabled > small, -.head-awj .tool-box.disabled > small, +.head-spindle .tool-box-data.disabled > small, +.head-production .tool-box-data.disabled > small, +.head-awj .tool-box-data.disabled > small, .head-spindle .load-box.disabled > small, .head-production .load-box.disabled > small, .head-awj .load-box.disabled > small, @@ -6524,9 +6553,9 @@ footer .container button.big:before { .head-awj .vacuum.disabled > small { color: #4b4b4b !important; } -.head-spindle .tool-box.disabled::after, -.head-production .tool-box.disabled::after, -.head-awj .tool-box.disabled::after, +.head-spindle .tool-box-data.disabled::after, +.head-production .tool-box-data.disabled::after, +.head-awj .tool-box-data.disabled::after, .head-spindle .load-box.disabled::after, .head-production .load-box.disabled::after, .head-awj .load-box.disabled::after, @@ -6576,11 +6605,6 @@ footer .container button.big:before { .head-awj .load-box { width: 102px; } -.head-spindle .tool-box, -.head-production .tool-box, -.head-awj .tool-box { - width: 116px; -} .head-spindle.selected, .head-production.selected, .head-awj.selected { @@ -6603,34 +6627,130 @@ footer .container button.big:before { border-color: #fff !important; color: #fff; } -.head-spindle .smooth-enter-active, -.head-production .smooth-enter-active, -.head-awj .smooth-enter-active, -.head-spindle .smooth-leave-active, -.head-production .smooth-leave-active, -.head-awj .smooth-leave-active { - height: 94px; - transition: height .5s; - overflow: hidden; -} -.head-spindle .smooth-enter-active-to, -.head-production .smooth-enter-active-to, -.head-awj .smooth-enter-active-to { - height: 94px; -} .head-spindle .detail-box, .head-production .detail-box, .head-awj .detail-box { - height: 94px; + background-color: white; + height: 104px; + width: 416px; + display: flex; + position: absolute; + right: 154px; } -.head-spindle .smooth-enter, -.head-production .smooth-enter, -.head-awj .smooth-enter, -.head-spindle .smooth-leave-to, -.head-production .smooth-leave-to, -.head-awj .smooth-leave-to { - height: 0; - transition: height .5s; +.head-spindle .detail-box span, +.head-production .detail-box span, +.head-awj .detail-box span { + width: 156px; + font-size: 18px; + line-height: 20px; + font-weight: 600; +} +.head-spindle .detailBoxTransition-enter-active, +.head-production .detailBoxTransition-enter-active, +.head-awj .detailBoxTransition-enter-active, +.head-spindle .detailBoxTransition-leave-active, +.head-production .detailBoxTransition-leave-active, +.head-awj .detailBoxTransition-leave-active { + width: 416px; + transition: width .5s; + overflow: hidden; +} +.head-spindle .detailBoxTransition-enter, +.head-production .detailBoxTransition-enter, +.head-awj .detailBoxTransition-enter, +.head-spindle .detailBoxTransition-leave-to, +.head-production .detailBoxTransition-leave-to, +.head-awj .detailBoxTransition-leave-to { + width: 0; + transition: width .5s; +} +.head-spindle .detailBoxTransition-enter .column-right, +.head-production .detailBoxTransition-enter .column-right, +.head-awj .detailBoxTransition-enter .column-right, +.head-spindle .detailBoxTransition-leave-to .column-right, +.head-production .detailBoxTransition-leave-to .column-right, +.head-awj .detailBoxTransition-leave-to .column-right { + box-shadow: none; +} +.head-spindle .column-left, +.head-production .column-left, +.head-awj .column-left { + display: flex; + flex-direction: column; + width: 247px; + border-right: 2px solid #979797; +} +.head-spindle .column-left .row, +.head-production .column-left .row, +.head-awj .column-left .row { + display: flex; + flex-direction: row; + flex-wrap: wrap; + width: 247px; + justify-content: space-between; + align-items: center; + flex: 1; +} +.head-spindle .column-left .row span, +.head-production .column-left .row span, +.head-awj .column-left .row span { + margin-left: 5px; +} +.head-spindle .column-left .row .number, +.head-production .column-left .row .number, +.head-awj .column-left .row .number { + width: 70px; + height: 25px; + border-radius: 2px; + display: flex; + justify-content: flex-end; + align-items: center; + margin-right: 8px; + color: #4b4b4b; + padding-right: 8px; + font-size: 20px; +} +.head-spindle .column-left .row:nth-child(odd) .number, +.head-production .column-left .row:nth-child(odd) .number, +.head-awj .column-left .row:nth-child(odd) .number { + background-color: #f3f3f3; +} +.head-spindle .column-left .row:nth-child(even) .number, +.head-production .column-left .row:nth-child(even) .number, +.head-awj .column-left .row:nth-child(even) .number { + background-color: rgba(23, 145, 255, 0.3); +} +.head-spindle .column-right, +.head-production .column-right, +.head-awj .column-right { + display: flex; + flex-direction: row; + width: 167px; + justify-content: center; + align-items: center; + box-shadow: inset -7px 0 9px -7px rgba(0, 0, 0, 0.5); +} +.head-spindle .column-right .column, +.head-production .column-right .column, +.head-awj .column-right .column { + width: 56px; + flex: 1; + text-align: center; + flex-direction: column; +} +.head-spindle .column-right .column img, +.head-production .column-right .column img, +.head-awj .column-right .column img { + opacity: 0.2; + width: 45px; + padding: 5px; + height: auto; +} +.head-spindle .column-right .column .iconActive, +.head-production .column-right .column .iconActive, +.head-awj .column-right .column .iconActive { + opacity: 1; + color: #f1f1f1; } .head-place-holder { width: 240px; @@ -19742,6 +19862,17 @@ footer .container button.big:before { display: flex; flex-direction: row; border: none !important; + overflow-x: auto; + overflow-y: hidden; +} +.scada-container .scada-box .scada-tab-box::-webkit-scrollbar { + width: 5px; + height: 10px; +} +.scada-container .scada-box .scada-tab-box::-webkit-scrollbar-thumb { + border-radius: 5px; + height: 1px; + background-color: rgba(0, 0, 0, 0.3); } .scada-container .scada-box .scada-tab-box .tab { flex-grow: 0; diff --git a/Step/wwwroot/src/app_modules/production/components/head-production.vue b/Step/wwwroot/src/app_modules/production/components/head-production.vue index e32eb108..7ce25df8 100644 --- a/Step/wwwroot/src/app_modules/production/components/head-production.vue +++ b/Step/wwwroot/src/app_modules/production/components/head-production.vue @@ -45,24 +45,55 @@ {{vacuum.toFixed(2)}} {{'head_label_bar' | localize("bar")}} -
- - {{tool}} - - {{'tooling_family_abbreviation' | localize('DP%d', familyId)}} - - {{'tooling_shank_abbreviation' | localize('DP%d', shankId)}} - - {{toolName}} - {{'tooling_tool_abbreviation' | localize('DP%d',toolDuplo)}} + +
+
+ + +
+
+ + {{tool}} + + {{'tooling_family_abbreviation' | localize('DP%d', toolData.familyId)}} + - {{'tooling_shank_abbreviation' | localize('DP%d', toolData.shankId)}} + + {{toolName}} + {{'tooling_tool_abbreviation' | localize('DP%d', toolDuplo)}} +
+
-
{{abrasive}} {{'head_label_gmin' | localize("g/min")}}
+ + +
+
+
+ {{'tooling_equipment_param_residualLife' | localize("Residual Life")}}: +
{{toolData.residualLife}}
+
+
+ {{'tooling_family_param_maxLoad' | localize("Max load")}}: +
{{toolData.maxLoad}}
+
+
+ {{'tooling_equipment_param_maxSpeed' | localize("Max speed")}}: +
{{toolData.maxSpeed}}
+
+
+
+
+
+
+
+
+
@@ -92,8 +123,7 @@ export default { title: { default: "head 1"}, workedTime: { default: 0 }, rotation: { default: 0}, - familyId: {default: 0}, - shankId: {default: 0}, + toolData: {} }, // // data: function(){ // // return{ @@ -101,6 +131,11 @@ export default { // // rpm: 0 // // } // // }, + data: function(){ + return { + detailBoxOpened: false, + } + }, methods:{ loadStatus() { if (this.inAlarm) return "danger"; @@ -138,7 +173,17 @@ export default { secondi = ("00" + secondi).slice(-2) minuti = ("00" + minuti).slice(-2) return ore+ ":"+minuti+":"+secondi+"\nhh:mm:ss"; + }, + toggleDetail() { + if(this.toolData) + this.detailBoxOpened = !this.detailBoxOpened } + }, + watch:{ + toolData: function(n, o) { + if(this) + this.detailBoxOpened = false; + } } } \ No newline at end of file diff --git a/Step/wwwroot/src/app_modules/production/components/production.ts b/Step/wwwroot/src/app_modules/production/components/production.ts index 1bd1fb9b..624544d3 100644 --- a/Step/wwwroot/src/app_modules/production/components/production.ts +++ b/Step/wwwroot/src/app_modules/production/components/production.ts @@ -146,6 +146,13 @@ export default class Production extends Vue { if(r.toolData) return r.toolData.familyId } + getHeadsToolData(id) { + var r = this.getHeadsProperty(id); + if(r.toolData) + return r.toolData + + return null + } clickCms() { productionActions.setCMSHmi(store); } diff --git a/Step/wwwroot/src/app_modules/production/components/production.vue b/Step/wwwroot/src/app_modules/production/components/production.vue index 5811f877..69d39452 100644 --- a/Step/wwwroot/src/app_modules/production/components/production.vue +++ b/Step/wwwroot/src/app_modules/production/components/production.vue @@ -74,8 +74,7 @@ :rotation="getHeadsProperty(h.id).rotation" :configured="getHeadsProperty(h.id).configured" :workedTime="getHeadsProperty(h.id).workedTime" - :shankId="getHeadsShankId(h.id)" - :familyId="getHeadsFamilyId(h.id)" + :toolData="getHeadsToolData(h.id)" @click="selectHead(h)" @overridePlus="overridePlus(h.id)" @overrideMinus="overrideMinus(h.id)">