派生自 wuyushui/SewerAndRainNetwork

YANGDL
2021-01-05 1e40f7d8824d8859a6edbec3ae3fd0d857115553
src/views/MapTemplate.vue
@@ -3,11 +3,12 @@
    <div id="map" ref="rootmap"></div>
    <sgis-layer-controller :preset="'warningPreset'">
      <lc-basemap></lc-basemap>
      <div class="bar-line"></div>
            <div class="barline"></div>
      <lc-service-layer></lc-service-layer>
    </sgis-layer-controller>
    <lc-service-layer-filter v-show="showServiceLayerFilter" ref="serviceLayerFilter"></lc-service-layer-filter>
    <monitor-panel></monitor-panel>
        <top-enterprise-panel></top-enterprise-panel>
  </div>
</template>
@@ -20,11 +21,11 @@
import LcServiceLayer from '@components/LayerController/modules/LcServiceLayer'
import LcServiceLayerFilter from '@components/LayerController/modules/LcServiceLayerFilter'
import MonitorPanel from '@components/panel/MonitorPanel'
// import { mapMutations, mapState } from 'vuex'
import TopEnterprisePanel from "@components/panel/TopEnterprisePanel";
export default {
  name: 'MapTemplate',
  components: { SgisLayerController, MonitorPanel, LcBasemap, LcServiceLayer, LcServiceLayerFilter },
  components: {TopEnterprisePanel, SgisLayerController, MonitorPanel, LcBasemap, LcServiceLayer, LcServiceLayerFilter},
  data () {
    return {
      basemapHelper: {},
@@ -47,10 +48,10 @@
  },
  methods: {
    saveMapStatus () {
      this.$store.commit('setMapObj', this.mapObj)
      this.$store.commit('setBasemapHelper', this.basemapHelper)
      this.$store.commit('setServiceLayerHelper', this.serviceLayerHelper)
      this.$store.commit('setVectorLayerHelper', this.vectorLayerHelper)
      this.$store.commit('setMapObj', this.mapObj);
      this.$store.commit('setBasemapHelper', this.basemapHelper);
      this.$store.commit('setServiceLayerHelper', this.serviceLayerHelper);
      this.$store.commit('setVectorLayerHelper', this.vectorLayerHelper);
    },
    init () {
      const mapcontainer = this.$refs.rootmap
@@ -64,6 +65,7 @@
      this.vectorLayerHelper = Sgis.initVectorLayersHelper(this.mapObj.map, this.mapObj.L) // 初始化动态要素图层助手
      this.vectorLayerHelper.initVectorLayers(this.mapConfig)
      this.saveMapStatus()
      // this.setMapObj(this.mapObj)
@@ -83,13 +85,11 @@
  margin: 0;
  padding: 0;
  position: absolute;
  #map {
    height: 100%;
    width: 100%;
  }
  .bar-line {
  .barline{
    width: 100%;
    height: 1px;
    background-color: #0661AE;