You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
wkcrm_web/dist/static/js/chunk-6029.4189f562.js

1 line
2.7 KiB

(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-6029"],{"0EVH":function(e,t,s){"use strict";var a=s("Sy87");s.n(a).a},Sy87:function(e,t,s){},oVWf:function(e,t,s){"use strict";s.r(t);var a=s("Woz+"),n=s("7Qib"),i={name:"ChangeAddress",components:{VDistpicker:a.a},props:{show:{type:Boolean,default:!1},value:{type:Object,default:function(){return{}}}},data:function(){return{map:null,searchInput:"",dialogVisible:!1,searchCopyInput:"",pointAddress:null}},computed:{},watch:{show:function(e){var t=this;this.dialogVisible=e,e&&this.$nextTick(function(){Object(n.l)().then(function(){var e=new BMap.Map("chosemap",{enableMapClick:!0}),s=t.value;e.centerAndZoom(s,14),e.enableScrollWheelZoom(),t.map=e,t.addMarkerLabel(s)})})}},mounted:function(){},methods:{querySearchAsync:function(e,t){if(e){var s={onSearchComplete:function(e){if(a.getStatus()==BMAP_STATUS_SUCCESS){for(var s=[],n=0;n<e.getCurrentNumPois();n++)s.push(e.getPoi(n));t(s)}else t([])},pageCapacity:20},a=new BMap.LocalSearch(this.map,s);a.search(e)}else t([])},handleSelect:function(e){this.searchInput=e.address+e.title,this.searchCopyInput=this.searchInput,this.addMarkerLabel(e.point),this.pointAddress=e},inputBlur:function(){this.searchCopyInput!==this.searchInput&&(this.searchInput=this.searchCopyInput)},inputFocus:function(){this.searchCopyInput=this.searchInput},addMarkerLabel:function(e){this.map.clearOverlays(),this.map.centerAndZoom(e,14),this.map.addOverlay(new BMap.Marker(e))},close:function(){this.$emit("close")},selectSure:function(){this.$emit("select",this.pointAddress),this.close()}}},o=(s("0EVH"),s("KHd+")),c=Object(o.a)(i,function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("el-dialog",{attrs:{visible:e.dialogVisible,"close-on-click-modal":!1,title:"选择位置",width:"500px"},on:{"update:visible":function(t){e.dialogVisible=t},close:e.close}},[s("flexbox",{attrs:{align:"stretch"}},[s("flexbox-item",[s("div",{staticClass:"area-title"},[e._v("定位")]),e._v(" "),s("el-autocomplete",{staticStyle:{width:"100%"},attrs:{"fetch-suggestions":e.querySearchAsync,placeholder:"请输入详细位置名称"},on:{blur:e.inputBlur,focus:e.inputFocus,select:e.handleSelect},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.item;return[s("div",{staticClass:"name"},[e._v(e._s(a.address+a.title))])]}}]),model:{value:e.searchInput,callback:function(t){e.searchInput=t},expression:"searchInput"}}),e._v(" "),s("div",{staticClass:"map",attrs:{id:"chosemap"}})],1)],1),e._v(" "),s("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[s("el-button",{on:{click:e.close}},[e._v("取 消")]),e._v(" "),s("el-button",{attrs:{type:"primary"},on:{click:e.selectSure}},[e._v("确 定")])],1)],1)},[],!1,null,"58ea49fe",null);c.options.__file="ChangeAddress.vue";t.default=c.exports}}]);