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