rimozione Factory.Get(MessageService)
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "webpack",
|
||||
"buildprod": "webpack --progress --config webpack.config.js --env production",
|
||||
"buildprod": "webpack --watch --progress --config webpack.config.js --env production",
|
||||
"dev": "webpack --watch"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
+17
-13
@@ -1,11 +1,11 @@
|
||||
import Vue from "vue";
|
||||
import { Hub } from "./services/hub";
|
||||
import { Header, Footer } from "./app.modules";
|
||||
import { Header, Footer, LocalizationService } from "./app.modules";
|
||||
import { Login } from "src/app_modules/machine";
|
||||
import { alarmList } from "src/app_modules/alarms";
|
||||
import { LoginService } from "src/services/loginService";
|
||||
import { DataService } from "src/services/dataService";
|
||||
import { Factory, MessageService } from "./_base";
|
||||
import { Factory, messageService } from "./_base";
|
||||
import { ModalContainer, ModalNcContainer } from "./modules/base-components";
|
||||
import { ModalHelper } from "src/components/modals"
|
||||
import { appModelActions } from "src/store";
|
||||
@@ -15,9 +15,13 @@ import * as iziToast from "izitoast";
|
||||
import moment from "moment";
|
||||
import Component from "vue-class-component";
|
||||
import { Watch } from "vue-property-decorator";
|
||||
import { UsersService } from "./services/usersService";
|
||||
|
||||
declare var cmsClient;
|
||||
|
||||
|
||||
|
||||
|
||||
@Component({
|
||||
name: "app",
|
||||
components: {
|
||||
@@ -48,7 +52,7 @@ export default class app extends Vue {
|
||||
moment.locale((window.navigator as any).userLanguage || window.navigator.language);
|
||||
}
|
||||
mounted() {
|
||||
let ms = Factory.Get(MessageService);
|
||||
let ms = messageService;
|
||||
|
||||
// if cms is connected
|
||||
if (typeof cmsClient != "undefined")
|
||||
@@ -125,7 +129,7 @@ export default class app extends Vue {
|
||||
window.addEventListener("keyup", function (event) {
|
||||
// If down arrow was pressed...
|
||||
if (event.keyCode == 27) {
|
||||
Factory.Get(MessageService).publishToChannel("esc_pressed");
|
||||
messageService.publishToChannel("esc_pressed");
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -146,24 +150,24 @@ export default class app extends Vue {
|
||||
this.applyViewPosition(-window.innerHeight + 84);
|
||||
|
||||
//Hide the HMI if is showed (in production)
|
||||
Factory.Get(MessageService).publishToChannel("HMI-production-hide");
|
||||
Factory.Get(MessageService).publishToChannel("PROD-production-hide");
|
||||
messageService.publishToChannel("HMI-production-hide");
|
||||
messageService.publishToChannel("PROD-production-hide");
|
||||
//Show the HMI with delay (For the animation)
|
||||
Factory.Get(MessageService).publishToChannel("HMI-show", 500);
|
||||
messageService.publishToChannel("HMI-show", 500);
|
||||
} else {
|
||||
//Setup the Position of the View
|
||||
this.applyViewPosition(0);
|
||||
|
||||
//Hide the HMI
|
||||
Factory.Get(MessageService).publishToChannel("HMI-hide");
|
||||
messageService.publishToChannel("HMI-hide");
|
||||
//Launche the show in delay if we are in production
|
||||
if (this.showHMIinProduction && this.$route.path.includes("production"))
|
||||
Factory.Get(MessageService).publishToChannel(
|
||||
messageService.publishToChannel(
|
||||
"HMI-production-show",
|
||||
700
|
||||
);
|
||||
if (this.showPRODinProduction && this.$route.path.includes("production"))
|
||||
Factory.Get(MessageService).publishToChannel(
|
||||
messageService.publishToChannel(
|
||||
"PROD-production-show",
|
||||
700
|
||||
);
|
||||
@@ -199,10 +203,10 @@ export default class app extends Vue {
|
||||
this.hub.Hello();
|
||||
}
|
||||
onstartdrag() {
|
||||
Factory.Get(MessageService).publishToChannel("HMI-start-drag");
|
||||
messageService.publishToChannel("HMI-start-drag");
|
||||
}
|
||||
onstopdrag() {
|
||||
Factory.Get(MessageService).publishToChannel("HMI-stop-drag", 600);
|
||||
messageService.publishToChannel("HMI-stop-drag", 600);
|
||||
}
|
||||
toggleMainView(direction) {
|
||||
if (!direction || direction == "down" || direction == "none")
|
||||
@@ -212,7 +216,7 @@ export default class app extends Vue {
|
||||
}
|
||||
}
|
||||
sendMessage(name) {
|
||||
Factory.Get(MessageService).publishToChannel(name);
|
||||
messageService.publishToChannel(name);
|
||||
}
|
||||
movepanel(e) {
|
||||
if (e && e.touches && e.touches[0]) {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import Axios, { AxiosInstance, AxiosPromise, AxiosResponse, AxiosBasicCredentials, AxiosRequestConfig } from "axios";
|
||||
import Factory from "./factoryService";
|
||||
import * as iziToast from "izitoast";
|
||||
import { MessageService } from "./messageService";
|
||||
// import { localizeString } from "../filters/localizeFilter";
|
||||
import { store, AppModel } from "src/store";
|
||||
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
import Factory from "./factoryService";
|
||||
import { MessageService } from "./messageService";
|
||||
import { messageService } from "./messageService";
|
||||
import { UUID,Utilities } from "./utils";
|
||||
|
||||
export function awaiter(promise) {
|
||||
|
||||
Factory.Get(MessageService).publishToChannel("show-loading");
|
||||
messageService.publishToChannel("show-loading");
|
||||
return promise.then(data => {
|
||||
Factory.Get(MessageService).publishToChannel("hide-loading");
|
||||
messageService.publishToChannel("hide-loading");
|
||||
return data
|
||||
})
|
||||
.catch(err => {
|
||||
Factory.Get(MessageService).publishToChannel("hide-loading");
|
||||
messageService.publishToChannel("hide-loading");
|
||||
return Promise.reject(err);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
export { Factory, MessageService, UUID, Utilities };
|
||||
export { Factory, UUID, Utilities, messageService };
|
||||
@@ -4,7 +4,7 @@ import Vue from "vue";
|
||||
// Message Service Definition
|
||||
// --------------------------------------------------
|
||||
|
||||
export class MessageService {
|
||||
class MessageService {
|
||||
|
||||
private _events: Vue = new Vue({});
|
||||
|
||||
@@ -28,5 +28,4 @@ export class MessageService {
|
||||
}
|
||||
}
|
||||
|
||||
Factory.Register(MessageService);
|
||||
|
||||
export const messageService = new MessageService();
|
||||
@@ -1,7 +1,7 @@
|
||||
import { MessageService, Factory } from "./_base";
|
||||
import { Factory, messageService } from "./_base";
|
||||
|
||||
import { machineService } from "src/services/machineService";
|
||||
import { LoginService } from "src/services/loginService";
|
||||
import { loginService } from "src/services/loginService";
|
||||
|
||||
import { store, AppModel, MachineStatusModel, machineStatusActions, localizationModelActions, machineInfoActions } from "src/store";
|
||||
|
||||
@@ -13,12 +13,16 @@ import { DataService } from "./services/dataService";
|
||||
import { ToolingService } from "./services/toolingService";
|
||||
import { DepotService } from "./services/depotService";
|
||||
import { MaintenanceService } from "./services/maintenanceService";
|
||||
import { localizationService } from "./services/localizationService";
|
||||
import { localizationService, LocalizationService } from "./services/localizationService";
|
||||
import { DEBUG_CONFIGURATION, USE_RUNTIME_CONFIGURATION } from "./config";
|
||||
import { ModalHelper } from "./components/modals";
|
||||
import Vue from "vue";
|
||||
import { scadaService } from "./services/scadaService";
|
||||
import { Hub } from "./services";
|
||||
import { UsersService } from "./services/usersService";
|
||||
|
||||
Factory.Register(UsersService);
|
||||
Factory.Register(LocalizationService);
|
||||
|
||||
declare let cmsClient: any;
|
||||
let HMIvisible = false;
|
||||
@@ -39,7 +43,6 @@ let HMIScreenshotInterval;
|
||||
let HMIprodTimeout;
|
||||
let RerenderInterval;
|
||||
|
||||
const messageService = Factory.Get(MessageService);
|
||||
|
||||
messageService.subscribeToChannel("show-user-info", () => { ModalHelper.ShowModal(UserInfoDialog); });
|
||||
messageService.subscribeToChannel("show-machine-info", () => { ModalHelper.ShowModal(MachineInfoDialog); });
|
||||
@@ -59,7 +62,7 @@ messageService.subscribeToChannel("show-nochange-page", () => {
|
||||
//Loading machine configuration
|
||||
async function loadMachineConfig() {
|
||||
|
||||
await Factory.Get(LoginService).getUserInfo();
|
||||
await loginService.getUserInfo();
|
||||
try{
|
||||
await scadaService.ListScada();
|
||||
}catch(err){
|
||||
@@ -155,7 +158,7 @@ if (typeof cmsClient != "undefined") {
|
||||
cmsClient.setNcWindowState(0);
|
||||
|
||||
//Events handler
|
||||
Factory.Get(MessageService).subscribeToChannel("HMI-show", args => {
|
||||
messageService.subscribeToChannel("HMI-show", args => {
|
||||
clearTimeout(HMIshowTimeout);
|
||||
if (args[0] > 0)
|
||||
HMIshowTimeout = setTimeout(ShowHmi, args[0]);
|
||||
@@ -163,7 +166,7 @@ if (typeof cmsClient != "undefined") {
|
||||
ShowHmi()
|
||||
});
|
||||
|
||||
Factory.Get(MessageService).subscribeToChannel("HMI-hide", args => {
|
||||
messageService.subscribeToChannel("HMI-hide", args => {
|
||||
clearTimeout(HMIshowTimeout);
|
||||
if (args[0] > 0)
|
||||
HMIshowTimeout = setTimeout(HideHmi, args[0]);
|
||||
@@ -171,7 +174,7 @@ if (typeof cmsClient != "undefined") {
|
||||
HideHmi()
|
||||
});
|
||||
|
||||
Factory.Get(MessageService).subscribeToChannel("HMI-production-show", args => {
|
||||
messageService.subscribeToChannel("HMI-production-show", args => {
|
||||
clearTimeout(HMIprodTimeout);
|
||||
if (args[0] > 0)
|
||||
HMIprodTimeout = setTimeout(ShowHmiProduction, args[0]);
|
||||
@@ -179,7 +182,7 @@ if (typeof cmsClient != "undefined") {
|
||||
ShowHmiProduction()
|
||||
});
|
||||
|
||||
Factory.Get(MessageService).subscribeToChannel("HMI-production-hide", args => {
|
||||
messageService.subscribeToChannel("HMI-production-hide", args => {
|
||||
clearTimeout(HMIprodTimeout);
|
||||
if (args[0] > 0)
|
||||
HMIprodTimeout = setTimeout(HideHmiProduction, args[0]);
|
||||
@@ -189,7 +192,7 @@ if (typeof cmsClient != "undefined") {
|
||||
});
|
||||
|
||||
|
||||
Factory.Get(MessageService).subscribeToChannel("PROD-production-show", args => {
|
||||
messageService.subscribeToChannel("PROD-production-show", args => {
|
||||
clearTimeout(PRODprodTimeout);
|
||||
if (args[0] > 0)
|
||||
PRODprodTimeout = setTimeout(ShowProdProduction, args[0]);
|
||||
@@ -197,7 +200,7 @@ if (typeof cmsClient != "undefined") {
|
||||
ShowProdProduction()
|
||||
});
|
||||
|
||||
Factory.Get(MessageService).subscribeToChannel("PROD-production-hide", args => {
|
||||
messageService.subscribeToChannel("PROD-production-hide", args => {
|
||||
clearTimeout(PRODprodTimeout);
|
||||
if (args[0] > 0)
|
||||
PRODprodTimeout = setTimeout(HideProdProduction, args[0]);
|
||||
@@ -206,7 +209,7 @@ if (typeof cmsClient != "undefined") {
|
||||
|
||||
});
|
||||
|
||||
Factory.Get(MessageService).subscribeToChannel("HMI-show-alarms", args => {
|
||||
messageService.subscribeToChannel("HMI-show-alarms", args => {
|
||||
clearTimeout(HMIAlarmsTimeout);
|
||||
if (args[0] > 0)
|
||||
HMIAlarmsTimeout = setTimeout(showAlarms, args[0]);
|
||||
@@ -214,7 +217,7 @@ if (typeof cmsClient != "undefined") {
|
||||
showAlarms()
|
||||
});
|
||||
|
||||
Factory.Get(MessageService).subscribeToChannel("HMI-hide-alarms", args => {
|
||||
messageService.subscribeToChannel("HMI-hide-alarms", args => {
|
||||
clearTimeout(HMIAlarmsTimeout);
|
||||
if (args[0] > 0)
|
||||
HMIAlarmsTimeout = setTimeout(hideAlarms, args[0]);
|
||||
@@ -222,7 +225,7 @@ if (typeof cmsClient != "undefined") {
|
||||
hideAlarms()
|
||||
});
|
||||
|
||||
Factory.Get(MessageService).subscribeToChannel("HMI-show-modal", args => {
|
||||
messageService.subscribeToChannel("HMI-show-modal", args => {
|
||||
clearTimeout(HMIModalsTimeout);
|
||||
if (args[0] > 0)
|
||||
HMIModalsTimeout = setTimeout(showModal, args[0]);
|
||||
@@ -230,7 +233,7 @@ if (typeof cmsClient != "undefined") {
|
||||
showModal()
|
||||
});
|
||||
|
||||
Factory.Get(MessageService).subscribeToChannel("HMI-show-modal-nc", args => {
|
||||
messageService.subscribeToChannel("HMI-show-modal-nc", args => {
|
||||
clearTimeout(HMIModalsNcTimeout);
|
||||
if (args[0] > 0)
|
||||
HMIModalsNcTimeout = setTimeout(showNcModal, args[0]);
|
||||
@@ -238,7 +241,7 @@ if (typeof cmsClient != "undefined") {
|
||||
showNcModal()
|
||||
});
|
||||
|
||||
Factory.Get(MessageService).subscribeToChannel("HMI-hide-modal-nc", args => {
|
||||
messageService.subscribeToChannel("HMI-hide-modal-nc", args => {
|
||||
clearTimeout(HMIModalsNcTimeout);
|
||||
if (args[0] > 0)
|
||||
HMIModalsNcTimeout = setTimeout(hideNcModal, args[0]);
|
||||
@@ -246,7 +249,7 @@ if (typeof cmsClient != "undefined") {
|
||||
hideNcModal()
|
||||
});
|
||||
|
||||
Factory.Get(MessageService).subscribeToChannel("HMI-hide-modal", args => {
|
||||
messageService.subscribeToChannel("HMI-hide-modal", args => {
|
||||
clearTimeout(HMIModalsTimeout);
|
||||
if (args[0] > 0)
|
||||
HMIModalsTimeout = setTimeout(hideModal, args[0]);
|
||||
@@ -254,7 +257,7 @@ if (typeof cmsClient != "undefined") {
|
||||
hideModal()
|
||||
});
|
||||
|
||||
Factory.Get(MessageService).subscribeToChannel("HMI-start-drag", args => {
|
||||
messageService.subscribeToChannel("HMI-start-drag", args => {
|
||||
clearTimeout(HMIDraggingTimeout);
|
||||
if (args[0] > 0)
|
||||
HMIDraggingTimeout = setTimeout(startDrag, args[0]);
|
||||
@@ -262,7 +265,7 @@ if (typeof cmsClient != "undefined") {
|
||||
startDrag()
|
||||
});
|
||||
|
||||
Factory.Get(MessageService).subscribeToChannel("HMI-stop-drag", args => {
|
||||
messageService.subscribeToChannel("HMI-stop-drag", args => {
|
||||
clearTimeout(HMIDraggingTimeout);
|
||||
if (args[0] > 0)
|
||||
HMIDraggingTimeout = setTimeout(stopDrag, args[0]);
|
||||
@@ -365,10 +368,10 @@ function ElaborateHMIStatus() {
|
||||
|
||||
|
||||
// Enable/Disable Scrollers
|
||||
Factory.Get(MessageService).subscribeToChannel("disable-scroll", (args) => {
|
||||
messageService.subscribeToChannel("disable-scroll", (args) => {
|
||||
disableScroll(args[0]);
|
||||
});
|
||||
Factory.Get(MessageService).subscribeToChannel("enable-scroll", (args) => {
|
||||
messageService.subscribeToChannel("enable-scroll", (args) => {
|
||||
enableScroll(args[0]);
|
||||
});
|
||||
// Scroll manipulation
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import Vue from "vue";
|
||||
import { Modal, ModalHelper } from "src/components/modals";
|
||||
import { machineService, ContactConfigurationModel } from "src/services/machineService";
|
||||
import { Factory, MessageService, awaiter } from "src/_base";
|
||||
import { Factory, messageService, awaiter } from "src/_base";
|
||||
import Component from "vue-class-component";
|
||||
|
||||
@Component({ components: { modal: Modal } })
|
||||
@@ -14,17 +14,17 @@ export default class ContactInfoDialog extends Vue {
|
||||
|
||||
async beforeMount() {
|
||||
this.contactInfo = await awaiter(new machineService().getContactConfiguration());
|
||||
Factory.Get(MessageService).subscribeToChannel("esc_pressed", args => {
|
||||
messageService.subscribeToChannel("esc_pressed", args => {
|
||||
this.close();
|
||||
});
|
||||
}
|
||||
|
||||
beforeDestroy() {
|
||||
Factory.Get(MessageService).deleteChannel("esc_pressed");
|
||||
messageService.deleteChannel("esc_pressed");
|
||||
}
|
||||
|
||||
close() {
|
||||
Factory.Get(MessageService).deleteChannel("esc_pressed");
|
||||
messageService.deleteChannel("esc_pressed");
|
||||
ModalHelper.HideModal();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ import Vue from "vue";
|
||||
import Component from "vue-class-component";
|
||||
import { Modal, ModalHelper } from "src/components/modals"
|
||||
|
||||
import { Factory, MessageService, awaiter } from "src/_base";
|
||||
import { Factory, messageService, awaiter } from "src/_base";
|
||||
import { LoginService } from "src/app.modules";
|
||||
import { DataService } from 'src/services/dataService';
|
||||
import iziToast, { IziToastSettings } from "izitoast";
|
||||
@@ -20,8 +20,8 @@ export default class Login extends Vue {
|
||||
|
||||
this.logginIn = true;
|
||||
if (await awaiter(service.doLogin(this.user)).then(() => {
|
||||
Factory.Get(MessageService).publishToChannel("update-maintenance");
|
||||
Factory.Get(MessageService).publishToChannel("update-softkeys-favorite");
|
||||
messageService.publishToChannel("update-maintenance");
|
||||
messageService.publishToChannel("update-softkeys-favorite");
|
||||
ModalHelper.HideModal();
|
||||
}).catch(() => {
|
||||
this.logginIn = false;
|
||||
@@ -31,7 +31,7 @@ export default class Login extends Vue {
|
||||
}
|
||||
|
||||
mounted(){
|
||||
Factory.Get(MessageService).subscribeToChannel("force-ui-update", args => {
|
||||
messageService.subscribeToChannel("force-ui-update", args => {
|
||||
this.$forceUpdate();
|
||||
});
|
||||
document.body.addEventListener('keydown', function(e) {
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Modal, ModalHelper } from "src/components/modals";
|
||||
import Component from "vue-class-component";
|
||||
import Vue from "vue";
|
||||
import { Hub } from "src/services";
|
||||
import { Factory, MessageService } from "src/_base";
|
||||
import { Factory, messageService } from "src/_base";
|
||||
import { Watch } from "vue-property-decorator";
|
||||
|
||||
@Component({ components: { modal: Modal } })
|
||||
@@ -19,7 +19,7 @@ export default class M155Dialog extends Vue{
|
||||
mounted(){
|
||||
this.data = ModalHelper.M155ModalData.data;
|
||||
this.value = 0;
|
||||
Factory.Get(MessageService).subscribeToChannel("show-modal-nc", args => {
|
||||
messageService.subscribeToChannel("show-modal-nc", args => {
|
||||
this.data = ModalHelper.M155ModalData.data;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import Vue from "vue";
|
||||
import { Modal, ModalHelper } from "src/components/modals";
|
||||
import { machineService } from "src/services/machineService";
|
||||
import { Factory, MessageService } from "src/_base";
|
||||
import { Factory, messageService } from "src/_base";
|
||||
import moment from "moment";
|
||||
import Component from "vue-class-component";
|
||||
|
||||
@@ -12,16 +12,16 @@ export default class MachineInfoDialog extends Vue {
|
||||
|
||||
beforeMount() {
|
||||
new machineService().getMachineCNInfo();
|
||||
Factory.Get(MessageService).subscribeToChannel("esc_pressed", args => {
|
||||
messageService.subscribeToChannel("esc_pressed", args => {
|
||||
this.close();
|
||||
});
|
||||
}
|
||||
beforeDestroy() {
|
||||
Factory.Get(MessageService).deleteChannel("esc_pressed");
|
||||
messageService.deleteChannel("esc_pressed");
|
||||
}
|
||||
|
||||
close() {
|
||||
Factory.Get(MessageService).deleteChannel("esc_pressed");
|
||||
messageService.deleteChannel("esc_pressed");
|
||||
ModalHelper.HideModal();
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import { Watch } from "vue-property-decorator";
|
||||
import { Modal, ModalHelper } from "src/components/modals"
|
||||
|
||||
import { AppModel, localizationModelActions } from "src/store";
|
||||
import { Factory, MessageService, awaiter } from "src/_base";
|
||||
import { Factory, messageService, awaiter } from "src/_base";
|
||||
import { LoginService } from "src/app.modules";
|
||||
import { getColorFromName,isDarkColor } from "src/_base/utils";
|
||||
import { LocalizationService, localizationService } from "src/services/localizationService";
|
||||
@@ -44,13 +44,13 @@ export default class UserInfo extends Vue {
|
||||
this.currentLanguage = (this.$store.state as AppModel).localization.currentLanguage;
|
||||
this.reloadLanguages();
|
||||
|
||||
Factory.Get(MessageService).subscribeToChannel("esc_pressed", args => {
|
||||
messageService.subscribeToChannel("esc_pressed", args => {
|
||||
this.close();
|
||||
});
|
||||
}
|
||||
|
||||
beforeDestroy() {
|
||||
Factory.Get(MessageService).deleteChannel("esc_pressed");
|
||||
messageService.deleteChannel("esc_pressed");
|
||||
}
|
||||
|
||||
async reloadLanguages() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import Vue from "vue";
|
||||
import Component from "vue-class-component";
|
||||
import { Factory, MessageService } from "src/_base";
|
||||
import { Factory, messageService } from "src/_base";
|
||||
import moment from "moment";
|
||||
import { AppModel } from "src/store";
|
||||
import { getColorFromName,isDarkColor } from "src/_base/utils";
|
||||
@@ -58,6 +58,6 @@ export default class UserInfo extends Vue {
|
||||
}
|
||||
|
||||
public sendMessage(name:string) {
|
||||
Factory.Get(MessageService).publishToChannel(name);
|
||||
messageService.publishToChannel(name);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import { ModalHelper } from "src/components/modals";
|
||||
import maintenanceCard from "./maintenance-card.vue";
|
||||
import { MaintenanceService } from "src/services/maintenanceService";
|
||||
import { alarmsModelActions, store, AppModel } from "src/store";
|
||||
import { Factory, MessageService, awaiter } from "src/_base";
|
||||
import { Factory, messageService, awaiter } from "src/_base";
|
||||
import moment from "moment";
|
||||
import { MaintenanceGetters, MaintenanceActions, maintenanceActions } from "src/store/maintenance.store";
|
||||
import { Watch } from "vue-property-decorator";
|
||||
@@ -68,7 +68,7 @@ export default class Maintenance extends Vue {
|
||||
async mounted() {
|
||||
this.isSCMVisualStyle;
|
||||
this.onloading = true;
|
||||
Factory.Get(MessageService).subscribeToChannel("update-maintenance", args => {
|
||||
messageService.subscribeToChannel("update-maintenance", args => {
|
||||
awaiter(new MaintenanceService().GetMaintenances());
|
||||
});
|
||||
ModalHelper.HideModal("modal-internal");
|
||||
|
||||
@@ -6,7 +6,7 @@ import processSelectionMaintenance from "src/modules/base-components/cards/proce
|
||||
import cardProductionCms from "./card-production-cms.vue";
|
||||
import cardScadaProduction from "src/app_modules/scada/components/card-scada-production.vue";
|
||||
import { Hub } from "src/services/hub";
|
||||
import { Factory, MessageService, awaiter } from "src/_base";
|
||||
import { Factory, messageService, awaiter } from "src/_base";
|
||||
import { appModelActions, alarmsModelActions, store } from "src/store";
|
||||
import { DataService } from 'src/services/dataService';
|
||||
import Component from "vue-class-component";
|
||||
@@ -90,29 +90,29 @@ export default class Production extends Vue {
|
||||
@Watch("activeProd")
|
||||
activeCncChanged() {
|
||||
if (this.activeCnc) {
|
||||
Factory.Get(MessageService).publishToChannel("HMI-production-show");
|
||||
Factory.Get(MessageService).publishToChannel("PROD-production-hide");
|
||||
Factory.Get(MessageService).publishToChannel("HMI-production-show-state");
|
||||
Factory.Get(MessageService).publishToChannel("PROD-production-hide-state");
|
||||
messageService.publishToChannel("HMI-production-show");
|
||||
messageService.publishToChannel("PROD-production-hide");
|
||||
messageService.publishToChannel("HMI-production-show-state");
|
||||
messageService.publishToChannel("PROD-production-hide-state");
|
||||
}
|
||||
else if (this.activeProd) {
|
||||
Factory.Get(MessageService).publishToChannel("PROD-production-show");
|
||||
Factory.Get(MessageService).publishToChannel("HMI-production-hide");
|
||||
Factory.Get(MessageService).publishToChannel("HMI-production-hide-state");
|
||||
Factory.Get(MessageService).publishToChannel("PROD-production-show-state");
|
||||
messageService.publishToChannel("PROD-production-show");
|
||||
messageService.publishToChannel("HMI-production-hide");
|
||||
messageService.publishToChannel("HMI-production-hide-state");
|
||||
messageService.publishToChannel("PROD-production-show-state");
|
||||
}
|
||||
else {
|
||||
Factory.Get(MessageService).publishToChannel("HMI-production-hide");
|
||||
Factory.Get(MessageService).publishToChannel("PROD-production-hide");
|
||||
Factory.Get(MessageService).publishToChannel("HMI-production-hide-state");
|
||||
Factory.Get(MessageService).publishToChannel("PROD-production-hide-state");
|
||||
messageService.publishToChannel("HMI-production-hide");
|
||||
messageService.publishToChannel("PROD-production-hide");
|
||||
messageService.publishToChannel("HMI-production-hide-state");
|
||||
messageService.publishToChannel("PROD-production-hide-state");
|
||||
}
|
||||
}
|
||||
|
||||
beforeDestroy() {
|
||||
Factory.Get(MessageService).publishToChannel("HMI-production-hide");
|
||||
Factory.Get(MessageService).publishToChannel("PROD-production-hide");
|
||||
Factory.Get(MessageService).publishToChannel("HMI-production-hide-state");
|
||||
messageService.publishToChannel("HMI-production-hide");
|
||||
messageService.publishToChannel("PROD-production-hide");
|
||||
messageService.publishToChannel("HMI-production-hide-state");
|
||||
}
|
||||
|
||||
closeAlarmsRibbon() {
|
||||
@@ -189,7 +189,7 @@ export default class Production extends Vue {
|
||||
this.userSubkeysMenuOpened = arg2;
|
||||
}
|
||||
editPreferredSoftkey() {
|
||||
Factory.Get(MessageService).publishToChannel("enable-selected-softkeys-prefered", true);
|
||||
messageService.publishToChannel("enable-selected-softkeys-prefered", true);
|
||||
this.toggleMainView()
|
||||
}
|
||||
toggleMainView() {
|
||||
|
||||
@@ -3,7 +3,7 @@ import Component from "vue-class-component";
|
||||
import { store, AppModel } from "src/store";
|
||||
import { scadaService } from "src/services/scadaService";
|
||||
import { Watch, Prop } from "vue-property-decorator";
|
||||
import { awaiter, Factory, MessageService } from "src/_base";
|
||||
import { awaiter, Factory, messageService } from "src/_base";
|
||||
|
||||
declare let $: any;
|
||||
|
||||
@@ -107,7 +107,7 @@ export default class Scada extends Vue {
|
||||
if(!this.currentScadaId && this.scadas.length>0)
|
||||
this.selectTab(this.scadas[0].id);
|
||||
|
||||
Factory.Get(MessageService).subscribeToChannel("close-scada",this.unload);
|
||||
messageService.subscribeToChannel("close-scada",this.unload);
|
||||
}
|
||||
|
||||
async unload() {
|
||||
|
||||
@@ -5,7 +5,7 @@ import { Watch, Prop } from "vue-property-decorator";
|
||||
import { store, AppModel } from "src/store";
|
||||
import { DepotService, ToolingService } from 'src/services';
|
||||
|
||||
import { Factory, MessageService } from 'src/_base';
|
||||
import { Factory, messageService } from 'src/_base';
|
||||
import { Modal, ModalHelper } from "src/components/modals";
|
||||
|
||||
@Component({
|
||||
@@ -90,7 +90,7 @@ export default class InfoEquipment extends Vue {
|
||||
}
|
||||
}
|
||||
close() {
|
||||
Factory.Get(MessageService).deleteChannel("esc_pressed");
|
||||
messageService.deleteChannel("esc_pressed");
|
||||
ModalHelper.HideModal();
|
||||
}
|
||||
selectTab(elem) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
import { ModalHelper, Modal } from "src/components/modals"
|
||||
import { DepotService } from 'src/services/depotService';
|
||||
import { Factory, MessageService } from 'src/_base';
|
||||
import { Factory, messageService } from 'src/_base';
|
||||
import { inputBox } from "src/modules/base-components/cards";
|
||||
import { store, AppModel } from "src/store";
|
||||
import { ToolingGetters,toolingActions } from "src/store/tooling.store";
|
||||
@@ -48,7 +48,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
close() {
|
||||
Factory.Get(MessageService).deleteChannel("esc_pressed");
|
||||
messageService.deleteChannel("esc_pressed");
|
||||
ModalHelper.HideModal();
|
||||
},
|
||||
isSiemens: function () {
|
||||
@@ -63,7 +63,7 @@ export default {
|
||||
|
||||
if(this.isSiemens()){
|
||||
new DepotService().AddToolToDepot(this.magazineId, this.positionId, { toolId: this.toolSelected.id }).then(response => {
|
||||
Factory.Get(MessageService).deleteChannel("esc_pressed");
|
||||
messageService.deleteChannel("esc_pressed");
|
||||
toolingActions.updateBusyStatusPositions(store,this.magInfo.type,(this.$store.state as AppModel).depot.depot);
|
||||
ModalHelper.HideModal();
|
||||
});
|
||||
@@ -71,7 +71,7 @@ export default {
|
||||
else{
|
||||
if (this.action == "LOAD") {
|
||||
new DepotService().AddToolToDepotNc(this.magazineId, this.positionId, { shankId: this.toolSelected.id }).then(response => {
|
||||
Factory.Get(MessageService).deleteChannel("esc_pressed");
|
||||
messageService.deleteChannel("esc_pressed");
|
||||
toolingActions.updateBusyStatusPositions(store,this.magInfo.type,(this.$store.state as AppModel).depot.depotNc);
|
||||
ModalHelper.HideModal();
|
||||
})
|
||||
@@ -82,7 +82,7 @@ export default {
|
||||
act = 1;
|
||||
|
||||
new DepotService().StartAssistedToolingProcedure(this.toolSelected.id, this.magazineId, this.positionId, act).then(response => {
|
||||
Factory.Get(MessageService).deleteChannel("esc_pressed");
|
||||
messageService.deleteChannel("esc_pressed");
|
||||
toolingActions.updateBusyStatusPositions(store, this.magInfo.type, (this.$store.state as AppModel).depot.depotNc);
|
||||
ModalHelper.HideModal();
|
||||
})
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import Vue from "vue";
|
||||
import { Modal, ModalHelper } from "src/components/modals";
|
||||
import { Factory, MessageService } from "src/_base";
|
||||
import { Factory, messageService } from "src/_base";
|
||||
import moment from "moment";
|
||||
import Component from "vue-class-component";
|
||||
import { ToolingService } from "src/services/toolingService";
|
||||
@@ -27,7 +27,7 @@ export default class SelfAdaptivePathDialog extends Vue {
|
||||
}));
|
||||
|
||||
|
||||
Factory.Get(MessageService).subscribeToChannel("esc_pressed", args => {
|
||||
messageService.subscribeToChannel("esc_pressed", args => {
|
||||
this.close();
|
||||
});
|
||||
|
||||
@@ -53,11 +53,11 @@ export default class SelfAdaptivePathDialog extends Vue {
|
||||
}
|
||||
|
||||
beforeDestroy() {
|
||||
Factory.Get(MessageService).deleteChannel("esc_pressed");
|
||||
messageService.deleteChannel("esc_pressed");
|
||||
}
|
||||
|
||||
close() {
|
||||
Factory.Get(MessageService).deleteChannel("esc_pressed");
|
||||
messageService.deleteChannel("esc_pressed");
|
||||
ModalHelper.HideModal();
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ export default class SelfAdaptivePathDialog extends Vue {
|
||||
let stepModel:any = {step: this.stepValue};
|
||||
|
||||
awaiter(new ToolingService().SetSelfAdaptivePathStep(stepModel).then(response => {
|
||||
Factory.Get(MessageService).deleteChannel("esc_pressed");
|
||||
messageService.deleteChannel("esc_pressed");
|
||||
ModalHelper.HideModal();
|
||||
}));
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import { depotBL } from "src/business-logic/depot-bl";
|
||||
import { ToolingService } from "src/services/toolingService";
|
||||
import { ToolingGetters,toolingActions } from "src/store/tooling.store";
|
||||
import LoadDepot from "./load-depot.vue";
|
||||
import { MessageService, Factory, awaiter } from "src/_base";
|
||||
import { messageService, Factory, awaiter } from "src/_base";
|
||||
|
||||
import { Container, Draggable } from "vue-smooth-dnd";
|
||||
|
||||
@@ -336,7 +336,7 @@ export default class depot extends Vue {
|
||||
this.setAssistedTooling()
|
||||
|
||||
|
||||
Factory.Get(MessageService).subscribeToChannel("force-ui-update", args => {
|
||||
messageService.subscribeToChannel("force-ui-update", args => {
|
||||
this.setAssistedTooling()
|
||||
});
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ import Componet from "vue-class-component";
|
||||
import { AppModel, machineInfoActions, store, appModelActions } from "src/store";
|
||||
import { SoftKeysConfigurationModel } from "src/store/machineInfo.store"
|
||||
import { Hub } from "src/services/hub";
|
||||
import { Factory, MessageService, awaiter } from "src/_base";
|
||||
import { Factory, messageService, awaiter } from "src/_base";
|
||||
import { DataService } from "src/services/dataService";
|
||||
|
||||
import onOffSoftKey from "./soft-key2.vue";
|
||||
@@ -44,7 +44,7 @@ export default class softKeys extends Vue {
|
||||
}
|
||||
|
||||
async mounted() {
|
||||
Factory.Get(MessageService).subscribeToChannel("enable-selected-softkeys-prefered", args => {
|
||||
messageService.subscribeToChannel("enable-selected-softkeys-prefered", args => {
|
||||
if (args[0] > 0)
|
||||
this.enableSelected = args[0];
|
||||
else
|
||||
@@ -52,7 +52,7 @@ export default class softKeys extends Vue {
|
||||
this.startedFromProduction = true;
|
||||
appModelActions.FavSoftkeyStart(this.$store);
|
||||
});
|
||||
Factory.Get(MessageService).subscribeToChannel("update-softkeys-favorite", args => {
|
||||
messageService.subscribeToChannel("update-softkeys-favorite", args => {
|
||||
awaiter(new DataService().GetUserSoftkeyFavorite());
|
||||
});
|
||||
|
||||
@@ -113,20 +113,20 @@ export default class softKeys extends Vue {
|
||||
if (this.selectedMenuItem == value.id) {
|
||||
this.selectedMenuItem = null;
|
||||
this.selectedSoftKey = null;
|
||||
Factory.Get(MessageService).publishToChannel("enable-scroll", this.$refs.scrollable);
|
||||
messageService.publishToChannel("enable-scroll", this.$refs.scrollable);
|
||||
}
|
||||
else {
|
||||
this.selectedMenuItem = value.id;
|
||||
this.selectedSoftKey = value;
|
||||
this.$nextTick(() => { if (this.$refs.backdrop) (this.$refs.backdrop as any).focus(); });
|
||||
Factory.Get(MessageService).publishToChannel("disable-scroll", this.$refs.scrollable);
|
||||
messageService.publishToChannel("disable-scroll", this.$refs.scrollable);
|
||||
}
|
||||
}
|
||||
|
||||
public closeBackdrop() {
|
||||
this.selectedMenuItem = null;
|
||||
this.selectedSoftKey = null;
|
||||
Factory.Get(MessageService).publishToChannel("enable-scroll", this.$refs.scrollable);
|
||||
messageService.publishToChannel("enable-scroll", this.$refs.scrollable);
|
||||
}
|
||||
|
||||
public setSoftKeyPosition(sk: any) {
|
||||
|
||||
@@ -9,7 +9,7 @@ import autoMenu from "./auto-menu.vue";
|
||||
import hmiMenu from "./nc-hmi-menu.vue";
|
||||
import processSelection from "./process-selection.vue";
|
||||
|
||||
import { Factory, MessageService } from "src/_base";
|
||||
import { Factory, messageService } from "src/_base";
|
||||
import { alarmsModelActions, store } from "src/store";
|
||||
|
||||
export default {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
import { Factory, MessageService } from "src/_base";
|
||||
import { Factory, messageService } from "src/_base";
|
||||
import ConfirmModal from "./modal-confirm.vue";
|
||||
import { Deferred } from "src/services/Deferred";
|
||||
import { M155Questions } from "src/app_modules/machine";
|
||||
@@ -72,7 +72,7 @@ export class ModalHelper {
|
||||
};
|
||||
|
||||
public static ShowNcModal(view) {
|
||||
Factory.Get(MessageService).publishToChannel("show-modal-nc", view);
|
||||
messageService.publishToChannel("show-modal-nc", view);
|
||||
}
|
||||
|
||||
public static ShowNextM155Modal() {
|
||||
@@ -84,10 +84,10 @@ export class ModalHelper {
|
||||
}
|
||||
}
|
||||
if(ModalHelper.M155ModalData.data){
|
||||
Factory.Get(MessageService).publishToChannel("show-modal-nc", M155Questions);
|
||||
messageService.publishToChannel("show-modal-nc", M155Questions);
|
||||
}
|
||||
else{
|
||||
Factory.Get(MessageService).publishToChannel("hide-modal-nc", M155Questions);
|
||||
messageService.publishToChannel("hide-modal-nc", M155Questions);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,13 +101,13 @@ export class ModalHelper {
|
||||
let find = processStore.state.m155messages.find(X => X.process== proc)
|
||||
if(find){
|
||||
ModalHelper.M155ModalData.data = find;
|
||||
Factory.Get(MessageService).publishToChannel("show-modal-nc", M155Questions);
|
||||
messageService.publishToChannel("show-modal-nc", M155Questions);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static HideNcModal(view) {
|
||||
Factory.Get(MessageService).publishToChannel("hide-modal-nc", view);
|
||||
messageService.publishToChannel("hide-modal-nc", view);
|
||||
}
|
||||
|
||||
public static ShowMaintenancePassword(view, maintenance, onConfirm: Function){
|
||||
@@ -120,17 +120,17 @@ export class ModalHelper {
|
||||
public static ShowModal(view, modalname: string = "modal", showHeader: boolean = false) {
|
||||
if (modalname == null)
|
||||
modalname = "modal";
|
||||
Factory.Get(MessageService).publishToChannel("show-" + modalname, view, null, null, showHeader);
|
||||
messageService.publishToChannel("show-" + modalname, view, null, null, showHeader);
|
||||
}
|
||||
|
||||
public static ShowModalAsync(view, model = null, modalname: string = "modal"): Promise<any> {
|
||||
let deferred = new Deferred();
|
||||
Factory.Get(MessageService).publishToChannel("show-" + modalname, view, deferred, model);
|
||||
messageService.publishToChannel("show-" + modalname, view, deferred, model);
|
||||
return deferred.promise;
|
||||
}
|
||||
|
||||
public static HideModal(modalname: string = "modal") {
|
||||
Factory.Get(MessageService).publishToChannel("hide-" + modalname);
|
||||
messageService.publishToChannel("hide-" + modalname);
|
||||
}
|
||||
|
||||
public static AskConfirm(title: string, body: string, onConfirm: Function, onCancel: Function, modalcontainer: string = "modal-internal") {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import Vue from "vue";
|
||||
import Component from "vue-class-component";
|
||||
import { appModelActions, store, machineStatusActions } from "src/store";
|
||||
import { Factory, MessageService } from "src/_base";
|
||||
import { Factory, messageService } from "src/_base";
|
||||
|
||||
declare let cmsClient: any;
|
||||
|
||||
@@ -14,7 +14,7 @@ export default class AppFooter extends Vue {
|
||||
get state() { return this.$store.state; }
|
||||
|
||||
mounted(){
|
||||
Factory.Get(MessageService).subscribeToChannel("force-ui-update", args => {
|
||||
messageService.subscribeToChannel("force-ui-update", args => {
|
||||
this.$forceUpdate();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ import Vue from "vue";
|
||||
import Component from "vue-class-component";
|
||||
import { ProcessInfo } from "./base-components";
|
||||
import { AppModel, buttonStatus } from "src/store";
|
||||
import { Factory, MessageService } from "src/_base";
|
||||
import { Factory, messageService } from "src/_base";
|
||||
import { Hub } from "src/services/hub";
|
||||
import { Watch } from "vue-property-decorator";
|
||||
import AppRibbon from "src/components/app-ribbon.vue";
|
||||
@@ -20,7 +20,7 @@ export default class AppHeader extends Vue {
|
||||
public get powerOnStatus() { return this.$store.getters.powerOnAlarms; };
|
||||
|
||||
mounted() {
|
||||
Factory.Get(MessageService).subscribeToChannel("force-ui-update", args => {
|
||||
messageService.subscribeToChannel("force-ui-update", args => {
|
||||
this.$forceUpdate();
|
||||
});
|
||||
$('.process-container').mousewheel(function (e, delta) {
|
||||
@@ -86,7 +86,7 @@ export default class AppHeader extends Vue {
|
||||
}
|
||||
|
||||
public sendMessage(name: string) {
|
||||
Factory.Get(MessageService).publishToChannel(name);
|
||||
messageService.publishToChannel(name);
|
||||
}
|
||||
|
||||
public manageClick(btn: buttonStatus) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import Vue from "vue";
|
||||
import Component from "vue-class-component";
|
||||
|
||||
import { Factory, MessageService, awaiter } from "src/_base";
|
||||
import { Factory, messageService, awaiter } from "src/_base";
|
||||
import moment from "moment";
|
||||
import cardFolderPath from "./cards/card-folder-path.vue";
|
||||
import cardElementQueue from "src/app_modules/production/components/card-element-queue.vue";
|
||||
@@ -205,7 +205,7 @@ export default class ModalAddElementQueue extends Vue {
|
||||
this.selectedFile.IsJob = isJob;
|
||||
}
|
||||
close() {
|
||||
Factory.Get(MessageService).deleteChannel("esc_pressed");
|
||||
messageService.deleteChannel("esc_pressed");
|
||||
ModalHelper.HideModal();
|
||||
}
|
||||
reload() {
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { Modal, ModalHelper } from "src/components/modals";
|
||||
import { Factory, MessageService } from "src/_base";
|
||||
import { Factory, messageService } from "src/_base";
|
||||
import { inputBox } from "src/modules/base-components/cards";
|
||||
import { ToolingService } from "src/services/toolingService";
|
||||
export default {
|
||||
@@ -55,7 +55,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
close() {
|
||||
Factory.Get(MessageService).deleteChannel("esc_pressed");
|
||||
messageService.deleteChannel("esc_pressed");
|
||||
ModalHelper.HideModal();
|
||||
},
|
||||
async addOffsetToTool(pos, offsetId) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Factory, MessageService } from "src/_base";
|
||||
import { Factory, messageService } from "src/_base";
|
||||
export default {
|
||||
computed: {
|
||||
isVisible: function () {
|
||||
@@ -17,10 +17,10 @@ export default {
|
||||
};
|
||||
},
|
||||
created() {
|
||||
Factory.Get(MessageService).subscribeToChannel("show-" + this.containerName, args => {
|
||||
messageService.subscribeToChannel("show-" + this.containerName, args => {
|
||||
|
||||
if (this.informHmi)
|
||||
Factory.Get(MessageService).publishToChannel("HMI-show-modal");
|
||||
messageService.publishToChannel("HMI-show-modal");
|
||||
this.currentView = args[0];
|
||||
if (args[1])
|
||||
this.deferred = args[1];
|
||||
@@ -28,10 +28,10 @@ export default {
|
||||
this.model = args[2];
|
||||
});
|
||||
|
||||
Factory.Get(MessageService).subscribeToChannel("hide-" + this.containerName, args => {
|
||||
messageService.subscribeToChannel("hide-" + this.containerName, args => {
|
||||
|
||||
if (this.informHmi)
|
||||
Factory.Get(MessageService).publishToChannel("HMI-hide-modal", 300);
|
||||
messageService.publishToChannel("HMI-hide-modal", 300);
|
||||
this.currentView = null;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import Vue from "vue";
|
||||
import { Factory, MessageService,awaiter } from 'src/_base';
|
||||
import { Factory, messageService,awaiter } from 'src/_base';
|
||||
import Component from "vue-class-component";
|
||||
import { ModalHelper, Modal } from "src/components/modals";
|
||||
import { getColorFromName,isDarkColor } from "src/_base/utils";
|
||||
@@ -28,7 +28,7 @@ export default class modalCreateUser extends Vue {
|
||||
|
||||
this.mountedUsername = this.newUser.username;
|
||||
|
||||
Factory.Get(MessageService).subscribeToChannel("esc_pressed", args => {
|
||||
messageService.subscribeToChannel("esc_pressed", args => {
|
||||
this.close();
|
||||
});
|
||||
}
|
||||
@@ -62,11 +62,11 @@ export default class modalCreateUser extends Vue {
|
||||
}
|
||||
|
||||
beforeDestroy() {
|
||||
Factory.Get(MessageService).deleteChannel("esc_pressed");
|
||||
messageService.deleteChannel("esc_pressed");
|
||||
}
|
||||
|
||||
close() {
|
||||
Factory.Get(MessageService).deleteChannel("esc_pressed");
|
||||
messageService.deleteChannel("esc_pressed");
|
||||
ModalHelper.HideModal();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import Vue from "vue";
|
||||
|
||||
import { ModalHelper,Modal } from "src/components/modals";
|
||||
import { Factory, MessageService } from '../../_base';
|
||||
import { Factory, messageService } from '../../_base';
|
||||
import { tool } from "src/modules/base-components/cards";
|
||||
import { inputBox } from "src/modules/base-components/cards";
|
||||
import Component from "vue-class-component";
|
||||
@@ -39,13 +39,13 @@ export default class ModalEditJob extends Vue {
|
||||
|
||||
close() {
|
||||
if (this.deferred) this.deferred.reject();
|
||||
Factory.Get(MessageService).deleteChannel("esc_pressed");
|
||||
messageService.deleteChannel("esc_pressed");
|
||||
ModalHelper.HideModal();
|
||||
}
|
||||
|
||||
confirm() {
|
||||
if (this.deferred) this.deferred.resolve(this.value);
|
||||
Factory.Get(MessageService).deleteChannel("esc_pressed");
|
||||
messageService.deleteChannel("esc_pressed");
|
||||
ModalHelper.HideModal();
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { ModalHelper, Modal } from "src/components/modals";
|
||||
import { Factory, MessageService } from "../../_base";
|
||||
import { Factory, messageService } from "../../_base";
|
||||
import { MaintenanceService } from "src/services/maintenanceService";
|
||||
export default {
|
||||
components: { modal: Modal },
|
||||
@@ -24,16 +24,16 @@ export default {
|
||||
this.title = ModalHelper.modalIframe.title;
|
||||
},
|
||||
beforeMount() {
|
||||
Factory.Get(MessageService).subscribeToChannel("esc_pressed", args => {
|
||||
messageService.subscribeToChannel("esc_pressed", args => {
|
||||
this.close();
|
||||
});
|
||||
},
|
||||
beforeDestroy() {
|
||||
Factory.Get(MessageService).deleteChannel("esc_pressed");
|
||||
messageService.deleteChannel("esc_pressed");
|
||||
},
|
||||
methods: {
|
||||
close() {
|
||||
Factory.Get(MessageService).deleteChannel("esc_pressed");
|
||||
messageService.deleteChannel("esc_pressed");
|
||||
ModalHelper.HideModal();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { Modal, ModalHelper } from "src/components/modals";
|
||||
import { Factory, MessageService } from "../../_base";
|
||||
import { Factory, messageService } from "../../_base";
|
||||
import ZoomImage from './zoom-image.vue'
|
||||
|
||||
export default {
|
||||
@@ -22,16 +22,16 @@ export default {
|
||||
this.title = ModalHelper.modalImage.title;
|
||||
},
|
||||
beforeMount() {
|
||||
Factory.Get(MessageService).subscribeToChannel("esc_pressed", args => {
|
||||
messageService.subscribeToChannel("esc_pressed", args => {
|
||||
this.close();
|
||||
});
|
||||
},
|
||||
beforeDestroy() {
|
||||
Factory.Get(MessageService).deleteChannel("esc_pressed");
|
||||
messageService.deleteChannel("esc_pressed");
|
||||
},
|
||||
methods: {
|
||||
close() {
|
||||
Factory.Get(MessageService).deleteChannel("esc_pressed");
|
||||
messageService.deleteChannel("esc_pressed");
|
||||
ModalHelper.HideModal();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import Vue from "vue";
|
||||
|
||||
import { ModalHelper,Modal } from "src/components/modals";
|
||||
import { Factory, MessageService } from 'src/_base';
|
||||
import { Factory, messageService } from 'src/_base';
|
||||
import Component from "vue-class-component";
|
||||
import { Deferred } from "src/services/Deferred";
|
||||
import { Prop } from "vue-property-decorator";
|
||||
@@ -30,7 +30,7 @@ export default class ModalJobAddParameter extends Vue {
|
||||
}
|
||||
|
||||
close() {
|
||||
Factory.Get(MessageService).deleteChannel("esc_pressed");
|
||||
messageService.deleteChannel("esc_pressed");
|
||||
ModalHelper.HideModal();
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import Vue from "vue";
|
||||
import Component from "vue-class-component";
|
||||
|
||||
import { ModalHelper,Modal } from "src/components/modals";
|
||||
import { Factory, MessageService, awaiter } from "../../_base";
|
||||
import { Factory, messageService, awaiter } from "../../_base";
|
||||
// import { MaintenanceService } from "../services/maintenanceService";
|
||||
// import { store } from "src/store";
|
||||
// import { maintenanceActions } from "../store/maintenance.store";
|
||||
@@ -245,15 +245,15 @@ export default class ModalLoadProgram extends Vue {
|
||||
}
|
||||
|
||||
beforeMount() {
|
||||
Factory.Get(MessageService).subscribeToChannel("esc_pressed", args => {
|
||||
messageService.subscribeToChannel("esc_pressed", args => {
|
||||
this.close();
|
||||
});
|
||||
}
|
||||
beforeDestroy() {
|
||||
Factory.Get(MessageService).deleteChannel("esc_pressed");
|
||||
messageService.deleteChannel("esc_pressed");
|
||||
}
|
||||
close() {
|
||||
Factory.Get(MessageService).deleteChannel("esc_pressed");
|
||||
messageService.deleteChannel("esc_pressed");
|
||||
ModalHelper.HideModal();
|
||||
}
|
||||
reload() {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import Vue from "vue";
|
||||
|
||||
|
||||
import { Factory, MessageService } from 'src/_base';
|
||||
import { Factory, messageService } from 'src/_base';
|
||||
import missingTool from "src/modules/base-components/cards/missing-tool.vue";
|
||||
import Component from "vue-class-component";
|
||||
import { Deferred } from "../../services/Deferred";
|
||||
@@ -27,7 +27,7 @@ export default class ModalMissingTools extends Vue {
|
||||
|
||||
close() {
|
||||
|
||||
Factory.Get(MessageService).deleteChannel("esc_pressed");
|
||||
messageService.deleteChannel("esc_pressed");
|
||||
ModalHelper.HideModal();
|
||||
};
|
||||
selectTool(tool) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Factory, MessageService } from "src/_base";
|
||||
import { Factory, messageService } from "src/_base";
|
||||
export default {
|
||||
computed: {
|
||||
isVisible: function () {
|
||||
@@ -16,11 +16,11 @@ export default {
|
||||
};
|
||||
},
|
||||
created() {
|
||||
Factory.Get(MessageService).subscribeToChannel("show-modal-nc", args => {
|
||||
messageService.subscribeToChannel("show-modal-nc", args => {
|
||||
|
||||
//set blur effect && hide NC HMI
|
||||
Factory.Get(MessageService).publishToChannel("show-modal-nc-called");
|
||||
Factory.Get(MessageService).publishToChannel("HMI-show-modal-nc");
|
||||
messageService.publishToChannel("show-modal-nc-called");
|
||||
messageService.publishToChannel("HMI-show-modal-nc");
|
||||
|
||||
//Search in the array
|
||||
let v = this.currentView.indexOf(args[0]);
|
||||
@@ -33,7 +33,7 @@ export default {
|
||||
|
||||
});
|
||||
|
||||
Factory.Get(MessageService).subscribeToChannel("hide-modal-nc", args => {
|
||||
messageService.subscribeToChannel("hide-modal-nc", args => {
|
||||
|
||||
//Search in the array
|
||||
let v = this.currentView.indexOf(args[0]);
|
||||
@@ -44,8 +44,8 @@ export default {
|
||||
|
||||
//If no modals esists show the normal software
|
||||
if(this.currentView.length == 0){
|
||||
Factory.Get(MessageService).publishToChannel("hide-modal-nc-called");
|
||||
Factory.Get(MessageService).publishToChannel("HMI-hide-modal-nc", 300);
|
||||
messageService.publishToChannel("hide-modal-nc-called");
|
||||
messageService.publishToChannel("HMI-hide-modal-nc", 300);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import Vue from "vue";
|
||||
import { Factory, MessageService,awaiter } from 'src/_base';
|
||||
import { Factory, messageService,awaiter } from 'src/_base';
|
||||
import Component from "vue-class-component";
|
||||
import { ModalHelper, Modal } from "src/components/modals";
|
||||
import { getColorFromName,isDarkColor } from "src/_base/utils";
|
||||
@@ -23,7 +23,7 @@ export default class modalPasswordUser extends Vue {
|
||||
beforeMount() {
|
||||
this.newUser = ModalHelper.userModal.currentUser;
|
||||
|
||||
Factory.Get(MessageService).subscribeToChannel("esc_pressed", args => {
|
||||
messageService.subscribeToChannel("esc_pressed", args => {
|
||||
this.close();
|
||||
});
|
||||
}
|
||||
@@ -48,11 +48,11 @@ export default class modalPasswordUser extends Vue {
|
||||
}
|
||||
|
||||
beforeDestroy() {
|
||||
Factory.Get(MessageService).deleteChannel("esc_pressed");
|
||||
messageService.deleteChannel("esc_pressed");
|
||||
}
|
||||
|
||||
close() {
|
||||
Factory.Get(MessageService).deleteChannel("esc_pressed");
|
||||
messageService.deleteChannel("esc_pressed");
|
||||
ModalHelper.HideModal();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import Vue from "vue";
|
||||
import Component from "vue-class-component";
|
||||
import { ModalHelper,Modal } from "src/components/modals";
|
||||
import { Factory, MessageService } from "src/_base";
|
||||
import { Factory, messageService } from "src/_base";
|
||||
import { Watch, Prop } from "vue-property-decorator";
|
||||
import { Deferred } from "src/services";
|
||||
|
||||
@@ -62,13 +62,13 @@ export default class ModalReportSelectColumn extends Vue {
|
||||
}
|
||||
|
||||
close() {
|
||||
Factory.Get(MessageService).deleteChannel("esc_pressed");
|
||||
messageService.deleteChannel("esc_pressed");
|
||||
ModalHelper.HideModal();
|
||||
this.deferred.resolve(this.value);
|
||||
}
|
||||
|
||||
confirm(){
|
||||
Factory.Get(MessageService).deleteChannel("esc_pressed");
|
||||
messageService.deleteChannel("esc_pressed");
|
||||
ModalHelper.HideModal();
|
||||
this.deferred.resolve(this.columnSelected);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import Vue from "vue";
|
||||
import { Factory, MessageService,awaiter } from 'src/_base';
|
||||
import { Factory, messageService,awaiter } from 'src/_base';
|
||||
import Component from "vue-class-component";
|
||||
import { ModalHelper, Modal } from "src/components/modals";
|
||||
import { getColorFromName,isDarkColor } from "src/_base/utils";
|
||||
@@ -21,7 +21,7 @@ export default class modalRoleUser extends Vue {
|
||||
this.newUser = ModalHelper.userModal.currentUser;
|
||||
this.selectedRole = this.newUser.role.id;
|
||||
|
||||
Factory.Get(MessageService).subscribeToChannel("esc_pressed", args => {
|
||||
messageService.subscribeToChannel("esc_pressed", args => {
|
||||
this.close();
|
||||
});
|
||||
}
|
||||
@@ -48,11 +48,11 @@ export default class modalRoleUser extends Vue {
|
||||
}
|
||||
|
||||
beforeDestroy() {
|
||||
Factory.Get(MessageService).deleteChannel("esc_pressed");
|
||||
messageService.deleteChannel("esc_pressed");
|
||||
}
|
||||
|
||||
close() {
|
||||
Factory.Get(MessageService).deleteChannel("esc_pressed");
|
||||
messageService.deleteChannel("esc_pressed");
|
||||
ModalHelper.HideModal();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import Vue from "vue";
|
||||
|
||||
|
||||
import { Factory, MessageService,awaiter } from '../_base';
|
||||
import { Factory, messageService,awaiter } from '../_base';
|
||||
import { MaintenanceService } from "../services/maintenanceService";
|
||||
import moment from "moment";
|
||||
import Component from "vue-class-component";
|
||||
@@ -28,16 +28,16 @@ export default class createMaintenance extends Vue {
|
||||
this.newMaintenance.time = this.newMaintenance.deadline;
|
||||
}
|
||||
}
|
||||
Factory.Get(MessageService).subscribeToChannel("esc_pressed", args => {
|
||||
messageService.subscribeToChannel("esc_pressed", args => {
|
||||
this.close();
|
||||
});
|
||||
}
|
||||
|
||||
beforeDestroy() {
|
||||
Factory.Get(MessageService).deleteChannel("esc_pressed");
|
||||
messageService.deleteChannel("esc_pressed");
|
||||
}
|
||||
close() {
|
||||
Factory.Get(MessageService).deleteChannel("esc_pressed");
|
||||
messageService.deleteChannel("esc_pressed");
|
||||
ModalHelper.HideModal();
|
||||
}
|
||||
dataformat() {
|
||||
|
||||
@@ -4,7 +4,7 @@ import { AlarmsModelActionsInterface } from "../store/alarms.store"
|
||||
import iziToast, { IziToastSettings } from "izitoast";
|
||||
|
||||
import { store, alarmsModelActions, machineStatusActions, machineInfoActions, AppModel, appModelActions } from "src/store";
|
||||
import { Factory, MessageService } from "src/_base";
|
||||
import { Factory, messageService } from "src/_base";
|
||||
import { signalr_alarms } from "src/@types/signalr.alarms";
|
||||
import { AuthToken } from "src/_base/baseRestService";
|
||||
import { machineService } from "src/services/machineService";
|
||||
@@ -111,7 +111,7 @@ export class Hub {
|
||||
|
||||
|
||||
store.watch(s => (s as AppModel).process.m155messages, (n, o) => {
|
||||
Factory.Get(MessageService).publishToChannel("show-m155-questions");
|
||||
messageService.publishToChannel("show-m155-questions");
|
||||
})
|
||||
|
||||
}
|
||||
@@ -284,7 +284,7 @@ export class Hub {
|
||||
alarmsModelActions.removeAllAlarms(store);
|
||||
processModelActions.isRunning(store, false);
|
||||
machineStatusActions.setNcConnectionStatus(store, false);
|
||||
Factory.Get(MessageService).publishToChannel("force-ui-update", null);
|
||||
messageService.publishToChannel("force-ui-update", null);
|
||||
}
|
||||
if (status == "connected" && Hub._serverConnectionNotificationVisible) {
|
||||
|
||||
@@ -292,7 +292,7 @@ export class Hub {
|
||||
(iziToast as any).hide(toast);
|
||||
Hub._serverConnectionNotificationVisible = false;
|
||||
try { await scadaService.ListScada(); } catch (err) { }
|
||||
Factory.Get(MessageService).publishToChannel("force-ui-update", null);
|
||||
messageService.publishToChannel("force-ui-update", null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -306,7 +306,7 @@ export class Hub {
|
||||
new ToolingService().GetToolsConfiguration()
|
||||
|
||||
Hub._ncConnectionNotificationVisible = false;
|
||||
Factory.Get(MessageService).publishToChannel("force-ui-update", null);
|
||||
messageService.publishToChannel("force-ui-update", null);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -319,13 +319,13 @@ export class Hub {
|
||||
|
||||
alarmsModelActions.removeAllAlarms(store);
|
||||
processModelActions.isRunning(store, false);
|
||||
Factory.Get(MessageService).publishToChannel("force-ui-update", null);
|
||||
messageService.publishToChannel("force-ui-update", null);
|
||||
return;
|
||||
}
|
||||
|
||||
if ((store.state as AppModel).machineStatus.ncReady != status.connected) {
|
||||
machineStatusActions.setNcConnectionStatus(store, status.connected);
|
||||
Factory.Get(MessageService).publishToChannel("force-ui-update", null);
|
||||
messageService.publishToChannel("force-ui-update", null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -380,11 +380,11 @@ export class Hub {
|
||||
function check(resettingAxes) {
|
||||
window.setTimeout(() => {
|
||||
if (resettingAxes && !me._axesVisible) {
|
||||
Factory.Get(MessageService).publishToChannel("show-axes-calibration");
|
||||
messageService.publishToChannel("show-axes-calibration");
|
||||
me._axesVisible = true;
|
||||
}
|
||||
else if (!resettingAxes && me._axesVisible) {
|
||||
Factory.Get(MessageService).publishToChannel("hide-axes-calibration");
|
||||
messageService.publishToChannel("hide-axes-calibration");
|
||||
me._axesVisible = false;
|
||||
}
|
||||
}, 500);
|
||||
|
||||
@@ -43,6 +43,6 @@ export class LocalizationService extends baseRestService {
|
||||
}
|
||||
|
||||
export const localizationService = new LocalizationService();
|
||||
Factory.Register(LocalizationService);
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -83,7 +83,4 @@ export class LoginInfo {
|
||||
rememberMe: boolean;
|
||||
}
|
||||
|
||||
Factory.Register(LoginService);
|
||||
|
||||
|
||||
export const loginService = new LoginService();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { baseRestService } from "src/_base/baseRestService";
|
||||
import { AreaModel } from "src/store/machineStatus.store";
|
||||
import { store, machineInfoActions, MachineInfoModel } from "src/store";
|
||||
import { Factory, MessageService } from "src/_base";
|
||||
import { Factory, messageService } from "src/_base";
|
||||
|
||||
|
||||
export class machineService extends baseRestService {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { baseRestService } from "src/_base/baseRestService";
|
||||
import { maintenanceActions } from "src/store/maintenance.store";
|
||||
import { ModalHelper } from "src/components/modals";
|
||||
import { Factory, MessageService } from "src/_base";
|
||||
import { Factory, messageService } from "src/_base";
|
||||
import { store, AppModel } from "src/store";
|
||||
import { ModalIframe, ModalImage } from "src/modules/base-components/index";
|
||||
|
||||
|
||||
@@ -60,7 +60,5 @@ export class UsersService extends baseRestService {
|
||||
|
||||
}
|
||||
|
||||
Factory.Register(UsersService);
|
||||
|
||||
|
||||
export const usersService = new UsersService();
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Factory } from "src/_base";
|
||||
|
||||
import { appModelActions, AppModel } from "src/store/app.store";
|
||||
import { VuexPersistance } from "./storePersistance";
|
||||
import { MessageService } from "src/_base";
|
||||
import { messageService } from "src/_base";
|
||||
|
||||
export class languageModel {
|
||||
public name: string;
|
||||
@@ -66,7 +66,7 @@ export const localizationStore = {
|
||||
context.commit("updateData", { currentLanguage: language });
|
||||
// context.commit("setLabels", labels);
|
||||
|
||||
Factory.Get(MessageService).publishToChannel("force-ui-update");
|
||||
messageService.publishToChannel("force-ui-update");
|
||||
|
||||
appModelActions.SetCurrentUserLanguage(context, language);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Factory, MessageService } from "src/_base";
|
||||
import { Factory, messageService } from "src/_base";
|
||||
|
||||
// Check if
|
||||
declare let cmsClient: any;
|
||||
@@ -161,13 +161,13 @@ export const machineStatusStore = {
|
||||
SetSecurityFunction(store, func: signalr_security.securityFunction) {
|
||||
store._functions.set(func.name, func);
|
||||
store.functions = Array.from(store._functions.values());
|
||||
Factory.Get(MessageService).publishToChannel("force-ui-update");
|
||||
messageService.publishToChannel("force-ui-update");
|
||||
},
|
||||
UpdateSecurityFunction(store, func: signalr_security.securityFunction) {
|
||||
if (store._functions.get(func.name) && store._functions.get(func.name).enabled != func.enabled) {
|
||||
store._functions.get(func.name).enabled = func.enabled;
|
||||
store.functions = Array.from(store._functions.values());
|
||||
Factory.Get(MessageService).publishToChannel("force-ui-update");
|
||||
messageService.publishToChannel("force-ui-update");
|
||||
}
|
||||
},
|
||||
UpdateMachineStatus(store, model: MachineStatusModel) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Factory, MessageService } from "src/_base";
|
||||
import { Factory, messageService } from "src/_base";
|
||||
|
||||
// Check if
|
||||
declare let cmsClient: any;
|
||||
|
||||
@@ -80,12 +80,12 @@ if (process.env.NODE_ENV === 'production' || isProduction) {
|
||||
},
|
||||
PRODUCTION: true
|
||||
}),
|
||||
// new webpack.optimize.UglifyJsPlugin({
|
||||
// sourceMap: true,
|
||||
// compress: {
|
||||
// warnings: false
|
||||
// }
|
||||
// }),
|
||||
new webpack.optimize.UglifyJsPlugin({
|
||||
sourceMap: true,
|
||||
compress: {
|
||||
warnings: false
|
||||
}
|
||||
}),
|
||||
new webpack.LoaderOptionsPlugin({
|
||||
minimize: true
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user