1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-ec3044ba"],{"365c":function(e,t,a){"use strict";a.d(t,"b",(function(){return n})),a.d(t,"a",(function(){return s}));var r=a("b775"),n=function(e){return Object(r["a"])({url:"/data/index",method:"get",params:e})},s=function(e){return Object(r["a"])({url:"/data/getArticleRead",method:"get",params:e})}},5241:function(e,t,a){"use strict";a("b72e")},b72e:function(e,t,a){},c553:function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("div",{staticClass:"rank"},[e._v("数据排名")]),a("el-table",{ref:"allTable",staticStyle:{width:"100%","max-height":"480px",overflow:"auto"},attrs:{border:"",data:e.list,height:"480"},on:{"sort-change":e.toSort}},[a("el-table-column",{attrs:{label:"排名",type:"index",align:"center",width:"60",index:function(t){return e.params.page_size*(e.params.page_index-1)+t+1}}}),a("el-table-column",{attrs:{label:"期数",prop:"stage",align:"center",width:"120"}}),a("el-table-column",{attrs:{label:"标题",prop:"title",align:"center","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"播放量",prop:"read",align:"center",sortable:"custom",width:"120"}}),a("el-table-column",{attrs:{label:"点赞量",prop:"like",align:"center",sortable:"custom",width:"120"}}),a("el-table-column",{attrs:{label:"分享量",prop:"share",align:"center",sortable:"custom",width:"120"}})],1),a("div",{staticClass:"batch-container"},[a("el-pagination",{attrs:{total:e.totalPage,"current-page":e.params.page_index,"page-sizes":[10,15,20,30,100],"page-size":e.params.page_size,layout:"total, sizes, prev, pager, next, jumper"},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1)],1)},n=[],s=a("1da1"),i=(a("96cf"),a("365c")),l={data:function(){return{list:[],params:{page_index:1,page_size:10,type:"read",sort:"desc"},totalPage:0}},created:function(){this.getList()},methods:{getList:function(){var e=this;return Object(s["a"])(regeneratorRuntime.mark((function t(){var a,r,n,s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(i["a"])(e.params);case 2:a=t.sent;try{r=a.msg,n=a.status_code,s=a.data,200===n?(e.list=s.list,e.totalPage=s.total):e.$message.error(r||"获取数据失败")}catch(l){e.$message.error(l||"获取数据失败")}case 4:case"end":return t.stop()}}),t)})))()},toSort:function(e){var t=e.prop,a=e.order;this.params.type=t,this.params.sort="ascending"===a?"asc":"desc",this.getList()},handleSizeChange:function(e){this.params.page_size=e,this.getList()},handleCurrentChange:function(e){this.params.page_index=e,this.getList()}}},o=l,c=(a("5241"),a("2877")),u=Object(c["a"])(o,r,n,!1,null,"bbfa6e4e",null);t["default"]=u.exports}}]);
|