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
12 KiB
2 lines
12 KiB
(window.webpackJsonp=window.webpackJsonp||[]).push([[120],{mKwH:function(at,F,l){"use strict";l.r(F);var ot=l("g9YV"),$=l("wCAj"),it=l("sPJy"),j=l("bE4q"),ut=l("5Dmo"),J=l("3S7+"),st=l("Awhp"),q=l("KrTs"),H=l("9og8"),V=l("tJVT"),tt=l("PpiC"),B=l("q1tI"),u=l.n(B),et=l("Ty5D"),z=l("55Ip"),rt=l("9kvl");function S(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */S=function(){return d};var d={},E=Object.prototype,y=E.hasOwnProperty,D=typeof Symbol=="function"?Symbol:{},w=D.iterator||"@@iterator",Q=D.asyncIterator||"@@asyncIterator",K=D.toStringTag||"@@toStringTag";function h(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(n,r,o){return n[r]=o}}function L(t,e,n,r){var o=e&&e.prototype instanceof M?e:M,i=Object.create(o.prototype),_=new A(r||[]);return i._invoke=function(p,v,s){var m="suspendedStart";return function(g,X){if(m==="executing")throw new Error("Generator is already running");if(m==="completed"){if(g==="throw")throw X;return a()}for(s.method=g,s.arg=X;;){var Z=s.delegate;if(Z){var Y=G(Z,s);if(Y){if(Y===f)continue;return Y}}if(s.method==="next")s.sent=s._sent=s.arg;else if(s.method==="throw"){if(m==="suspendedStart")throw m="completed",s.arg;s.dispatchException(s.arg)}else s.method==="return"&&s.abrupt("return",s.arg);m="executing";var N=I(p,v,s);if(N.type==="normal"){if(m=s.done?"completed":"suspendedYield",N.arg===f)continue;return{value:N.arg,done:s.done}}N.type==="throw"&&(m="completed",s.method="throw",s.arg=N.arg)}}}(t,n,_),i}function I(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(r){return{type:"throw",arg:r}}}d.wrap=L;var f={};function M(){}function U(){}function P(){}var C={};h(C,w,function(){return this});var T=Object.getPrototypeOf,R=T&&T(T(c([])));R&&R!==E&&y.call(R,w)&&(C=R);var O=P.prototype=M.prototype=Object.create(C);function W(t){["next","throw","return"].forEach(function(e){h(t,e,function(n){return this._invoke(e,n)})})}function b(t,e){function n(o,i,_,p){var v=I(t[o],t,i);if(v.type!=="throw"){var s=v.arg,m=s.value;return m&&typeof m=="object"&&y.call(m,"__await")?e.resolve(m.__await).then(function(g){n("next",g,_,p)},function(g){n("throw",g,_,p)}):e.resolve(m).then(function(g){s.value=g,_(s)},function(g){return n("throw",g,_,p)})}p(v.arg)}var r;this._invoke=function(o,i){function _(){return new e(function(p,v){n(o,i,p,v)})}return r=r?r.then(_,_):_()}}function G(t,e){var n=t.iterator[e.method];if(n===void 0){if(e.delegate=null,e.method==="throw"){if(t.iterator.return&&(e.method="return",e.arg=void 0,G(t,e),e.method==="throw"))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var r=I(n,t.iterator,e.arg);if(r.type==="throw")return e.method="throw",e.arg=r.arg,e.delegate=null,f;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,e.method!=="return"&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function c(t){if(t){var e=t[w];if(e)return e.call(t);if(typeof t.next=="function")return t;if(!isNaN(t.length)){var n=-1,r=function o(){for(;++n<t.length;)if(y.call(t,n))return o.value=t[n],o.done=!1,o;return o.value=void 0,o.done=!0,o};return r.next=r}}return{next:a}}function a(){return{value:void 0,done:!0}}return U.prototype=P,h(O,"constructor",P),h(P,"constructor",U),U.displayName=h(P,K,"GeneratorFunction"),d.isGeneratorFunction=function(t){var e=typeof t=="function"&&t.constructor;return!!e&&(e===U||(e.displayName||e.name)==="GeneratorFunction")},d.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,P):(t.__proto__=P,h(t,K,"GeneratorFunction")),t.prototype=Object.create(O),t},d.awrap=function(t){return{__await:t}},W(b.prototype),h(b.prototype,Q,function(){return this}),d.AsyncIterator=b,d.async=function(t,e,n,r,o){o===void 0&&(o=Promise);var i=new b(L(t,e,n,r),o);return d.isGeneratorFunction(e)?i:i.next().then(function(_){return _.done?_.value:i.next()})},W(O),h(O,K,"Generator"),h(O,w,function(){return this}),h(O,"toString",function(){return"[object Generator]"}),d.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function r(){for(;e.length;){var o=e.pop();if(o in t)return r.value=o,r.done=!1,r}return r.done=!0,r}},d.values=c,A.prototype={constructor:A,reset:function(e){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(x),!e)for(var n in this)n.charAt(0)==="t"&&y.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if(e.type==="throw")throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function r(s,m){return _.type="throw",_.arg=e,n.next=s,m&&(n.method="next",n.arg=void 0),!!m}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],_=i.completion;if(i.tryLoc==="root")return r("end");if(i.tryLoc<=this.prev){var p=y.call(i,"catchLoc"),v=y.call(i,"finallyLoc");if(p&&v){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(p){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!v)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,n){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&y.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&(e==="break"||e==="continue")&&i.tryLoc<=n&&n<=i.finallyLoc&&(i=null);var _=i?i.completion:{};return _.type=e,_.arg=n,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(_)},complete:function(e,n){if(e.type==="throw")throw e.arg;return e.type==="break"||e.type==="continue"?this.next=e.arg:e.type==="return"?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):e.type==="normal"&&n&&(this.next=n),f},finish:function(e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),f}},catch:function(e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc===e){var o=r.completion;if(o.type==="throw"){var i=o.arg;x(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:c(e),resultName:n,nextLoc:r},this.method==="next"&&(this.arg=void 0),f}},d}var nt=function(E){var y=E.globalSetting,D=E.loading,w=E.dispatch,Q=E.user,K=Object(tt.a)(E,["globalSetting","loading","dispatch","user"]),h=Object(et.m)(),L=h.identifier,I=h.Teamid,f=Object(B.useState)(),M=Object(V.a)(f,2),U=M[0],P=M[1],C=Object(B.useState)(),T=Object(V.a)(C,2),R=T[0],O=T[1];Object(B.useEffect)(function(){function c(){W(),G()}L&&c()},[L]);function W(){return b.apply(this,arguments)}function b(){return b=Object(H.a)(S().mark(function c(){var a,t,e;return S().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,w({type:"competitions/getShixun",payload:{identifier:L,teamid:I}});case 2:a=r.sent,a&&(t=a.shixuns,e={creator:"\u5408\u8BA1:",shixun_name:a.shixun_count,myshixuns_count:a.total_myshixun_count,forked_myshixun_count:a.total_forked_myshixun_count,valid_count:a.total_valid_count,score:a.total_shixun_score},t.push(e),P(t));case 4:case"end":return r.stop()}},c)})),b.apply(this,arguments)}function G(){return k.apply(this,arguments)}function k(){return k=Object(H.a)(S().mark(function c(){var a,t,e;return S().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,w({type:"competitions/getCourse",payload:{identifier:L,teamid:I}});case 2:a=r.sent,a&&(t=a.courses,e={creator:"\u5408\u8BA1:",course_name:a.total_course_count,students_count:a.total_students_count,shixun_homework_count:a.total_shixun_homework_count,valid_count:a.total_valid_count,score:a.total_course_score},t.push(e),O(t));case 4:case"end":return r.stop()}},c)})),k.apply(this,arguments)}console.log("shixundata",U,"coursedata",R);var x=[{title:"\u521B\u5EFA\u8005",dataIndex:"creator",key:"creator",render:function(a,t){return u.a.createElement("div",{className:t.creator==="\u5408\u8BA1:"?"teamsLayoutheji":""},a)}},{title:"\u540D\u79F0",dataIndex:"shixun_name",key:"shixun_name",render:function(a,t){return u.a.createElement("div",{className:t.creator==="\u5408\u8BA1:"?"teamsLayoucolor-orange":""},a,t.forked===!0?u.a.createElement(q.a,{count:"\u539F\u521B",style:{backgroundColor:"#459BE5"}}):"")}},{title:"\u5B66\u4E60\u4EBA\u6570",dataIndex:"myshixuns_count",key:"myshixuns_count",render:function(a,t){return u.a.createElement("div",{className:t.creator==="\u5408\u8BA1:"?"teamsLayoucolor-orange":""},a)}},{title:"\u88ABfork\u53D1\u5E03\u7684\u5B66\u4E60\u4EBA\u6570",dataIndex:"forked_myshixun_count",key:"forked_myshixun_count",render:function(a,t){return u.a.createElement(J.a,{placement:"bottom",title:"fork\u8BE5\u5B9E\u8BAD\u4EA7\u751F\u7684\u65B0\u5B9E\u8BAD\uFF0C\u5B66\u4E60\u603B\u4EBA\u6570"},u.a.createElement("div",{className:t.creator==="\u5408\u8BA1:"?"teamsLayoucolor-orange":""},a))}},{title:"\u6709\u6548\u4F5C\u54C1\u6570",dataIndex:"valid_count",key:"valid_count",render:function(a,t){return u.a.createElement(J.a,{placement:"bottom",title:"\u81F3\u5C11\u5B8C\u6210\u4E861\u4E2A\u5173\u5361"},u.a.createElement("div",{className:t.creator==="\u5408\u8BA1:"?"teamsLayoucolor-orange":""},a))}},{title:"\u5E94\u7528\u503C",dataIndex:"score",key:"score",render:function(a,t){return u.a.createElement("div",{className:t.creator==="\u5408\u8BA1:"?"teamsLayoucolor-orange":""},a)}}],A=[{title:"\u521B\u5EFA\u8005",dataIndex:"creator",key:"creator",render:function(a,t){return u.a.createElement("div",{className:t.creator==="\u5408\u8BA1:"?"teamsLayoutheji":""},a)}},{title:"\u540D\u79F0",dataIndex:"course_name",key:"course_name",render:function(a,t){return u.a.createElement("div",{className:t.creator==="\u5408\u8BA1:"?"teamsLayoucolor-orange":""},a)}},{title:"\u5B66\u751F\u6570\u91CF",dataIndex:"students_count",key:"students_count",render:function(a,t){return u.a.createElement("div",{className:t.creator==="\u5408\u8BA1:"?"teamsLayoucolor-orange":""},a)}},{title:"\u53D1\u5E03\u7684\u5B9E\u8BAD\u4F5C\u4E1A\u6570\u91CF",dataIndex:"shixun_homework_count",key:"shixun_homework_count",render:function(a,t){return u.a.createElement("div",{className:t.creator==="\u5408\u8BA1:"?"teamsLayoucolor-orange":""},a)}},{title:"\u6709\u6548\u4F5C\u54C1\u6570",dataIndex:"valid_count",key:"valid_count",render:function(a,t){return u.a.createElement(J.a,{placement:"bottom",title:"\u81F3\u5C11\u5B8C\u6210\u4E861\u4E2A\u5173\u5361"},u.a.createElement("div",{className:t.creator==="\u5408\u8BA1:"?"teamsLayoucolor-orange":""},a))}},{title:"\u5E94\u7528\u503C",dataIndex:"score",key:"score",render:function(a,t){return u.a.createElement("div",{className:t.creator==="\u5408\u8BA1:"?"teamsLayoucolor-orange":""},a)}}];return u.a.createElement("div",{className:"edu-container minH500"},u.a.createElement(j.a,{className:"mt10",separator:">"},u.a.createElement(j.a.Item,null,u.a.createElement(z.Link,{to:"/competitions/index"},"\u5728\u7EBF\u7ADE\u8D5B")),u.a.createElement(j.a.Item,null,u.a.createElement(z.Link,{to:"/competitions/index/".concat(L,"/enroll")},"\u62A5\u540D")),u.a.createElement(j.a.Item,null,"\u6218\u961F\u8BE6\u60C5")),u.a.createElement("p",null,"\u5B9E\u8DF5\u9879\u76EE"),u.a.createElement($.a,{className:"teamsLayoutTable",columns:x,dataSource:U,bordered:!0,pagination:!1}),u.a.createElement("p",null,"\u6559\u5B66\u8BFE\u5802"),u.a.createElement($.a,{className:"teamsLayoutTable",columns:A,dataSource:R,bordered:!0,pagination:!1}))};F.default=Object(rt.a)(function(d){var E=d.loading,y=d.globalSetting,D=d.user;return{globalSetting:y,loading:E.effects,user:D}})(nt)}}]);
|