merge
This commit is contained in:
Binary file not shown.
@@ -372,10 +372,10 @@
|
||||
font-size: 24px;
|
||||
color: @color-darkish-blue;
|
||||
.btn{
|
||||
height: 27px;
|
||||
width: 28px;
|
||||
height: 48px;
|
||||
width: 48px;
|
||||
font-size: 24px;
|
||||
margin: 0 -6px;
|
||||
margin: 0 -26px;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,6 +121,12 @@
|
||||
// justify-content: center;
|
||||
flex-flow: column;
|
||||
padding-right: 5px;
|
||||
div {
|
||||
cursor: move;
|
||||
}
|
||||
i {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
.box-right {
|
||||
|
||||
@@ -3450,10 +3450,10 @@ footer .container button.big:before {
|
||||
color: #002680;
|
||||
}
|
||||
.card-tool-depot .card-tool-depot-body .card-tool-depot-remove .btn {
|
||||
height: 27px;
|
||||
width: 28px;
|
||||
height: 48px;
|
||||
width: 48px;
|
||||
font-size: 24px;
|
||||
margin: 0 -6px;
|
||||
margin: 0 -26px;
|
||||
padding: 0;
|
||||
}
|
||||
.card-maintenance-wizard {
|
||||
@@ -3627,6 +3627,12 @@ footer .container button.big:before {
|
||||
flex-flow: column;
|
||||
padding-right: 5px;
|
||||
}
|
||||
.depot-container .depot-box .depot-boxbody .list-left .list-vertical div {
|
||||
cursor: move;
|
||||
}
|
||||
.depot-container .depot-box .depot-boxbody .list-left .list-vertical i {
|
||||
cursor: pointer;
|
||||
}
|
||||
.depot-container .depot-box .depot-boxbody .box-right {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
|
||||
@@ -45,6 +45,8 @@ export default class depot extends Vue {
|
||||
public currentFilter: string = "";
|
||||
|
||||
public currentPosition: number = 0;
|
||||
public draggingIn: any = false;
|
||||
public draggingTool: any = null;
|
||||
|
||||
@Watch("searchText")
|
||||
public applyFilter(n) {
|
||||
@@ -84,6 +86,11 @@ export default class depot extends Vue {
|
||||
this.scrollLeft -= (delta * 40);
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
this.$nextTick(function () {
|
||||
$('.square-container').css('width',this.calculateSquaresWidth(this.positions.length));
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
toggleEdit() {
|
||||
@@ -96,6 +103,20 @@ export default class depot extends Vue {
|
||||
}
|
||||
}
|
||||
|
||||
calculateSquaresWidth(positions:number){
|
||||
var c = (this.$refs.squarecontainer as any);
|
||||
if(c){
|
||||
var squaresX = 24;
|
||||
var squaresDist = 30;
|
||||
var perc = ( ((squaresX * positions) + (squaresDist * (positions-1))) /c.offsetWidth)*100;
|
||||
if(perc > 100)
|
||||
return "100%";
|
||||
else
|
||||
return perc + "%";
|
||||
}
|
||||
return "100%";
|
||||
}
|
||||
|
||||
public viewStateTool(){
|
||||
if(this.checked){
|
||||
this.enableStateProblemTool = true;
|
||||
@@ -119,7 +140,7 @@ export default class depot extends Vue {
|
||||
let model = (this.$store.state as AppModel);
|
||||
var result = model.tooling.tools.find(t => t.id == elem.toolId) as any;
|
||||
if(!result) result = model.tooling.shanks.find(t => t.id == elem.toolId);
|
||||
if(result) return { id: result.id, name: result.familyName || result.name };
|
||||
if(result) return { id: result.id, name: result.familyName || result.name, toolType: result.toolType };
|
||||
return {};
|
||||
}
|
||||
|
||||
@@ -165,7 +186,6 @@ export default class depot extends Vue {
|
||||
new DepotService().AddToolToDepot(this.depotId, position,{ toolId: toolToAdd.id}).then(response =>{
|
||||
|
||||
});
|
||||
console.log(position, toolToAdd);
|
||||
}
|
||||
|
||||
public removeToolsToDepot(position, toolToAdd){
|
||||
@@ -193,12 +213,23 @@ export default class depot extends Vue {
|
||||
}
|
||||
|
||||
public getInfoEquipmentIconFromTool(obj) {
|
||||
if(obj.childTool)
|
||||
return this.getInfoEquipmentIcon(obj.childTool.toolType);
|
||||
if(obj.toolType)
|
||||
return this.getInfoEquipmentIcon(obj.toolType);
|
||||
else
|
||||
return "../assets/icons/Tools/Shanks.png";
|
||||
}
|
||||
|
||||
|
||||
public checkMagPosType(type) {
|
||||
if(this.draggingTool)
|
||||
console.log(type, this.draggingTool.magazinePositionType);
|
||||
if(this.draggingTool && type==0)
|
||||
return true;
|
||||
else if(this.draggingTool && type == this.draggingTool.magazinePositionType)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -20,13 +20,18 @@
|
||||
<i class="fa fa-2x fa-search"></i>
|
||||
</div>
|
||||
<div class="list-vertical scrollable">
|
||||
<drag :transfer-data="m" v-for="m in availableMultiTools.filter(t => t.name.toLowerCase().indexOf(currentFilter) >=0)" :key="m.id">
|
||||
<drag :transfer-data="m" v-for="m in availableMultiTools.filter(t => t.name.toLowerCase().indexOf(currentFilter) >=0)" :key="m.id"
|
||||
@dragstart="draggingIn = true, draggingTool= m"
|
||||
@dragend="draggingIn = false">
|
||||
|
||||
<template slot-scope="props">
|
||||
<div v-if="props.transferData" class="tool"> </div>
|
||||
<tool v-else :code="m.id" :title="m.name" img-source="../assets/icons/Tools/Shanks.png" @click="openInfoShank(m)"></tool>
|
||||
</template>
|
||||
</drag>
|
||||
<drag :transfer-data="t" v-for="t in availableTools.filter(t => t.familyName.toLowerCase().indexOf(currentFilter) >=0)" :key="t.id">
|
||||
<drag :transfer-data="t" v-for="t in availableTools.filter(t => t.familyName.toLowerCase().indexOf(currentFilter) >=0)" :key="t.id"
|
||||
@dragstart="draggingIn = true, draggingTool= t"
|
||||
@dragend="draggingIn = false">
|
||||
<template slot-scope="props">
|
||||
<div v-if="props.transferData" class="tool"> </div>
|
||||
<tool v-else :code="t.id" :title="t.familyName" :img-source="getInfoEquipmentIcon(t.toolType)" @click="openInfoEquipment(t)"></tool>
|
||||
@@ -43,12 +48,12 @@
|
||||
</div>
|
||||
<div class="sd-section scrollable" ref="positionslist">
|
||||
<detail-card v-for="(pos, idx) in positions" :key="pos.positionId" :number="pos.positionId" class="depot-position" @click="openModalLoadDepot(pos.positionId)" :class="{'selected': currentPosition == idx}" :magpos-occupied="toolAtPosition(pos.positionId)">
|
||||
<drop class="target" v-if="!toolAtPosition(pos.positionId)" @drop="addToDepotPosition(pos.positionId, ...arguments)">
|
||||
<drop class="target" v-if="!toolAtPosition(pos.positionId) && !pos.disabled && checkMagPosType(pos.type) && draggingIn" @drop="addToDepotPosition(pos.positionId, ...arguments)">
|
||||
<span class="empty" >{{'depot_avaiable_position' | localize("Posizione disponibile")}}</span>
|
||||
</drop>
|
||||
<card-tool-depot :class="{'stateProblemsTool': enableStateProblemTool && toolIsInError(returnChild(toolAtPosition(pos.positionId)))}" v-if="toolAtPosition(pos.positionId)" :code="returnChild(toolAtPosition(pos.positionId)).id"
|
||||
:title="returnChild(toolAtPosition(pos.positionId)).name"
|
||||
:imgSource="getInfoEquipmentIconFromTool(toolAtPosition(pos.positionId))"
|
||||
:imgSource="getInfoEquipmentIconFromTool(returnChild(toolAtPosition(pos.positionId)))"
|
||||
:editable="editable"
|
||||
@click="removeToolsToDepot(pos.positionId, ...arguments)"
|
||||
@clickinfo="toolAtPosition(pos.positionId).childTool ? openInfoEquipment(toolAtPosition(pos.positionId).childTool) : openInfoShank(toolAtPosition(pos.positionId).childShank)">
|
||||
@@ -61,7 +66,11 @@
|
||||
<div class="square empty"
|
||||
v-for="(pos, index) in positions" :key="pos.positionId"
|
||||
@click="goToPosition(index)"
|
||||
:class="{'full': toolAtPosition(pos.positionId), 'red': (enableStateProblemTool && toolIsInError(returnChild(toolAtPosition(pos.positionId)))) }"></div>
|
||||
@dragover=" (!toolAtPosition(pos.positionId) && !pos.disabled && checkMagPosType(pos.type) && draggingIn)? goToPosition(index):{}"
|
||||
:class="{ 'full': toolAtPosition(pos.positionId),
|
||||
'red': (enableStateProblemTool && toolIsInError(returnChild(toolAtPosition(pos.positionId)))),
|
||||
'selected': !toolAtPosition(pos.positionId) && !pos.disabled && checkMagPosType(pos.type) && draggingIn,
|
||||
}"></div>
|
||||
<!-- <div class="square" :class="{'full': true}"></div>
|
||||
<div class="square" :class="{'empty': true}"></div>
|
||||
<div class="square" :class="{'selected-full': true}"></div> -->
|
||||
|
||||
Reference in New Issue
Block a user