chunk-3584f290.f3a62a30.js 19 KB

12
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3584f290"],{"0fb6":function(e,t,r){},1208:function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("el-card",{staticClass:"mead-bike-map",staticStyle:{height:"100%"},attrs:{"body-style":e.cardBody},scopedSlots:e._u([{key:"header",fn:function(){return[r("content-header")]},proxy:!0}])},[r("div",{staticClass:"header-button"},[r("search-form",{ref:"searchForm",attrs:{fields:e.search}}),r("div",{staticClass:"selections"},[r("el-button",{attrs:{type:"success"},on:{click:function(t){e.superSearchDialogVisible=!0}}},[e._t("default",[e._v("高级搜索")])],2)],1)],1),r("el-dialog",{attrs:{title:"高级搜索",visible:e.superSearchDialogVisible,width:"30%"},on:{"update:visible":function(t){e.superSearchDialogVisible=t}}},[r("el-form",{ref:"superForm",staticClass:"demo-ruleForm",attrs:{model:e.superForm,rules:e.superFormRules,"label-width":"80px"}},[r("el-form-item",{attrs:{required:"",prop:"bike_no",label:"车辆编号"}},[r("el-input",{staticStyle:{width:"350px"},model:{value:e.superForm.bike_no,callback:function(t){e.$set(e.superForm,"bike_no",t)},expression:"superForm.bike_no"}})],1),r("el-form-item",{attrs:{required:"",prop:"time_between",label:"日期区间"}},[r("el-date-picker",{staticStyle:{width:"350px"},attrs:{"value-format":"yyyy-MM-dd HH:mm:ss",type:"datetimerange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期"},model:{value:e.superForm.time_between,callback:function(t){e.$set(e.superForm,"time_between",t)},expression:"superForm.time_between"}})],1)],1),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:function(t){e.superSearchDialogVisible=!1}}},[e._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.superSearch("superForm")}}},[e._v("确 定")])],1)],1),r("el-row",{staticStyle:{height:"calc(100% - 57px)",display:"flex"},attrs:{justify:"center"}},[r("div",{staticClass:"amap-page-container"},[r("el-amap",{staticClass:"amap-demo",attrs:{vid:"amap",plugin:e.plugin,center:e.center,"default-cursor":e.defaultCursor,zoom:e.zoom,"amap-manager":e.amapManager,events:e.events}},[r("el-amap-marker",{attrs:{position:e.startMark.position,events:e.startMark.events,visible:e.startMark.visible,draggable:e.startMark.draggable,icon:e.startMark.icon}}),e._l(e.pathMarks,function(t,n){return r("div",{key:n},[r("el-amap-marker",{attrs:{position:[t[0],t[1]],events:e.marker.events,visible:e.marker.visible,draggable:e.marker.draggable,vid:n}})],1)}),r("el-amap-marker",{attrs:{position:e.endMark.position,events:e.endMark.events,visible:e.endMark.visible,draggable:e.endMark.draggable,icon:e.endMark.icon}})],2)],1),r("div",{staticClass:"infos"},[r("el-card",{directives:[{name:"show",rawName:"v-show",value:e.dataNull,expression:"dataNull"}],staticClass:"item-row"},[r("div",{staticClass:"item-info",staticStyle:{color:"#909399",margin:"0 auto"}},[r("span",[e._v("暂无数据 ~~")])])]),e._l(e.orders,function(t,n){return r("div",{key:n,staticClass:"info-list"},[r("div",{staticStyle:{width:"100%"},on:{click:function(r){return e.rowClick(t,n)}}},[r("el-card",{staticClass:"item-row order-trajectory",class:{gary:1==t.isClick}},[r("div",{staticClass:"item-info"},[r("i",{staticClass:"el-icon-bicycle"},[e._v("车牌号:")]),r("span",[e._v(e._s(t.bike_no))])]),r("div",{staticClass:"item-info"},[r("i",{staticClass:"el-icon-document"},[e._v("订单号:")]),r("span",[e._v(e._s(t.no))])]),r("div",{staticClass:"item-info"},[r("i",{staticClass:"el-icon-document"},[e._v("用户昵称:")]),r("span",[e._v(e._s(t.nickname))])]),r("div",{staticClass:"item-info"},[r("i",{staticClass:"el-icon-document"},[e._v("订单状态:")]),r("span",[e._v(e._s(t.orders_status))])]),r("div",{staticClass:"item-info"},[r("i",{staticClass:"el-icon-phone"},[e._v("手机号:")]),r("span",[e._v(e._s(t.mobile))])]),r("div",{staticClass:"item-info"},[r("i",{staticClass:"el-icon-alarm-clock"},[e._v("订单开始时间:")]),r("span",[e._v(e._s(t.start_use_bike_time))])]),r("div",{staticClass:"item-info"},[r("i",{staticClass:"el-icon-alarm-clock"},[e._v("订单结束时间:")]),r("span",[e._v(e._s(t.end_use_bike_time))])])])],1)])})],2)])],1)},a=[],i=(r("7f7f"),r("386d"),r("ac6a"),r("5df3"),r("768b")),o=(r("96cf"),r("3b8d")),s=r("69d9"),l=r("323a"),c=r("4cc4"),u=r("b64d"),d=r("8f9b"),p=r.n(d),f={name:"Index",components:{SearchForm:s["a"]},data:function(){var e=new p.a.AMapManager;return{clickIn:"",search:[{type:"el-select",field:"area_id",label:"骑行区域",options:[{id:"",name:"全部"}]},{type:"el-select",field:"status",label:"订单状态",options:[{id:"",name:"全部"}]},{field:"nickname",label:"昵称"},{field:"mobile",label:"手机号"},{field:"no",label:"订单号"},{field:"bike_no",label:"车牌号"},{type:"el-select",field:"merchant_id",label:"商户",options:[{id:"",name:"全部"}]}],superForm:{bike_no:"",time_between:""},superFormRules:{bike_no:[{required:!0,message:"请输入车辆编号",trigger:"blur"}],time_between:[{required:!0,message:"请选择时间区间",trigger:"change"}]},orders:[],page:null,cardBody:{padding:"20px",height:"100%"},dataNull:!1,plugin:[{pName:"Geolocation",events:{init:function(e){e.getCurrentPosition(function(e,t){self.lng=113.73350255780726,self.lat=34.78024666564106,self.center=[self.lng,self.lat],self.loaded=!0,t&&t.position&&(self.lng=t.position.lng,self.lat=t.position.lat,self.center=[self.lng,self.lat],self.loaded=!0)})}}},{pName:"Scale",position:"RB",events:{init:function(e){}}},{pName:"ToolBar",events:{init:function(e){}}}],defaultCursor:"pointer",center:[121.59996,31.197646],zoom:12,amapManager:e,pathData:[],pathDataTimes:[],pathDataRoles:[],pathMarks:[],events:{init:function(e){}},marker:{position:[0,0],events:{click:function(){},dragend:function(e){}},visible:!0,draggable:!1},startMark:{position:[0,0],events:{click:function(){},dragend:function(e){}},visible:!0,draggable:!1,template:"<span>1</span>",icon:"http://resource.bike.hanyiyun.com/common/start-location-mark35px.png",icon1:"http://resource.bike.hanyiyun.com/common/markMinRoundPoint.png"},endMark:{position:[0,0],events:{click:function(){},dragend:function(e){}},visible:!0,draggable:!1,template:"<span>1</span>",icon:"http://resource.bike.hanyiyun.com/common/end-location-mark35px.png"},superSearchDialogVisible:!1}},watch:{$route:{handler:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t){var r,n,a,i;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(c["k"])(t.query);case 2:for(r=e.sent,n=r.data,a=n,i=0;i<a.length;i++)this.$set(a[i],"isClick",!1);a=a,this.orders=a,this.dataNull=!1,0==this.orders.length&&(this.dataNull=!0,this.$message("暂无数据"));case 10:case"end":return e.stop()}},e,this)}));function t(t){return e.apply(this,arguments)}return t}(),immediate:!0}},inject:["reload"],created:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(){var t,r,n,a,o,s,d;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([Object(u["b"])({all:1}),Object(c["h"])()]);case 2:if(t=e.sent,r=Object(i["a"])(t,2),n=r[0].data,a=r[1].data,this.search[0].options.push.apply(this.search[0].options,n),this.search[1].options.push.apply(this.search[1].options,a.order_status),"administrator"!==this.$store.state.users.user.roles[0]){e.next=17;break}return e.next=11,Promise.all([Object(l["c"])({all:1})]);case 11:o=e.sent,s=Object(i["a"])(o,1),d=s[0].data,this.search[6].options.push.apply(this.search[6].options,d.data),e.next=18;break;case 17:this.search.splice(6,1);case 18:case"end":return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}(),methods:{rowClick:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(t,r){var n,a,o,s,l,u,d,p;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:if(this.clickIn!==r){e.next=2;break}return e.abrupt("return");case 2:for(this.clickIn=r,n=this,a=0;a<this.orders.length;a++)this.orders[a].isClick=!1;return this.orders[r].isClick=!0,e.next=8,Promise.all([Object(c["e"])({order_id:t.id})]);case 8:o=e.sent,s=Object(i["a"])(o,1),l=s[0].data,u=l.orderLocations,this.pathDataTimes=l.locationsTimes,this.pathDataRoles=l.locations_role,0==u.length?(this.startMark.position=[0,0],this.endMark.position=[0,0],this.pathMarks=[],this.$message("此订单暂无轨迹"),window.pathSimplifierIns&&(pathSimplifierIns.setData([]),pathSimplifierIns.clearPathNavigators())):(this.startMark.position=u[0],this.endMark.position=u[u.length-1],d=parseInt(u.length/2),p=u[d],this.center=p,this.zoom=15,this.pathData=u,this.pathMarks=[],window.pathSimplifierIns&&(pathSimplifierIns.setData([]),pathSimplifierIns.clearPathNavigators()),AMapUI.load(["ui/misc/PathSimplifier"],function(e){e.supportCanvas?n.initPage(e):alert("当前环境不支持 Canvas!")}));case 15:case"end":return e.stop()}},e,this)}));function t(t,r){return e.apply(this,arguments)}return t}(),initPage:function(e){var t=this,r=new e({zIndex:100,map:this.amapManager._map,getPath:function(e,t){return e.path},getHoverTitle:function(e,r,n){return n>=0?"点:"+n+"/"+e.path.length+",时间:"+t.pathDataTimes[n]+",角色:"+t.pathDataRoles[n]:e.name+",点数量"+e.path.length},renderOptions:{pathLineStyle:{strokeStyle:"red",lineWidth:2,dirArrowStyle:!0},renderAllPointsIfNumberBelow:1e4}});r.renderLater([{delay:1e3}]),window.pathSimplifierIns=r,r.setData([{name:"轨迹",path:this.pathData}]);var n=r.createPathNavigator(0,{loop:!0,speed:500});n.start()},initPageBig:function(e,t,r){var n=new e({zIndex:100,map:this.amapManager._map,getPath:function(e,t){return e.path},getHoverTitle:function(e,t,n){return n>=0?e.name+",点:"+n+"/"+e.path.length+",时间:"+r[n]:e.name+",点数量"+e.path.length},renderOptions:{pathLineStyle:{strokeStyle:"transparent",lineWidth:2,dirArrowStyle:!0},pathLineHoverStyle:{disableIfSelected:!0},disableIfSelected:!0,renderAllPointsIfNumberBelow:1e3}});n.renderLater([{delay:1e3}]),window.pathSimplifierIns=n,n.setData([{name:"轨迹",path:t}]);var a=n.createPathNavigator(0,{loop:!0,speed:500});a.start()},initPageSmall:function(e,t,r){var n="red";n="user"==r?"blue":"worker"==r?"green":"red";var a=this,i=new e({zIndex:105,map:a.amapManager._map,getPath:function(e,t){return e.path},getHoverTitle:function(e,t,r){return null},renderOptions:{pathLineStyle:{strokeStyle:n,lineWidth:2,dirArrowStyle:!0},pathLineHoverStyle:{disableIfSelected:!0},disableIfSelected:!0,renderAllPointsIfNumberBelow:100}});i.setData([{name:"轨迹0",path:t}])},superSearch:function(e){var t=this,r=this;r.clickIn="",this.$refs[e].validate(function(e){if(!e)return console.log("error submit!!"),!1;Object(c["i"])(t.superForm).then(function(e){e.then(function(e){if(window.pathSimplifierIns&&(pathSimplifierIns.setData([]),pathSimplifierIns.clearPathNavigators()),t.orders=[],t.pathMarks=[],t.pathData=e.data.locations,t.pathDataTimes=e.data.locations_time,t.pathDataRoles=e.data.locations_role,t.pathMarks=e.data.marks,t.superSearchDialogVisible=!1,t.startMark.position=[0,0],t.endMark.position=[0,0],0===e.data.length)return t.startMark.position=[0,0],t.endMark.position=[0,0],t.pathMarks=[],void t.$message("暂无记录");t.orders=e.data.orders,AMapUI.load(["ui/misc/PathSimplifier"],function(e){e.supportCanvas?r.initPage(e):alert("当前环境不支持 Canvas!")})})})})}}},h=f,m=(r("c483"),r("2877")),b=Object(m["a"])(h,n,a,!1,null,"a96513f8",null);t["default"]=b.exports},"323a":function(e,t,r){"use strict";r.d(t,"e",function(){return a}),r.d(t,"f",function(){return i}),r.d(t,"a",function(){return o}),r.d(t,"c",function(){return s}),r.d(t,"d",function(){return l}),r.d(t,"b",function(){return c});var n=r("bf9a");function a(e){return n["b"].post("admin_merchants",e)}function i(e,t){return n["b"].put("admin_merchants/".concat(e),t)}function o(e){return n["b"].get("admin_merchants/".concat(e,"/edit"))}function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n["b"].get("admin_merchants",{params:e})}function l(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n["b"].get("admin_merchant_config/get",{params:e})}function c(e){return n["b"].post("admin_merchant_config/edit",e)}},"386d":function(e,t,r){"use strict";var n=r("cb7c"),a=r("83a1"),i=r("5f1b");r("214f")("search",1,function(e,t,r,o){return[function(r){var n=e(this),a=void 0==r?void 0:r[t];return void 0!==a?a.call(r,n):new RegExp(r)[t](String(n))},function(e){var t=o(r,e,this);if(t.done)return t.value;var s=n(e),l=String(this),c=s.lastIndex;a(c,0)||(s.lastIndex=0);var u=i(s,l);return a(s.lastIndex,c)||(s.lastIndex=c),null===u?-1:u.index}]})},"469f":function(e,t,r){r("6c1c"),r("1654"),e.exports=r("7d7b")},"4cc4":function(e,t,r){"use strict";r.d(t,"f",function(){return a}),r.d(t,"g",function(){return i}),r.d(t,"k",function(){return o}),r.d(t,"e",function(){return s}),r.d(t,"h",function(){return l}),r.d(t,"d",function(){return c}),r.d(t,"c",function(){return u}),r.d(t,"m",function(){return d}),r.d(t,"j",function(){return p}),r.d(t,"l",function(){return f}),r.d(t,"b",function(){return h}),r.d(t,"i",function(){return m}),r.d(t,"a",function(){return b}),r.d(t,"n",function(){return v});var n=r("bf9a");function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n["b"].get("orders",{params:e})}function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n["b"].get("orders/getByNo",{params:e})}function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n["b"].get("orders/orderLocationsearch",{params:e})}function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n["b"].get("orders/orderLocation",{params:e})}function l(){return n["b"].get("orders/orderStatus")}function c(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n["b"].get("orders/orderBikeOperate",{params:e})}function u(e){return n["b"].post("orders/closeLock",e)}function d(e){return n["b"].post("orders/settlement",e)}function p(e){return n["b"].post("orders/orderDetailPosition",e)}function f(e){return n["b"].post("orders/returnOrderMoney",e)}function h(e){return n["b"].post("orders/changeOrderRiding",e)}function m(e){return n["b"].post("bike/getTrajectory",e)}function b(e){return n["b"].post("orders/orderBikeContro",e)}function v(e,t){return n["b"].put("orders/".concat(e),t)}},"5d73":function(e,t,r){e.exports=r("469f")},"69d9":function(e,t,r){"use strict";r("8e6e"),r("456d"),r("7f7f"),r("ac6a");var n=r("bd86");function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(r,!0).forEach(function(t){Object(n["a"])(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(r).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var o,s,l={name:"SearchForm",data:function(){return{form:{},show:!0}},props:{fields:Array,resetCurrentPage:{type:Boolean,default:!0}},created:function(){this.initFormShow()},methods:{onSubmit:function(){var e=this,t=i({},this.$route.query);this.resetCurrentPage&&delete t.page,this.fields.forEach(function(r){var n=r.field,a=e.form[n];"string"===typeof a&&(a=a.trim()),""===a||void 0===a?delete t[n]:(t[n]=a,"time_between"===n&&(t[n]=null==a?a:[a[0],a[1]]))}),this.$router.push({path:this.$route.path,query:t})},dateFormat:function(e){var t=e.getFullYear()+"-"+this.p(e.getMonth()+1)+"-"+this.p(e.getDate()),r=this.p(e.getHours())+":"+this.p(e.getMinutes())+":"+this.p(e.getSeconds());return t+r},p:function(e){return e<10?"0"+e:e},onReset:function(){this.form={},this.onSubmit()},initFormShow:function(){var e=this;this.fields.some(function(t){if(e.$route.query[t.field])return e.show=!0,!0})},setFormValueFromQuery:function(){var e=this,t=this.$route.query;this.fields.forEach(function(r){var n=r.field,a=t[n];e.$set(e.form,n,a)})},toggleShow:function(){this.show=!this.show},getOffsetHeight:function(){var e=document.getElementById("div-searchForm"),t=e.clientWidth||e.offsetWidth;this.formHeight=t}},watch:{$route:{handler:function(){this.setFormValueFromQuery()},immediate:!0}},render:function(e){var t=this;return e("el-collapse-transition",[e("div",{directives:[{name:"show",value:this.show}]},[e("el-form",{attrs:{inline:!0},nativeOn:{keydown:function(e){return"button"in e||!t._k(e.keyCode,"enter",13,e.key,"Enter")?(e.preventDefault(),t.onSubmit(e)):null}}},[this.fields.map(function(r){var n;switch(r.type){case"el-select":n=e("el-select",{style:"width:150px;",attrs:{placeholder:r.label,filterable:!0,clearable:!0},model:{value:t.form[r.field],callback:function(e){t.$set(t.form,r.field,e)}}},[r.options.map(function(t){return e("el-option",{key:t.value||t.id,attrs:{label:t.label||t.name,value:String(t.value||t.id)}})})]);break;case"time-between":n=e("el-date-picker",{attrs:{type:"datetimerange","value-format":"yyyy-MM-dd HH:mm:ss","start-placeholder":r.label1,"end-placeholder":r.label2},model:{value:t.form[r.field],callback:function(e){t.$set(t.form,r.field,e)}}});break;case"super-input":n=e("el-input",{attrs:{placeholder:r.label,clearable:!0},model:{value:t.form[r.field],callback:function(e){t.$set(t.form,r.field,e)}}});break;default:n=e("el-input",{attrs:{placeholder:r.label,clearable:!0},model:{value:t.form[r.field],callback:function(e){t.$set(t.form,r.field,e)}}})}return e("el-form-item",{key:r.field},[n])}),e("el-form-item",{class:"actions"},[e("el-button",{attrs:{type:"primary"},on:{click:this.onSubmit}},["查询"]),e("el-button",{on:{click:this.onReset}},["重置"])])])])])}},c=l,u=(r("cafd"),r("2877")),d=Object(u["a"])(c,o,s,!1,null,"6dd66826",null);t["a"]=d.exports},"768b":function(e,t,r){"use strict";var n=r("a745"),a=r.n(n);function i(e){if(a()(e))return e}var o=r("5d73"),s=r.n(o);function l(e,t){var r=[],n=!0,a=!1,i=void 0;try{for(var o,l=s()(e);!(n=(o=l.next()).done);n=!0)if(r.push(o.value),t&&r.length===t)break}catch(c){a=!0,i=c}finally{try{n||null==l["return"]||l["return"]()}finally{if(a)throw i}}return r}function c(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function u(e,t){return i(e)||l(e,t)||c()}r.d(t,"a",function(){return u})},"7d7b":function(e,t,r){var n=r("e4ae"),a=r("7cd6");e.exports=r("584a").getIterator=function(e){var t=a(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return n(t.call(e))}},"83a1":function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e===1/t:e!=e&&t!=t}},b64d:function(e,t,r){"use strict";r.d(t,"b",function(){return a}),r.d(t,"c",function(){return i}),r.d(t,"d",function(){return o}),r.d(t,"e",function(){return s}),r.d(t,"a",function(){return l});var n=r("bf9a");function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n["b"].get("area",{params:e})}function i(e){return n["b"].get("area/".concat(e))}function o(e){return n["b"].post("area",e)}function s(e,t){return n["b"].put("area/".concat(e),t)}function l(e){return n["b"].get("area/".concat(e,"/edit"))}},c483:function(e,t,r){"use strict";var n=r("e7fe"),a=r.n(n);a.a},cafd:function(e,t,r){"use strict";var n=r("0fb6"),a=r.n(n);a.a},e7fe:function(e,t,r){}}]);
  2. //# sourceMappingURL=chunk-3584f290.f3a62a30.js.map