12 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["TeachingSet"],{"0bc3":function(e,t,n){},"0bfb":function(e,t,n){"use strict";var a=n("cb7c");e.exports=function(){var e=a(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},"214f":function(e,t,n){"use strict";n("b0c5");var a=n("2aba"),r=n("32e9"),i=n("79e5"),o=n("be13"),c=n("2b4c"),s=n("520a"),l=c("species"),u=!i(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}),p=function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();e.exports=function(e,t,n){var f=c(e),v=!i(function(){var t={};return t[f]=function(){return 7},7!=""[e](t)}),d=v?!i(function(){var t=!1,n=/a/;return n.exec=function(){return t=!0,null},"split"===e&&(n.constructor={},n.constructor[l]=function(){return n}),n[f](""),!t}):void 0;if(!v||!d||"replace"===e&&!u||"split"===e&&!p){var h=/./[f],g=n(o,f,""[e],function(e,t,n,a,r){return t.exec===s?v&&!r?{done:!0,value:h.call(t,n,a)}:{done:!0,value:e.call(n,t,a)}:{done:!1}}),m=g[0],x=g[1];a(String.prototype,e,m),r(RegExp.prototype,f,2==t?function(e,t){return x.call(e,this,t)}:function(e){return x.call(e,this)})}}},3354:function(e,t,n){},"386d":function(e,t,n){"use strict";var a=n("cb7c"),r=n("83a1"),i=n("5f1b");n("214f")("search",1,function(e,t,n,o){return[function(n){var a=e(this),r=void 0==n?void 0:n[t];return void 0!==r?r.call(n,a):new RegExp(n)[t](String(a))},function(e){var t=o(n,e,this);if(t.done)return t.value;var c=a(e),s=String(this),l=c.lastIndex;r(l,0)||(c.lastIndex=0);var u=i(c,s);return r(c.lastIndex,l)||(c.lastIndex=l),null===u?-1:u.index}]})},"4ca3":function(e,t,n){"use strict";n.r(t);var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"teachingset"},[n("m-header"),n("van-search",{attrs:{shape:"round",placeholder:"搜小区、学校",background:"transparent"},on:{search:e.onSearch},model:{value:e.search_value,callback:function(t){e.search_value=t},expression:"search_value"}}),n("el-amap",{attrs:{zoom:e.zoom,events:e.amapEvents(),plugin:e.plugin,center:e.center}},e._l(e.markers,function(e,t){return n("el-amap-marker",{key:t,attrs:{clickable:!0,events:e.events,position:e.position}})}),1),n("van-cell-group",[n("van-field",{attrs:{type:"textarea",rows:"1",autosize:"",disabled:!0,label:"教学地址",placeholder:"详情地址"},model:{value:e.addressDetail,callback:function(t){e.addressDetail=t},expression:"addressDetail"}}),n("van-field",{attrs:{type:"text","input-align":"right",label:"教学点名称",placeholder:"请输入名称"},model:{value:e.teachingSchool,callback:function(t){e.teachingSchool=t},expression:"teachingSchool"}})],1),n("div",{staticClass:"button-group"},[n("van-button",{attrs:{type:"primary",round:"",size:"large"},on:{click:e.onSubmit}},[e._v("确认")])],1)],1)},r=[],i=(n("386d"),n("6e6e")),o={name:"teachingset",components:{MHeader:i["a"]},data:function(){var e=this;return{search_value:"",zoom:12,center:[114.34371,30.55939],markers:[],searchResult:[],plugin:[{pName:"Geolocation",events:{init:function(t){t.getCurrentPosition(function(t,n){n&&n.position&&(e.lng=n.position.lng,e.lat=n.position.lat,e.center=[e.lng,e.lat],e.loaded=!0,e.$nextTick())})}}},{pName:"ToolBar",events:{init:function(){}}}],searchOption:{pageSize:1,pageIndex:1,autoFitView:!0},addressDetail:null,teachingSchool:null}},methods:{amapEvents:function(){var e=this;return{complete:function(){e.$toast("加载完成")}}},onSubmit:function(){},onSearch:function(){var e=this;if(this.search_value){this.markers=[];var t=new AMap.PlaceSearch(this.searchOption);t.search(this.search_value,function(t,n){if(n&&n.poiList&&n.poiList.count){var a=n.poiList.pois[0];e.searchResult.push(a),e.markers.push({position:[a.location.lng,a.location.lat],events:e.markerEvents(a)}),e.center=[a.location.lng,a.location.lat]}else if(void 0===n.poiList)throw new Error(n)})}},markerEvents:function(){var e=this;return{click:function(t){var n=new AMap.Geocoder;n.getAddress(t.lnglat,function(t,n){"complete"===t&&n.regeocode?e.addressDetail=n.regeocode.formattedAddress:e.$toast("请重新选择地址")})}}}}},c=o,s=(n("e497"),n("2877")),l=Object(s["a"])(c,a,r,!1,null,"e288070e",null);t["default"]=l.exports},5115:function(e,t,n){"use strict";var a=n("3354"),r=n.n(a);r.a},"520a":function(e,t,n){"use strict";var a=n("0bfb"),r=RegExp.prototype.exec,i=String.prototype.replace,o=r,c="lastIndex",s=function(){var e=/a/,t=/b*/g;return r.call(e,"a"),r.call(t,"a"),0!==e[c]||0!==t[c]}(),l=void 0!==/()??/.exec("")[1],u=s||l;u&&(o=function(e){var t,n,o,u,p=this;return l&&(n=new RegExp("^"+p.source+"$(?!\\s)",a.call(p))),s&&(t=p[c]),o=r.call(p,e),s&&o&&(p[c]=p.global?o.index+o[0].length:t),l&&o&&o.length>1&&i.call(o[0],n,function(){for(u=1;u<arguments.length-2;u++)void 0===arguments[u]&&(o[u]=void 0)}),o}),e.exports=o},"5f1b":function(e,t,n){"use strict";var a=n("23c6"),r=RegExp.prototype.exec;e.exports=function(e,t){var n=e.exec;if("function"===typeof n){var i=n.call(e,t);if("object"!==typeof i)throw new TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==a(e))throw new TypeError("RegExp#exec called on incompatible receiver");return r.call(e,t)}},"6e6e":function(e,t,n){"use strict";var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"mheader"},[n("header",{staticClass:"m-nav-header",class:[e.isFixed?"fixed":""]},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.isBack,expression:"isBack"}],staticClass:"m-nav-bar__left",on:{click:e.goBack}},[n("van-icon",{staticClass:"arrow-left",attrs:{name:"arrow-left"}})],1),n("div",{staticClass:"m-nav-bar__title"},[e._t("default",[e._v(e._s(e.name?e.name:this.$route.meta.descrition))])],2),n("div",{staticClass:"m-nav-bar__right"},[e._t("right")],2)])])},r=[],i={name:"mheader",props:{name:String,isBack:{type:Boolean,default:!0},isFixed:{type:Boolean,default:!0},backUrl:{type:Object,default:function(){return{callBack:null,path:"",params:{}}}}},methods:{goBack:function(){var e=this.backUrl;"function"==typeof e.callBack?e.callBack():e.path?this.$router.push({path:e.path,query:e.params}):history.go(-1)}}},o=i,c=(n("5115"),n("2877")),s=Object(c["a"])(o,a,r,!1,null,"61d0e2e4",null);t["a"]=s.exports},"83a1":function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e===1/t:e!=e&&t!=t}},b0c5:function(e,t,n){"use strict";var a=n("520a");n("5ca1")({target:"RegExp",proto:!0,forced:a!==/./.exec},{exec:a})},e497:function(e,t,n){"use strict";var a=n("0bc3"),r=n.n(a);r.a}}]);
- //# sourceMappingURL=TeachingSet.b359e610.js.map
|