FastBee/docker/data/nginx/vue/static/js/chunk-01a4c846.a875b138.js

1 line
13 KiB
JavaScript
Raw Permalink Normal View History

2025-07-07 09:21:15 +08:00
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-01a4c846"],{"09cb":function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));n("d3b7");function o(){return new Promise((function(e,t){if("undefined"!==typeof BMap)return e(BMap),!0;window.onBMapCallback=function(){e(BMap)};var n=document.location.protocol;if("https:"==n){var o=document.createElement("meta");o.httpEquiv="Content-Security-Policy",o.content="upgrade-insecure-requests",o.onerror=t,document.head.appendChild(o)}var i=document.createElement("script");i.type="text/javascript",i.src="http://api.map.baidu.com/api?v=2.0&ak=nAtaBg9FYzav6c8P9rF9qzsWZfT8O0PD&s=1&__ec_v__=20190126&callback=onBMapCallback",i.onerror=t,document.head.appendChild(i)}))}},2114:function(e,t,n){var o=n("313e");function i(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}var r=o.extendComponentView({type:"bmap",render:function(e,t,n){var r=!0,a=e.getBMap(),s=n.getZr().painter.getViewportRoot(),c=e.coordinateSystem,l=function(t,o){if(!r){var i=s.parentNode.parentNode.parentNode,a=[-parseInt(i.style.left,10)||0,-parseInt(i.style.top,10)||0];s.style.left=a[0]+"px",s.style.top=a[1]+"px",c.setMapOffset(a),e.__mapOffset=a,n.dispatchAction({type:"bmapRoam"})}};function d(){r||n.dispatchAction({type:"bmapRoam"})}a.removeEventListener("moving",this._oldMoveHandler),a.removeEventListener("moveend",this._oldMoveHandler),a.removeEventListener("zoomend",this._oldZoomEndHandler),a.addEventListener("moving",l),a.addEventListener("moveend",l),a.addEventListener("zoomend",d),this._oldMoveHandler=l,this._oldZoomEndHandler=d;var p=e.get("roam");p&&"scale"!==p?a.enableDragging():a.disableDragging(),p&&"move"!==p?(a.enableScrollWheelZoom(),a.enableDoubleClickZoom(),a.enablePinchToZoom()):(a.disableScrollWheelZoom(),a.disableDoubleClickZoom(),a.disablePinchToZoom());var u=e.__mapStyle,f=e.get("mapStyle")||{},m=JSON.stringify(f);JSON.stringify(u)!==m&&(i(v)||a.setMapStyle(o.util.clone(f)),e.__mapStyle=JSON.parse(m));var y=e.__mapStyle2,v=e.get("mapStyleV2")||{},h=JSON.stringify(v);JSON.stringify(y)!==h&&(i(v)||a.setMapStyleV2(o.util.clone(v)),e.__mapStyle2=JSON.parse(h)),r=!1}});e.exports=r},"4ae9":function(e,t,n){var o,i=n("313e"),r=i.util,a=i.graphic,s=i.matrix;function c(e,t){this._bmap=e,this.dimensions=["lng","lat"],this._mapOffset=[0,0],this._api=t,this._projection=new BMap.MercatorProjection}function l(e,t){return t=t||[0,0],r.map([0,1],(function(n){var o=t[n],i=e[n]/2,r=[],a=[];return r[n]=o-i,a[n]=o+i,r[1-n]=a[1-n]=t[1-n],Math.abs(this.dataToPoint(r)[n]-this.dataToPoint(a)[n])}),this)}function d(){function e(e){this._root=e}return e.prototype=new BMap.Overlay,e.prototype.initialize=function(e){return e.getPanes().labelPane.appendChild(this._root),this._root},e.prototype.draw=function(){},e}c.prototype.dimensions=["lng","lat"],c.prototype.setZoom=function(e){this._zoom=e},c.prototype.setCenter=function(e){this._center=this._projection.lngLatToPoint(new BMap.Point(e[0],e[1]))},c.prototype.setMapOffset=function(e){this._mapOffset=e},c.prototype.getBMap=function(){return this._bmap},c.prototype.dataToPoint=function(e){var t=new BMap.Point(e[0],e[1]),n=this._bmap.pointToOverlayPixel(t),o=this._mapOffset;return[n.x-o[0],n.y-o[1]]},c.prototype.pointToData=function(e){var t=this._mapOffset;e=this._bmap.overlayPixelToPoint({x:e[0]+t[0],y:e[1]+t[1]});return[e.lng,e.lat]},c.prototype.getViewRect=function(){var e=this._api;return new a.BoundingRect(0,0,e.getWidth(),e.getHeight())},c.prototype.getRoamTransform=function(){return s.create()},c.prototype.prepareCustoms=function(e){var t=this.getViewRect();return{coordSys:{type:"bmap",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:r.bind(this.dataToPoint,this),size:r.bind(l,this)}}},c.dimensions=c.prototype.dimensions,c.create=function(e,t){var n,i=t.getDom();e.eachComponent("bmap",(function(e){var r=t.getZr().painter,a=r.getViewportRoot();if("undefined"===typeof BMap)throw new Error("BMap api is not loaded");if(o=o||d(),n)throw new Error("Only one bmap component can exist");if(!e.__bmap){var s=i.querySelector(".ec-extension-bmap");s&&(a