派生自 wuyushui/SewerAndRainNetwork

YANGDL
2021-01-05 8356b1850885fe03a6bd388500a447dd5c42692c
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
70
71
<template>
  <div class="inner-panel">
    <div v-for="item in basemapList" :key="item.code" class="basemap-layer-item">
      <el-checkbox style="position: absolute;" name="basemap" v-model="selectedBasemap"   :value="item.code" label="item.code" @change="changeBasemap">标注</el-checkbox>
<!--      <el-popover-->
<!--          placement="top-start"-->
<!--          trigger="hover"-->
<!--          content="item.name">-->
      <img :src="item.conf.icon_actived" width="50" height="50" :title="item.name" @click="changeBasemap"/>
<!--      </el-popover>-->
<!--      <input  style="position: absolute;" type="radio" name="basemap" v-model="selectedBasemap" :value="item.code" title="显示标注" @change="changeBasemap"/>标注-->
 
    </div>
  </div>
</template>
 
<script>
export default {
  name: "LcBaseMap",
  components: {},
  data() {
    return {
      basemapList: [],
      selectedBasemap: "tianditu_img",
    };
  },
  computed: {
    basemapHelper() {
      return this.$store.state.map.basemapHelper
    }
  },
  mounted() {
  },
  methods: {
    updateBasemapList() {
      let list = this.basemapHelper.getBasemapList();
      this.basemapList = list;
    },
    changeBasemap() {
      this.basemapHelper.showBasemap(this.selectedBasemap, true)
    },
  }
 
};
</script>
 
<style scoped lang="less">
.inner-panel {
  display: flex;
  justify-content: center;
  align-items: center;
}
.basemap-layer-item {
  display: flex;
  width: 50px;
  height: 50px;
  margin: 10px;
  border: 2px solid white;
 
  input {
    position: relative;
    left: 0px;
    top: -53px;
  }
  .basemap-layer-item-name {
    position: relative;
    left: 0px;
    top: -53px;
  }
}
</style>