编目bug

This commit is contained in:
851673013@qq.com 2022-07-08 18:33:17 +08:00
parent 2447b7abfa
commit 678367a6bf
3 changed files with 10 additions and 4 deletions

View File

@ -341,12 +341,17 @@ export default {
//
getCategoryTree () {
this.$http.get('/category/getCategoryTree').then((res) => {
res.data.data.map((item, indexFather) => {
if (item.id === this.showItem.id) {
this.index = indexFather
}
})
this.data = []
if (this.showItem.children) {
this.showItem.children.forEach((val) => {
if (res.data.data[this.index].children) {
res.data.data[this.index].children.forEach((val) => {
this.initData(val, this.cengji)
})
this.data = this.showItem.children
this.data = res.data.data[this.index].children
console.log('data======================>', this.data)
this.flag = true
this.showKey++

View File

@ -174,6 +174,7 @@ export default {
index: -1,
pid: '',
showKey: 0,
showItem: {},
oldId: -1,
isShowEdit: true,
oldIdList: [],

View File

@ -271,7 +271,7 @@
},
grid: {
top: '10%',
left: '3%',
left: '10%',
right: '10%',
bottom: '0%',
containLabel: true,