|
|
@@ -189,6 +189,12 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div class="row text-muted mt-1">
|
|
|
+ <div class="col-4">库位比</div>
|
|
|
+ <div class="input-group input-group-sm col-8 m-0">
|
|
|
+ <input class="switch" type="checkbox" @change="loadElement()"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<div class="row mt-3">
|
|
|
<h5 class="font-weight-bold ml-3">设备</h5>
|
|
|
<div class="form-check ml-3">
|
|
|
@@ -249,7 +255,19 @@
|
|
|
:parent-limitation="true" :w="(element.turn ? element.w : element.h)*ratio"
|
|
|
:h="(element.turn ? element.h : element.w)*ratio"
|
|
|
:x="element.x" :y="element.y" :z="90">
|
|
|
- <div class="h-100 txt-sty w-100 el-center" :class="element.turn ? 're' : ''">@{{ element.code }}</div>
|
|
|
+ <div class="h-100 w-100" v-if="isShowRatio">
|
|
|
+ <div class="h-100 w-100 p-0" v-if="element.children && element.children.length>0">
|
|
|
+ <div :style="{height:100/element.children.length+'%'}" v-for="(child,idx) in element.children"
|
|
|
+ :class="(element.children[element.children.length-1-idx]).location_tab==='0-0' ? '' : 'bg-danger'"
|
|
|
+ class="border border-dark text-dark small el-center w-100 m-0">
|
|
|
+ @{{ (element.children[element.children.length-1-idx]).location_tab | formatCount }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="h-100 w-100 txt-sty el-center" v-else>
|
|
|
+ <i class="fa fa-spinner fa-spin"></i>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="h-100 txt-sty w-100 el-center" :class="element.turn ? 're' : ''" v-else>@{{ element.code }}</div>
|
|
|
</vue-drag-resize>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -343,6 +361,7 @@
|
|
|
batchEquipmentSign:"",//当前选择的batchEquipment下标
|
|
|
batchSign:false,//当前是否为批量构建
|
|
|
failTipList:{},//构建失败的库位提示信息
|
|
|
+ isShowRatio:undefined,//是否展示库位现存比例
|
|
|
},
|
|
|
mounted() {
|
|
|
this.initPage();
|
|
|
@@ -392,6 +411,20 @@
|
|
|
};
|
|
|
},
|
|
|
methods:{
|
|
|
+ loadElement(){
|
|
|
+ if (this.isShowRatio===undefined){
|
|
|
+ this.isShowRatio = true;
|
|
|
+ this.equipmentElements.forEach(eq=>{
|
|
|
+ if (eq.exist){
|
|
|
+ this.getChildren(eq);
|
|
|
+ }else if(!eq.children){
|
|
|
+ eq.children = [];
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }else{
|
|
|
+ this.isShowRatio = !this.isShowRatio;
|
|
|
+ }
|
|
|
+ },
|
|
|
//获取库位的可选择属性
|
|
|
_getLocationAttr(){
|
|
|
if (this.locationAttr!==null){
|
|
|
@@ -1341,6 +1374,10 @@
|
|
|
return (qty>0 || other>0) ?
|
|
|
'color: #fff;background-color: #38c172;border-color: #38c172;' : '';
|
|
|
},
|
|
|
+ formatCount(tab){
|
|
|
+ let arr = tab.split("-");
|
|
|
+ return arr[0]*arr[1];
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
</script>
|