Files
cms_thermo_active/Step/wwwroot/src/components/test-status.ts
T
2018-01-26 09:24:45 +01:00

92 lines
2.2 KiB
TypeScript

import Vue from "vue";
import Component from "vue-class-component";
import {
machineStatusActions,
MachineStatusModel,
alarmsModelActions,
processModelActions
} from "../store";
@Component({})
export default class TestStatus extends Vue {
toggleAssi() {
machineStatusActions.setPowerAlarm(
this.$store,
!this.$store.state.machineStatus.powerOnAlarm
);
}
toggleAria() {
machineStatusActions.setAirPressureAlarm(
this.$store,
!this.$store.state.machineStatus.airPressureAlarm
);
}
toggleProtezioni() {
machineStatusActions.setProtectionsAlarm(
this.$store,
!this.$store.state.machineStatus.protectionsAlarm
);
}
toggleEmergenza() {
machineStatusActions.setEmergencyAlarm(
this.$store,
!this.$store.state.machineStatus.emergencyAlarm
);
}
toggleSettings() {
machineStatusActions.setSettingsModeAlarm(
this.$store,
!this.$store.state.machineStatus.settingsModeAlarm
);
}
toggleChiave() {
machineStatusActions.setKeyReadyAlarm(
this.$store,
!this.$store.state.machineStatus.keyReadyAlarm
);
}
toggleResetAxes() {
machineStatusActions.setResetAxesAlarm(
this.$store,
!this.$store.state.machineStatus.resetAxesAlarm
);
}
toggleWaterJet1() {
machineStatusActions.setWaterJet1Alarm(
this.$store,
!this.$store.state.machineStatus.waterJet1Alarm
);
}
toggleWaterJet2() {
machineStatusActions.setWaterJet2Alarm(
this.$store,
!this.$store.state.machineStatus.waterJet2Alarm
);
}
addProcess() {
processModelActions.addProcess(this.$store, {});
}
removeProcess() {
processModelActions.removeAllProcess(this.$store);
}
addAlarm() {
alarmsModelActions.addAlarm(this.$store, { message: "Lorem Ipsum dolor sit amen ... ", dateTime: new Date(), id: new Date().getTime(), isWarning: false });
}
addWarning() {
alarmsModelActions.addWarning(this.$store, { message: "Lorem Ipsum dolor sit amen ... ", dateTime: new Date(), id: new Date().getTime(), isWarning: true });
}
removeAlarms() {
alarmsModelActions.removeAllAlarms(this.$store);
}
addService() {
alarmsModelActions.addServiceAlarm(this.$store, {} as any);
}
}