You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
10 KiB
2 lines
10 KiB
(window.webpackJsonp=window.webpackJsonp||[]).push([[70],{"9Bz6":function(lt,$,c){"use strict";c.r($);var ct=c("DjyN"),et=c("NUBc"),_t=c("g9YV"),rt=c("wCAj"),dt=c("5Dmo"),J=c("3S7+"),F=c("9og8"),nt=c("k1fw"),N=c("tJVT"),T=c("q1tI"),v=c.n(T),ot=c("5bA4"),at=c("wd/R"),V=c.n(at),Q=c("Ty5D"),it=c("9kvl"),X=c("ErOA"),ut=c("mgmH");function j(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */j=function(){return d};var d={},L=Object.prototype,p=L.hasOwnProperty,K=typeof Symbol=="function"?Symbol:{},C=K.iterator||"@@iterator",Z=K.asyncIterator||"@@asyncIterator",A=K.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(r,n,o){return r[n]=o}}function b(e,t,r,n){var o=t&&t.prototype instanceof S?t:S,a=Object.create(o.prototype),l=new i(n||[]);return a._invoke=function(y,P,u){var _="suspendedStart";return function(w,q){if(_==="executing")throw new Error("Generator is already running");if(_==="completed"){if(w==="throw")throw q;return M()}for(u.method=w,u.arg=q;;){var tt=u.delegate;if(tt){var H=k(tt,u);if(H){if(H===m)continue;return H}}if(u.method==="next")u.sent=u._sent=u.arg;else if(u.method==="throw"){if(_==="suspendedStart")throw _="completed",u.arg;u.dispatchException(u.arg)}else u.method==="return"&&u.abrupt("return",u.arg);_="executing";var W=x(y,P,u);if(W.type==="normal"){if(_=u.done?"completed":"suspendedYield",W.arg===m)continue;return{value:W.arg,done:u.done}}W.type==="throw"&&(_="completed",u.method="throw",u.arg=W.arg)}}}(e,r,l),a}function x(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(n){return{type:"throw",arg:n}}}d.wrap=b;var m={};function S(){}function g(){}function E(){}var B={};f(B,C,function(){return this});var U=Object.getPrototypeOf,I=U&&U(U(O([])));I&&I!==L&&p.call(I,C)&&(B=I);var D=E.prototype=S.prototype=Object.create(B);function G(e){["next","throw","return"].forEach(function(t){f(e,t,function(r){return this._invoke(t,r)})})}function R(e,t){function r(o,a,l,y){var P=x(e[o],e,a);if(P.type!=="throw"){var u=P.arg,_=u.value;return _&&typeof _=="object"&&p.call(_,"__await")?t.resolve(_.__await).then(function(w){r("next",w,l,y)},function(w){r("throw",w,l,y)}):t.resolve(_).then(function(w){u.value=w,l(u)},function(w){return r("throw",w,l,y)})}y(P.arg)}var n;this._invoke=function(o,a){function l(){return new t(function(y,P){r(o,a,y,P)})}return n=n?n.then(l,l):l()}}function k(e,t){var r=e.iterator[t.method];if(r===void 0){if(t.delegate=null,t.method==="throw"){if(e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),t.method==="throw"))return m;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var n=x(r,e.iterator,t.arg);if(n.type==="throw")return t.method="throw",t.arg=n.arg,t.delegate=null,m;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,t.method!=="return"&&(t.method="next",t.arg=void 0),t.delegate=null,m):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,m)}function h(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function s(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function i(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(h,this),this.reset(!0)}function O(e){if(e){var t=e[C];if(t)return t.call(e);if(typeof e.next=="function")return e;if(!isNaN(e.length)){var r=-1,n=function o(){for(;++r<e.length;)if(p.call(e,r))return o.value=e[r],o.done=!1,o;return o.value=void 0,o.done=!0,o};return n.next=n}}return{next:M}}function M(){return{value:void 0,done:!0}}return g.prototype=E,f(D,"constructor",E),f(E,"constructor",g),g.displayName=f(E,A,"GeneratorFunction"),d.isGeneratorFunction=function(e){var t=typeof e=="function"&&e.constructor;return!!t&&(t===g||(t.displayName||t.name)==="GeneratorFunction")},d.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,E):(e.__proto__=E,f(e,A,"GeneratorFunction")),e.prototype=Object.create(D),e},d.awrap=function(e){return{__await:e}},G(R.prototype),f(R.prototype,Z,function(){return this}),d.AsyncIterator=R,d.async=function(e,t,r,n,o){o===void 0&&(o=Promise);var a=new R(b(e,t,r,n),o);return d.isGeneratorFunction(t)?a:a.next().then(function(l){return l.done?l.value:a.next()})},G(D),f(D,A,"Generator"),f(D,C,function(){return this}),f(D,"toString",function(){return"[object Generator]"}),d.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function n(){for(;t.length;){var o=t.pop();if(o in e)return n.value=o,n.done=!1,n}return n.done=!0,n}},d.values=O,i.prototype={constructor:i,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(s),!t)for(var r in this)r.charAt(0)==="t"&&p.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if(t.type==="throw")throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(u,_){return l.type="throw",l.arg=t,r.next=u,_&&(r.method="next",r.arg=void 0),!!_}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],l=a.completion;if(a.tryLoc==="root")return n("end");if(a.tryLoc<=this.prev){var y=p.call(a,"catchLoc"),P=p.call(a,"finallyLoc");if(y&&P){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(y){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!P)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,r){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&p.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&(t==="break"||t==="continue")&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var l=a?a.completion:{};return l.type=t,l.arg=r,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(l)},complete:function(t,r){if(t.type==="throw")throw t.arg;return t.type==="break"||t.type==="continue"?this.next=t.arg:t.type==="return"?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):t.type==="normal"&&r&&(this.next=r),m},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),s(n),m}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var o=n.completion;if(o.type==="throw"){var a=o.arg;s(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:O(t),resultName:r,nextLoc:n},this.method==="next"&&(this.arg=void 0),m}},d}V.a.locale("zh-cn");var Y=[{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"}],z=[{id:"failed",name:"\u5931\u8D25"},{id:"running",name:"\u6267\u884C\u4E2D"},{id:"finished",name:"\u5B8C\u6210"}],st=function(L){var p,K=L.globalSetting,C=L.loading,Z=L.dispatch,A=Object(T.useState)(Object(nt.a)({},Object(Q.m)())),f=Object(N.a)(A,2),b=f[0],x=f[1],m=Object(T.useState)(),S=Object(N.a)(m,2),g=S[0],E=S[1],B=Object(T.useState)(1),U=Object(N.a)(B,2),I=U[0],D=U[1],G=Object(Q.k)(),R=b==null||((p=b.type)===null||p===void 0)?void 0:p.split(",");Object(T.useEffect)(function(){function h(){return s.apply(this,arguments)}function s(){return s=Object(F.a)(j().mark(function i(){var O;return j().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(X.a)("/api/courses/".concat(b.coursesId,"/export_records.json"),{method:"get",params:{page:1,per_page:10,export_types:R}});case 2:O=e.sent,O&&E(O);case 4:case"end":return e.stop()}},i)})),s.apply(this,arguments)}h()},[]);var k=[{title:"\u6587\u4EF6\u540D",dataIndex:"filename",ellipsis:!0,width:"30%",render:function(s,i,O){return v.a.createElement(J.a,{title:s},v.a.createElement("span",null,s||(i==null?void 0:i.preview_filename)))}},{title:"\u7C7B\u578B",dataIndex:"export_type",ellipsis:!0,render:function(s){return Y==null?void 0:Y.map(function(i){if(s===(i==null?void 0:i.id))return v.a.createElement(J.a,{title:i.name},v.a.createElement("span",null,i.name))})}},{title:"\u72B6\u6001",dataIndex:"status",ellipsis:!0,render:function(s){return z==null?void 0:z.map(function(i){if(s===(i==null?void 0:i.id))return i.name})}},{title:"\u5BFC\u51FA\u4EBA",dataIndex:"user",ellipsis:!0,render:function(s){return s==null?void 0:s.real_name}},{title:"\u4E0B\u8F7D\u6B21\u6570",dataIndex:"downloads"},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"created_at",width:"20%",render:function(s){return V()(s).format("YYYY-MM-DD HH:mm:ss")}},{title:"\u64CD\u4F5C",ellipsis:!0,render:function(s,i,O){return v.a.createElement("span",{style:{cursor:"pointer",color:"#4cacff"},onClick:function(){Object(ut.o)({id:i==null?void 0:i.id})}},(i==null?void 0:i.status)==="finished"?"\u4E0B\u8F7D":"")}}].filter(function(h){return!!h});return v.a.createElement("div",{style:{background:"#fff"}},v.a.createElement("span",{style:{fontSize:"16px",height:"40px",display:"flex",background:"#fff",padding:"10px 20px"}},v.a.createElement(ot.a,{onClick:function(){G.goBack()},style:{marginTop:"4px",cursor:"pointer",marginRight:"5px"}})," \u5BFC\u51FA\u5217\u8868"),v.a.createElement("p",{style:{background:"#fff"}},v.a.createElement(rt.a,{columns:k,dataSource:g==null?void 0:g.export_records,pagination:!1})),v.a.createElement(et.a,{hideOnSinglePage:!0,pageSize:10,showSizeChanger:!1,onChange:function(){var h=Object(F.a)(j().mark(function s(i,O){var M;return j().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return D(i),t.next=3,Object(X.a)("/api/courses/".concat(b.coursesId,"/export_records.json"),{method:"get",params:{page:i,per_page:10,export_types:R}});case 3:M=t.sent,M&&E(M);case 5:case"end":return t.stop()}},s)}));return function(s,i){return h.apply(this,arguments)}}(),style:{textAlign:"center"},current:I,total:g==null?void 0:g.total_count}))};$.default=Object(it.a)(function(d){var L=d.loading,p=d.globalSetting;return{globalSetting:p,loading:L}})(st)}}]);
|