派生自 wuyushui/SewerAndRainNetwork

chenzeping
2021-04-12 68d9f6b85690aa6402a69a1bc748be7129f39ed1
src/components/panel/ToolBoxPanel.vue
@@ -96,6 +96,9 @@
// 测量的方法
import Measure from '@/components/plugin/MeaSure'
//
import bus from '@/eventBus'
export default {
  name: 'ToolBoxPanel',
  components: {
@@ -263,6 +266,17 @@
      ]
    }
  },
  mounted () {
    /* import bus from '@/eventBus' */
    const that = this
    bus.$on('changeState', function (state) {
      if (state.num !== 1 && state.type) {
        that.selectGroup = false
        that.isShow = []
        that.active = -1
      }
    })
  },
  methods: {
    init (map) {
      this.map = map
@@ -273,7 +287,7 @@
        this.drawLayer = this.L.layerGroup().addTo(this.map)
      }
      this.active = index
      console.log(this.basemapList)
      // console.log(this.basemapList)
      for (let i = 0; i < this.isShow.length; i++) {
        if (i !== index) {
          this.isShow[i] = false
@@ -391,6 +405,11 @@
        this.isShow = !this.isShow
        this.active = -1
      }
      const state = {
        type: this.selectGroup,
        num: 1
      }
      bus.$emit('changeState', state)
    }
  }
}