webpackJsonp([26],{"3wP4":function(t,e){},V7NV:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=a("Xxa5"),i=a.n(n),o=a("mvHQ"),s=a.n(o),r=a("exGp"),d=a.n(r),c=a("vLgD");function u(t){return Object(c.a)({url:"/service/statistic/statisticsByMonth",method:"POST",data:t})}function l(t){return Object(c.a)({url:"/service/statistic/statisticsByDate",method:"POST",data:t})}function v(t){return Object(c.a)({url:"/service/statistic/init",method:"POST",data:t})}var m=a("TIfe"),p={name:"ReleaseCount",components:{},props:{},data:function(){return{topLoading:!1,activeName:"downloads",dateRange:null,parameterLoading:!1,loading:!1,startDate:null,endDate:null,downLoadInfoList:[],topList:[],countList:{getBurstEventNumber:0,getDataSetNumber:0,getFileInfoNumber:0,getPublishDataVolume:0,getTrigEventNumber:0,getVisitInfoNumber:0,getdownLoadCountOfDataSet:0,todayDataSetNumber:0,todayDownLoadCountOfDataSet:0,todayFileInfoNumber:0,todayPublishDataVolume:0,todayVisitInfoNumber:0},pickerOptions:{shortcuts:[{text:"最近一周",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-6048e5),t.$emit("pick",[a,e])}},{text:"最近一个月",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-2592e6),t.$emit("pick",[a,e])}},{text:"最近三个月",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-7776e6),t.$emit("pick",[a,e])}}]},downLoadMonth:[],viewMonth:[],sizeList:[],downLoadSum:0,downloadCount:0,visitCount:0}},watch:{dateRange:function(t){t&&t.length?(t[0]&&"string"!=typeof t[0]&&(this.startDate=this.time(t[0])),t[1]&&"string"!=typeof t[1]&&(this.endDate=this.time(t[1])),this.handleClick()):(this.startDate=null,this.endDate=null)}},created:function(){},mounted:function(){this.endDate=this.time(new Date,"lastMonth"),this.startDate=this.time(new Date,"lastYear"),this.dateRange=[this.startDate,this.endDate],console.log(this.startDate,this.endDate),this.handleClick(),this.getCount()},methods:{formatFileSize:function(t){var e="";if(!t)return"0B";var a=(e=t<102.4?t.toFixed(2)+"B":t<104857.6?(t/1024).toFixed(2)+"KB":t<107374182.4?(t/1048576).toFixed(2)+"MB":(t/1073741824).toFixed(2)+"GB")+"",n=a.indexOf(".");return"00"==a.substr(n+1,2)?a.substring(0,n)+a.substr(n+3,2):e},getCount:function(){var t=this;return d()(i.a.mark(function e(){var a,n,o;return i.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=t,t.parameterLoading=!0,n={webInfo:window.sessionStorage.getItem("webInfo")},e.prev=3,e.next=6,v(n);case 6:(o=e.sent).data&&(a.countList=JSON.parse(s()(o.data)),console.log(a.countList)),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(3),console.log(e.t0);case 13:t.parameterLoading=!1;case 14:case"end":return e.stop()}},e,t,[[3,10]])}))()},init:function(t){var e=this;return d()(i.a.mark(function a(){var n;return i.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return e.topLoading=!0,a.prev=1,a.next=4,l(t);case 4:(n=a.sent).downLoadInfoList?(e.topList=n.downLoadInfoList,e.downLoadSum=n.downLoadSum,e.downloadCount=n.downloadCount):n.visitInfoList&&(e.topList=n.visitInfoList,e.visitCount=n.visitCount),e.topLoading=!1,a.next=13;break;case 9:a.prev=9,a.t0=a.catch(1),console.log(a.t0),e.topLoading=!1;case 13:case"end":return a.stop()}},a,e,[[1,9]])}))()},handleDetail:function(t){var e=Object(m.a)(),a=Object(m.b)(),n=Object(m.c)();window.open("http://10.10.150.128:8080/satellitePub/pub/index.html?jsessionid="+e+"&cu="+a+"&userId="+n+"#/container/dataSetDetail?datasetId="+t)},MsgSort:function(t){return t.sort(function(t,e){var a=new Date(Date.parse(t.date.replace(/-/g,"/"))),n=new Date(Date.parse(e.date.replace(/-/g,"/")));return a.getTime()-n.getTime()}),t},handleClick:function(){var t=this;return d()(i.a.mark(function e(){var a,n,o,s,r,d,c,l,v,m,p,g,h,f,w,b,_,D;return i.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t.loading=!0,a=[],n=[],o=[],s=[],"downloads"!==t.activeName){e.next=21;break}return r={startTime:t.startDate,endTime:t.endDate,webInfo:window.sessionStorage.getItem("webInfo"),statisticsFlag:"downLoad"},t.init(r),e.prev=8,e.next=11,u(r);case 11:if(d=e.sent){for(v in c=[],l={},[],d)(l={}).date=v,l.downSum=d[v].downSum,l.downloadCount=d[v].downloadCount,c.push(l);t.MsgSort(c).map(function(t){o.push(t.date),a.push(t.downloadCount),n.push(t.downSum)}),m=t.$echarts.init(document.getElementById("echartsDraw")),p={tooltip:{trigger:"axis",axisPointer:{type:"cross",crossStyle:{color:"#999"}}},toolbox:{feature:{}},xAxis:[{type:"category",data:o,axisPointer:{type:"shadow"}}],yAxis:[{type:"value",name:"下载趋势",min:0,max:250,interval:50,axisLabel:{formatter:"{value}"}},{type:"value",name:"MB",min:0,max:25,interval:5,axisLabel:{formatter:"{value}"}}],dataZoom:[{show:!0}],series:[{type:"bar",data:a},{type:"line",yAxisIndex:1,data:n}]},m.setOption(p,!0)}e.next=18;break;case 15:e.prev=15,e.t0=e.catch(8),console.log(e.t0);case 18:t.loading=!1,e.next=34;break;case 21:return g={startTime:t.startDate,endTime:t.endDate,webInfo:window.sessionStorage.getItem("webInfo"),statisticsFlag:"visit"},t.init(g),e.prev=23,e.next=26,u(g);case 26:if(h=e.sent){for(b in f=[],w={},[],h)(w={}).date=b,w.visitCount=h[b].visitCount,f.push(w);t.MsgSort(f).map(function(t){s.push(t.date),a.push(t.visitCount)}),_=t.$echarts.init(document.getElementById("echartsDraw")),D={tooltip:{trigger:"axis",axisPointer:{type:"cross",crossStyle:{color:"#999"}}},xAxis:{type:"category",data:s},yAxis:[{type:"value",name:"访问趋势",min:0,max:250,interval:50,axisLabel:{formatter:"{value}"}}],dataZoom:[{show:!0}],series:[{data:a,type:"line",smooth:!0}]},_.setOption(D,!0)}e.next=33;break;case 30:e.prev=30,e.t1=e.catch(23),console.log(e.t1);case 33:t.loading=!1;case 34:case"end":return e.stop()}},e,t,[[8,15],[23,30]])}))()},time:function(t,e){var a,n;n=t.getMonth()+1,a="lastYear"===e?t.getFullYear()-1:t.getFullYear(),n=n<10?"0"+n:n;var i=t.getDate();i=i<10?"0"+i:i;var o=t.getHours();o=o<10?"0"+o:o;var s=t.getMinutes();s=s<10?"0"+s:s;var r=t.getSeconds();return a+"-"+n+"-"+i+" "+o+":"+s+":"+(r=r<10?"0"+r:r)},getLastYearYestdy:function(t){var e=t.getFullYear()-1,a=t.getDate(),n=t.getMonth()+1;return n<10&&(n="0"+n),a<10&&(a="0"+a),e+"-"+n+"-"+a}}},g={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"containerCount"},[a("div",{staticClass:"showEach"},[a("ul",{directives:[{name:"loading",rawName:"v-loading",value:t.parameterLoading,expression:"parameterLoading"}],staticClass:"ovfd"},[a("li",[a("h5",[t._v("发布数据集数量")]),t._v(" "),a("h4",[t._v(t._s(t.countList.getDataSetNumber))]),t._v(" "),a("p",[t._v("今日新增:"+t._s(t.countList.todayDataSetNumber))])]),t._v(" "),a("li",[a("h5",[t._v("发布文件数量")]),t._v(" "),a("h4",[t._v(t._s(t.countList.getFileInfoNumber))]),t._v(" "),a("p",[t._v("今日新增:"+t._s(t.countList.todayFileInfoNumber))])]),t._v(" "),a("li",[a("h5",[t._v("发布文件体量")]),t._v(" "),a("h4",[t._v(t._s(t.formatFileSize(t.countList.getPublishDataVolume)))]),t._v(" "),a("p",[t._v("今日新增:"+t._s(t.countList.todayPublishDataVolume))])]),t._v(" "),a("li",[a("h5",[t._v("下载量")]),t._v(" "),a("h4",[t._v(t._s(t.countList.getDownLoadCountOfDataSet))]),t._v(" "),a("p",[t._v("今日新增:"+t._s(t.countList.todayDownLoadCountOfDataSet))])]),t._v(" "),a("li",[a("h5",[t._v("访问量")]),t._v(" "),a("h4",[t._v(t._s(t.countList.getVisitInfoNumber))]),t._v(" "),a("p",[t._v("今日新增:"+t._s(t.countList.todayVisitInfoNumber))])])])]),t._v(" "),a("div",{staticClass:"con-content ovfd"},[a("div",{staticClass:"ovfd"},[a("div",{staticClass:"tabTurn"},[a("el-tabs",{on:{"tab-click":t.handleClick},model:{value:t.activeName,callback:function(e){t.activeName=e},expression:"activeName"}},[a("el-tab-pane",{attrs:{label:"下载量",name:"downloads"}}),t._v(" "),a("el-tab-pane",{attrs:{label:"访问量",name:"views"}})],1)],1),t._v(" "),a("div",{staticClass:"dateBox"},[a("div",{staticClass:"block"},[a("span",{staticClass:"demonstration"}),t._v(" "),a("el-date-picker",{attrs:{type:"daterange","range-separator":"至","start-placeholder":"StartDate","end-placeholder":"EndDate","unlink-panels":""},model:{value:t.dateRange,callback:function(e){t.dateRange=e},expression:"dateRange"}})],1)])]),t._v(" "),a("div",{staticStyle:{width:"100%",height:"aoto"}},[a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.topLoading,expression:"topLoading"}],staticClass:"countRight"},["downloads"==t.activeName?a("div",[a("p",[t._v("下载总体量   "+t._s(t.formatFileSize(t.downLoadSum))+"    下载总次数    "+t._s(t.downloadCount))])]):a("div",[a("p",[t._v("访问总量   "+t._s(t.visitCount))])])]),t._v(" "),t._m(0)])])])},staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"countLeft"},[e("div",{staticStyle:{width:"100%",height:"700px"},attrs:{id:"echartsDraw"}})])}]};var h=a("VU/8")(p,g,!1,function(t){a("3wP4")},"data-v-00a1d518",null);e.default=h.exports}});