fix caricamento tool table
This commit is contained in:
@@ -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 == "")
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<div class="info-equipment-body">
|
||||
<div class="info-equipment-body-left">
|
||||
<img :src="getInfoEquipmentIcon()" alt="">
|
||||
<div class="tools">
|
||||
<div class="tools">
|
||||
<button class="btn" @click="openEditTool(selectedTool.id)" v-if="enableModalTool" :disabled="!editEnabled"><i class="fa fa-pencil"></i>{{'toolinginfo_edit_button' | localize("Modifica utensile")}}</button>
|
||||
<button class="btn" @click="openEditTool(selectedChildShank.id)" v-if="enableModalChildShank" :disabled="!editEnabled"><i class="fa fa-pencil"></i>{{'toolinginfo_edit_button' | localize("Modifica utensile")}}</button>
|
||||
<div class="explain" v-if="!editEnabled" >{{'toolinginfo_explain_lbl' | localize("Termina l'atrezzaggio del magazzino per modificare l'utensile")}}</div>
|
||||
@@ -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});
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -50,7 +50,7 @@ export default class Tooling extends Vue {
|
||||
}
|
||||
|
||||
async mounted() {
|
||||
await new ToolingService().GetToolsConfiguration();
|
||||
// await new ToolingService().GetToolsConfiguration();
|
||||
this.modalBlockMagazine();
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,8 @@ export class ToolingService extends baseRestService {
|
||||
let result = await this.Get<server.ToolTableInfoModel>(
|
||||
"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<server.ToolTableInfoModel>(
|
||||
"api/configuration/tool_manager"
|
||||
);
|
||||
toolingActions.updateMagazine(store, result.magazines);
|
||||
toolingActions.setMaxTools(store, result.maxTools);
|
||||
toolingActions.setMaxEdgesPerTools(store, result.maxEdgesPerTools);
|
||||
toolingActions.setMaxMultitools(store, result.maxMultitools);
|
||||
|
||||
Reference in New Issue
Block a user