filesbox/web/dist/50636.689605a5.async.js

2 lines
5.4 KiB
JavaScript
Raw Permalink Normal View History

2024-07-26 06:10:54 +00:00
(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[50636],{96278:function(A){A.exports={root:"root___7VXfh",colorWeak:"colorWeak___2fQ5G","ant-layout":"ant-layout___2lk2i",globalSpin:"globalSpin___3wjkL","ant-table":"ant-table___3MoMQ","ant-table-thead":"ant-table-thead___2F4eD","ant-table-tbody":"ant-table-tbody___1iFAX",formBox:"formBox___1MR6m",hrefModal:"hrefModal___GOUPi",shop:"shop___3KrmS"}},50636:function(A,O,t){"use strict";t.r(O),t.d(O,{default:function(){return N}});var S=t(71194),T=t(50146),j=t(57663),D=t(71577),K=t(34792),m=t(48086),U=t(43358),y=t(34041),Z=t(47673),C=t(4107),w=t(67294),R=t(28216),I=t(96278),W=t.n(I),G=t(41273),o=t(85893),P,B,b=C.Z.TextArea,L=y.Z.Option,N=(P=(0,R.$j)(x=>{var a=x.commondesign;return{commondesign:a}}),P(B=class extends w.PureComponent{constructor(){super(...arguments);this.state={visible:!1,mapType:"baidu",city:"\u676D\u5DDE\u5E02",address:"\u8363\u5B89\u5927\u53A6",textAddress:"\u6D59\u6C5F\u65E0\u6781\u6559\u80B2\u4E91"},this.updataDomCallBack=a=>{var e=this,r=this.props.commondesign,n=r.Maps,d=n.element,_=n.callback,v=n.callClose,E=d.find(".box");if(window.BMap){var l=window,M=a,s=d.attr("data-mid");window["myGeo"+s]?window["myGeo"+s].getPoint(a.address,function(c){if(c){window["map"+s].centerAndZoom(c,16);var h=new BMap.Marker(c);window["map"+s].addOverlay(h);var u="<div style='width:300px;'><p style='margin:0;line-height:1.5;font-size:13px;'>"+a.textAddress+"</p></div>",p=new BMap.InfoWindow(u);h.openInfoWindow(p)}else m.ZP.info("\u60A8\u9009\u62E9\u5730\u5740\u6CA1\u6709\u89E3\u6790\u5230\u7ED3\u679C!")},a.city):(d.html('<div id="'+s+'" class="box"></div>'),setTimeout(function(){l["map"+s]=new BMap.Map(s),l["myGeo"+s]=new BMap.Geocoder,l["map"+s].enableScrollWheelZoom(!0);var c=new BMap.ScaleControl({anchor:BMAP_ANCHOR_TOP_LEFT}),h=new BMap.NavigationControl,u=new BMap.NavigationControl({anchor:BMAP_ANCHOR_TOP_RIGHT,type:BMAP_NAVIGATION_CONTROL_SMALL});l["map"+s].addControl(c),l["map"+s].addControl(h),l["map"+s].addControl(u),l["myGeo"+s].getPoint(M.address,function(p){if(p){l["map"+s].centerAndZoom(p,16);var f=new BMap.Marker(p);l["map"+s].addOverlay(f);var i="<div style='width:300px;'><p style='margin:0;line-height:1.5;font-size:13px;'>"+M.textAddress+"</p></div>",g=new BMap.InfoWindow(i);f.openInfoWindow(g)}else m.ZP.info("\u60A8\u9009\u62E9\u5730\u5740\u6CA1\u6709\u627E\u5230\u7ED3\u679C!")},M.city)},0)),d.attr("data-map",JSON.stringify(a))}else m.ZP.info("\u767E\u5EA6\u5730\u56FE\u9519\u8BEF")},this.updateMap=()=>{var a=this,e=this.state,r=e.city,n=e.address,d=e.textAddress;a.myGeo.getPoint(n,function(_){if(_){a.map.centerAndZoom(_,16),a.marker=new BMap.Marker(_),a.map.addOverlay(a.marker);var v="<div style='width:300px;'><p style='margin:0;line-height:1.5;font-size:13px;'>"+d+"</p></div>";a.infoWindow=new BMap.InfoWindow(v),a.marker.openInfoWindow(a.infoWindow)}else m.ZP.info("\u60A8\u9009\u62E9\u5730\u5740\u6CA1\u6709\u627E\u5230\u7ED3\u679C!")},r)},this.show=a=>{if(!window.BMap)return m.ZP.info("\u767E\u5EA6\u5730\u56FE\u6682\u4E0D\u53EF\u7528"),!1;var e=this;a?(a=JSON.parse(a),this.setState({mapType:a.mapType,city:a.city,address:a.address,textAddress:a.textAddress})):this.setState({visible:!0,mapType:"baidu",city:"\u676D\u5DDE\u5E02",address:"\u8363\u5B89\u5927\u53A6",textAddress:"\u6D59\u6C5F\u65E0\u6781\u6559\u80B2\u4E91"}),setTimeout(function(){e.map=new BMap.Map("baiduMap"),e.myGeo=new BMap.Geocoder,e.map.enableScrollWheelZoom(!0);var r=new BMap.ScaleControl({anchor:BMAP_ANCHOR_TOP_LEFT}),n=new BMap.NavigationControl,d=new BMap.NavigationControl({anchor:BMAP_ANCHOR_TOP_RIGHT,type:BMAP_NAVIGATION_CONTROL_SMALL});e.map.addControl(r),e.map.addControl(n),e.map.addControl(d),e.updateMap()},0)},this.cancelEvent=()=>{var a=this,e=this.props.dispatch;e({type:"commondesign/setState",payload:{Maps:{visible:!1,callback:()=>{},callClose:()=>{}}}})}}componentDidMount(){var a=this.props.commondesign,e=a.Maps,r=e.visible,n=e.element,d=e.callback,_=e.callClose;this.setState({visible:r});var v=n.attr("data-map");this.show(v)}render(){var a=this,e=th