BUG 29508
This commit is contained in:
@@ -22,8 +22,11 @@
|
||||
:filter-node-method="filterNode"
|
||||
default-expand-all
|
||||
highlight-current>
|
||||
|
||||
<span class="custom-tree-node" :title="node.label" style="" slot-scope="{ node, data }">{{ node.label }}</span>
|
||||
<template slot-scope="{ node, data }">
|
||||
<el-tooltip effect="light" :content="node.label" placement="right">
|
||||
<div v-text="node.label"/>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-tree>
|
||||
</div>
|
||||
</div>
|
||||
@@ -35,9 +38,9 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {mapState} from 'vuex'
|
||||
import {mapState} from 'vuex'
|
||||
|
||||
export default {
|
||||
export default {
|
||||
name: 'AppGridMap',
|
||||
label: "网格地图",
|
||||
props: {
|
||||
@@ -102,7 +105,7 @@
|
||||
getTreeList() {
|
||||
return this.instance.post(`/app/appgirdinfo/listAllByTop`).then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.treeObj.treeList = res.data;
|
||||
this.treeObj.treeList = [res.data];
|
||||
|
||||
this.$nextTick(() => {
|
||||
res.data.length && this.$refs.tree.setCurrentKey(res.data[0].id)
|
||||
@@ -111,8 +114,8 @@
|
||||
})
|
||||
},
|
||||
|
||||
onMapInit () {
|
||||
this.instance.post("/app/appdvcpconfig/getCorpLocation").then(res=>{
|
||||
onMapInit() {
|
||||
this.instance.post("/app/appdvcpconfig/getCorpLocation").then(res => {
|
||||
if (res.code === 0) {
|
||||
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') {
|
||||
this.getLeafNodes()
|
||||
|
||||
@@ -188,7 +191,7 @@
|
||||
},
|
||||
|
||||
renderGridMap(paths) {
|
||||
let {map, mapLib: TMap } = this
|
||||
let {map, mapLib: TMap} = this
|
||||
if (TMap) {
|
||||
if (this.polygons.length > 0) {
|
||||
this.polygons.forEach(e => e.destroy())
|
||||
@@ -359,7 +362,7 @@
|
||||
});
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@@ -374,7 +377,7 @@
|
||||
}
|
||||
|
||||
::v-deep .is-current {
|
||||
& > .el-tree-node__content > .custom-tree-node {
|
||||
& > .el-tree-node__content > .el-tooltip {
|
||||
color: #5088ff;
|
||||
}
|
||||
}
|
||||
@@ -576,7 +579,7 @@
|
||||
background: #333c53;
|
||||
}
|
||||
|
||||
.el-tree-node__label {
|
||||
.el-tooltip {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
@@ -585,7 +588,7 @@
|
||||
}
|
||||
|
||||
.is-current > .el-tree-node__content {
|
||||
.el-tree-node__label {
|
||||
.el-tooltip {
|
||||
color: #5088ff;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user