Browse Source

密集架2D战备密集架

master
xuhuajiao 2 years ago
parent
commit
8fa81825de
  1. 46
      src/views/storeManage/warehouse3D/deseCabinet/index.vue

46
src/views/storeManage/warehouse3D/deseCabinet/index.vue

@ -108,7 +108,7 @@ export default {
return { return {
// D6490DA3D4261E8C26D0E3 // D6490DA3D4261E8C26D0E3
// 8F68A6B645B34B00B7ADFE // 8F68A6B645B34B00B7ADFE
storeroomId: '8F68A6B645B34B00B7ADFE', // id
storeroomId: 'D6490DA3D4261E8C26D0E3', // id
deviceData: null, // data deviceData: null, // data
cabinetNum: null, // num cabinetNum: null, // num
isFixed: false, // isFixed: false, //
@ -126,24 +126,24 @@ export default {
}, },
computed: { computed: {
cellStyle: function() { cellStyle: function() {
// let h
// if (this.cabinetNum > 8) {
// h = '100%/' + (this.deviceData.rowNo - 1)
// } else {
// h = '100%/' + this.deviceData.rowNo
// }
const 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 const w = '100%/' + this.deviceData.partNo
return { width: `calc(${w} - 10px )`, height: `calc(${h} - 10px)` } return { width: `calc(${w} - 10px )`, height: `calc(${h} - 10px)` }
}, },
heightStyle: function() { heightStyle: function() {
// let h
// if (this.cabinetNum > 8) {
// h = '100%/' + (this.deviceData.rowNo - 1)
// } else {
// h = '100%/' + this.deviceData.rowNo
// }
const 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})` } return { height: `calc(${h})` }
}, },
widhtStyle: function() { widhtStyle: function() {
@ -180,16 +180,16 @@ export default {
} }
getDeviceList(params).then(data => { getDeviceList(params).then(data => {
data.content.map(item => { data.content.map(item => {
if (item.deviceTypeId.name === '密集架' && item.deviceName === '战备密集架测试') { //
if (item.deviceTypeId.name === '密集架' && item.deviceName === '档案库_密集架') { //
this.deviceData = item this.deviceData = item
this.totalPartRowNum = item.partNo * item.rowNo 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 < item.rowNo; i++) {
let rowNo
if (this.cabinetNum > 8) { //
rowNo = item.rowNo - 1
} else {
rowNo = item.rowNo
}
for (let i = 0; i < rowNo; i++) {
this.rowNum.push(i + 1) this.rowNum.push(i + 1)
} }
for (let i = 0; i < item.partNo; i++) { for (let i = 0; i < item.partNo; i++) {

Loading…
Cancel
Save