1 line
8.8 KiB
JavaScript
1 line
8.8 KiB
JavaScript
|
|
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);ca
|