<template>
|
<div class="divtool" :class="{isactivetool: isflag}" @click="changeStyle">
|
<div class="divtext">{{ $store.state.mapMenu }}统计</div>
|
<div class="divimg"><img class="more-img-size" src="../../assets/map/icon_kuangxuan.png"/></div>
|
</div>
|
</template>
|
|
<script>
|
import utils from "../../unit/map";
|
export default {
|
name: "maptool",
|
data(){
|
return {}
|
},
|
computed: {
|
isflag() {
|
return this.$store.state.maptool
|
}
|
},
|
methods: {
|
changeStyle(){
|
this.$store.commit('SET_Maptool', true);
|
if(this.$store.state.mapMenu === "站点"){
|
utils.initzhandianLayer()
|
this.$store.commit("SET_SelAttr", {visa:false,type: "zhandiancircle",value:""})
|
} else if (this.$store.state.mapMenu === "车辆") {
|
utils.initcheliangLayer()
|
this.$store.commit("SET_SelAttr", {visa:false,type: "cheliangcircle",value:""})
|
}
|
// utils.initToolLayer();
|
}
|
}
|
}
|
</script>
|
|
<style lang="less" scoped>
|
.divtool{
|
display: flex;
|
position: absolute;
|
top: 80px;
|
right: 10px;
|
color: #f3f3f3;
|
background: url("../../assets/map/btn_kuangxuan_n.png");
|
background-size: contain;
|
background-repeat: no-repeat;
|
flex-direction: row;
|
width: 134px;
|
height: 36px;
|
line-height: 36px;
|
background: #1185e2;
|
border-radius: 4px;
|
// justify-content: center;
|
.divtext {
|
// width: 100px;
|
padding-left: 30px;
|
line-height: 37px;
|
font-size: 14px;
|
text-align: center;
|
}
|
.divimg {
|
width: 40px
|
}
|
.more-img-size{margin-left: 10px; width: 16px; height: 16px}
|
}
|
.isactivetool {
|
width: 134px;
|
line-height: 37px;
|
}
|
</style>
|