/*! * build: Hopaheal * copyright: Mead * time: 2022-7-23 18:51:45 */ (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-281c4dee","chunk-5ff8275a"],{"18d3":function(t,e,i){"use strict";i.r(e),i.d(e,"getList",(function(){return o})),i.d(e,"doAdd",(function(){return a})),i.d(e,"doEdit",(function(){return r})),i.d(e,"doDelete",(function(){return n})),i.d(e,"doDetail",(function(){return l})),i.d(e,"areaOptions",(function(){return c})),i.d(e,"projectOptions",(function(){return p})),i.d(e,"pointOptions",(function(){return h}));var s=i("b775");function o(t){return Object(s["default"])({url:"/admin/area/point",method:"get",params:t})}function a(t){return Object(s["default"])({url:"/admin/area/point",method:"post",data:t})}function r(t){return Object(s["default"])({url:"/admin/area/point/"+t.id,method:"put",data:t})}function n(t){return Object(s["default"])({url:"/admin/area/point/"+t,method:"delete"})}function l(t){return Object(s["default"])({url:"/admin/area/point/info/"+t,method:"get"})}function c(t){return Object(s["default"])({url:"/admin/area/select-options-trees",method:"get",params:t})}function p(t){return Object(s["default"])({url:"/admin/area/project/select-options",method:"get",params:t})}function h(t){return Object(s["default"])({url:"/admin/area/point/select-options",method:"get",params:t})}},"260f":function(t,e,i){"use strict";i("c6cdc")},"27a1":function(t,e,i){"use strict";i("7f40")},3261:function(t,e,i){"use strict";i.r(e),i.d(e,"getList",(function(){return o})),i.d(e,"doAdd",(function(){return a})),i.d(e,"doEdit",(function(){return r})),i.d(e,"deleteList",(function(){return n})),i.d(e,"bzDetail",(function(){return l}));var s=i("b775");function o(t){return Object(s["default"])({url:"/admin/area/project",method:"get",params:t})}function a(t){return Object(s["default"])({url:"/admin/area/project",method:"post",data:t})}function r(t){return Object(s["default"])({url:"/admin/area/project/"+t.id,method:"put",data:t})}function n(t){return Object(s["default"])({url:"/admin/area/project/"+t,method:"delete",data:t})}function l(t){return Object(s["default"])({url:"/admin/area/project/info/"+t,method:"get"})}},4160:function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAA4CAMAAACMj4vYAAABj1BMVEVHcEz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/HBz/T0//////6ur/k5P/oaH/OTn/9fX/Y2P/dHT/09P/hIT/u7v/x8f/rq7/398GwSBwAAAAdXRSTlMA7e/j8CoG9ewBOPHI6jYvKzriMjfn5igi+enBJkIkMTTkJeukw2WVA3KhM/MQawe74G0uDfQt6G8jMAy2YuWiKT1mur238qy1E8dWSRXVQKAS7jwKQUrSRoZXuALEQ4IUo6uHyX9fkz4e0xqx1LzdlN/9W/5PRKYzAAACeUlEQVRIx5WWZXvbMBSFbwON06bMsHJXhjGv29oxMzMzXsXsQH/4BE7iOAblfNAjS+/xlXVlSQA+La4sLeeSCUwkc8tLK4sQo7YFBb1SFtqi8AfPsVHz18LwifMYrJMTgfy5DIYps7cRb93CKN1q9fEHNzFa2yfq+HtjGKcdb4zsRYzXnMdwFGW0v8ofGJEyjKQrA7qCchrLCsMTlNVVEeChtOEGD/EI5fWCGeaaMLym/EamCcPqBsB9bEafAF66VaNoeDrsOszSK7X3AG/cKsmTGkFU3WvQVMJEa98AvrB+KitvuY3cYXodWp5LQ/wOoLCX10TcIRRMKyiCAvCPGSw3gsUMBgUQdZtogta0skoLjb8LoDL8WlEsMwMbls07VSGT+f8AZBoMji4MWCp5J0NlhhTAb9ama5ouCoKGabsG2zT8hp8Am5WooiAME4YC7ur+If0A+OjmjL+J1coOCoNq6bu0SWcfzKKzSL8APvgTR3PGDbSBOAbqDjoEVZuHw78An/0G2533AvsCPlWOjqUyzQwFvtLl+q5xaRCTplDk2qEzVS5hgcYsOphj/8N6wOIzaATxyPJrFWhQWrVwnRnW2qUXd/sa/6kfSxveil3jtiLJK6/cjemUpKG66WcvSfFPn1X3ysv7JPjT1z278eGWWD7TX3dA9F+I4/f4jqCeVHM8PaGjHIduBpyineGO1bOB5+5UImxF3A052fuC5yrVE3p1mAxaJKnOiMvG8dkG/s5U5G2mq8PHt/TF3H+6R+v42cm4CxOkj3j4ji6I15mBKj/aDTIaGnT5gTTIaXya84NDIKuZJOWnx0Fex3qxdwaa0fD8cEjPfy6YOliVIaSJAAAAAElFTkSuQmCC"},4473:function(t,e,i){"use strict";i.r(e),i.d(e,"polygonsList",(function(){return o})),i.d(e,"polygonsTree",(function(){return a})),i.d(e,"getDetail",(function(){return r})),i.d(e,"doAdd",(function(){return n})),i.d(e,"doEdit",(function(){return l})),i.d(e,"doDelete",(function(){return c})),i.d(e,"getSelect",(function(){return p}));var s=i("b775");function o(t){return Object(s["default"])({url:"/admin/area/no-page",method:"get",params:t})}function a(t){return Object(s["default"])({url:"/admin/area/trees",method:"get",params:t})}function r(t){return Object(s["default"])({url:"/admin/area/info/"+t.id,method:"get",params:t})}function n(t){return Object(s["default"])({url:"/admin/area",method:"post",data:t})}function l(t){return Object(s["default"])({url:"/admin/area/"+t.id,method:"put",data:t})}function c(t){return Object(s["default"])({url:"/admin/area/"+t.id,method:"delete",data:t})}function p(t){return Object(s["default"])({url:"/admin/area/select-options",method:"get",params:t})}},"7f40":function(t,e,i){},a3fa:function(t,e,i){"use strict";i.r(e);var s=function(){var t=this,e=t._self._c;return e("div",[e("el-row",{staticStyle:{height:"calc(100% - 55px)"}},[e("el-col",{attrs:{span:19}},[e("div",{style:{width:"100%",height:"100%"},attrs:{id:"mapChart"}},[e("div",{staticClass:"map-button"},[e("el-button",{attrs:{type:"primary"},on:{click:t.openCityarea}},[t._v(" "+t._s(0==t.cityIshow?"显示省/市/县区域":"隐藏省/市/县区域")+" ")]),e("el-button",{attrs:{type:"primary"},on:{click:t.openBzarea}},[t._v(" "+t._s(0==t.bzIshow?"显示标注区域":"隐藏标注区域")+" ")]),e("el-button",{attrs:{type:"primary"},on:{click:t.clearPolygon}},[t._v("清除轨迹")]),"区域编辑"==t.title?e("el-button",{attrs:{type:"warning"},on:{click:t.close}},[t._v(" 取消编辑 ")]):t._e(),t.isShowComplete?e("el-button",{attrs:{type:"success"},on:{click:t.completePolygon}},[t._v(" 完成绘制 ")]):t._e()],1),e("el-amap-search-box",{staticClass:"search-box",attrs:{"on-search-result":t.onSearchResult,"search-option":t.searchOption}}),e("el-amap",{ref:"map",staticClass:"amap-demo",attrs:{center:t.map.center,events:t.map.events,plugin:t.map.plugin,vid:"amapDemo",zoom:t.map.zoom}},[t.markerIshow?e("el-amap-marker",{attrs:{draggable:t.markers.draggable,events:t.markers.events,icon:t.markers.icon,position:t.markers.position,vid:"component-marker"}}):t._e(),t.bzIshow?e("el-amap-polygon",{attrs:{bubble:!0,"fill-color":t.biaozhuPolygons.area_color,"fill-opacity":t.biaozhuPolygons.fillOpacity,path:t.biaozhuPolygons.area,"stroke-color":t.biaozhuPolygons.line_color,"stroke-dasharray":t.biaozhuPolygons.strokeDasharray,"stroke-opacity":t.biaozhuPolygons.strokeOpacity,"stroke-style":t.biaozhuPolygons.strokeStyle,"stroke-weight":t.biaozhuPolygons.strokeWeight,visible:t.biaozhuPolygons.visible}}):t._e(),t.cityIshow?e("el-amap-polygon",{attrs:{bubble:!0,"fill-color":t.cityPolygons.area_color,"fill-opacity":t.cityPolygons.fillOpacity,path:t.cityPolygons.area,"stroke-color":t.cityPolygons.line_color,"stroke-dasharray":t.cityPolygons.strokeDasharray,"stroke-opacity":t.cityPolygons.strokeOpacity,"stroke-style":t.cityPolygons.strokeStyle,"stroke-weight":t.cityPolygons.strokeWeight,visible:t.cityPolygons.visible}}):t._e(),e("el-amap-polygon",{attrs:{editable:t.polygons1.editable,events:t.polygons1.events,"fill-color":t.polygons1.area_color,"fill-opacity":t.polygons1.fillOpacity,path:t.polygons1.area,"stroke-color":t.polygons1.line_color,"stroke-dasharray":t.polygons1.strokeDasharray,"stroke-opacity":t.polygons1.strokeOpacity,"stroke-style":t.polygons1.strokeStyle,"stroke-weight":t.polygons1.strokeWeight,visible:t.polygons1.visible}}),t._l(t.polygons,(function(t,i){return e("el-amap-polygon",{key:i,attrs:{events:t.events,"fill-color":t.area_color,"fill-opacity":t.fillOpacity,path:t.area,"stroke-color":t.line_color,"stroke-weight":t.strokeWeight?t.strokeWeight:"1.2",visible:t.visible}})})),t._l(t.markers1,(function(t,i){return e("el-amap-marker",{key:"infomarkerss-markers-"+i,attrs:{position:t,vid:i}})})),t._l(t.window,(function(t,i){return e("el-amap-marker",{key:"infomarkerss-"+i,attrs:{events:t.events,icon:t.icon,position:t.position,vid:i,visible:t.visible}})})),t._l(t.window,(function(t,i){return e("el-amap-text",{key:"infomarkerss-text-"+i,attrs:{events:t.events,offset:[0,-45],position:t.position,text:t.content,visible:t.visible}})}))],2),e("div",{staticClass:"right"})],1)]),e("el-col",{attrs:{span:5}},[e("div",{staticClass:"grid-content row-right"},[e("div",{staticClass:"area_list"},[e("el-input",{attrs:{clearable:"",placeholder:"区镇名称"},model:{value:t.queryForm.name,callback:function(e){t.$set(t.queryForm,"name","string"===typeof e?e.trim():e)},expression:"queryForm.name"}}),e("el-button",{staticClass:"add-area",attrs:{type:"primary"},on:{click:t.handleEdit}},[t._v(" 添加区域 ")]),e("el-button",{staticClass:"add-area",attrs:{type:"primary"},on:{click:t.queryData}},[t._v(" 搜索 ")]),e("el-tabs",{on:{"tab-click":t.handleClick},model:{value:t.activeName,callback:function(e){t.activeName=e},expression:"activeName"}},[e("el-tab-pane",{attrs:{label:"使用中",name:"first"}}),e("el-tab-pane",{attrs:{label:"已禁用",name:"second"}})],1),t.polygonsTreeLsit.length&&t.polygonsTreeLsit.length>0?e("ul",{directives:[{name:"infinite-scroll",rawName:"v-infinite-scroll",value:t.load,expression:"load"}],staticClass:"infinite-list",staticStyle:{overflow:"auto",height:"calc(100% - 130px)"}},t._l(t.polygonsTreeLsit,(function(i,s){return e("li",{key:s,staticClass:"list-item"},[i.id?e("div",{staticClass:"li-hover",class:i.id==t.currentList?"father-list1":"father-list",on:{click:function(e){return t.clickList(i)}}},[e("div",{staticClass:"title"},[e("div",[t._v(t._s(i.name))])]),e("div",{staticClass:"bottom"},[e("div",{staticClass:"type"},[0==i.type?e("el-tag",{attrs:{type:"primary"}},[t._v("一级")]):t._e(),1==i.type?e("el-tag",{attrs:{type:"primary"}},[t._v("二级")]):t._e()],1),e("div",{staticClass:"edit-buttom"},[0==i.visible?e("el-button",{attrs:{circle:"",type:"success"},on:{click:function(e){return e.stopPropagation(),t.showPloygons(i.id)}}},[t._v(" 显 ")]):t._e(),1==i.visible?e("el-button",{attrs:{circle:"",type:"warning"},on:{click:function(e){return e.stopPropagation(),t.yinPloygons(i.id)}}},[t._v(" 隐 ")]):t._e(),e("el-button",{attrs:{circle:"",icon:"el-icon-edit",size:"mini",type:"primary"},on:{click:function(e){return e.stopPropagation(),t.handleEdit(i,i.children.length)}}}),e("el-button",{attrs:{circle:"",disabled:i.children&&i.children.length>0,icon:"el-icon-delete",size:"mini",type:"danger"},on:{click:function(e){return e.stopPropagation(),t.doDelete(i)}}})],1)])]):t._e(),e("ul",{class:i.id==t.currentList?"children-show":i.id?"infinite-list1":"no-id",staticStyle:{overflow:"auto"}},t._l(i.children,(function(i,s){return e("li",{key:s,staticClass:"list-item1"},[e("div",{staticClass:"li-hover",on:{click:function(e){return t.clickList(i)}}},[e("div",{staticClass:"title"},[e("div",[t._v(t._s(i.name))])]),e("div",{staticClass:"bottom"},[e("div",{staticClass:"type"},[0==i.type?e("el-tag",{attrs:{type:"primary"}},[t._v(" 一级 ")]):t._e(),1==i.type?e("el-tag",{attrs:{type:"primary"}},[t._v(" 二级 ")]):t._e()],1),e("div",{staticClass:"edit-buttom"},[e("el-button",{attrs:{circle:"",type:"success"},on:{click:function(e){return e.stopPropagation(),t.addGirdPoint(i)}}},[t._v(" 点 ")]),0==i.visible?e("el-button",{attrs:{circle:"",type:"success"},on:{click:function(e){return e.stopPropagation(),t.showPloygons(i.id)}}},[t._v(" 显 ")]):t._e(),1==i.visible?e("el-button",{attrs:{circle:"",type:"warning"},on:{click:function(e){return e.stopPropagation(),t.yinPloygons(i.id)}}},[t._v(" 隐 ")]):t._e(),e("el-button",{attrs:{circle:"",icon:"el-icon-edit",size:"mini",type:"primary"},on:{click:function(e){return e.stopPropagation(),t.handleEdit(i)}}}),e("el-button",{attrs:{circle:"",icon:"el-icon-delete",size:"mini",type:"danger"},on:{click:function(e){return e.stopPropagation(),t.doDelete(i)}}})],1)])])])})),0)])})),0):e("el-empty",{attrs:{description:"暂无数据","image-size":100}})],1)])])],1),e("el-dialog",{attrs:{"close-on-click-modal":!1,"show-close":!1,title:t.title,visible:t.dialogFormVisible,width:"850px"},on:{"update:visible":function(e){t.dialogFormVisible=e},open:t.openDialog},scopedSlots:t._u([{key:"footer",fn:function(){return[e("el-button",{on:{click:t.close}},[t._v("取 消")]),"区域添加"==t.title?e("el-button",{attrs:{type:"primary"},on:{click:t.doAdd}},[t._v(" 添加 ")]):t._e(),"区域编辑"==t.title?e("el-button",{attrs:{type:"primary"},on:{click:t.doEdit}},[t._v(" 保存 ")]):t._e()]},proxy:!0}])},[e("el-form",{ref:"form",attrs:{"label-width":"120px",model:t.form,rules:t.rules}},[e("el-form-item",{attrs:{label:"区域名称",prop:"name"}},[e("el-input",{attrs:{clearable:"",placeholder:"请输入区域名称"},model:{value:t.form.name,callback:function(e){t.$set(t.form,"name","string"===typeof e?e.trim():e)},expression:"form.name"}})],1),e("el-form-item",{attrs:{label:"区域填充颜色",prop:"area_color"}},[e("el-radio-group",{model:{value:t.form.area_color,callback:function(e){t.$set(t.form,"area_color",e)},expression:"form.area_color"}},[e("el-radio",{attrs:{label:"#FF9600"}},[e("span",{staticClass:"quan",staticStyle:{background:"#ff9600"}})]),e("el-radio",{attrs:{label:"#11FF00"}},[e("span",{staticClass:"quan",staticStyle:{background:"#11ff00"}})]),e("el-radio",{attrs:{label:"#FFFF01"}},[e("span",{staticClass:"quan",staticStyle:{background:"#ffff01"}})]),e("el-radio",{attrs:{label:"#FF0004"}},[e("span",{staticClass:"quan",staticStyle:{background:"#ff0004"}})]),e("el-radio",{attrs:{label:"#FF00FF"}},[e("span",{staticClass:"quan",staticStyle:{background:"#ff00ff"}})])],1)],1),e("el-form-item",{attrs:{label:"区域类型",prop:"type"}},[e("el-radio-group",{on:{change:t.changeJbie},model:{value:t.form.type,callback:function(e){t.$set(t.form,"type",e)},expression:"form.type"}},t._l(t.typeList,(function(i){return e("el-radio",{key:i.value,attrs:{label:i.value}},[t._v(" "+t._s(i.label)+" ")])})),1)],1),"1"==t.form.type?e("el-form-item",{attrs:{label:"上级区域",prop:"parent_id"}},[e("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择上级区域"},model:{value:t.form.parent_id,callback:function(e){t.$set(t.form,"parent_id",e)},expression:"form.parent_id"}},t._l(t.parentAreaList,(function(t){return e("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})),1)],1):t._e(),e("el-form-item",{attrs:{label:"绘制区域",prop:"area"}},[e("span",{staticClass:"star",staticStyle:{left:"-75px"}},[t._v("*")]),e("el-button",{attrs:{type:"primary"},on:{click:t.drawArea}},[t._v("点击绘制")]),t.form.point.length>0?e("el-tag",{staticStyle:{"margin-left":"10px"}},[t._v(" "+t._s(t.form.point[0])+","+t._s(t.form.point[1])+" ")]):t._e()],1),e("el-form-item",{attrs:{prop:"area"}},[e("div",{staticClass:"area-points"},[t._v(" "+t._s(t.form.area.length>0?t.form.area:"请绘制区域")+" ")])]),e("el-form-item",{attrs:{label:"区域介绍",prop:"body"}},[e("tiny-mce",{attrs:{content:t.form.body,"tiny-height":300},on:{childByValue:t.getTnyMac}})],1),e("el-form-item",{attrs:{label:"状态",prop:"status"}},[e("el-radio-group",{model:{value:t.form.status,callback:function(e){t.$set(t.form,"status",e)},expression:"form.status"}},[e("el-radio",{attrs:{disabled:1==t.form.isChild,label:1}},[t._v(" 正常 ")]),e("el-radio",{attrs:{disabled:1==t.form.isChild,label:0}},[t._v(" 禁用 ")])],1)],1)],1)],1),e("pointEdit",{ref:"edit"})],1)},o=[],a=i("8f9b"),r=i("4473"),n=i("3261"),l=i("e222");let c=new a["AMapManager"];var p={amapManager:c,components:{pointEdit:l["default"]},data(){return{yincangAresids:[],bzIshow:!1,cityIshow:!1,currentList:"",value:!0,activeName:"first",currentText:Number,markers1:[],searchOption:{city:"郑州",citylimit:!1},markerIshow:!1,isShowComplete:!1,window:[{position:[121.7279,31.3548],label:{content:"",offset:0}}],icon:i("f265"),icon1:i("ebbe"),markers:{position:[],icon:i("4160"),draggable:!0,events:{dragend:t=>this.markersDragend(t)}},amapManager:c,map:{resizeEnable:!0,zoom:12,center:[106.2246,29.59258],viewMode:"2D",events:{click:t=>this.firstPolygons(t)},plugin:["ToolBar","Scale","OverView",{pName:"MapType",defaultType:0,events:{init(t){console.log(t)}}}]},biaozhuPolygons:{area:[],area_color:"#1791fc",strokeOpacity:1,fillOpacity:0,visible:!0,line_color:"#B22222",strokeWeight:3,strokeStyle:"dashed"},cityPolygons:{area:[],area_color:"#1791fc",strokeOpacity:1,fillOpacity:0,visible:!0,line_color:"#ff0000",strokeWeight:5,strokeStyle:"dashed"},polygons1:{area:[],area_color:"#1791fc",strokeOpacity:1,fillOpacity:.3,visible:!0,line_color:"#FF33FF",strokeWeight:2,strokeStyle:"solid",strokeDasharray:[5,5],editable:!0,events:{}},arr:[],polygons:[],polygonsTreeLsit:[],noUsePolygons:[],polygonsArea:[],queryForm:{project_id:""},polygonsPoints:[],title:"区域添加",typeList:[{label:"一级",value:"0"},{label:"二级",value:"1"}],form:{status:1,point:[],type:"0",area:[],line_color:"#B24DE2",area_color:"#FF9600",fillOpacity:"0.2",body:"",parent_id:""},parentAreaList:[],rules:{name:[{required:!0,trigger:"blur",message:"请输入区域名称"}],line_color:[{required:!0,trigger:"blur",message:"请选择区域线颜色"}],area_color:[{required:!0,trigger:"blur",message:"请选择区域填充颜色"}],type:[{required:!0,trigger:"blur",message:"请选择区域类型"}],fillOpacity:[{required:!0,trigger:"blur",message:"请选择填充颜色透明度"}],status:[{required:!0,trigger:"blur",message:"请选择区域状态"}],parent_id:[{required:!0,trigger:"blur",message:"请选择上级区域"}]},dialogFormVisible:!1}},watch:{},mounted(){},created(){let t=this.$route.query;this.queryForm.project_id=t.project_id,this.form.project_id=t.project_id,this.form.point=this.markers.position=this.map.center=[Number(t.lng),Number(t.lat)],console.log(this.markers.position," this.markers.position "),this.polygonsList(),this.polygonsTree(),this.bzDetail(),sessionStorage.removeItem("yiincangaread")},methods:{showPloygons(t){this.yincangAresids.length>0&&(this.yincangAresids=this.yincangAresids.filter(e=>e!==t));let e=this.polygons,i=this.window,s=this.polygonsTreeLsit;e.map(e=>{e.id==t&&(e.visible=!0)}),i.map(e=>{e.id==t&&(e.visible=!0)}),s.map(e=>{e.id==t?e.visible=!0:e.children&&e.children.map(e=>{e.id==t&&(e.visible=!0)})}),this.polygonsTreeLsit=s,this.polygons=e,this.window=i},yinPloygons(t){console.log(t,"pppp"),this.yincangAresids.push(t);let e=this.polygons,i=this.window,s=this.polygonsTreeLsit;e.map(e=>{e.id==t&&(e.visible=!1)}),i.map(e=>{e.id==t&&(e.visible=!1)}),s.map(e=>{e.id==t?e.visible=!1:e.children&&e.children.map(e=>{e.id==t&&(e.visible=!1)})}),this.polygonsTreeLsit=s,this.polygons=e,this.window=i,console.log(this.polygonsTreeLsit,"pppppppppp")},changeJbie(){0==this.form.type&&(this.form.fillOpacity="0.2"),1==this.form.type&&(this.form.fillOpacity="0.5")},openDialog(){this.getSelect()},load(){},async polygonsTree(){const{data:t}=await Object(r["polygonsTree"])(this.queryForm);let e=sessionStorage.getItem("yiincangaread");if(e){let i=e.split(",");t.map(t=>{let e=i.indexOf(t.id.toString());-1!==e&&(t.visible=!1),t.children&&t.children.length>0&&t.children.map(t=>{let e=i.indexOf(t.id.toString());-1!==e&&(console.log(i,"yinAreas"),console.log(t.id,"lllll"),t.visible=!1)})})}this.polygonsTreeLsit=t},async getSelect(){let t=this.$route.query,e={project_id:t.project_id,type:[0]};const{data:i}=await Object(r["getSelect"])(e);this.parentAreaList=i},async cantUseList(){const{data:t}=await Object(r["polygonsList"])(this.queryForm);this.noUsePolygons=t.list},handleClick(){this.polygons=[],"first"==this.activeName&&(this.queryForm.status=1),"second"==this.activeName&&(this.queryForm.status=0),this.polygonsList(),this.polygonsTree()},onSearchResult(t){let e=0,i=0;if(t.length>0){t.forEach(t=>{let{lng:s,lat:o}=t;i+=s,e+=o,this.markers1.push([t.lng,t.lat])});let s={lng:i/t.length,lat:e/t.length};this.map.center=[s.lng,s.lat],this.map.zoom=14}},handleEdit(t,e){this.markerIshow=!0,sessionStorage.setItem("yiincangaread",this.yincangAresids.join(",")),console.log(this.yincangAresids,"this.yincangAresids"),t.id?(this.getDetail(t.id,e),this.title="区域编辑"):(this.$nextTick(()=>{this.$refs["form"].resetFields(),this.form=this.$options.data().form,this.form.point=this.markers.position=this.map.center,this.form.area=this.polygonsArea=this.polygons1.area=[],this.form.parent_id=this.form.parent_id.toString()}),this.title="区域添加"),this.dialogFormVisible=!0},markersDragend(t){if(console.log([t.lnglat.lng,t.lnglat.lat],"---event---: dragend"),this.form.point=this.markers.position=[t.lnglat.lng,t.lnglat.lat],this.polygons1.area.length>0){let t=[];this.polygons1.area.map(e=>{t.push([e.lng,e.lat])}),this.polygonsArea=t,this.form.area=t}},completePolygon(){if(sessionStorage.setItem("yiincangaread",this.yincangAresids.join(",")),this.compute(),this.form.id){console.log(this.polygonsArea,"this.polygonsArea");let t=[];this.polygons1.area.map(e=>{e.lng?t.push([e.lng,e.lat]):t.push(e)}),this.polygonsArea=t,this.form.area=t,console.log(t,"ppp")}else this.form.area=this.polygonsArea},sitCenterMark(){this.dialogFormVisible=!1;let t=this.$route.query;this.queryForm.project_id=t.project_id,this.form.project_id=t.project_id,this.form.id?this.markers.position=this.form.point:this.markers.position=[Number(t.lng),Number(t.lat)]},compute(){console.log(this.form.area,"----------------");var t=this.markers.position,e=AMap.GeometryUtil.isPointInRing(t,this.polygonsArea);e?this.dialogFormVisible=!0:this.$message.warning("中心点必须在区域内")},drawArea(){console.log(this.form,"++++++++++++++"),this.dialogFormVisible=!1,this.isShowComplete=!0,this.form.id?(this.form.editable=!0,this.markers.position=this.map.center=this.form.point,this.polygons1.area=this.form.area,this.polygons.map(t=>{t.id==this.form.id&&(t.area=[])})):this.form.point=this.markers.position=this.map.center},openBzarea(){this.bzIshow=!this.bzIshow},openCityarea(){this.cityIshow=!this.cityIshow},async bzDetail(){let t=this.$route.query,e=t.project_id;const{data:i}=await Object(n["bzDetail"])(e);this.biaozhuPolygons.area=i.areas,this.cityPolygons.area=i.super_areas},clearPolygon(){this.form.area=this.polygonsArea=this.polygons1.area=[],this.isShowComplete=!1,this.markerIshow=!1},async polygonsList(){const{data:t}=await Object(r["polygonsList"])(this.queryForm);let e=t.list,i=sessionStorage.getItem("yiincangaread");if(i){let t=i.split(","),s=[];e.map(e=>{let i=t.indexOf(e.id.toString());console.log(i),-1!==i&&(e.visible=!1),s.push(e)}),console.log(s,"--------")}this.polygons=e;let s=[];console.log(e," this.polygons"),e.map(t=>{t.events={click:t=>this.secondPolygons(t)},0==t.type?t.content='