拖旺项目:聊城公交辅助决策系统
zhaoxing
2022-04-29 649d25bdf665ffc35fae445b99919c6fb8a0aaf0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<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>