headsproperty
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<ncConfig>
|
||||
<ncVendor>SIEMENS</ncVendor> <!-- NO_NC/DEMO/FANUC/SIEMENS/OSAI -->
|
||||
<ncVendor>DEMO</ncVendor> <!-- NO_NC/DEMO/FANUC/SIEMENS/OSAI -->
|
||||
<showNcHMI>true</showNcHMI>
|
||||
<ncIpAddress>192.168.157.2</ncIpAddress>
|
||||
<ncPort>8080</ncPort>
|
||||
|
||||
Vendored
+110
-110
File diff suppressed because one or more lines are too long
Vendored
+20
-20
File diff suppressed because one or more lines are too long
Vendored
+19
-19
File diff suppressed because one or more lines are too long
Vendored
+6
-6
File diff suppressed because one or more lines are too long
Vendored
+6
-6
File diff suppressed because one or more lines are too long
Vendored
+694
-688
File diff suppressed because one or more lines are too long
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="heads-container scrollable">
|
||||
<head-std title="head1" process="1" v-for="h in heads" :key="h.id" ></head-std>
|
||||
<head-std :title="getHeadsProperty(h.id)" process="1" v-for="h in heads" :key="h.id" ></head-std>
|
||||
<!-- <head-std :percentage="40" :load="55" :tool=1 :rpm=160000 title="head2" process="1"></head-std>
|
||||
<head-std :percentage="100" :load="65" :tool=2 title="head3" process="1"></head-std>
|
||||
<head-std title="head4" :load="100" process="1"></head-std>
|
||||
@@ -11,13 +11,19 @@
|
||||
</template>
|
||||
<script>
|
||||
import { headStd, headAwj, headSpindle } from "./heads";
|
||||
import { AppModel } from 'src/store';
|
||||
import { AppModel, HeadsPropertyModel } from 'src/store';
|
||||
export default {
|
||||
components: { headStd, headAwj, headSpindle },
|
||||
computed:{
|
||||
heads: function(){
|
||||
return (this.$store.state).machineInfo.heads;
|
||||
}
|
||||
}, methods:{
|
||||
getHeadsProperty: function(id){
|
||||
var variable = this.$store.getters.getHeadsProperty(id);
|
||||
console.log(variable);
|
||||
return variable;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -16,6 +16,16 @@ export interface SoftKeyModel {
|
||||
Value: boolean
|
||||
}
|
||||
|
||||
export interface HeadsPropertyModel {
|
||||
id: number;
|
||||
type: string;
|
||||
inWarning: boolean;
|
||||
inAlarm: boolean;
|
||||
overrideEditable: boolean;
|
||||
override: number;
|
||||
process: number;
|
||||
}
|
||||
|
||||
export interface MachineStatusModel {
|
||||
powerOnAlarm: buttonStatus,
|
||||
airPressureAlarm: buttonStatus,
|
||||
@@ -32,6 +42,8 @@ export interface MachineStatusModel {
|
||||
|
||||
softKeys: Array<SoftKeyModel>,
|
||||
|
||||
headsProperty: Array<HeadsPropertyModel>,
|
||||
|
||||
resetAxes: boolean,
|
||||
resetAxesProgress: number,
|
||||
|
||||
@@ -62,6 +74,7 @@ export interface MachineStatusActions {
|
||||
setNcConnectionStatus(context, connected: boolean);
|
||||
setSecurityFunction(context, securityFunctions: Array<signalr_security.securityFunction>);
|
||||
setSoftKeyStatus(context, status: SoftKeyModel);
|
||||
setHeadsProperty(context, status: HeadsPropertyModel);
|
||||
}
|
||||
|
||||
export const machineStatusStore = {
|
||||
@@ -82,7 +95,9 @@ export const machineStatusStore = {
|
||||
|
||||
softKeys: [],
|
||||
_softKeys: new Map<number, SoftKeyModel>(),
|
||||
|
||||
|
||||
headsProperty: [],
|
||||
_headsProperty: new Map<number, HeadsPropertyModel>(),
|
||||
resetAxes: false,
|
||||
resetAxesProgress: 0,
|
||||
|
||||
@@ -110,6 +125,9 @@ export const machineStatusStore = {
|
||||
},
|
||||
getSoftKeyStatus: state => id =>{
|
||||
return state._softKeys.get[id];
|
||||
},
|
||||
getHeadsProperty: state => id =>{
|
||||
return state._headsProperty.get[id];
|
||||
}
|
||||
},
|
||||
mutations: {
|
||||
@@ -132,6 +150,14 @@ export const machineStatusStore = {
|
||||
store._softKeys[model.Id] = model;
|
||||
|
||||
store.softKeys = Array.from(store._softKeys.values());
|
||||
},
|
||||
SetHeadsProperty(store, model: HeadsPropertyModel){
|
||||
if(!store._headsProperty.has(model.id))
|
||||
store._headsProperty.set(model.id, model);
|
||||
else
|
||||
store._headsProperty[model.id] = model;
|
||||
|
||||
store.headsProperty = Array.from(store._headsProperty.values());
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
@@ -228,6 +254,9 @@ export const machineStatusStore = {
|
||||
setSoftKeyStatus(context, status: SoftKeyModel) {
|
||||
context.commit("SetSoftKeyStatus", status);
|
||||
|
||||
},
|
||||
setHeadsProperty(context, status: HeadsPropertyModel){
|
||||
context.commit("SetHeadsProperty",status);
|
||||
}
|
||||
} as MachineStatusActions
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user