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 {