(window.webpackJsonp=window.webpackJsonp||[]).push([[72],{"9Bz6":function(N,g,t){"use strict";t.r(g);var $=t("DjyN"),j=t("NUBc"),V=t("g9YV"),A=t("wCAj"),G=t("5Dmo"),O=t("3S7+"),T=t("WmNS"),c=t.n(T),h=t("9og8"),S=t("k1fw"),E=t("tJVT"),s=t("q1tI"),_=t.n(s),x=t("5bA4"),B=t("wd/R"),y=t.n(B),D=t("Ty5D"),L=t("9kvl"),U=t("ErOA"),W=t("mgmH");y.a.locale("zh-cn");var f=[{id:"exercise_score",name:"\u8BD5\u5377\u6210\u7EE9"},{id:"shixun_work_list",name:"\u5B9E\u8BAD\u4F5C\u4E1A\u6210\u7EE9"},{id:"normal_work_list",name:"\u666E\u901A\u4F5C\u4E1A\u6210\u7EE9"},{id:"group_work_list",name:"\u5206\u7EC4\u4F5C\u4E1A\u6210\u7EE9"},{id:"course_total_score",name:"\u8BFE\u5802\u603B\u6210\u7EE9"},{id:"course_total_homework",name:"\u8BFE\u5802\u4F5C\u4E1A\u6210\u7EE9"},{id:"course_total_exercise_and_other",name:"\u8BFE\u5802\u8BD5\u5377\u6210\u7EE9"},{id:"course_member_act_score",name:"\u8BFE\u5802\u6D3B\u8DC3\u5EA6"},{id:"mooc_records",name:"\u7B2C\u4E09\u65B9\u6155\u8BFE"}],v=[{id:"failed",name:"\u5931\u8D25"},{id:"running",name:"\u6267\u884C\u4E2D"},{id:"finished",name:"\u5B8C\u6210"}],K=function(l){var d,Q=l.globalSetting,X=l.loading,Z=l.dispatch,z=Object(s.useState)(Object(S.a)({},Object(D.m)())),M=Object(E.a)(z,2),u=M[0],q=M[1],w=Object(s.useState)(),R=Object(E.a)(w,2),r=R[0],b=R[1],Y=Object(s.useState)(1),I=Object(E.a)(Y,2),H=I[0],k=I[1],F=Object(D.k)(),C=u==null||((d=u.type)===null||d===void 0)?void 0:d.split(",");Object(s.useEffect)(function(){function n(){return a.apply(this,arguments)}function a(){return a=Object(h.a)(c.a.mark(function e(){var o;return c.a.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,Object(U.a)("/api/courses/".concat(u.coursesId,"/export_records.json"),{method:"get",params:{page:1,per_page:10,export_types:C}});case 2:o=i.sent,o&&b(o);case 4:case"end":return i.stop()}},e)})),a.apply(this,arguments)}n()},[]);var J=[{title:"\u6587\u4EF6\u540D",dataIndex:"filename",ellipsis:!0,width:"30%",render:function(a,e,o){return _.a.createElement(O.a,{title:a},_.a.createElement("span",null,a||(e==null?void 0:e.preview_filename)))}},{title:"\u7C7B\u578B",dataIndex:"export_type",ellipsis:!0,render:function(a){return f==null?void 0:f.map(function(e){if(a===(e==null?void 0:e.id))return _.a.createElement(O.a,{title:e.name},_.a.createElement("span",null,e.name))})}},{title:"\u72B6\u6001",dataIndex:"status",ellipsis:!0,render:function(a){return v==null?void 0:v.map(function(e){if(a===(e==null?void 0:e.id))return e.name})}},{title:"\u5BFC\u51FA\u4EBA",dataIndex:"user",ellipsis:!0,render:function(a){return a==null?void 0:a.real_name}},{title:"\u4E0B\u8F7D\u6B21\u6570",dataIndex:"downloads"},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"created_at",width:"20%",render:function(a){return y()(a).format("YYYY-MM-DD HH:mm:ss")}},{title:"\u64CD\u4F5C",ellipsis:!0,render:function(a,e,o){return _.a.createElement("span",{style:{cursor:"pointer",color:"#4cacff"},onClick:function(){Object(W.p)({id:e==null?void 0:e.id})}},(e==null?void 0:e.status)==="finished"?"\u4E0B\u8F7D":"")}}].filter(function(n){return!!n});return _.a.createElement("div",{style:{background:"#fff"}},_.a.createElement("span",{style:{fontSize:"16px",height:"40px",display:"flex",background:"#fff",padding:"10px 20px"}},_.a.createElement(x.a,{onClick:function(){F.goBack()},style:{marginTop:"4px",cursor:"pointer",marginRight:"5px"}})," \u5BFC\u51FA\u5217\u8868"),_.a.createElement("p",{style:{background:"#fff"}},_.a.createElement(A.a,{columns:J,dataSource:r==null?void 0:r.export_records,pagination:!1})),_.a.createElement(j.a,{hideOnSinglePage:!0,pageSize:10,showSizeChanger:!1,onChange:function(){var n=Object(h.a)(c.a.mark(function a(e,o){var m;return c.a.wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return k(e),p.next=3,Object(U.a)("/api/courses/".concat(u.coursesId,"/export_records.json"),{method:"get",params:{page:e,per_page:10,export_types:C}});case 3:m=p.sent,m&&b(m);case 5:case"end":return p.stop()}},a)}));return function(a,e){return n.apply(this,arguments)}}(),style:{textAlign:"center"},current:H,total:r==null?void 0:r.total_count}))};g.default=Object(L.a)(function(P){var l=P.loading,d=P.globalSetting;return{globalSetting:d,loading:l}})(K)}}]);
