BUG 30045

This commit is contained in:
aixianling
2022-06-07 16:46:14 +08:00
parent 47d44a94b8
commit 893ec0efc9

View File

@@ -22,6 +22,11 @@
:filter-node-method="filterNode" :filter-node-method="filterNode"
default-expand-all default-expand-all
highlight-current> highlight-current>
<template slot-scope="{node,data}">
<el-tooltip :content="node.label">
<div class="el-tree-node__label" v-text="node.label"/>
</el-tooltip>
</template>
</el-tree> </el-tree>
</div> </div>
</div> </div>
@@ -33,9 +38,9 @@
</div> </div>
</template> </template>
<script> <script>
import {mapState} from 'vuex' import {mapState} from 'vuex'
export default { export default {
name: 'AppGridMap', name: 'AppGridMap',
label: "网格地图", label: "网格地图",
props: { props: {
@@ -109,8 +114,8 @@
}) })
}, },
onMapInit () { onMapInit() {
this.instance.post("/app/appdvcpconfig/getCorpLocation").then(res=>{ this.instance.post("/app/appdvcpconfig/getCorpLocation").then(res => {
if (res.code === 0) { if (res.code === 0) {
this.map.setCenter(new this.mapLib.LatLng(res.data.lat, res.data.lng)) this.map.setCenter(new this.mapLib.LatLng(res.data.lat, res.data.lng))
} }
@@ -132,7 +137,7 @@
} }
}) })
}, },
handleNodeClick (val) { handleNodeClick(val) {
this.instance.post(`/app/appgirdinfo/queryChildGirdInfoByGirdId?girdId=${val.id}`).then((res) => { this.instance.post(`/app/appgirdinfo/queryChildGirdInfoByGirdId?girdId=${val.id}`).then((res) => {
if (res?.data) { if (res?.data) {
const arr = res.data.map(v => { const arr = res.data.map(v => {
@@ -180,7 +185,7 @@
}, },
renderGridMap(paths) { renderGridMap(paths) {
let {map, mapLib: TMap } = this let {map, mapLib: TMap} = this
if (TMap) { if (TMap) {
if (this.polygons.length > 0) { if (this.polygons.length > 0) {
this.polygons.forEach(e => e.destroy()) this.polygons.forEach(e => e.destroy())
@@ -351,7 +356,7 @@
}); });
}, },
}, },
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>