编目bug
This commit is contained in:
parent
2447b7abfa
commit
678367a6bf
|
@ -341,12 +341,17 @@ export default {
|
||||||
// 查询所有编目
|
// 查询所有编目
|
||||||
getCategoryTree () {
|
getCategoryTree () {
|
||||||
this.$http.get('/category/getCategoryTree').then((res) => {
|
this.$http.get('/category/getCategoryTree').then((res) => {
|
||||||
|
res.data.data.map((item, indexFather) => {
|
||||||
|
if (item.id === this.showItem.id) {
|
||||||
|
this.index = indexFather
|
||||||
|
}
|
||||||
|
})
|
||||||
this.data = []
|
this.data = []
|
||||||
if (this.showItem.children) {
|
if (res.data.data[this.index].children) {
|
||||||
this.showItem.children.forEach((val) => {
|
res.data.data[this.index].children.forEach((val) => {
|
||||||
this.initData(val, this.cengji)
|
this.initData(val, this.cengji)
|
||||||
})
|
})
|
||||||
this.data = this.showItem.children
|
this.data = res.data.data[this.index].children
|
||||||
console.log('data======================>', this.data)
|
console.log('data======================>', this.data)
|
||||||
this.flag = true
|
this.flag = true
|
||||||
this.showKey++
|
this.showKey++
|
||||||
|
|
|
@ -174,6 +174,7 @@ export default {
|
||||||
index: -1,
|
index: -1,
|
||||||
pid: '',
|
pid: '',
|
||||||
showKey: 0,
|
showKey: 0,
|
||||||
|
showItem: {},
|
||||||
oldId: -1,
|
oldId: -1,
|
||||||
isShowEdit: true,
|
isShowEdit: true,
|
||||||
oldIdList: [],
|
oldIdList: [],
|
||||||
|
|
|
@ -271,7 +271,7 @@
|
||||||
},
|
},
|
||||||
grid: {
|
grid: {
|
||||||
top: '10%',
|
top: '10%',
|
||||||
left: '3%',
|
left: '10%',
|
||||||
right: '10%',
|
right: '10%',
|
||||||
bottom: '0%',
|
bottom: '0%',
|
||||||
containLabel: true,
|
containLabel: true,
|
||||||
|
|
Loading…
Reference in New Issue