{"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\\eslint-loader\\index.js??ref--13-0!D:\\jenkins\\workspace\\bbsl-fvue\\src\\mixins\\gisCompMixin.js","dependencies":[{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\src\\mixins\\gisCompMixin.js","mtime":1684458238340},{"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\\eslint-loader\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/web.dom.iterable\";\nexport var gisCompMixin = {\n data: function data() {\n return {\n sectionMarker: null,\n // 标记点\n infoWin: null,\n // 信息窗\n showInfo: false,\n // 信息窗内组件显示与否\n tableHeight: 200,\n isInitMarkers: true,\n tabComp: false,\n layers: [],\n LayerGroup: null,\n // layerGroup 收集用于切换删除\n markerslayer: [],\n //集合标点的layer 收集用于切换删除\n searchClear: false,\n // 切换清除图层\n markerInfoWin: null\n };\n },\n inject: ['mapData'],\n created: function created() {\n var mapData = this.mapData();\n this.L = mapData.L;\n this.map = mapData.map;\n this.baseMapOverlay = mapData.baseMapOverlay;\n },\n mounted: function mounted() {\n var _this = this;\n\n this.$nextTick(function () {\n _this.calcTableHeight();\n });\n this.$root.$on('resize', function () {\n _this.calcTableHeight(500);\n });\n this.$bus.$on('contentPanleToggle', function () {\n _this.$nextTick(function () {\n _this.calcTableHeight();\n });\n });\n },\n beforeDestroy: function beforeDestroy() {\n this.clearMarkers();\n },\n methods: {\n // 清除图层\n clearMarkers: function clearMarkers() {\n // 清除单个标点\n if (this.sectionMarker) {\n this.map.removeLayer(this.sectionMarker);\n this.sectionMarker = null;\n } // 清除集合标点\n\n\n if (this.LayerGroup) {\n this.LayerGroup.clearLayers();\n this.LayerGroup = null;\n } // this.map.addLayer(this.baseMapOverlay)\n // this.baseMapOverlay.bringToBack()\n // 自定义删除\n\n\n if (this.customClear) {\n this.customClear();\n }\n\n this.map.closePopup();\n this.showInfo = false;\n var center = [29.865585, 106.499857];\n this.map.setView(center, 10);\n },\n // 点击列表行创建对应标点\n rowClick: function rowClick(row) {\n if (!row[this.lt] || !row[this.lg]) {\n this.$message.warning('暂无点位数据');\n return;\n }\n\n this.currentPoint = row;\n var latlng = this.createdLngLat(row[this.lt], row[this.lg]);\n this.drawMarker(latlng, row, false);\n },\n // 初始化多个标点\n initMarkers: function initMarkers() {\n var _this2 = this;\n\n console.log(\"init\");\n this.LayerGroup = null;\n this.markerslayer = [];\n this.filterData.forEach(function (row, index) {\n if (!row[_this2.lt] || !row[_this2.lg]) {\n console.log(\"索引\" + index + \"无定位数据\", row);\n return;\n }\n\n var latlng = _this2.createdLngLat(row[_this2.lt], row[_this2.lg]);\n\n var sectionMarker = _this2.drawMarker(latlng, row, true);\n\n _this2.markerslayer.push(sectionMarker);\n });\n this.LayerGroup = new L.layerGroup(this.markerslayer);\n this.map.addLayer(this.LayerGroup);\n },\n // 创建坐标点\n createdLngLat: function createdLngLat(lt, lg) {\n var latlng = new L.LatLng(lt, lg);\n return latlng;\n },\n // 创建信息窗体\n infoWindow: function infoWindow() {\n var maxHeight = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 300;\n var minWidth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 300;\n var maxWidth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 600;\n var minHeight = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;\n var sContent = this.$refs[this.modelName].$el;\n var infoWin = new this.L.popup({\n autoPan: true,\n maxHeight: maxHeight,\n minWidth: minWidth,\n maxWidth: maxWidth\n }).setContent(sContent);\n return infoWin;\n },\n // 创建icon\n createdIcon: function createdIcon(iconUrl) {\n var icon = new L.icon({\n iconUrl: iconUrl,\n iconSize: new L.point(24, 24),\n iconAnchor: new L.point(12, 20)\n });\n return icon;\n },\n // 创建标点 (单个或多个)\n drawMarker: function drawMarker(latlng, item, group) {\n var _this3 = this;\n\n var icon;\n\n if (this.typeIcon) {\n var iconUrl = this[\"iconUrl\".concat(item[this.iconTypeKey])];\n icon = this.createdIcon(iconUrl);\n } else {\n icon = this.createdIcon(this.iconUrl);\n } // 标点\n\n\n if (!group) {\n if (this.sectionMarker) {\n this.map.removeLayer(this.sectionMarker);\n this.sectionMarker = null;\n }\n\n this.sectionMarker = new L.marker(latlng, {\n icon: icon\n });\n var openTooltips;\n\n if (item.stnm) {\n openTooltips = this.sectionMarker.bindTooltip(item.stnm);\n } else if (item.hystName) {\n openTooltips = this.sectionMarker.bindTooltip(item.hystName);\n } else if (item.rsnm && !item.mpnm) {\n openTooltips = this.sectionMarker.bindTooltip(item.rsnm);\n } else if (item.name) {\n openTooltips = this.sectionMarker.bindTooltip(item.name);\n } else if (item.mpnm) {\n openTooltips = this.sectionMarker.bindTooltip(item.mpnm);\n }\n\n this.infoWin = this.infoWindow();\n this.sectionMarker.addEventListener('popupclose', function () {\n if (_this3.popupclose) {\n _this3.popupclose();\n }\n });\n this.sectionMarker.addEventListener('popupopen', function () {\n if (_this3.popupopen) {\n _this3.popupopen();\n }\n });\n this.sectionMarker.addEventListener('click', function () {\n _this3.currentPoint = item;\n\n _this3.infoWin.update();\n\n _this3.showInfo = true;\n\n _this3.map.setView(_this3.sectionMarker.getLatLng(), 14); // this.sectionMarker.openPopup(this.infoWin)\n // this.sectionMarker.bindPopup(this.infoWin).openPopup()\n // this.sectionMarker.addTo(this.map).bindPopup(this.infoWin)\n\n });\n this.sectionMarker.addEventListener('mouseover', function () {\n openTooltips.openTooltip();\n }); // 将标注添加到地图中\n\n this.map.addLayer(this.sectionMarker);\n this.showInfo = true;\n this.sectionMarker.bindPopup(this.infoWin).openPopup();\n this.map.setView(this.sectionMarker.getLatLng(), 14);\n } else {\n var sectionMarker = new L.marker(latlng, {\n icon: icon\n });\n var infoWin = this.infoWindow();\n\n var _openTooltips;\n\n if (item.stnm) {\n _openTooltips = sectionMarker.bindTooltip(item.stnm);\n } else if (item.hystName) {\n _openTooltips = sectionMarker.bindTooltip(item.hystName);\n } else if (item.rsnm && !item.mpnm) {\n _openTooltips = sectionMarker.bindTooltip(item.rsnm);\n } else if (item.name) {\n _openTooltips = sectionMarker.bindTooltip(item.name);\n } else if (item.mpnm) {\n _openTooltips = sectionMarker.bindTooltip(item.mpnm);\n }\n\n sectionMarker.addEventListener('popupclose', function () {\n if (_this3.popupclose) {\n _this3.popupclose();\n }\n });\n sectionMarker.addEventListener('popupopen', function () {\n if (_this3.popupopen) {\n _this3.popupopen();\n }\n });\n sectionMarker.addEventListener('mouseover', function () {\n _openTooltips.openTooltip();\n });\n sectionMarker.addEventListener('click', function () {\n _this3.currentPoint = item;\n infoWin.update();\n _this3.showInfo = true; // sectionMarker.bindPopup(this.infoWin).openPopup()\n\n _this3.map.setView(sectionMarker.getLatLng(), 14);\n }); // 将标注添加到地图中\n // this.map.addLayer(sectionMarker)\n\n sectionMarker.addTo(this.map).bindPopup(infoWin);\n return sectionMarker;\n }\n },\n // 计算table高度\n calcTableHeight: function calcTableHeight(delay) {\n var _this4 = this;\n\n setTimeout(function () {\n if (!_this4.tabComp) {\n if (!_this4.$refs.comContainer || !_this4.$refs.searchPanle) {\n return;\n }\n\n var comContainer = _this4.$refs.comContainer.clientHeight;\n var searchPanle = _this4.$refs.searchPanle.clientHeight; // 38-- padding: 14 0 , searchPanle margin-bottom :10\n\n _this4.tableHeight = comContainer - searchPanle - 38;\n } else {\n if (!_this4.$refs[\"comContainer_\".concat(_this4.activeName)][0].$el) {\n return;\n }\n\n if (!_this4.$refs[\"searchPanle_\".concat(_this4.activeName)][0]) {\n return;\n }\n\n var _comContainer = _this4.$refs[\"comContainer_\".concat(_this4.activeName)][0].$el.clientHeight;\n\n var _searchPanle = _this4.$refs[\"searchPanle_\".concat(_this4.activeName)][0].clientHeight; // 38-- padding: 14 0 , searchPanle margin-bottom :10\n\n\n _this4.tableHeight = _comContainer - _searchPanle - 10;\n }\n }, delay || 0);\n }\n }\n};",null]}