(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-a5a5d3e0"],{1516:function(t,a,e){},"21ee":function(t,a,e){"use strict";var i=e("1516"),n=e.n(i);n.a},3917:function(t,a,e){"use strict";e.d(a,"e",(function(){return n})),e.d(a,"c",(function(){return s})),e.d(a,"d",(function(){return r})),e.d(a,"a",(function(){return p})),e.d(a,"b",(function(){return o}));var i=e("66df"),n=function(t){return i["a"].request({method:"post",url:"api/admin.php?service=Admin.User.GetLoginStatistics",data:t})},s=function(t){return i["a"].request({method:"post",url:"api/admin.php?service=Admin.User.GetDataFlow",data:t})},r=function(t){return i["a"].request({method:"post",url:"api/admin.php?service=Admin.Index.GetDataFlow",data:t})},p=function(t){return i["a"].request({method:"post",url:"api/admin.php?service=Admin.StatReport.GetAppDailyStatReport",data:t})},o=function(t){return i["a"].request({method:"post",url:"api/admin.php?service=Admin.StatReport.GetAppStatReport",data:t})}},"76da":function(t,a,e){"use strict";e.r(a);var i=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"portStats"},[e("Row",{staticClass:"portStats__query"},[e("span",[t._v(t._s(t.$t("date"))+"：")]),e("Col",[e("DatePicker",{staticStyle:{width:"400px"},attrs:{value:t.dateRange,options:t.optionsFuture,type:"daterange",placement:"bottom-end"},on:{"on-change":t.changeDateRange}})],1),e("span",{staticStyle:{"margin-left":"30px"}},[t._v(t._s(t.$t("app_key"))+"：")]),e("Input",{staticStyle:{width:"250px"},attrs:{clearable:"",placeholder:t.$t("statAppKey_tip")},model:{value:t.statAppKey,callback:function(a){t.statAppKey=a},expression:"statAppKey"}}),e("Button",{staticClass:"portStats__query__btn",attrs:{type:"primary"},on:{click:t.getQuery}},[t._v(t._s(t.$t("refresh")))])],1),e("div",{ref:"myChart",style:{width:"100%",height:"400px"},attrs:{id:"my_chart"}}),e("Table",{staticClass:"portStats__tab",attrs:{border:"",width:"80%",columns:t.columnsList,data:t.appData,loading:t.appLoad}})],1)},n=[],s=(e("ac6a"),e("3917")),r=e("c276"),p=e("313e"),o=e.n(p),c={data:function(){return{token:Object(r["h"])(),appLoad:!1,xAxisTimeData:[],allData:[],appData:[],dateRange:["",""],statAppKey:"",columnsList:[{title:this.$t("date"),key:"stat_day",align:"center"},{title:this.$t("app_key"),key:"app_key",align:"center"},{title:this.$t("API_traffic_statistics"),key:"api_request_times",align:"center"},{title:this.$t("active_app_num"),key:"app_key_visit",align:"center"},{title:this.$t("UV"),key:"user_visit",align:"center"},{title:this.$t("total_app_num"),key:"total_app",align:"center"},{title:this.$t("total_user_num"),key:"total_user",align:"center"},{title:this.$t("total_order_num"),key:"total_order",align:"center"}],optionsFuture:{disabledDate:function(t){return t&&t.valueOf()>Date.now()}}}},created:function(){var t=Object(r["b"])();this.dateRange[0]=t.starttime,this.dateRange[1]=t.endtime,this.getQuery()},mounted:function(){},methods:{getQuery:function(){var t=this;this.appLoad=!0;var a=new FormData;a.append("access_token",this.token),a.append("stat_app_key",this.statAppKey),console.log(this.dateRange),a.append("start_day",this.dateRange[0]),a.append("end_day",this.dateRange[1]),Object(s["b"])(a).then((function(a){t.appData=a.data.report,t.xAxisTimeData=[],t.allData=[],t.appLoad=!1,t.appData.forEach((function(a){t.xAxisTimeData.push(a.stat_day),t.allData.push(a.api_request_times)})),t.createEchars()}))},changeDateRange:function(t){this.dateRange=[t[0]+" 00:00:00",t[1]+" 23:59:59"]},createEchars:function(){var t=o.a.init(this.$refs.myChart),a={title:{text:this.$t("statistics_app")},tooltip:{trigger:"axis"},legend:{right:"20%",data:[this.$t("API_traffic_statistics")]},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},toolbox:{feature:{dataZoom:{yAxisIndex:"none"},dataView:{readOnly:!1},magicType:{type:["line","bar"]},restore:{},saveAsImage:{}}},xAxis:{type:"category",boundaryGap:!1,data:this.xAxisTimeData},yAxis:{type:"value"},series:[{name:this.$t("API_traffic_statistics"),type:"line",data:this.allData,markPoint:{data:[{type:"max",name:this.$t("max_value")},{type:"min",name:this.$t("min_value")}]},markLine:{data:[{type:"average",name:this.$t("agv_value")}]}}]};t.setOption(a),window.addEventListener("resize",(function(){t.resize()}))}}},d=c,u=(e("21ee"),e("2877")),l=Object(u["a"])(d,i,n,!1,null,"0120f89a",null);a["default"]=l.exports}}]);