(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-c5e5fa26"],{"024d":function(t,a,e){"use strict";e.r(a);var r=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,format:"yyyy-MM-dd",type:"daterange",placement:"bottom-end"},on:{"on-change":t.changeDateRange}})],1),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"}})],1)},s=[],n=(e("a481"),e("c5f6"),e("ac6a"),e("3917")),i=e("c276"),o=e("313e"),u=e.n(o),d={data:function(){return{token:Object(i["h"])(),xAxisTimeData:[],allData:[],statusArr:[],statusData:[],dataStatusObj:[{}],colorArr:["#ff00ea","#9000ff","#2d8cf0","#1935be","#ff9900","#ffcc00","#ff4800"],dataColorArr:[],dateRange:["",""],optionsFuture:{disabledDate:function(t){return t&&t.valueOf()>Date.now()}}}},created:function(){var t=Object(i["b"])();this.dateRange[0]=t.starttime,this.dateRange[1]=t.endtime,this.getQuery()},methods:{getQuery:function(){var t=this,a=new FormData;a.append("access_token",this.token),a.append("start_time",this.dateRange[0]),a.append("end_time",this.dateRange[1]),Object(n["d"])(a).then((function(a){t.statusArr=[],t.statusData=[],t.dataStatusObj=[{}];var e=a.data.data;t.xAxisTimeData=[],a.data.ret.forEach((function(a){t.statusData.push({status:a,data:[]}),a=t.$t("ret_status")+" "+a,t.statusArr.push(a),t.dataStatusObj.push({})})),e.forEach((function(a){t.xAxisTimeData.push(a.time);var e=function(e){t.statusData.forEach((function(t){Number(e)===t.status&&t.data.push(a[e])}))};for(var r in a)e(r)})),t.statusArr.forEach((function(a,e){a===t.$t("ret_status")+" 200"?t.dataColorArr.push("#139554"):a===t.$t("ret_status")+" 400"?t.dataColorArr.push("#ff0000"):t.dataColorArr.push(t.colorArr[e]),t.statusData.forEach((function(r){Number(a.replace(/[^0-9]/gi,""))===r.status&&(t.dataStatusObj[e].data=r.data)})),t.dataStatusObj[e].name=a,t.dataStatusObj[e].smooth=!0,t.dataStatusObj[e].areaStyle={},t.dataStatusObj[e].stack=t.$t("total")})),t.dataStatusObj.forEach((function(t){t.type="line"})),t.createEchars()}))},changeDateRange:function(t){this.dateRange=[t[0]+" 00:00:00",t[1]+" 23:59:59"]},createEchars:function(){var t=u.a.init(this.$refs.myChart),a={title:{text:this.$t("API_traffic_statistics")},tooltip:{trigger:"axis",axisPointer:{type:"cross",label:{backgroundColor:"#6a7985"}}},legend:{right:"10%",data:this.statusArr},toolbox:{feature:{saveAsImage:{}}},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:[{type:"category",boundaryGap:!1,data:this.xAxisTimeData}],yAxis:[{type:"value"}],series:this.dataStatusObj,color:this.dataColorArr};t.setOption(a),window.addEventListener("resize",(function(){t.resize()}))}}},c=d,f=(e("7f60"),e("2877")),p=Object(f["a"])(c,r,s,!1,null,"1fd6a8d0",null);a["default"]=p.exports},3917:function(t,a,e){"use strict";e.d(a,"e",(function(){return s})),e.d(a,"c",(function(){return n})),e.d(a,"d",(function(){return i})),e.d(a,"a",(function(){return o})),e.d(a,"b",(function(){return u}));var r=e("66df"),s=function(t){return r["a"].request({method:"post",url:"api/admin.php?service=Admin.User.GetLoginStatistics",data:t})},n=function(t){return r["a"].request({method:"post",url:"api/admin.php?service=Admin.User.GetDataFlow",data:t})},i=function(t){return r["a"].request({method:"post",url:"api/admin.php?service=Admin.Index.GetDataFlow",data:t})},o=function(t){return r["a"].request({method:"post",url:"api/admin.php?service=Admin.StatReport.GetAppDailyStatReport",data:t})},u=function(t){return r["a"].request({method:"post",url:"api/admin.php?service=Admin.StatReport.GetAppStatReport",data:t})}},"7f60":function(t,a,e){"use strict";var r=e("fdfb"),s=e.n(r);s.a},fdfb:function(t,a,e){}}]);