|
@ -126,16 +126,16 @@ export default { |
|
|
} |
|
|
} |
|
|
initBookshelfDetails(params).then((res) => { |
|
|
initBookshelfDetails(params).then((res) => { |
|
|
console.log(this.listData) |
|
|
console.log(this.listData) |
|
|
if (res.shelfs.length === 0) { |
|
|
|
|
|
res.shelfs.push('firstShelf', 'secondShelf', 'thirdShelf', 'fourthShelf', 'fivethShelf') |
|
|
|
|
|
for (let index = 0; index < res.shelfs.length; index++) { |
|
|
|
|
|
const shelfNo = res.shelfs[index] |
|
|
|
|
|
res.shelfBook[shelfNo] = [] |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
this.listData.splice(0, this.listData.length, ...res.shelfs) |
|
|
|
|
|
for (let index = 0; index < res.shelfs.length; index++) { |
|
|
|
|
|
const shelfNo = res.shelfs[index] |
|
|
|
|
|
|
|
|
// if (res.shelfs.length === 0) { |
|
|
|
|
|
// res.shelfs.push('firstShelf', 'secondShelf', 'thirdShelf', 'fourthShelf', 'fivethShelf') |
|
|
|
|
|
// for (let index = 0; index < res.shelfs.length; index++) { |
|
|
|
|
|
// const shelfNo = res.shelfs[index] |
|
|
|
|
|
// res.shelfBook[shelfNo] = [] |
|
|
|
|
|
// } |
|
|
|
|
|
// } |
|
|
|
|
|
this.listData.splice(0, this.listData.length, ...res.shelfAll) |
|
|
|
|
|
for (let index = 0; index < res.shelfAll.length; index++) { |
|
|
|
|
|
const shelfNo = res.shelfAll[index] |
|
|
this.$set(this.bookList, shelfNo, res.shelfBook[shelfNo]) |
|
|
this.$set(this.bookList, shelfNo, res.shelfBook[shelfNo]) |
|
|
} |
|
|
} |
|
|
if (this.listData.length > 0) { |
|
|
if (this.listData.length > 0) { |
|
|