1 line
23 KiB
JavaScript
1 line
23 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-34b3d2a0"],{"9b6a":function(e,t,r){"use strict";r.r(t);var a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("div",{staticClass:"outmain ba_f dtu"},[e._m(0),r("el-form",{ref:"form",attrs:{model:e.form,"label-width":"180px"}},[r("el-form-item",{attrs:{label:"取餐地址"}},[r("el-input",{attrs:{disabled:""},model:{value:e.form.address,callback:function(t){e.$set(e.form,"address",t)},expression:"form.address"}})],1),r("el-form-item",{attrs:{label:"经纬度"}},[r("el-input",{staticStyle:{width:"190px"},attrs:{disabled:""},model:{value:e.form.lng,callback:function(t){e.$set(e.form,"lng",t)},expression:"form.lng"}}),r("el-input",{staticClass:"mar_l20",staticStyle:{width:"190px"},attrs:{disabled:""},model:{value:e.form.lat,callback:function(t){e.$set(e.form,"lat",t)},expression:"form.lat"}})],1),r("el-form-item",{attrs:{label:"预计配送时间"}},[r("el-input",{attrs:{placeholder:"",type:"number",disabled:!0},model:{value:e.form.withinTime,callback:function(t){e.$set(e.form,"withinTime",t)},expression:"form.withinTime"}},[r("template",{slot:"prepend"},[e._v("三公里内")]),r("template",{slot:"append"},[e._v("分钟")])],2),r("a",{staticClass:"mar_l20",attrs:{href:"#"},on:{click:function(t){e.dialogFormVisible=!0}}},[e._v("时长设置")])],1),r("el-form-item",{attrs:{label:"配送范围"}},[r("el-input",{attrs:{placeholder:"请输入配送范围",type:"number"},model:{value:e.form.range,callback:function(t){e.$set(e.form,"range",t)},expression:"form.range"}},[r("template",{slot:"append"},[e._v("km")])],2)],1),r("div",{staticClass:"shuju_title mar_b20"},[r("div",{staticClass:"shuju_title_text"},[r("span",[e._v("配送设置")])])]),r("el-form-item",{attrs:{label:"配送费"}},[r("el-radio-group",{on:{change:e.psType},model:{value:e.form.type,callback:function(t){e.$set(e.form,"type",t)},expression:"form.type"}},[r("el-radio",{attrs:{label:"1"}},[e._v("固定金额")]),r("el-radio",{attrs:{label:"2"}},[e._v("按距离收取")]),r("el-radio",{attrs:{label:"3"}},[e._v("按区域收取")])],1)],1),r("el-form-item",{directives:[{name:"show",rawName:"v-show",value:"1"==e.form.type,expression:"form.type=='1'"}],attrs:{label:""}},[r("div",[r("el-input",{attrs:{placeholder:"请输入起送价",type:"number"},model:{value:e.form.fixedStartMoney,callback:function(t){e.$set(e.form,"fixedStartMoney",t)},expression:"form.fixedStartMoney"}},[r("template",{slot:"prepend"},[e._v("起送价")]),r("template",{slot:"append"},[e._v("元")])],2)],1),r("div",{staticClass:"mar_t20"},[r("el-input",{attrs:{placeholder:"请输入金额",type:"number"},model:{value:e.form.money,callback:function(t){e.$set(e.form,"money",t)},expression:"form.money"}},[r("template",{slot:"prepend"},[e._v("每单")]),r("template",{slot:"append"},[e._v("元")])],2)],1)]),r("el-form-item",{directives:[{name:"show",rawName:"v-show",value:"2"==e.form.type,expression:"form.type=='2'"}],attrs:{label:""}},[r("div",[r("el-form-item",{attrs:{label:"路径计算方式"}},[r("el-radio-group",{model:{value:e.form.calculationType,callback:function(t){e.$set(e.form,"calculationType",t)},expression:"form.calculationType"}},[r("el-radio",{attrs:{label:"1"}},[e._v("直线距离")]),r("el-radio",{attrs:{label:"2"}},[e._v("骑行规划距离")])],1)],1)],1),r("div",{staticClass:"mar_t20"},[r("el-input",{attrs:{placeholder:"请输入起送价",type:"number"},model:{value:e.form.startMoney,callback:function(t){e.$set(e.form,"startMoney",t)},expression:"form.startMoney"}},[r("template",{slot:"prepend"},[e._v("起送价")]),r("template",{slot:"append"},[e._v("元")])],2)],1),r("div",{staticClass:"mar_t20"},[r("el-input",{attrs:{placeholder:"请输入起步价",type:"number"},model:{value:e.form.distanceStartMoney,callback:function(t){e.$set(e.form,"distanceStartMoney",t)},expression:"form.distanceStartMoney"}},[r("template",{slot:"prepend"},[e._v("起步价")]),r("template",{slot:"append"},[e._v("元")])],2),r("el-input",{attrs:{placeholder:"请输入公里数",type:"number"},model:{value:e.form.startDistance,callback:function(t){e.$set(e.form,"startDistance",t)},expression:"form.startDistance"}},[r("template",{slot:"append"},[e._v("公里,每增加1公里加")])],2),r("el-input",{attrs:{placeholder:"请输入金额",type:"number"},model:{value:e.form.overstepMoney,callback:function(t){e.$set(e.form,"overstepMoney",t)},expression:"form.overstepMoney"}},[r("template",{slot:"append"},[e._v("元")])],2)],1),r("div",{staticClass:"mar_t20"},[r("el-input",{attrs:{placeholder:"请输入公里数",type:"number"},model:{value:e.form.overstepDistance,callback:function(t){e.$set(e.form,"overstepDistance",t)},expression:"form.overstepDistance"}},[r("template",{slot:"prepend"},[e._v("超出")]),r("template",{slot:"append"},[e._v("公里后,每增加1公里加")])],2),r("el-input",{attrs:{placeholder:"请输入金额",type:"number"},model:{value:e.form.overstepDistanceMoney,callback:function(t){e.$set(e.form,"overstepDistanceMoney",t)},expression:"form.overstepDistanceMoney"}},[r("template",{slot:"append"},[e._v("元,最高收取")])],2),r("el-input",{attrs:{placeholder:"请输入金额",type:"number"},model:{value:e.form.maxMoney,callback:function(t){e.$set(e.form,"maxMoney",t)},expression:"form.maxMoney"}},[r("template",{slot:"append"},[e._v("元")])],2),r("div",{staticClass:"yb_margin"},[e._v("计费规则:例如设置 起步3km内5元,每增加 1km 加 1 元,超过6km,每增加 1km 加 2 元。如果配送距离5km,配送费:5 + (5-3)X 1 = 7元;配送距离8km,配送费:5 + (8-3)X 2 = 15元。 ")])],1)]),r("el-form-item",{directives:[{name:"show",rawName:"v-show",value:"1"==e.form.type||"2"==e.form.type,expression:"form.type=='1' || form.type=='2'"}],attrs:{label:"特殊时间段"}},[r("div",{staticClass:"flex-1 mar_l15"},[e._l(e.form.timeArr,(function(t,a){return r("div",{key:a,staticClass:"time_item mar_b10"},[r("el-time-picker",{staticStyle:{width:"109px"},attrs:{placeholder:"任意时间点","value-format":"HH:mm",format:"HH:mm"},model:{value:t.startTime,callback:function(r){e.$set(t,"startTime",r)},expression:"item.startTime"}}),r("span",{staticClass:"mar_lr10"},[e._v("-")]),r("el-time-picker",{staticStyle:{width:"109px"},attrs:{placeholder:"任意时间点","value-format":"HH:mm",format:"HH:mm"},model:{value:t.endTime,callback:function(r){e.$set(t,"endTime",r)},expression:"item.endTime"}}),r("el-input",{staticClass:"inppsf mar_l20",staticStyle:{width:"190px"},attrs:{placeholder:"另加配送费",type:"number"},model:{value:t.money,callback:function(r){e.$set(t,"money",r)},expression:"item.money"}},[r("template",{slot:"append"},[e._v("元")])],2),r("el-button",{staticClass:"fon_12 mar_l10",attrs:{type:"text"},on:{click:function(t){return e.deltimeInterval1(a)}}},[e._v("删除 ")])],1)})),r("el-button",{directives:[{name:"show",rawName:"v-show",value:e.form.timeArr.length<3,expression:"form.timeArr.length<3"}],attrs:{type:"text"},on:{click:e.addtimeInterval1}},[r("Icon",{attrs:{type:"md-add"}}),e._v(" 添加特殊时段 ")],1)],2)]),r("el-form-item",{directives:[{name:"show",rawName:"v-show",value:"3"==e.form.type,expression:"form.type=='3'"}],staticClass:"deliverLeft",staticStyle:{"margin-left":"-160px"},attrs:{label:""}},[r("div",{staticClass:"flext"},[r("div",[e._l(e.areaArr,(function(t,a){return r("div",{key:a,staticClass:"deliveryScopeItem mar_b10 rel",class:t.color,on:{click:function(t){return e.oncloseicon(a)}},model:{value:t.selected=!1,callback:function(r){e.$set(t,"selected = false",r)},expression:"item.selected = false"}},[r("div",{staticClass:"cancleDeliveryScope ba_f ab flex t_c curs",on:{click:function(t){return e.delDeliveryMethod(a)}}},[r("i",{staticClass:"el-icon-circle-close cancle-icon"})]),r("div",{staticClass:"deliveryScopeItemLine shape mar_b5 flex-start"},[r("label",{staticClass:"deliveryScopeItemLineTitle fon_14 flex-justify mar_l15"},[e._v("形 状:")]),r("div",{staticClass:"deliveryScopeItemLineCont flex-1 mar_l15"},[r("el-radio",{attrs:{label:1},on:{change:function(t){return e.handleChange(1,a)}},model:{value:t.shape,callback:function(r){e.$set(t,"shape",r)},expression:"item.shape"}},[e._v(" 圆形 ")]),r("el-radio",{attrs:{label:2},on:{change:function(t){return e.handleChange(2,a)}},model:{value:t.shape,callback:function(r){e.$set(t,"shape",r)},expression:"item.shape"}},[e._v(" 多边形 ")])],1)]),r("div",{staticClass:"deliveryScopeItemLine mar_b5 flex-start"},[r("label",{staticClass:"deliveryScopeItemLineTitle fon_14 flex-justify mar_l15"},[e._v("配送费:")]),r("div",{staticClass:"deliveryScopeItemLineCont flex-1 mar_l15"},[r("el-input",{staticClass:"inppsf",attrs:{placeholder:"",type:"number"},model:{value:t.money,callback:function(r){e.$set(t,"money",r)},expression:"item.money"}},[r("template",{slot:"append"},[e._v("元")])],2)],1)]),r("div",{staticClass:"deliveryScopeItemLine mar_b5 flex-start"},[r("label",{staticClass:"deliveryScopeItemLineTitle fon_14 flex-justify mar_l15"},[e._v("起送价:")]),r("div",{staticClass:"deliveryScopeItemLineCont flex-1 mar_l15"},[r("el-input",{staticClass:"inppsf",attrs:{placeholder:"",type:"number"},model:{value:t.startMoney,callback:function(r){e.$set(t,"startMoney",r)},expression:"item.startMoney"}},[r("template",{slot:"append"},[e._v("元")])],2)],1)]),r("div",{directives:[{name:"show",rawName:"v-show",value:1==t.shape,expression:"item.shape==1"}],staticClass:"deliveryScopeItemLine mar_b5 flex-start"},[r("label",{staticClass:"deliveryScopeItemLineTitle fon_14 flex-justify mar_l15"},[e._v("半 径:")]),r("div",{staticClass:"deliveryScopeItemLineCont flex-1 mar_l15"},[r("el-input",{staticClass:"inppsf",attrs:{placeholder:"",type:"number"},on:{input:function(t){return e.radius(t,a)}},model:{value:t.radius,callback:function(r){e.$set(t,"radius",r)},expression:"item.radius"}},[r("template",{slot:"append"},[e._v("米")])],2)],1)]),r("div",{staticClass:"deliveryScopeItemLine mar_b5 flex-start"},[r("label",{staticClass:"deliveryScopeItemLineTitle fon_14 flex-justify mar_l15"},[e._v("特殊时段:")]),r("div",{staticClass:"deliveryScopeItemLineCont flex-1 mar_l15"},[e._l(t.timeArr,(function(t,s){return r("div",{key:s,staticClass:"time_item mar_b10"},[r("el-time-picker",{staticStyle:{width:"109px"},attrs:{placeholder:"任意时间点","value-format":"HH:mm",format:"HH:mm"},model:{value:t.startTime,callback:function(r){e.$set(t,"startTime",r)},expression:"item.startTime"}}),r("span",{staticClass:"mar_lr10"},[e._v("-")]),r("el-time-picker",{staticStyle:{width:"109px"},attrs:{placeholder:"任意时间点","value-format":"HH:mm",format:"HH:mm"},model:{value:t.endTime,callback:function(r){e.$set(t,"endTime",r)},expression:"item.endTime"}}),r("el-input",{staticClass:"inppsf mar_t5",staticStyle:{width:"190px"},attrs:{placeholder:"另加配送费",type:"number"},model:{value:t.money,callback:function(r){e.$set(t,"money",r)},expression:"item.money"}},[r("template",{slot:"append"},[e._v("元")])],2),r("el-button",{staticClass:"fon_12 mar_l10",attrs:{type:"text"},on:{click:function(t){return e.deltimeInterval(a)}}},[e._v("删除 ")])],1)})),r("el-button",{directives:[{name:"show",rawName:"v-show",value:t.timeArr.length<3,expression:"item.timeArr.length<3"}],attrs:{type:"text"},on:{click:function(t){return e.addtimeInterval(a)}}},[r("Icon",{attrs:{type:"md-add"}}),e._v(" 添加时段 ")],1)],2)])])})),r("div",{staticClass:"add-delivery-scope subjectcolor2 curs fon_14",on:{click:e.addDeliveryMethod}},[e._v(" +添加配送范围 ")])],2),r("div",{staticClass:"flex-1"},[r("div",{staticClass:"nofull-map-wrap flex-1",attrs:{id:"container"}})])])])],1)],1),r("div",{staticClass:"mar_t20 ba_f pad_20 t_c"},[r("el-button",{attrs:{type:"primary"},on:{click:e.submitForm}},[e._v("保存")])],1),r("el-dialog",{attrs:{title:"配送时间",visible:e.dialogFormVisible,width:"40%","close-on-click-modal":!1},on:{"update:visible":function(t){e.dialogFormVisible=t}}},[r("el-form",{attrs:{model:e.form,"label-width":"180px"}},[r("el-form-item",{attrs:{label:"三公里内"}},[r("el-input",{attrs:{placeholder:"",type:"number"},model:{value:e.form.withinTime,callback:function(t){e.$set(e.form,"withinTime",t)},expression:"form.withinTime"}},[e._v("> "),r("template",{slot:"append"},[e._v("分钟")])],2),r("div",{staticClass:"yb_margin"},[e._v("请输入三公里内配送时长")])],1),r("el-form-item",{attrs:{label:"三公里外"}},[r("el-input",{attrs:{placeholder:"",type:"number"},model:{value:e.form.exceedTime,callback:function(t){e.$set(e.form,"exceedTime",t)},expression:"form.exceedTime"}},[r("template",{slot:"prepend"},[e._v("每增加一公里")]),r("template",{slot:"append"},[e._v("分钟")])],2),r("div",{staticClass:"yb_margin"},[e._v("请输入三公里外每增加一公里增加的时长")])],1)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.dialogFormVisible=!1}}},[e._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:function(t){e.dialogFormVisible=!1}}},[e._v("确 定")])],1)],1)],1)},s=[function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"shuju_title mar_b20"},[r("div",{staticClass:"shuju_title_text"},[r("span",[e._v("基本设置")])])])}],l=(r("4de4"),r("c740"),r("c975"),r("d81d"),r("96cf"),r("1da1")),i=r("294d"),n=r("e692"),o={created:function(){this.initData()},data:function(){return{form:{lng:114.304692,lat:30.59331,address:"湖北省武汉市武昌区沿江大道230号",withinTime:"",exceedTime:"",type:"3",range:"",calculationType:"",startMoney:"",distanceStartMoney:"",startDistance:"",overstepMoney:"",overstepDistance:"",overstepDistanceMoney:"",maxMoney:"",fixedStartMoney:"",fixedFullMoney:"",money:"",timeArr:[]},areaArr:[{color:"ss1",shape:1,money:5,startMoney:20,radius:2e3,selected:!1,circle:"",details:"",lng:"",lat:"",timeArr:[]}],dialogFormVisible:!1,mapAddress:"湖北省武汉市",mapLat:30.59331,mapLng:114.304692,sstt:["ss1","ss2","ss3","ss4","ss5"],selectCol:["ss1"],markersArray:[],map:"",center:"",path:[],color1:153,color2:214,color3:255,xz:0}},methods:{initData:function(){var e=this;return Object(l["a"])(regeneratorRuntime.mark((function t(){var r,a,s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(i["E"])({ident:"delivery"});case 2:if(r=t.sent,a=r.data,e.form2=e.form,e.form=Object.assign(e.form2,a),"3"==a.type){for(s=0;s<a.areaArr.length;s++)a.areaArr[s].circle="";a.areaArr&&(e.areaArr=a.areaArr.map((function(e){return{shape:e.shape,money:e.money,startMoney:e.startMoney,lng:e.lng,lat:e.lat,circle:e.circle,radius:+e.radius,selected:e.selected,color:e.color,details:e.details,timeArr:e.timeArr}}))),setTimeout((function(){e.init()}),0)}case 7:case"end":return t.stop()}}),t)})))()},addtimeInterval1:function(){var e={startTime:"00:00",endTime:"00:00",money:""};this.$set(this.form.timeArr,this.form.timeArr.length,e)},deltimeInterval1:function(e){this.$delete(this.form.timeArr,e)},addDeliveryMethod:function(){var e=this,t=[];if(t=this.sstt.filter((function(t){return-1===e.selectCol.indexOf(t)})),console.log(this.areaArr,t),console.log("listlistlist",t),console.log("changdu",this.areaArr.length),this.areaArr.length>=1&&t.shift(),this.areaArr.length>3&&(t=[],t=this.sstt.filter((function(t){return-1===e.selectCol.indexOf(t)}))),this.areaArr.length>4)return alert("最多添加5组数据");if("ss1"==t[0])var r=64,a=158,s=255;if("ss2"==t[0])r=103,a=194,s=58;if("ss3"==t[0])r=230,a=162,s=60;if("ss4"==t[0])r=245,a=108,s=108;if("ss5"==t[0])r=255,a=127,s=0;var l={color:t[0],shape:1,money:5,radius:2e3,startMoney:20,selected:!1,circle:new qq.maps.Circle({center:this.center,clickable:!0,cursor:"auto",editable:!0,radius:2e3,fillColor:new qq.maps.Color(r,a,s,.5),map:this.map,strokeColor:new qq.maps.Color(r,a,s,1),strokeDashStyle:"solid",strokeWeight:3,visible:!0,zIndex:1e3}),timeArr:[]};qq.maps.event.addListener(l.circle,"radius_changed",(function(t){e.areaArr[e.xz].radius=Math.round(t.target.radius),console.log("半径"+t.target.radius)})),qq.maps.event.addListener(l.circle,"center_changed",(function(e){console.log("中心点"+e.target.center)})),this.$set(this.areaArr,this.areaArr.length,l),this.$set(this.selectCol,this.selectCol.length,t[0]),console.log(this.areaArr,this.areaArr.length,l,this.sstt,this.selectCol),this.oncloseicon(this.areaArr.length-1)},delDeliveryMethod:function(e){var t=this;1==this.areaArr[e].shape?this.areaArr[e].circle.setMap(null):this.areaArr[e].details.setMap(null),this.sstt.filter((function(e){return-1===t.selectCol.indexOf(e)})),this.$delete(this.selectCol,this.selectCol.findIndex((function(r){return r==t.areaArr[e].color}))),this.$delete(this.areaArr,e)},addtimeInterval:function(e){for(var t=0;t<this.areaArr.length;t++){var r={startTime:"00:00",endTime:"00:00",money:""};e==t&&this.$set(this.areaArr[t].timeArr,this.areaArr[t].timeArr.length,r)}},deltimeInterval:function(e){for(var t=0;t<this.areaArr.length;t++)e==t&&this.$delete(this.areaArr[t].timeArr,e)},psType:function(e){var t=this;return Object(l["a"])(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:"3"==e&&setTimeout((function(){t.init()}),0);case 1:case"end":return r.stop()}}),r)})))()},init:function(){var e=this;return Object(l["a"])(regeneratorRuntime.mark((function t(){var r,a,s,l,i,o,c,m,d,p,u,f,h,v,y;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(n["g"])();case 2:for(r=t.sent,a=r.data,s=e,l=a.lat?+a.lat:30.59331,i=a.lng?+a.lng:114.304692,s.center=new qq.maps.LatLng(l,i),s.map=new qq.maps.Map(document.getElementById("container"),{center:s.center,zoom:13}),s.path=[new qq.maps.LatLng(l+.018,i+.018),new qq.maps.LatLng(l-.018,i+.018),new qq.maps.LatLng(l-.018,i-.018),new qq.maps.LatLng(l+.018,i-.018)],qq.maps.event.addListener(s.map,"click",(function(e){console.log(s.areaArr)})),o=0,c=s.areaArr.length;o<c;o++)if(console.log(666,s.areaArr.length),"ss1"==e.areaArr[o].color&&(m=64,d=158,p=255),"ss2"==e.areaArr[o].color&&(m=103,d=194,p=58),"ss3"==e.areaArr[o].color&&(m=230,d=162,p=60),"ss4"==e.areaArr[o].color&&(m=245,d=108,p=108),"ss5"==e.areaArr[o].color&&(m=255,d=127,p=0),0==o?(u=!0,f=1e3):(u=!1,f=100),1==s.areaArr[o].shape)s.areaArr[o].circle=new qq.maps.Circle({center:s.areaArr[o].lat?new qq.maps.LatLng(s.areaArr[o].lat,s.areaArr[o].lng):s.center,clickable:!0,cursor:"auto",editable:u,radius:s.areaArr[o].radius,fillColor:new qq.maps.Color(m,d,p,.5),map:s.map,strokeColor:new qq.maps.Color(m,d,p,1),strokeDashStyle:"solid",strokeWeight:3,visible:!0,zIndex:f});else{for(h=[],v=0,y=e.areaArr[o].details.length;v<y;v++)h.push(new qq.maps.LatLng(e.areaArr[o].details[v].lat,e.areaArr[o].details[v].lng));console.log(h),s.areaArr[o].details=new qq.maps.Polygon({clickable:!0,cursor:"auto",editable:u,fillColor:new qq.maps.Color(m,d,p,.5),map:s.map,path:h,strokeColor:new qq.maps.Color(m,d,p,.5),strokeDashStyle:"solid",strokeWeight:3,visible:!0,zIndex:f})}qq.maps.event.addListener(s.areaArr[s.xz].circle,"click",(function(e){})),new qq.maps.Marker({position:new qq.maps.LatLng(l,i),draggable:!0,animation:qq.maps.MarkerAnimation.DROP,map:s.map}),qq.maps.event.addListener(s.areaArr[s.xz].circle,"radius_changed",(function(e){s.areaArr[s.xz].radius=Math.round(e.target.radius),console.log("半径"+e.target.radius)})),qq.maps.event.addListener(s.areaArr[s.xz].circle,"center_changed",(function(e){console.log("中心点"+e.target.center)})),qq.maps.event.addListener(s.areaArr[s.xz].details,"adjustNode",(function(e){console.log("多边形路径"+e.path.elems)})),qq.maps.event.addListener(s.areaArr[s.xz].details,"insertNode",(function(e){console.log("多边形路径"+e.path.elems)})),qq.maps.event.addListener(s.areaArr[s.xz].details,"removeNode",(function(e){console.log("多边形路径"+e.path.elems)}));case 19:case"end":return t.stop()}}),t)})))()},handleChange:function(e,t){var r=this;if("ss1"==this.areaArr[t].color)var a=64,s=158,l=255;if("ss2"==this.areaArr[t].color)a=103,s=194,l=58;if("ss3"==this.areaArr[t].color)a=230,s=162,l=60;if("ss4"==this.areaArr[t].color)a=245,s=108,l=108;if("ss5"==this.areaArr[t].color)a=255,s=127,l=0;2==e?(this.areaArr[t].circle.setMap(null),this.areaArr[t].details=new qq.maps.Polygon({clickable:!0,cursor:"auto",editable:!0,fillColor:new qq.maps.Color(a,s,l,.5),map:this.map,path:this.path,strokeColor:new qq.maps.Color(a,s,l,1),strokeDashStyle:"solid",strokeWeight:3,visible:!0,zIndex:1e3}),qq.maps.event.addListener(this.areaArr[t].details,"adjustNode",(function(e){console.log("多边形路径"+e.path.elems)})),qq.maps.event.addListener(this.areaArr[t].details,"insertNode",(function(e){console.log("多边形路径"+e.path.elems)})),qq.maps.event.addListener(this.areaArr[t].details,"removeNode",(function(e){console.log("多边形路径"+e.path.elems)}))):(this.areaArr[t].details.setMap(null),this.areaArr[t].circle=new qq.maps.Circle({center:this.center,clickable:!0,cursor:"auto",editable:!0,radius:2e3,fillColor:new qq.maps.Color(a,s,l,.5),map:this.map,strokeColor:new qq.maps.Color(a,s,l,1),strokeDashStyle:"solid",strokeWeight:3,visible:!0,zIndex:1e3}),qq.maps.event.addListener(this.areaArr[t].circle,"radius_changed",(function(e){r.areaArr[t].radius=Math.round(e.target.radius),console.log("半径"+e.target.radius)})),qq.maps.event.addListener(this.areaArr[t].circle,"center_changed",(function(e){console.log("中心点"+e.target.center)}))),console.log("q按钮"+e)},oncloseicon:function(e){this.xz=e,this.$set(this.areaArr[e],"selected",!0),console.log(this.areaArr[e]),2==this.areaArr[e].shape?this.areaArr[e].details.setOptions({editable:!0,zIndex:1e3}):this.areaArr[e].circle.setOptions({editable:!0,zIndex:1e3});for(var t=0;t<this.areaArr.length;t++)t!=e&&(2==this.areaArr[t].shape?this.areaArr[t].details.setOptions({editable:!1,zIndex:100}):this.areaArr[t].circle.setOptions({editable:!1,zIndex:100}))},radius:function(e,t){this.areaArr[t].circle.setRadius(+e)},submitForm:function(){var e=this;console.log(this.areaArr),this.$refs["form"].validate(function(){var t=Object(l["a"])(regeneratorRuntime.mark((function t(r){var a,s,l,n,o,c,m,d;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!r){t.next=12;break}if(console.log(123),e.form.ident="delivery","3"==e.form.type){for(a=[],s=0,l=e.areaArr.length;s<l;s++)if(1==e.areaArr[s].shape)a.push({shape:1,color:e.areaArr[s].color,lat:e.areaArr[s].circle.center.lat,lng:e.areaArr[s].circle.center.lng,radius:e.areaArr[s].radius,money:e.areaArr[s].money,startMoney:e.areaArr[s].startMoney,selected:e.areaArr[s].selected,timeArr:e.areaArr[s].timeArr});else{for(n=[],o=0,c=e.areaArr[s].details.path.elems.length;o<c;o++)n.push({lat:e.areaArr[s].details.path.elems[o].lat,lng:e.areaArr[s].details.path.elems[o].lng});a.push({shape:2,details:n,radius:0,money:e.areaArr[s].money,startMoney:e.areaArr[s].startMoney,color:e.areaArr[s].color,selected:e.areaArr[s].selected,timeArr:e.areaArr[s].timeArr})}e.form.areaArr=a}return t.next=6,Object(i["V"])(e.form);case 6:m=t.sent,d=m.msg,e.$baseMessage(d,"success"),e.initData(),t.next=13;break;case 12:return t.abrupt("return",!1);case 13:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())}}},c=o,m=(r("fd12"),r("2877")),d=Object(m["a"])(c,a,s,!1,null,"2212c084",null);t["default"]=d.exports},c740:function(e,t,r){"use strict";var a=r("23e7"),s=r("b727").findIndex,l=r("44d2"),i=r("ae40"),n="findIndex",o=!0,c=i(n);n in[]&&Array(1)[n]((function(){o=!1})),a({target:"Array",proto:!0,forced:o||!c},{findIndex:function(e){return s(this,e,arguments.length>1?arguments[1]:void 0)}}),l(n)},c888:function(e,t,r){},fd12:function(e,t,r){"use strict";var a=r("c888"),s=r.n(a);s.a}}]); |