1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-79fee836"],{2015:function(t,e,a){"use strict";a.r(e);var o=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("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}}},[a("base-form",{ref:"ruleForm",attrs:{data:t.formData,"is-inline":!1,"label-width":"70px"}}),"polygonAdd"===t.mteStr||"polylineAdd"===t.mteStr?a("div",{staticClass:"scoped-color-quick"},[a("div",{staticClass:"t"},[t._v("快速选择颜色")]),t._l(t.colorArr,(function(e,o){return a("div",{key:o,class:t.fillColor===e.color?"op cur":"op",style:"background: "+e.color,on:{click:function(a){return t.colorHandle(e)}}},[t._v(t._s(e.t))])})),t._l(t.colorArr2,(function(e,o){return a("div",{key:o,class:t.fillColor===e.color?"op cur":"op",style:"background: "+e.color,on:{click:function(a){return t.colorHandle(e)}}},[t._v(t._s(e.t))])}))],2):t._e(),a("div",{staticClass:"xl-form"},[a("div",{staticClass:"xl-form-footer"},[a("el-button",{staticClass:"xl-form-btn t2",on:{click:t.close}},[t._v("关 闭")]),t.curObj.obj?a("el-button",{staticClass:"xl-form-btn t1",on:{click:function(e){return t.close("confirm")}}},[t._v("保存")]):a("el-button",{staticClass:"xl-form-btn t3",on:{click:function(e){return t.close("confirm")}}},[t._v("去画图")])],1)])],1)],1)},i=[],s=a("53ca"),l=a("5530"),n=(a("e9c4"),a("b0c0"),a("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:"医院"},{color:"#dc3021",t:"变电站污水处理厂等"},{color:"#f8a41c",t:"商业娱乐"},{color:"#795ab8",t:"other3"}],cObj:{},estateObj:{},schoolObj:{},facilityObj:{}}},watch:{isShow:function(t){t&&(this.estateObj={},this.schoolObj={},this.facilityObj={},this.cObj=JSON.parse(JSON.stringify(this.curObj)),this.getDef())}},methods:{getDef:function(t){var e=Object(l["a"])({},this.curObj.obj),a=[];if(e.estateObj){var o={};o="object"===Object(s["a"])(e.estateObj)?e.estateObj:JSON.parse(e.estateObj),o.id&&(e.estate_id=o.id,a=[{keyRO:o.estate_name,valRO:o.id}])}var i=[];if(e.schoolObj){var n={};n="object"===Object(s["a"])(e.schoolObj)?e.schoolObj:JSON.parse(e.schoolObj),n.id&&(e.school_id=n.id,i=[{keyRO:n.school_name,valRO:n.id}])}var r=[];if(e.facilityObj){var c=JSON.parse(e.facilityObj);c.id&&(e.facility_id=c.id,r=[{keyRO:c.facility_name,valRO:c.id}])}if("color"===t){var d=this.$refs.ruleForm.baseForm;e=Object(l["a"])({},d),e.fillColor=this.fillColor,e.strokeColor=this.strokeColor}if("facility"===t){var p=this.$refs.ruleForm.baseForm;e=Object(l["a"])({},p),e.text=this.facilityObj.facility_name,r=[{keyRO:this.facilityObj.facility_name,valRO:this.facilityObj.id}],e.school_id="",e.estate_id=""}if("estate"===t){var f=this.$refs.ruleForm.baseForm;e=Object(l["a"])({},f),e.text=this.estateObj.estate_name,a=[{keyRO:this.estateObj.estate_name,valRO:this.estateObj.id}],e.school_id="",e.facility_id=""}if("school"===t){var u=this.$refs.ruleForm.baseForm;e=Object(l["a"])({},u),e.text=this.schoolObj.school_name,i=[{keyRO:this.schoolObj.school_name,valRO:this.schoolObj.id}],e.estate_id="",e.facility_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:"facility_id",type:"selectRemote",changeHandle:this.facilityChange,remoteParams:{skey:"name",api:"facility.admfacilitylist",opKey:"name",opVal:"id"},remoteOptions:r},{label:"关联楼盘",key:"estate_id",type:"selectRemote",changeHandle:this.estateChange,remoteParams:{skey:"estate_name",api:"house.admestatelist",opKey:"estate_name",opVal:"id"},remoteOptions:a},{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)},facilityChange:function(t,e,a){this.facilityObj={id:a.id,facility_name:a.name,pri_image:a.pri_image,remarked:a.remarked},this.getDef("facility")},estateChange:function(t,e,a){this.estateObj={id:a.id,estate_name:a.estate_name,pri_image:a.pri_image,price_range:a.price_range,product_type:a.product_type},this.getDef("estate")},schoolChange:function(t,e,a){this.schoolObj={id:a.id,school_name:a.school_name,pri_image:a.pri_image,school_attrib:a.school_attrib,school_type:a.school_type,remarked:a.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 a=e.$refs.ruleForm.baseForm,o=Object(l["a"])({},a);e.estateObj&&e.estateObj.id&&(o.estateObj=JSON.stringify(e.estateObj)),e.schoolObj&&e.schoolObj.id&&(o.schoolObj=JSON.stringify(e.schoolObj)),e.facilityObj&&e.facilityObj.id&&(o.facilityObj=JSON.stringify(e.facilityObj)),e.curObj.obj?e.$emit("close",o,"edit"):e.$emit("close",o),e.setDefaultValue()}})):(this.$emit("close"),this.setDefaultValue())}}}),r=n,c=(a("a85d"),a("2877")),d=Object(c["a"])(r,o,i,!1,null,"318cba3f",null);e["default"]=d.exports},"2efb":function(t,e,a){"use strict";a.r(e);var o=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("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}}},[a("base-form",{ref:"ruleForm",attrs:{data:t.formData,"is-inline":!1,"label-width":"70px"}}),a("div",{staticClass:"scoped-img-quick"},[a("div",{staticClass:"t"},[t._v("快速选择图标")]),t._l(t.imgArr,(function(e,o){return a("div",{key:o,class:t.curImgUrl===e.url?"op cur":"op",on:{click:function(a){return t.imgHandle(e)}}},[a("img",{staticClass:"img",attrs:{src:e.url,alt:"img"}})])}))],2),a("div",{staticClass:"xl-form"},[a("div",{staticClass:"xl-form-footer"},[a("el-button",{staticClass:"xl-form-btn t2",on:{click:t.close}},[t._v("关 闭")]),t.curObj.obj?a("el-button",{staticClass:"xl-form-btn t1",on:{click:function(e){return t.close("confirm")}}},[t._v("保存")]):a("el-button",{staticClass:"xl-form-btn t3",on:{click:function(e){return t.close("confirm")}}},[t._v("去画图")])],1)])],1)],1)},i=[],s=a("5530"),l=(a("e9c4"),a("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 a=this.$refs.ruleForm.baseForm;e=Object(s["a"])({},a),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 a=e.$refs.ruleForm.baseForm,o=Object(s["a"])({},a);e.curObj.obj?e.$emit("close",o,"edit"):e.$emit("close",o),e.setDefaultValue()}})):(this.$emit("close"),this.setDefaultValue())}}}),n=l,r=(a("edd0"),a("2877")),c=Object(r["a"])(n,o,i,!1,null,"3c864b2f",null);e["default"]=c.exports},"6e90":function(t,e,a){"use strict";a.r(e);var o=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("base-form",{ref:"ruleForm",attrs:{slot:"content",data:t.searchData},slot:"content"},[a("div",{attrs:{slot:"footer"},slot:"footer"},[a("el-button",{staticClass:"xl-form-btn bgc2",attrs:{icon:"el-icon-plus"},on:{click:t.addHandle}},[t._v("添加")])],1)])},i=[],s=a("5530"),l=(a("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)}}}),n=l,r=a("2877"),c=Object(r["a"])(n,o,i,!1,null,null,null);e["default"]=c.exports},9552:function(t,e,a){},a85d:function(t,e,a){"use strict";a("fc04")},cda1:function(t,e,a){"use strict";a.r(e);var o=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"app-container"},[a("div",{directives:[{name:"show",rawName:"v-show",value:!t.isDeal,expression:"!isDeal"}],staticClass:"scoped-top-tips"},[t._v("洪楼plus小程序提示:点击图中区域、楼盘、学校可查看更多")]),a("div",{staticClass:"scoped-bg"}),"95542fdc-b542-4582-9be2-9ab8005728d3"===t.$route.query.id||"95542ff1-8176-4267-8344-2aa7f1034ac5"===t.$route.query.id?a("div",{staticClass:"scoped-tab"},[a("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("小学")]),a("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(),a("div",{directives:[{name:"show",rawName:"v-show",value:t.isDeal,expression:"isDeal"}],class:t.isDbShow?"scoped-deal-box":"scoped-deal-box t2"},[a("div",{staticClass:"sdb-list"},[a("div",{staticClass:"label t2"},[t._v("多边形列表(选中:"+t._s(t.polygonIndex+1)+") "),a("div",{staticClass:"xl-form",staticStyle:{position:"absolute",right:"20px",top:"0"}},[a("el-button",{staticClass:"xl-form-btn bgc2",attrs:{icon:"el-icon-plus"},on:{click:function(e){return t.openMte("polygonAdd")}}},[t._v("添加")])],1)]),a("div",{staticClass:"ul"},t._l(t.polygons,(function(e,o){return a("div",{key:o,staticClass:"op"},[a("p",{staticClass:"p1",on:{click:function(a){return t.openMte("polygonAdd",{obj:e,index:o})}}},[t._v("("+t._s(o+1)+")"+t._s(e.text))]),a("p",{staticClass:"more"},[e.editable?a("span",{staticClass:"d d1",on:{click:function(e){return t.mapIsEdit(o,"polygons")}}},[t._v("保存当前")]):a("span",{staticClass:"d d3",on:{click:function(e){return t.mapIsEdit(o,"polygons")}}},[t._v("去编辑")]),a("span",{staticClass:"d d4",on:{click:function(e){return t.mapDel(o,"polygons")}}},[t._v("删除")])])])})),0)]),a("div",{staticClass:"sdb-info"},[a("div",{staticClass:"p1"},[t._v("当前缩放级别:"+t._s(t.mapDiyObj.zoom)),a("span",{staticClass:"more",on:{click:t.setShowChange}},[t._v(t._s(t.isMapSetShow?"收起设置":"展开设置")+">")])]),a("div",{directives:[{name:"show",rawName:"v-show",value:t.isMapSetShow,expression:"isMapSetShow"}],staticClass:"p2"},[a("base-form",{ref:"ruleForm",attrs:{data:t.formData,"is-inline":!1,"label-width":"80px"}},[a("div",{attrs:{slot:"footer"},slot:"footer"},[a("el-button",{staticClass:"xl-form-btn bgc2",on:{click:t.setHandle}},[t._v("设置")]),a("div",{staticClass:"scoped-select-center",on:{click:t.setCenterHandle}},[t._v("中心坐标"),a("div",{staticClass:"s"},[t._v(t._s(t.centerStr))])])],1)])],1)]),t.circles.length>0?a("div",{staticClass:"sdb-list"},[a("div",{staticClass:"label t2"},[t._v("圆点列表(选中:"+t._s(t.circleIndex+1)+")")]),a("div",{staticClass:"ul"},t._l(t.circles,(function(e,o){return a("div",{key:o,staticClass:"op"},[a("p",{staticClass:"p1",on:{click:function(a){return t.openMte("circleAdd",{obj:e,index:o})}}},[t._v("("+t._s(o+1)+")"+t._s(e.text))]),a("p",{staticClass:"more"},[e.editable?a("span",{staticClass:"d d1",on:{click:function(e){return t.mapIsEdit(o,"circles")}}},[t._v("编辑")]):a("span",{staticClass:"d d3",on:{click:function(e){return t.mapIsEdit(o,"circles")}}},[t._v("只读")]),a("span",{staticClass:"d d4",on:{click:function(e){return t.mapDel(o,"circles")}}},[t._v("删除")])])])})),0)]):t._e(),t.polylines.length>0?a("div",{staticClass:"sdb-list"},[a("div",{staticClass:"label t2"},[t._v("折线列表(选中:"+t._s(t.polylineIndex+1)+")")]),a("div",{staticClass:"ul"},t._l(t.polylines,(function(e,o){return a("div",{key:o,staticClass:"op"},[a("p",{staticClass:"p1",on:{click:function(a){return t.openMte("polylineAdd",{obj:e,index:o})}}},[t._v("("+t._s(o+1)+")"+t._s(e.text))]),a("p",{staticClass:"more"},[e.editable?a("span",{staticClass:"d d1",on:{click:function(e){return t.mapIsEdit(o,"polylines")}}},[t._v("编辑")]):a("span",{staticClass:"d d3",on:{click:function(e){return t.mapIsEdit(o,"polylines")}}},[t._v("只读")]),a("span",{staticClass:"d d4",on:{click:function(e){return t.mapDel(o,"polylines")}}},[t._v("删除")])])])})),0)]):t._e(),t.markerData.length>0?a("div",{staticClass:"sdb-list"},[t.markerData[0].icon?a("div",{staticClass:"label t2"},[t._v("图标列表(选中:"+t._s(t.curMarkersIndex+1)+")")]):a("div",{staticClass:"label t2"},[t._v("文字列表(选中:"+t._s(t.curMarkersIndex+1)+")")]),a("div",{staticClass:"ul"},t._l(t.markerData,(function(e,o){return a("div",{key:o,staticClass:"op"},[e.icon?a("p",{staticClass:"p1",on:{click:function(a){return t.openImg({obj:e,index:o})}}},[t._v("("+t._s(o+1)+")"+t._s(e.text))]):a("p",{staticClass:"p1",on:{click:function(a){return t.openMte("textAdd",{obj:e,index:o})}}},[t._v("("+t._s(o+1)+")"+t._s(e.content||e.text))]),a("p",{staticClass:"more"},[e.draggable?a("span",{staticClass:"d d1",on:{click:function(e){return t.mapIsEdit(o,"markerData")}}},[t._v("编辑")]):a("span",{staticClass:"d d3",on:{click:function(e){return t.mapIsEdit(o,"markerData")}}},[t._v("只读")]),a("span",{staticClass:"d d4",on:{click:function(e){return t.mapDel(o,"markerData")}}},[t._v("删除")])])])})),0)]):t._e()]),a("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,o){return a("el-amap-marker",{key:3e3+o,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,o){return a("el-amap-marker",{key:2e3+o,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,o){return a("el-amap-marker",{key:9e3+o,attrs:{position:e.position,draggable:e.draggable,animation:e.animation,offset:e.offset,extData:{index:o},icon:e.icon,events:t.markersEvents}},[e.icon?t._e():a("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,o){return a("el-amap-marker",{key:4e3+o,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}}},[a("div",{staticClass:"scoped-marker-area"},[a("div",{staticClass:"p1"},[t._v(t._s(e.areaName))]),a("div",{staticClass:"p2"},[t._v("楼盘:"+t._s(e.estate_total))]),a("div",{staticClass:"p2"},[t._v("学校:"+t._s(e.school_total))])])])})):t._e()],t._l(t.polygons,(function(e,o){return a("el-amap-polygon",{key:o,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:o},events:t.polygonEvents}})})),t._l(t.polylines,(function(e,o){return a("el-amap-polyline",{key:2e4+o,attrs:{editable:e.editable,fillColor:e.fillColor,fillOpacity:e.fillOpacity,strokeColor:e.strokeColor,strokeWeight:e.strokeWeight,strokeOpacity:e.strokeOpacity,strokeStyle:e.strokeStyle,extData:{index:o},events:t.polylineEvents,path:e.path}})})),a("el-amap-info-window",{attrs:{isCustom:!0,position:t.winObj.position,content:t.winObj.content}}),t._l(t.circles,(function(e,o){return a("el-amap-circle",{key:3e4+o,attrs:{center:e.center,radius:e.radius,editable:e.editable,fillColor:"#d71139",fillOpacity:.7,strokeColor:"#d71139",strokeOpacity:.8,extData:{index:o},events:t.circleEvents}})}))],2),a("MapTextEdit",{attrs:{isShow:t.isMteShow,mteStr:t.mteStr,curObj:t.mteObj},on:{close:t.closeMte}}),a("MapImgEdit",{attrs:{isShow:t.isImgShow,curObj:t.mteObj},on:{close:t.closeImg}})],1)},i=[],s=a("b85c"),l=a("5530"),n=a("2909"),r=(a("e9c4"),a("d3b7"),a("159b"),a("a15b"),a("99af"),a("d81d"),a("a9e3"),a("13d5"),a("a434"),a("8f9b")),c=a("2efb"),d=a("6e90"),p=a("2015"),f=a("ed08"),u=new r["AMapManager"],m={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:u,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 a=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(a)}))},zoomchange:function(e){var a=u.getMap();t.mapDiyObj.zoom=a.getZoom()||17},complete:function(){t.setCurFeatures(t.mapDiyObj.features)},moveend:function(){},click:function(e){if(t.isDbShow){var a=e.lnglat,o=a.lng,i=a.lat;t.mapDiyObj.center=[o,i],t.getList()}}},markersEvents:{dragend:function(e){var a=e.target.getExtData();t.curMarkersIndex=a.index;var o=e.lnglat,i=o.lng,s=o.lat,l=JSON.parse(JSON.stringify(t.markerData));l[t.curMarkersIndex].position=[i,s],t.markerData=Object(n["a"])(l)},click:function(e){var a=e.target.getExtData();t.curMarkersIndex=a.index}},circleEvents:{click:function(e){var a=e.target.getExtData();t.circleIndex=a.index;var o=e.lnglat;t.winObj.position=[o.lng,o.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 a=e.target.getExtData();t.polygonIndex=a.index;var o=e.lnglat,i=t.polygons[t.polygonIndex],s=i.estateObj?JSON.parse(i.estateObj):{},l=i.schoolObj?JSON.parse(i.schoolObj):{},n={"#ff0":"新楼盘","#bb9c2c":"二手房","#e8d0e6":"还建房","#ff9149":"幼儿园","#ff7fbf":"小学初中","#e77ad4":"高中","#fb6557":"中大专本科","#ff003f":"纯商业","#999":"商业综合体","#007299":"公用设施","#00ff3f":"公园用地","#4da4ee":"医院用地"};if(t.winObj.position=[o.lng,o.lat],s.id){var r=Object(f["a"])(t.$dictData.product_type),c=s.product_type?s.product_type.split(","):[],d=[];c.forEach((function(t){d.push(r[t])}));var p=d.length>0?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(n[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(l.id){var u=Object(f["a"])(t.$dictData.school_attrib),m=Object(f["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(l.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(u[l.school_attrib],"、").concat(m[l.school_type],'</div>\n <div style="padding: 0 6px 6px;color: #999;font-size: 12px;">备注:').concat(l.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(n[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 a=e.target.getExtData();t.polylineIndex=a.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(l["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 a=e.map((function(t){var e=JSON.parse(t.data);return Object(l["a"])(Object(l["a"])({},e),{},{longitude:t.longitude,latitude:t.latitude,id:t.id})}));t.polygons=Object(n["a"])(a)}))}},getData:function(){var t=this,e=this.$route.query;this.$api.other.admmapcoordindetail({uuid:e.id}).then((function(e){if(e.data){var a=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(a.mapDiyObj.title,"</div>\n "),position:[a.mapDiyObj.center[0],a.mapDiyObj.center[1]]},t.polylines=a.polylines&&a.polylines.length>0?Object(n["a"])(a.polylines):[],t.circles=a.circles&&a.circles.length>0?Object(n["a"])(a.circles):[],t.markerData=Object(n["a"])(a.markerData),t.mapDiyObj=Object(l["a"])(Object(l["a"])({},a.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 a=t.$refs.ruleForm.baseForm,o=Object(l["a"])({},a),i=Object(l["a"])({},t.mapDiyObj);i.zoom=Number(o.zoom),i.zooms=[Number(o.zoom1),Number(o.zoom2)],i.title=o.title,i.mapStyle=o.mapStyle,i.features=o.features,i.isEstateShow=o.isEstateShow,i.isSchoolShow=o.isSchoolShow,i.isAreaShow=o.isAreaShow,t.mapDiyObj=Object(l["a"])({},i),t.setCurFeatures(o.features),t.isMapSetShow=!1,t.saveHandle()}}))},setCenterHandle:function(){var t=this,e=this.amapManager.getMap(),a=new AMap.MouseTool(e);a.marker({content:" "}),t.isDbShow=!1,t.$msgs("请在地图上选择中心点"),AMap.event.addListener(a,"draw",(function(e){var o=e.obj.getPosition(),i=Object(l["a"])({},t.mapDiyObj);i.center=[o.lng,o.lat],t.mapDiyObj=Object(l["a"])({},i),t.$msg("中心坐标选取成功~如需重新选中心点,请再次点击中心坐标位置"),t.isDbShow=!0,window.setTimeout((function(){a.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 a=JSON.parse(JSON.stringify(t.markerData));a.map((function(t){t.draggable=!1}));var o={polylines:e,markerData:a,mapDiyObj:t.mapDiyObj},i=t.$route.query;t.$api.other.admmapcoordinedit({uuid:i.id,title:t.mapDiyObj.title,data:JSON.stringify(o)}).then((function(e){t.getList()}))}))},circleAdd:function(t){var e=this,a=this.amapManager.getMap(),o=new AMap.MouseTool(a);o.marker({content:" "}),AMap.event.addListener(o,"draw",(function(a){var i=a.obj.getPosition(),s=Object(n["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(n["a"])(s),window.setTimeout((function(){o.close(!0),e.isDbShow=!0}),100)}))},getCenterPoint:function(t){var e,a=t.reduce((function(t,e){return t.concat(e)}),[]),o=a.length,i=0,l=0,n=0,r=Object(s["a"])(a);try{for(r.s();!(e=r.n()).done;){var c=e.value,d=c.lat*Math.PI/180,p=c.lng*Math.PI/180,f=Math.cos(d)*Math.cos(p),u=Math.cos(d)*Math.sin(p),m=Math.sin(d);i+=f,l+=u,n+=m}}catch(y){r.e(y)}finally{r.f()}i/=o,l/=o,n/=o;var h=Math.atan2(l,i),b=Math.sqrt(i*i+l*l),v=Math.atan2(n,b);return{lng:180*h/Math.PI,lat:180*v/Math.PI}},polygonAdd:function(t){var e=this,a=this.amapManager.getMap(),o=new AMap.MouseTool(a);o.polygon({fillColor:"#00b0ff",strokeColor:"#80d8ff",editable:!0,strokeStyle:"dashed"}),AMap.event.addListener(o,"draw",(function(a){var i=Object(n["a"])(a.obj.getPath()),s=[];i.forEach((function(t){s.push([t.lng,t.lat])}));var l=e.getCenterPoint(i),r=e.$route.query,c={map_id:r.id,longitude:l.lng,latitude:l.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()})),o.close(!0),e.isDbShow=!0}))},polylineAdd:function(t){var e=this,a=this.amapManager.getMap(),o=new AMap.MouseTool(a);o.polyline({fillColor:"#00b0ff",strokeColor:"#80d8ff",editable:!0,strokeStyle:"dashed"}),AMap.event.addListener(o,"draw",(function(a){var i=Object(n["a"])(a.obj.getPath()),s=[];i.forEach((function(t){s.push([t.lng,t.lat])}));var l=Object(n["a"])(e.polylines);l.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(n["a"])(l),o.close(!0),e.isDbShow=!0}))},mapIsEdit:function(t,e){var a=this;if("polygons"===e){var o=this.polygons[t];if(o.editable){o.editable=!1;var i=o.path,s=this.getCenterPoint(i),l=[];i.forEach((function(t){l.push([t.lng,t.lat])})),o.path=l,this.$api.other.admmapcoordindataedit({id:o.id,latitude:s.lng,longitude:s.lat,data:JSON.stringify(o)}).then((function(t){a.getList()}))}else o.editable=!0}},mapDel:function(t,e){var a=this;this.$msg("您确定要删除该数据吗?","confirm",(function(){if("polygons"===e){var o=a.polygons[t];a.$api.other.admmapcoordindatadel({id:o.id}).then((function(t){a.getList()}))}}))},openImg:function(t){this.isImgShow=!0,t&&(this.mteObj=Object(l["a"])({},t))},closeImg:function(t,e){if(this.isImgShow=!1,t)if(e&&"edit"===e){var a=this.mteObj.index||0,o=Object(n["a"])(this.markerData);o[a].icon=t.icon,o[a].text=t.text,o[a].color=t.color,this.markerData=Object(n["a"])(o),this.$storage("map_markerData",JSON.stringify(o))}else this.imgAdd(t),this.isDbShow=!1,this.$msgs("请在地图上操作");this.mteObj={}},imgAdd:function(t){var e=this,a=this.amapManager.getMap(),o=new AMap.MouseTool(a);o.marker({content:" "}),AMap.event.addListener(o,"draw",(function(a){var i=a.obj.getPosition(),s=Object(n["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(n["a"])(s),window.setTimeout((function(){o.close(!0),e.isDbShow=!0}),100)}))},openMte:function(t,e){this.mteStr=t,this.isMteShow=!0,e&&(this.mteObj=Object(l["a"])({},e))},closeMte:function(t,e){var a=this;if(this.isMteShow=!1,t){if(e&&"edit"===e){var o=this.mteObj.index||0,i=Object(n["a"])(this.polygons),s=i[o];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 l=s.path,r=[];return l.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){a.getList()}))}this[this.mteStr](t),this.isDbShow=!1,this.$msgs("请在地图上操作")}this.mteObj={}},textAdd:function(t){var e=this,a=this.amapManager.getMap(),o=new AMap.MouseTool(a);o.marker({content:" "}),AMap.event.addListener(o,"draw",(function(a){var i=a.obj.getPosition(),s=Object(n["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(n["a"])(s),window.setTimeout((function(){o.close(!0),e.isDbShow=!0}),100)}))}}},h=m,b=(a("f073"),a("2877")),v=Object(b["a"])(h,o,i,!1,null,"22432ad8",null);e["default"]=v.exports},e666:function(t,e,a){},edd0:function(t,e,a){"use strict";a("9552")},f073:function(t,e,a){"use strict";a("e666")},fc04:function(t,e,a){}}]);
|