(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-33b7334c"],{5420:function(e,t,o){"use strict";o.r(t);var a=o("7a23");const i=Object(a["withScopeId"])("data-v-8c013d80");Object(a["pushScopeId"])("data-v-8c013d80");const n={class:"ele-body ele-body-card"},s=Object(a["createTextVNode"])("地图选择位置(POI) "),c=Object(a["createTextVNode"])("关键字检索模式 "),r={key:0},l={style:{"margin-top":"12px"}},p={style:{"margin-top":"12px"}},d={style:{"margin-top":"12px"}},h={ref:"locationMap",style:{height:"360px","max-width":"1000px"}},m={ref:"trackMap",style:{height:"360px","margin-bottom":"16px","max-width":"1000px"}},u=Object(a["createTextVNode"])("开始动画 "),g=Object(a["createTextVNode"])("暂停动画 "),k=Object(a["createTextVNode"])("继续动画 ");Object(a["popScopeId"])();const y=i((e,t,o,y,f,b)=>{const v=Object(a["resolveComponent"])("ele-map-picker"),M=Object(a["resolveComponent"])("a-button"),w=Object(a["resolveComponent"])("a-space"),O=Object(a["resolveComponent"])("a-card");return Object(a["openBlock"])(),Object(a["createBlock"])("div",n,[Object(a["createVNode"])(v,{visible:f.showPicker,"onUpdate:visible":t[1]||(t[1]=e=>f.showPicker=e),"need-city":!0,onDone:b.onChoose},null,8,["visible","onDone"]),Object(a["createVNode"])(v,{visible:f.showPicker2,"onUpdate:visible":t[2]||(t[2]=e=>f.showPicker2=e),"need-city":!0,"search-type":1,onDone:b.onChoose},null,8,["visible","onDone"]),Object(a["createVNode"])(O,{title:"弹窗选择位置",bordered:!1},{default:i(()=>[Object(a["createVNode"])(w,null,{default:i(()=>[Object(a["createVNode"])(M,{type:"primary",onClick:t[3]||(t[3]=e=>f.showPicker=!0)},{default:i(()=>[s]),_:1}),Object(a["createVNode"])(M,{type:"primary",onClick:t[4]||(t[4]=e=>f.showPicker2=!0)},{default:i(()=>[c]),_:1})]),_:1}),f.form.location?(Object(a["openBlock"])(),Object(a["createBlock"])("div",r,[Object(a["createVNode"])("div",l,"选择位置: "+Object(a["toDisplayString"])(f.form.location),1),Object(a["createVNode"])("div",p,"详细地址: "+Object(a["toDisplayString"])(f.form.address),1),Object(a["createVNode"])("div",d,"经 纬 度 : "+Object(a["toDisplayString"])(f.form.jinweidu),1)])):Object(a["createCommentVNode"])("",!0)]),_:1}),Object(a["createVNode"])(O,{title:"官网底部地图",bordered:!1},{default:i(()=>[Object(a["createVNode"])("div",h,null,512)]),_:1}),Object(a["createVNode"])(O,{title:"轨迹展示及轨迹回放",bordered:!1},{default:i(()=>[Object(a["createVNode"])("div",m,null,512),Object(a["createVNode"])(w,null,{default:i(()=>[Object(a["createVNode"])(M,{type:"primary",onClick:b.startTrackAnim},{default:i(()=>[u]),_:1},8,["onClick"]),Object(a["createVNode"])(M,{type:"primary",onClick:b.pauseTrackAnim},{default:i(()=>[g]),_:1},8,["onClick"]),Object(a["createVNode"])(M,{type:"primary",onClick:b.resumeTrackAnim},{default:i(()=>[k]),_:1},8,["onClick"])]),_:1})]),_:1})])}),f={class:"ele-map-picker-header"},b={class:"ele-map-picker-header-search"},v={class:"ele-map-picker-body"},M={class:"ele-map-picker-main"},w={class:"ele-map-picker-poi-item-title"},O={key:0,class:"ele-map-picker-poi-item-address"};function j(e,t,o,i,n,s){const c=Object(a["resolveComponent"])("search-outlined"),r=Object(a["resolveComponent"])("a-input"),l=Object(a["resolveComponent"])("a-auto-complete"),p=Object(a["resolveComponent"])("a-button"),d=Object(a["resolveComponent"])("plus-outlined"),h=Object(a["resolveComponent"])("environment-outlined"),m=Object(a["resolveComponent"])("check-circle-outlined"),u=Object(a["resolveComponent"])("a-spin"),g=Object(a["resolveComponent"])("a-modal"),k=Object(a["resolveComponent"])("locale-receiver");return Object(a["openBlock"])(),Object(a["createBlock"])(k,{"component-name":"ele"},{default:Object(a["withCtx"])(i=>[Object(a["createVNode"])(g,{visible:o.visible,title:o.title||i.map.title,width:o.width,centered:o.centered,closable:o.closable,"destroy-on-close":o.destroyOnClose,"force-render":o.forceRender,keyboard:o.keyboard,mask:o.mask,"mask-closable":o.maskClosable,"mask-style":o.maskStyle,"wrap-class-name":o.wrapClassName,"z-index":o.zIndex,"dialog-style":o.dialogStyle,"dialog-class":o.dialogClass,footer:null,"body-style":{padding:0},class:"ele-map-picker-dialog","onUpdate:visible":s.updateVisible},{title:Object(a["withCtx"])(()=>[Object(a["renderSlot"])(e.$slots,"title")]),default:Object(a["withCtx"])(()=>[n.show?(Object(a["openBlock"])(),Object(a["createBlock"])(u,{key:0,spinning:n.loading},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])("div",f,[Object(a["createVNode"])("div",b,[Object(a["createVNode"])(l,{value:n.suggestionKeywords,"onUpdate:value":t[1]||(t[1]=e=>n.suggestionKeywords=e),placeholder:o.searchPlaceholder||i.map.placeholder,options:n.suggestionData,onSearch:s.onSearch,onSelect:s.onSelect},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])(r,null,{suffix:Object(a["withCtx"])(()=>[Object(a["createVNode"])(c,{class:"ele-text-secondary"})]),_:1})]),_:2},1032,["value","placeholder","options","onSearch","onSelect"])]),Object(a["createVNode"])(p,{loading:n.doneLoading,type:"primary",onClick:e=>s.onDone(i.map.message)},{default:Object(a["withCtx"])(()=>[Object(a["createTextVNode"])(Object(a["toDisplayString"])(o.okText||i.map.ok),1)]),_:2},1032,["loading","onClick"])]),Object(a["createVNode"])("div",v,[Object(a["createVNode"])("div",M,[Object(a["createVNode"])("div",{ref:"eleMapPickerMap",style:{height:o.height}},null,4),0===o.searchType?(Object(a["openBlock"])(),Object(a["createBlock"])(d,{key:0,class:"ele-map-picker-main-plus"})):Object(a["createCommentVNode"])("",!0),0===o.searchType?(Object(a["openBlock"])(),Object(a["createBlock"])("img",{key:1,class:s.iconClass,src:o.markerSrc,alt:""},null,10,["src"])):Object(a["createCommentVNode"])("",!0)]),Object(a["createVNode"])(u,{spinning:n.poiLoading},{default:Object(a["withCtx"])(()=>[Object(a["createVNode"])("div",{class:"ele-map-picker-poi-list",style:{height:o.height}},[(Object(a["openBlock"])(!0),Object(a["createBlock"])(a["Fragment"],null,Object(a["renderList"])(n.poiData,(e,t)=>(Object(a["openBlock"])(),Object(a["createBlock"])("div",{key:t,class:["ele-map-picker-poi-item",{active:t===n.chooseIndex}],onClick:e=>s.onChoose(t)},[Object(a["createVNode"])(h,{class:"ele-map-picker-poi-item-icon"}),Object(a["createVNode"])("div",w,Object(a["toDisplayString"])(e.name),1),e.address?(Object(a["openBlock"])(),Object(a["createBlock"])("div",O,Object(a["toDisplayString"])(e.address),1)):Object(a["createCommentVNode"])("",!0),Object(a["createVNode"])(m,{class:"ele-map-picker-poi-item-check"})],10,["onClick"]))),128))],4)]),_:1},8,["spinning"])])]),_:2},1032,["spinning"])):Object(a["createCommentVNode"])("",!0)]),_:2},1032,["visible","title","width","centered","closable","destroy-on-close","force-render","keyboard","mask","mask-closable","mask-style","wrap-class-name","z-index","dialog-style","dialog-class","onUpdate:visible"])]),_:1})}var A=o("e5cd"),I=o("862d"),S=o.n(I),C=o("47ce"),x=o("e9d5"),L=o("3415"),N=o("d34f"),V={name:"EleMapPicker",components:{LocaleReceiver:A["a"],PlusOutlined:C["a"],SearchOutlined:x["a"],EnvironmentOutlined:L["a"],CheckCircleOutlined:N["a"]},emits:["done","open","closed","update:visible"],props:{visible:Boolean,height:{type:String,default:"450px"},center:Array,zoom:{type:Number,default:11},chooseZoom:{type:Number,default:17},poiSize:{type:Number,default:30},poiType:{type:String,default:""},poiKeywords:{type:String,default:""},poiRadius:{type:Number,default:1e3},needCity:Boolean,forceChoose:{type:Boolean,default:!0},suggestionCity:{type:String,default:"全国"},searchType:{type:Number,default:0},searchPlaceholder:String,markerSrc:{type:String,default:"https://3gimg.qq.com/lightmap/components/locationPicker2/image/marker.png"},mapKey:{type:String,default:"006d995d433058322319fa797f2876f5"},mapVersion:{type:String,default:"2.0"},mapStyle:String,centered:Boolean,closable:{type:Boolean,default:!0},destroyOnClose:Boolean,forceRender:Boolean,keyboard:{type:Boolean,default:!0},mask:{type:Boolean,default:!0},maskClosable:{type:Boolean,default:!0},maskStyle:Object,title:String,width:{type:String,default:"780px"},wrapClassName:String,zIndex:{type:Number,default:1e3},dialogStyle:Object,dialogClass:String,okText:String},data(){return{show:!1,map:null,centerMarker:null,placeSearch:null,autoComplete:null,poiData:[],chooseIndex:null,isSelMove:!1,showIconAnim:!1,suggestionKeywords:"",lastSuggestion:"",suggestionData:[],chooseSuggestion:null,loading:!0,poiLoading:!1,doneLoading:!1}},computed:{iconClass(){return["ele-map-picker-main-icon",{"ele-map-picker-anim-bounce":this.showIconAnim}]},darkMode(){try{return this.$store.state.theme.darkMode}catch(e){return null}}},watch:{visible(){this.visible?this.onOpen():this.onClosed()},darkMode(){this.map&&!this.mapStyle&&(this.darkMode?this.map.setMapStyle("amap://styles/dark"):this.map.setMapStyle("amap://styles/normal"))}},mounted(){this.visible&&this.onOpen()},methods:{render(){S.a.load({key:this.mapKey,version:this.mapVersion,plugins:["AMap.PlaceSearch","AMap.AutoComplete"]}).then(e=>{this.loading=!1,this.poiLoading=!0;let t={resizeEnable:!0,zoom:this.zoom,center:this.center};this.mapStyle?t.mapStyle=this.mapStyle:this.darkMode&&(t.mapStyle="amap://styles/dark"),this.map=new e.Map(this.$refs.eleMapPickerMap,t),this.placeSearch=new e.PlaceSearch({type:this.poiType,pageSize:this.poiSize,pageIndex:1}),this.autoComplete=new e.AutoComplete({city:this.suggestionCity}),this.map.on("complete",()=>{this.chooseIndex=null;let e=this.map.getCenter();this.searchNearBy(e.lat,e.lng,!0)}),this.map.on("moveend",()=>{if(this.isSelMove)this.isSelMove=!1;else{this.showIconAnim=!1,this.$nextTick(()=>{setTimeout(()=>{this.showIconAnim=!0},0)});let e=this.map.getCenter();this.searchNearBy(e.lat,e.lng)}}),this.centerMarker=new e.Marker({icon:new e.Icon({image:this.markerSrc,size:new e.Size(26,36.5),imageSize:new e.Size(26,36.5)}),offset:new e.Pixel(-13,-36.5)})}).catch(e=>{this.loading=!1,console.error(e)})},searchNearBy(e,t,o){this.placeSearch&&(o||0===this.searchType?(this.poiLoading=!0,this.placeSearch.searchNearBy(this.poiKeywords,[t,e],this.poiRadius,(e,t)=>{if(this.poiLoading=!1,"complete"===e){let e=t.poiList.pois.filter(e=>void 0!==e.location);this.chooseSuggestion?(0!==e.length&&e[0].name===this.chooseSuggestion.name||e.unshift(Object.assign({},this.chooseSuggestion)),this.chooseSuggestion=null):this.chooseIndex=null,this.poiData=e}})):this.poiLoading=!1)},onChoose(e){this.isSelMove=!0,this.chooseIndex=e;const t=this.poiData[e].location;this.map.setZoomAndCenter(this.chooseZoom,[t.lng,t.lat]),0!==this.searchType?(this.centerMarker.setPosition([t.lng,t.lat]),this.map.add(this.centerMarker)):(this.showIconAnim=!1,this.$nextTick(()=>{setTimeout(()=>{this.showIconAnim=!0},0)}))},onSearch(e){this.autoComplete&&e&&this.lastSuggestion!==e&&(0!==this.searchType&&(this.poiLoading=!0),this.lastSuggestion=e,this.autoComplete.search(e,(e,t)=>{let o=[];t.tips&&(o=t.tips.map(e=>Object.assign({},e,{address:Array.isArray(e.address)?e.address[0]:e.address,text:e.name,value:e.name}))),0===this.searchType?this.suggestionData=o:(this.poiData=o,this.chooseIndex=null,this.poiLoading=!1,this.map.remove(this.centerMarker))}))},onSelect(e,t){this.chooseSuggestion=t,this.poiData.length&&this.poiData[0].name===this.chooseSuggestion.name||this.poiData.unshift(Object.assign({},this.chooseSuggestion)),this.chooseIndex=0;const o=this.chooseSuggestion.location;o&&this.map&&this.map.setZoomAndCenter(this.chooseZoom,[o.lng,o.lat])},onDone(e){if(!this.map)return;let t;if(null===this.chooseIndex){if(this.forceChoose)return this.$message.error(e);t=Object.assign({},this.map.getCenter())}else t=Object.assign({name:this.poiData[this.chooseIndex].name,address:this.poiData[this.chooseIndex].address||""},this.poiData[this.chooseIndex].location);this.needCity?(this.doneLoading=!0,this.map.setCenter([t.lng,t.lat]),this.map.getCity(e=>{this.doneLoading=!1,t.city=e,this.$emit("done",t)})):this.$emit("done",t)},onOpen(){this.show=!0,(this.destroyOnClose||null===this.map)&&this.render(),this.$emit("open")},onClosed(){this.destroyOnClose&&(this.show=!1,this.suggestionKeywords="",this.lastSuggestion="",this.poiData=[],this.chooseIndex=null,this.suggestionData=[],this.chooseSuggestion=null),this.$emit("closed")},updateVisible(e){this.$emit("update:visible",e)}}},U=(o("ddf5"),o("6b0d")),P=o.n(U);const T=P()(V,[["render",j]]);var B=T;B.install=function(e){e.component(B.name,B)};var D=B,_={name:"ExtensionMap",components:{EleMapPicker:D},data(){return{showPicker:!1,showPicker2:!1,form:{},carMarker:null,lineData:[[116.478935,39.997761],[116.478939,39.997825],[116.478912,39.998549],[116.478912,39.998549],[116.478998,39.998555],[116.478998,39.998555],[116.479282,39.99856],[116.479658,39.998528],[116.480151,39.998453],[116.480784,39.998302],[116.480784,39.998302],[116.481149,39.998184],[116.481573,39.997997],[116.481863,39.997846],[116.482072,39.997718],[116.482362,39.997718],[116.483633,39.998935],[116.48367,39.998968],[116.484648,39.999861]],mapInsLocation:null,mapInsTrack:null}},computed:{darkMode(){return this.$store.state.theme.darkMode}},mounted(){this.renderLocationMap(),this.renderTrackMap()},methods:{onChoose(e){console.log(e),this.form={location:e.city.province+"/"+e.city.city+"/"+e.city.district,address:e.name+" "+e.address,jinweidu:e.lng+","+e.lat},this.showPicker=!1,this.showPicker2=!1},renderLocationMap(){S.a.load({key:"006d995d433058322319fa797f2876f5",version:"2.0",plugins:["AMap.InfoWindow","AMap.Marker"]}).then(e=>{let t={zoom:13,center:[114.346084,30.516215]};this.darkMode&&(t.mapStyle="amap://styles/dark"),this.mapInsLocation=new e.Map(this.$refs.locationMap,t);let o=new e.InfoWindow({content:'\n
\n
武汉易云智科技有限公司
\n
地址:湖北省武汉市洪山区雄楚大道222号
\n
电话:020-123456789
\n
\n 到这里去→\n '});o.open(this.mapInsLocation,[114.346084,30.511215]);let a=new e.Icon({size:new e.Size(25,34),image:"//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-red.png",imageSize:new e.Size(25,34)}),i=new e.Marker({icon:a,position:[114.346084,30.511215],offset:new e.Pixel(-12,-28)});i.setMap(this.mapInsLocation),i.on("click",()=>{o.open(this.mapInsLocation)})}).catch(e=>{console.error(e)})},renderTrackMap(){S.a.load({key:"006d995d433058322319fa797f2876f5",version:"2.0",plugins:["AMap.MoveAnimation","AMap.Marker","AMap.Polyline"]}).then(e=>{let t={zoom:17,center:[116.478935,39.997761]};this.darkMode&&(t.mapStyle="amap://styles/dark"),this.mapInsTrack=new e.Map(this.$refs.trackMap,t),this.carMarker=new e.Marker({map:this.mapInsTrack,position:[116.478935,39.997761],icon:"https://a.amap.com/jsapi_demos/static/demo-center-v2/car.png",offset:new e.Pixel(-13,-26)}),new e.Polyline({map:this.mapInsTrack,path:this.lineData,showDir:!0,strokeColor:"#28F",strokeOpacity:1,strokeWeight:6});let o=new e.Polyline({map:this.mapInsTrack,showDir:!0,strokeColor:"#4B5",strokeOpacity:1,strokeWeight:6});this.carMarker.on("moving",(function(e){o.setPath(e.passedPath)})),this.mapInsTrack.setFitView()}).catch(e=>{console.error(e)})},startTrackAnim(){this.carMarker.stopMove(),this.carMarker.moveAlong(this.lineData,{duration:200,autoRotation:!0})},pauseTrackAnim(){this.carMarker.pauseMove()},resumeTrackAnim(){this.carMarker.resumeMove()}},watch:{darkMode(){this.mapInsLocation&&(this.darkMode?this.mapInsLocation.setMapStyle("amap://styles/dark"):this.mapInsLocation.setMapStyle("amap://styles/normal")),this.mapInsTrack&&(this.darkMode?this.mapInsTrack.setMapStyle("amap://styles/dark"):this.mapInsTrack.setMapStyle("amap://styles/normal"))}}};const z=P()(_,[["render",y],["__scopeId","data-v-8c013d80"]]);t["default"]=z},"862d":function(e,t,o){"use strict";(function(t,o){e.exports=o()})(0,(function(){function e(e){var a=[];return e.AMapUI&&a.push(t(e.AMapUI)),e.Loca&&a.push(o(e.Loca)),Promise.all(a)}function t(e){return new Promise((function(t,o){var c=[];if(e.plugins)for(var r=0;r