派生自 wuyushui/SewerAndRainNetwork

wangqi
2021-04-12 0eb2de2d7631496fb6d9db215852c43b49793f6a
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,7 +266,19 @@
      ]
    }
  },
  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
      this.toolBoxPanelVisible = true
@@ -391,6 +406,11 @@
        this.isShow = !this.isShow
        this.active = -1
      }
      const state = {
        type: this.selectGroup,
        num: 1
      }
      bus.$emit('changeState', state)
    }
  }
}