From 6f144ffaab3d5cb5287c463f0b3796136fff05e6 Mon Sep 17 00:00:00 2001 From: Paolo Possanzini Date: Thu, 19 Jul 2018 11:46:26 +0200 Subject: [PATCH] fix caricamento tool table --- Step/wwwroot/src/app.business-logic.ts | 2 +- Step/wwwroot/src/components/info-equipment.vue | 10 +++++----- .../src/components/tooling/tooling-equipment.ts | 10 +++++----- .../wwwroot/src/components/tooling/tooling-families.ts | 6 +++--- Step/wwwroot/src/components/tooling/tooling-magpos.ts | 4 ++-- Step/wwwroot/src/components/tooling/tooling-shanks.ts | 8 ++++---- Step/wwwroot/src/components/tooling/tooling.ts | 2 +- Step/wwwroot/src/services/toolingService.ts | 4 +++- 8 files changed, 24 insertions(+), 22 deletions(-) diff --git a/Step/wwwroot/src/app.business-logic.ts b/Step/wwwroot/src/app.business-logic.ts index a2d531cd..e9ca4b03 100644 --- a/Step/wwwroot/src/app.business-logic.ts +++ b/Step/wwwroot/src/app.business-logic.ts @@ -70,7 +70,7 @@ async function loadMachineConfig() { ds.GetSoftKeysConfiguration(); ds.GetNcSoftKeysConfiguration(); ds.GetHeadsConfiguration(); - ts.GetToolTableConfiguration(); + ts.GetToolsConfiguration(); // load default language if ((store.state as AppModel).localization.currentLanguage == "") diff --git a/Step/wwwroot/src/components/info-equipment.vue b/Step/wwwroot/src/components/info-equipment.vue index 1707a08c..a50dbd88 100644 --- a/Step/wwwroot/src/components/info-equipment.vue +++ b/Step/wwwroot/src/components/info-equipment.vue @@ -16,7 +16,7 @@
-
+
{{'toolinginfo_explain_lbl' | localize("Termina l'atrezzaggio del magazzino per modificare l'utensile")}}
@@ -117,7 +117,7 @@ export default { // } }, async beforeCreate(){ - await new ToolingService().GetToolsConfiguration(); + // await new ToolingService().GetToolsConfiguration(); if(ModalHelper.infoEquipmentModal.enableModalShank){ if(ModalHelper.infoEquipmentModal.currentShank){ this.selectedTool = ModalHelper.infoEquipmentModal.currentShank; @@ -136,14 +136,14 @@ export default { if(this.enableModalTool){ if(this.selectedTool && (this.selectedTool.toolType==151 || this.selectedTool.toolType==700)) return "../assets/icons/Tools/Saw.png"; - else + else return "../assets/icons/Tools/Tools.png"; } else return "../assets/icons/Tools/Shanks.png"; - }, + }, openEditTool(tool) { - if(tool){ + if(tool){ ModalHelper.HideModal(); this.$router.push({ path: '../tooling-equipment/'+tool}); } diff --git a/Step/wwwroot/src/components/tooling/tooling-equipment.ts b/Step/wwwroot/src/components/tooling/tooling-equipment.ts index b3026806..b1b80519 100644 --- a/Step/wwwroot/src/components/tooling/tooling-equipment.ts +++ b/Step/wwwroot/src/components/tooling/tooling-equipment.ts @@ -16,7 +16,7 @@ export default class toolingEquipment extends Vue { public get magazineStatusModel(): server.MagazineStatus { return (this.$store.state as AppModel).depot.magazineStatusModel; - } + } public get tools(): server.Tool[] { return (this.$store.state as AppModel).tooling.tools; } @@ -90,9 +90,9 @@ export default class toolingEquipment extends Vue { public enableAddEdge: any = false; async mounted() { - + await new ToolingService().GetTools(); - await new ToolingService().GetToolsConfiguration(); + // await new ToolingService().GetToolsConfiguration(); this.toolsConfiguration = (this.$store.state as AppModel).tooling.toolsConfiguration; this.edgeConfiguration = (this.$store.state as AppModel).tooling.edgesConfiguration; @@ -125,7 +125,7 @@ export default class toolingEquipment extends Vue { this.scrollLeft -= (delta * 40); e.preventDefault(); }); - + } public filterShowparamLife(categoryName) { @@ -241,7 +241,7 @@ export default class toolingEquipment extends Vue { } public cancel = function () { - + if (this.copySelectedTool) { this.selectedTool = this.copySelectedTool; toolingActions.updateTool(store, this.copySelectedTool); diff --git a/Step/wwwroot/src/components/tooling/tooling-families.ts b/Step/wwwroot/src/components/tooling/tooling-families.ts index 668a9960..07c5dc95 100644 --- a/Step/wwwroot/src/components/tooling/tooling-families.ts +++ b/Step/wwwroot/src/components/tooling/tooling-families.ts @@ -18,7 +18,7 @@ export default class toolingFamilies extends Vue { public get magazineStatusModel(): server.MagazineStatus { return (this.$store.state as AppModel).depot.magazineStatusModel; - } + } public searchText: string = ""; public currentFilter : string = ""; @@ -65,7 +65,7 @@ export default class toolingFamilies extends Vue { async mounted() { await new ToolingService().GetFamilies(); - await new ToolingService().GetToolsConfiguration(); + // await new ToolingService().GetToolsConfiguration(); this.familyConfiguration = (this.$store.state as AppModel).tooling.familyConfiguration; @@ -87,7 +87,7 @@ export default class toolingFamilies extends Vue { } public openEditTool = function (tool: any) { - if(tool){ + if(tool){ this.$router.push({ path: 'tooling-equipment/'+tool}); } } diff --git a/Step/wwwroot/src/components/tooling/tooling-magpos.ts b/Step/wwwroot/src/components/tooling/tooling-magpos.ts index 7b80653a..37edd357 100644 --- a/Step/wwwroot/src/components/tooling/tooling-magpos.ts +++ b/Step/wwwroot/src/components/tooling/tooling-magpos.ts @@ -17,7 +17,7 @@ export default class toolingMagPos extends Vue { public get magazineStatusModel(): server.MagazineStatus { return (this.$store.state as AppModel).depot.magazineStatusModel; - } + } public searchText: string = ""; public currentFilter: string = ""; @@ -53,7 +53,7 @@ export default class toolingMagPos extends Vue { mounted() { new ToolingService().GetMagazinesPositions(); - new ToolingService().GetToolsConfiguration(); + // new ToolingService().GetToolsConfiguration(); this.magposConfiguration = (this.$store.state as AppModel).tooling.magazinePosConfiguration; this.modalBlockMagazine(); } diff --git a/Step/wwwroot/src/components/tooling/tooling-shanks.ts b/Step/wwwroot/src/components/tooling/tooling-shanks.ts index 3f046611..1fd75169 100644 --- a/Step/wwwroot/src/components/tooling/tooling-shanks.ts +++ b/Step/wwwroot/src/components/tooling/tooling-shanks.ts @@ -88,7 +88,7 @@ export default class toolingShanks extends Vue { async mounted() { await new ToolingService().GetShanks(); - await new ToolingService().GetToolsConfiguration(); + // await new ToolingService().GetToolsConfiguration(); this.shankConfiguration = (this.$store.state as AppModel).tooling.shankConfiguration; this.childToolsShank = (this.$store.state as AppModel).tooling.childToolsShank; @@ -143,7 +143,7 @@ export default class toolingShanks extends Vue { if(!this.selectedTool) return 0; var i; - for (i = 1; i < (this.maxToolsPerMultitools+1); i++) { + for (i = 1; i < (this.maxToolsPerMultitools+1); i++) { if(this.availablePosition(i)) return i; } @@ -264,7 +264,7 @@ export default class toolingShanks extends Vue { } public openEditTool = function (tool: any) { - if(tool){ + if(tool){ this.$router.push({ path: 'tooling-equipment/'+tool.id}); } } @@ -345,7 +345,7 @@ export default class toolingShanks extends Vue { ModalHelper.AskConfirm(this.$options.filters.localize("modal_confirm_delete", "Richiesta di conferma"), this.$options.filters.localize("modal_confirm_delete_shank", "Confermi la cancellazione del codolo?"), () => { - new ToolingService().DeleteShank(model).then(response => { + new ToolingService().DeleteShank(model).then(response => { this.selectedEquipment = null; this.enableEquipment = false; this.enableParameters = true; diff --git a/Step/wwwroot/src/components/tooling/tooling.ts b/Step/wwwroot/src/components/tooling/tooling.ts index cc39e65e..e97fcef2 100644 --- a/Step/wwwroot/src/components/tooling/tooling.ts +++ b/Step/wwwroot/src/components/tooling/tooling.ts @@ -50,7 +50,7 @@ export default class Tooling extends Vue { } async mounted() { - await new ToolingService().GetToolsConfiguration(); + // await new ToolingService().GetToolsConfiguration(); this.modalBlockMagazine(); } diff --git a/Step/wwwroot/src/services/toolingService.ts b/Step/wwwroot/src/services/toolingService.ts index 52e848dd..708895bb 100644 --- a/Step/wwwroot/src/services/toolingService.ts +++ b/Step/wwwroot/src/services/toolingService.ts @@ -9,7 +9,8 @@ export class ToolingService extends baseRestService { let result = await this.Get( "api/configuration/tool_manager" ); - toolingActions.updateMagazine(store, result.magazines); + + } async GetTools() { @@ -42,6 +43,7 @@ export class ToolingService extends baseRestService { let result = await this.Get( "api/configuration/tool_manager" ); + toolingActions.updateMagazine(store, result.magazines); toolingActions.setMaxTools(store, result.maxTools); toolingActions.setMaxEdgesPerTools(store, result.maxEdgesPerTools); toolingActions.setMaxMultitools(store, result.maxMultitools);