From 48d575a147ecf5b5ea042dc38d99ed58df68ddfd Mon Sep 17 00:00:00 2001 From: YANGDL <114714267@qq.com> Date: 星期五, 15 一月 2021 18:02:53 +0800 Subject: [PATCH] 增加mapbox插接件和功能 --- src/views/baseInfoMgr/pipeline/PipeLineIndex.vue | 56 ++++++++++++++++++++++++++++---------------------------- 1 files changed, 28 insertions(+), 28 deletions(-) diff --git a/src/views/baseInfoMgr/pipeline/PipeLineIndex.vue b/src/views/baseInfoMgr/pipeline/PipeLineIndex.vue index 6e8d732..7118d09 100644 --- a/src/views/baseInfoMgr/pipeline/PipeLineIndex.vue +++ b/src/views/baseInfoMgr/pipeline/PipeLineIndex.vue @@ -6,37 +6,37 @@ </template> <script> - import 'leaflet/dist/leaflet.css' - import Sgis from '@src/Sgis' - import PipeLineList from "./PipeLineList"; - import {mapMutations} from 'vuex' +import 'leaflet/dist/leaflet.css' +import Sgis from '@src/Sgis' +import PipeLineList from './PipeLineList' +import { mapMutations } from 'vuex' - export default { - name: 'PipeLineIndex', - components: {PipeLineList}, - mounted() { - this.$nextTick(() => { - this.init() - }) - }, - methods: { - ...mapMutations({ - setMapObj: 'setMapObj', - setLayerHelper: 'setLayerHelper' - }), - init() { - const mapcontainer = this.$refs.rootmap - this.mapObj = Sgis.initMap(mapcontainer) - this.basemapHelper = Sgis.initBasemaps(this.mapObj.map, this.mapObj.L) // 鍒濆鍖栧簳鍥� - this.vectorLayerHelper = Sgis.initLayers(this.mapObj.map, this.mapObj.L, {}, this.$nodeEnv) // 鍒濆鍖栦笟鍔″浘灞� - this.setLayerHelper(this.vectorLayerHelper) - return this.map - }, - setLayerHelper() { +export default { + name: 'PipeLineIndex', + components: { PipeLineList }, + mounted () { + this.$nextTick(() => { + this.init() + }) + }, + methods: { + ...mapMutations({ + setMapObj: 'setMapObj', + setLayerHelper: 'setLayerHelper' + }), + init () { + const mapcontainer = this.$refs.rootmap + this.mapObj = Sgis.initMap(mapcontainer) + this.basemapHelper = Sgis.initBasemaps(this.mapObj.map, this.mapObj.L) // 鍒濆鍖栧簳鍥� + this.vectorLayerHelper = Sgis.initLayers(this.mapObj.map, this.mapObj.L, {}, this.$nodeEnv) // 鍒濆鍖栦笟鍔″浘灞� + this.setLayerHelper(this.vectorLayerHelper) + return this.map + }, + setLayerHelper () { - } - } } + } +} </script> <style lang="less"> -- Gitblit v1.8.0