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...

1 line
12 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[119],{mKwH:function(t,e,r){"use strict";r.r(e);r("g9YV");var n=r("wCAj"),o=(r("sPJy"),r("bE4q")),a=(r("5Dmo"),r("3S7+")),i=(r("Awhp"),r("KrTs")),c=r("9og8"),u=r("tJVT"),l=r("PpiC"),s=r("q1tI"),h=r.n(s),f=r("Ty5D"),d=r("55Ip"),m=r("9kvl");function p(){p=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof g?e:g,i=Object.create(a.prototype),c=new T(n||[]);return o(i,"_invoke",{value:N(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var f="suspendedStart",d="suspendedYield",m="executing",y="completed",v={};function g(){}function _(){}function w(){}var x={};l(x,i,(function(){return this}));var E=Object.getPrototypeOf,b=E&&E(E(P([])));b&&b!==r&&n.call(b,i)&&(x=b);var L=w.prototype=g.prototype=Object.create(x);function k(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function r(o,a,i,c){var u=h(t[o],t,a);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==typeof s&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function N(e,r,n){var o=f;return function(a,i){if(o===m)throw new Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=O(c,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=m;var l=h(e,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function O(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,v;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function I(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 S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(typeof e+" is not iterable")}return _.prototype=w,o(L,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:_,configurable:!0}),_.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===_||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},k(j.prototype),l(j.prototype,c,(function(){return this})),e.AsyncIterator=j,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new j(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},k(L),l(L,u,"Generator"),l(L,i,(function(){return this})),l(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=P,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(S),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,v):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}var y=function(t){t.globalSetting,t.loading;var e=t.dispatch,r=(t.user,Object(l["a"])(t,["globalSetting","loading","dispatch","user"]),Object(f["m"])()),m=r.identifier,y=r.Teamid,v=Object(s["useState"])(),g=Object(u["a"])(v,2),_=g[0],w=g[1],x=Object(s["useState"])(),E=Object(u["a"])(x,2),b=E[0],L=E[1];function k(){return j.apply(this,arguments)}function j(){return j=Object(c["a"])(p().mark((function t(){var r,n,o;return p().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e({type:"competitions/getShixun",payload:{identifier:m,teamid:y}});case 2:r=t.sent,r&&(n=r.shixuns,o={creator:"\u5408\u8ba1:",shixun_name:r.shixun_count,myshixuns_count:r.total_myshixun_count,forked_myshixun_count:r.total_forked_myshixun_count,valid_count:r.total_valid_count,score:r.total_shixun_score},n.push(o),w(n));case 4:case"end":return t.stop()}}),t)}))),j.apply(this,arguments)}function N(){return O.apply(this,arguments)}function O(){return O=Object(c["a"])(p().mark((function t(){var r,n,o;return p().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e({type:"competitions/getCourse",payload:{identifier:m,teamid:y}});case 2:r=t.sent,r&&(n=r.courses,o={creator:"\u5408\u8ba1:",course_name:r.total_course_count,students_count:r.total_students_count,shixun_homework_count:r.total_shixun_homework_count,valid_count:r.total_valid_count,score:r.total_course_score},n.push(o),L(n));case 4:case"end":return t.stop()}}),t)}))),O.apply(this,arguments)}Object(s["useEffect"])((function(){function t(){k(),N()}m&&t()}),[m]),console.log("shixundata",_,"coursedata",b);var I=[{title:"\u521b\u5efa\u8005",dataIndex:"creator",key:"creator",render:function(t,e){return h.a.createElement("div",{className:"\u5408\u8ba1:"===e.creator?"teamsLayoutheji":""},t)}},{title:"\u540d\u79f0",dataIndex:"shixun_name",key:"shixun_name",render:function(t,e){return h.a.createElement("div",{className:"\u5408\u8ba1:"===e.creator?"teamsLayoucolor-orange":""},t,!0===e.forked?h.a.createElement(i["a"],{count:"\u539f\u521b",style:{backgroundColor:"#459BE5"}}):"")}},{title:"\u5b66\u4e60\u4eba\u6570",dataIndex:"myshixuns_count",key:"myshixuns_count",render:function(t,e){return h.a.createElement("div",{className:"\u5408\u8ba1:"===e.creator?"teamsLayoucolor-orange":""},t)}},{title:"\u88abfork\u53d1\u5e03\u7684\u5b66\u4e60\u4eba\u6570",dataIndex:"forked_myshixun_count",key:"forked_myshixun_count",render:function(t,e){return h.a.createElement(a["a"],{placement:"bottom",title:"fork\u8be5\u5b9e\u8bad\u4ea7\u751f\u7684\u65b0\u5b9e\u8bad\uff0c\u5b66\u4e60\u603b\u4eba\u6570"},h.a.createElement("div",{className:"\u5408\u8ba1:"===e.creator?"teamsLayoucolor-orange":""},t))}},{title:"\u6709\u6548\u4f5c\u54c1\u6570",dataIndex:"valid_count",key:"valid_count",render:function(t,e){return h.a.createElement(a["a"],{placement:"bottom",title:"\u81f3\u5c11\u5b8c\u6210\u4e861\u4e2a\u5173\u5361"},h.a.createElement("div",{className:"\u5408\u8ba1:"===e.creator?"teamsLayoucolor-orange":""},t))}},{title:"\u5e94\u7528\u503c",dataIndex:"score",key:"score",render:function(t,e){return h.a.createElement("div",{className:"\u5408\u8ba1:"===e.creator?"teamsLayoucolor-orange":""},t)}}],S=[{title:"\u521b\u5efa\u8005",dataIndex:"creator",key:"creator",render:function(t,e){return h.a.createElement("div",{className:"\u5408\u8ba1:"===e.creator?"teamsLayoutheji":""},t)}},{title:"\u540d\u79f0",dataIndex:"course_name",key:"course_name",render:function(t,e){return h.a.createElement("div",{className:"\u5408\u8ba1:"===e.creator?"teamsLayoucolor-orange":""},t)}},{title:"\u5b66\u751f\u6570\u91cf",dataIndex:"students_count",key:"students_count",render:function(t,e){return h.a.createElement("div",{className:"\u5408\u8ba1:"===e.creator?"teamsLayoucolor-orange":""},t)}},{title:"\u53d1\u5e03\u7684\u5b9e\u8bad\u4f5c\u4e1a\u6570\u91cf",dataIndex:"shixun_homework_count",key:"shixun_homework_count",render:function(t,e){return h.a.createElement("div",{className:"\u5408\u8ba1:"===e.creator?"teamsLayoucolor-orange":""},t)}},{title:"\u6709\u6548\u4f5c\u54c1\u6570",dataIndex:"valid_count",key:"valid_count",render:function(t,e){return h.a.createElement(a["a"],{placement:"bottom",title:"\u81f3\u5c11\u5b8c\u6210\u4e861\u4e2a\u5173\u5361"},h.a.createElement("div",{className:"\u5408\u8ba1:"===e.creator?"teamsLayoucolor-orange":""},t))}},{title:"\u5e94\u7528\u503c",dataIndex:"score",key:"score",render:function(t,e){return h.a.createElement("div",{className:"\u5408\u8ba1:"===e.creator?"teamsLayoucolor-orange":""},t)}}];return h.a.createElement("div",{className:"edu-container minH500"},h.a.createElement(o["a"],{className:"mt10",separator:">"},h.a.createElement(o["a"].Item,null,h.a.createElement(d["Link"],{to:"/competitions/index"},"\u5728\u7ebf\u7ade\u8d5b")),h.a.createElement(o["a"].Item,null,h.a.createElement(d["Link"],{to:"/competitions/index/".concat(m,"/enroll")},"\u62a5\u540d")),h.a.createElement(o["a"].Item,null,"\u6218\u961f\u8be6\u60c5")),h.a.createElement("p",null,"\u5b9e\u8df5\u9879\u76ee"),h.a.createElement(n["a"],{className:"teamsLayoutTable",columns:I,dataSource:_,bordered:!0,pagination:!1}),h.a.createElement("p",null,"\u6559\u5b66\u8bfe\u5802"),h.a.createElement(n["a"],{className:"teamsLayoutTable",columns:S,dataSource:b,bordered:!0,pagination:!1}))};e["default"]=Object(m["a"])((function(t){var e=t.loading,r=t.globalSetting,n=t.user;return{globalSetting:r,loading:e.effects,user:n}}))(y)}}]);