bugfixing
This commit is contained in:
@@ -88,13 +88,14 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 63px;;
|
||||
border-top: solid 2px @color-label-grey;
|
||||
button{
|
||||
background-image: linear-gradient(to bottom,@color-nice-blue,@color-darkish-blue);
|
||||
color: @color-white;
|
||||
width: 48px;
|
||||
height: 47px;
|
||||
margin: 28px;
|
||||
// margin: 28px;
|
||||
padding: 0;
|
||||
.fa{
|
||||
width: 22px;
|
||||
@@ -176,7 +177,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -188,7 +189,7 @@
|
||||
.text-body div + div{
|
||||
margin-top: 11px;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
.tooling-families-container .tab-box-right, .tooling-shanks-container .tab-box-right, .tooling-equipment-container .tab-box-right{
|
||||
@@ -224,7 +225,7 @@
|
||||
margin-left: 20px;
|
||||
padding: 0;
|
||||
.fa {
|
||||
vertical-align: middle;
|
||||
vertical-align: middle;
|
||||
font-size: 21px;
|
||||
}
|
||||
}
|
||||
@@ -278,4 +279,19 @@
|
||||
|
||||
.avoid-clicks {
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
|
||||
.list-vertical, .group-label-button, .tab-box-right{
|
||||
position: relative;
|
||||
&.avoid-clicks::after{
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left:0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: rgba(255,255,255,0.5);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -4922,6 +4922,7 @@ footer .container button.big:before {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 63px;
|
||||
border-top: solid 2px #979797;
|
||||
}
|
||||
.tooling-equipment-container .tooling-equipment-box .body .list-left .footer button,
|
||||
@@ -4944,7 +4945,6 @@ footer .container button.big:before {
|
||||
color: #fff;
|
||||
width: 48px;
|
||||
height: 47px;
|
||||
margin: 28px;
|
||||
padding: 0;
|
||||
}
|
||||
.tooling-equipment-container .tooling-equipment-box .body .list-left .footer button .fa,
|
||||
@@ -6883,6 +6883,22 @@ footer .container button.big:before {
|
||||
.avoid-clicks {
|
||||
pointer-events: none;
|
||||
}
|
||||
.list-vertical,
|
||||
.group-label-button,
|
||||
.tab-box-right {
|
||||
position: relative;
|
||||
}
|
||||
.list-vertical.avoid-clicks::after,
|
||||
.group-label-button.avoid-clicks::after,
|
||||
.tab-box-right.avoid-clicks::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
.info-equipment-container {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
|
||||
@@ -41,7 +41,7 @@ export default class depot extends Vue {
|
||||
}
|
||||
|
||||
public returnChildId(elem){
|
||||
debugger
|
||||
|
||||
if(elem.childTool){
|
||||
return elem.childTool.id;
|
||||
}
|
||||
|
||||
@@ -12,6 +12,13 @@ export default class toolingEquipment extends Vue {
|
||||
|
||||
public get tools(): server.Tool[] { return (this.$store.state as AppModel).tooling.tools; }
|
||||
|
||||
public searchText: string = "";
|
||||
public currentFilter : string = "";
|
||||
|
||||
public applyFilter(){
|
||||
this.currentFilter = this.searchText;
|
||||
}
|
||||
|
||||
public toolsConfiguration: server.ToolsConfiguration[] = null;
|
||||
|
||||
public edgeConfiguration: server.EdgeConfiguration[] = null;
|
||||
@@ -147,7 +154,8 @@ export default class toolingEquipment extends Vue {
|
||||
}
|
||||
|
||||
public cancel = function () {
|
||||
this.selectedTool = null;
|
||||
// this.selectedTool = null;
|
||||
this.enableModify = false;
|
||||
this.disableList = false;
|
||||
}
|
||||
|
||||
@@ -162,7 +170,7 @@ export default class toolingEquipment extends Vue {
|
||||
|
||||
private internalCounter = -1;
|
||||
public addEdge(){
|
||||
debugger
|
||||
|
||||
this.disableList = true;
|
||||
this.enableModify = true;
|
||||
var obj = { edgeAdditionalParams:{}};
|
||||
@@ -194,7 +202,7 @@ export default class toolingEquipment extends Vue {
|
||||
}
|
||||
|
||||
async saveEdge(tool, model){
|
||||
debugger
|
||||
|
||||
delete model.id;
|
||||
new ToolingService().SetEdgeData(tool,model).then(response => {
|
||||
this.toolsConfiguration = (this.$store.state as AppModel).tooling.toolsConfiguration;
|
||||
@@ -205,7 +213,7 @@ export default class toolingEquipment extends Vue {
|
||||
}
|
||||
|
||||
async modifyEdge(tool, model){
|
||||
debugger
|
||||
|
||||
new ToolingService().UpdateEdgeData(tool,model).then(response => {
|
||||
this.toolsConfiguration = (this.$store.state as AppModel).tooling.toolsConfiguration;
|
||||
this.edgeConfiguration = (this.$store.state as AppModel).tooling.edgesConfiguration;
|
||||
@@ -214,7 +222,7 @@ export default class toolingEquipment extends Vue {
|
||||
}
|
||||
|
||||
async buttonSave(tool: any, edge: any){
|
||||
debugger
|
||||
|
||||
if(tool.id){
|
||||
if(edge && edge.id > 0){
|
||||
this.modifyEdge(tool, edge);
|
||||
@@ -238,7 +246,7 @@ export default class toolingEquipment extends Vue {
|
||||
}
|
||||
|
||||
async deleteEdgeData(tool, model){
|
||||
debugger
|
||||
|
||||
new ToolingService().DeleteEdgeData(tool, model).then(response => {
|
||||
this.selectedTool = null;
|
||||
});
|
||||
|
||||
@@ -14,13 +14,13 @@
|
||||
{{'tooling_equipment_label_search' | localize("Seleziona un utensile")}}
|
||||
</div>
|
||||
<div class="group-btn">
|
||||
<input type="text">
|
||||
<button class="btn square"><i class="fa fa-search"></i></button>
|
||||
<input type="text" v-model="searchText">
|
||||
<button class="btn square" @click="applyFilter()"><i class="fa fa-search"></i></button>
|
||||
<button class="btn square"><i class="fa fa-filter"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="list-vertical scrollable" ref="toolList" :class="{'avoid-clicks': disableList}">
|
||||
<equipment v-for="t in tools" :key="t.id" :code="t.id" :title="t.familyName"
|
||||
<equipment v-for="t in tools.filter(t => t.familyName.indexOf(currentFilter) >=0)" :key="t.id" :code="t.id" :title="t.familyName"
|
||||
:img-source="getToolIcon(t.toolType)"
|
||||
:class="{selected: selectedTool == t}"
|
||||
@click="selectTool(t)"></equipment>
|
||||
@@ -53,7 +53,7 @@
|
||||
v-if="t.name != '' && t.category == c"
|
||||
v-model="selectedTool[t.name]"
|
||||
:read-only="t.readOnly || !disableList"
|
||||
:title="'tooling_equipment_param_' + t.name | localize(t.name)"
|
||||
:title="'tooling_equipment_param_' + t.name | localize(t.name)"
|
||||
:type="t.type">
|
||||
<option v-for="(s, k) in t.selectValues" :key="k" :selected="selectedTool[t.name]" :value="k">{{k}} - {{'tooling_equipment_list_select_' + s | localize(s)}}</option>
|
||||
</input-box>
|
||||
@@ -79,15 +79,15 @@
|
||||
v-if="c.name != '' && c.category == ce"
|
||||
v-model="ed[c.name]"
|
||||
:read-only="c.readOnly"
|
||||
:title="'tooling_equipment_cedgepar_' + c.name | localize(c.name)"
|
||||
:title="'tooling_equipment_cedgepar_' + c.name | localize(c.name)"
|
||||
:type="c.type">
|
||||
|
||||
</input-box>
|
||||
</div>
|
||||
<div class="skill-equipment-category">{{'tooling_equipment_list_category_geometry' | localize('geometry')}}</div>
|
||||
<input-box v-for="ad in getDynamicFields(selectedTool.toolType)" :key="ad"
|
||||
v-model="ed.edgeAdditionalParams[ad]"
|
||||
:title="'tooling_equipment_cedgepar_' + ad | localize(ad)"
|
||||
v-model="ed.edgeAdditionalParams[ad]"
|
||||
:title="'tooling_equipment_cedgepar_' + ad | localize(ad)"
|
||||
type="double">
|
||||
</input-box>
|
||||
|
||||
|
||||
@@ -13,6 +13,13 @@ export default class toolingFamilies extends Vue {
|
||||
public familyConfiguration: server.FamilyConfiguration[] = null;
|
||||
public get childToolsFamily(): server.ToolsConfiguration[] { return (this.$store.state as AppModel).tooling.childToolsFamily; }
|
||||
|
||||
public searchText: string = "";
|
||||
public currentFilter : string = "";
|
||||
|
||||
public applyFilter(){
|
||||
this.currentFilter = this.searchText;
|
||||
}
|
||||
|
||||
public get categories(): string[] {
|
||||
let cat: Set<string> = new Set<string>();
|
||||
for (const key in this.familyConfiguration) {
|
||||
@@ -92,8 +99,9 @@ export default class toolingFamilies extends Vue {
|
||||
}
|
||||
|
||||
public cancel = function () {
|
||||
this.selectedTool = null;
|
||||
// this.selectedTool = null;
|
||||
this.disableList = false;
|
||||
this.enableModify = false;
|
||||
}
|
||||
|
||||
async save(item) {
|
||||
@@ -118,7 +126,7 @@ export default class toolingFamilies extends Vue {
|
||||
|
||||
|
||||
async buttonSave(tool: any){
|
||||
debugger
|
||||
|
||||
if(tool.id){
|
||||
this.modifyFamily(tool);
|
||||
}
|
||||
|
||||
@@ -14,20 +14,20 @@
|
||||
{{'tooling_families_label_search' | localize("Seleziona una famiglia")}}
|
||||
</div>
|
||||
<div class="group-btn">
|
||||
<input type="text">
|
||||
<button class="btn square"><i class="fa fa-search"></i></button>
|
||||
<input type="text" v-model="searchText">
|
||||
<button class="btn square" @click="applyFilter()"><i class="fa fa-search"></i></button>
|
||||
<button class="btn square"><i class="fa fa-filter"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="list-vertical scrollable" ref="familyList" :class="{'avoid-clicks': disableList}">
|
||||
<equipment v-for="f in families" :key="f.uid" :title="f.name || f.oldName"
|
||||
<equipment v-for="f in families.filter(f => f.name.indexOf(currentFilter) >=0)" :key="f.uid" :title="f.name || f.oldName"
|
||||
:class="{selected: selectedTool && selectedTool.uid == f.uid}"
|
||||
:img-source="'../assets/images/list-families.PNG'"
|
||||
@click="selectTool(f)"></equipment>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<!-- <div class="footer">
|
||||
<div class="group-label-button" :class="{'avoid-clicks': disableList}">{{'tooling_families_label_add' | localize("Aggiungi famiglia")}}<button class="btn" @click="addFamily()"><i class="fa fa-plus"></i></button></div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<!-- Siemens -->
|
||||
<div class="box-right" v-if="(isSiemens() || isDemo()) && selectedTool">
|
||||
@@ -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" @click="deleteFamily(selectedTool)"><i class="fa fa-trash"></i></button> -->
|
||||
<div class="box-right-label-header" v-if="selectedTool.id">{{'tooling_families_boxright_header_modify' | localize("Modifica di")}} {{selectedTool.name}}</div>
|
||||
<div class="box-right-label-header" v-if="!selectedTool.id">{{'tooling_families_boxright_header_add' | localize("Aggiungi")}} {{selectedTool.name}}</div>
|
||||
<div class="list-skill-families scrollable">
|
||||
@@ -62,7 +62,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-right-body" v-if="enableEquipment">
|
||||
<button class="btn deleteElement"><i class="fa fa-trash"></i></button>
|
||||
<!-- <button class="btn deleteElement"><i class="fa fa-trash"></i></button> -->
|
||||
<div class="box-right-label-header">{{'tooling_childtoolsfamily_skill_tools' | localize(" Utensile")}} {{enableEquipment}}</div>
|
||||
<div class="list-skill-families scrollable">
|
||||
<div class="list-skill-families-category">
|
||||
|
||||
@@ -7,10 +7,18 @@ import { toolingActions } from "../store/tooling.store";
|
||||
|
||||
@Component({ components: { equipment, inputBox } })
|
||||
export default class toolingMagPos extends Vue {
|
||||
|
||||
|
||||
public get magpos(): server.MagazinesPositions[] { return (this.$store.state as AppModel).tooling.magazinesPositions; }
|
||||
public magposConfiguration: server.MagazinePosConfiguration[] = null;
|
||||
|
||||
public searchText: string = "";
|
||||
public currentFilter : string = "";
|
||||
|
||||
|
||||
public applyFilter(){
|
||||
this.currentFilter = this.searchText;
|
||||
}
|
||||
|
||||
public selectedTool: any = null;
|
||||
|
||||
public enableModify: any = false;
|
||||
@@ -34,8 +42,9 @@ export default class toolingMagPos extends Vue {
|
||||
}
|
||||
|
||||
public cancel = function () {
|
||||
this.selectedTool = null;
|
||||
// this.selectedTool = null;
|
||||
this.disableList = false;
|
||||
this.enableModify = false;
|
||||
}
|
||||
async modifyMagPos(model) {
|
||||
|
||||
|
||||
@@ -14,13 +14,13 @@
|
||||
{{'tooling_magpos_label_search' | localize("Seleziona una manina")}}
|
||||
</div>
|
||||
<div class="group-btn">
|
||||
<input type="text">
|
||||
<button class="btn square"><i class="fa fa-search"></i></button>
|
||||
<input type="text" v-model="searchText">
|
||||
<button class="btn square" @click="applyFilter()"><i class="fa fa-search"></i></button>
|
||||
<button class="btn square"><i class="fa fa-filter"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="list-vertical scrollable" :class="{'avoid-clicks': disableList}">
|
||||
<equipment v-for="(m,k) in magpos" :key="k" :code="'Magazzino' + ' ' + m.magazineId" :title="'Manina' + ' ' + m.positionId"
|
||||
<equipment v-for="(m,k) in magpos.filter(m =>(($options.filters.localize('tooling_magpos','Manina')) + ' ' + m.positionId).toString().indexOf(currentFilter) >=0)" :key="k" :code="'Magazzino' + ' ' + m.magazineId" :title="$options.filters.localize('tooling_magpos','Manina') + ' ' + m.positionId"
|
||||
:class="{selected: selectedTool && selectedTool.positionId == m.positionId && selectedTool.magazineId == m.magazineId }"
|
||||
:img-source="'../assets/images/list-mag-pos.PNG'"
|
||||
@click="selectTool(m)"></equipment>
|
||||
|
||||
@@ -16,6 +16,14 @@ export default class toolingShanks extends Vue {
|
||||
public shankConfiguration: server.ShankConfiguration[] = null;
|
||||
public childToolsShank: server.ToolsConfiguration[] = null;
|
||||
|
||||
public searchText: string = "";
|
||||
public currentFilter : string = "";
|
||||
|
||||
|
||||
public applyFilter(){
|
||||
this.currentFilter = this.searchText;
|
||||
}
|
||||
|
||||
public get availableTools(): server.Tools[] { return (this.$store.state as AppModel).depot.availableTool; }
|
||||
|
||||
public get categories(): string[] {
|
||||
@@ -92,7 +100,7 @@ export default class toolingShanks extends Vue {
|
||||
|
||||
|
||||
public selectTab(elem){
|
||||
debugger
|
||||
|
||||
if(elem == 'Parameters'){
|
||||
this.enableParameters = true;
|
||||
this.enableEquipment = false;
|
||||
@@ -127,7 +135,7 @@ export default class toolingShanks extends Vue {
|
||||
}
|
||||
|
||||
public addToolToShank(){
|
||||
debugger
|
||||
|
||||
new DepotService().GetToolAvailable().then(response => {
|
||||
this.disableList = true;
|
||||
var obj = {};
|
||||
@@ -154,14 +162,14 @@ export default class toolingShanks extends Vue {
|
||||
this.selectedTool.childsTools.splice(l,1);
|
||||
}
|
||||
}
|
||||
this.selectedTool = null;
|
||||
this.enableModify = false;
|
||||
this.disableList = false;
|
||||
this.selectedEquipment = null;
|
||||
// this.selectedEquipment = null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
async buttonSave(tool: any){
|
||||
debugger
|
||||
|
||||
if(tool.id){
|
||||
this.modifyShank(tool);
|
||||
}
|
||||
@@ -190,7 +198,7 @@ export default class toolingShanks extends Vue {
|
||||
}
|
||||
|
||||
public addToolsToShank(shank){
|
||||
debugger
|
||||
|
||||
let model = this.toolSelected;
|
||||
for(let l in this.selectedTool.childsTools){
|
||||
if(this.selectedTool.childsTools[l].multitoolId){
|
||||
@@ -217,7 +225,7 @@ export default class toolingShanks extends Vue {
|
||||
// });
|
||||
}
|
||||
public removeToolsToShank(shank){
|
||||
debugger
|
||||
|
||||
let model = this.selectedEquipment;
|
||||
new ToolingService().removeToolToShank(shank, model).then(response => {
|
||||
this.disableList = false;
|
||||
|
||||
@@ -14,13 +14,13 @@
|
||||
{{'tooling_shanks_label_search' | localize("Seleziona un codolo")}}
|
||||
</div>
|
||||
<div class="group-btn">
|
||||
<input type="text">
|
||||
<button class="btn square"><i class="fa fa-search"></i></button>
|
||||
<input type="text" v-model="searchText">
|
||||
<button class="btn square" @click="applyFilter()"><i class="fa fa-search"></i></button>
|
||||
<button class="btn square"><i class="fa fa-filter"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="list-vertical scrollable" ref="shankList" :class="{'avoid-clicks': disableList}">
|
||||
<equipment v-for="s in shanks" :key="s.id" :title="'Codolo' + ' ' + s.id"
|
||||
<equipment v-for="s in shanks.filter(i => ($options.filters.localize('shank','Codolo') + ' ' + i.id).indexOf(currentFilter) >=0)" :key="s.id" :title="$options.filters.localize('shank','Codolo') + ' ' + s.id"
|
||||
v-if="s.id != null"
|
||||
:img-source="'../assets/images/list-shank.PNG'"
|
||||
:class="{selected: selectedTool && selectedTool.id == s.id}"
|
||||
@@ -30,7 +30,7 @@
|
||||
<div class="group-label-button" :class="{'avoid-clicks': disableList}">{{'tooling_shanks_label_add' | localize("Aggiungi codolo")}}<button class="btn" @click="addShank()"><i class="fa fa-plus"></i></button></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Decidere come gestire le diverse macchine -->
|
||||
|
||||
<!-- Siemens -->
|
||||
@@ -93,7 +93,7 @@
|
||||
<div class="list-skill-shanks-category">
|
||||
<div v-for="ct in selectedTool.childsTools" :key="ct.id" v-if="selectedEquipment == ct" class="skill-shanks-category">
|
||||
|
||||
<input-box v-for="c in childToolsShank" :key="c.name"
|
||||
<input-box v-for="c in childToolsShank" :key="c.name"
|
||||
v-if="c.name != ''"
|
||||
v-model="ct[c.name]"
|
||||
:read-only="c.readOnly"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import Vue from "vue";
|
||||
|
||||
debugger
|
||||
Vue.filter("search", function (item: any, filterFunction: Function) {
|
||||
if (item != null && filterFunction != null)
|
||||
return filterFunction(item);
|
||||
|
||||
@@ -17,6 +17,7 @@ export class ToolingService extends baseRestService {
|
||||
|
||||
async GetFamilies() {
|
||||
let result = await this.Get<server.Families[]>("api/tool_table/families");
|
||||
toolingActions.clearFamilies(store);
|
||||
toolingActions.updateFamilies(store, result);
|
||||
}
|
||||
async GetShanks() {
|
||||
@@ -128,25 +129,25 @@ export class ToolingService extends baseRestService {
|
||||
return response;
|
||||
}
|
||||
async DeleteTool(model: any) {
|
||||
debugger
|
||||
|
||||
var result = await this.Delete<any>("/api/tool_table/tool/" + model.id);
|
||||
toolingActions.deleteTool(store, model);
|
||||
return result;
|
||||
}
|
||||
async SetEdgeData(tool: any,model: any){
|
||||
debugger
|
||||
|
||||
var result = await this.Post<any>("/api/tool_table/tool/" + tool.id + "/edge", model);
|
||||
toolingActions.setEdgeData(store, {tool,result});
|
||||
return result;
|
||||
}
|
||||
async UpdateEdgeData(tool: any, model: any){
|
||||
debugger
|
||||
|
||||
var result = await this.Put<any>("/api/tool_table/tool/"+ tool.id + "/edge/" + model.id, model);
|
||||
toolingActions.updateEdgeData(store, model);
|
||||
return result;
|
||||
}
|
||||
async DeleteEdgeData(tool: any, model: any){
|
||||
debugger
|
||||
|
||||
var result = await this.Delete<any>("/api/tool_table/tool/" + tool.id + "/edge/" + model.id);
|
||||
toolingActions.deleteEdgeData(store, {tool,model});
|
||||
return result;
|
||||
@@ -174,13 +175,13 @@ export class ToolingService extends baseRestService {
|
||||
}
|
||||
|
||||
async addToolToShank(shank: any, model: any){
|
||||
debugger
|
||||
|
||||
var response = await this.Put<any>("/api/tool_table/shank/"+ shank.id + "/load/" + model.multitoolId + "/tool/" + model.id, model);
|
||||
toolingActions.addToolToShank(store,{shank, model});
|
||||
return response;
|
||||
}
|
||||
async removeToolToShank(shank: any, model: any){
|
||||
debugger
|
||||
|
||||
var response = await this.Put<any>("/api/tool_table/shank/"+ shank.id + "/unload/" + model.multitoolId + "/" + model.id, model);
|
||||
toolingActions.removeToolToShank(store,{shank, model});
|
||||
return response;
|
||||
|
||||
@@ -3,13 +3,13 @@ export interface DepotStoreModel {
|
||||
availableMultiTool: Array<server.MultiTools>
|
||||
availableTool: Array<server.Tools>
|
||||
}
|
||||
|
||||
|
||||
export interface DepotActions {
|
||||
updateDepot(context, model: server.DepotModel[]);
|
||||
updateAvailableMultiTool(context, model: server.MultiTools[]);
|
||||
updateAvailableTool(context, model: server.Tools[]);
|
||||
}
|
||||
|
||||
|
||||
export const depotStore = {
|
||||
state: {
|
||||
depot: [],
|
||||
@@ -18,21 +18,21 @@ export interface DepotStoreModel {
|
||||
} as DepotStoreModel,
|
||||
mutations: {
|
||||
UpdateDepot(store, model: server.DepotModel[]) {
|
||||
debugger
|
||||
|
||||
store.depot = [];
|
||||
for (const key in model) {
|
||||
store.depot.push(model[key]);
|
||||
}
|
||||
},
|
||||
UpdateAvailableMultiTool(store, model: server.MultiTools[]) {
|
||||
debugger
|
||||
|
||||
store.availableMultiTool = [];
|
||||
for (const key in model) {
|
||||
store.availableMultiTool.push(model[key]);
|
||||
}
|
||||
},
|
||||
UpdateAvailableTool(store, model: server.Tools[]) {
|
||||
debugger
|
||||
|
||||
store.availableTool = [];
|
||||
for (const key in model) {
|
||||
store.availableTool.push(model[key]);
|
||||
@@ -51,6 +51,5 @@ export interface DepotStoreModel {
|
||||
}
|
||||
} as DepotActions
|
||||
}
|
||||
|
||||
|
||||
export const depotActions = depotStore.actions as DepotActions;
|
||||
|
||||
@@ -53,6 +53,8 @@ export interface ToolingActions {
|
||||
setEdgeData(context, {tool,result});
|
||||
addToolToShank(context, {shank,model});
|
||||
removeToolToShank(context, {shank,model});
|
||||
|
||||
clearFamilies(context);
|
||||
}
|
||||
|
||||
export const toolingStore = {
|
||||
@@ -156,12 +158,12 @@ export const toolingStore = {
|
||||
store.shanks = Array.from(store._shanks.values());
|
||||
},
|
||||
DeleteTool(store, model: server.Tool) {
|
||||
debugger
|
||||
|
||||
store._tools.delete(model.id);
|
||||
store.tools = Array.from(store._tools.values());
|
||||
},
|
||||
DeleteEdgeData(store, {tool,model}){
|
||||
debugger
|
||||
|
||||
let idx = store.tools.indexOf(tool);
|
||||
store.tools[idx].edgesData.forEach(function(value,key){
|
||||
if(value.id == model.id){
|
||||
@@ -178,12 +180,12 @@ export const toolingStore = {
|
||||
// store.edgesData = Array.from(store._edgesData.values());
|
||||
},
|
||||
SetEdgeData(store,{tool,result}){
|
||||
debugger
|
||||
|
||||
let idx = store.tools.indexOf(tool);
|
||||
store.tools[idx].edgesData.push(result);
|
||||
},
|
||||
AddToolToShank(store,{shank,model}){
|
||||
debugger
|
||||
|
||||
for(let l in store.shanks){
|
||||
if(store.shanks[l].id == shank.id){
|
||||
store.shanks[l].childsTools.push(model);
|
||||
@@ -191,7 +193,7 @@ export const toolingStore = {
|
||||
}
|
||||
},
|
||||
RemoveToolToShank(store,{shank,model}){
|
||||
debugger
|
||||
|
||||
let idx = store.shanks.indexOf(shank);
|
||||
store.shanks[idx].childsTools.forEach(function(value,key){
|
||||
if(value.id == model.id){
|
||||
@@ -203,6 +205,9 @@ export const toolingStore = {
|
||||
// store.shanks[l].childsTools.splice(model.multitoolId,0);
|
||||
// }
|
||||
// }
|
||||
}, clearFamilies(store){
|
||||
store._families.clear();
|
||||
store.families = Array.from(store._families.values());
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
@@ -344,6 +349,9 @@ export const toolingStore = {
|
||||
},
|
||||
updateEdgeAdditionalParamsConfiguration(context, model: Map<string, Array<string>>) {
|
||||
context.commit("UpdateEdgeAdditionalParamsConfiguration", model);
|
||||
},
|
||||
clearFamilies(context){
|
||||
context.commit("clearFamilies");
|
||||
}
|
||||
|
||||
} as ToolingActions
|
||||
|
||||
Reference in New Issue
Block a user