|
|
@ -470,6 +470,7 @@ export default { |
|
|
|
this.getHouseList(); |
|
|
|
}, |
|
|
|
async lazyLoadTree(node, resolve) { |
|
|
|
console.log(node); |
|
|
|
const url = `/actual/base/communityBuilding/tree/nextTreeNode?id=${node.data.id}&level=${node.data.level}`; |
|
|
|
const { data, code, msg } = await requestGet(url); |
|
|
|
if (code === 0) { |
|
|
@ -536,24 +537,23 @@ export default { |
|
|
|
}, |
|
|
|
//回车搜索组织 |
|
|
|
async handleChangeSerch (){ |
|
|
|
this.startLoading() |
|
|
|
this.$refs.ref_tree.$data.store.lazy = !this.filterText |
|
|
|
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 {data,code,msg} = await requestGet(url) |
|
|
|
if(data[0].children.length>0){ |
|
|
|
this.treeData = data |
|
|
|
this.autoOpenArr.push(this.treeData[0].id); |
|
|
|
for(let i in this.treeData[0].children){ |
|
|
|
this.autoOpenArr.push(this.treeData[0].id,this.treeData[0].children[i].id,this.treeData[0].children[0].children[0].id); |
|
|
|
} |
|
|
|
}else{ |
|
|
|
this.treeData = [] |
|
|
|
setTimeout(() => { |
|
|
|
this.loadTree() |
|
|
|
}, 5) |
|
|
|
|
|
|
|
this.$message.error('暂未找到!') |
|
|
|
} |
|
|
|
}else { |
|
|
|
this.treeData = [] |
|
|
|
this.autoOpenArr = [] |
|
|
|
this.loadTree() |
|
|
|
} |
|
|
|
this.endLoading() |
|
|
@ -665,9 +665,6 @@ export default { |
|
|
|
const url = "/actual/base/communityBuilding/tree/initTree" |
|
|
|
const { data, code, msg } = await requestGet(url) |
|
|
|
if (code === 0) { |
|
|
|
this.openNodes = [] |
|
|
|
this.openNodes.push(data.id) |
|
|
|
|
|
|
|
this.treeData = [] |
|
|
|
this.treeData.push(data) |
|
|
|
if (!isRefresh && data) { |
|
|
@ -736,7 +733,6 @@ export default { |
|
|
|
this.updateStartDate = '' |
|
|
|
this.updateEndDate = '' |
|
|
|
this.showRoomTable = false |
|
|
|
|
|
|
|
this.selObj = JSON.parse(JSON.stringify(obj)) |
|
|
|
this.getTreeObj(obj) |
|
|
|
await nextTick(1000) |
|
|
|