|
|
@ -1208,12 +1208,7 @@ export default { |
|
|
|
this.autoOpenArr.push(data.id); |
|
|
|
if (!isRefresh && data) { |
|
|
|
this.selTreeObj = data; |
|
|
|
if (!this.selTreeObj.latitude) { |
|
|
|
this.selTreeObj.latitude = this.centerPoint[0]; |
|
|
|
} |
|
|
|
if (!this.selTreeObj.longitude) { |
|
|
|
this.selTreeObj.longitude = this.centerPoint[1]; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} else { |
|
|
|
this.$message.error(msg); |
|
|
@ -1225,7 +1220,7 @@ export default { |
|
|
|
}, |
|
|
|
async handleNodeClick(obj) { |
|
|
|
this.selObj = JSON.parse(JSON.stringify(obj)); |
|
|
|
this.getTreeObj(obj); |
|
|
|
this.selTreeObj = obj; |
|
|
|
await nextTick(1000); |
|
|
|
this.searchAgencyObj = {}; |
|
|
|
if (obj.level === "building") { |
|
|
@ -1242,17 +1237,7 @@ export default { |
|
|
|
this.handleSearchFrom("type"); |
|
|
|
} |
|
|
|
}, |
|
|
|
//解析树数据 |
|
|
|
getTreeObj(obj) { |
|
|
|
if (!obj.latitude) { |
|
|
|
obj.latitude = this.centerPoint[0]; |
|
|
|
} |
|
|
|
|
|
|
|
if (!obj.longitude) { |
|
|
|
obj.longitude = this.centerPoint[1]; |
|
|
|
} |
|
|
|
this.selTreeObj = obj; |
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
watch: { |
|
|
|
$route: { |
|
|
|