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/static/js/chunk-c77f.53afdb8a.js

1 line
2.7 KiB

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