12 |
- webpackJsonp([10],{"E+8h":function(e,t){},Tcp0:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=a("mvHQ"),n=a.n(l),r=a("l/JR"),o=a("t4zo"),s=a.n(o),i=a("uXZL"),c=a.n(i),u=function(e,t){var a={"M+":t.getMonth()+1,"d+":t.getDate(),"h+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds(),"q+":Math.floor((t.getMonth()+3)/3),S:t.getMilliseconds()};for(var l in/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length))),a)new RegExp("("+l+")").test(e)&&(e=e.replace(RegExp.$1,1===RegExp.$1.length?a[l]:("00"+a[l]).substr((""+a[l]).length)));return e},p={name:"ReportStatistics",data:function(){return{stime:{sum1:30,sum2:40,sum3:50,sum4:25},value1:"",startTime:"",dateMan:["",""],endTime:"",isActive:1,reqData:{begin:"2020-05-06",end:"2020-11-31"},tableData:[]}},created:function(){},mounted:function(){var e=new Date,t=new Date(new Date((new Date).toLocaleDateString()).getTime());this.reqData.begin=u("yyyy-MM-dd hh:mm:ss",t),this.reqData.end=u("yyyy-MM-dd hh:mm:ss",e),this.dateMan[0]=this.reqData.begin.split(" ")[0],this.dateMan[1]=this.reqData.end.split(" ")[0],console.log(this.dateMan),this.getDates()},methods:{getData:function(){var e=this,t=this.reqData;Object(r.i)(t).then(function(t){console.log(JSON.parse(JSON.parse(n()(t)).resultData).data);var a=JSON.parse(JSON.parse(n()(t)).resultData).data.ORDER[0].VEHICLE;e.tableData=a})},calculate:function(e,t){var a=(e/t).toString();return 0!=a.slice(0,1)?100:0==a.toString().slice(2,3)?a.toString().slice(3,4):a.slice(2,4)},idelence:function(e,t,a){console.log(e,t,a);var l=parseInt(e*t)/parseInt(a);return console.log(l),0!=l.toString().slice(0,1)?100:0==l.toString().slice(2,3)?l.toString().slice(3,4):l.toString().slice(2,4)},getDates:function(){var e=new Date,t=e.getMonth()+1;t<10&&(t="0"+t);var a=e.getDate(),l=e.getDate()+1;a<10&&(a="0"+a,l="0"+l),this.reqData.begin=e.getFullYear()+"-"+t+"-"+a+" 00:00:00",this.reqData.end=e.getFullYear()+"-"+t+"-"+l+" 23:59:59",this.getData()},getWeeks:function(){this.isActive=2;var e=new Date;e.setDate(e.getDate()-e.getDay()+1);var t=e.getFullYear()+"-"+(e.getMonth()+1)+"-"+e.getDate()+" 00:00:00";this.reqData.begin=t,this.reqData.end=u("yyyy-MM-dd hh:mm:ss",e),this.getData()},getMonths:function(){var e=new Date,t=e.getMonth(),a=e.getFullYear(),l=new Date(a,t,1);this.reqData.begin=u("yyyy-MM-dd hh:mm:ss",l),this.reqData.end=u("yyyy-MM-dd hh:mm:ss",e),this.getData()},serachDate:function(){console.log(this.dateMan),this.reqData.begin=this.dateMan[0]+" 00:00:00",this.reqData.end=this.dateMan[1]+" 23:59:59",this.getData()},goTo:function(){this.$router.push("/Alarm/RealTime")},getToday:function(){this.isActive=1,this.getDates()},getWeek:function(){this.isActive=2,this.getWeeks()},getMonth:function(){this.isActive=3,this.getMonths()},downlodTable:function(){var e=this;this.$confirm("是否需要导出xlsx文档, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){var t=e.reqData;t.export="1",Object(r.i)(t).then(function(t){e.$message({type:"success",message:"导出成功!"})})}).catch(function(){e.$message({type:"info",message:"已取消导出"})})},downFile:function(){var e=c.a.utils.table_to_book(document.querySelector("#userTableData2")),t=c.a.write(e,{bookType:"xlsx",bookSST:!0,type:"array"});try{s.a.saveAs(new Blob([t],{type:"application/octet-stream"}),"报表统计.xlsx")}catch(e){"undefined"!=typeof console&&console.log(e,t)}return t},cellStyle:function(e){e.row,e.column,e.rowIndex;return 0===e.columnIndex?"background:#103366":""}}},b={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"Report"},[a("div",{staticClass:"border_left_top border"}),e._v(" "),a("div",{staticClass:"border_top border"}),e._v(" "),a("div",{staticClass:"border_right_top border"}),e._v(" "),a("div",{staticClass:"border_left border"}),e._v(" "),a("div",{staticClass:"border_right border"}),e._v(" "),a("div",{staticClass:"border_left_bottom border"}),e._v(" "),a("div",{staticClass:"border_bottom border"}),e._v(" "),a("div",{staticClass:"border_right_bottom border"}),e._v(" "),a("el-button-group",{attrs:{id:"topButton2"}},[a("el-button",{class:{active2:1==e.isActive},attrs:{type:"primary"},on:{click:e.getToday}},[e._v("今日")]),e._v(" "),a("el-button",{class:{active:2==e.isActive},attrs:{type:"primary"},on:{click:e.getWeeks}},[e._v("本周")]),e._v(" "),a("el-button",{class:{active:3==e.isActive},attrs:{type:"primary"},on:{click:e.getMonth}},[e._v("本月")])],1),e._v(" "),[a("el-date-picker",{staticStyle:{"margin-bottom":"10px"},attrs:{type:"datetimerange","start-placeholder":"开始日期","end-placeholder":"结束日期","value-format":"yyyy-MM-dd","default-time":["00:00:00"]},on:{change:e.serachDate},model:{value:e.dateMan,callback:function(t){e.dateMan=t},expression:"dateMan"}})],e._v(" "),a("div",{staticClass:"downlodTable",on:{click:e.downlodTable}},[e._v("导出")]),e._v(" "),a("el-table",{staticStyle:{width:"100%",color:"#2daff5"},attrs:{data:e.tableData,id:"userTableData"}},[a("el-table-column",{attrs:{prop:"nickname",align:"center",label:"车辆名称",width:"200px"}}),e._v(" "),a("el-table-column",{attrs:{prop:"work_order_count",align:"center",label:"执行订单数"}}),e._v(" "),a("el-table-column",{attrs:{prop:"avg_execution_time",align:"center",label:"订单执行平均时长(S)"}}),e._v(" "),a("el-table-column",{attrs:{prop:"exception_times",align:"center",label:"车辆异常次数"}}),e._v(" "),a("el-table-column",{attrs:{prop:"failure_count",align:"center",label:"失败(异常)订单数"}}),e._v(" "),a("el-table-column",{attrs:{prop:"free_seconds",align:"center",label:"车辆空闲时间(S)"}}),e._v(" "),a("el-table-column",{attrs:{prop:"battery_use_cycles",align:"center",label:"充电次数"}})],1),e._v(" "),a("el-table",{directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"}],staticStyle:{color:"#2daff5"},attrs:{data:e.tableData,id:"userTableData2"}},[a("el-table-column",{attrs:{prop:"average_count",align:"center",label:"有效订单完成订单数"}}),e._v(" "),a("el-table-column",{attrs:{prop:"avg_execution_time",align:"center",label:"订单平均完成时间(单位秒)"}}),e._v(" "),a("el-table-column",{attrs:{prop:"avg_response_time",align:"center",label:"订单平均响应时间(单位秒)"}}),e._v(" "),a("el-table-column",{attrs:{prop:"battery_use_cycles",align:"center",label:"车辆电池循环次数"}}),e._v(" "),a("el-table-column",{attrs:{prop:"cancellation_count",align:"center",label:"取消订单数"}}),e._v(" "),a("el-table-column",{attrs:{prop:"charge_seconds",align:"center",label:"车辆充电时间(单位秒)"}}),e._v(" "),a("el-table-column",{attrs:{prop:"completion_count",align:"center",label:"订单完成总数"}}),e._v(" "),a("el-table-column",{attrs:{prop:"delete_count",align:"center",label:"删除订单数"}}),e._v(" "),a("el-table-column",{attrs:{prop:"exception_times",align:"center",label:"车辆异常次数"}}),e._v(" "),a("el-table-column",{attrs:{prop:"execution_count",align:"center",label:"正在执行订单数"}}),e._v(" "),a("el-table-column",{attrs:{prop:"failure_count",align:"center",label:"失败(异常)订单数"}}),e._v(" "),a("el-table-column",{attrs:{prop:"free_seconds",align:"center",label:"车辆空闲时间(单位秒)"}}),e._v(" "),a("el-table-column",{attrs:{prop:"group_by",align:"center",label:"统计维度"}}),e._v(" "),a("el-table-column",{attrs:{prop:"hang_count",align:"center",label:"挂起订单数"}}),e._v(" "),a("el-table-column",{attrs:{prop:"interval_time",align:"center",label:"统计时间范围(单位秒)"}}),e._v(" "),a("el-table-column",{attrs:{prop:"metrics_type",align:"center",label:"统计粒度"}}),e._v(" "),a("el-table-column",{attrs:{prop:"mileage",align:"center",label:"车辆运行里程数(单位千米)"}}),e._v(" "),a("el-table-column",{attrs:{prop:"nickname",align:"center",label:"车辆名称"}}),e._v(" "),a("el-table-column",{attrs:{prop:"online_seconds",align:"center",label:"车辆开机时间(单位秒)"}}),e._v(" "),a("el-table-column",{attrs:{prop:"pause_count",align:"center",label:"暂停订单数"}}),e._v(" "),a("el-table-column",{attrs:{prop:"queue_count",align:"center",label:"队列中订单数"}}),e._v(" "),a("el-table-column",{attrs:{prop:"response_count",align:"center",label:"有效订单响应订单数"}}),e._v(" "),a("el-table-column",{attrs:{prop:"statistics_time",align:"center",label:"统计时间"}}),e._v(" "),a("el-table-column",{attrs:{prop:"sys_completion_count",align:"center",label:"调度订单完成数"}}),e._v(" "),a("el-table-column",{attrs:{prop:"sys_order_count",align:"center",label:"执行调度订单数"}}),e._v(" "),a("el-table-column",{attrs:{prop:"vehicle_id",align:"center",label:"车辆Id编号"}}),e._v(" "),a("el-table-column",{attrs:{prop:"work_completion_count",align:"center",label:"工作订单完成数"}}),e._v(" "),a("el-table-column",{attrs:{prop:"work_order_count",align:"center",label:"执行工作订单数"}})],1)],2)},staticRenderFns:[]};var g=a("VU/8")(p,b,!1,function(e){a("E+8h"),a("XuFg")},"data-v-c9628920",null);t.default=g.exports},XuFg:function(e,t){}});
- //# sourceMappingURL=10.b809baf67a5d9b088042.js.map
|