From 4f3dff1d7f13f12fab1ea623b583cc663f90c417 Mon Sep 17 00:00:00 2001 From: Alessandro Francia Date: Fri, 31 Aug 2018 16:29:12 +0200 Subject: [PATCH] fix offset osai --- .../components/tooling/tooling-equipment.ts | 20 +++++++++++++------ .../components/tooling/tooling-equipment.vue | 2 +- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/Step/wwwroot/src/components/tooling/tooling-equipment.ts b/Step/wwwroot/src/components/tooling/tooling-equipment.ts index a8c951dc..ad0fecea 100644 --- a/Step/wwwroot/src/components/tooling/tooling-equipment.ts +++ b/Step/wwwroot/src/components/tooling/tooling-equipment.ts @@ -358,10 +358,15 @@ export default class toolingEquipment extends Vue { } public cancel = function () { - - if (this.copySelectedTool) { - this.selectedTool = this.copySelectedTool; - toolingActions.updateTool(store, this.copySelectedTool); + debugger + if(this.isSiemens){ + if (this.copySelectedTool) { + this.selectedTool = this.copySelectedTool; + toolingActions.updateTool(store, this.copySelectedTool); + } + } + else{ + toolingActions.updateNcTool(store, this.selectedTool); } if (this.selectedTool.id == null || this.selectedTool.id == 0) { this.selectedTool = null; @@ -387,10 +392,11 @@ export default class toolingEquipment extends Vue { } public cancelNc = function () { - + debugger + toolingActions.updateNcTool(store, this.selectedTool); // if (this.copySelectedTool) { // this.selectedTool = this.copySelectedTool; - // toolingActions.updateTool(store, this.copySelectedTool); + // toolingActions.updateNcTool(store, this.selectedTool); // } if (this.selectedTool.id == null || this.selectedTool.id == 0) { this.selectedTool = null; @@ -459,6 +465,7 @@ export default class toolingEquipment extends Vue { obj["id"] = -1; tool.offsetData.push(obj); this.selectTabNc(obj); + this.disableList = true; // ModalHelper.offsetAddModal.idTool = tool.id; // ModalHelper.offsetAddModal.offsetData = tool.offsetData; // ModalHelper.ShowModal(ModalAddOffsetTool); @@ -481,6 +488,7 @@ export default class toolingEquipment extends Vue { tool.offsetData.splice(l, 1); } } + toolingActions.updateNcTool(store, this.selectedTool); this.disableList = false; this.enableEquipment = false; this.enableParameters = true; diff --git a/Step/wwwroot/src/components/tooling/tooling-equipment.vue b/Step/wwwroot/src/components/tooling/tooling-equipment.vue index 15759c7b..8967133e 100644 --- a/Step/wwwroot/src/components/tooling/tooling-equipment.vue +++ b/Step/wwwroot/src/components/tooling/tooling-equipment.vue @@ -167,7 +167,7 @@