|
@ -85,6 +85,13 @@ export default { |
|
|
await this.loadOrgData() |
|
|
await this.loadOrgData() |
|
|
await this.loadTree() |
|
|
await this.loadTree() |
|
|
await this.$refs['ref_communityTable'].loadTable(true, this.selTreeObj) |
|
|
await this.$refs['ref_communityTable'].loadTable(true, this.selTreeObj) |
|
|
|
|
|
if (this.treeData.length > 0) { |
|
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
|
// ref_tree 元素的ref value 绑定的node-key |
|
|
|
|
|
this.$refs.ref_tree.setCurrentKey(this.treeData[0].id); |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
computed: { |
|
|
computed: { |
|
|
rowHeight () { |
|
|
rowHeight () { |
|
@ -93,7 +100,7 @@ export default { |
|
|
...mapGetters(['clientHeight']) |
|
|
...mapGetters(['clientHeight']) |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
async loadTree () { |
|
|
async loadTree (isRefresh) { |
|
|
const url = "/gov/org/building/treelist" |
|
|
const url = "/gov/org/building/treelist" |
|
|
let params = {} |
|
|
let params = {} |
|
|
|
|
|
|
|
@ -102,7 +109,8 @@ export default { |
|
|
if (code === 0) { |
|
|
if (code === 0) { |
|
|
|
|
|
|
|
|
this.treeData = data |
|
|
this.treeData = data |
|
|
if (data.length > 0) { |
|
|
if (!isRefresh && data.length > 0) { |
|
|
|
|
|
debugger |
|
|
this.selTreeObj = data[0] |
|
|
this.selTreeObj = data[0] |
|
|
if (!this.selTreeObj.latitude) { |
|
|
if (!this.selTreeObj.latitude) { |
|
|
this.selTreeObj.latitude = this.centerPoint[0] |
|
|
this.selTreeObj.latitude = this.centerPoint[0] |
|
@ -157,8 +165,13 @@ export default { |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
//添加小区结束 |
|
|
//添加小区结束 |
|
|
refreshTree () { |
|
|
async refreshTree () { |
|
|
|
|
|
|
|
|
|
|
|
await this.loadTree(this.selTreeObj.id) |
|
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
|
// ref_tree 元素的ref value 绑定的node-key |
|
|
|
|
|
this.$refs.ref_tree.setCurrentKey(this.selTreeObj.id); |
|
|
|
|
|
}); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
//解析树数据 |
|
|
//解析树数据 |
|
|