{"remainingRequest":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\bbsl-fvue\\src\\views\\frontScreens\\GisMap.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\src\\views\\frontScreens\\GisMap.vue","mtime":1684458238481},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es7.object.get-own-property-descriptors\";\nimport \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.object.keys\";\nimport _defineProperty from \"D:/jenkins/workspace/bbsl-fvue/node_modules/@babel/runtime/helpers/esm/defineProperty\";\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nimport towns from \"./js/towns\";\nimport gisComponents from \"./js/gisComponents.js\"; // leaflet实现离线地图\n\nimport 'leaflet/dist/leaflet.css'; // 引入Leaflet对象 挂载到Vue上,便于全局使用,也可以单独页面中单独引用\n\nimport L from 'leaflet';\nimport * as d3 from 'd3';\nimport d3Svglayer from \"./js/d3SvgOverlay.js\";\nexport default {\n name: 'tianditu',\n components: _objectSpread({}, gisComponents),\n provide: function provide() {\n return {\n mapData: this.mapData\n };\n },\n data: function data() {\n return {\n L: null,\n map: null,\n baseMapOverlay: null,\n handler: null,\n zoom: 10,\n config: null,\n showMenu: true,\n showContent: true,\n selectionData: ['RealTimeRain'],\n jcssMenu: [{\n text: '行政区划',\n key: 'District'\n }, {\n text: '河流信息',\n key: 'RiverInfo'\n }, {\n text: '水库',\n key: 'Reservoir'\n }, {\n text: '生态流量',\n key: 'Hydropower'\n }, {\n text: '水雨情测站',\n key: 'WaterRainStation'\n }, {\n text: '工情测站',\n key: 'EngineerStation'\n }, {\n text: '预警设施',\n key: 'WarnInstallations'\n }, {\n text: '视频巡查',\n key: 'VideoPatrol'\n }, {\n text: '取水工程',\n key: 'WaterUser'\n }, {\n text: '山洪防治点',\n key: 'mountainTorrentDisaster'\n }],\n jcyjMenu: [{\n text: '实时雨情',\n key: 'RealTimeRain'\n }, {\n text: '日降雨量',\n key: 'DailyRainfall'\n }, {\n text: '实时水情',\n key: 'RealTimeWater'\n }, {\n text: '实时工情',\n key: 'RealTimeEngineer'\n }, {\n text: '取水监测',\n key: 'WaterIntakeMonitor'\n }, {\n text: '生态流量',\n key: 'EcologicalFlow'\n } // {\n // text: '测站告警',\n // key: 'StationAlarm',\n // },\n // {\n // text: '工情告警',\n // key: 'EngineerAlarm',\n // },\n ],\n currentTabComponent: 'RealTimeRain',\n tabComponentOptions: [{\n text: '实时雨情',\n key: 'RealTimeRain'\n }],\n currentChangeItem: {},\n polygon: null,\n // 行政区划多边形\n sectionMarker: null,\n // 行政区划标记点\n label: null,\n // 行政区划标记点名称\n wmsLayer: null,\n mapReady: false\n };\n },\n mounted: function mounted() {\n var _this = this;\n\n var initL = function initL() {\n return new Promise(function (resolve, reject) {\n console.log(reject); // 如果已加载直接返回\n\n if (window.L) {\n resolve(window.L);\n }\n });\n };\n\n this.$nextTick(function () {\n _this.newMap();\n\n initL().then(function (res) {\n _this.L = res;\n d3Svglayer.initD3SvgOverlay(_this.L, d3);\n _this.mapReady = true;\n });\n });\n },\n created: function created() {},\n methods: {\n mapData: function mapData() {\n return {\n L: this.L,\n map: this.map,\n baseMapOverlay: this.baseMapOverlay\n };\n },\n changeSelect: function changeSelect(data) {\n var _this2 = this;\n\n if (!this.showContent) {\n this.showContent = true;\n setTimeout(function () {\n _this2.$bus.$emit('contentPanleToggle');\n }, 500);\n }\n\n if (data.length > 3) {\n this.tabComponentOptions.push(this.currentChangeItem);\n this.tabComponentOptions.shift();\n this.selectionData.shift();\n this.currentTabComponent = this.tabComponentOptions[this.tabComponentOptions.length - 1].key;\n } else if (data.length == 3) {\n this.tabComponentOptions.push(this.currentChangeItem);\n this.currentTabComponent = this.tabComponentOptions[this.tabComponentOptions.length - 1].key;\n } else if (data.length == 2) {\n if (this.tabComponentOptions.length == 3) {\n this.tabComponentOptions = this.tabComponentOptions.filter(function (item) {\n return item.key !== _this2.currentChangeItem.key;\n });\n } else if (this.tabComponentOptions.length == 1) {\n this.tabComponentOptions.push(this.currentChangeItem);\n }\n\n this.currentTabComponent = this.tabComponentOptions[this.tabComponentOptions.length - 1].key;\n } else if (data.length == 1) {\n if (!this.tabComponentOptions.length) {\n this.tabComponentOptions.push(this.currentChangeItem);\n } else {\n this.tabComponentOptions = this.tabComponentOptions.filter(function (item) {\n return item.key !== _this2.currentChangeItem.key;\n });\n }\n\n this.currentTabComponent = this.tabComponentOptions[0].key;\n } else if (!data.length) {\n this.tabComponentOptions = [];\n this.currentTabComponent = '';\n this.showContent = false;\n }\n },\n test: function test(item, type) {\n this.currentChangeItem = item;\n },\n handlePaneClick: function handlePaneClick() {},\n // 菜单显示隐藏\n toggleMenu: function toggleMenu() {\n this.showMenu = !this.showMenu;\n },\n // 控制面板显示隐藏\n toggleContent: function toggleContent() {\n var _this3 = this;\n\n this.showContent = !this.showContent;\n\n if (this.showContent) {\n this.$nextTick(function () {\n _this3.$bus.$emit('contentPanleToggle');\n });\n }\n },\n // 初始化天地图\n newMap: function newMap() {\n this.map = new L.Map('bbls-map', {\n crs: L.CRS.EPSG4326,\n scrollWheelZoom: true,\n attributionControl: false,\n zoomControl: false,\n center: [29.865585, 106.499857],\n zoom: this.zoom\n }); // this.map.setView(\n // new L.LatLng( 29.865585,106.499857), // 106.395593, 29.805197\n // this.zoom\n // )\n // vec 矢量底图 img 影像\n\n var _baseImgLayer = new L.tileLayer('http://t1.tianditu.com/img_c/wmts?layer=img&style=default&tilematrixset=c&Service=WMTS&Request=GetTile&Version=1.0.0&Format=tiles&TileMatrix={z}&TileCol={x}&TileRow={y}&tk=f6df78cf1738e5623e2291f608e7040e', {\n zoomOffset: 1\n });\n\n _baseImgLayer.addTo(this.map); // cva 矢量注记 cia影像注记\n\n\n var pointImgLayer = new L.tileLayer('http://t3.tianditu.com/cia_c/wmts?layer=cia&style=default&tilematrixset=c&Service=WMTS&Request=GetTile&Version=1.0.0&Format=tiles&TileMatrix={z}&TileCol={x}&TileRow={y}&tk=f6df78cf1738e5623e2291f608e7040e', {\n zoomOffset: 1\n });\n console.log(pointImgLayer, _baseImgLayer); // pointImgLayer.addTo(this.map)\n\n this.map.on('click', function (point) {\n console.log(point);\n console.log('lt:' + point.latlng.lat);\n console.log('lg:' + point.latlng.lng);\n });\n this.map.setMinZoom(10);\n this.map.setMaxZoom(17); // 添加控件\n // var ctrl = new T.Control.MapType()\n\n this.initBBSL();\n },\n // 绘制北碚行政区域\n initBBSL: function initBBSL() {\n // d3绘制\n var countries = []; // L.polygon([init, redraw]).addTo(this.map)\n\n countries = towns.features;\n var myStyle = {\n color: '#d2e0e1',\n weight: 2,\n opacity: 1,\n fillColor: 'transparent',\n fillOpacity: 1\n };\n this.baseMapOverlay = new L.geoJSON(countries, {\n style: myStyle\n });\n this.map.addLayer(this.baseMapOverlay);\n this.baseMapOverlay.bringToBack(); // function init(sel, transform) {\n // var upd = sel.selectAll('path.geojson').data(countries)\n // upd\n // .enter()\n // .append('path')\n // .attr('class', 'geojson')\n // .attr('stroke', '#ccc')\n // .attr('stroke-width', '1')\n // .attr('fill', '#006ced')\n // .attr('fill-opacity', '0.01')\n // }\n // function redraw(sel, transform) {\n // sel.selectAll('path.geojson').each(function(d, i) {\n // d3.select(this).attr('d', transform.pathFromGeojson)\n // })\n // }\n }\n }\n};",null]}