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.
1 line
12 KiB
1 line
12 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[109],{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),d=r("Ty5D"),f=r("55Ip"),m=r("9kvl");function p(){p=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(I){u=function(t,e,r){return t[e]=r}}function l(t,e,r,o){var a=e&&e.prototype instanceof d?e:d,i=Object.create(a.prototype),c=new j(o||[]);return n(i,"_invoke",{value:E(t,r,c)}),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(I){return{type:"throw",arg:I}}}t.wrap=l;var h={};function d(){}function f(){}function m(){}var y={};u(y,a,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(N([])));g&&g!==e&&r.call(g,a)&&(y=g);var _=m.prototype=d.prototype=Object.create(y);function x(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function o(n,a,i,c){var u=s(t[n],t,a);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"==typeof h&&r.call(h,"__await")?e.resolve(h.__await).then((function(t){o("next",t,i,c)}),(function(t){o("throw",t,i,c)})):e.resolve(h).then((function(t){l.value=t,i(l)}),(function(t){return o("throw",t,i,c)}))}c(u.arg)}var a;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return a=a?a.then(n,n):n()}})}function E(t,e,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return O()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var c=b(i,r);if(c){if(c===h)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=s(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function b(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,b(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;var o=s(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,h;var a=o.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function L(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 k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function N(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return f.prototype=m,n(_,"constructor",{value:m,configurable:!0}),n(m,"constructor",{value:f,configurable:!0}),f.displayName=u(m,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,u(t,c,"GeneratorFunction")),t.prototype=Object.create(_),t},t.awrap=function(t){return{__await:t}},x(w.prototype),u(w.prototype,i,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new w(l(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},x(_),u(_,c,"Generator"),u(_,a,(function(){return this})),u(_,"toString",(function(){return"[object Generator]"})),t.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}},t.values=N,j.prototype={constructor:j,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(k),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return i.type="throw",i.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!u)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 o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.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,h):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),h},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),k(r),h}},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;k(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:N(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}var y=function(t){t.globalSetting,t.loading;var e=t.dispatch,r=(t.user,Object(l["a"])(t,["globalSetting","loading","dispatch","user"]),Object(d["m"])()),m=r.identifier,y=r.Teamid,v=Object(s["useState"])(),g=Object(u["a"])(v,2),_=g[0],x=g[1],w=Object(s["useState"])(),E=Object(u["a"])(w,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),x(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(f["Link"],{to:"/competitions/index"},"\u5728\u7ebf\u7ade\u8d5b")),h.a.createElement(o["a"].Item,null,h.a.createElement(f["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)}}]); |