BUG 29508
This commit is contained in:
@@ -22,8 +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 }">
|
||||||
<span class="custom-tree-node" :title="node.label" style="" slot-scope="{ node, data }">{{ node.label }}</span>
|
<el-tooltip effect="light" :content="node.label" placement="right">
|
||||||
|
<div v-text="node.label"/>
|
||||||
|
</el-tooltip>
|
||||||
|
</template>
|
||||||
</el-tree>
|
</el-tree>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -35,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: {
|
||||||
@@ -102,7 +105,7 @@
|
|||||||
getTreeList() {
|
getTreeList() {
|
||||||
return this.instance.post(`/app/appgirdinfo/listAllByTop`).then((res) => {
|
return this.instance.post(`/app/appgirdinfo/listAllByTop`).then((res) => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.treeObj.treeList = res.data;
|
this.treeObj.treeList = [res.data];
|
||||||
|
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
res.data.length && this.$refs.tree.setCurrentKey(res.data[0].id)
|
res.data.length && this.$refs.tree.setCurrentKey(res.data[0].id)
|
||||||
@@ -111,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))
|
||||||
}
|
}
|
||||||
@@ -134,7 +137,7 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleNodeClick (val) {
|
handleNodeClick(val) {
|
||||||
if (val.girdLevel === '0') {
|
if (val.girdLevel === '0') {
|
||||||
this.getLeafNodes()
|
this.getLeafNodes()
|
||||||
|
|
||||||
@@ -188,7 +191,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())
|
||||||
@@ -359,7 +362,7 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@@ -374,7 +377,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .is-current {
|
::v-deep .is-current {
|
||||||
& > .el-tree-node__content > .custom-tree-node {
|
& > .el-tree-node__content > .el-tooltip {
|
||||||
color: #5088ff;
|
color: #5088ff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -576,7 +579,7 @@
|
|||||||
background: #333c53;
|
background: #333c53;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-tree-node__label {
|
.el-tooltip {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -585,7 +588,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.is-current > .el-tree-node__content {
|
.is-current > .el-tree-node__content {
|
||||||
.el-tree-node__label {
|
.el-tooltip {
|
||||||
color: #5088ff;
|
color: #5088ff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user