From 678367a6bf8a809f8e4584faeca398387d299f6e Mon Sep 17 00:00:00 2001 From: "851673013@qq.com" <851673013@qq.com> Date: Fri, 8 Jul 2022 18:33:17 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=96=E7=9B=AEbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- back/src/views/modules/bscatalogue/ManagementPop.vue | 11 ++++++++--- back/src/views/modules/bscatalogue/bscatalogue.vue | 1 + .../capabilityCloud/components/ComponentServices.vue | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/back/src/views/modules/bscatalogue/ManagementPop.vue b/back/src/views/modules/bscatalogue/ManagementPop.vue index dd55ee8e..dfbbfdf2 100644 --- a/back/src/views/modules/bscatalogue/ManagementPop.vue +++ b/back/src/views/modules/bscatalogue/ManagementPop.vue @@ -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++ diff --git a/back/src/views/modules/bscatalogue/bscatalogue.vue b/back/src/views/modules/bscatalogue/bscatalogue.vue index 43f341da..a3d8593d 100644 --- a/back/src/views/modules/bscatalogue/bscatalogue.vue +++ b/back/src/views/modules/bscatalogue/bscatalogue.vue @@ -174,6 +174,7 @@ export default { index: -1, pid: '', showKey: 0, + showItem: {}, oldId: -1, isShowEdit: true, oldIdList: [], diff --git a/front/src/views/capabilityCloud/components/ComponentServices.vue b/front/src/views/capabilityCloud/components/ComponentServices.vue index bf6082cf..97986fe1 100644 --- a/front/src/views/capabilityCloud/components/ComponentServices.vue +++ b/front/src/views/capabilityCloud/components/ComponentServices.vue @@ -271,7 +271,7 @@ }, grid: { top: '10%', - left: '3%', + left: '10%', right: '10%', bottom: '0%', containLabel: true,