(window.webpackJsonp=window.webpackJsonp||[]).push([[159],{"9YGm":function(h,c,e){h.exports={bg:"bg___1bAP4",header:"header___1lG6Z",line:"line___2EDvV",main:"main___25tDY",row:"row___1OWn9"}},e2kQ:function(h,c,e){"use strict";e.r(c);var V=e("g9YV"),v=e("wCAj"),Z=e("5Dmo"),D=e("3S7+"),C=e("WmNS"),P=e.n(C),I=e("9og8"),l=e("tJVT"),x=e("PpiC"),o=e("q1tI"),a=e.n(o),B=e("Ty5D"),T=e("9kvl"),L=e("wd/R"),S=e.n(L),W=e("9YGm"),i=e.n(W),j=e("HBuW"),A=function(s){var g=s.shixunsDetail,p=s.globalSetting,$=s.user,X=s.dispatch,q=Object(x.a)(s,["shixunsDetail","globalSetting","user","dispatch"]),d=Object(B.m)(),K=Object(o.useState)(!0),O=Object(l.a)(K,2),F=O[0],U=O[1],N=Object(o.useState)(),f=Object(l.a)(N,2),Y=f[0],k=f[1],w=Object(o.useState)([]),y=Object(l.a)(w,2),z=y[0],G=y[1],J=Object(o.useState)({id:null,page:1,limit:10}),M=Object(l.a)(J,2),_=M[0],R=M[1];Object(o.useEffect)(function(){if(!d.id)return;_.id=d.id,R(_),b(_)},[d.id]);var b=function(){var n=Object(I.a)(P.a.mark(function t(E){var r;return P.a.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,Object(j.Q)(E);case 2:r=u.sent,U(!0),setTimeout(function(){(r==null?void 0:r.shixuns)&&(G(r.shixuns||[]),k(r.total_count),U(!1))},0);case 5:case"end":return u.stop()}},t)}));return function(E){return n.apply(this,arguments)}}(),H=function(t){_.page=t,R(_),b(_)},Q=[{title:"\u5E8F\u53F7",dataIndex:"index",key:"index",render:function(t,E,r){return _.limit*(_.page-1)+r+1}},{title:"\u590D\u5236\u8005",ellipsis:!0,dataIndex:"username",key:"username"},{title:"\u540D\u79F0",ellipsis:!0,width:300,dataIndex:"name",key:"name",render:function(t){return a.a.createElement(D.a,{title:t},a.a.createElement("span",null,t))}},{title:"\u5B66\u6821/\u5355\u4F4D",ellipsis:!0,dataIndex:"school_name",key:"school_name",render:function(t,E){return t==="***"?a.a.createElement(D.a,{title:"\u672C\u5355\u4F4D\u4E0D\u5BF9\u5916\u516C\u5F00"},a.a.createElement("span",null,t)):t}},{title:"\u590D\u5236\u65F6\u95F4",dataIndex:"created_at",key:"created_at",render:function(t){return S()(t).format("YYYY-MM-DD HH:mm")}},{title:"\u64CD\u4F5C",dataIndex:"identifier",key:"identifier",render:function(t){return a.a.createElement("a",{href:"/shixuns/".concat(t,"/challenges")},"\u67E5\u770B\u8BE6\u60C5")}}];return a.a.createElement("section",{className:i.a.bg},a.a.createElement("header",{className:i.a.header},a.a.createElement("span",{className:"ml10"},"\u5B9E\u8DF5\u9879\u76EE\u590D\u5236\u5217\u8868"),a.a.createElement("a",{className:"mr10",href:"/shixuns/".concat(d.id,"/challenges")},"\u8FD4\u56DE")),a.a.createElement("div",{className:i.a.line}),a.a.createElement("main",{className:i.a.main},a.a.createElement(v.a,{loading:F,dataSource:z,rowKey:function(t){return t.id},columns:Q,rowClassName:i.a.row,bordered:!1,pagination:{pageSize:10,total:Y,current:_.page,onChange:H,showQuickJumper:!0,position:["bottomCenter"]}})))};c.default=Object(T.a)(function(m){var s=m.shixunsDetail,g=m.globalSetting,p=m.user;return{shixunsDetail:s,globalSetting:g,user:p}})(A)}}]);
