|
|
@ -17,6 +17,11 @@ |
|
|
|
<div v-if="deviceData" class="cabinet-num part-left-num"> |
|
|
|
<span v-for="(item,index) in partLeftNum" :key="index" :style="widhtStyle">{{ item }}</span> |
|
|
|
</div> |
|
|
|
<div v-if="deviceData" style="position:absolute; left:0; bottom:0; display: flex; font-size: 12px; color: #fff;"> |
|
|
|
<span style="display:block; margin-top: -12px">层</span> |
|
|
|
<span style="display:block; margin-top: -5px">/</span> |
|
|
|
<span style="display:block; ">节</span> |
|
|
|
</div> |
|
|
|
<ul v-if="sortLeft.length === 0" class="cabinet-row"> |
|
|
|
<li v-for="(item,i) in totalPartRowNum" :key="i" class="cabinet-cell" :style="cellStyle" /> |
|
|
|
</ul> |
|
|
@ -79,6 +84,11 @@ |
|
|
|
<div v-if="deviceData" class="cabinet-num part-right-num"> |
|
|
|
<span v-for="(item,index) in partRightNum" :key="index" :style="widhtStyle">{{ item }}</span> |
|
|
|
</div> |
|
|
|
<div v-if="deviceData" style="position:absolute; right:0; bottom:0; display: flex; font-size: 12px; color: #fff;"> |
|
|
|
<span style="display:block; ">节</span> |
|
|
|
<span style="display:block; margin-top: -5px">\</span> |
|
|
|
<span style="display:block; margin-top: -12px">层</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="cabinet-bottom"> |
|
|
|
<el-button type="primary" :disabled="isFixed">开架</el-button> |
|
|
@ -116,22 +126,24 @@ export default { |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
cellStyle: function() { |
|
|
|
let h |
|
|
|
if (this.cabinetNum > 8) { |
|
|
|
h = '100%/' + (this.deviceData.rowNo - 1) |
|
|
|
} else { |
|
|
|
h = '100%/' + this.deviceData.rowNo |
|
|
|
} |
|
|
|
// let h |
|
|
|
// if (this.cabinetNum > 8) { |
|
|
|
// h = '100%/' + (this.deviceData.rowNo - 1) |
|
|
|
// } else { |
|
|
|
// h = '100%/' + this.deviceData.rowNo |
|
|
|
// } |
|
|
|
const h = '100%/' + this.deviceData.rowNo |
|
|
|
const w = '100%/' + this.deviceData.partNo |
|
|
|
return { width: `calc(${w} - 10px )`, height: `calc(${h} - 10px)` } |
|
|
|
}, |
|
|
|
heightStyle: function() { |
|
|
|
let h |
|
|
|
if (this.cabinetNum > 8) { |
|
|
|
h = '100%/' + (this.deviceData.rowNo - 1) |
|
|
|
} else { |
|
|
|
h = '100%/' + this.deviceData.rowNo |
|
|
|
} |
|
|
|
// let h |
|
|
|
// if (this.cabinetNum > 8) { |
|
|
|
// h = '100%/' + (this.deviceData.rowNo - 1) |
|
|
|
// } else { |
|
|
|
// h = '100%/' + this.deviceData.rowNo |
|
|
|
// } |
|
|
|
const h = '100%/' + this.deviceData.rowNo |
|
|
|
return { height: `calc(${h})` } |
|
|
|
}, |
|
|
|
widhtStyle: function() { |
|
|
@ -171,13 +183,13 @@ export default { |
|
|
|
if (item.deviceTypeId.name === '密集架' && item.deviceName === '战备密集架测试') { // 写死状态 |
|
|
|
this.deviceData = item |
|
|
|
this.totalPartRowNum = item.partNo * item.rowNo |
|
|
|
let rowNo |
|
|
|
if (this.cabinetNum > 8) { // 战备密集架得情况 |
|
|
|
rowNo = item.rowNo - 1 |
|
|
|
} else { |
|
|
|
rowNo = item.rowNo |
|
|
|
} |
|
|
|
for (let i = 0; i < rowNo; i++) { |
|
|
|
// let rowNo |
|
|
|
// if (this.cabinetNum > 8) { // 战备密集架得情况 |
|
|
|
// rowNo = item.rowNo - 1 |
|
|
|
// } else { |
|
|
|
// rowNo = item.rowNo |
|
|
|
// } |
|
|
|
for (let i = 0; i < item.rowNo; i++) { |
|
|
|
this.rowNum.push(i + 1) |
|
|
|
} |
|
|
|
for (let i = 0; i < item.partNo; i++) { |
|
|
@ -381,6 +393,7 @@ export default { |
|
|
|
bottom: 0; |
|
|
|
span{ |
|
|
|
height: 20px; |
|
|
|
line-height: 20px; |
|
|
|
} |
|
|
|
} |
|
|
|
.part-right-num{ |
|
|
@ -390,6 +403,7 @@ export default { |
|
|
|
bottom: 0; |
|
|
|
span{ |
|
|
|
height: 20px; |
|
|
|
line-height: 20px; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|