1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-56eefdce"],{2015:function(t,e,o){"use strict";o.r(e);var a=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",[o("el-dialog",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],attrs:{"show-close":!1,"close-on-click-modal":!1,visible:t.isShow,title:"polygonAdd"===t.mteStr||"polylineAdd"===t.mteStr?"多边形或折线操作":"文字或圆点操作",fullscreen:!1,width:"400px","custom-class":"xl-dialog",center:""},on:{"update:visible":function(e){t.isShow=e}}},[o("base-form",{ref:"ruleForm",attrs:{data:t.formData,"is-inline":!1,"label-width":"70px"}}),"polygonAdd"===t.mteStr||"polylineAdd"===t.mteStr?o("div",{staticClass:"scoped-color-quick"},[o("div",{staticClass:"t"},[t._v("快速选择颜色")]),t._l(t.colorArr,(function(e,a){return o("div",{key:a,class:t.fillColor===e.color?"op cur":"op",style:"background: "+e.color,on:{click:function(o){return t.colorHandle(e)}}},[t._v(t._s(e.t))])})),o("div",{staticStyle:{"padding-top":"10px"}},t._l(t.colorArr2,(function(e,a){return o("div",{key:a,class:t.fillColor===e.color?"op cur":"op",style:"background: "+e.color,on:{click:function(o){return t.colorHandle(e)}}},[t._v(t._s(e.t))])})),0)],2):t._e(),o("div",{staticClass:"xl-form"},[o("div",{staticClass:"xl-form-footer"},[o("el-button",{staticClass:"xl-form-btn t2",on:{click:t.close}},[t._v("关 闭")]),t.curObj.obj?o("el-button",{staticClass:"xl-form-btn t1",on:{click:function(e){return t.close("confirm")}}},[t._v("保存")]):o("el-button",{staticClass:"xl-form-btn t3",on:{click:function(e){return t.close("confirm")}}},[t._v("去画图")])],1)])],1)],1)},i=[],s=o("53ca"),n=o("5530"),l=(o("e9c4"),o("ed08"),{components:{},mixins:mixins,props:{isShow:Boolean,curObj:Object,mteStr:String},data:function(){return{loading:!1,formData:[],fillColor:"#ff003f",strokeColor:"#ff003f",colorArr:[{color:"#ff0",t:"新楼盘"},{color:"#bb9c2c",t:"二手房"},{color:"#e8d0e6",t:"还建房"},{color:"#ff9149",t:"幼儿园"},{color:"#ff7fbf",t:"小初中"},{color:"#e77ad4",t:"高中"},{color:"#fb6557",t:"专本科"}],colorArr2:[{color:"#ff003f",t:"纯商业"},{color:"#999",t:"商综合"},{color:"#007299",t:"公共"},{color:"#00ff3f",t:"公园"},{color:"#4da4ee",t:"医院"}],cObj:{},estateObj:{},schoolObj:{}}},watch:{isShow:function(t){t&&(this.estateObj={},this.schoolObj={},this.cObj=JSON.parse(JSON.stringify(this.curObj)),this.getDef())}},methods:{getDef:function(t){var e=Object(n["a"])({},this.curObj.obj),o=[];if(e.estateObj){var a={};a="object"===Object(s["a"])(e.estateObj)?e.estateObj:JSON.parse(e.estateObj),a.id&&(e.estate_id=a.id,o=[{keyRO:a.estate_name,valRO:a.id}])}var i=[];if(e.schoolObj){var l=JSON.parse(e.schoolObj);l.id&&(e.school_id=l.id,i=[{keyRO:l.school_name,valRO:l.id}])}if("color"===t){var r=this.$refs.ruleForm.baseForm;e=Object(n["a"])({},r),e.fillColor=this.fillColor,e.strokeColor=this.strokeColor}if("estate"===t){var c=this.$refs.ruleForm.baseForm;e=Object(n["a"])({},c),e.text=this.estateObj.estate_name,o=[{keyRO:this.estateObj.estate_name,valRO:this.estateObj.id}],e.school_id=""}if("school"===t){var d=this.$refs.ruleForm.baseForm;e=Object(n["a"])({},d),e.text=this.schoolObj.school_name,i=[{keyRO:this.schoolObj.school_name,valRO:this.schoolObj.id}],e.estate_id=""}e.text||(e.text="标题示例"),e.strokeStyle||(e.strokeStyle="solid"),"polygonAdd"===this.mteStr||"polylineAdd"===this.mteStr?(e.fillColor||(e.fillColor=this.fillColor,e.fillOpacity="0.4",e.strokeColor=this.strokeColor),this.formData=[{label:"关联楼盘",key:"estate_id",type:"selectRemote",changeHandle:this.estateChange,remoteParams:{skey:"estate_name",api:"house.admestatelist",opKey:"estate_name",opVal:"id"},remoteOptions:o},{label:"关联学校",key:"school_id",type:"selectRemote",changeHandle:this.schoolChange,remoteParams:{skey:"school_name",api:"school.admschoollist",opKey:"school_name",opVal:"id"},remoteOptions:i},{label:"标题",key:"text",rules:1},{label:"填充色",key:"fillColor",type:"colorPicker",rules:1},{label:"透明度",key:"fillOpacity",rules:1},{label:"轮廓色",key:"strokeColor",type:"colorPicker",rules:1},{label:"实虚线",key:"strokeStyle",type:"select",options:[{key:"实线",val:"solid"},{key:"虚线",val:"dashed"}]}]):(e.color||(e.color="#d71139"),this.formData=[{label:"内容",key:"text",rules:1},{label:"颜色",key:"color",type:"colorPicker",rules:1}]),this.setDefaultValue(e)},estateChange:function(t,e,o){this.estateObj={id:o.id,estate_name:o.estate_name,pri_image:o.pri_image,price_range:o.price_range,product_type:o.product_type},this.getDef("estate")},schoolChange:function(t,e,o){this.schoolObj={id:o.id,school_name:o.school_name,pri_image:o.pri_image,school_attrib:o.school_attrib,school_type:o.school_type,remarked:o.remarked},this.getDef("school")},colorHandle:function(t){this.fillColor=t.color,this.strokeColor=t.color,this.getDef("color")},close:function(t){var e=this;"confirm"===t?this.$refs["ruleForm"].$refs["baseForm"].validate((function(t){if(t){var o=e.$refs.ruleForm.baseForm,a=Object(n["a"])({},o);e.estateObj&&e.estateObj.id&&(a.estateObj=JSON.stringify(e.estateObj)),e.schoolObj&&e.schoolObj.id&&(a.schoolObj=JSON.stringify(e.schoolObj)),e.curObj.obj?e.$emit("close",a,"edit"):e.$emit("close",a),e.setDefaultValue()}})):(this.$emit("close"),this.setDefaultValue())}}}),r=l,c=(o("a51a"),o("2877")),d=Object(c["a"])(r,a,i,!1,null,"430ca24b",null);e["default"]=d.exports},"2efb":function(t,e,o){"use strict";o.r(e);var a=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",[o("el-dialog",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],attrs:{"show-close":!1,"close-on-click-modal":!1,visible:t.isShow,title:"添加图案操作",fullscreen:!1,width:"400px","custom-class":"xl-dialog",center:""},on:{"update:visible":function(e){t.isShow=e}}},[o("base-form",{ref:"ruleForm",attrs:{data:t.formData,"is-inline":!1,"label-width":"70px"}}),o("div",{staticClass:"scoped-img-quick"},[o("div",{staticClass:"t"},[t._v("快速选择图标")]),t._l(t.imgArr,(function(e,a){return o("div",{key:a,class:t.curImgUrl===e.url?"op cur":"op",on:{click:function(o){return t.imgHandle(e)}}},[o("img",{staticClass:"img",attrs:{src:e.url,alt:"img"}})])}))],2),o("div",{staticClass:"xl-form"},[o("div",{staticClass:"xl-form-footer"},[o("el-button",{staticClass:"xl-form-btn t2",on:{click:t.close}},[t._v("关 闭")]),t.curObj.obj?o("el-button",{staticClass:"xl-form-btn t1",on:{click:function(e){return t.close("confirm")}}},[t._v("保存")]):o("el-button",{staticClass:"xl-form-btn t3",on:{click:function(e){return t.close("confirm")}}},[t._v("去画图")])],1)])],1)],1)},i=[],s=o("5530"),n=(o("e9c4"),o("ed08"),{components:{},mixins:mixins,props:{isShow:Boolean,curObj:Object},data:function(){return{loading:!1,formData:[],curImgUrl:"",imgArr:[{url:"https://img2.honglounews.com/20221216021336-9631.png"},{url:"https://img2.honglounews.com/20221216021406-2208.png"},{url:"https://img2.honglounews.com/20221213101325-1438.png"},{url:"https://img2.honglounews.com/20221213101403-5390.png"}],cObj:{}}},watch:{isShow:function(t){t&&(this.cObj=JSON.parse(JSON.stringify(this.curObj)),this.getDef())}},methods:{getDef:function(t){var e=Object(s["a"])({},this.curObj.obj);if("color"===t){var o=this.$refs.ruleForm.baseForm;e=Object(s["a"])({},o),e.icon=this.curImgUrl}e.text||(e.text="标题示例"),e.icon||(e.icon="https://img2.honglounews.com/20221205054341-4368.png"),this.formData=[{label:"站点",key:"text",rules:1},{label:"图标",key:"icon",type:"uploads",rules:1}],this.setDefaultValue(e)},imgHandle:function(t){this.curImgUrl=t.url,this.getDef("color")},close:function(t){var e=this;"confirm"===t?this.$refs["ruleForm"].$refs["baseForm"].validate((function(t){if(t){var o=e.$refs.ruleForm.baseForm,a=Object(s["a"])({},o);e.curObj.obj?e.$emit("close",a,"edit"):e.$emit("close",a),e.setDefaultValue()}})):(this.$emit("close"),this.setDefaultValue())}}}),l=n,r=(o("edd0"),o("2877")),c=Object(r["a"])(l,a,i,!1,null,"3c864b2f",null);e["default"]=c.exports},"6e90":function(t,e,o){"use strict";o.r(e);var a=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("base-form",{ref:"ruleForm",attrs:{slot:"content",data:t.searchData},slot:"content"},[o("div",{attrs:{slot:"footer"},slot:"footer"},[o("el-button",{staticClass:"xl-form-btn bgc2",attrs:{icon:"el-icon-plus"},on:{click:t.addHandle}},[t._v("添加")])],1)])},i=[],s=o("5530"),n=(o("b0c0"),{mixins:mixins,data:function(){return{searchData:[],isHidePut:!1}},computed:{name:function(){return this.parentData.$route.query.name||""}},mounted:function(){this.getDef()},methods:{getDef:function(t){var e=Object(s["a"])({},this.$refs.ruleForm.baseForm);this.searchData=[],this.setDefaultValue(e,"searchData")},addHandle:function(){this.$emit("add")},searchHandle:function(){var t=this.$refs.ruleForm.baseForm,e=Object(s["a"])({},t);this.$emit("change",e)}}}),l=n,r=o("2877"),c=Object(r["a"])(l,a,i,!1,null,null,null);e["default"]=c.exports},8696:function(t,e,o){"use strict";o("c52d")},9552:function(t,e,o){},a51a:function(t,e,o){"use strict";o("bfb8")},bfb8:function(t,e,o){},c52d:function(t,e,o){},cda1:function(t,e,o){"use strict";o.r(e);var a=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"app-container"},[o("div",{directives:[{name:"show",rawName:"v-show",value:!t.isDeal,expression:"!isDeal"}],staticClass:"scoped-top-tips"},[t._v("洪楼plus小程序提示:点击图中区域、楼盘、学校可查看更多")]),o("div",{staticClass:"scoped-bg"}),"95542fdc-b542-4582-9be2-9ab8005728d3"===t.$route.query.id||"95542ff1-8176-4267-8344-2aa7f1034ac5"===t.$route.query.id?o("div",{staticClass:"scoped-tab"},[o("div",{class:"95542fdc-b542-4582-9be2-9ab8005728d3"===t.$route.query.id?"op cur":"op",on:{click:function(e){return t.linkChange("95542fdc-b542-4582-9be2-9ab8005728d3")}}},[t._v("小学")]),o("div",{class:"95542ff1-8176-4267-8344-2aa7f1034ac5"===t.$route.query.id?"op cur":"op",on:{click:function(e){return t.linkChange("95542ff1-8176-4267-8344-2aa7f1034ac5")}}},[t._v("初中")])]):t._e(),o("div",{directives:[{name:"show",rawName:"v-show",value:t.isDeal,expression:"isDeal"}],class:t.isDbShow?"scoped-deal-box":"scoped-deal-box t2"},[o("div",{staticClass:"sdb-list"},[o("div",{staticClass:"label t2"},[t._v("多边形列表(选中:"+t._s(t.polygonIndex+1)+") "),o("div",{staticClass:"xl-form",staticStyle:{position:"absolute",right:"20px",top:"0"}},[o("el-button",{staticClass:"xl-form-btn bgc2",attrs:{icon:"el-icon-plus"},on:{click:function(e){return t.openMte("polygonAdd")}}},[t._v("添加")])],1)]),o("div",{staticClass:"ul"},t._l(t.polygons,(function(e,a){return o("div",{key:a,staticClass:"op"},[o("p",{staticClass:"p1",on:{click:function(o){return t.openMte("polygonAdd",{obj:e,index:a})}}},[t._v("("+t._s(a+1)+")"+t._s(e.text))]),o("p",{staticClass:"more"},[e.editable?o("span",{staticClass:"d d1",on:{click:function(e){return t.mapIsEdit(a,"polygons")}}},[t._v("保存当前")]):o("span",{staticClass:"d d3",on:{click:function(e){return t.mapIsEdit(a,"polygons")}}},[t._v("去编辑")]),o("span",{staticClass:"d d4",on:{click:function(e){return t.mapDel(a,"polygons")}}},[t._v("删除")])])])})),0)]),o("div",{staticClass:"sdb-info"},[o("div",{staticClass:"p1"},[t._v("当前缩放级别:"+t._s(t.mapDiyObj.zoom)),o("span",{staticClass:"more",on:{click:t.setShowChange}},[t._v(t._s(t.isMapSetShow?"收起设置":"展开设置")+">")])]),o("div",{directives:[{name:"show",rawName:"v-show",value:t.isMapSetShow,expression:"isMapSetShow"}],staticClass:"p2"},[o("base-form",{ref:"ruleForm",attrs:{data:t.formData,"is-inline":!1,"label-width":"80px"}},[o("div",{attrs:{slot:"footer"},slot:"footer"},[o("el-button",{staticClass:"xl-form-btn bgc2",on:{click:t.setHandle}},[t._v("设置")]),o("div",{staticClass:"scoped-select-center",on:{click:t.setCenterHandle}},[t._v("中心坐标"),o("div",{staticClass:"s"},[t._v(t._s(t.centerStr))])])],1)])],1)]),t.circles.length>0?o("div",{staticClass:"sdb-list"},[o("div",{staticClass:"label t2"},[t._v("圆点列表(选中:"+t._s(t.circleIndex+1)+")")]),o("div",{staticClass:"ul"},t._l(t.circles,(function(e,a){return o("div",{key:a,staticClass:"op"},[o("p",{staticClass:"p1",on:{click:function(o){return t.openMte("circleAdd",{obj:e,index:a})}}},[t._v("("+t._s(a+1)+")"+t._s(e.text))]),o("p",{staticClass:"more"},[e.editable?o("span",{staticClass:"d d1",on:{click:function(e){return t.mapIsEdit(a,"circles")}}},[t._v("编辑")]):o("span",{staticClass:"d d3",on:{click:function(e){return t.mapIsEdit(a,"circles")}}},[t._v("只读")]),o("span",{staticClass:"d d4",on:{click:function(e){return t.mapDel(a,"circles")}}},[t._v("删除")])])])})),0)]):t._e(),t.polylines.length>0?o("div",{staticClass:"sdb-list"},[o("div",{staticClass:"label t2"},[t._v("折线列表(选中:"+t._s(t.polylineIndex+1)+")")]),o("div",{staticClass:"ul"},t._l(t.polylines,(function(e,a){return o("div",{key:a,staticClass:"op"},[o("p",{staticClass:"p1",on:{click:function(o){return t.openMte("polylineAdd",{obj:e,index:a})}}},[t._v("("+t._s(a+1)+")"+t._s(e.text))]),o("p",{staticClass:"more"},[e.editable?o("span",{staticClass:"d d1",on:{click:function(e){return t.mapIsEdit(a,"polylines")}}},[t._v("编辑")]):o("span",{staticClass:"d d3",on:{click:function(e){return t.mapIsEdit(a,"polylines")}}},[t._v("只读")]),o("span",{staticClass:"d d4",on:{click:function(e){return t.mapDel(a,"polylines")}}},[t._v("删除")])])])})),0)]):t._e(),t.markerData.length>0?o("div",{staticClass:"sdb-list"},[t.markerData[0].icon?o("div",{staticClass:"label t2"},[t._v("图标列表(选中:"+t._s(t.curMarkersIndex+1)+")")]):o("div",{staticClass:"label t2"},[t._v("文字列表(选中:"+t._s(t.curMarkersIndex+1)+")")]),o("div",{staticClass:"ul"},t._l(t.markerData,(function(e,a){return o("div",{key:a,staticClass:"op"},[e.icon?o("p",{staticClass:"p1",on:{click:function(o){return t.openImg({obj:e,index:a})}}},[t._v("("+t._s(a+1)+")"+t._s(e.text))]):o("p",{staticClass:"p1",on:{click:function(o){return t.openMte("textAdd",{obj:e,index:a})}}},[t._v("("+t._s(a+1)+")"+t._s(e.content||e.text))]),o("p",{staticClass:"more"},[e.draggable?o("span",{staticClass:"d d1",on:{click:function(e){return t.mapIsEdit(a,"markerData")}}},[t._v("编辑")]):o("span",{staticClass:"d d3",on:{click:function(e){return t.mapIsEdit(a,"markerData")}}},[t._v("只读")]),o("span",{staticClass:"d d4",on:{click:function(e){return t.mapDel(a,"markerData")}}},[t._v("删除")])])])})),0)]):t._e()]),o("el-amap",{staticClass:"amap-box",attrs:{vid:"amap-vue","amap-manager":t.amapManager,zoom:t.mapDiyObj.zoom,zooms:t.mapDiyObj.zooms,mapStyle:t.mapDiyObj.mapStyle,center:t.mapDiyObj.center,events:t.mapEvents,plugin:t.plugin}},[t.mapDiyObj.zoom>12?["1"===t.mapDiyObj.isSchoolShow?t._l(t.schoolList,(function(e,a){return o("el-amap-marker",{key:3e3+a,staticClass:"scoped-m-box",attrs:{icon:"https://img2.honglounews.com/20220110041435-6276.png",width:"20",height:"20",position:e.position,events:t.schoolEvents,title:e.school_name,label:{content:e.school_name,offset:[-10*e.school_name.length/2,-20]},extData:{id:e.id}}})})):t._e(),"1"===t.mapDiyObj.isEstateShow?t._l(t.estateList,(function(e,a){return o("el-amap-marker",{key:2e3+a,staticClass:"scoped-m-box",attrs:{icon:"https://img2.honglounews.com/20220110041411-6675.png",position:e.position,events:t.estateEvents,title:e.estate_name,label:{content:e.estate_name,offset:[-10*e.estate_name.length/2,-20]},extData:{id:e.id}}})})):t._e(),t._l(t.markerData,(function(e,a){return o("el-amap-marker",{key:9e3+a,attrs:{position:e.position,draggable:e.draggable,animation:e.animation,offset:e.offset,extData:{index:a},icon:e.icon,events:t.markersEvents}},[e.icon?t._e():o("div",{staticClass:"scoped-marker-text",style:"color: "+e.color},[t._v(t._s(e.content))])])}))]:["1"===t.mapDiyObj.isAreaShow?t._l(t.areaList,(function(e,a){return o("el-amap-marker",{key:4e3+a,staticClass:"scoped-m-box",attrs:{icon:"https://img2.honglounews.com/20220110041435-6276.png",position:e.position,events:t.areaEvents,offset:[-40,-40],extData:{areaName:e.areaName,areaType:e.area_type}}},[o("div",{staticClass:"scoped-marker-area"},[o("div",{staticClass:"p1"},[t._v(t._s(e.areaName))]),o("div",{staticClass:"p2"},[t._v("楼盘:"+t._s(e.estate_total))]),o("div",{staticClass:"p2"},[t._v("学校:"+t._s(e.school_total))])])])})):t._e()],t._l(t.polygons,(function(e,a){return o("el-amap-polygon",{key:a,attrs:{path:e.path,editable:e.editable,fillColor:e.fillColor,fillOpacity:e.fillOpacity,strokeColor:e.strokeColor,strokeWeight:e.strokeWeight,strokeOpacity:e.strokeOpacity,strokeStyle:e.strokeStyle,extData:{index:a},events:t.polygonEvents}})})),t._l(t.polylines,(function(e,a){return o("el-amap-polyline",{key:2e4+a,attrs:{editable:e.editable,fillColor:e.fillColor,fillOpacity:e.fillOpacity,strokeColor:e.strokeColor,strokeWeight:e.strokeWeight,strokeOpacity:e.strokeOpacity,strokeStyle:e.strokeStyle,extData:{index:a},events:t.polylineEvents,path:e.path}})})),o("el-amap-info-window",{attrs:{isCustom:!0,position:t.winObj.position,content:t.winObj.content}}),t._l(t.circles,(function(e,a){return o("el-amap-circle",{key:3e4+a,attrs:{center:e.center,radius:e.radius,editable:e.editable,fillColor:"#d71139",fillOpacity:.7,strokeColor:"#d71139",strokeOpacity:.8,extData:{index:a},events:t.circleEvents}})}))],2),o("MapTextEdit",{attrs:{isShow:t.isMteShow,mteStr:t.mteStr,curObj:t.mteObj},on:{close:t.closeMte}}),o("MapImgEdit",{attrs:{isShow:t.isImgShow,curObj:t.mteObj},on:{close:t.closeImg}})],1)},i=[],s=o("b85c"),n=o("5530"),l=o("2909"),r=(o("e9c4"),o("d3b7"),o("159b"),o("a15b"),o("99af"),o("d81d"),o("a9e3"),o("13d5"),o("a434"),o("8f9b")),c=o("2efb"),d=o("6e90"),p=o("2015"),u=o("ed08"),f=new r["AMapManager"],h={name:"map",components:{MapTextEdit:p["default"],MapImgEdit:c["default"],SearchForm:d["default"]},mixins:mixins,data:function(){var t=this;return{isImgShow:!1,polylines:[],circles:[],estateList:[],schoolList:[],medium_school_list:[],small_school_list:[],areaList:[],isDbShow:!0,isMapSetShow:!1,formData:[],isMteShow:!1,mapDiyObj:{center:[115.852386,28.684076],zoom:17,zooms:[15,19]},amapManager:f,winObj:{position:[115.852386,28.684076],content:""},polygons:[],markerData:[],mapEvents:{init:function(t){t.setFeatures(["road","bg","building"]),AMapUI.loadUI(["control/BasicControl"],(function(e){var o=new e.LayerSwitcher({baseLayers:[{id:"Satellite",enable:!0,name:"卫星图",layer:new AMap.TileLayer.Satellite},{id:"basic",enable:!1,name:"基础地图",layer:new AMap.TileLayer}],overlayLayers:[],position:{left:"230px",top:"2px"}});t.addControl(o)}))},zoomchange:function(e){var o=f.getMap();t.mapDiyObj.zoom=o.getZoom()||17},complete:function(){t.setCurFeatures(t.mapDiyObj.features)},moveend:function(){},click:function(e){if(t.isDbShow){var o=e.lnglat,a=o.lng,i=o.lat;t.mapDiyObj.center=[a,i],t.getList()}}},markersEvents:{dragend:function(e){var o=e.target.getExtData();t.curMarkersIndex=o.index;var a=e.lnglat,i=a.lng,s=a.lat,n=JSON.parse(JSON.stringify(t.markerData));n[t.curMarkersIndex].position=[i,s],t.markerData=Object(l["a"])(n)},click:function(e){var o=e.target.getExtData();t.curMarkersIndex=o.index}},circleEvents:{click:function(e){var o=e.target.getExtData();t.circleIndex=o.index;var a=e.lnglat;t.winObj.position=[a.lng,a.lat];var i=t.circles[t.circleIndex];t.winObj.content='\n <div style="border-radius: 6px;overflow:hidden;background:#fff;box-shadow: 0 0 3px #ccc;">\n <div style="font-weight: bold;color:#fff;padding: 6px;background:#d71139;user-select: none;margin-bottom: 6px;text-align: left;font-size: 12px;">南昌地铁</div>\n <div style="padding: 0 6px 6px;color: #999;font-size: 12px;">站点:'.concat(i.text,"</div>\n </div>\n ")}},polygonEvents:{click:function(e){var o=e.target.getExtData();t.polygonIndex=o.index;var a=e.lnglat,i=t.polygons[t.polygonIndex],s=i.estateObj?JSON.parse(i.estateObj):{},n=i.schoolObj?JSON.parse(i.schoolObj):{},l={"#ff0":"新楼盘","#bb9c2c":"二手房","#e8d0e6":"还建房","#ff9149":"幼儿园","#ff7fbf":"小学初中","#e77ad4":"高中","#fb6557":"中大专本科","#ff003f":"纯商业","#999":"商业综合体","#007299":"公用设施","#00ff3f":"公园用地","#4da4ee":"医院用地"};if(t.winObj.position=[a.lng,a.lat],s.id){var r=Object(u["a"])(t.$dictData.product_type),c=s.product_type.split(","),d=[];c.forEach((function(t){d.push(r[t])}));var p=d.join(",");t.winObj.content='\n <div style="border-radius: 6px;overflow:hidden;background:#fff;box-shadow: 0 0 3px #ccc;">\n <div style="font-weight: bold;color:#fff;padding: 6px;background:#409eff;user-select: none;margin-bottom: 6px;text-align: left;font-size: 12px;">'.concat(i.text,'</div>\n <div style="display: flex;padding-left: 6px;">\n <div style="width: 80px;">\n <img style="width: 80px;height: auto;" src="').concat(s.pri_image,'_xs" />\n </div>\n <div style="width: 140px;">\n <div style="padding: 0 6px 6px;color: #999;font-size: 12px;color: #f00;font-weight: bold;">价格:¥').concat(s.price_range,'</div>\n <div style="padding: 0 6px 6px;color: #999;font-size: 12px;">类型:').concat(l[i.fillColor]||"其它",'</div>\n <div style="padding: 0 6px 6px;color: #999;font-size: 12px;">产品:').concat(p,"</div>\n </div>\n </div>\n </div>\n ")}else if(n.id){var f=Object(u["a"])(t.$dictData.school_attrib),h=Object(u["a"])(t.$dictData.school_type);t.winObj.content='\n <div style="border-radius: 6px;overflow:hidden;background:#fff;box-shadow: 0 0 3px #ccc;">\n <div style="font-weight: bold;color:#fff;padding: 6px;background:#409eff;user-select: none;margin-bottom: 6px;text-align: left;font-size: 12px;">'.concat(i.text,'</div>\n <div style="display: flex;padding-left: 6px;">\n <div style="width: 80px;">\n <img style="width: 80px;height: auto;" src="').concat(n.pri_image,'_xs" />\n </div>\n <div style="width: 160px;">\n <div style="padding: 0 6px 6px;color: #999;font-size: 12px;color: #f00;font-weight: bold;">').concat(f[n.school_attrib],"、").concat(h[n.school_type],'</div>\n <div style="padding: 0 6px 6px;color: #999;font-size: 12px;">备注:').concat(n.remarked,"</div>\n </div>\n </div>\n </div>\n ")}else t.winObj.content='\n <div style="border-radius: 6px;overflow:hidden;background:#fff;box-shadow: 0 0 3px #ccc;">\n <div style="font-weight: bold;color:#fff;padding: 6px;background:#409eff;user-select: none;margin-bottom: 6px;text-align: left;font-size: 12px;">'.concat(i.text,'</div>\n <div style="padding: 0 6px 6px;color: #999;font-size: 12px;">类型:').concat(l[i.fillColor]||"其它",'</div>\n <div style="padding: 0 6px 6px;color: #999;font-size: 12px;">状态:').concat("dashed"===i.strokeStyle?"规划中":"已规划","</div>\n </div>\n ")}},polylineEvents:{click:function(e){var o=e.target.getExtData();t.polylineIndex=o.index}},estateEvents:{click:function(t){var e=t.target.getExtData();wx.miniProgram.navigateTo({url:"/pagesHouse/indexDtl?id=".concat(e.id)})}},schoolEvents:{click:function(t){var e=t.target.getExtData();wx.miniProgram.navigateTo({url:"/pagesSchool/indexDtl?id=".concat(e.id)})}},areaEvents:{click:function(t){var e=t.target.getExtData();wx.miniProgram.navigateTo({url:"/pagesSchool/index?areaName=".concat(e.areaName,"&areaType=").concat(e.areaType)})}},polygonIndex:0,polylineIndex:0,curMarkersIndex:0,circleIndex:0,plugin:[{pName:"MouseTool"}],mteStr:"polygonAdd",mteObj:{},dictData:{sys_yesno:[{key:"是",val:"1"},{key:"否",val:"2"}],area_type:[{key:"红谷滩中心区",val:"hgt"},{key:"红角洲",val:"hjz"},{key:"朝阳新城",val:"cyxc"},{key:"九龙湖",val:"jlh"},{key:"凤凰洲",val:"fhz"},{key:"西湖区",val:"xhq"},{key:"东湖区",val:"dhq"},{key:"象湖滨江",val:"xhbj"},{key:"青山湖区",val:"qshq"},{key:"新建区",val:"xjq"},{key:"湾里区",val:"wlq"},{key:"青云谱区",val:"qypq"},{key:"高新区",val:"gxq"},{key:"欣悦湖",val:"xyh"},{key:"经开区",val:"jkq"},{key:"象湖新城",val:"xhxc"},{key:"望城",val:"wcxq"},{key:"南昌县",val:"ncx"},{key:"赣江新区",val:"gjxq"}],map_area_lnglat:[{option1:"望城",key:"115.74219,28.622854",val:"wcxq"},{option1:"湾里区",key:"115.781385,28.709504",val:"wlq"},{option1:"欣悦湖",key:"115.787513,28.685376",val:"xyh"},{option1:"九龙湖",key:"115.792951,28.587435",val:"jlh"},{option1:"新建区",key:"115.818441,28.692623",val:"xjq"},{option1:"红角洲",key:"115.824219,28.63926",val:"hjz"},{option1:"经开区",key:"115.830506,28.747641",val:"jkq"},{option1:"象湖滨江",key:"115.847217,28.582374",val:"xhbj"},{option1:"红谷滩中心区",key:"115.852886,28.683902",val:"hgt"},{option1:"朝阳新城",key:"115.858884,28.633789",val:"cyxc"},{option1:"凤凰洲",key:"115.875846,28.709236",val:"fhz"},{option1:"西湖区",key:"115.889966,28.664366",val:"xhq"},{option1:"东湖区",key:"115.901112,28.680259",val:"dhq"},{option1:"青云谱区",key:"115.908247,28.623327",val:"qypq"},{option1:"南昌县",key:"115.932183,28.550813",val:"ncx"},{option1:"赣江新区",key:"115.93303,28.803368",val:"gjxq"},{option1:"青山湖区",key:"115.949679,28.701298",val:"qshq"},{option1:"高新区",key:"116.033624,28.697981",val:"gxq"}]}}},computed:{isDeal:function(){var t=this.$route.query;return!(!t.e||"1"!==t.e)},centerStr:function(){var t=this.mapDiyObj.center;return t&&t.length>0?"".concat(t[0],", ").concat(t[1]):"待选取"}},created:function(){this.getList(),this.getData()},mounted:function(){},methods:{linkChange:function(t){var e=this.$route.query;e.e?this.$router.push("/map/dtl?e=".concat(e.e,"&id=").concat(t)):this.$router.push("/map/dtl?id=".concat(t)),this.$router.go(0)},setShowChange:function(){this.isMapSetShow=!this.isMapSetShow},getDef:function(){var t={};t=Object(n["a"])({},this.mapDiyObj),t.zoom1=t.zooms[0],t.zoom2=t.zooms[1],this.formData=[{label:"地图标题",key:"title",rules:1},{label:"主题样式",key:"mapStyle",type:"select",rules:1,options:[{key:"默认样式",val:"normal"},{key:"深色样式",val:"dark"},{key:"浅色样式",val:"light"},{key:"清新风格osm",val:"fresh"}]},{label:"显示内容",key:"features",type:"select",multiple:!0,rules:1,options:[{key:"区域面",val:"bg"},{key:"兴趣点",val:"point"},{key:"道路和标注",val:"road"},{key:"建筑物",val:"building"}]},{label:"默认级别",key:"zoom",rules:1},{label:"最小3+",key:"zoom1",rules:1},{label:"最大19-",key:"zoom2",rules:1}],this.setDefaultValue(t)},setCurFeatures:function(t){var e=this.amapManager.getMap();e.setFeatures(t)},getList:function(){var t=this;if(this.isDbShow){var e=this.$route.query;this.$api.other.admmapcoordinaround({map_id:e.id,distance:3e3,longitude:this.mapDiyObj.center[0],latitude:this.mapDiyObj.center[1]}).then((function(e){var o=e.map((function(t){var e=JSON.parse(t.data);return Object(n["a"])(Object(n["a"])({},e),{},{longitude:t.longitude,latitude:t.latitude,id:t.id})}));t.polygons=Object(l["a"])(o)}))}},getData:function(){var t=this,e=this.$route.query;this.$api.other.admmapcoordindetail({uuid:e.id}).then((function(e){if(e.data){var o=JSON.parse(e.data);t.winObj={content:'\n <div style="font-weight: bold;color:#409eff;padding: 6px;background:#fff;border-radius: 6px;user-select: none;font-size: 12px;">'.concat(o.mapDiyObj.title,"</div>\n "),position:[o.mapDiyObj.center[0],o.mapDiyObj.center[1]]},t.polylines=o.polylines&&o.polylines.length>0?Object(l["a"])(o.polylines):[],t.circles=o.circles&&o.circles.length>0?Object(l["a"])(o.circles):[],t.markerData=Object(l["a"])(o.markerData),t.mapDiyObj=Object(n["a"])(Object(n["a"])({},o.mapDiyObj),{},{title:e.title})}else t.mapDiyObj={mapStyle:"normal",zoom:13,zooms:[11,19],center:[115.852386,28.684076],isEstateShow:"2",isSchoolShow:"2",isAreaShow:"2",title:e.title,features:["road","bg","building"]};document.title=e.title||"洪楼地图1",t.getDef()}))},setHandle:function(){var t=this;this.$refs["ruleForm"].$refs["baseForm"].validate((function(e){if(e){var o=t.$refs.ruleForm.baseForm,a=Object(n["a"])({},o),i=Object(n["a"])({},t.mapDiyObj);i.zoom=Number(a.zoom),i.zooms=[Number(a.zoom1),Number(a.zoom2)],i.title=a.title,i.mapStyle=a.mapStyle,i.features=a.features,i.isEstateShow=a.isEstateShow,i.isSchoolShow=a.isSchoolShow,i.isAreaShow=a.isAreaShow,t.mapDiyObj=Object(n["a"])({},i),t.setCurFeatures(a.features),t.isMapSetShow=!1,t.saveHandle()}}))},setCenterHandle:function(){var t=this,e=this.amapManager.getMap(),o=new AMap.MouseTool(e);o.marker({content:" "}),t.isDbShow=!1,t.$msgs("请在地图上选择中心点"),AMap.event.addListener(o,"draw",(function(e){var a=e.obj.getPosition(),i=Object(n["a"])({},t.mapDiyObj);i.center=[a.lng,a.lat],t.mapDiyObj=Object(n["a"])({},i),t.$msg("中心坐标选取成功~如需重新选中心点,请再次点击中心坐标位置"),t.isDbShow=!0,window.setTimeout((function(){o.close(!0)}),100)}))},saveHandle:function(){var t=this;this.$msg("您确定要保存该数据(覆盖原来数据)吗?","confirm",(function(){var e=JSON.parse(JSON.stringify(t.polylines));e.map((function(t){var e=[];t.editable=!1,t.path.forEach((function(t){e.push([t.lng,t.lat])})),t.path=e}));var o=JSON.parse(JSON.stringify(t.markerData));o.map((function(t){t.draggable=!1}));var a={polylines:e,markerData:o,mapDiyObj:t.mapDiyObj},i=t.$route.query;t.$api.other.admmapcoordinedit({uuid:i.id,title:t.mapDiyObj.title,data:JSON.stringify(a)}).then((function(e){t.getList()}))}))},circleAdd:function(t){var e=this,o=this.amapManager.getMap(),a=new AMap.MouseTool(o);a.marker({content:" "}),AMap.event.addListener(a,"draw",(function(o){var i=o.obj.getPosition(),s=Object(l["a"])(e.circles);s.push({center:[i.lng,i.lat],editable:!0,radius:50,fillColor:t.color||"#d71139",strokeColor:t.color||"#d71139",text:t.text}),e.circles=Object(l["a"])(s),window.setTimeout((function(){a.close(!0),e.isDbShow=!0}),100)}))},getCenterPoint:function(t){var e,o=t.reduce((function(t,e){return t.concat(e)}),[]),a=o.length,i=0,n=0,l=0,r=Object(s["a"])(o);try{for(r.s();!(e=r.n()).done;){var c=e.value,d=c.lat*Math.PI/180,p=c.lng*Math.PI/180,u=Math.cos(d)*Math.cos(p),f=Math.cos(d)*Math.sin(p),h=Math.sin(d);i+=u,n+=f,l+=h}}catch(g){r.e(g)}finally{r.f()}i/=a,n/=a,l/=a;var m=Math.atan2(n,i),b=Math.sqrt(i*i+n*n),v=Math.atan2(l,b);return{lng:180*m/Math.PI,lat:180*v/Math.PI}},polygonAdd:function(t){var e=this,o=this.amapManager.getMap(),a=new AMap.MouseTool(o);a.polygon({fillColor:"#00b0ff",strokeColor:"#80d8ff",editable:!0,strokeStyle:"dashed"}),AMap.event.addListener(a,"draw",(function(o){var i=Object(l["a"])(o.obj.getPath()),s=[];i.forEach((function(t){s.push([t.lng,t.lat])}));var n=e.getCenterPoint(i),r=e.$route.query,c={map_id:r.id,longitude:n.lng,latitude:n.lat,data:JSON.stringify({path:s,editable:!0,fillColor:t.fillColor||"#DC3021",fillOpacity:t.fillOpacity||.4,strokeColor:t.strokeColor||"#DC3021",strokeStyle:t.strokeStyle||"solid",strokeWeight:2,strokeOpacity:.8,text:t.text,estateObj:t.estateObj||"{}",schoolObj:t.schoolObj||"{}"})};e.$api.other.admmapcoordindataadd(c).then((function(t){e.getList()})),a.close(!0),e.isDbShow=!0}))},polylineAdd:function(t){var e=this,o=this.amapManager.getMap(),a=new AMap.MouseTool(o);a.polyline({fillColor:"#00b0ff",strokeColor:"#80d8ff",editable:!0,strokeStyle:"dashed"}),AMap.event.addListener(a,"draw",(function(o){var i=Object(l["a"])(o.obj.getPath()),s=[];i.forEach((function(t){s.push([t.lng,t.lat])}));var n=Object(l["a"])(e.polylines);n.push({path:s,editable:!0,fillColor:t.fillColor||"#DC3021",fillOpacity:t.fillOpacity||.4,strokeColor:t.strokeColor||"#DC3021",strokeStyle:t.strokeStyle||"solid",strokeWeight:5,strokeOpacity:.8,text:t.text}),e.polylines=Object(l["a"])(n),a.close(!0),e.isDbShow=!0}))},mapIsEdit:function(t,e){var o=this;if("polygons"===e){var a=this.polygons[t];if(a.editable){a.editable=!1;var i=a.path,s=this.getCenterPoint(i),n=[];i.forEach((function(t){n.push([t.lng,t.lat])})),a.path=n,this.$api.other.admmapcoordindataedit({id:a.id,latitude:s.lng,longitude:s.lat,data:JSON.stringify(a)}).then((function(t){o.getList()}))}else a.editable=!0}},mapDel:function(t,e){var o=this;this.$msg("您确定要删除该数据吗?","confirm",(function(){if("polygons"===e){var a=o.polygons[t];o.$api.other.admmapcoordindatadel({id:a.id}).then((function(t){o.getList()}))}}))},openImg:function(t){this.isImgShow=!0,t&&(this.mteObj=Object(n["a"])({},t))},closeImg:function(t,e){if(this.isImgShow=!1,t)if(e&&"edit"===e){var o=this.mteObj.index||0,a=Object(l["a"])(this.markerData);a[o].icon=t.icon,a[o].text=t.text,a[o].color=t.color,this.markerData=Object(l["a"])(a),this.$storage("map_markerData",JSON.stringify(a))}else this.imgAdd(t),this.isDbShow=!1,this.$msgs("请在地图上操作");this.mteObj={}},imgAdd:function(t){var e=this,o=this.amapManager.getMap(),a=new AMap.MouseTool(o);a.marker({content:" "}),AMap.event.addListener(a,"draw",(function(o){var i=o.obj.getPosition(),s=Object(l["a"])(e.markerData);s.push({position:[i.lng,i.lat],draggable:!0,animation:"AMAP_ANIMATION_DROP",content:"",offset:[0,0],text:t.text,icon:t.icon}),e.markerData=Object(l["a"])(s),window.setTimeout((function(){a.close(!0),e.isDbShow=!0}),100)}))},openMte:function(t,e){this.mteStr=t,this.isMteShow=!0,e&&(this.mteObj=Object(n["a"])({},e))},closeMte:function(t,e){var o=this;if(this.isMteShow=!1,t){if(e&&"edit"===e){var a=this.mteObj.index||0,i=Object(l["a"])(this.polygons),s=i[a];s.text=t.text,s.fillColor=t.fillColor,s.fillOpacity=t.fillOpacity,s.strokeColor=t.strokeColor,s.strokeStyle=t.strokeStyle,s.estateObj=t.estateObj||"{}",s.schoolObj=t.schoolObj||"{}";var n=s.path,r=[];return n.forEach((function(t){r.push([t.lng,t.lat])})),s.path=r,void this.$api.other.admmapcoordindataedit({id:s.id,latitude:s.latitude,longitude:s.longitude,data:JSON.stringify(s)}).then((function(t){o.getList()}))}this[this.mteStr](t),this.isDbShow=!1,this.$msgs("请在地图上操作")}this.mteObj={}},textAdd:function(t){var e=this,o=this.amapManager.getMap(),a=new AMap.MouseTool(o);a.marker({content:" "}),AMap.event.addListener(a,"draw",(function(o){var i=o.obj.getPosition(),s=Object(l["a"])(e.markerData);s.push({position:[i.lng,i.lat],draggable:!0,animation:"AMAP_ANIMATION_DROP",content:t.text,offset:[-10,-10],text:t.text,color:t.color}),e.markerData=Object(l["a"])(s),window.setTimeout((function(){a.close(!0),e.isDbShow=!0}),100)}))}}},m=h,b=(o("8696"),o("2877")),v=Object(b["a"])(m,a,i,!1,null,"5ea7363a",null);e["default"]=v.exports},edd0:function(t,e,o){"use strict";o("9552")}}]);
|