wp4 osai
This commit is contained in:
Vendored
+1
-1
@@ -127,7 +127,7 @@ declare module server {
|
||||
|
||||
export interface FamiliesNc{
|
||||
id: number,
|
||||
tools: Array<ToolNc>,
|
||||
childTools: Array<ToolNc>,
|
||||
name: string,
|
||||
type: number,
|
||||
rightSize: number,
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<!-- <button class="btn square"><i class="fa fa-filter"></i></button> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="list-vertical scrollable" ref="toolList">
|
||||
<div class="list-vertical scrollable" ref="toolList" v-if="typeNc == 'Demo'">
|
||||
<equipment v-for="t in tools.filter(t => t.familyName.toLowerCase().indexOf(currentFilter) >=0)" :key="t.id" :code="'tooling_tool_abbreviation' | localize('T%d',t.id)" :title="t.familyName"
|
||||
:img-source="getToolIcon(t.toolType)"
|
||||
:class="{selected: selectedTool == t}"
|
||||
@@ -28,6 +28,14 @@
|
||||
:shankPosition="t.multitoolId"
|
||||
@click="selectTool(t)"></equipment>
|
||||
</div>
|
||||
<div class="list-vertical scrollable" ref="toolList" v-if="typeNc == 'Osai'">
|
||||
<equipment v-for="t in tools.filter(t => String(t.familyId).indexOf(currentFilter) >=0)" :key="t.id" :code="'tooling_tool_abbreviation' | localize('T%d',t.id)" :title="t.familyName"
|
||||
:img-source="getToolIcon(t.toolType)"
|
||||
:class="{selected: selectedTool == t}"
|
||||
:magPosition="t.magazineId"
|
||||
:shankPosition="t.multitoolId"
|
||||
@click="selectTool(t)"></equipment>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<div class="group-label-button" :class="{'avoid-clicks': enableAddEquipment}">{{'tooling_equipment_label_add' | localize("Aggiungi utensile")}}<button class="btn" @click="addEquipment()"><i class="fa fa-plus"></i></button></div>
|
||||
</div>
|
||||
|
||||
@@ -125,6 +125,7 @@ export default class toolingFamilies extends Vue {
|
||||
}
|
||||
}
|
||||
this.disableList = true;
|
||||
this.enableModify = true;
|
||||
}
|
||||
|
||||
public selectTab(elem) {
|
||||
@@ -146,11 +147,17 @@ export default class toolingFamilies extends Vue {
|
||||
}
|
||||
|
||||
public cancel = function () {
|
||||
// this.selectedTool = null;
|
||||
this.selectedTool = null;
|
||||
this.disableList = false;
|
||||
this.enableModify = false;
|
||||
}
|
||||
|
||||
// public cancelNewFamily = function(){
|
||||
// this.selectedTool = null;
|
||||
// this.disableList = false;
|
||||
// this.enableModify = false;
|
||||
// }
|
||||
|
||||
async save(item) {
|
||||
|
||||
if(this.typeNc == "Demo"){
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
:img-source="'../assets/icons/Tools/Families.png'"
|
||||
@click="selectTool(f)"></equipment>
|
||||
</div>
|
||||
<div class="footer" v-if="!(isSiemens() || isDemo())">
|
||||
<div class="footer" v-if="!(isSiemens() || isDemo()) || typeNc == 'Osai'">
|
||||
<div class="group-label-button" >{{'tooling_families_label_add' | localize("Aggiungi famiglia")}}<button class="btn" @click="addFamily()"><i class="fa fa-plus"></i></button></div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -38,7 +38,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-right-body" v-if="enableParameters">
|
||||
<!-- <button class="btn deleteElement" @click="deleteFamily(selectedTool)"><i class="fa fa-trash"></i></button> -->
|
||||
<button class="btn deleteElement" v-if="!(isSiemens() || isDemo()) || typeNc == 'Osai'" @click="deleteFamily(selectedTool)"><i class="fa fa-trash"></i></button>
|
||||
<div class="box-right-label-header" v-if="selectedTool.name">{{'tooling_families_boxright_editlabel' | localize("Modifica della famiglia %s", selectedTool.name)}}</div>
|
||||
<div class="box-right-label-header" v-if="!selectedTool.name">{{'tooling_families_boxright_newlabel' | localize("Aggiunta nuova famiglia")}}</div>
|
||||
<div class="list-skill-families scrollable">
|
||||
@@ -56,11 +56,12 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!--<div class="tooling-equipment-footer">
|
||||
<div class="tooling-equipment-footer" v-if="!(isSiemens() || isDemo()) || typeNc == 'Osai'">
|
||||
<button class="btn" v-if="!enableModify" @click="modify()">{{'tooling_equipment_button_modify' | localize("Modifica")}}</button>
|
||||
<!-- <button class="btn" v-if="enableModify && selectedTool && !selectedTool.id" @click="cancelNewFamily()">{{'tooling_equipment_button_cancelNewFamily' | localize("Annulla")}}</button> -->
|
||||
<button class="btn" v-if="enableModify" @click="cancel()">{{'tooling_equipment_button_cancel' | localize("Annulla")}}</button>
|
||||
<button class="btn blue-reverse" v-if="enableModify" @click="buttonSave(selectedTool)">{{'tooling_equipment_button_save' | localize("Salva")}}</button>
|
||||
</div-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-right-body" v-if="enableEquipment">
|
||||
<!-- <button class="btn deleteElement"><i class="fa fa-trash"></i></button> -->
|
||||
|
||||
@@ -91,21 +91,20 @@ export default class toolingShanks extends Vue {
|
||||
async mounted() {
|
||||
if(this.typeNc == "Demo"){
|
||||
awaiter (Promise.all([
|
||||
new ToolingService().GetShanks(),
|
||||
new ToolingService().GetToolsConfiguration()
|
||||
await new ToolingService().GetShanks(),
|
||||
await new ToolingService().GetToolsConfiguration()
|
||||
]));
|
||||
}
|
||||
else{
|
||||
awaiter (Promise.all([
|
||||
new ToolingService().GetNcShanks(),
|
||||
new ToolingService().GetToolsConfiguration()
|
||||
await new ToolingService().GetNcShanks(),
|
||||
await new ToolingService().GetToolsConfiguration()
|
||||
]));
|
||||
}
|
||||
|
||||
this.shankConfiguration = (this.$store.state as AppModel).tooling.shankConfiguration;
|
||||
this.childToolsShank = (this.$store.state as AppModel).tooling.childToolsShank;
|
||||
|
||||
|
||||
if(this.shanks.length < this.maxMultitools){
|
||||
this.enableAddShank = false;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<!-- <button class="btn square"><i class="fa fa-filter"></i></button> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="list-vertical scrollable" ref="shankList">
|
||||
<div class="list-vertical scrollable" ref="shankList" v-if="typeNc == 'Demo' ">
|
||||
<equipment v-for="s in shanks.filter(i => i.name.toLowerCase().indexOf(currentFilter) >=0)"
|
||||
:key="s.id"
|
||||
v-if="s.id != null"
|
||||
@@ -30,6 +30,17 @@
|
||||
:class="{selected: selectedTool && selectedTool.id == s.id}"
|
||||
@click="selectTool(s)"></equipment>
|
||||
</div>
|
||||
<div class="list-vertical scrollable" ref="shankList" v-if="typeNc == 'Osai' ">
|
||||
<equipment v-for="s in shanks.filter(i => String(i.id).toLowerCase().indexOf(currentFilter) >=0)"
|
||||
:key="s.id"
|
||||
v-if="s.id != null"
|
||||
:code="'tooling_shank_abbreviation' | localize('S%d',s.id)"
|
||||
:title="s.id"
|
||||
:img-source="'../assets/icons/Tools/Shanks.png'"
|
||||
:magPosition="s.magazineId"
|
||||
:class="{selected: selectedTool && selectedTool.id == s.id}"
|
||||
@click="selectTool(s)"></equipment>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<div class="group-label-button" :class="{'avoid-clicks': enableAddShank}">{{'tooling_shanks_label_add' | localize("Aggiungi codolo")}}<button class="btn" @click="addShank()"><i class="fa fa-plus"></i></button></div>
|
||||
</div>
|
||||
|
||||
@@ -127,7 +127,7 @@ export class ToolingService extends baseRestService {
|
||||
return response;
|
||||
}
|
||||
|
||||
async UpdateNcFamily(model: server.Families){
|
||||
async UpdateNcFamily(model: server.FamiliesNc){
|
||||
var response = await this.Put<any>(this.BASE_URL + "nc/family/" + model.id, model);
|
||||
toolingActions.updateNcFamily(store, model);
|
||||
return response;
|
||||
@@ -166,7 +166,7 @@ export class ToolingService extends baseRestService {
|
||||
|
||||
async UpdateNcTool(model: any){
|
||||
var response = await this.Put<any>(this.BASE_URL + "nc/tool/" + model.id, model);
|
||||
toolingActions.updateTool(store, model);
|
||||
toolingActions.updateNcTool(store, model);
|
||||
return response;
|
||||
}
|
||||
|
||||
@@ -233,7 +233,7 @@ export class ToolingService extends baseRestService {
|
||||
|
||||
async UpdateNcShank(model: any){
|
||||
var response = await this.Put<any>(this.BASE_URL + "nc/shank/" + model.id, model);
|
||||
toolingActions.updateShank(store, model);
|
||||
toolingActions.updateNcShank(store, model);
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
@@ -37,13 +37,15 @@ export interface ToolingGetters{
|
||||
export interface ToolingActions {
|
||||
updateMagazine(context, model: server.MagazineModel[]);
|
||||
updateTool(context, model: server.Tool);
|
||||
updateNcTool(context, model: server.ToolNc);
|
||||
updateTools(context, model: server.Tool[]);
|
||||
|
||||
updateFamily(context, model: server.Families);
|
||||
updateNcFamily(context, model: server.Families);
|
||||
updateNcFamily(context, model: server.FamiliesNc);
|
||||
updateFamilies(context, model: server.Families[]);
|
||||
|
||||
updateShank(context, model: server.Shanks);
|
||||
updateNcShank(context, model: server.ShankNc);
|
||||
updateShanks(context, model: server.Shanks[]);
|
||||
updateMagazinePosition(context, model: server.MagazinesPositions);
|
||||
updateMagPos(context, model: server.MagazinesPositions[]);
|
||||
@@ -177,6 +179,10 @@ export const toolingStore = {
|
||||
store._tools.set(model.id, model);
|
||||
store.tools = Array.from(store._tools.values());
|
||||
},
|
||||
UpdateNcTool(store, model: server.ToolNc){
|
||||
store._ncTools.set(model.id, model);
|
||||
store.ncTools = Array.from(store._ncTools.values());
|
||||
},
|
||||
UpdateEdgeData(store, model: server.EdgesData){
|
||||
store._edgesData.set(model.id, model);
|
||||
store.edgesData = Array.from(store._edgesData.values());
|
||||
@@ -199,6 +205,10 @@ export const toolingStore = {
|
||||
store._shanks.set(model.id, model);
|
||||
store.shanks = Array.from(store._shanks.values());
|
||||
},
|
||||
UpdateNcShank(store, model: server.ShankNc) {
|
||||
store._ncShanks.set(model.id, model);
|
||||
store.ncShanks = Array.from(store._ncShanks.values());
|
||||
},
|
||||
UpdateMagPos(store, model: server.MagazinesPositions){
|
||||
store._magazinePosition.set(model.positionId, model);
|
||||
store.magazinePosition = Array.from(store._magazinePosition.values());
|
||||
@@ -403,6 +413,9 @@ export const toolingStore = {
|
||||
updateTool(context, model: server.Tool) {
|
||||
context.commit("UpdateTool", model);
|
||||
},
|
||||
updateNcTool(context, model: server.ToolNc){
|
||||
context.commit("UpdateNcTool", model);
|
||||
},
|
||||
updateTools(context, model: server.Tool[]) {
|
||||
for (const key in model) {
|
||||
const element = model[key];
|
||||
@@ -412,7 +425,7 @@ export const toolingStore = {
|
||||
updateFamily(context, model: server.Families) {
|
||||
context.commit("UpdateFamily", model);
|
||||
},
|
||||
updateNcFamily(context, model: server.Families){
|
||||
updateNcFamily(context, model: server.FamiliesNc){
|
||||
context.commit("UpdateNcFamily", model);
|
||||
},
|
||||
updateFamilies(context, model: server.Families[]) {
|
||||
@@ -424,6 +437,9 @@ export const toolingStore = {
|
||||
updateShank(context, model: server.Shanks) {
|
||||
context.commit("UpdateShank", model);
|
||||
},
|
||||
updateNcShank(context, model: server.ShankNc){
|
||||
context.commit("UpdateNcShank", model);
|
||||
},
|
||||
updateShanks(context, model: server.Shanks[]) {
|
||||
for (const key in model) {
|
||||
const element = model[key];
|
||||
|
||||
Reference in New Issue
Block a user