From 3f3d6504ee139b995ed390678122a17fea630e9c Mon Sep 17 00:00:00 2001 From: Alessandro Francia Date: Thu, 23 Aug 2018 17:16:02 +0200 Subject: [PATCH] depot and fix osai --- Step/wwwroot/src/@types/depot.d.ts | 9 +++++++ .../src/components/tooling/tooling-depot.ts | 6 +++++ .../src/components/tooling/tooling-depot.vue | 26 ++++++++++++++++--- .../components/tooling/tooling-equipment.ts | 1 + .../src/components/tooling/tooling-shanks.ts | 3 +++ Step/wwwroot/src/services/depotService.ts | 3 +-- Step/wwwroot/src/services/toolingService.ts | 2 +- Step/wwwroot/src/store/depot.store.ts | 13 ++++++++++ 8 files changed, 57 insertions(+), 6 deletions(-) diff --git a/Step/wwwroot/src/@types/depot.d.ts b/Step/wwwroot/src/@types/depot.d.ts index 49c69962..75367b13 100644 --- a/Step/wwwroot/src/@types/depot.d.ts +++ b/Step/wwwroot/src/@types/depot.d.ts @@ -24,6 +24,15 @@ declare module server { tools: Tools } + export interface AvailableShankNc{ + id: number, + magazineId: number, + positionId: number, + childsTools: Array, + balluf: number, + magazinePositionType: number + } + export interface MultiTools{ id: number, name: string, diff --git a/Step/wwwroot/src/components/tooling/tooling-depot.ts b/Step/wwwroot/src/components/tooling/tooling-depot.ts index ea47fdbc..ea3f4702 100644 --- a/Step/wwwroot/src/components/tooling/tooling-depot.ts +++ b/Step/wwwroot/src/components/tooling/tooling-depot.ts @@ -43,6 +43,10 @@ export default class depot extends Vue { return this.ncAvailableTools.filter(t => String(t.familyId).toLowerCase().indexOf(this.currentFilter) >= 0); } + public get getNcAvailableShank(){ + return this.ncAvailableShank.filter(t => String(t.id).toLowerCase().indexOf(this.currentFilter) >= 0); + } + public getPayloadForAvaiableTools(index: number): any { if (index < this.getAvaiableMultiTools.length) return this.getAvaiableMultiTools[index]; @@ -101,6 +105,7 @@ export default class depot extends Vue { public get availableMultiTools(): server.MultiTools[] { return (this.$store.state as AppModel).depot.availableMultiTool; } public get availableTools(): server.Tools[] { return (this.$store.state as AppModel).depot.availableTool; } public get ncAvailableTools(): server.ToolNc[] { return (this.$store.state as AppModel).depot.ncAvailableTool; } + public get ncAvailableShank(): server.AvailableShankNc[] {return (this.$store.state as AppModel).depot.ncAvailableShank; } public magazines: server.MagazineModel[] = (this.$store.state as AppModel).tooling.magazines; public enableModify: any = false; @@ -177,6 +182,7 @@ export default class depot extends Vue { else{ return Promise.all([ new DepotService().GetNcMagazine(this.$route.params.id), + new DepotService().GetNcToolAvailable(), new DepotService().GetNcShankAvailable(), new ToolingService().GetNcMagazinePositionDepot(this.$route.params.id), new ToolingService().GetNcTools(), diff --git a/Step/wwwroot/src/components/tooling/tooling-depot.vue b/Step/wwwroot/src/components/tooling/tooling-depot.vue index efa9bb89..ee836e30 100644 --- a/Step/wwwroot/src/components/tooling/tooling-depot.vue +++ b/Step/wwwroot/src/components/tooling/tooling-depot.vue @@ -124,9 +124,9 @@
- +
- +
@@ -218,7 +218,27 @@
-