From fb6fee0ae27ca37d00ebb02934071f1fef3a0fdf Mon Sep 17 00:00:00 2001 From: yanran200730 Date: Thu, 10 Feb 2022 14:10:47 +0800 Subject: [PATCH] 27126 --- project/sass/apps/AppGridBlock/AppGridBlock.vue | 1 + project/sass/apps/AppGridBlock/components/list.vue | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/project/sass/apps/AppGridBlock/AppGridBlock.vue b/project/sass/apps/AppGridBlock/AppGridBlock.vue index be98134d..3e0872f4 100644 --- a/project/sass/apps/AppGridBlock/AppGridBlock.vue +++ b/project/sass/apps/AppGridBlock/AppGridBlock.vue @@ -57,6 +57,7 @@ export default { this.$nextTick(() => { if (data.isRefresh) { + this.$refs.component.getTreeList(); this.$refs.component.getList(); } }); diff --git a/project/sass/apps/AppGridBlock/components/list.vue b/project/sass/apps/AppGridBlock/components/list.vue index 96a90a03..2e973a7b 100644 --- a/project/sass/apps/AppGridBlock/components/list.vue +++ b/project/sass/apps/AppGridBlock/components/list.vue @@ -316,10 +316,14 @@ export default { .then((res) => { if (res.code == 0) { this.treeObj.treeList = [...res.data]; - this.info = { ...this.treeObj.treeList[0] }; this.$nextTick(() => { - this.treeObj.treeList.length && this.$refs.tree.setCurrentKey(this.treeObj.treeList[0].id) + if (this.treeObj.treeList.length && !this.info.girdLevel) { + this.$refs.tree.setCurrentKey(this.treeObj.treeList[0].id) + this.info = { ...this.treeObj.treeList[0] }; + } else { + this.$refs.tree.setCurrentKey(this.info.id) + } }) } });