chunk-41fc9b08.548cca7d.js 6.3 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-41fc9b08"],{3155:function(t,n,e){"use strict";e.r(n);var a=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",{staticClass:"app-container"},[e("tencent-map",{attrs:{id:"amapcontainer",height:900,"enable-click":!1,"enable-bounds-changed":!0},on:{boundsChanged:t.boundsChanged}}),e("div",{staticClass:"category"},[e("el-card",t._l(t.listData,(function(n){return e("a",{key:n.category.id,attrs:{href:"javascript:;"},on:{click:function(e){return t.changeDataType(n.category.id)}}},[e("el-row",[e("el-col",{attrs:{span:18}},[t._v(" "+t._s(n.category.name)+" ")]),e("el-col",{attrs:{span:6}},[t._v(" "+t._s(n.num)+" ")])],1)],1)})),0)],1)],1)},o=[],i=(e("d3b7"),e("159b"),e("b0c0"),e("791c")),r=e("4185"),s={components:{TencentMap:r["a"]},data:function(){return{listData:[],categoryId:null,northEast:null,southWest:null,markerLayer:null}},created:function(){},mounted:function(){var t=this;Object(i["c"])().then((function(n){console.log(n),t.listData=n}))},methods:{changeDataType:function(t){this.categoryId=t,this.findData()},boundsChanged:function(t,n,e){this.northEast=t,this.southWest=n,this.markerLayer=e,this.findData()},findData:function(){var t=this;Object(i["d"])(t.northEast.lng,t.northEast.lat,t.southWest.lng,t.southWest.lat,t.categoryId).then((function(n){return t.setMarker(n)})).finally((function(){return t.isloading=!1}))},setMarker:function(t){var n=[];t.forEach((function(t){var e,a,o,i='<div style="text-align: left">';i+="<p>名称:"+(null!==(e=t.name)&&void 0!==e?e:"-")+"</p>",i+="<p>联系人:"+(null!==(a=t.contacts)&&void 0!==a?a:"-")+"</p>",i+="<p>电话:"+(null!==(o=t.contactNumber)&&void 0!==o?o:"-")+"</p>",i+="</div>",n.push({position:new TMap.LatLng(t.lat,t.lng),properties:{infoContent:i}})})),this.markerLayer.setGeometries(n)}}},c=s,u=(e("5d4f"),e("2877")),d=Object(u["a"])(c,a,o,!1,null,null,null);n["default"]=d.exports},4185:function(t,n,e){"use strict";var a=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",{style:{height:t.height+"px",width:"100%"},attrs:{id:t.id}})},o=[],i=(e("a9e3"),e("d81d"),{props:{id:{type:String,default:"container"},height:{type:Number,default:500},enableClick:{type:Boolean,default:!0},enableBoundsChanged:{type:Boolean,default:!1},position:{type:Array,default:function(){return[]}}},data:function(){return{markerLayer:null,map:null,infowindow:null,isloading:!1}},created:function(){},mounted:function(){var t=this,n={zoom:14};t.position&&t.position.length>0&&t.position[0]?n.center=new TMap.LatLng(t.position[0],t.position[1]):n.center=new TMap.LatLng(24.655554,109.248488),t.map=new TMap.Map(t.id,n),t.markerLayer=new TMap.MultiMarker({id:"marker-layer",map:t.map}),t.markerLayer.on("click",t.markerClick),t.map.on("click",t.mapClick),t.map.on("moveend",t.mapBoundsChanged),t.map.on("zoomend",t.mapBoundsChanged),t.map.on("tilesloaded",t.mapBoundsChanged),t.position&&t.position.length>0&&t.position[0]&&this.markerLayer.setGeometries([{position:new TMap.LatLng(t.position[0],t.position[1])}])},methods:{markerClick:function(t){console.log(t);var n=this,e=t.geometry.properties;e.infoContent&&(this.infowindow&&this.infowindow.destroy(),n.infowindow=new TMap.InfoWindow({content:e.infoContent,position:t.latLng,map:n.map}))},mapBoundsChanged:function(t){if(this.enableBoundsChanged){console.log(t);var n=this.map.getBounds();console.log(n._ne),console.log(n._sw),this.$emit("boundsChanged",n._ne,n._sw,this.markerLayer)}},mapClick:function(t){this.enableClick&&(this.$emit("click",t),console.log(t),this.markerLayer.setGeometries([{position:t.latLng}]))}}}),r=i,s=e("2877"),c=Object(s["a"])(r,a,o,!1,null,null,null);n["a"]=c.exports},"4c88":function(t,n,e){},"5d4f":function(t,n,e){"use strict";e("4c88")},7156:function(t,n,e){var a=e("861d"),o=e("d2bb");t.exports=function(t,n,e){var i,r;return o&&"function"==typeof(i=n.constructor)&&i!==e&&a(r=i.prototype)&&r!==e.prototype&&o(t,r),t}},"791c":function(t,n,e){"use strict";e.d(n,"f",(function(){return o})),e.d(n,"h",(function(){return i})),e.d(n,"i",(function(){return r})),e.d(n,"a",(function(){return s})),e.d(n,"b",(function(){return c})),e.d(n,"e",(function(){return u})),e.d(n,"d",(function(){return d})),e.d(n,"c",(function(){return l})),e.d(n,"g",(function(){return f}));var a=e("b775");function o(t){return Object(a["a"])({url:"/bz/data/info/findPage",method:"post",data:t})}function i(t){return Object(a["a"])({url:"/bz/data/info/save",method:"post",data:t})}function r(t,n){return Object(a["a"])({url:"/bz/data/info/updateById",method:"post",params:{id:t},data:n})}function s(t){return Object(a["a"])({url:"/bz/data/info/deleteByIds",method:"post",data:t})}function c(){return Object(a["a"])({url:"/bz/data/info/findAllDataType",method:"post"})}function u(t,n){return Object(a["a"])({url:"/bz/data/info/findDataBaseInfoExtends",method:"post",params:{baseInfoId:t,categoryId:n}})}var d=function(t,n,e,o,i){return Object(a["a"])({url:"/bz/data/info/findByMapBounds",method:"POST",params:{maxlng:t,maxlat:n,minlng:e,minlat:o,dataType:i}})},l=function(){return Object(a["a"])({url:"/bz/data/info/findByGroupByDataType",method:"POST"})};function f(t){return Object(a["a"])({url:"/bz/data/info/findSelectByKeyword",method:"post",params:{keyword:t}})}},a9e3:function(t,n,e){"use strict";var a=e("83ab"),o=e("da84"),i=e("94ca"),r=e("6eeb"),s=e("5135"),c=e("c6b6"),u=e("7156"),d=e("c04e"),l=e("d039"),f=e("7c73"),p=e("241c").f,h=e("06cf").f,m=e("9bf2").f,g=e("58a8").trim,b="Number",y=o[b],k=y.prototype,v=c(f(k))==b,w=function(t){var n,e,a,o,i,r,s,c,u=d(t,!1);if("string"==typeof u&&u.length>2)if(u=g(u),n=u.charCodeAt(0),43===n||45===n){if(e=u.charCodeAt(2),88===e||120===e)return NaN}else if(48===n){switch(u.charCodeAt(1)){case 66:case 98:a=2,o=49;break;case 79:case 111:a=8,o=55;break;default:return+u}for(i=u.slice(2),r=i.length,s=0;s<r;s++)if(c=i.charCodeAt(s),c<48||c>o)return NaN;return parseInt(i,a)}return+u};if(i(b,!y(" 0o1")||!y("0b1")||y("+0x1"))){for(var I,C=function(t){var n=arguments.length<1?0:t,e=this;return e instanceof C&&(v?l((function(){k.valueOf.call(e)})):c(e)!=b)?u(new y(w(n)),e,C):w(n)},L=a?p(y):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),N=0;L.length>N;N++)s(y,I=L[N])&&!s(C,I)&&m(C,I,h(y,I));C.prototype=k,k.constructor=C,r(o,b,C)}}}]);