diff --git a/Libs/CMS_CORE_Library.dll b/Libs/CMS_CORE_Library.dll index 448ca1ab..61145890 100644 Binary files a/Libs/CMS_CORE_Library.dll and b/Libs/CMS_CORE_Library.dll differ diff --git a/Step/wwwroot/assets/styles/base/card.less b/Step/wwwroot/assets/styles/base/card.less index 0938c30f..a69b0453 100644 --- a/Step/wwwroot/assets/styles/base/card.less +++ b/Step/wwwroot/assets/styles/base/card.less @@ -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; } } diff --git a/Step/wwwroot/assets/styles/base/depot.less b/Step/wwwroot/assets/styles/base/depot.less index 26438d58..97f44c87 100644 --- a/Step/wwwroot/assets/styles/base/depot.less +++ b/Step/wwwroot/assets/styles/base/depot.less @@ -121,6 +121,12 @@ // justify-content: center; flex-flow: column; padding-right: 5px; + div { + cursor: move; + } + i { + cursor: pointer; + } } } .box-right { diff --git a/Step/wwwroot/assets/styles/style.css b/Step/wwwroot/assets/styles/style.css index 50ceb43b..63c5ee01 100644 --- a/Step/wwwroot/assets/styles/style.css +++ b/Step/wwwroot/assets/styles/style.css @@ -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%; diff --git a/Step/wwwroot/src/components/depot.ts b/Step/wwwroot/src/components/depot.ts index 6862002b..3ae340c9 100644 --- a/Step/wwwroot/src/components/depot.ts +++ b/Step/wwwroot/src/components/depot.ts @@ -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; + } + + } diff --git a/Step/wwwroot/src/components/depot.vue b/Step/wwwroot/src/components/depot.vue index d75bc32a..204f105b 100644 --- a/Step/wwwroot/src/components/depot.vue +++ b/Step/wwwroot/src/components/depot.vue @@ -20,13 +20,18 @@
- + + - +