派生自 wuyushui/SewerAndRainNetwork

wangqi
2021-03-29 645386bef783a5a1f2ae32f0173a6aba713703e0
src/views/MapTemplate.vue
@@ -18,6 +18,8 @@
    <!--    <el-button id="map-btn" el-icon-c-scale-to-original icon="el-icon-c-scale-to-original" circle @click="isShowHidden"></el-button>-->
    <el-button type="primary" @click="ChangeState" class="solid-waste">固废</el-button>
    <SolidContent ref="SolidWastePopup"></SolidContent>
    <el-button type="primary" @click="AddGasHelper" class="flue-gas">废气</el-button>
    <popup-gas ref="FlueGas"></popup-gas>
  </div>
</template>
@@ -39,7 +41,9 @@
import SolidContent from '@components/BaseNav/SolidContent'
// 底图业务js逻辑
import AddSolidWasteHelper from '@components/BaseNav/SolidWaste'
// 废气
import AddGasHelper from '@components/flueGas/flueGas'
import PopupGas from '@/components/flueGas/popup-gas'
export default {
  name: 'MapTemplate',
  components: {
@@ -54,7 +58,8 @@
    LcServiceLayer,
    Popup,
    summarySheets,
    SolidContent
    SolidContent,
    PopupGas
  },
  data () {
    return {
@@ -71,19 +76,24 @@
      return this.$store.state.map.config
    }
  },
  // created () {
  //   this.FlueGas()
  // },
  beforeMount () {
    this.$nextTick(() => {
      this.init()
    })
  },
  methods: {
    AddGasHelper () {
      const AddGas = new AddGasHelper({ map: this.map })
      AddGas.requestData()
      AddGas.SetPlueGasContent(this.config, this.$refs.FlueGas)
    },
    ChangeState () {
      const AddSolidWaste = new AddSolidWasteHelper({ map: this.map })
      AddSolidWaste.requestData()
      AddSolidWaste.SetSolidWasteContent(this.config, this.$refs.SolidWastePopup)
    },
    isShowHidden () {
      this.isShowBtn = !this.isShowBtn
    },
    saveMapStatus () {
      window.serviceLayerHelper = this.serviceLayerHelper
@@ -110,6 +120,7 @@
      this.vectorLayerHelper.initVectorLayers(this.config)
      // this.ChangeState()
      // this.AddGasHelper()
      this.saveMapStatus()
      // this.setMapObj(this.mapObj)
@@ -158,7 +169,12 @@
</script>
<style lang="less">
.flue-gas {
  position:fixed;
  top: 88px;
  left: 180px;
  z-index: 500;
}
.solid-waste {
  position: absolute;
  top: 88px;