inizio refactoring struttura moduli e aggancio allarmi
This commit is contained in:
+20
-18
@@ -31,7 +31,8 @@
|
||||
<script>
|
||||
import Vue from "vue";
|
||||
import { Hub } from "./services/hub";
|
||||
import { Header, Footer, Login, alarmList } from "./app.modules";
|
||||
import { Header, Footer, Login } from "./app.modules";
|
||||
import { alarmList } from "src/app_modules/alarms";
|
||||
import { LoginService } from "src/services/loginService";
|
||||
import { DataService } from "src/services/dataService";
|
||||
import { Factory, MessageService } from "./_base";
|
||||
@@ -48,13 +49,14 @@ export default {
|
||||
appHeader: Header,
|
||||
appFooter: Footer,
|
||||
modalContainer: ModalContainer,
|
||||
alarmList, underTheHood
|
||||
alarmList,
|
||||
underTheHood
|
||||
},
|
||||
beforeMount:function(){
|
||||
moment.locale(window.navigator.userLanguage || window.navigator.language)
|
||||
beforeMount: function() {
|
||||
moment.locale(window.navigator.userLanguage || window.navigator.language);
|
||||
},
|
||||
mounted: function() {
|
||||
let ms = Factory.Get(MessageService);
|
||||
let ms = Factory.Get(MessageService);
|
||||
|
||||
// if cms is connected
|
||||
if (typeof cmsClient != "undefined")
|
||||
@@ -68,9 +70,8 @@ export default {
|
||||
this.applyBlur = false;
|
||||
});
|
||||
|
||||
|
||||
ms.subscribeToChannel("show-modal2", args => {
|
||||
this.applyBlurInternal = true;
|
||||
this.applyBlurInternal = true;
|
||||
});
|
||||
|
||||
ms.subscribeToChannel("hide-modal2", args => {
|
||||
@@ -87,10 +88,10 @@ export default {
|
||||
this.$forceUpdate();
|
||||
});
|
||||
ms.subscribeToChannel("HMI-production-show-state", args => {
|
||||
this.showHMIinProduction=true;
|
||||
this.showHMIinProduction = true;
|
||||
});
|
||||
ms.subscribeToChannel("HMI-production-hide-state", args => {
|
||||
this.showHMIinProduction=false;
|
||||
this.showHMIinProduction = false;
|
||||
});
|
||||
|
||||
let _this = this;
|
||||
@@ -106,9 +107,10 @@ export default {
|
||||
(n, o) => {
|
||||
if (!n) {
|
||||
this.$nextTick(() => ModalHelper.ShowModal(Login));
|
||||
}
|
||||
else
|
||||
new DataService().SetCurrentNcLanguage(this.$store.state.currentUser.language);
|
||||
} else
|
||||
new DataService().SetCurrentNcLanguage(
|
||||
this.$store.state.currentUser.language
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
@@ -120,8 +122,6 @@ export default {
|
||||
Factory.Get(MessageService).publishToChannel("esc_pressed");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
},
|
||||
computed: {
|
||||
isAuthenticated: function() {
|
||||
@@ -148,11 +148,14 @@ export default {
|
||||
//Setup the Position of the View
|
||||
this.applyViewPosition(0);
|
||||
|
||||
//Hide the HMI
|
||||
//Hide the HMI
|
||||
Factory.Get(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("HMI-production-show",700);
|
||||
if (this.showHMIinProduction && this.$route.path.includes("production"))
|
||||
Factory.Get(MessageService).publishToChannel(
|
||||
"HMI-production-show",
|
||||
700
|
||||
);
|
||||
}
|
||||
},
|
||||
loadingOperations: function(n, o) {
|
||||
@@ -213,7 +216,6 @@ export default {
|
||||
"px);" +
|
||||
(removetransition ? "transition:unset;" : "");
|
||||
}
|
||||
|
||||
},
|
||||
data: function() {
|
||||
return {
|
||||
|
||||
@@ -6,7 +6,7 @@ import { LocalizationService } from "./services/localizationService";
|
||||
import Header from "./modules/app-header.vue";
|
||||
import Footer from "./modules/app-footer.vue";
|
||||
import Login from "./modules/login.vue";
|
||||
import alarmList from "./modules/alarms-list.vue";
|
||||
|
||||
import Utilities from "./components/utilities.vue";
|
||||
import Tooling from "./components/tooling/tooling.vue";
|
||||
import UserInfoDialog from "./modules/user-info-dialog.vue";
|
||||
@@ -14,167 +14,166 @@ import MachineInfoDialog from "./modules/machine-info-dialog.vue";
|
||||
import AxesCalibration from "./modules/axes-calibration-dialog.vue";
|
||||
|
||||
export {
|
||||
LoginService,
|
||||
LocalizationService,
|
||||
Header,
|
||||
Footer,
|
||||
Login,
|
||||
UserInfoDialog,
|
||||
MachineInfoDialog,
|
||||
AxesCalibration,
|
||||
alarmList,
|
||||
Utilities,
|
||||
Tooling
|
||||
LoginService,
|
||||
LocalizationService,
|
||||
Header,
|
||||
Footer,
|
||||
Login,
|
||||
UserInfoDialog,
|
||||
MachineInfoDialog,
|
||||
AxesCalibration,
|
||||
|
||||
Utilities,
|
||||
Tooling
|
||||
}
|
||||
|
||||
export const Home = () =>
|
||||
import ("./components/Home.vue");
|
||||
import("./components/Home.vue");
|
||||
|
||||
// export const Tooling = () =>
|
||||
// import ("./components/tooling.vue");
|
||||
|
||||
|
||||
export const Depot = () =>
|
||||
import ("./components/tooling/tooling-depot.vue");
|
||||
import("./components/tooling/tooling-depot.vue");
|
||||
|
||||
export const SummaryDepot = () =>
|
||||
import ("./components/summary-depot.vue");
|
||||
import("./components/summary-depot.vue");
|
||||
|
||||
export const ModalIframe = () =>
|
||||
import ("./modules/base-components/modal-iframe.vue");
|
||||
import("./modules/base-components/modal-iframe.vue");
|
||||
|
||||
export const ModalImage = () =>
|
||||
import ("./modules/base-components/modal-image.vue");
|
||||
import("./modules/base-components/modal-image.vue");
|
||||
|
||||
|
||||
|
||||
export const ToolingEquipment = () =>
|
||||
import ("./components/tooling/tooling-equipment.vue");
|
||||
import("./components/tooling/tooling-equipment.vue");
|
||||
export const InfoEquipment = () =>
|
||||
import ("./components/info-equipment.vue");
|
||||
import("./components/info-equipment.vue");
|
||||
|
||||
export const ToolingFamilies = () =>
|
||||
import ("./components/tooling/tooling-families.vue");
|
||||
import("./components/tooling/tooling-families.vue");
|
||||
|
||||
export const ToolingShanks = () =>
|
||||
import ("./components/tooling/tooling-shanks.vue");
|
||||
import("./components/tooling/tooling-shanks.vue");
|
||||
|
||||
export const ToolingMagPos = () =>
|
||||
import ("./components/tooling/tooling-magpos.vue");
|
||||
import("./components/tooling/tooling-magpos.vue");
|
||||
|
||||
export const Maintenance = () =>
|
||||
import ("./components/maintenance.vue");
|
||||
import("./components/maintenance.vue");
|
||||
|
||||
|
||||
export const AlarmHistory = () =>
|
||||
import ("./components/alarm-history.vue");
|
||||
|
||||
export const Production = () =>
|
||||
import ("./components/production.vue");
|
||||
import("./components/production.vue");
|
||||
|
||||
export const Scada = () =>
|
||||
import ("./components/scada.vue");
|
||||
import("./components/scada.vue");
|
||||
|
||||
export const CreateQueue = () =>
|
||||
import ("./components/create-queue.vue");
|
||||
import("./components/create-queue.vue");
|
||||
|
||||
export const SoftKeysPrefered = () =>
|
||||
import ("./modules/base-components/cards/softkeys-prefered.vue");
|
||||
import("./modules/base-components/cards/softkeys-prefered.vue");
|
||||
|
||||
/* Da cancellare dopo sviluppo */
|
||||
export const MaintenanceProgress = () =>
|
||||
import ("./modules/base-components/maintenance-progress.vue");
|
||||
import("./modules/base-components/maintenance-progress.vue");
|
||||
|
||||
export const MaintenanceCard = () =>
|
||||
import ("./modules/base-components/cards/maintenance-card.vue");
|
||||
import("./modules/base-components/cards/maintenance-card.vue");
|
||||
|
||||
export const MaintenanceWizard = () =>
|
||||
import ("./modules/base-components/cards/card-maintenance-wizard.vue");
|
||||
import("./modules/base-components/cards/card-maintenance-wizard.vue");
|
||||
|
||||
export const CreateMaintenance = () =>
|
||||
import ("./modules/create-maintenance.vue");
|
||||
import("./modules/create-maintenance.vue");
|
||||
|
||||
export const LoadDepot = () =>
|
||||
import ("./modules/base-components/load-depot.vue");
|
||||
import("./modules/base-components/load-depot.vue");
|
||||
|
||||
export const DepotActionLoading = () =>
|
||||
import ("./components/tooling/depot-action-loading.vue");
|
||||
import("./components/tooling/depot-action-loading.vue");
|
||||
|
||||
export const DepotActionTransfer = () =>
|
||||
import ("./components/tooling/depot-action-transfer.vue");
|
||||
import("./components/tooling/depot-action-transfer.vue");
|
||||
export const DepotActionUnloading = () =>
|
||||
import ("./components/tooling/depot-action-unloading.vue");
|
||||
import("./components/tooling/depot-action-unloading.vue");
|
||||
|
||||
export const DepotActionGeneric = () =>
|
||||
import ("./components/tooling/depot-action-generic.vue");
|
||||
import("./components/tooling/depot-action-generic.vue");
|
||||
|
||||
export const JobEditor = () =>
|
||||
import ("./components/job-editor.vue");
|
||||
import("./components/job-editor.vue");
|
||||
|
||||
export const ObjectsJob = () =>
|
||||
import ("./modules/base-components/cards/objects-job.vue");
|
||||
import("./modules/base-components/cards/objects-job.vue");
|
||||
|
||||
// export const Utilities = () =>
|
||||
// import ("./components/utilities.vue");
|
||||
|
||||
export const MissingTool = () =>
|
||||
import ("./modules/base-components/cards/missing-tool.vue");
|
||||
import("./modules/base-components/cards/missing-tool.vue");
|
||||
|
||||
export const CardUtilities = () =>
|
||||
import ("./modules/base-components/cards/card-utilities.vue");
|
||||
import("./modules/base-components/cards/card-utilities.vue");
|
||||
export const CardToolDepot = () =>
|
||||
import ("./modules/base-components/cards/card-tool-depot.vue");
|
||||
import("./modules/base-components/cards/card-tool-depot.vue");
|
||||
|
||||
export const CardAssistedTooling = () =>
|
||||
import ("./modules/base-components/cards/card-assisted-tooling.vue");
|
||||
import("./modules/base-components/cards/card-assisted-tooling.vue");
|
||||
|
||||
export const HeadSpindle = () =>
|
||||
import ("./modules/heads/head-SPINDLE.vue");
|
||||
import("./modules/heads/head-SPINDLE.vue");
|
||||
|
||||
export const HeadProduction = () =>
|
||||
import ("./modules/heads/head-production.vue");
|
||||
import("./modules/heads/head-production.vue");
|
||||
|
||||
export const CardAxesProduction = () =>
|
||||
import ("./modules/base-components/cards/card-axes-production.vue");
|
||||
import("./modules/base-components/cards/card-axes-production.vue");
|
||||
|
||||
export const CardProductionCms = () =>
|
||||
import ("./modules/base-components/cards/card-production-cms.vue");
|
||||
import("./modules/base-components/cards/card-production-cms.vue");
|
||||
|
||||
export const CardFolderPath = () =>
|
||||
import ("./modules/base-components/cards/card-folder-path.vue");
|
||||
import("./modules/base-components/cards/card-folder-path.vue");
|
||||
|
||||
export const CardElementQueue = () =>
|
||||
import ("./modules/base-components/cards/card-element-queue.vue");
|
||||
import("./modules/base-components/cards/card-element-queue.vue");
|
||||
export const CardQueueProduction = () =>
|
||||
import ("./modules/base-components/cards/card-queue-production.vue");
|
||||
import("./modules/base-components/cards/card-queue-production.vue");
|
||||
|
||||
export const CardJobProduction = () =>
|
||||
import ("./modules/base-components/cards/card-job-production.vue");
|
||||
import("./modules/base-components/cards/card-job-production.vue");
|
||||
|
||||
export const CardProductionSectionFile = () =>
|
||||
import ("./modules/base-components/cards/card-production-section-file.vue");
|
||||
import("./modules/base-components/cards/card-production-section-file.vue");
|
||||
|
||||
export const ModalLoadProgram = () =>
|
||||
import ("./modules/base-components/modal-load-program.vue");
|
||||
import("./modules/base-components/modal-load-program.vue");
|
||||
|
||||
export const ModalJobAddParameter = () =>
|
||||
import ("./modules/base-components/modal-job-add-parameter.vue");
|
||||
import("./modules/base-components/modal-job-add-parameter.vue");
|
||||
|
||||
export const ModalEditJob = () =>
|
||||
import ("./modules/base-components/modal-edit-job.vue");
|
||||
import("./modules/base-components/modal-edit-job.vue");
|
||||
|
||||
export const ModalAddOffsetTool = () =>
|
||||
import ("./modules/base-components/modal-add-offset-tool.vue");
|
||||
import("./modules/base-components/modal-add-offset-tool.vue");
|
||||
|
||||
export const ModalMissingTools = () =>
|
||||
import ("./modules/base-components/modal-missing-tools.vue");
|
||||
import("./modules/base-components/modal-missing-tools.vue");
|
||||
|
||||
export const ProgramManagement = () =>
|
||||
import ("./modules/program-management.vue");
|
||||
import("./modules/program-management.vue");
|
||||
|
||||
// Test pages
|
||||
export const TestLoader = () =>
|
||||
import ("./components/test-loader.vue");
|
||||
import("./components/test-loader.vue");
|
||||
export const TestEmpty = () =>
|
||||
import ("./components/test-empty.vue");
|
||||
import("./components/test-empty.vue");
|
||||
export const TestHeader = () =>
|
||||
import ("./components/test-status.vue");
|
||||
import ("./components/test-status.vue");
|
||||
import("./components/test-status.vue");
|
||||
import("./components/test-status.vue");
|
||||
|
||||
+118
-106
@@ -1,129 +1,141 @@
|
||||
import {
|
||||
Home,
|
||||
TestLoader,
|
||||
TestEmpty,
|
||||
TestHeader,
|
||||
Tooling,
|
||||
Depot,
|
||||
SummaryDepot,
|
||||
Home,
|
||||
TestLoader,
|
||||
TestEmpty,
|
||||
TestHeader,
|
||||
Tooling,
|
||||
Depot,
|
||||
SummaryDepot,
|
||||
|
||||
ToolingEquipment,
|
||||
InfoEquipment,
|
||||
Utilities,
|
||||
CardUtilities,
|
||||
Maintenance,
|
||||
MaintenanceProgress,
|
||||
MaintenanceCard,
|
||||
ToolingFamilies,
|
||||
ToolingShanks,
|
||||
ToolingMagPos,
|
||||
ToolingEquipment,
|
||||
InfoEquipment,
|
||||
Utilities,
|
||||
CardUtilities,
|
||||
Maintenance,
|
||||
MaintenanceProgress,
|
||||
MaintenanceCard,
|
||||
ToolingFamilies,
|
||||
ToolingShanks,
|
||||
ToolingMagPos,
|
||||
|
||||
CardAssistedTooling,
|
||||
CardAssistedTooling,
|
||||
|
||||
CardToolDepot,
|
||||
MaintenanceWizard,
|
||||
CreateMaintenance,
|
||||
LoadDepot,
|
||||
DepotActionLoading,
|
||||
DepotActionTransfer,
|
||||
DepotActionUnloading,
|
||||
DepotActionGeneric,
|
||||
Production,
|
||||
SoftKeysPrefered,
|
||||
CreateQueue,
|
||||
HeadSpindle,
|
||||
HeadProduction,
|
||||
CardAxesProduction,
|
||||
CardFolderPath,
|
||||
ModalIframe,
|
||||
CardElementQueue,
|
||||
CardProductionCms,
|
||||
CardQueueProduction,
|
||||
CardJobProduction,
|
||||
CardProductionSectionFile,
|
||||
ModalLoadProgram,
|
||||
ProgramManagement,
|
||||
ModalJobAddParameter,
|
||||
ModalEditJob,
|
||||
JobEditor,
|
||||
ObjectsJob,
|
||||
MissingTool,
|
||||
ModalMissingTools,
|
||||
AlarmHistory,
|
||||
ModalAddOffsetTool,
|
||||
Scada
|
||||
CardToolDepot,
|
||||
MaintenanceWizard,
|
||||
CreateMaintenance,
|
||||
LoadDepot,
|
||||
DepotActionLoading,
|
||||
DepotActionTransfer,
|
||||
DepotActionUnloading,
|
||||
DepotActionGeneric,
|
||||
Production,
|
||||
SoftKeysPrefered,
|
||||
CreateQueue,
|
||||
HeadSpindle,
|
||||
HeadProduction,
|
||||
CardAxesProduction,
|
||||
CardFolderPath,
|
||||
ModalIframe,
|
||||
CardElementQueue,
|
||||
CardProductionCms,
|
||||
CardQueueProduction,
|
||||
CardJobProduction,
|
||||
CardProductionSectionFile,
|
||||
ModalLoadProgram,
|
||||
ProgramManagement,
|
||||
ModalJobAddParameter,
|
||||
ModalEditJob,
|
||||
JobEditor,
|
||||
ObjectsJob,
|
||||
MissingTool,
|
||||
ModalMissingTools,
|
||||
|
||||
ModalAddOffsetTool,
|
||||
Scada
|
||||
} from "./app.modules";
|
||||
|
||||
|
||||
function injectRoutes(mainRoute, childroutes) {
|
||||
for (const key in childroutes) {
|
||||
const element = childroutes[key];
|
||||
mainRoute.push(element);
|
||||
}
|
||||
}
|
||||
|
||||
export let routes = [
|
||||
{ path: "", component: Home, name: "home", meta: { title: "Dashboard" } },
|
||||
{ path: "/production", component: Production, meta: { title: "Production", area: "production" } },
|
||||
{ path: "", component: Home, name: "home", meta: { title: "Dashboard" } },
|
||||
{ path: "/production", component: Production, meta: { title: "Production", area: "production" } },
|
||||
|
||||
{ path: "/tooling", component: Tooling, meta: { title: "Tools", area: "tooling" } },
|
||||
{ name: "tooling-depot", path: "/tooling-depot/:id", component: Depot, meta: { title: "Depot", area: "depot" } },
|
||||
{ path: "/tooling", component: Tooling, meta: { title: "Tools", area: "tooling" } },
|
||||
{ name: "tooling-depot", path: "/tooling-depot/:id", component: Depot, meta: { title: "Depot", area: "depot" } },
|
||||
|
||||
{ path: "/summary-depot", component: SummaryDepot, meta: { title: "Summary-Depot", area: "summary-depot" } },
|
||||
{ path: "/tooling-equipment/:id?", component: ToolingEquipment, meta: { title: "Tooling-Equipment", area: "tooling-equipment" } },
|
||||
{ path: "/tooling-families", component: ToolingFamilies, meta: { title: "Tooling-Families", area: "tooling-families" } },
|
||||
{ path: "/tooling-shanks", component: ToolingShanks, meta: { title: "Tooling-Shanks", area: "tooling-shanks" } },
|
||||
{ path: "/tooling-magpos", component: ToolingMagPos, meta: { title: "Tooling-MagPos", area: "tooling-magpos" } },
|
||||
{ path: "/info-equipment", component: InfoEquipment, meta: { title: "Info-Equipment", area: "info-equipment" } },
|
||||
{ path: "/utilities", component: Utilities, meta: { title: "Utilities", area: "utilities" } },
|
||||
{ path: "/card-utilities", component: CardUtilities, meta: { title: "Card-Utilities", area: "card-utilities" } },
|
||||
{ path: "/card-tool-depot", component: CardToolDepot, meta: { title: "Card-Tool-Depot", area: "card-tool-depot" } },
|
||||
{ path: "/load-depot", component: LoadDepot, meta: { title: "Load-Depot", area: "loaddepot" } },
|
||||
{ path: "/summary-depot", component: SummaryDepot, meta: { title: "Summary-Depot", area: "summary-depot" } },
|
||||
{ path: "/tooling-equipment/:id?", component: ToolingEquipment, meta: { title: "Tooling-Equipment", area: "tooling-equipment" } },
|
||||
{ path: "/tooling-families", component: ToolingFamilies, meta: { title: "Tooling-Families", area: "tooling-families" } },
|
||||
{ path: "/tooling-shanks", component: ToolingShanks, meta: { title: "Tooling-Shanks", area: "tooling-shanks" } },
|
||||
{ path: "/tooling-magpos", component: ToolingMagPos, meta: { title: "Tooling-MagPos", area: "tooling-magpos" } },
|
||||
{ path: "/info-equipment", component: InfoEquipment, meta: { title: "Info-Equipment", area: "info-equipment" } },
|
||||
{ path: "/utilities", component: Utilities, meta: { title: "Utilities", area: "utilities" } },
|
||||
{ path: "/card-utilities", component: CardUtilities, meta: { title: "Card-Utilities", area: "card-utilities" } },
|
||||
{ path: "/card-tool-depot", component: CardToolDepot, meta: { title: "Card-Tool-Depot", area: "card-tool-depot" } },
|
||||
{ path: "/load-depot", component: LoadDepot, meta: { title: "Load-Depot", area: "loaddepot" } },
|
||||
|
||||
{ path: "/softkeys-prefered", component: SoftKeysPrefered, meta: { title: "Softkeys-Prefered", area: "softkeys-prefered" } },
|
||||
{ path: "/create-queue", component: CreateQueue, meta: { title: "Create-Queue", area: "create-queue" } },
|
||||
{ path: "/softkeys-prefered", component: SoftKeysPrefered, meta: { title: "Softkeys-Prefered", area: "softkeys-prefered" } },
|
||||
{ path: "/create-queue", component: CreateQueue, meta: { title: "Create-Queue", area: "create-queue" } },
|
||||
|
||||
{ path: "/head-spindle", component: HeadSpindle, meta: { title: "Head-Spindle", area: "head-spindle" } },
|
||||
{ path: "/head-production", component: HeadProduction, meta: { title: "Head-Production", area: "head-production" } },
|
||||
{ path: "/card-axes-production", component: CardAxesProduction, meta: { title: "Card-Axes-Production", area: "card-axes-production" } },
|
||||
{ path: "/card-production-cms", component: CardProductionCms, meta: { title: "Card-Production-Cms", area: "card-production-cms" } },
|
||||
{ path: "/card-queue-production", component: CardQueueProduction, meta: { title: "Card-Queue-Production", area: "card-queue-production" } },
|
||||
{ path: "/card-job-production", component: CardJobProduction, meta: { title: "Card-Job-Production", area: "card-job-production" } },
|
||||
{ path: "/card-production-section-file", component: CardProductionSectionFile, meta: { title: "Card-Production-Section-File", area: "card-production-section-file" } },
|
||||
{ path: "/modal-load-program", component: ModalLoadProgram, meta: { title: "Modal-Load-Program", area: "modal-load-program" } },
|
||||
{ path: "/head-spindle", component: HeadSpindle, meta: { title: "Head-Spindle", area: "head-spindle" } },
|
||||
{ path: "/head-production", component: HeadProduction, meta: { title: "Head-Production", area: "head-production" } },
|
||||
{ path: "/card-axes-production", component: CardAxesProduction, meta: { title: "Card-Axes-Production", area: "card-axes-production" } },
|
||||
{ path: "/card-production-cms", component: CardProductionCms, meta: { title: "Card-Production-Cms", area: "card-production-cms" } },
|
||||
{ path: "/card-queue-production", component: CardQueueProduction, meta: { title: "Card-Queue-Production", area: "card-queue-production" } },
|
||||
{ path: "/card-job-production", component: CardJobProduction, meta: { title: "Card-Job-Production", area: "card-job-production" } },
|
||||
{ path: "/card-production-section-file", component: CardProductionSectionFile, meta: { title: "Card-Production-Section-File", area: "card-production-section-file" } },
|
||||
{ path: "/modal-load-program", component: ModalLoadProgram, meta: { title: "Modal-Load-Program", area: "modal-load-program" } },
|
||||
|
||||
{ path: "/modal-job-add-parameter", component: ModalJobAddParameter, meta: { title: "Modal-Job-Add-Parameter", area: "modal-job-add-parameter" } },
|
||||
{ path: "/modal-edit-job", component: ModalEditJob, meta: { title: "Modal-Edit-Job", area: "modal-edit-job" } },
|
||||
{ path: "/modal-job-add-parameter", component: ModalJobAddParameter, meta: { title: "Modal-Job-Add-Parameter", area: "modal-job-add-parameter" } },
|
||||
{ path: "/modal-edit-job", component: ModalEditJob, meta: { title: "Modal-Edit-Job", area: "modal-edit-job" } },
|
||||
|
||||
{ path: "/modal-add-offset-tool", component: ModalAddOffsetTool, meta: { title: "Modal-Add-Offset-Tool", area: "modal-add-offset-tool" } },
|
||||
{ path: "/modal-add-offset-tool", component: ModalAddOffsetTool, meta: { title: "Modal-Add-Offset-Tool", area: "modal-add-offset-tool" } },
|
||||
|
||||
{ path: "/card-folder-path", component: CardFolderPath, meta: { title: "Card-Folder-Path", area: "card-folder-path" } },
|
||||
{ path: "/card-element-queue", component: CardElementQueue, meta: { title: "Card-Element-Queue", area: "card-element-queue" } },
|
||||
{ path: "/card-folder-path", component: CardFolderPath, meta: { title: "Card-Folder-Path", area: "card-folder-path" } },
|
||||
{ path: "/card-element-queue", component: CardElementQueue, meta: { title: "Card-Element-Queue", area: "card-element-queue" } },
|
||||
|
||||
{ path: "/card-assisted-tooling", component: CardAssistedTooling, meta: { title: "Card-Assisted-Tooling", area: "card-assisted-tooling" } },
|
||||
{ path: "/card-assisted-tooling", component: CardAssistedTooling, meta: { title: "Card-Assisted-Tooling", area: "card-assisted-tooling" } },
|
||||
|
||||
{ path: "/depot-action-loading", component: DepotActionLoading, meta: { title: "Depot-Action-Loading", area: "depot-action-loading" } },
|
||||
{ path: "/depot-action-transfer", component: DepotActionTransfer, meta: { title: "Depot-Action-Transfer", area: "depot-action-transfer" } },
|
||||
{ path: "/depot-action-unloading", component: DepotActionUnloading, meta: { title: "Depot-Action-Unloading", area: "depot-action-unloading" } },
|
||||
{ path: "/depot-action-generic", component: DepotActionGeneric, meta: { title: "Depot-Action-Generic", area: "depot-action-generic" } },
|
||||
{ path: "/depot-action-loading", component: DepotActionLoading, meta: { title: "Depot-Action-Loading", area: "depot-action-loading" } },
|
||||
{ path: "/depot-action-transfer", component: DepotActionTransfer, meta: { title: "Depot-Action-Transfer", area: "depot-action-transfer" } },
|
||||
{ path: "/depot-action-unloading", component: DepotActionUnloading, meta: { title: "Depot-Action-Unloading", area: "depot-action-unloading" } },
|
||||
{ path: "/depot-action-generic", component: DepotActionGeneric, meta: { title: "Depot-Action-Generic", area: "depot-action-generic" } },
|
||||
|
||||
{ path: "/alarm-history", component: AlarmHistory, meta: { title: "Alarm-History", area: "alarm-history" } },
|
||||
|
||||
{ path: "/job-editor", component: JobEditor, meta: { title: "Job-Editor", area: "jobeditor" } },
|
||||
|
||||
{ path: "/objects-job", component: ObjectsJob, meta: { title: "Objects Job", area: "objects-jobs" } },
|
||||
{ path: "/job-editor", component: JobEditor, meta: { title: "Job-Editor", area: "jobeditor" } },
|
||||
|
||||
{ path: "/missing-tool", component: MissingTool, meta: { title: "Missing Tool", area: "missing-tool" } },
|
||||
{ path: "/objects-job", component: ObjectsJob, meta: { title: "Objects Job", area: "objects-jobs" } },
|
||||
|
||||
{ path: "/modal-missing-tools", component: ModalMissingTools, meta: { title: "Modal Missing Tools", area: "modal-missing-tools" } },
|
||||
{ path: "/missing-tool", component: MissingTool, meta: { title: "Missing Tool", area: "missing-tool" } },
|
||||
|
||||
{ path: "/program-management", component: ProgramManagement, meta: { title: "Program-Management", area: "program-management" } },
|
||||
{ path: "/modal-missing-tools", component: ModalMissingTools, meta: { title: "Modal Missing Tools", area: "modal-missing-tools" } },
|
||||
|
||||
{ path: "/maintenance-progress", component: MaintenanceProgress, meta: { title: "Maintenance-Progress", area: "maintenance-progress" } },
|
||||
{ path: "/maintenance-card", component: MaintenanceCard, meta: { title: "Maintenance-Card", area: "maintenance-card" } },
|
||||
{ path: "/card-maintenance-wizard", component: MaintenanceWizard, meta: { title: "Maintenance-Wizard", area: "card-maintenance-wizard" } },
|
||||
{ path: "/create-maintenance", component: CreateMaintenance, meta: { title: "Create-Maintenance", area: "create-maintenance" } },
|
||||
{ path: "/create-maintenance", component: CreateMaintenance, meta: { title: "Create-Maintenance", area: "create-maintenance" } },
|
||||
{ path: "/modal-iframe", component: ModalIframe, meta: { title: "Modal-Iframe", area: "modal-iframe" } },
|
||||
{ path: "/report", meta: { title: "Reports", area: "report" } },
|
||||
{ path: "/alarms", meta: { title: "Alarms", area: "alarms" } },
|
||||
{ path: "/maintenance/:id?", name: "maintenance", component: Maintenance, meta: { title: "Maintenance", area: "maintenance" } },
|
||||
/* path precedente cosa fare? Non ha il component */
|
||||
// { path: "/utilities", meta: { title: "Utility", area: "utilities" } },
|
||||
{ path: "/scada", component: Scada, meta: { title: "", area: "scada" } },
|
||||
{ path: "/test/loader", component: TestLoader, name: "testloader" },
|
||||
{ path: "/test/empty", component: TestEmpty, name: "testloader" },
|
||||
{ path: "/test/header", component: TestHeader, name: "testHeader" }
|
||||
];
|
||||
{ path: "/program-management", component: ProgramManagement, meta: { title: "Program-Management", area: "program-management" } },
|
||||
|
||||
{ path: "/maintenance-progress", component: MaintenanceProgress, meta: { title: "Maintenance-Progress", area: "maintenance-progress" } },
|
||||
{ path: "/maintenance-card", component: MaintenanceCard, meta: { title: "Maintenance-Card", area: "maintenance-card" } },
|
||||
{ path: "/card-maintenance-wizard", component: MaintenanceWizard, meta: { title: "Maintenance-Wizard", area: "card-maintenance-wizard" } },
|
||||
{ path: "/create-maintenance", component: CreateMaintenance, meta: { title: "Create-Maintenance", area: "create-maintenance" } },
|
||||
{ path: "/create-maintenance", component: CreateMaintenance, meta: { title: "Create-Maintenance", area: "create-maintenance" } },
|
||||
{ path: "/modal-iframe", component: ModalIframe, meta: { title: "Modal-Iframe", area: "modal-iframe" } },
|
||||
{ path: "/report", meta: { title: "Reports", area: "report" } },
|
||||
|
||||
{ path: "/maintenance/:id?", name: "maintenance", component: Maintenance, meta: { title: "Maintenance", area: "maintenance" } },
|
||||
/* path precedente cosa fare? Non ha il component */
|
||||
// { path: "/utilities", meta: { title: "Utility", area: "utilities" } },
|
||||
{ path: "/scada", component: Scada, meta: { title: "", area: "scada" } },
|
||||
{ path: "/test/loader", component: TestLoader, name: "testloader" },
|
||||
{ path: "/test/empty", component: TestEmpty, name: "testloader" },
|
||||
{ path: "/test/header", component: TestHeader, name: "testHeader" }
|
||||
];
|
||||
|
||||
|
||||
import { routes as alarmRoutes } from "./app_modules/alarms/route";
|
||||
injectRoutes(routes, alarmRoutes);
|
||||
|
||||
+10
-9
@@ -1,9 +1,10 @@
|
||||
import Vue from "vue";
|
||||
import Component from "vue-class-component";
|
||||
import { Watch } from "vue-property-decorator";
|
||||
import { ModalHelper } from "./base-components";
|
||||
import { ModalHelper } from "src/modules/base-components";
|
||||
import { store, AppModel, AlarmModel, alarmsModelActions,appModelActions } from "src/store";
|
||||
import { alarmItem, alarmDetail } from "./alarms";
|
||||
import alarmItem from "./alarm-item.vue";
|
||||
import alarmDetail from "./alarm-detail.vue";
|
||||
import moment from "moment";
|
||||
import { Hub } from "src/services/hub";
|
||||
|
||||
@@ -58,17 +59,17 @@ export default class alarmsList extends Vue {
|
||||
this.currentAlarm = null;
|
||||
}
|
||||
}, 200);
|
||||
|
||||
|
||||
if(this.currentAlarm && this.currentAlarm.type === "alarm"){
|
||||
//Find if now is a warning
|
||||
let alarm = this.$store.state.alarms.warnings.find(x => x.uid === this.currentAlarm.uid);
|
||||
if(alarm){
|
||||
if(alarm){
|
||||
this.currentAlarm = alarm;
|
||||
}
|
||||
else{
|
||||
//Find if is deleted and set the status
|
||||
alarm = this.$store.state.alarms.alarms.find(x => x.uid === this.currentAlarm.uid);
|
||||
if(!alarm){
|
||||
if(!alarm){
|
||||
this.currentAlarm.status = "deleted";
|
||||
}
|
||||
//Find if was deleted and now back to active
|
||||
@@ -76,17 +77,17 @@ export default class alarmsList extends Vue {
|
||||
this.currentAlarm = alarm;
|
||||
this.currentAlarm.status = "active";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(this.currentAlarm && this.currentAlarm.type === "warning"){
|
||||
let alarm = this.$store.state.alarms.alarms.find(x => x.uid === this.currentAlarm.uid);
|
||||
if(alarm){
|
||||
if(alarm){
|
||||
this.currentAlarm = alarm;
|
||||
}
|
||||
else{
|
||||
//Find if is deleted and set the status
|
||||
alarm = this.$store.state.alarms.warnings.find(x => x.uid === this.currentAlarm.uid);
|
||||
if(!alarm){
|
||||
if(!alarm){
|
||||
this.currentAlarm.status = "deleted";
|
||||
}
|
||||
//Find if was deleted and now back to active
|
||||
@@ -124,7 +125,7 @@ export default class alarmsList extends Vue {
|
||||
|
||||
|
||||
public selectMaintenance(m){
|
||||
|
||||
|
||||
appModelActions.MainViewLiftDown(this.$store);
|
||||
this.$router.push({ name: 'maintenance', params: {id: m.id }});
|
||||
alarmsModelActions.toggleServiceClosed(store,false);
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
@on-show-detail="selectAlarm(alarm)"
|
||||
v-for="alarm in alarms" :key="alarm.id"></alarm-item>
|
||||
<div class="general-buttons" :class="{collapsed: currentAlarm}">
|
||||
<button class="btn">
|
||||
<button class="btn" @click="$router.push({name:'alarms'})">
|
||||
{{'alarms_btn_history_show' | localize("Vedi storico allarmi")}}
|
||||
</button>
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
import alarmItem from "./components/alarm-item.vue";
|
||||
import alarmDetail from "./components/alarm-detail.vue";
|
||||
import alarmList from "./components/alarms-list.vue";
|
||||
|
||||
export const AlarmHistory = () => import("./components/alarm-history.vue");
|
||||
|
||||
export { alarmItem, alarmDetail, alarmList }
|
||||
@@ -0,0 +1,9 @@
|
||||
import { AlarmHistory } from "./index.js"
|
||||
|
||||
export const routes = [
|
||||
{
|
||||
name: 'alarms', path: "/alarms",
|
||||
meta: { title: "Alarms", area: "alarms" },
|
||||
component: AlarmHistory
|
||||
}];
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
import alarmItem from "./alarm-item.vue";
|
||||
import alarmDetail from "./alarm-detail.vue";
|
||||
export { alarmItem, alarmDetail }
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
import { AlarmsModelActionsInterface } from "../store/alarms.store"
|
||||
import { store, alarmsModelActions, machineStatusActions, machineInfoActions, AppModel, appModelActions } from "src/store";
|
||||
import { alarmDetail } from "src/modules/alarms";
|
||||
|
||||
import iziToast, { IziToastSettings } from "izitoast";
|
||||
import { Factory, MessageService } from "src/_base";
|
||||
import { signalr_alarms } from "src/@types/signalr.alarms";
|
||||
@@ -99,7 +99,7 @@ export class Hub {
|
||||
if (state.newState == $.signalR.connectionState.connected) {
|
||||
Hub.manageServerStatus("connected");
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
$.connection.hub.start();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user