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.
NewEduCoderBuild/p__Competitions__Entered__A...

2 lines
12 KiB

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