From 2b9dda7e97792e8aaabd959129e6b1313a0769c6 Mon Sep 17 00:00:00 2001 From: mk <2403457699@qq.com> Date: Fri, 17 Feb 2023 13:16:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=90=9C=E7=B4=A2=E8=8F=9C=E5=8D=95=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E5=B1=95=E5=BC=80=E7=AC=AC=E4=B8=80=E5=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/base/community/community.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/views/modules/base/community/community.vue b/src/views/modules/base/community/community.vue index 17c6603fd..571533aa2 100644 --- a/src/views/modules/base/community/community.vue +++ b/src/views/modules/base/community/community.vue @@ -19,6 +19,7 @@ :filter-node-method="filterNode" @node-click="handleNodeClick" lazy + :default-expanded-keys="autoOpenArr" :load="lazyLoadTree"> nowData } return { + autoOpenArr:[], boxHeight: true, searchHeight: 190, filterText: '', @@ -538,15 +539,17 @@ export default { this.startLoading() this.$refs.ref_tree.$data.store.lazy = !this.filterText if(this.filterText.length > 0 && this.filterText!=''){ - const url = `/actual/base/communityBuilding/tree/search?keyword=${this.filterText}` + const url = `/actual/base/communityBuilding/tree/search?keyword=${this.filterText}` const {data,code,msg} = await requestGet(url) if(data[0].children.length>0){ this.treeData = data + this.autoOpenArr.push(this.treeData[0].id); }else{ this.treeData = [] setTimeout(() => { this.loadTree() }, 5) + this.$message.error('暂未找到!') } }else {