Shanks fix

This commit is contained in:
Nicola Carminati
2018-06-04 12:37:14 +02:00
parent 97824684a9
commit c401bca262
6 changed files with 27 additions and 17 deletions
+1 -1
View File
@@ -174,7 +174,7 @@
<siemens_tooling_childtoolsfamily_boxright_editlabel>Modifica utensile %d del gruppo %s</siemens_tooling_childtoolsfamily_boxright_editlabel>
<tooling_equipment_search_placeholder>Cerca un utensile per nome</tooling_equipment_search_placeholder>
<tooling_shank_search_placeholder>Cerca un colodo per Id</tooling_shank_search_placeholder>
<siemens_tooling_shank_search_placeholder>Cerca un Multitool per Id</siemens_tooling_shank_search_placeholder>
<siemens_tooling_shank_search_placeholder>Cerca un Multitool per nome</siemens_tooling_shank_search_placeholder>
<tooling_magpos_search_placeholder>Cerca una manina per Id</tooling_magpos_search_placeholder>
<tooling_families_search_placeholder>Cerca una famiglia per nome</tooling_families_search_placeholder>
<siemens_tooling_families_search_placeholder>Cerca un gruppo-utensili per nome</siemens_tooling_families_search_placeholder>
+1 -1
View File
@@ -173,7 +173,7 @@
<siemens_tooling_childtoolsfamily_boxright_editlabel>Edit Tool no. %d of group: %s</siemens_tooling_childtoolsfamily_boxright_editlabel>
<tooling_equipment_search_placeholder>Find a tool by name</tooling_equipment_search_placeholder>
<tooling_shank_search_placeholder>Find a shank by Id</tooling_shank_search_placeholder>
<siemens_tooling_shank_search_placeholder>Find a Multitool by Id</siemens_tooling_shank_search_placeholder>
<siemens_tooling_shank_search_placeholder>Find a Multitool by name</siemens_tooling_shank_search_placeholder>
<tooling_magpos_search_placeholder>Find a mag.position by Id</tooling_magpos_search_placeholder>
<tooling_families_search_placeholder>Find a family by name</tooling_families_search_placeholder>
<siemens_tooling_families_search_placeholder>Find a tool-Group by name</siemens_tooling_families_search_placeholder>
@@ -195,7 +195,7 @@
}
}
.tooling-families-container, .tooling-shanks-container, .tooling-magpos-container{
.tooling-families-container, .tooling-magpos-container{
.text-body div + div{
margin-top: 11px;
-1
View File
@@ -7208,7 +7208,6 @@ footer .container button.big:before {
background-image: none;
}
.tooling-families-container .text-body div + div,
.tooling-shanks-container .text-body div + div,
.tooling-magpos-container .text-body div + div {
margin-top: 11px;
}
+15 -7
View File
@@ -81,6 +81,7 @@ export default class toolingShanks extends Vue {
e.preventDefault();
});
}
async updated() {
$('.tab-box-scroll').mousewheel(function (e, delta) {
this.scrollLeft -= (delta * 40);
@@ -93,6 +94,15 @@ export default class toolingShanks extends Vue {
this.disableList = true;
}
public checkChildsToolsenabled() {
if(!this.selectedTool || this.selectedTool.childsTools.length < this.selectedTool.maxChilds){
this.enableAddChildsTools = true;
}
else{
this.enableAddChildsTools = false;
}
}
public availablePosition(pos) {
return !this.selectedTool.childsTools.find(
function (obj){
@@ -144,12 +154,7 @@ export default class toolingShanks extends Vue {
this.shankConfiguration = (this.$store.state as AppModel).tooling.shankConfiguration;
this.childToolsShank = (this.$store.state as AppModel).tooling.childToolsShank;
this.enableModify = false;
if(this.selectedTool.childsTools.length < this.maxToolsPerMultitools){
this.enableAddChildsTools = false;
}
else{
this.enableAddChildsTools = true;
}
this.checkChildsToolsenabled();
}
@@ -227,7 +232,7 @@ export default class toolingShanks extends Vue {
}
}
this.enableAddToolToShank = false;
this.enableModify = false;
this.disableList = false;
}
@@ -273,6 +278,7 @@ export default class toolingShanks extends Vue {
}
}
this.disableList = false;
this.checkChildsToolsenabled();
})
// new ToolingService().SetEdgeData(tool,model).then(response => {
// this.toolsConfiguration = (this.$store.state as AppModel).tooling.toolsConfiguration;
@@ -292,6 +298,8 @@ export default class toolingShanks extends Vue {
this.enableModify = false;
this.enableEquipment = false;
this.selectedEquipment = null;
this.checkChildsToolsenabled();
})
}, null);
// new ToolingService().SetEdgeData(tool,model).then(response => {
@@ -20,8 +20,11 @@
</div>
</div>
<div class="list-vertical scrollable" ref="shankList">
<equipment v-for="s in shanks.filter(i => ($options.filters.localize('tooling_shanks_name','Codolo %d',i.id)).toLowerCase().indexOf(currentFilter) >=0)" :key="s.id" :title="'tooling_shanks_name' | localize('Codolo %d', s.id)"
<equipment v-for="s in shanks.filter(i => i.name.toLowerCase().indexOf(currentFilter) >=0)"
:key="s.id"
v-if="s.id != null"
:code="'tooling_shanks_name' | localize('Codolo %d', s.id)"
:title="s.name"
:img-source="'../assets/icons/Tools/Shanks.png'"
:class="{selected: selectedTool && selectedTool.id == s.id}"
@click="selectTool(s)"></equipment>
@@ -39,10 +42,10 @@
<button class="tab" :class="{'active': enableParameters}" @click="selectTab('Parameters')">{{'tooling_parameters_tab' | localize("Parametri")}}</button>
<div class="tab-box-scroll scrollable">
<button v-for="ct in selectedTool.childsTools" :key="ct.id" class="tab" :class="{'active': selectedEquipment == ct}" v-if="ct.id != null" @click="selectTab(ct)">
<span v-if="ct.id>0">{{'tooling_childtoolsshanks_skill_tools' | localize("Utensile %d",ct.id)}}</span>
<span v-if="ct.id>0">{{'tooling_childtoolsshanks_skill_tools' | localize("Utensile %s",ct.id)}}</span>
<span v-if="!ct.id || ct.id<=0">{{'tooling_childtoolsshanks_new' | localize("Aggiungi Utensile")}}</span>
</button>
<div class="tab plus" :class="{'avoid-clicks': enableAddChildsTools}">
<div class="tab plus" :class="{'avoid-clicks': !enableAddChildsTools}">
<button class="btn" @click="addToolToShank()"><i class="fa fa-plus"></i></button>
</div>
</div>
@@ -76,11 +79,11 @@
<div class="list-skill-shanks scrollable">
<div class="list-skill-shanks-category">
<div class="skill-shanks-category">
<input-box type="select" :title="'tooling_equipment_param_Position' | localize('Posizione')" v-model="posSelected">
<option v-for="(s) in maxToolsPerMultitools" v-if="availablePosition(s)" :key="s" :value="s">{{s}}</option>
<input-box type="select" :title="'tooling_equipment_param_position' | localize('Posizione')" v-model="posSelected">
<option v-for="(s) in selectedTool.maxChilds" v-if="availablePosition(s)" :key="s" :value="s">{{s}}</option>
</input-box>
<input-box type="select" :title="'tooling_equipment_param_id' | localize('Id Utensile')" v-model="toolSelected">
<option v-for="(s, k) in availableTools" :key="k" :value="s">{{s.id}}</option>
<option v-for="(s, k) in availableTools" :key="k" :value="s">{{s.familyName}} - {{s.id}}</option>
</input-box>
</div>
</div>