From a93aaba32151e01eb2cc314523118be1539dae44 Mon Sep 17 00:00:00 2001 From: Lucio Maranta Date: Wed, 5 Jun 2019 16:54:20 +0200 Subject: [PATCH] Added maintenances contact Fix offsets --- Libs/CMS_CORE_Library.dll | Bin 9289216 -> 9289216 bytes Step.Config/Config/maintenancesConfig.xml | 331 +++++++++--------- .../Config/maintenancesConfigValidator.xsd | 106 +++--- Step.Config/ServerConfig.cs | 1 + Step.Config/ServerConfigController.cs | 19 +- .../ConfigModels/MaintenanceConfigModel.cs | 9 +- Step.NC/NcToolTableHandler.cs | 2 +- Step.Utils/languages/IT.xml | 6 +- Step.Utils/languages/en.xml | 6 +- Step.Utils/languages/fr.xml | 6 +- Step/Controllers/WebApi/ApiAlarmController.cs | 4 +- .../WebApi/ConfigurationController.cs | 8 +- Step/wwwroot/assets/styles/base/layout.less | 5 +- Step/wwwroot/assets/styles/base/modals.less | 47 +++ Step/wwwroot/assets/styles/style.css | 53 ++- Step/wwwroot/src/app.business-logic.ts | 3 +- .../machine/components/contact-info-dialog.ts | 31 ++ .../components/contact-info-dialog.vue | 18 + .../machine/components/user-info.vue | 4 + Step/wwwroot/src/app_modules/machine/index.ts | 2 + Step/wwwroot/src/services/machineService.ts | 10 + 21 files changed, 446 insertions(+), 225 deletions(-) create mode 100644 Step/wwwroot/src/app_modules/machine/components/contact-info-dialog.ts create mode 100644 Step/wwwroot/src/app_modules/machine/components/contact-info-dialog.vue diff --git a/Libs/CMS_CORE_Library.dll b/Libs/CMS_CORE_Library.dll index 43bd3a9104a10067078b7c66041c1bd3c381fd36..24edff5c2ceed9ba97d934981b0618cbaec2f8c2 100644 GIT binary patch delta 679 zcmWO4Nl%ku7=_`7GF7pFXi)(NKm=t}swfl@WflZlhca6zLKRV=^#f!m;48>W6Sn*U zR}zDXN$*_oZjOCUQanK&|ieJXV+ir_tB+teE zoUv{hb?cFh{ZIdXeO_|ySdfS$B;zBzuYoWprsKqj(~jf=>^ zCFCLxmvII8C_o{KP>d2>#Wj?|hU>V2GTg*1l%oQ6RN^+Oa0k`6i+iX+E$UE@1~j4x z_tA_NJU}bj&<+Qjc!)=Mj3;oR1D)tXH+s;EK0JjR{TP4;gLsA^48x1(c!3eT#3)|j zHQrzhCf;940Uz%EJib`sD!SWULmBASo zIxcP9OfycfYFxQ<+~|fGH~k4$E;?uC`3EO-8qF*16tAxT4f_%Xq#+#{ zxBw$EaS@kr8CQ^nY~&ypCgdR>1t`Q-T!R@FSaBUUP=sRK#4XrRf>PYZ9o$73%29zz z+(Q+rQG@%i!+~1Vp&k$L5RcFRCm!Po8u1j*;KFmfKogqL0ykd5120~o6>WG8AKsuH z9q2?Cy73n8pyEAx(2Eb~Lq7)a5uflGgBZdW3}Xa-jA9Jq2;eIwFo`LALlD!L!7Szw z!aTm?2Noc(h%lD0j1|bZFR{9RY-6TQg_2;>D2n4KqBvp^#p88)_jZ5!c1(WPua&7Z OV>GxBcgG^X_5T4pPdKaq diff --git a/Step.Config/Config/maintenancesConfig.xml b/Step.Config/Config/maintenancesConfig.xml index 605d9f16..2decfae8 100644 --- a/Step.Config/Config/maintenancesConfig.xml +++ b/Step.Config/Config/maintenancesConfig.xml @@ -1,173 +1,180 @@  - - - 1 - - 5-Axis operating-unit management - Gestione gruppo operatore 5 assi - - 2000 - 15/07/2018 13:00 - MACHINE_INTERVAL - - Replace air/liquid seals of rotary axis joint - Sostituire tenute aria/liquido giunto assi rotanti - - mm - 0 - + + + CMS + cms@cms.it + 034564111 + + + + 1 + + 5-Axis operating-unit management + Gestione gruppo operatore 5 assi + + 2000 + 15/07/2018 13:00 + MACHINE_INTERVAL + + Replace air/liquid seals of rotary axis joint + Sostituire tenute aria/liquido giunto assi rotanti + + mm + 0 + - - 2 - - Transmission member check - Gestione Organi di trasmissione - - 2000 - 15/07/2018 13:00 - MACHINE_INTERVAL - - Transmission members check - Necessary control of all transmission system - - mm - 1 - + + 2 + + Transmission member check + Gestione Organi di trasmissione + + 2000 + 15/07/2018 13:00 + MACHINE_INTERVAL + + Transmission members check + Necessary control of all transmission system + + mm + 1 + - - 3 - - Mechanical/electrical safety systems - Sistemi di sicurezza meccanici/elettrici - - 2000 - 15/07/2018 13:00 - MACHINE_INTERVAL - - Necessary control of mechanical/electrical safety systems - Necessario controllo di tutti i sistemi di sicurezza meccanici/elettrici presenti in macchina - - mm - 1 - + + 3 + + Mechanical/electrical safety systems + Sistemi di sicurezza meccanici/elettrici + + 2000 + 15/07/2018 13:00 + MACHINE_INTERVAL + + Necessary control of mechanical/electrical safety systems + Necessario controllo di tutti i sistemi di sicurezza meccanici/elettrici presenti in macchina + + mm + 1 + - - 4 - - Check of axis geometry - Controllo geometria assi - - 2000 - 15/07/2018 13:00 - MACHINE_INTERVAL - - Necessary control of axis geometry - Necessario controllo della corretta geometria assi - - mm - 1 - + + 4 + + Check of axis geometry + Controllo geometria assi + + 2000 + 15/07/2018 13:00 + MACHINE_INTERVAL + + Necessary control of axis geometry + Necessario controllo della corretta geometria assi + + mm + 1 + - - 5 - - Machine System check - Controllo impianti macchina necessario - - 2000 - 15/07/2018 13:00 - MACHINE_INTERVAL - - Necessary control Electric / Mechanical / Pneumatic Systems - Necessario controllo impianti Elettrico / Meccanico / Pneumatico - - mm - 1 - + + 5 + + Machine System check + Controllo impianti macchina necessario + + 2000 + 15/07/2018 13:00 + MACHINE_INTERVAL + + Necessary control Electric / Mechanical / Pneumatic Systems + Necessario controllo impianti Elettrico / Meccanico / Pneumatico + + mm + 1 + - - 6 - - Tool holder clamps management - Gestione manine portautensili - - 4000 - 15/07/2018 13:00 - MACHINE_INTERVAL - - Replace composite material tool holder clamps - Sostituire manine portautensili in materiale composito - - mm - 1 - + + 6 + + Tool holder clamps management + Gestione manine portautensili + + 4000 + 15/07/2018 13:00 + MACHINE_INTERVAL + + Replace composite material tool holder clamps + Sostituire manine portautensili in materiale composito + + mm + 1 + - - 7 - - Balancing cylinders management - Gestione cilindri di bilanciamento - - 4000 - 15/07/2018 13:00 - MACHINE_INTERVAL - - Replace seals on balancing cylinders - Sostituire tenute su cilindri di bilanciamento - - mm - 1 - + + 7 + + Balancing cylinders management + Gestione cilindri di bilanciamento + + 4000 + 15/07/2018 13:00 + MACHINE_INTERVAL + + Replace seals on balancing cylinders + Sostituire tenute su cilindri di bilanciamento + + mm + 1 + - - 8 - - Lower-grinder servicing necessary - Revisione mola inferiore necessaria - - 4000 - 15/07/2018 13:00 - MACHINE_INTERVAL - - Execute spindle service of Lower-grinder - Eseguire revisione al mandrino della mola inferiore - - mm - 2 - + + 8 + + Lower-grinder servicing necessary + Revisione mola inferiore necessaria + + 4000 + 15/07/2018 13:00 + MACHINE_INTERVAL + + Execute spindle service of Lower-grinder + Eseguire revisione al mandrino della mola inferiore + + mm + 2 + - - 9 - - Upper-grinder servicing necessary - Revisione mola superiore necessaria - - 4000 - 15/07/2018 13:00 - MACHINE_INTERVAL - - Execute spindle service of Upper-grinder - Eseguire revisione al mandrino della mola superiore - - mm - 3 - + + 9 + + Upper-grinder servicing necessary + Revisione mola superiore necessaria + + 4000 + 15/07/2018 13:00 + MACHINE_INTERVAL + + Execute spindle service of Upper-grinder + Eseguire revisione al mandrino della mola superiore + + mm + 3 + - - 10 - - Drill servicing necessary - Revisione foratore necessario - - 4000 - 15/07/2018 13:00 - MACHINE_INTERVAL - - Execute spindle service of the driller - Eseguire revisione al mandrino del foratore - - mm - 4 - + + 10 + + Drill servicing necessary + Revisione foratore necessario + + 4000 + 15/07/2018 13:00 + MACHINE_INTERVAL + + Execute spindle service of the driller + Eseguire revisione al mandrino del foratore + + mm + 4 + - \ No newline at end of file + + \ No newline at end of file diff --git a/Step.Config/Config/maintenancesConfigValidator.xsd b/Step.Config/Config/maintenancesConfigValidator.xsd index 05891eae..63b4f966 100644 --- a/Step.Config/Config/maintenancesConfigValidator.xsd +++ b/Step.Config/Config/maintenancesConfigValidator.xsd @@ -1,53 +1,71 @@  - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + diff --git a/Step.Config/ServerConfig.cs b/Step.Config/ServerConfig.cs index 9fe1cafe..a8bb037c 100644 --- a/Step.Config/ServerConfig.cs +++ b/Step.Config/ServerConfig.cs @@ -14,6 +14,7 @@ namespace Step.Config public static SoftwareProdConfigModel SoftwareProdConfig; public static MachineModel MachineConfig; public static List MaintenancesConfig; + public static ContactModel ContactConfig; public static List FunctionsAccessConfig; public static List AllFunctionalityDisabled; diff --git a/Step.Config/ServerConfigController.cs b/Step.Config/ServerConfigController.cs index ec62977e..aaf7447c 100644 --- a/Step.Config/ServerConfigController.cs +++ b/Step.Config/ServerConfigController.cs @@ -346,10 +346,21 @@ namespace Step.Config // Get Maintenances file handler XDocument xmlConfigFile = GetXmlHandlerWithValidator(MAINTENANCES_CONFIG_SCHEMA_PATH, MAINTENANCES_CONFIG_PATH); - MaintenancesConfig = xmlConfigFile - .Root - .Elements() - .ToList() + ContactConfig = xmlConfigFile + .Descendants("contact") + .Select(x => + new ContactModel() + { + Name = x.Element("name").Value, + Email = x.Element("email").Value, + PhoneNumber = x.Element("phoneNumber").Value + }) + .FirstOrDefault(); + + + MaintenancesConfig = xmlConfigFile + .Descendants("maintenances") + .Elements("maintenance") .Select(x => new MaintenanceConfigModel() { diff --git a/Step.Model/ConfigModels/MaintenanceConfigModel.cs b/Step.Model/ConfigModels/MaintenanceConfigModel.cs index 535be5ef..da453b48 100644 --- a/Step.Model/ConfigModels/MaintenanceConfigModel.cs +++ b/Step.Model/ConfigModels/MaintenanceConfigModel.cs @@ -6,7 +6,7 @@ namespace Step.Model.ConfigModels public class MaintenanceConfigModel { public int Id { get; set; } - public Dictionary LocalizedName { get; set; } + public Dictionary LocalizedName { get; set; } public TimeSpan Intervall { get; set; } public DateTime Deadline { get; set; } public string Type { get; set; } @@ -15,4 +15,11 @@ namespace Step.Model.ConfigModels public Dictionary LocalizedDescription { get; set; } public string UnitOfMeasure { get; set; } } + + public class ContactModel + { + public string Name { get; set; } + public string Email { get; set; } + public string PhoneNumber { get; set; } + } } \ No newline at end of file diff --git a/Step.NC/NcToolTableHandler.cs b/Step.NC/NcToolTableHandler.cs index 817a18bb..8423e8ea 100644 --- a/Step.NC/NcToolTableHandler.cs +++ b/Step.NC/NcToolTableHandler.cs @@ -113,7 +113,7 @@ namespace Step.NC DTONewNcFamilyModel newFamily = new DTONewNcFamilyModel(); SupportFunctions.CopyProperties(dtoToolWithFamily, newFamily); // Update only family data - newFamily = (DTONcFamilyModel)toolsManager.UpdateFamily(dtoToolWithFamily.FamilyId, newFamily); + newFamily = (DTONcFamilyModel)toolsManager.UpdateFamily(dtoToolWithFamily.FamilyId, newFamily); } // Update database tool Tool diff --git a/Step.Utils/languages/IT.xml b/Step.Utils/languages/IT.xml index fc62d14d..413bc8f7 100644 --- a/Step.Utils/languages/IT.xml +++ b/Step.Utils/languages/IT.xml @@ -1,5 +1,5 @@ - + Italiano Effettuare manutenzione @@ -54,6 +54,10 @@ Versione Core Maestro-Active: Versione Client Maestro-Active: Formato delle date Maestro-Active: + Informazioni di contatto + Nome contatto: + Email: + Telefono: Rpm Utensile Carico diff --git a/Step.Utils/languages/en.xml b/Step.Utils/languages/en.xml index dfee63f7..ccb44091 100644 --- a/Step.Utils/languages/en.xml +++ b/Step.Utils/languages/en.xml @@ -1,5 +1,5 @@ - + English Maintenance request @@ -54,6 +54,10 @@ Maestro-Active Core Version: Maestro-Active Client Version: Maestro-Active Data Format: + Contact Info + Contact Name: + Email: + Phone Number: Rpm Tool Load diff --git a/Step.Utils/languages/fr.xml b/Step.Utils/languages/fr.xml index 8103ec36..22375c07 100644 --- a/Step.Utils/languages/fr.xml +++ b/Step.Utils/languages/fr.xml @@ -1,5 +1,5 @@ - + Français Procéder à la maintenance @@ -54,6 +54,10 @@ Version Core Maestro-Active : Version Client Maestro-Active : Format des dates Maestro-Active : + Informations de contact + Nom du contact + Email: + Numéro de Téléphone: Tpm Outil Charge diff --git a/Step/Controllers/WebApi/ApiAlarmController.cs b/Step/Controllers/WebApi/ApiAlarmController.cs index be03bfd4..bd109750 100644 --- a/Step/Controllers/WebApi/ApiAlarmController.cs +++ b/Step/Controllers/WebApi/ApiAlarmController.cs @@ -5,8 +5,8 @@ using Step.NC; using Step.Provider; using System; using System.Collections.Generic; -using System.IO; -using System.Linq; +using System.IO; +using System.Linq; using System.Net; using System.Net.Http; using System.Net.Http.Headers; diff --git a/Step/Controllers/WebApi/ConfigurationController.cs b/Step/Controllers/WebApi/ConfigurationController.cs index 41964d30..db1bb513 100644 --- a/Step/Controllers/WebApi/ConfigurationController.cs +++ b/Step/Controllers/WebApi/ConfigurationController.cs @@ -106,7 +106,7 @@ namespace Step.Controllers.WebApi { var configuredAlarm = InitialAlarmsConfig.Where(x => x.PlcId == i).FirstOrDefault(); - if (configuredAlarm == null) + if (configuredAlarm == null) restoreIsEnabled = false; else restoreIsEnabled = configuredAlarm.RestoreIsActive; @@ -134,5 +134,11 @@ namespace Step.Controllers.WebApi return Ok(toolTableConfiguration); } } + + [Route("contact"), HttpGet] + public IHttpActionResult GetContact() + { + return Ok(ContactConfig); + } } } \ No newline at end of file diff --git a/Step/wwwroot/assets/styles/base/layout.less b/Step/wwwroot/assets/styles/base/layout.less index 8e2126b6..cf91fb93 100644 --- a/Step/wwwroot/assets/styles/base/layout.less +++ b/Step/wwwroot/assets/styles/base/layout.less @@ -41,7 +41,7 @@ @background-color: rgb(216, 216, 216); @handle-width: 48px; @handle-height: 32px; -@persona-size: 88px; +@persona-size: 80px; @spinner-loading-height: 200px; @spinner-loading-width: 200px; a, a:visited, a:hover, a:active { @@ -51,8 +51,9 @@ a, a:visited, a:hover, a:active { .persona { height: @persona-size; width: @persona-size; + line-height: @persona-size; border-radius: @persona-size; - font-size: @persona-size; + font-size: 50px; text-align: center; background-color: @color-darkish-blue; color: white; diff --git a/Step/wwwroot/assets/styles/base/modals.less b/Step/wwwroot/assets/styles/base/modals.less index 32fdfbc4..fbcfa4ff 100644 --- a/Step/wwwroot/assets/styles/base/modals.less +++ b/Step/wwwroot/assets/styles/base/modals.less @@ -33,6 +33,7 @@ @modal-iframe-height: 800px; @modal-iframe-width: 1800px; @modal-user-info-height: 610px; +@modal-concact-info-height: 375px; @modal-login-top: @modal-login-height / 2; @modal-login-left: @modal-login-width / 2; @modal-create-maintenance-width: 896px; @@ -344,6 +345,52 @@ } } +.@{modal}.contact-info { + width: @modal-login-width; + height: @modal-concact-info-height; + top: calc(~"50%" - @modal-concact-info-height / 2); + left: calc(~"50%" - @modal-login-width / 2); + header { + background-color: @color-darkish-blue; + color: @color-white; + font-family: @font-family; + font-weight: 600; + font-size: 24px; + text-align: left; + padding: 0px 23px; + } + img { + display: block; + width: 88px; + height: 88px; + margin: auto; + margin-top: 48px; + margin-bottom: 40px; + } + .details { + text-align: center; + color: @color-greyish-brown; + & > * { + display: block; + margin-bottom: 5px; + height: 20px; + line-height: 20px; + } + & > label { + text-align: right; + strong { + display: inline-block; + width: 50%; + text-align: left; + } + } + + & > hr { + border: none; + } + } +} + .@{modal}.self-adaptive { width: @modal-selfadaptivepath-width; height: @modal-selfadaptivepath-height; diff --git a/Step/wwwroot/assets/styles/style.css b/Step/wwwroot/assets/styles/style.css index 4fe29e76..562f8714 100644 --- a/Step/wwwroot/assets/styles/style.css +++ b/Step/wwwroot/assets/styles/style.css @@ -280,6 +280,50 @@ .modal.machine-info .details > hr { border: none; } +.modal.contact-info { + width: 600px; + height: 375px; + top: calc(50% - 187.5px); + left: calc(50% - 300px); +} +.modal.contact-info header { + background-color: #002680; + color: #fff; + font-family: 'Work Sans', sans-serif; + font-weight: 600; + font-size: 24px; + text-align: left; + padding: 0px 23px; +} +.modal.contact-info img { + display: block; + width: 88px; + height: 88px; + margin: auto; + margin-top: 48px; + margin-bottom: 40px; +} +.modal.contact-info .details { + text-align: center; + color: #4b4b4b; +} +.modal.contact-info .details > * { + display: block; + margin-bottom: 5px; + height: 20px; + line-height: 20px; +} +.modal.contact-info .details > label { + text-align: right; +} +.modal.contact-info .details > label strong { + display: inline-block; + width: 50%; + text-align: left; +} +.modal.contact-info .details > hr { + border: none; +} .modal.self-adaptive { width: 750px; height: 350px; @@ -20497,10 +20541,11 @@ a:active { text-decoration: none; } .persona { - height: 88px; - width: 88px; - border-radius: 88px; - font-size: 88px; + height: 80px; + width: 80px; + line-height: 80px; + border-radius: 80px; + font-size: 50px; text-align: center; background-color: #002680; color: white; diff --git a/Step/wwwroot/src/app.business-logic.ts b/Step/wwwroot/src/app.business-logic.ts index 7a6002c8..04aaffc6 100644 --- a/Step/wwwroot/src/app.business-logic.ts +++ b/Step/wwwroot/src/app.business-logic.ts @@ -5,7 +5,7 @@ import { LoginService } from "src/services/loginService"; import { store, AppModel, MachineStatusModel, machineStatusActions, localizationModelActions, machineInfoActions } from "src/store"; -import { UserInfoDialog, MachineInfoDialog, AxesCalibration, Login } from "src/app_modules/machine"; +import { UserInfoDialog, MachineInfoDialog, AxesCalibration, ContactInfoDialog, Login } from "src/app_modules/machine"; import { AreaModel } from "src/store/machineStatus.store"; @@ -43,6 +43,7 @@ const messageService = Factory.Get(MessageService); messageService.subscribeToChannel("show-user-info", () => { ModalHelper.ShowModal(UserInfoDialog); }); messageService.subscribeToChannel("show-machine-info", () => { ModalHelper.ShowModal(MachineInfoDialog); }); +messageService.subscribeToChannel("show-contact-info", () => { ModalHelper.ShowModal(ContactInfoDialog); }); messageService.subscribeToChannel("show-axes-calibration", () => { ModalHelper.ShowNcModal(AxesCalibration); }); messageService.subscribeToChannel("hide-axes-calibration", () => { ModalHelper.HideNcModal(AxesCalibration); }); messageService.subscribeToChannel("show-m155-questions", () => { ModalHelper.ShowNextM155Modal(); }); diff --git a/Step/wwwroot/src/app_modules/machine/components/contact-info-dialog.ts b/Step/wwwroot/src/app_modules/machine/components/contact-info-dialog.ts new file mode 100644 index 00000000..189c1ee8 --- /dev/null +++ b/Step/wwwroot/src/app_modules/machine/components/contact-info-dialog.ts @@ -0,0 +1,31 @@ +import Vue from "vue"; +import { Modal, ModalHelper } from "src/components/modals"; +import { machineService, ContactConfigurationModel } from "src/services/machineService"; +import { Factory, MessageService, awaiter } from "src/_base"; +import Component from "vue-class-component"; + +@Component({ components: { modal: Modal } }) +export default class ContactInfoDialog extends Vue { + public contactInfo: ContactConfigurationModel = { + name:"", + phoneNumber: "", + email: "" + }; + + async beforeMount() { + this.contactInfo = await awaiter(new machineService().getContactConfiguration()); + Factory.Get(MessageService).subscribeToChannel("esc_pressed", args => { + this.close(); + }); + } + + beforeDestroy() { + Factory.Get(MessageService).deleteChannel("esc_pressed"); + } + + close() { + Factory.Get(MessageService).deleteChannel("esc_pressed"); + ModalHelper.HideModal(); + } +} + diff --git a/Step/wwwroot/src/app_modules/machine/components/contact-info-dialog.vue b/Step/wwwroot/src/app_modules/machine/components/contact-info-dialog.vue new file mode 100644 index 00000000..2fde904b --- /dev/null +++ b/Step/wwwroot/src/app_modules/machine/components/contact-info-dialog.vue @@ -0,0 +1,18 @@ + + + diff --git a/Step/wwwroot/src/app_modules/machine/components/user-info.vue b/Step/wwwroot/src/app_modules/machine/components/user-info.vue index 5e50dfd1..eb3da213 100644 --- a/Step/wwwroot/src/app_modules/machine/components/user-info.vue +++ b/Step/wwwroot/src/app_modules/machine/components/user-info.vue @@ -5,6 +5,10 @@ --> +