Fix frontend

Added Override chart (OSAI FANUC)
Added Offsets data
Update languages
This commit is contained in:
Lucio Maranta
2019-06-12 17:02:32 +02:00
parent 7dc198db02
commit a7f6b70111
17 changed files with 510 additions and 90 deletions
Binary file not shown.
+21 -2
View File
@@ -1,4 +1,5 @@
using System.Collections.Generic;
using CMS_CORE_Library.Models;
using System.Collections.Generic;
using System.Linq;
using static CMS_CORE_Library.Models.DataStructures;
@@ -18,6 +19,12 @@ namespace Step.Model.DTOModels
public bool CanLoadProgram;
public string ProcessMessage;
public byte RapidOverride;
public byte WorkOverride;
public OffsetModel offsetData;
public DTOProcessesDataModel()
{
ProcessMessage = "";
@@ -59,13 +66,25 @@ namespace Step.Model.DTOModels
if (ActiveOrigin != item.ActiveOrigin)
return false;
if (ProcessMessage != item.ProcessMessage)
if (ProcessMessage != item.ProcessMessage)
return false;
if (UnitMeasure != item.UnitMeasure)
return false;
if (CanLoadProgram != item.CanLoadProgram)
return false;
if (RapidOverride != item.RapidOverride)
return false;
if (WorkOverride != item.WorkOverride)
return false;
if (offsetData.RealLength != item.offsetData.RealLength)
return false;
if (offsetData.RealRadius != item.offsetData.RealRadius)
return false;
return true;
+7 -1
View File
@@ -113,7 +113,7 @@ namespace Step.NC
return cmsError;
}
public CmsError GetAxesPositionsByProcess(ushort processNum, out DTOAxesModel axes)
public CmsError GetAxesPositionsByProcess(ushort processNum, out DTOAxesModel axes)
{
axes = new DTOAxesModel();
@@ -432,6 +432,12 @@ namespace Step.NC
processesData.ActiveOffsetId = selectedData.ActiveOffsetId;
processesData.ProcessMessage = selectedData.ProcessMessage;
// Overrides
processesData.RapidOverride = selectedData.RapidOverride;
processesData.WorkOverride = selectedData.WorkOverride;
processesData.offsetData = selectedData.OffsetData;
// Measure
processesData.UnitMeasure = UMeas;
+27 -2
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Automatically generated by lucio.maranta: 2019-06-05 -->
<!-- Automatically generated by lucio.maranta: 2019-06-12 -->
<root>
<language_it>Italiano</language_it>
<header_maintainance_request>Effettuare manutenzione</header_maintainance_request>
@@ -141,7 +141,7 @@
<tooling_edgesdata_label_edit>Modifica Offset n. %d</tooling_edgesdata_label_edit>
<siemens_tooling_edgesdata_label_edit>Modifica Tagliente n. %d</siemens_tooling_edgesdata_label_edit>
<siemens_tooling_edgesdata_label_new>Creazione nuovo Tagliente</siemens_tooling_edgesdata_label_new>
<tooling_edgesdata_label_new>Associazionie nuovo Offset</tooling_edgesdata_label_new>
<tooling_edgesdata_label_new>Associazione nuovo Offset</tooling_edgesdata_label_new>
<tooling_shanks_label_box>Gestione Codoli</tooling_shanks_label_box>
<tooling_shanks_label_search>Seleziona un Codolo:</tooling_shanks_label_search>
<tooling_shanks_label_add>Crea un nuovo Codolo</tooling_shanks_label_add>
@@ -453,6 +453,26 @@
<tooling_equipment_list_select_radioProbe2.2>Radio Probe 2 - Ricevitore 2</tooling_equipment_list_select_radioProbe2.2>
<tooling_equipment_list_select_radioProbe2.3>Radio Probe 3 - Ricevitore 2</tooling_equipment_list_select_radioProbe2.3>
<tooling_equipment_list_select_radioProbe2.4>Radio Probe 4 - Ricevitore 2</tooling_equipment_list_select_radioProbe2.4>
<tooling_equipment_list_select_diskUltrasound10>Disco ultrasuoni amplitude 10%</tooling_equipment_list_select_diskUltrasound10>
<tooling_equipment_list_select_diskUltrasound20>Disco ultrasuoni amplitude 20%</tooling_equipment_list_select_diskUltrasound20>
<tooling_equipment_list_select_diskUltrasound30>Disco ultrasuoni amplitude 30%</tooling_equipment_list_select_diskUltrasound30>
<tooling_equipment_list_select_diskUltrasound40>Disco ultrasuoni amplitude 40%</tooling_equipment_list_select_diskUltrasound40>
<tooling_equipment_list_select_diskUltrasound50>Disco ultrasuoni amplitude 50%</tooling_equipment_list_select_diskUltrasound50>
<tooling_equipment_list_select_diskUltrasound60>Disco ultrasuoni amplitude 60%</tooling_equipment_list_select_diskUltrasound60>
<tooling_equipment_list_select_diskUltrasound70>Disco ultrasuoni amplitude 70%</tooling_equipment_list_select_diskUltrasound70>
<tooling_equipment_list_select_diskUltrasound80>Disco ultrasuoni amplitude 80%</tooling_equipment_list_select_diskUltrasound80>
<tooling_equipment_list_select_diskUltrasound90>Disco ultrasuoni amplitude 90%</tooling_equipment_list_select_diskUltrasound90>
<tooling_equipment_list_select_diskUltrasound100>Disco ultrasuoni amplitude 100%</tooling_equipment_list_select_diskUltrasound100>
<tooling_equipment_list_select_bladeUltrasound10>Lama ultrasuoni amplitude 10%</tooling_equipment_list_select_bladeUltrasound10>
<tooling_equipment_list_select_bladeUltrasound20>Lama ultrasuoni amplitude 20%</tooling_equipment_list_select_bladeUltrasound20>
<tooling_equipment_list_select_bladeUltrasound30>Lama ultrasuoni amplitude 30%</tooling_equipment_list_select_bladeUltrasound30>
<tooling_equipment_list_select_bladeUltrasound40>Lama ultrasuoni amplitude 40%</tooling_equipment_list_select_bladeUltrasound40>
<tooling_equipment_list_select_bladeUltrasound50>Lama ultrasuoni amplitude 50%</tooling_equipment_list_select_bladeUltrasound50>
<tooling_equipment_list_select_bladeUltrasound60>Lama ultrasuoni amplitude 60%</tooling_equipment_list_select_bladeUltrasound60>
<tooling_equipment_list_select_bladeUltrasound70>Lama ultrasuoni amplitude 70%</tooling_equipment_list_select_bladeUltrasound70>
<tooling_equipment_list_select_bladeUltrasound80>Lama ultrasuoni amplitude 80%</tooling_equipment_list_select_bladeUltrasound80>
<tooling_equipment_list_select_bladeUltrasound90>Lama ultrasuoni amplitude 90%</tooling_equipment_list_select_bladeUltrasound90>
<tooling_equipment_list_select_bladeUltrasound100>Lama ultrasuoni amplitude 100%</tooling_equipment_list_select_bladeUltrasound100>
<modal_confirm_title>Richiesta di conferma</modal_confirm_title>
<modal_ok_button>Ok</modal_ok_button>
<modal_cancel_button>Annulla</modal_cancel_button>
@@ -520,9 +540,14 @@
<production_box_video_button_cnc>NC</production_box_video_button_cnc>
<production_box_video_button_prod>Prod</production_box_video_button_prod>
<production_softkeys_prefered_header_title>Softkey Preferite</production_softkeys_prefered_header_title>
<card_axes_production_axes_tab_interp>Interp.</card_axes_production_axes_tab_interp>
<card_axes_production_axes_tab_om>Absol.</card_axes_production_axes_tab_om>
<card_axes_production_axes_tab_goto>To-Go</card_axes_production_axes_tab_goto>
<card_axes_production_axes_tab_prog>Prog.</card_axes_production_axes_tab_prog>
<card_production_rapid>Rapid:</card_production_rapid>
<card_production_work>Work:</card_production_work>
<card_job_production_offset_length>Lunghezza reale:</card_job_production_offset_length>
<card_job_production_offset_radius>Raggio reale:</card_job_production_offset_radius>
<card_job_production_origin>Origine attiva:</card_job_production_origin>
<card_job_production_offset>Correttore attivo:</card_job_production_offset>
<siemens_card_job_production_offset>Tagliente attivo:</siemens_card_job_production_offset>
+26 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Automatically generated by lucio.maranta: 2019-06-05 -->
<!-- Automatically generated by lucio.maranta: 2019-06-12 -->
<root>
<language_it>English</language_it>
<header_maintainance_request>Maintenance request</header_maintainance_request>
@@ -453,6 +453,26 @@
<tooling_equipment_list_select_radioProbe2.2>Radio Probe 2 - Reciever 2</tooling_equipment_list_select_radioProbe2.2>
<tooling_equipment_list_select_radioProbe2.3>Radio Probe 3 - Reciever 2</tooling_equipment_list_select_radioProbe2.3>
<tooling_equipment_list_select_radioProbe2.4>Radio Probe 4 - Reciever 2</tooling_equipment_list_select_radioProbe2.4>
<tooling_equipment_list_select_diskUltrasound10>Ultrasound disk amplitude 10%</tooling_equipment_list_select_diskUltrasound10>
<tooling_equipment_list_select_diskUltrasound20>Ultrasound disk amplitude 20%</tooling_equipment_list_select_diskUltrasound20>
<tooling_equipment_list_select_diskUltrasound30>Ultrasound disk amplitude 30%</tooling_equipment_list_select_diskUltrasound30>
<tooling_equipment_list_select_diskUltrasound40>Ultrasound disk amplitude 40%</tooling_equipment_list_select_diskUltrasound40>
<tooling_equipment_list_select_diskUltrasound50>Ultrasound disk amplitude 50%</tooling_equipment_list_select_diskUltrasound50>
<tooling_equipment_list_select_diskUltrasound60>Ultrasound disk amplitude 60%</tooling_equipment_list_select_diskUltrasound60>
<tooling_equipment_list_select_diskUltrasound70>Ultrasound disk amplitude 70%</tooling_equipment_list_select_diskUltrasound70>
<tooling_equipment_list_select_diskUltrasound80>Ultrasound disk amplitude 80%</tooling_equipment_list_select_diskUltrasound80>
<tooling_equipment_list_select_diskUltrasound90>Ultrasound disk amplitude 90%</tooling_equipment_list_select_diskUltrasound90>
<tooling_equipment_list_select_diskUltrasound100>Ultrasound disk amplitude 100%</tooling_equipment_list_select_diskUltrasound100>
<tooling_equipment_list_select_bladeUltrasound10>Ultrasound blade amplitude 10%</tooling_equipment_list_select_bladeUltrasound10>
<tooling_equipment_list_select_bladeUltrasound20>Ultrasound blade amplitude 20%</tooling_equipment_list_select_bladeUltrasound20>
<tooling_equipment_list_select_bladeUltrasound30>Ultrasound blade amplitude 30%</tooling_equipment_list_select_bladeUltrasound30>
<tooling_equipment_list_select_bladeUltrasound40>Ultrasound blade amplitude 40%</tooling_equipment_list_select_bladeUltrasound40>
<tooling_equipment_list_select_bladeUltrasound50>Ultrasound blade amplitude 50%</tooling_equipment_list_select_bladeUltrasound50>
<tooling_equipment_list_select_bladeUltrasound60>Ultrasound blade amplitude 60%</tooling_equipment_list_select_bladeUltrasound60>
<tooling_equipment_list_select_bladeUltrasound70>Ultrasound blade amplitude 70%</tooling_equipment_list_select_bladeUltrasound70>
<tooling_equipment_list_select_bladeUltrasound80>Ultrasound blade amplitude 80%</tooling_equipment_list_select_bladeUltrasound80>
<tooling_equipment_list_select_bladeUltrasound90>Ultrasound blade amplitude 90%</tooling_equipment_list_select_bladeUltrasound90>
<tooling_equipment_list_select_bladeUltrasound100>Ultrasound blade amplitude 100%</tooling_equipment_list_select_bladeUltrasound100>
<modal_confirm_title>Confirm Operation</modal_confirm_title>
<modal_ok_button>Ok</modal_ok_button>
<modal_cancel_button>Cancel</modal_cancel_button>
@@ -520,9 +540,14 @@
<production_box_video_button_cnc>NC</production_box_video_button_cnc>
<production_box_video_button_prod>Prod</production_box_video_button_prod>
<production_softkeys_prefered_header_title>Favorite Softkey</production_softkeys_prefered_header_title>
<card_axes_production_axes_tab_interp>Interp.</card_axes_production_axes_tab_interp>
<card_axes_production_axes_tab_om>Absol.</card_axes_production_axes_tab_om>
<card_axes_production_axes_tab_goto>To-Go</card_axes_production_axes_tab_goto>
<card_axes_production_axes_tab_prog>Prog.</card_axes_production_axes_tab_prog>
<card_production_rapid>Rapid:</card_production_rapid>
<card_production_work>Work:</card_production_work>
<card_job_production_offset_length>Real length:</card_job_production_offset_length>
<card_job_production_offset_radius>Real radius:</card_job_production_offset_radius>
<card_job_production_origin>Active origin:</card_job_production_origin>
<card_job_production_offset>Active offset:</card_job_production_offset>
<siemens_card_job_production_offset>Active Cutting-edge:</siemens_card_job_production_offset>
+6 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Automatically generated by lucio.maranta: 2019-06-05 -->
<!-- Automatically generated by lucio.maranta: 2019-06-12 -->
<root>
<language_it>Français</language_it>
<header_maintainance_request>Procéder à la maintenance</header_maintainance_request>
@@ -520,9 +520,14 @@
<production_box_video_button_cnc>NC</production_box_video_button_cnc>
<production_box_video_button_prod>Prod.</production_box_video_button_prod>
<production_softkeys_prefered_header_title>Touches Favorites</production_softkeys_prefered_header_title>
<card_axes_production_axes_tab_interp>Interp.</card_axes_production_axes_tab_interp>
<card_axes_production_axes_tab_om>Absol.</card_axes_production_axes_tab_om>
<card_axes_production_axes_tab_goto>To-Go</card_axes_production_axes_tab_goto>
<card_axes_production_axes_tab_prog>Prog.</card_axes_production_axes_tab_prog>
<card_production_rapid>Rapid:</card_production_rapid>
<card_production_work>Work:</card_production_work>
<card_job_production_offset_length>Longueur réelle:</card_job_production_offset_length>
<card_job_production_offset_radius>Rayon réel:</card_job_production_offset_radius>
<card_job_production_origin>Origine active :</card_job_production_origin>
<card_job_production_offset>Correcteur actif :</card_job_production_offset>
<siemens_card_job_production_offset>Tranchant actif :</siemens_card_job_production_offset>
+18 -12
View File
@@ -760,21 +760,23 @@
}
.card-axes-production {
height: 558px;
height: 562px;
width: 232px;
border-radius: 2px;
box-shadow: 0 1px 2px 0 @color-black-40;
//border-radius: 2px;
//box-shadow: 0 1px 2px 0 @color-black-40;
background-color: @color-background-white;
display: flex;
flex-flow: column;
.first-box-axes,
.second-box-axes {
height: 264px;
.first-box-axes {
height: 294px;
width: 100%;
display: flex;
flex-flow: column;
overflow: auto;
border-radius: 2px;
box-shadow: 0 1px 2px 0 @color-black-40;
margin-top: 8px;
.axes {
min-height: 32px;
@@ -874,12 +876,7 @@
.axes:last-child {
margin-bottom: 16px;
}
}
.second-box-axes {
width: 100%;
height: 294px;
.tabs {
min-height: 30px;
width: 100%;
@@ -918,6 +915,15 @@
}
}
.override-box {
height: 260px;
width: 232px;
display: block;
margin: auto;
border-radius: 2px;
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
}
.card-folder-path {
width: auto;
height: 64px;
@@ -131,7 +131,7 @@
height: 353px;
width: 232px;
border-radius: 2px;
margin-top: 8px;
margin-top: 12px;
margin-bottom: 16px;
box-shadow: 0 1px 2px 0 @color-black-40;
button:nth-child(odd),button:nth-child(even){
+40 -55
View File
@@ -7673,24 +7673,23 @@ footer .container button.big:before {
color: #002680;
}
.card-axes-production {
height: 558px;
height: 562px;
width: 232px;
border-radius: 2px;
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
background-color: #fff;
display: flex;
flex-flow: column;
}
.card-axes-production .first-box-axes,
.card-axes-production .second-box-axes {
height: 264px;
.card-axes-production .first-box-axes {
height: 294px;
width: 100%;
display: flex;
flex-flow: column;
overflow: auto;
border-radius: 2px;
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
margin-top: 8px;
}
.card-axes-production .first-box-axes .axes,
.card-axes-production .second-box-axes .axes {
.card-axes-production .first-box-axes .axes {
min-height: 32px;
width: 100%;
display: flex;
@@ -7699,20 +7698,16 @@ footer .container button.big:before {
justify-content: space-between;
margin-top: 8px;
}
.card-axes-production .first-box-axes .axes._7,
.card-axes-production .second-box-axes .axes._7 {
.card-axes-production .first-box-axes .axes._7 {
min-height: 26px;
}
.card-axes-production .first-box-axes .axes._8,
.card-axes-production .second-box-axes .axes._8 {
.card-axes-production .first-box-axes .axes._8 {
min-height: 22px;
}
.card-axes-production .first-box-axes .axes._9,
.card-axes-production .second-box-axes .axes._9 {
.card-axes-production .first-box-axes .axes._9 {
min-height: 18px;
}
.card-axes-production .first-box-axes .axes .variable,
.card-axes-production .second-box-axes .axes .variable {
.card-axes-production .first-box-axes .axes .variable {
font-size: 48px;
width: 75px;
line-height: 0;
@@ -7720,24 +7715,19 @@ footer .container button.big:before {
color: #4b4b4b;
text-align: right;
}
.card-axes-production .first-box-axes .axes .variable._7,
.card-axes-production .second-box-axes .axes .variable._7 {
.card-axes-production .first-box-axes .axes .variable._7 {
font-size: 42px;
}
.card-axes-production .first-box-axes .axes .variable._8,
.card-axes-production .second-box-axes .axes .variable._8 {
.card-axes-production .first-box-axes .axes .variable._8 {
font-size: 36px;
}
.card-axes-production .first-box-axes .axes .variable._9,
.card-axes-production .second-box-axes .axes .variable._9 {
.card-axes-production .first-box-axes .axes .variable._9 {
font-size: 29px;
}
.card-axes-production .first-box-axes .axes .variable.more9,
.card-axes-production .second-box-axes .axes .variable.more9 {
.card-axes-production .first-box-axes .axes .variable.more9 {
width: 69px;
}
.card-axes-production .first-box-axes .axes .number,
.card-axes-production .second-box-axes .axes .number {
.card-axes-production .first-box-axes .axes .number {
width: 135px;
height: 32px;
border-radius: 2px;
@@ -7749,79 +7739,74 @@ footer .container button.big:before {
padding-right: 8px;
font-size: 20px;
}
.card-axes-production .first-box-axes .axes .number._7,
.card-axes-production .second-box-axes .axes .number._7 {
.card-axes-production .first-box-axes .axes .number._7 {
height: 26px;
}
.card-axes-production .first-box-axes .axes .number._8,
.card-axes-production .second-box-axes .axes .number._8 {
.card-axes-production .first-box-axes .axes .number._8 {
height: 22px;
}
.card-axes-production .first-box-axes .axes .number._9,
.card-axes-production .second-box-axes .axes .number._9 {
.card-axes-production .first-box-axes .axes .number._9 {
height: 18px;
font-size: 18px;
}
.card-axes-production .first-box-axes .axes .number.more9,
.card-axes-production .second-box-axes .axes .number.more9 {
.card-axes-production .first-box-axes .axes .number.more9 {
margin-right: 5px;
}
.card-axes-production .first-box-axes .axes .umeasure,
.card-axes-production .second-box-axes .axes .umeasure {
.card-axes-production .first-box-axes .axes .umeasure {
width: 32px;
margin-left: 5px;
text-align: left;
}
.card-axes-production .first-box-axes .axes:nth-child(odd) .number,
.card-axes-production .second-box-axes .axes:nth-child(odd) .number {
.card-axes-production .first-box-axes .axes:nth-child(odd) .number {
background-color: #f3f3f3;
}
.card-axes-production .first-box-axes .axes:nth-child(even) .number,
.card-axes-production .second-box-axes .axes:nth-child(even) .number {
.card-axes-production .first-box-axes .axes:nth-child(even) .number {
background-color: rgba(23, 145, 255, 0.3);
}
.card-axes-production .first-box-axes .axes:first-child,
.card-axes-production .second-box-axes .axes:first-child {
.card-axes-production .first-box-axes .axes:first-child {
margin-top: 16px;
}
.card-axes-production .first-box-axes .axes:last-child,
.card-axes-production .second-box-axes .axes:last-child {
.card-axes-production .first-box-axes .axes:last-child {
margin-bottom: 16px;
}
.card-axes-production .second-box-axes {
width: 100%;
height: 294px;
}
.card-axes-production .second-box-axes .tabs {
.card-axes-production .first-box-axes .tabs {
min-height: 30px;
width: 100%;
background-color: #e7e7e7;
display: flex;
flex-direction: row;
}
.card-axes-production .second-box-axes .tabs button {
.card-axes-production .first-box-axes .tabs button {
visibility: hidden;
border: none;
}
.card-axes-production .second-box-axes .tabs .tab {
.card-axes-production .first-box-axes .tabs .tab {
visibility: visible;
width: 77px;
border-right: solid 1px #979797;
}
.card-axes-production .second-box-axes .tabs .tab.active {
.card-axes-production .first-box-axes .tabs .tab.active {
background-color: #fff;
border-top: solid 2px #1791ff !important;
}
.card-axes-production .second-box-axes .tabs .tab:last-child {
.card-axes-production .first-box-axes .tabs .tab:last-child {
border: none;
}
.card-axes-production .second-box-axes .content-box {
.card-axes-production .first-box-axes .content-box {
height: calc(100% - 30px);
width: 100%;
display: flex;
flex-flow: column;
overflow: auto;
}
.override-box {
height: 260px;
width: 232px;
display: block;
margin: auto;
border-radius: 2px;
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
}
.card-folder-path {
width: auto;
height: 64px;
@@ -18462,7 +18447,7 @@ footer .container button.big:before {
height: 353px;
width: 232px;
border-radius: 2px;
margin-top: 8px;
margin-top: 12px;
margin-bottom: 16px;
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
}
@@ -1,8 +1,21 @@
<template>
<!-- <div class="test-container"> -->
<div class="card-axes-production">
<div class="first-box-axes scrollable">
<div class="axes" v-for="a in axes(nameAxes,axesInterpoleted)" :key="a.id" :class="numAxes">
<!-- OVERRIDE DOUGHNUT CHART -->
<div class="override-box">
<doughnut-chart-animated
:value="getRapidOverride"
:secondValue="getWorkOverride"
:secondValueIsActive="true"
:firstText="'card_production_rapid' | localize('Rapid:')"
:secondText="'card_production_work' | localize('Work:')"
:angle-size="270"
:interval="5">
</doughnut-chart-animated>
</div>
<div class="first-box-axes">
<!--<div class="axes" v-for="a in axes(nameAxes,axesInterpoleted)" :key="a.id" :class="numAxes">
<div class="variable" :class="numAxes">
{{a.name}}
</div>
@@ -11,15 +24,26 @@
<span class="umeasure">{{a.umeas}}</span>
</div>
</div>
</div>
<div class="second-box-axes">
AXES TAB -->
<div class="tabs">
<button class="tab" :class="{'active': enableInterp}" @click="selectTab('INTER')">{{'card_axes_production_axes_tab_interp' | localize("INTERP")}}</button>
<button class="tab" :class="{'active': enableOm}" @click="selectTab('OM')">{{'card_axes_production_axes_tab_om' | localize("OM")}}</button>
<button class="tab" :class="{'active': enableGoto}" @click="selectTab('GOTO')">{{'card_axes_production_axes_tab_goto' | localize("GOTO")}}</button>
<button class="tab" :class="{'active': enableProg}" @click="selectTab('ERR')">{{'card_axes_production_axes_tab_prog' | localize("PROG")}}</button>
</div>
<div class="content-box scrollable" v-if="enableInterp">
<div class="axes" v-for="a in axes(nameAxes, axesInterpoleted)" :key="a.id" :class="numAxes">
<div class="variable" :class="numAxes">
{{a.name}}
</div>
<div class="number" :class="numAxes">
{{a.value.toFixed(3)}}
<span class="umeasure">{{a.umeas}}</span>
</div>
</div>
</div>
<div class="content-box scrollable" v-if="enableOm">
<div class="axes" v-for="a in axes(nameAxes,axesMachine)" :key="a.id" :class="numAxes">
<div class="axes" v-for="a in axes(nameAxes, axesMachine)" :key="a.id" :class="numAxes">
<div class="variable" :class="numAxes">
{{a.name}}
</div>
@@ -30,7 +54,7 @@
</div>
</div>
<div class="content-box scrollable" v-if="enableGoto">
<div class="axes" v-for="a in axes(nameAxes,axesToGo)" :key="a.id" :class="numAxes">
<div class="axes" v-for="a in axes(nameAxes, axesToGo)" :key="a.id" :class="numAxes">
<div class="variable" :class="numAxes">
{{a.name}}
</div>
@@ -41,7 +65,7 @@
</div>
</div>
<div class="content-box scrollable" v-if="enableProg">
<div class="axes" v-for="a in axes(nameAxes,axesProgrammePos)" :key="a.id" :class="numAxes">
<div class="axes" v-for="a in axes(nameAxes, axesProgrammePos)" :key="a.id" :class="numAxes">
<div class="variable" :class="numAxes">
{{a.name}}
</div>
@@ -59,13 +83,21 @@
</template>
<script lang="ts">
import { Hub } from "src/services/hub";
import { DoughnutChartAnimated } from "src/components/doughnut-chart";
declare let $: any;
export default {
props: {
followAxesNumber: { default: true }
},
components:{
DoughnutChartAnimated
},
data: function() {
return {
enableOm: true,
enableInterp: true,
enableOm: false,
enableGoto: false,
enableProg: false
};
@@ -94,30 +126,47 @@ export default {
return this.$store.state.process.valueAxisSelected.machine;
},
axesProgrammePos: function() {
debugger
return this.$store.state.process.valueAxisSelected.programmePos;
},
axesToGo: function() {
return this.$store.state.process.valueAxisSelected.toGo;
},
getRapidOverride: function() {
return this.$store.state.process.rapidOverride;
},
getWorkOverride: function() {
return this.$store.state.process.workOverride;
}
},
methods: {
selectTab(tab) {
if (tab == "OM") {
if(tab == "INTER") {
this.enableInterp = true;
this.enableOm = false;
this.enableGoto = false;
this.enableProg = false;
}
else if (tab == "OM") {
this.enableOm = true;
this.enableGoto = false;
this.enableProg = false;
this.enableInterp = false;
} else if (tab == "GOTO") {
this.enableOm = false;
this.enableGoto = true;
this.enableOm = false;
this.enableProg = false;
this.enableInterp = false;
} else if (tab == "ERR") {
this.enableProg = true;
this.enableOm = false;
this.enableGoto = false;
this.enableProg = true;
this.enableInterp = false;
} else {
this.enableOm = true;
this.enableGoto = false;
this.enableProg = false;
this.enableInterp = false;
}
},
axes: function(name, value) {
@@ -64,6 +64,9 @@ export default class CardJobProduction extends Vue {
get canLoadProgram() {
return this.$store.state.process.canLoadProgram;
}
get activeOffsetData() {
return this.$store.state.process.offsetData;
}
get currentProgram() {
@@ -36,6 +36,15 @@
<div class="elm number">{{activeOffsetId}}<span class="umeasure">&nbsp;</span></div>
</div>
<div class="var" v-if="activeOffsetId">
<div class="variable">{{'card_job_production_offset_length' | localize('Lunghezza reale:')}}</div>
<div class="elm number">{{activeOffsetData.realLength}} {{activeOffsetData.unitOfMeasure}}<span class="umeasure">&nbsp;</span></div>
</div>
<div class="var" v-if="activeOffsetId">
<div class="variable">{{'card_job_production_offset_radius' | localize('Raggio reale:')}}</div>
<div class="elm number">{{activeOffsetData.realRadius}} {{activeOffsetData.unitOfMeasure}}<span class="umeasure">&nbsp;</span></div>
</div>
<div class="var" v-if="activeProcessMessage">
<div class="variable">{{'card_job_production_message' | localize('Messaggio:')}}</div>
<div class="elm message">{{activeProcessMessage}}</div>
@@ -0,0 +1,148 @@
import Vue from "vue";
import { Component, Prop, Watch } from "vue-property-decorator";
@Component({})
export default class DoughnutChartAnimated extends Vue {
@Prop({ required: true, default: 0 })
value: number;
@Prop({ required: false, default: 0 })
secondValue: number;
@Prop({ required: false, default: "#002680" })
valueColor: string;
@Prop({ required: false, default: "#1791ff" })
secondValueColor: string;
@Prop({ required: false, default: 8 })
valueWidth: number;
@Prop({ required: false, default: "%" })
valueMisure: string;
@Prop({ required: false, default: 300 })
angleSize: number;
@Prop({ required: false, default: 5 })
interval: number;
@Prop({ required: false, default: 2 })
intervalSpace: number;
@Prop({ required: false, default: "#bbbcbc" })
intervalColor: string;
@Prop({ required: false, default: 4 })
intervalWidth: number;
@Prop({ required: false, default: false })
secondValueIsActive: boolean;
@Prop({ required: false, default: "R:" })
firstText: string;
@Prop({ required: false, default: "W:" })
secondText: string;
// Center of the circumference
cx: number = 56;
cy: number = 45;
// Interval bar radius
extRadius: number = 40;
// First bar radius
firstRadius: number = 30;
secondRadius: number = 22;
// Grad to radiants
gtorad: number = 0.0174533;
get totalSize(){
return this.angleSize;
}
get zeroAngle()
{
return 90 + (this.angleSize / 2);
}
get fullAngle()
{
return 90 - (this.angleSize / 2);
}
get middleIntervalSpace(){
return this.intervalSpace / 2;
}
get intervals(){
if(this.interval <= 0)
return null
let intervals: string[] = [];
let step = (this.angleSize / this.interval);
let current = this.fullAngle;
while(current < (this.zeroAngle))
{
let start = current + this.middleIntervalSpace;
let end = ((current + step) - this.middleIntervalSpace);
intervals.push(this.getArcPath(this.cx, this.cy, this.extRadius, start * this.gtorad, end * this.gtorad, false, false));
current = (current + step);
}
return intervals;
}
get steps(){
if(this.interval <= 0)
return null
let intervals: {x: number, y: number, value: number}[] = [];
let step = (this.angleSize / this.interval);
let current = this.fullAngle;
for (let index = (this.interval); index >= 0; index--) {
let point = this.getPoint(this.cx, this.cy, current * this.gtorad, this.extRadius + (this.intervalWidth * 2));
intervals.push({x: point[0], y: point[1], value: Math.floor((100 / this.interval) * index)});
current += step
}
return intervals;
}
size(percentage){
return (this.totalSize * percentage / 100);
}
getArcPath(cx: number, cy: number, radius: number, from: number, to:number, largeArcFlag: boolean = false, clockWise: boolean = true) : string{
radius = radius - this.intervalWidth;
let result: string = `M${this.getPoint(cx, cy, from, radius).join(" ")} `; //start point
result += `A ${radius} ${radius} `; //radius
result += `0 `; //x-axis-rotation
result += `${largeArcFlag ? 1 : 0} `; //large-arc-flag
result += `${clockWise ? 1 : 0} `; //sweep-flag
result += `${this.getPoint(cx, cy, to, radius).join(" ")}`; //end point;
return result;
}
getPoint(x: number, y: number, angle: number, radius: number)
{
return [((radius * Math.cos(angle)) + x), (y - (radius * Math.sin(angle)))];
}
getStrokeLength(radius, percentage){
// Circumference Perimeter formula
// * 0.75 to get 3/4 of perimeter
let pct = percentage == 0 ? 1 : 0.745;
return (2 * Math.PI * radius) * pct;
}
getEmptyStroke(radius, percentage){
console.log(this.getStrokeLength(radius, percentage) * (1 - (percentage / 100)))
return this.getStrokeLength(radius, percentage) * (1 - (percentage / 100))
}
}
@@ -0,0 +1,114 @@
<template>
<svg :viewBox="`0 0 112 100`" class="donut-chart" width="100%" height="100%">
<g>
<path
v-for="(interval, index) in intervals"
:key="`${index}-interval`"
:d="interval"
:stroke="intervalColor"
:stroke-width="intervalWidth"
fill="rgba(0,0,0,0)"
class="donut-chart-interval"
></path>
<text
:x="step.x"
:y="step.y"
font-size="10"
v-for="(step, index) in steps"
:key="`${index}-interval-label`"
text-anchor="middle"
:fill="intervalColor"
:stroke="intervalColor"
stroke-width="0"
dy=".3em"
>{{step.value}}</text>
</g>
<g >
<circle
transform = "translate(7, -13) rotate(136 50 50)"
r="30"
:cx="cx"
:cy="cy"
:stroke-width="valueWidth"
:stroke="valueColor"
:stroke-dasharray="getStrokeLength(firstRadius, value)"
:stroke-dashoffset="getEmptyStroke(firstRadius, value)"
style="fill: none;
transition:0.3s;"
/>
<circle v-if="secondValueIsActive"
transform = "translate(7, -13) rotate(136 50 50)"
r="22"
:cx="cx"
:cy="cy"
:stroke-width="valueWidth"
:stroke="secondValueColor"
:stroke-dasharray="getStrokeLength(secondRadius, secondValue)"
:stroke-dashoffset="getEmptyStroke(secondRadius, secondValue)"
style="fill: none;transition:0.3s;"
/>
<text v-if="!secondValueIsActive"
:x="cx"
:y="cy"
text-anchor="middle"
:fill="valueColor"
:stroke="valueColor"
dy=".3em"
>{{value}}{{valueMisure}}</text>
<!--- CASE 2 lines -->
<!--- unit of meausre val -->
<text v-if="secondValueIsActive"
:x="cx"
:y="cy"
text-anchor="middle"
:fill="valueColor"
:stroke="valueColor"
dy=".3em"
>{{valueMisure}}</text>
<!-- first val & txt -->
<text v-if="secondValueIsActive"
:x="25"
:y="110"
text-anchor="middle"
:fill="valueColor"
:stroke="valueColor"
font-size="12"
>{{value}}</text>
<text v-if="secondValueIsActive"
:x="25"
:y="95"
text-anchor="middle"
:fill="valueColor"
:stroke="valueColor"
font-size="8">
{{firstText}}
</text>
<!-- second val & txt -->
<text v-if="secondValueIsActive"
:x="85"
:y="95"
text-anchor="middle"
:fill="secondValueColor"
:stroke="secondValueColor"
font-size="8">
{{secondText}}
</text>
<text v-if="secondValueIsActive"
:x="85"
:y="110"
text-anchor="middle"
:fill="secondValueColor"
:stroke="secondValueColor"
font-size="12"
>{{secondValue}}</text>
</g>
</svg>
</template>
<script src="./doughnut-chart-animated.ts" lang="ts"></script>
@@ -1,5 +1,7 @@
import DoughnutChart from "./doughnut-chart.vue";
import DoughnutChartAnimated from "./doughnut-chart-animated.vue";
export {
DoughnutChart
DoughnutChart,
DoughnutChartAnimated
}
+4 -1
View File
@@ -192,7 +192,7 @@ export class Hub {
}
private static processDataChanged(data) {
console.log(data)
let processes = data.processes;
for (const key in processes) {
let process = processes[key];
@@ -210,6 +210,9 @@ export class Hub {
processModelActions.selectProcess(store, data.selectedProcess);
processModelActions.selectAxis(store, data.selectedAxis);
processModelActions.checkRemove(store, processes.map(i => i.id));
processModelActions.setOverrides(store, data.rapidOverride, data.workOverride);
processModelActions.setOffsetData(store, data.offsetData);
}
private static ncSoftKeyChanged(status) {
+23 -2
View File
@@ -13,6 +13,9 @@ export interface RunningProcessModel {
processMessage: string,
unitMeasure: string,
canLoadProgram: boolean,
offsetData: server.Offset
rapidOverride: number,
workOverride: number
}
export interface ProcessModelActionsInterface {
removeAllProcess(context);
@@ -36,9 +39,10 @@ export interface ProcessModelActionsInterface {
setProcessMessage(context, message: string);
setUnitMeasure(context, Id: number);
setCanLoadProgram(context, Id: number);
setOverrides(context, rapidOverride: number, workOverride: number);
setOffsetData(context, offsetData: server.Offset)
}
export const processStore = {
state: {
@@ -60,7 +64,10 @@ export const processStore = {
activeOrigin: 0,
processMessage: "",
unitMeasure: "mm",
canLoadProgram: false
canLoadProgram: false,
workOverride:0,
rapidOverride:0,
offsetData : null
} as RunningProcessModel,
mutations: {
SetCurrentOrigin(store, Id){
@@ -166,6 +173,13 @@ export const processStore = {
}
store.m155messages = Array.from(store._m155messages.values());
},
setOverrides(store, data){
store.rapidOverride = data.rapidOverride;
store.workOverride = data.workOverride;
},
SetOffsetData(store, data){
store.offsetData = data
}
},
getters: {
@@ -237,6 +251,13 @@ export const processStore = {
setUnitMeasure(context, data){
context.commit("SetUnitMeasure", data);
},
setOverrides(context, rapidOverride, workOverride){
context.commit("setOverrides", {rapidOverride: rapidOverride, workOverride: workOverride});
},
setOffsetData(context, offsetData: server.Offset)
{
context.commit("SetOffsetData", offsetData)
}
} as ProcessModelActionsInterface
}