Merge branch 'develop' of https://bitbucket.org/ncarminati/cms_step into develop

This commit is contained in:
Alessandro Francia
2018-04-11 13:10:47 +02:00
40 changed files with 409 additions and 257 deletions
+1 -1
View File
@@ -414,7 +414,7 @@
</softKey_toggle>
<softKey_group>
<active>true</active>
<category>3</category>
<category>7</category>
<operatorConfirmationNeeded>false</operatorConfirmationNeeded>
<localizedNames>
<lang langKey="en">Test</lang>
+20
View File
@@ -41,4 +41,24 @@
<machineinfo_server_cms_version>Versione Server Step:</machineinfo_server_cms_version>
<machineinfo_core_cms_version>Versione Core Step:</machineinfo_core_cms_version>
<machineinfo_client_version>Versione Client Step:</machineinfo_client_version>
<support_summary>Scadenza: </support_summary>
<head_label_rpm>Rpm</head_label_rpm>
<head_label_tool>Utensile</head_label_tool>
<head_label_load>Carico</head_label_load>
<head_label_pressure>MPa</head_label_pressure>
<head_label_abrasive>Abrasivo</head_label_abrasive>
<head_label_gmin>g/min</head_label_gmin>
<head_label_vacuum>Vuoto</head_label_vacuum>
<head_label_bar>bar</head_label_bar>
<sfk_category_1>1. Softkey Generiche</sfk_category_1>
<sfk_category_2>2. Bloccaggi / zone vuoto</sfk_category_2>
<sfk_category_3>3. Aggregati / Dispositivi di raffreddamento</sfk_category_3>
<sfk_category_4>4. Modalità di lavoro</sfk_category_4>
<sfk_category_5>5. Carico / Scarico</sfk_category_5>
<sfk_category_6>6. Lancio procedure / Programmi utente</sfk_category_6>
<sfk_category_7>7. Attrezzaggio e protezioni</sfk_category_7>
<softkey_confirm>Sei sicuro?</softkey_confirm>
<confirm_request_confirm>Conferma</confirm_request_confirm>
<confirm_request_cancel>Annulla</confirm_request_cancel>
<language_it>Italiano</language_it>
</root>
+20 -1
View File
@@ -41,5 +41,24 @@
<machineinfo_server_cms_version>Step Server Version:</machineinfo_server_cms_version>
<machineinfo_core_cms_version>Step Core Version:</machineinfo_core_cms_version>
<machineinfo_client_version>Step Client Version:</machineinfo_client_version>
<language_it>Italian</language_it>
<support_summary>Expiration:</support_summary>
<head_label_rpm>Rpm</head_label_rpm>
<head_label_tool>Tool</head_label_tool>
<head_label_load>Load</head_label_load>
<head_label_pressure>MPa</head_label_pressure>
<head_label_abrasive>Abrasive</head_label_abrasive>
<head_label_gmin>g/min</head_label_gmin>
<head_label_vacuum>Vacuum</head_label_vacuum>
<head_label_bar>bar</head_label_bar>
<sfk_category_1>1. Generic Softkeys</sfk_category_1>
<sfk_category_2>2. Locks / Vacuum areas</sfk_category_2>
<sfk_category_3>3. Head And Cooling devices</sfk_category_3>
<sfk_category_4>4. Modes of working</sfk_category_4>
<sfk_category_5>5. Load / Unload</sfk_category_5>
<sfk_category_6>6. User subprograms</sfk_category_6>
<sfk_category_7>7. Equipping and protections</sfk_category_7>
<softkey_confirm>Are you sure?</softkey_confirm>
<confirm_request_confirm>Confirm</confirm_request_confirm>
<confirm_request_cancel>Cancel</confirm_request_cancel>
<language_it>English</language_it>
</root>
+21
View File
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<machineinfo_lbl_title>機器信息</machineinfo_lbl_title>
<userinfo_lbl_title>用戶設置</userinfo_lbl_title>
@@ -40,4 +41,24 @@
<machineinfo_server_cms_version>Step 服務器版本:</machineinfo_server_cms_version>
<machineinfo_core_cms_version>Step 核心版本:</machineinfo_core_cms_version>
<machineinfo_client_version>Step 客戶端版本:</machineinfo_client_version>
<support_summary>呼氣:</support_summary>
<head_label_rpm></head_label_rpm>
<head_label_tool>工具</head_label_tool>
<head_label_load>加載</head_label_load>
<head_label_pressure>兆帕</head_label_pressure>
<head_label_abrasive>磨料</head_label_abrasive>
<head_label_gmin>克/分鐘</head_label_gmin>
<head_label_vacuum>真空</head_label_vacuum>
<head_label_bar>酒吧</head_label_bar>
<sfk_category_1>1. 通用軟鍵</sfk_category_1>
<sfk_category_2>2. 鎖/真空區域</sfk_category_2>
<sfk_category_3>3. 頭部和冷卻裝置</sfk_category_3>
<sfk_category_4>4. 工作模式</sfk_category_4>
<sfk_category_5>5. 加載/卸載</sfk_category_5>
<sfk_category_6>6. 用戶子程序</sfk_category_6>
<sfk_category_7>7. 裝備和保護</sfk_category_7>
<softkey_confirm>你確定?</softkey_confirm>
<confirm_request_confirm>確認</confirm_request_confirm>
<confirm_request_cancel>取消</confirm_request_cancel>
<language_it>中文</language_it>
</root>
+6 -6
View File
@@ -90,13 +90,13 @@ namespace Step.App_Start
public void SignalRConfig(IAppBuilder app)
{
// Set CamelCase json configuration
//var settings = new JsonSerializerSettings
//{
// ContractResolver = new SignalRContractResolver()
//};
var settings = new JsonSerializerSettings
{
ContractResolver = new SignalRContractResolver()
};
//var serializer = JsonSerializer.Create(settings);
//GlobalHost.DependencyResolver.Register(typeof(JsonSerializer), () => serializer);
var serializer = JsonSerializer.Create(settings);
GlobalHost.DependencyResolver.Register(typeof(JsonSerializer), () => serializer);
// Set up signalR config
app.Map("/signalr", map =>
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

+18 -8
View File
@@ -9,20 +9,21 @@
top: 40px;
background-color: #fff;
padding: 0 0;
transition: width 200ms ease-in-out, height 200ms ease-in-out, padding 200ms ease-in-out, background-color 200ms ease-in-out;
z-index: 150;
box-shadow: @color-alarm-list-shadow;
box-sizing: border-box;
display: flex;
flex-wrap: nowrap;
overflow: hidden;
transition: width 200ms ease-in-out, height 200ms ease-in-out, padding 200ms ease-in-out, background-color 200ms ease-in-out,box-shadow 0ms 0ms;
&.expanded {
width: 494px;
padding: 0 24px;
}
&.expanded.opened {
padding: 72px 24px 24px 0px;
height: calc(~"100vh - 120px");
height: calc(~"100vh - 120px");
box-shadow: @color-alarm-list-shadow;
transition: width 200ms ease-in-out, height 200ms ease-in-out, padding 200ms ease-in-out, background-color 200ms ease-in-out,box-shadow 20ms 180ms;
}
&.alarm {
background-color: @color-faded-red;
@@ -68,6 +69,12 @@
height: 100%;
&.warning {
color: @color-greyish-brown;
.sources {
span.source {
border: 1px solid @color-greyish-brown !important;
color: @color-greyish-brown;
}
}
}
& h2 {
// height: 21px;
@@ -86,6 +93,7 @@
}
}
.sources {
margin-top: 10px;
span.source {
font-size: 14px;
float: left;
@@ -97,6 +105,7 @@
padding: 0 5px;
line-height: 20px;
margin-bottom: 3px;
margin-right: 5px;
}
&:after {
content: " ";
@@ -186,15 +195,16 @@
flex-flow: row;
justify-content: space-between;
}
span {
.sourcecontainer {
font-size: 14px;
padding: 0 5px;
float: left;
display: block;
margin: 0 3px;
border: 1px solid @color-warm-grey !important;
color: @color-greyish-brown ;
font-weight: 600;
.source {
border: 1px solid @color-warm-grey !important;
padding: 0 5px;
margin-right: 3px;
}
}
}
button {
+2 -2
View File
@@ -90,7 +90,7 @@
span {
text-align: center;
color: #4b4b4b;
text-transform: lowercase;
// text-transform: lowercase;
font-size: 14px;
display: flex;
flex-flow: column;
@@ -261,7 +261,7 @@
span {
text-align: center;
color: #4b4b4b;
text-transform: lowercase;
// text-transform: lowercase;
font-size: 14px;
display: flex;
flex-flow: column;
@@ -103,6 +103,10 @@
position: relative;
padding: 0;
width: 100%;
.fa-icons{
font-size: 32px;
color: #b2b2b2;
}
img {
filter: brightness(70%);
}
@@ -111,6 +115,9 @@
img {
filter: brightness(100%);
}
.fa-icons{
color: #fff;
}
}
&:first-child {
border-left: none;
@@ -189,7 +196,6 @@
background-color: @color-bluish-grey;
-webkit-tap-highlight-color: transparent;
&.command {
border: solid 3px @color-bluish-grey;
}
.menu-container {
width: 360px;
@@ -279,9 +285,11 @@
line-height: 21px;
border-bottom: 1px solid #fff;
box-sizing: content-box;
white-space: nowrap;
overflow: hidden;
}
&.active {
border: solid 3px rgba(23, 145, 255, 1);
box-shadow: inset 0px 0px 0px 3px rgba(23, 145, 255, 1);
}
button.star {
background: transparent;
@@ -319,6 +327,7 @@
&.description {
cursor: pointer;
margin-top: 0;
overflow: hidden;
}
&.description:active {
background-color: #4e585e;
+9 -15
View File
@@ -58,14 +58,12 @@
.processes {
display: flex;
flex-flow: row;
span {
font-size: 14px;
padding: 0 5px;
border: 1px solid #fff;
float: left;
display: block;
margin: 0 3px;
}
font-size: 14px;
padding: 0 5px;
border: 1px solid #fff;
float: left;
display: block;
margin: 0 3px;
}
}
}
@@ -175,11 +173,9 @@
color: #fff;
}
.processes {
span {
border: 1px solid @color-warm-grey !important;
color: @color-greyish-brown ;
font-weight: 600;
}
}
}
}
@@ -199,11 +195,9 @@
color: #fff;
}
.processes {
span {
border: 1px solid @color-warm-grey !important;
color: @color-greyish-brown ;
font-weight: 600;
}
border: 1px solid @color-warm-grey !important;
color: @color-greyish-brown ;
font-weight: 600;
}
}
}
+34 -18
View File
@@ -792,8 +792,6 @@ fieldset[disabled] .form-group.is-focused .togglebutton label {
.ribbon-container .app-ribbon .status-content .content .processes {
display: flex;
flex-flow: row;
}
.ribbon-container .app-ribbon .status-content .content .processes span {
font-size: 14px;
padding: 0 5px;
border: 1px solid #fff;
@@ -900,7 +898,7 @@ fieldset[disabled] .form-group.is-focused .togglebutton label {
background-color: #d0021b;
color: #fff;
}
.app-ribbon.alarm.big.opened .processes span {
.app-ribbon.alarm.big.opened .processes {
border: 1px solid #878787 !important;
color: #4b4b4b;
font-weight: 600;
@@ -921,7 +919,7 @@ fieldset[disabled] .form-group.is-focused .togglebutton label {
background-color: #f5a623;
color: #fff;
}
.app-ribbon.warning.opened .processes span {
.app-ribbon.warning.opened .processes {
border: 1px solid #878787 !important;
color: #4b4b4b;
font-weight: 600;
@@ -1146,13 +1144,12 @@ footer .container button.big:before {
top: 40px;
background-color: #fff;
padding: 0 0;
transition: width 200ms ease-in-out, height 200ms ease-in-out, padding 200ms ease-in-out, background-color 200ms ease-in-out;
z-index: 150;
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
box-sizing: border-box;
display: flex;
flex-wrap: nowrap;
overflow: hidden;
transition: width 200ms ease-in-out, height 200ms ease-in-out, padding 200ms ease-in-out, background-color 200ms ease-in-out, box-shadow 0ms 0ms;
}
#alarm-list.expanded,
#service-list.expanded {
@@ -1163,6 +1160,8 @@ footer .container button.big:before {
#service-list.expanded.opened {
padding: 72px 24px 24px 0px;
height: calc(100vh - 120px);
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
transition: width 200ms ease-in-out, height 200ms ease-in-out, padding 200ms ease-in-out, background-color 200ms ease-in-out, box-shadow 20ms 180ms;
}
#alarm-list.alarm,
#service-list.alarm {
@@ -1215,6 +1214,11 @@ footer .container button.big:before {
#service-list .alarm-detail.content.warning {
color: #4b4b4b;
}
#alarm-list .alarm-detail.content.warning .sources span.source,
#service-list .alarm-detail.content.warning .sources span.source {
border: 1px solid #4b4b4b !important;
color: #4b4b4b;
}
#alarm-list .alarm-detail.content h2,
#service-list .alarm-detail.content h2 {
font-size: 18px;
@@ -1233,6 +1237,10 @@ footer .container button.big:before {
#service-list .alarm-detail.content .general-buttons .btn {
font-size: 16px;
}
#alarm-list .alarm-detail.content .sources,
#service-list .alarm-detail.content .sources {
margin-top: 10px;
}
#alarm-list .alarm-detail.content .sources span.source,
#service-list .alarm-detail.content .sources span.source {
font-size: 14px;
@@ -1245,6 +1253,7 @@ footer .container button.big:before {
padding: 0 5px;
line-height: 20px;
margin-bottom: 3px;
margin-right: 5px;
}
#alarm-list .alarm-detail.content .sources:after,
#service-list .alarm-detail.content .sources:after {
@@ -1347,17 +1356,19 @@ footer .container button.big:before {
flex-flow: row;
justify-content: space-between;
}
#alarm-list .alarm-item .content span,
#service-list .alarm-item .content span {
#alarm-list .alarm-item .content .sourcecontainer,
#service-list .alarm-item .content .sourcecontainer {
font-size: 14px;
padding: 0 5px;
float: left;
display: block;
margin: 0 3px;
border: 1px solid #878787 !important;
color: #4b4b4b;
font-weight: 600;
}
#alarm-list .alarm-item .content .sourcecontainer .source,
#service-list .alarm-item .content .sourcecontainer .source {
border: 1px solid #878787 !important;
padding: 0 5px;
margin-right: 3px;
}
#alarm-list .alarm-item button,
#service-list .alarm-item button {
cursor: pointer;
@@ -1558,6 +1569,10 @@ footer .container button.big:before {
padding: 0;
width: 100%;
}
#plc-softkeys-container > div > header button .fa-icons {
font-size: 32px;
color: #b2b2b2;
}
#plc-softkeys-container > div > header button img {
filter: brightness(70%);
}
@@ -1567,6 +1582,9 @@ footer .container button.big:before {
#plc-softkeys-container > div > header button.active img {
filter: brightness(100%);
}
#plc-softkeys-container > div > header button.active .fa-icons {
color: #fff;
}
#plc-softkeys-container > div > header button:first-child {
border-left: none;
}
@@ -1636,9 +1654,6 @@ footer .container button.big:before {
.soft-key.opened .detail section {
height: 42px;
}
.soft-key.command {
border: solid 3px #808e96;
}
.soft-key .menu-container {
width: 360px;
top: 80px;
@@ -1724,9 +1739,11 @@ footer .container button.big:before {
line-height: 21px;
border-bottom: 1px solid #fff;
box-sizing: content-box;
white-space: nowrap;
overflow: hidden;
}
.soft-key.active {
border: solid 3px #1791ff;
box-shadow: inset 0px 0px 0px 3px #1791ff;
}
.soft-key button.star {
background: transparent;
@@ -1764,6 +1781,7 @@ footer .container button.big:before {
.soft-key .detail section.description {
cursor: pointer;
margin-top: 0;
overflow: hidden;
}
.soft-key .detail section.description:active {
background-color: #4e585e;
@@ -2185,7 +2203,6 @@ footer .container button.big:before {
.head-awj section div span {
text-align: center;
color: #4b4b4b;
text-transform: lowercase;
font-size: 14px;
display: flex;
flex-flow: column;
@@ -2372,7 +2389,6 @@ footer .container button.big:before {
.head-std section div span {
text-align: center;
color: #4b4b4b;
text-transform: lowercase;
font-size: 14px;
display: flex;
flex-flow: column;
+23 -19
View File
@@ -18,38 +18,42 @@ declare module signalr_alarms {
process: number,
}
interface plcAlarm extends genericAlarm {
process: Array<number>,
}
interface alarmMessage {
NcAlarms: Array<genericAlarm>,
PlcAlarms: Array<genericAlarm>,
ProcessAlarms: Array<processAlarm>,
ncAlarms: Array<genericAlarm>,
plcAlarms: Array<plcAlarm>,
processAlarms: Array<processAlarm>,
}
interface powerItemValue {
Id: number,
Active: boolean,
Clickable: boolean
id: number,
active: boolean,
clickable: boolean
}
interface prePowerOnMessage {
AirPressure: powerItemValue;
EmergencyButtons: powerItemValue;
PowerOn: powerItemValue;
ProtectionStatus: powerItemValue;
SettingMode: powerItemValue;
StartingKey: powerItemValue;
airPressure: powerItemValue;
emergencyButtons: powerItemValue;
powerOn: powerItemValue;
protectionStatus: powerItemValue;
settingMode: powerItemValue;
startingKey: powerItemValue;
}
interface postPowerOnMessage {
AxisReset: powerItemValue;
WaterjetPump: powerItemValue;
axisReset: powerItemValue;
waterjetPump: powerItemValue;
}
interface powerMessage {
AxisReset: {
IsActive: boolean,
Percentage: number
axisReset: {
isActive: boolean,
percentage: number
}
PostPowerOn: postPowerOnMessage;
PrePowerOn: prePowerOnMessage;
postPowerOn: postPowerOnMessage;
prePowerOn: prePowerOnMessage;
}
}
+4 -4
View File
@@ -1,10 +1,10 @@
declare module signalr_security{
interface securityFunction{
Id: number,
Name: string,
Area: string,
Enabled: boolean
id: number,
name: string,
area: string,
enabled: boolean
}
}
+9 -9
View File
@@ -7,18 +7,18 @@ declare module signalr_process {
}
interface ProcessData {
Id: number;
Type: string;
IsInAlarm: boolean;
PartProgramName: string;
Status: string;
Visible: boolean;
Reps: number;
id: number;
type: string;
isInAlarm: boolean;
partProgramName: string;
status: string;
risible: boolean;
reps: number;
}
interface AxisData{
Id:number;
Name: string;
id:number;
name: string;
}
@@ -1,18 +1,19 @@
<template>
<div id="back-view">
<header>
<span>Siemens HMI</span>
<span v-if="isSiemens">Siemens HMI</span>
<span v-if="isFanuc">Fanuc HMI</span>
<span v-if="isOsai">Osai HMI</span>
<span v-if="isDemo">Demo HMI</span>
<button class="close" @click="toggleMainView()">&times;</button>
</header>
<div class="hmi-container">
<process-selection></process-selection>
<div id="nc-hmi">
<img id="nc-hmi-img" src="assets/images/Siemens_Placeholder.jpg" v-if="isSiemens">
<img id="nc-hmi-img-fanuc" src="assets/images/Fanuc_Placeholder.jpg" v-if="isFanuc">
<img id="nc-hmi-img" src="assets/images/Osai_Placeholder.jpg" v-if="isOsai">
<img id="nc-hmi-img" src="assets/images/Demo_Placeholder.jpg" v-if="isDemo">
</div >
</div>
<div class="keys-area">
@@ -63,17 +64,17 @@ export default {
);
},
showJog: function() {
let ref = this.$store.getters.getNcSoftKeyStatus(5);
let jog = this.$store.getters.getNcSoftKeyStatus(6);
let joginc = this.$store.getters.getNcSoftKeyStatus(7);
return ((jog && jog.Value) || (joginc && joginc.Value));
return ((ref && ref.value) || (jog && jog.value) || (joginc && joginc.value));
return false;
},
showAuto: function(){
let auto = this.$store.getters.getNcSoftKeyStatus(1);
let mdi = this.$store.getters.getNcSoftKeyStatus(2);
let edit = this.$store.getters.getNcSoftKeyStatus(3);
return ((auto && auto.Value) || (mdi && mdi.Value) || (edit && edit.Value));
return ((auto && auto.value) || (mdi && mdi.value) || (edit && edit.value));
return false;
}
},
+8 -8
View File
@@ -5,28 +5,28 @@ import { store, LocalizationModel, AppModel } from "src/store";
Vue.filter("checkSecurityDisabled", function (key: string): boolean {
if (!store) return true;
let securityFunction = (store.state as any).machineStatus.functions.find(i => i.Name == key) as signalr_security.securityFunction;
let securityFunction = (store.state as any).machineStatus.functions.find(i => i.name == key) as signalr_security.securityFunction;
if (!securityFunction) {
console.debug("Security function not found", key);
return true;
}
return !securityFunction.Enabled;
return !securityFunction.enabled;
});
Vue.filter("checkSecurityEnabled", function (key: string): boolean {
if (!store) return false;
let securityFunction = (store.state as any).machineStatus.functions.find(i => i.Name == key) as signalr_security.securityFunction;
let securityFunction = (store.state as any).machineStatus.functions.find(i => i.name == key) as signalr_security.securityFunction;
if (!securityFunction) {
console.debug("Security function not found", key);
return false;
}
return securityFunction.Enabled;
return securityFunction.enabled;
});
@@ -40,26 +40,26 @@ Vue.mixin({
checkSecurityEnabled(key:string): boolean {
if (!store) return false;
let securityFunction = (store.state as any).machineStatus.functions.find(i => i.Name == key) as signalr_security.securityFunction;
let securityFunction = (store.state as any).machineStatus.functions.find(i => i.name == key) as signalr_security.securityFunction;
if (!securityFunction) {
console.debug("Security function not found", key);
return false;
}
return securityFunction.Enabled;
return securityFunction.enabled;
},
checkSecurityDisabled(key: string): boolean {
if (!store) return true;
let securityFunction = (store.state as any).machineStatus.functions.find(i => i.Name == key) as signalr_security.securityFunction;
let securityFunction = (store.state as any).machineStatus.functions.find(i => i.name == key) as signalr_security.securityFunction;
if (!securityFunction) {
console.debug("Security function not found", key);
return true;
}
return !securityFunction.Enabled;
return !securityFunction.enabled;
}
}
@@ -1,9 +1,13 @@
<template>
<div class="alarm-detail content scrollable" :class="alarm.type">
<h2 v-if="alarm.title">{{alarm.title}}</h2>
<h2 v-if="!alarm.title">{{'alarm_'+ alarm.id | localize("")}}</h2>
<h2 v-if="!alarm.title">{{'alarm_'+ alarm.id | localize('alarm_'+ alarm.id)}}</h2>
<div class="sources" v-if="alarm.source">
<span class="source">{{alarm.process}} {{alarm.source}}</span>
<span class="source">{{alarm.source}}</span>
<span class="source" v-if="alarm.source === 'PLC' && alarm.process.length>0">
<span v-for="p in alarm.process" :key="p" >{{ p }} </span>
</span>
<span class="source" v-if="alarm.source !== 'PLC' && alarm.process">{{ alarm.process }}</span>
</div>
<time>{{alarm.date | date("DD/MM/YYYY - hh:mm")}}</time>
<span class="summary">{{alarm.description}}</span>
+11 -4
View File
@@ -1,12 +1,19 @@
<template>
<div class="alarm-item" :class="type">
<div class="content">
<h2 v-if="title">{{title}}</h2>
<h2 v-if="!title">{{'alarm_'+ alarmid | localize("")}}</h2>
<h2 v-if="title.length>0">{{title}}</h2>
<h2 v-if="!title || title.length==0">{{'alarm_'+ alarmid | localize('alarm_'+ alarmid)}}</h2>
<div class="summary">
<span v-if="source">{{source}} {{processid}}</span>
<time>{{dateprefix}} {{date | date("DD/MM/YYYY HH:mm")}}</time>
</div>
<div class="summary" v-if="source">
<span class="sourcecontainer">
<span class="source">{{source}}</span>
<span class="source" v-if="source === 'PLC' && processid.length>0">
<span v-for="p in processid" :key="p" >{{ p }} </span>
</span>
<span class="source" v-if="source !== 'PLC' && processid">{{ processid }}</span>
</span>
</div>
</div>
<button class="btn" @click="showDetail">{{'alarm_item_btn_show' | localize('Vedi')}}</button>
+2 -2
View File
@@ -90,8 +90,8 @@ export default class AppHeader extends Vue {
}
public manageClick(btn: buttonStatus) {
if (btn.Clickable)
Hub.Current.sendPowerCommand(btn.Id);
if (btn.clickable)
Hub.Current.sendPowerCommand(btn.id);
}
}
+27 -22
View File
@@ -9,9 +9,14 @@
<i class="fa fa-exclamation" slot="icon" v-if="ribbonStatus >1"></i>
<div slot="content" class="content" v-if="ribbonStatus>1">
<strong v-if="!showDetails">{{alarmTitle | localize(alarmTitle,alarmCount)}}</strong>
<strong v-if="showDetails">{{alarms[0].title}}</strong>
<div class="processes" v-if="showDetails">
<span>{{alarms[0].process}} {{alarms[0].source}}</span>
<strong v-if="showDetails && alarms[0].title">{{alarms[0].title}}</strong>
<strong v-if="showDetails && !alarms[0].title">{{'alarm_'+ alarms[0].id | localize('alarm_'+ alarms[0].id)}}</strong>
<div v-if="showDetails">
<span class="processes">{{alarms[0].source}}</span>
<span class="processes" v-if="alarms[0].source === 'PLC' && alarms[0].process.length>0">
<span v-for="p in alarms[0].process" :key="p" >{{ p }} </span>
</span>
<span class="processes" v-if="alarms[0].source !== 'PLC' && alarms[0].process">{{ alarms[0].process }}</span>
</div>
</div>
<div slot="service" class="content" v-if="serviceRequired">
@@ -23,37 +28,37 @@
<button :class="{ red: mainStatus, blue: !mainStatus }">
<img class="h-24" src="assets/icons/png/switch-icon@2x.png">
</button>
<button class="power-on" :disabled="!state.powerOnAlarm.Clickable || checkSecurityDisabled('startupIcons')"
v-if="state.powerOnAlarm && state.powerOnAlarm.Active" @click="manageClick(state.powerOnAlarm)"><img src="assets/icons/png/control-icon-error@2x.png"></button>
<button class="power-on" :disabled="!state.powerOnAlarm.clickable || checkSecurityDisabled('startupIcons')"
v-if="state.powerOnAlarm && state.powerOnAlarm.active" @click="manageClick(state.powerOnAlarm)"><img src="assets/icons/png/control-icon-error@2x.png"></button>
<button class="airflow" :disabled="!state.airPressureAlarm.Clickable || checkSecurityDisabled('startupIcons')"
v-if="state.airPressureAlarm && state.airPressureAlarm.Active" @click="manageClick(state.airPressureAlarm)"><img src="assets/icons/png/air-icon@2x.png"></button>
<button class="airflow" :disabled="!state.airPressureAlarm.clickable || checkSecurityDisabled('startupIcons')"
v-if="state.airPressureAlarm && state.airPressureAlarm.active" @click="manageClick(state.airPressureAlarm)"><img src="assets/icons/png/air-icon@2x.png"></button>
<button class="protections" :disabled="!state.protectionsAlarm.Clickable || checkSecurityDisabled('startupIcons')"
v-if="state.protectionsAlarm && state.protectionsAlarm.Active" @click="manageClick(state.protectionsAlarm)"><img src="assets/icons/png/lock-icon-error@2x.png"></button>
<button class="protections" :disabled="!state.protectionsAlarm.clickable || checkSecurityDisabled('startupIcons')"
v-if="state.protectionsAlarm && state.protectionsAlarm.active" @click="manageClick(state.protectionsAlarm)"><img src="assets/icons/png/lock-icon-error@2x.png"></button>
<button class="emergency" :disabled="!state.emergencyAlarm.Clickable || checkSecurityDisabled('startupIcons')"
v-if="state.emergencyAlarm && state.emergencyAlarm.Active" @click="manageClick(state.emergencyAlarm)"><img src="assets/icons/png/refresh-icon-error@2x.png"></button>
<button class="emergency" :disabled="!state.emergencyAlarm.clickable || checkSecurityDisabled('startupIcons')"
v-if="state.emergencyAlarm && state.emergencyAlarm.active" @click="manageClick(state.emergencyAlarm)"><img src="assets/icons/png/refresh-icon-error@2x.png"></button>
<button class="settings-mode" :disabled="!state.settingsModeAlarm.Clickable || checkSecurityDisabled('startupIcons')"
v-if="state.settingsModeAlarm && state.settingsModeAlarm.Active" @click="manageClick(state.settingsModeAlarm)"><img src="assets/icons/png/no-settings@2x.png"></button>
<button class="settings-mode" :disabled="!state.settingsModeAlarm.clickable || checkSecurityDisabled('startupIcons')"
v-if="state.settingsModeAlarm && state.settingsModeAlarm.active" @click="manageClick(state.settingsModeAlarm)"><img src="assets/icons/png/no-settings@2x.png"></button>
<button class="key" :disabled="!state.keyReadyAlarm.Clickable || checkSecurityDisabled('startupIcons')"
v-if="state.keyReadyAlarm && state.keyReadyAlarm.Active" @click="manageClick(state.keyReadyAlarm)"><img src="assets/icons/png/key-icon-error@2x.png"></button>
<button class="key" :disabled="!state.keyReadyAlarm.clickable || checkSecurityDisabled('startupIcons')"
v-if="state.keyReadyAlarm && state.keyReadyAlarm.active" @click="manageClick(state.keyReadyAlarm)"><img src="assets/icons/png/key-icon-error@2x.png"></button>
<button :class="{ red: powerOnStatus, blue: !powerOnStatus }">
<img src="assets/icons/png/ok-white.png" class="h-20" v-if="!powerOnStatus">
<img src="assets/icons/png/not-ok-white.png" class="h-20" v-if="powerOnStatus">
</button>
<button class="key" :disabled="!state.resetAxesAlarm.Clickable || checkSecurityDisabled('startupIcons')"
v-if="state.resetAxesAlarm && state.resetAxesAlarm.Active"
<button class="key" :disabled="!state.resetAxesAlarm.clickable || checkSecurityDisabled('startupIcons')"
v-if="state.resetAxesAlarm && state.resetAxesAlarm.active"
@click="manageClick(state.resetAxesAlarm)"><img src="assets/icons/png/taratura-icon-error@2x.png"></button>
<button class="key" :disabled="!state.waterJet1Alarm.Clickable || checkSecurityDisabled('startupIcons')" v-if="state.waterJet1Alarm && state.waterJet1Alarm.Active" @click="manageClick(state.waterJet1Alarm)"></button>
<button class="key" :disabled="!state.waterJet2Alarm.Clickable || checkSecurityDisabled('startupIcons')" v-if="state.waterJet2Alarm && state.waterJet2Alarm.Active" @click="manageClick(state.waterJet2Alarm)"></button>
<button class="key" :disabled="!state.waterJet1Alarm.clickable || checkSecurityDisabled('startupIcons')" v-if="state.waterJet1Alarm && state.waterJet1Alarm.active" @click="manageClick(state.waterJet1Alarm)"></button>
<button class="key" :disabled="!state.waterJet2Alarm.clickable || checkSecurityDisabled('startupIcons')" v-if="state.waterJet2Alarm && state.waterJet2Alarm.active" @click="manageClick(state.waterJet2Alarm)"></button>
<div class="process-container">
<process-info v-for="p in processes" :key="p.id" v-if="p.Visible && !mainStatus"
:counter="p.Reps" :status="p.Status" :id="p.Id">
<strong>{{p.PartProgramName}}</strong>
<process-info v-for="p in processes" :key="p.id" v-if="p.visible && !mainStatus"
:counter="p.reps" :status="p.status" :id="p.id">
<strong>{{p.partProgramName}}</strong>
</process-info>
</div>
@@ -40,7 +40,7 @@ export default {
Factory.Get(MessageService).publishToChannel("HMI-hide-alarms",300);
},
status:function() {
if(this.$store.state.alarms.opened || this.$store.state.alarms.serviceOpened)
if((this.expanded && this.$store.state.alarms.opened) || (this.hasService && this.$store.state.alarms.serviceOpened))
Factory.Get(MessageService).publishToChannel("HMI-show-alarms");
else
Factory.Get(MessageService).publishToChannel("HMI-hide-alarms",300);
@@ -77,7 +77,6 @@ export default {
this.serviceExpanded = false;
alarmsModelActions.toggleServiceOpened(this.$store, false);
if(this.$store.state.alarms.opened || this.$store.state.alarms.serviceOpened)
Factory.Get(MessageService).publishToChannel("HMI-show-alarms");
else
+2 -2
View File
@@ -54,10 +54,10 @@
</aside>
<aside v-if="type == 'WJ' ">
<div class="tool">
<div class="tool-box">
</div>
<div class="load">
<div class="load-box">
</div>
</aside>
+12 -12
View File
@@ -1,20 +1,20 @@
<template>
<div class="heads-container scrollable_auto" :class="{'heads-container-lt4':(heads.length <=4)}">
<head-std :title="h.name" v-for="h in heads" :key="h.id"
:rpm="getHeadsProperty(h.id).ActualSpeed"
:tool="getHeadsProperty(h.id).MountedTool"
:load="getHeadsProperty(h.id).Load"
:process="getHeadsProperty(h.id).Process"
:type="getHeadsProperty(h.id).Type"
:rpm="getHeadsProperty(h.id).actualSpeed"
:tool="getHeadsProperty(h.id).mountedTool"
:load="getHeadsProperty(h.id).load"
:process="getHeadsProperty(h.id).process"
:type="getHeadsProperty(h.id).type"
:inAlarm="getHeadsProperty(h.id).inAlarm"
:inWarning="getHeadsProperty(h.id).inWarning"
:percentage="getHeadsProperty(h.id).Override"
:abrasive="getHeadsProperty(h.id).Abrasive"
:vacuum="getHeadsProperty(h.id).Vacum"
:overrideDisabled="!getHeadsProperty(h.id).OverrideEditable"
:pressure="getHeadsProperty(h.id).ActualPressure"
:isSelected="getHeadsProperty(h.id).IsSelected"
:isActive="getHeadsProperty(h.id).IsActive"
:percentage="getHeadsProperty(h.id).override"
:abrasive="getHeadsProperty(h.id).abrasive"
:vacuum="getHeadsProperty(h.id).vacum"
:overrideDisabled="!getHeadsProperty(h.id).overrideEditable"
:pressure="getHeadsProperty(h.id).actualPressure"
:isSelected="getHeadsProperty(h.id).isSelected"
:isActive="getHeadsProperty(h.id).isActive"
@overridePlus="overridePlus(h.id)" @overrideMinus="overrideMinus(h.id)"
></head-std>
<div class="head-place-holder" v-if="heads.length <4"></div>
+38 -33
View File
@@ -1,42 +1,42 @@
<template>
<div id="nc-softkeys-container">
<div v-if="machineInfo.isFanuc ">
<button @click="ncClick(1)" :disabled="!isKeyActive(1)" :class="{active:isKeySelected(1) , readonly:isReadOnly(1)}" class="soft icon"><img src="assets/icons/under-hood-png/automatic-blue@2x.png">{{'nc_softkey_auto' |localize("Auto") }}</button>
<button @click="ncClick(2)" :disabled="!isKeyActive(2)" :class="{active:isKeySelected(2) , readonly:isReadOnly(2)}" class="soft icon"><img src="assets/icons/under-hood-png/edit-blue@2x.png">{{'nc_softkey_edit' |localize("Edit") }}</button>
<button @click="ncClick(3)" :disabled="!isKeyActive(3)" :class="{active:isKeySelected(3) , readonly:isReadOnly(3)}" class="soft icon"><img src="assets/icons/under-hood-png/MDI-blue@2x.png">{{'nc_softkey_mdi' |localize("MDI") }}</button>
<button @click="ncClick(4)" :disabled="!isKeyActive(4)" :class="{active:isKeySelected(4) , readonly:isReadOnly(4)}" class="soft icon"><img src="assets/icons/under-hood-png/dnc-blue@2x.png">{{'nc_softkey_dnc' |localize("DNC") }}</button>
<button @click="ncClick(9)" :disabled="!isKeyActive(9)" :class="{active:isKeySelected(9) , readonly:isReadOnly(9)}" class="soft icon"><img src="assets/icons/under-hood-png/teach-blue@2x.png">{{'nc_softkey_teach' |localize("Teach") }}</button>
<button @click="ncClick(8)" :disabled="!isKeyActive(8)" :class="{active:isKeySelected(8) , readonly:isReadOnly(8)}" class="soft icon"><img src="assets/icons/under-hood-png/restart-blue@2x.png">{{'nc_softkey_restart' |localize("Restart") }}</button>
<button @click="ncClick(5)" :disabled="!isKeyActive(5)" :class="{active:isKeySelected(5) , readonly:isReadOnly(5)}" class="soft icon"><img src="assets/icons/under-hood-png/ref-blue@2x.png">{{'nc_softkey_ref' |localize("Ref") }}</button>
<button @click="ncClick(6)" :disabled="!isKeyActive(6)" :class="{active:isKeySelected(6) , readonly:isReadOnly(6)}" class="soft icon"><img src="assets/icons/under-hood-png/jog-blue@2x.png">{{'nc_softkey_jog' |localize("Jog") }}</button>
<button @click="ncClick(7)" :disabled="!isKeyActive(7)" :class="{active:isKeySelected(7) , readonly:isReadOnly(7)}" class="soft icon"><img src="assets/icons/under-hood-png/jog-inc-blue@2x.png">{{'nc_softkey_joginc' |localize("Jog Inc") }}</button>
<button @click="ncClick(13)" :disabled="!isKeyActive(13)" :class="{active:isKeySelected(13) , readonly:isReadOnly(13)}" class="soft icon"><img src="assets/icons/under-hood-png/reset-blue@2x.png">{{'nc_softkey_reset' |localize("Reset") }}</button>
<button @click="ncClick(10)" :disabled="!isKeyActive(10)" :class="{active:isKeySelected(10) , readonly:isReadOnly(10)}" class="soft icon"><img src="assets/icons/under-hood-png/retract-blue@2x.png">{{'nc_softkey_retract' |localize("Retract") }}</button>
<button @click="ncClick(12)" :disabled="!isKeyActive(12)" :class="{active:isKeySelected(12) , readonly:isReadOnly(12)}" class="soft icon"><img src="assets/icons/under-hood-png/handle-blue@2x.png">{{'nc_softkey_handle' |localize("Handle") }}</button>
<div v-if="machineInfo.isFanuc">
<button @click="ncClick(1)" :disabled="!isKeyActive(1)" :class="{active:isKeySelected(1) , readonly:isReadOnly(1)}" class="soft icon"><img src="assets/icons/under-hood-png/automatic-blue@2x.png">{{name(1)}}</button>
<button @click="ncClick(2)" :disabled="!isKeyActive(2)" :class="{active:isKeySelected(2) , readonly:isReadOnly(2)}" class="soft icon"><img src="assets/icons/under-hood-png/edit-blue@2x.png">{{name(2)}}</button>
<button @click="ncClick(3)" :disabled="!isKeyActive(3)" :class="{active:isKeySelected(3) , readonly:isReadOnly(3)}" class="soft icon"><img src="assets/icons/under-hood-png/MDI-blue@2x.png">{{name(3)}}</button>
<button @click="ncClick(4)" :disabled="!isKeyActive(4)" :class="{active:isKeySelected(4) , readonly:isReadOnly(4)}" class="soft icon"><img src="assets/icons/under-hood-png/dnc.png">{{name(4)}}</button>
<button @click="ncClick(9)" :disabled="!isKeyActive(9)" :class="{active:isKeySelected(9) , readonly:isReadOnly(9)}" class="soft icon"><img src="assets/icons/under-hood-png/teach-blue@2x.png">{{name(9)}}</button>
<button @click="ncClick(8)" :disabled="!isKeyActive(8)" :class="{active:isKeySelected(8) , readonly:isReadOnly(8)}" class="soft icon"><img src="assets/icons/under-hood-png/restart-blue@2x.png">{{name(8)}}</button>
<button @click="ncClick(5)" :disabled="!isKeyActive(5)" :class="{active:isKeySelected(5) , readonly:isReadOnly(5)}" class="soft icon"><img src="assets/icons/under-hood-png/ref-blue@2x.png">{{name(5)}}</button>
<button @click="ncClick(6)" :disabled="!isKeyActive(6)" :class="{active:isKeySelected(6) , readonly:isReadOnly(6)}" class="soft icon"><img src="assets/icons/under-hood-png/jog-blue@2x.png">{{name(6)}}</button>
<button @click="ncClick(7)" :disabled="!isKeyActive(7)" :class="{active:isKeySelected(7) , readonly:isReadOnly(7)}" class="soft icon"><img src="assets/icons/under-hood-png/jog-inc-blue@2x.png">{{name(7)}}</button>
<button @click="ncClick(13)" :disabled="!isKeyActive(13)" :class="{active:isKeySelected(13) , readonly:isReadOnly(13)}" class="soft icon"><img src="assets/icons/under-hood-png/reset-blue@2x.png">{{name(13)}}</button>
<button @click="ncClick(10)" :disabled="!isKeyActive(10)" :class="{active:isKeySelected(10) , readonly:isReadOnly(10)}" class="soft icon"><img src="assets/icons/under-hood-png/repos2.png">{{name(10)}}</button>
<button @click="ncClick(12)" :disabled="!isKeyActive(12)" :class="{active:isKeySelected(12) , readonly:isReadOnly(12)}" class="soft icon"><img src="assets/icons/under-hood-png/handle2.png">{{name(12)}}</button>
</div>
<div v-if="machineInfo.isSiemens">
<button @click="ncClick(1)" :disabled="!isKeyActive(1)" :class="{active:isKeySelected(1) , readonly:isReadOnly(1)}" class="soft icon"><img src="assets/icons/under-hood-png/automatic-blue@2x.png">{{'nc_softkey_auto' |localize("Auto") }}</button>
<button @click="ncClick(3)" :disabled="!isKeyActive(3)" :class="{active:isKeySelected(3) , readonly:isReadOnly(3)}" class="soft icon"><img src="assets/icons/under-hood-png/MDI-blue@2x.png">{{'nc_softkey_mdi' |localize("MDI") }}</button>
<div v-if="machineInfo.isSiemens ">
<button @click="ncClick(1)" :disabled="!isKeyActive(1)" :class="{active:isKeySelected(1) , readonly:isReadOnly(1)}" class="soft icon"><img src="assets/icons/under-hood-png/automatic-blue@2x.png">{{name(1)}}</button>
<button @click="ncClick(3)" :disabled="!isKeyActive(3)" :class="{active:isKeySelected(3) , readonly:isReadOnly(3)}" class="soft icon"><img src="assets/icons/under-hood-png/MDI-blue@2x.png">{{name(3)}}</button>
<div class="empty-space"></div>
<button @click="ncClick(11)" :disabled="!isKeyActive(11)" :class="{active:isKeySelected(11) , readonly:isReadOnly(11)}" class="soft icon"><img src="assets/icons/under-hood-png/wcsmcs-blue@2x.png">{{'nc_softkey_wcsmcs' |localize("WcsMcs") }}</button>
<button @click="ncClick(9)" :disabled="!isKeyActive(9)" :class="{active:isKeySelected(9) , readonly:isReadOnly(9)}" class="soft icon"><img src="assets/icons/under-hood-png/teach-blue@2x.png">{{'nc_softkey_teach' |localize("Teach") }}</button>
<button @click="ncClick(11)" :disabled="!isKeyActive(11)" :class="{active:isKeySelected(11) , readonly:isReadOnly(11)}" class="soft icon"><img src="assets/icons/under-hood-png/wcs2.png">{{name(11)}}</button>
<button @click="ncClick(9)" :disabled="!isKeyActive(9)" :class="{active:isKeySelected(9) , readonly:isReadOnly(9)}" class="soft icon"><img src="assets/icons/under-hood-png/teach-blue@2x.png">{{name(9)}}</button>
<div class="empty-space"></div>
<button @click="ncClick(5)" :disabled="!isKeyActive(5)" :class="{active:isKeySelected(5) , readonly:isReadOnly(5)}" class="soft icon"><img src="assets/icons/under-hood-png/ref-blue@2x.png">{{'nc_softkey_ref' |localize("Ref") }}</button>
<button @click="ncClick(6)" :disabled="!isKeyActive(6)" :class="{active:isKeySelected(6) , readonly:isReadOnly(6)}" class="soft icon"><img src="assets/icons/under-hood-png/jog-blue@2x.png">{{'nc_softkey_jog' |localize("Jog") }}</button>
<button @click="ncClick(7)" :disabled="!isKeyActive(7)" :class="{active:isKeySelected(7) , readonly:isReadOnly(7)}" class="soft icon"><img src="assets/icons/under-hood-png/jog-inc-blue@2x.png">{{'nc_softkey_joginc' |localize("Jog Inc") }}</button>
<button @click="ncClick(13)" :disabled="!isKeyActive(13)" :class="{active:isKeySelected(13) , readonly:isReadOnly(13)}" class="soft icon"><img src="assets/icons/under-hood-png/reset-blue@2x.png">{{'nc_softkey_reset' |localize("Reset") }}</button>
<button @click="ncClick(10)" :disabled="!isKeyActive(10)" :class="{active:isKeySelected(10) , readonly:isReadOnly(10)}" class="soft icon"><img src="assets/icons/under-hood-png/repos-blue@2x.png">{{'nc_softkey_repos' |localize("Repos") }}</button>
<button @click="ncClick(12)" :disabled="!isKeyActive(12)" :class="{active:isKeySelected(12) , readonly:isReadOnly(12)}" class="soft icon"><img src="assets/icons/under-hood-png/handle-blue@2x.png">{{'nc_softkey_handle' |localize("Handle") }}</button>
<button @click="ncClick(5)" :disabled="!isKeyActive(5)" :class="{active:isKeySelected(5) , readonly:isReadOnly(5)}" class="soft icon"><img src="assets/icons/under-hood-png/ref-blue@2x.png">{{name(5)}}</button>
<button @click="ncClick(6)" :disabled="!isKeyActive(6)" :class="{active:isKeySelected(6) , readonly:isReadOnly(6)}" class="soft icon"><img src="assets/icons/under-hood-png/jog-blue@2x.png">{{name(6)}}</button>
<button @click="ncClick(7)" :disabled="!isKeyActive(7)" :class="{active:isKeySelected(7) , readonly:isReadOnly(7)}" class="soft icon"><img src="assets/icons/under-hood-png/jog-inc-blue@2x.png">{{name(7)}}</button>
<button @click="ncClick(13)" :disabled="!isKeyActive(13)" :class="{active:isKeySelected(13) , readonly:isReadOnly(13)}" class="soft icon"><img src="assets/icons/under-hood-png/reset-blue@2x.png">{{name(13)}}</button>
<button @click="ncClick(10)" :disabled="!isKeyActive(10)" :class="{active:isKeySelected(10) , readonly:isReadOnly(10)}" class="soft icon"><img src="assets/icons/under-hood-png/repos2.png">{{name(10)}}</button>
<button @click="ncClick(12)" :disabled="!isKeyActive(12)" :class="{active:isKeySelected(12) , readonly:isReadOnly(12)}" class="soft icon"><img src="assets/icons/under-hood-png/handle2.png">{{name(12)}}</button>
</div>
<div v-if="machineInfo.isOsai || isDemo" >
<button @click="ncClick(1)" :disabled="!isKeyActive(1)" :class="{active:isKeySelected(1) , readonly:isReadOnly(1)}" class="soft icon"><img src="assets/icons/under-hood-png/automatic-blue@2x.png">{{'nc_softkey_auto' |localize("Auto") }}</button>
<button @click="ncClick(3)" :disabled="!isKeyActive(3)" :class="{active:isKeySelected(3) , readonly:isReadOnly(3)}" class="soft icon"><img src="assets/icons/under-hood-png/MDI-blue@2x.png">{{'nc_softkey_mdi' |localize("MDI") }}</button>
<button @click="ncClick(1)" :disabled="!isKeyActive(1)" :class="{active:isKeySelected(1) , readonly:isReadOnly(1)}" class="soft icon"><img src="assets/icons/under-hood-png/automatic-blue@2x.png">{{name(1)}}</button>
<button @click="ncClick(3)" :disabled="!isKeyActive(3)" :class="{active:isKeySelected(3) , readonly:isReadOnly(3)}" class="soft icon"><img src="assets/icons/under-hood-png/MDI-blue@2x.png">{{name(3)}}</button>
<div class="empty-space"></div>
<button @click="ncClick(5)" :disabled="!isKeyActive(5)" :class="{active:isKeySelected(5) , readonly:isReadOnly(1)}" class="soft icon"><img src="assets/icons/under-hood-png/ref-blue@2x.png">{{'nc_softkey_ref' |localize("Ref") }}</button>
<button @click="ncClick(6)" :disabled="!isKeyActive(6)" :class="{active:isKeySelected(6) , readonly:isReadOnly(6)}" class="soft icon"><img src="assets/icons/under-hood-png/jog-blue@2x.png">{{'nc_softkey_jog' |localize("Jog") }}</button>
<button @click="ncClick(7)" :disabled="!isKeyActive(7)" :class="{active:isKeySelected(7) , readonly:isReadOnly(7)}" class="soft icon"><img src="assets/icons/under-hood-png/jog-inc-blue@2x.png">{{'nc_softkey_joginc' |localize("Jog Inc") }}</button>
<button @click="ncClick(13)" :disabled="!isKeyActive(13)" :class="{active:isKeySelected(13) , readonly:isReadOnly(13)}" class="soft icon"><img src="assets/icons/under-hood-png/reset-blue@2x.png">{{'nc_softkey_reset' |localize("Reset") }}</button>
<button @click="ncClick(10)" :disabled="!isKeyActive(10)" :class="{active:isKeySelected(10) , readonly:isReadOnly(10)}" class="soft icon"><img src="assets/icons/under-hood-png/retrpof-blue@2x.png">{{'nc_softkey_retrpof' |localize("Retrpof") }}</button>
<button @click="ncClick(5)" :disabled="!isKeyActive(5)" :class="{active:isKeySelected(5) , readonly:isReadOnly(1)}" class="soft icon"><img src="assets/icons/under-hood-png/ref-blue@2x.png">{{name(1)}}</button>
<button @click="ncClick(6)" :disabled="!isKeyActive(6)" :class="{active:isKeySelected(6) , readonly:isReadOnly(6)}" class="soft icon"><img src="assets/icons/under-hood-png/jog-blue@2x.png">{{name(6)}}</button>
<button @click="ncClick(7)" :disabled="!isKeyActive(7)" :class="{active:isKeySelected(7) , readonly:isReadOnly(7)}" class="soft icon"><img src="assets/icons/under-hood-png/jog-inc-blue@2x.png">{{name(7)}}</button>
<button @click="ncClick(13)" :disabled="!isKeyActive(13)" :class="{active:isKeySelected(13) , readonly:isReadOnly(13)}" class="soft icon"><img src="assets/icons/under-hood-png/reset-blue@2x.png">{{name(13)}}</button>
<button @click="ncClick(10)" :disabled="!isKeyActive(10)" :class="{active:isKeySelected(10) , readonly:isReadOnly(10)}" class="soft icon"><img src="assets/icons/under-hood-png/repos2.png">{{name(10)}}</button>
<div class="empty-space"></div>
<div class="empty-space"></div>
<div class="empty-space"></div>
@@ -73,13 +73,18 @@ export default {
if(this.checkSecurityDisabled('ncSoftkeys')) return false;
let r = this.$store.getters.getNcSoftKeyStatus(id);
if (r) return r.Active;
if (r) return r.active;
return false;
},
isKeySelected(id) {
let r = this.$store.getters.getNcSoftKeyStatus(id);
if (r) return r.Value;
if (r) return r.value;
return false;
},
name(id){
let r = this.$store.getters.getNcSoftKeyInfo(id);
if(r) return r.visualizedName;
return null;
}
}
};
+2 -2
View File
@@ -28,7 +28,7 @@ export default class softKeys extends Vue {
public getSoftKeyStatus(id: number): boolean {
var sk = this.$store.getters.getSoftKeyStatus(id);
if (sk)
return sk.Value;
return sk.value;
return false;
}
@@ -43,7 +43,7 @@ export default class softKeys extends Vue {
public getSoftKeyActive(id: number): boolean {
var sk = this.$store.getters.getSoftKeyStatus(id);
if (sk)
return sk.Active;
return sk.active;
return false;
}
+7 -2
View File
@@ -8,9 +8,14 @@
<button v-if="isSectionVisible(4)" :class="{active:selectedSection==4}" @click="selectSection(4)"><span class="number">4.</span><img src="assets/icons/under-hood-png/cat-4.png"></button>
<button v-if="isSectionVisible(5)" :class="{active:selectedSection==5}" @click="selectSection(5)"><span class="number">5.</span><img src="assets/icons/under-hood-png/cat-5.png"></button>
<button v-if="isSectionVisible(6)" :class="{active:selectedSection==6}" @click="selectSection(6)"><span class="number">6.</span><img src="assets/icons/under-hood-png/cat-6.png"></button>
<button v-if="isSectionVisible(7)" :class="{active:selectedSection==7}" @click="selectSection(7)"><span class="number">7.</span></button>
<button v-if="isSectionVisible(7)" :class="{active:selectedSection==7}" @click="selectSection(7)"><span class="number">7.</span>
<div class="fa-icons">
<i class="fa fa-arrow-up"></i>
<i class="fa fa-arrow-down"></i>
</div>
</button>
</header>
<div class="title" >{{'maint_' + selectedSection | localize('maint_' + selectedSection) }}</div>
<div class="title" >{{'sfk_category_' + selectedSection | localize('sfk_category_' + selectedSection) }}</div>
<section class="scrollable" ref="scrollable">
<div v-for="(b, index) in sectionButtons(selectedSection)" :key="b.id">
<group-soft-key
@@ -25,12 +25,12 @@ export default {
},
isKeyActive(id) {
let r = this.$store.getters.getNcSoftKeyStatus(id);
if (r) return r.Active;
if (r) return r.active;
return false;
},
isKeySelected(id) {
let r = this.$store.getters.getNcSoftKeyStatus(id);
if (r) return r.Value;
if (r) return r.value;
return false;
},
},
@@ -13,10 +13,10 @@
<div class="axes-menu-container" v-if="showAxesMenu">
<div class="menu">
<button @click="setAxes(a.Id)"
<button @click="setAxes(a.id)"
v-for="a in axes"
:key="a.Id"
:class="{active: a.Id == selectedAxisId}">{{a.Name}}</button>
:key="a.id"
:class="{active: a.id == selectedAxisId}">{{a.name}}</button>
</div>
</div>
@@ -81,12 +81,12 @@ export default {
},
isKeyActive(id) {
let r = this.$store.getters.getNcSoftKeyStatus(id);
if (r) return r.Active;
if (r) return r.active;
return false;
},
isKeySelected(id) {
let r = this.$store.getters.getNcSoftKeyStatus(id);
if (r) return r.Value;
if (r) return r.value;
return false;
},
toggleAxes() {
@@ -94,8 +94,6 @@ export default {
this.showAxesMenu = !this.showAxesMenu;
},
toggleIncr() {
console.log(this.$refs);
this.showAxesMenu = false;
this.showIncrMenu = !this.showIncrMenu;
},
@@ -103,7 +101,7 @@ export default {
let id = this.$store.state.process.selectedAxis;
for (const k in this.$store.state.process.axes) {
let a = this.$store.state.process.axes[k];
if (a.Id == id) return a.Name;
if (a.id == id) return a.name;
}
return null;
}
@@ -1,8 +1,8 @@
<template>
<div class="process-selection" v-if="processes.length > 1 && checkSecurityEnabled('processCmd')">
<div class="process" v-for="p in processes" :key="p.Id" :class="{selected: p.Id == selectedProcess}" @click="selectProcess(p.Id)">
<span>{{p.Id}}</span>
<small v-if="p.Type == 'AUX'">AUX</small>
<div class="process" v-for="p in processes" :key="p.id" :class="{selected: p.id == selectedProcess}" @click="selectProcess(p.id)">
<span>{{p.id}}</span>
<small v-if="p.type == 'AUX'">AUX</small>
</div>
</div>
+56 -21
View File
@@ -19,7 +19,7 @@ function recalcArrayId(prefix: string, alarms: Array<signalr_alarms.genericAlarm
for (const key in alarms) {
if (alarms.hasOwnProperty(key)) {
const element = alarms[key];
element.guid = prefix + "__" + (element.id || element.Id).toString();
element.guid = prefix + "__" + (element.id).toString();
element.source = prefix.toUpperCase();
}
}
@@ -28,6 +28,7 @@ function recalcArrayId(prefix: string, alarms: Array<signalr_alarms.genericAlarm
export class Hub {
static _ncConnectionNotificationVisible?: boolean = false;
static _serverConnectionNotificationVisible?: boolean = false;
// singleton hub implementation
@@ -76,6 +77,20 @@ export class Hub {
if (typeof cmsClient != "undefined")
$.connection.hub.qs.CmsClientId = cmsClient.getClientID;
$.connection.hub.disconnected(() => {
Hub.manageServerStatus("disconnected");
console.log("SERVER CONNECTION: restart-connection")
setTimeout(function() {
$.connection.hub.start();
}, 5000); // Restart connection after 5 seconds.
});
$.connection.hub.stateChanged((state) =>{
if(state.newState == $.signalR.connectionState.connected)
{
Hub.manageServerStatus("connected");
}
});
$.connection.hub.start();
this.checkShowAxes();
@@ -86,7 +101,7 @@ export class Hub {
appModelActions.CheckLogoff(store, e.id);
}
private static axesNamesDataChanged(data){
private static axesNamesDataChanged(data) {
processModelActions.setAxes(store, data);
}
@@ -101,7 +116,7 @@ export class Hub {
processModelActions.isRunning(store, data.isRunning);
processModelActions.selectProcess(store, data.selectedProcess);
processModelActions.selectAxis(store, data.selectedAxis);
processModelActions.checkRemove(store, processes.map(i => i.Id));
processModelActions.checkRemove(store, processes.map(i => i.id));
}
private static ncSoftKeyChanged(status) {
@@ -137,10 +152,10 @@ export class Hub {
for (const key in status) {
if (status.hasOwnProperty(key)) {
const element = status[key];
alarmsModelActions.addServiceAlarm(store, { guid: "maint_" + element.Id, id: element.Id, dateTime: new Date(element.ExpirationDate) } as any)
alarmsModelActions.addServiceAlarm(store, { guid: "maint_" + element.id, id: element.id, dateTime: new Date(element.expirationDate) } as any)
}
}
alarmsModelActions.checkRemoveServiceAlarm(store, status.map(i => "maint_" + i.Id));
alarmsModelActions.checkRemoveServiceAlarm(store, status.map(i => "maint_" + i.id));
}
private static manageProcesses(status: signalr_process.DTOProcessDataModel) {
@@ -155,7 +170,27 @@ export class Hub {
}
}
processModelActions.checkRemove(store, status.processes.map(i => i.Id));
processModelActions.checkRemove(store, status.processes.map(i => i.id));
}
}
private static manageServerStatus(status) {
console.log("Server Connection: ", status);
if (status == "disconnected" && !Hub._serverConnectionNotificationVisible) {
iziToast.warning({
id: "serverConnection", timeout: false, toastOnce: true, theme: "dark", title: "server offline", close: false, closeOnEscape: false, drag: false
} as IziToastSettings);
Hub._serverConnectionNotificationVisible = true;
alarmsModelActions.removeAllAlarms(store);
processModelActions.isRunning(store, false);
Factory.Get(MessageService).publishToChannel("force-ui-update", null);
}
if (status == "connected" && Hub._serverConnectionNotificationVisible) {
var toast = document.querySelector('#serverConnection') as any;
(iziToast as any).hide(toast);
Hub._serverConnectionNotificationVisible = false;
Factory.Get(MessageService).publishToChannel("force-ui-update", null);
}
}
@@ -192,11 +227,11 @@ export class Hub {
private manageAlarmsCallbacks(alarms: signalr_alarms.alarmMessage) {
recalcArrayId("cn", alarms.NcAlarms);
recalcArrayId("plc", alarms.PlcAlarms);
recalcArrayId("cn", alarms.ProcessAlarms);
recalcArrayId("cn", alarms.ncAlarms);
recalcArrayId("plc", alarms.plcAlarms);
recalcArrayId("cn", alarms.processAlarms);
let tempList = alarms.NcAlarms.concat(alarms.PlcAlarms).concat(alarms.ProcessAlarms);
let tempList = alarms.ncAlarms.concat(alarms.plcAlarms).concat(alarms.processAlarms);
for (const key in tempList) {
if (tempList.hasOwnProperty(key)) {
@@ -216,19 +251,19 @@ export class Hub {
machineStatusActions.setResetAxes(store, { reset: power.AxisReset.IsActive, progress: power.AxisReset.Percentage });
machineStatusActions.setResetAxes(store, { reset: power.axisReset.isActive, progress: power.axisReset.percentage });
// Pre-power on
machineStatusActions.setAirPressureAlarm(store, power.PrePowerOn.AirPressure);
machineStatusActions.setPowerAlarm(store, power.PrePowerOn.PowerOn);
machineStatusActions.setEmergencyAlarm(store, power.PrePowerOn.EmergencyButtons);
machineStatusActions.setProtectionsAlarm(store, power.PrePowerOn.ProtectionStatus);
machineStatusActions.setSettingsModeAlarm(store, power.PrePowerOn.SettingMode);
machineStatusActions.setKeyReadyAlarm(store, power.PrePowerOn.StartingKey);
machineStatusActions.setAirPressureAlarm(store, power.prePowerOn.airPressure);
machineStatusActions.setPowerAlarm(store, power.prePowerOn.powerOn);
machineStatusActions.setEmergencyAlarm(store, power.prePowerOn.emergencyButtons);
machineStatusActions.setProtectionsAlarm(store, power.prePowerOn.protectionStatus);
machineStatusActions.setSettingsModeAlarm(store, power.prePowerOn.settingMode);
machineStatusActions.setKeyReadyAlarm(store, power.prePowerOn.startingKey);
// Post-power on
machineStatusActions.setResetAxesAlarm(store, power.PostPowerOn.AxisReset);
machineStatusActions.setWaterJet1Alarm(store, power.PostPowerOn.WaterjetPump);
machineStatusActions.setResetAxesAlarm(store, power.postPowerOn.axisReset);
machineStatusActions.setWaterJet1Alarm(store, power.postPowerOn.waterjetPump);
}
_axesVisible: boolean = false;
@@ -290,11 +325,11 @@ export class Hub {
this._hub.server.addOverride(id);
}
public selectProcess(id:number){
public selectProcess(id: number) {
this._hub.server.selectProcess(id);
}
public selectAxis(id:number){
public selectAxis(id: number) {
this._hub.server.selectAxis(id);
}
+9 -9
View File
@@ -55,12 +55,12 @@ export const alarmsStore = {
if (!store._alarms.has(alarm.guid)) {
store._alarms.set(alarm.guid, {
date: (alarm.dateTime || alarm.DateTime),
date: (alarm.dateTime ),
source: alarm.source,
id: (alarm.id || alarm.Id).toString(),
id: (alarm.id ).toString(),
uid: alarm.guid,
description: null,
title: alarm.message || alarm.Message,
title: alarm.message ,
process: (alarm as any).process,
status: "active",
type: "alarm"
@@ -73,12 +73,12 @@ export const alarmsStore = {
AddWarning(store, alarm: signalr_alarms.genericAlarm) {
if (!store._warnings.has(alarm.guid)) {
store._warnings.set(alarm.guid, {
date:(alarm.dateTime || alarm.DateTime),
date:(alarm.dateTime),
source: alarm.source,
id: (alarm.id || alarm.Id).toString(),
id: (alarm.id ).toString(),
uid: alarm.guid,
description: null,
title: alarm.message || alarm.Message,
title: alarm.message ,
process: (alarm as any).process,
status: "active",
type: "warning"
@@ -117,11 +117,11 @@ export const alarmsStore = {
AddServiceAlarm(store, alarm: signalr_alarms.genericAlarm) {
if (!store._serviceAlarms.has(alarm.guid)) {
store._serviceAlarms.set(alarm.guid, {
date: (alarm.dateTime || alarm.DateTime),
id: (alarm.id || alarm.Id || "").toString(),
date: (alarm.dateTime ),
id: (alarm.id || "").toString(),
uid: alarm.guid,
description: null,
title: alarm.message || alarm.Message,
title: alarm.message ,
status: "active",
type: "service"
} as AlarmModel);
+29 -29
View File
@@ -53,9 +53,9 @@ export interface MachineStatusModel {
}
export interface buttonStatus {
Active: boolean,
Clickable: boolean,
Id: number
active: boolean,
clickable: boolean,
id: number
}
export interface MachineStatusActions {
@@ -82,16 +82,16 @@ export interface MachineStatusActions {
export const machineStatusStore = {
state: {
powerOnAlarm: { Active: false, Clickable: false, Id: null },
airPressureAlarm: { Active: false, Clickable: false, Id: null },
protectionsAlarm: { Active: false, Clickable: false, Id: null },
emergencyAlarm: { Active: false, Clickable: false, Id: null },
settingsModeAlarm: { Active: false, Clickable: false, Id: null },
keyReadyAlarm: { Active: false, Clickable: false, Id: null },
powerOnAlarm: { active: false, clickable: false, id: null },
airPressureAlarm: { active: false, clickable: false, id: null },
protectionsAlarm: { active: false, clickable: false, id: null },
emergencyAlarm: { active: false, clickable: false, id: null },
settingsModeAlarm: { active: false, clickable: false, id: null },
keyReadyAlarm: { active: false, clickable: false, id: null },
resetAxesAlarm: { Active: false, Clickable: false, Id: null },
waterJet1Alarm: { Active: false, Clickable: false, Id: null },
waterJet2Alarm: { Active: false, Clickable: false, Id: null },
resetAxesAlarm: { active: false, clickable: false, id: null },
waterJet1Alarm: { active: false, clickable: false, id: null },
waterJet2Alarm: { active: false, clickable: false, id: null },
ncReady: false,
@@ -112,44 +112,44 @@ export const machineStatusStore = {
} as MachineStatusModel,
getters: {
mainStatus: state => {
return state.powerOnAlarm.Active ||
state.airPressureAlarm.Active ||
state.protectionsAlarm.Active ||
state.emergencyAlarm.Active ||
state.settingsModeAlarm.Active ||
state.keyReadyAlarm.Active;
return state.powerOnAlarm.active ||
state.airPressureAlarm.active ||
state.protectionsAlarm.active ||
state.emergencyAlarm.active ||
state.settingsModeAlarm.active ||
state.keyReadyAlarm.active;
},
powerOnAlarms: state => {
return state.resetAxesAlarm.Active ||
state.waterJet1Alarm.Active ||
state.waterJet2Alarm.Active;
return state.resetAxesAlarm.active ||
state.waterJet1Alarm.active ||
state.waterJet2Alarm.active;
},
securityFunction: state => id => {
return state._functions.get[id];
},
getSoftKeyStatus: state => id => {
for (const key in state.softKeys) {
if (state.softKeys[key].Id == id) return state.softKeys[key];
if (state.softKeys[key].id == id) return state.softKeys[key];
}
return null;
},
getNcSoftKeyStatus: state => id => {
for (const key in state.ncSoftKeys) {
if (state.ncSoftKeys[key].Id == id) return state.ncSoftKeys[key];
if (state.ncSoftKeys[key].id == id) return state.ncSoftKeys[key];
}
return null;
},
getHeadsProperty: state => id => {
for (const key in state.headsProperty) {
if (state.headsProperty[key].Id == id) return state.headsProperty[key];
if (state.headsProperty[key].id == id) return state.headsProperty[key];
}
return null;
}
},
mutations: {
SetSecurityFunction(store, func: signalr_security.securityFunction) {
if (!store._functions.has(func.Id) || store._functions.get(func.Name).Enabled != func.Enabled) {
store._functions.set(func.Name, func);
if (!store._functions.has(func.id) || store._functions.get(func.name).Enabled != func.enabled) {
store._functions.set(func.name, func);
store.functions = Array.from(store._functions.values());
Factory.Get(MessageService).publishToChannel("force-ui-update");
}
@@ -160,16 +160,16 @@ export const machineStatusStore = {
}
},
SetSoftKeyStatus(store, model: any) {
store._softKeys.set(model.Id, model);
store._softKeys.set(model.id, model);
store.softKeys = Array.from(store._softKeys.values());
},
SetNCSoftKeyStatus(store, model: any) {
store._ncSoftKeys.set(model.Id, model);
store._ncSoftKeys.set(model.id, model);
store.ncSoftKeys = Array.from(store._ncSoftKeys.values());
},
SetHeadsProperty(store, model) {
store._headsProperty.set(model.id || model.Id, model);
store._headsProperty.set(model.id, model);
store.headsProperty = Array.from(store._headsProperty.values());
}
},
@@ -32,12 +32,12 @@ export const processStore = {
store.axes = data;
},
AddProcess(store, process: signalr_process.ProcessData) {
store._process.set(process.Id, process);
store._process.set(process.id, process);
store.process = Array.from(store._process.values());
},
RemoveProcess(store, process: signalr_process.ProcessData) {
if (store._process.has(process.Id))
store._process.delete(process.Id);
if (store._process.has(process.id))
store._process.delete(process.id);
store.process = Array.from(store._process.values());
},