diff --git a/p__Competitions__Edit__index.async.js b/p__Competitions__Edit__index.async.js index 397a068643..9d393f157c 100644 --- a/p__Competitions__Edit__index.async.js +++ b/p__Competitions__Edit__index.async.js @@ -1 +1 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[38797,70516],{33706:function(e,n,t){t.d(n,{Z:function(){return u}});var i=t(79800),l=t.n(i),s=t(78241),o=t(98135),a=t(3113),r=t(59301),c={search:"search___JA0r9",btn:"btn___GGtZC"},d=t(37712),u=function(e){var n=e.value,t=e.onChange,i=s.Z.useForm(),u=l()(i,1)[0],p=(0,r.useRef)(!1);(0,r.useEffect)((function(){n&&u.setFieldsValue(n)}),n);return(0,d.jsx)("div",{className:c.search,children:(0,d.jsxs)(s.Z,{className:c.formWrap,colon:!1,form:u,size:"large",layout:"inline",onFinish:function(e){p.current||function(e){p.current||t(e),p.current=!0,setTimeout((function(){p.current=!1}),2e3)}(e)},children:[(0,d.jsx)(s.Z.Item,{label:"实践项目名称",name:"keyword",initialValue:"",children:(0,d.jsx)(o.Z,{style:{width:280,height:40}})}),(0,d.jsx)(s.Z.Item,{label:"学校/单位",name:"schools",initialValue:"",style:{margin:"0 40px"},children:(0,d.jsx)(o.Z,{style:{width:280,height:40}})}),(0,d.jsx)(s.Z.Item,{label:"创建者/合作者",name:"creator",initialValue:"",children:(0,d.jsx)(o.Z,{style:{width:200,height:40}})}),(0,d.jsx)(a.ZP,{className:c.btn,type:"primary",htmlType:"submit",children:"搜索"})]})})}},19860:function(e,n,t){t.d(n,{z:function(){return N},Z:function(){return I}});var i=t(7557),l=t.n(i),s=t(41498),o=t.n(s),a=t(82242),r=t.n(a),c=t(37205),d=t.n(c),u=t(79800),p=t.n(u),m=t(59301),h=t(46651),_=t(8591),f=t(43418),x=t(3113),v=t(22107),g=t(87271),y=t(37712),j="  ";function b(e){if(0==e)return"0 Byte";var n=parseInt(""+Math.floor(Math.log(e)/Math.log(1024)),10);return(e/Math.pow(1024,n)).toFixed(1)+" "+["Bytes","KB","MB","GB","TB"][n]}var w=t(93737),Z=t(89392);Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;var k=h.Z.Dragger;function N(e){var n=[];return e&&e.length>0&&(n=e.map((function(e){return{uid:e.id,id:e.id,name:e.title+j+e.filesize,url:e.url,filesize:e.filesize,status:"done",response:{id:e.id}}}))),n}var I=function(e){var n=e.value,t=e.onChange,i=e.action,s=e.data,a=e.className,c=e.maxSize,u=void 0===c?150:c,N=e.title,I=void 0===N?"上传附件":N,A=e.showRemoveModal,S=void 0!==A&&A,C=e.accept,F=void 0===C?"":C,P=e.additionalText,T=e.isDragger,L=e.number,D=void 0===L?1e3:L,E=e.aloneClear,R=void 0!==E&&E,M=e.realTimeRemove,V=void 0===M||M,B=(0,m.useState)(!1),z=p()(B,2),O=z[0],Y=z[1],H=(0,m.useState)(n||[]),q=p()(H,2),Q=q[0],G=q[1],U=(0,m.useState)(1),W=p()(U,2),J=W[0],K=W[1];(0,m.useEffect)((function(){n&&(1===J&&G(d()(n)),K(2),D===(null==n?void 0:n.length)&&Y(!0))}),[n]);var X,$=function(){setTimeout((function(){Q.pop(),G(d()(Q))}),500)},ee={multiple:!0,disabled:O,accept:F,withCredentials:!0,fileList:Q,beforeUpload:function(e,n){var t=e.size/1024/1024;return Q.concat(n).length>D?(Q.pop(),G(d()(Q)),_.ZP.error("最多只能上传".concat(D,"个文件")),R?Promise.reject():($(),!1)):t=D?Y(!0):Y(!1),G(d()(Q)),Q=Q.map((function(e){var n,t;null!=e&&null!==(n=e.response)&&void 0!==n&&n.id&&(e.url=null==e||null===(t=e.response)||void 0===t?void 0:t.url);return-1===e.name.indexOf(j)&&(e.name="".concat(e.name).concat(j).concat(b(e.size))),r()({},e)})),console.log("info:",e,Q),t(Q)):_.ZP.error(null===(i=e.file)||void 0===i||null===(i=i.response)||void 0===i?void 0:i.message)},onRemove:(X=o()(l()().mark((function e(n){var t;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(V){e.next=2;break}return e.abrupt("return",!0);case 2:if(t=function(){var e=o()(l()().mark((function e(){var t;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n.response?n.response.id:n.id)){e.next=8;break}return e.next=4,(0,g.JZ)(n.response?n.response.id:n.uid);case 4:return t=e.sent,e.abrupt("return",Promise.resolve(t));case 8:return e.abrupt("return",!0);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),!S){e.next=7;break}return e.abrupt("return",new Promise((function(e,n){var i;f.Z.confirm({centered:!0,width:530,okText:"确定",cancelText:"取消",title:"提示",content:(0,y.jsx)("div",{className:"tc font16",children:"是否确认删除?"}),onOk:(i=o()(l()().mark((function n(){return l()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,t();case 2:n.sent,_.ZP.success("删除成功"),e(!0);case 5:case"end":return n.stop()}}),n)}))),function(){return i.apply(this,arguments)}),onCancel:function(){return e(!1)}})})));case 7:return e.next=9,t();case 9:return e.abrupt("return",e.sent);case 10:case"end":return e.stop()}}),e)}))),function(e){return X.apply(this,arguments)})};return(0,y.jsxs)("div",{className:"multi-upload ".concat(a||""),children:[T&&(0,y.jsxs)(k,r()(r()({},ee),{},{children:[(0,y.jsx)("p",{className:"ant-upload-drag-icon",children:(0,y.jsx)(w.Z,{})}),(0,y.jsxs)("p",{className:"ant-upload-text",children:["点击上传图标,选择要上传的文件或将文件拖拽到此",(0,y.jsx)("br",{}),"(单个文件最大限制为",u,"MB)"," "]}),P]})),!T&&(0,y.jsxs)(h.Z,r()(r()({},ee),{},{children:[(0,y.jsxs)(x.ZP,{disabled:O,className:"upload_button",children:[(0,y.jsx)("img",{className:"aBtn_img",src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEwLjM1NCAzLjVoLTIuNzd2OC4xNjdINi40MTZWMy41SDMuNjQ2TDcgMGwzLjM1NCAzLjVaTTE0IDdoLTEuMTY3djUuODMzSDEuMTY3VjdIMHY3aDE0VjdaIiBmaWxsPSIjMzA2MUQwIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4="}),I]}),(0,y.jsxs)("span",{onClick:function(e){e.preventDefault(),e.stopPropagation()},className:"upload_text",children:["(单个文件最大",u,"MB)"," "]})]}))]})}},51932:function(e,n,t){t.d(n,{h:function(){return p},x:function(){return m}});var i=t(82242),l=t.n(i),s=t(39647),o=t.n(s),a=t(70464),r=t(47109),c=t(28388),d=t(37712),u=["value","onChange","scrollId"],p=function(e){var n=e.value,t=e.onChange,i=e.scrollId,s=o()(e,u);return(0,d.jsx)("div",{id:i||"",children:(0,d.jsx)(a.Z,l()(l()({},s),{},{defaultValue:n,onChange:function(e,n){console.log("a:",e,n),null!=n&&n.length?t(e,n):t(e)}}))})},m=function(e){var n=e.value,t=e.onChange,i=e.placeholder,l=e.height,s=void 0===l?140:l;return e.isEdit?(0,d.jsx)(a.Z,{watch:!0,isFocus:!0,height:s,placeholder:i,defaultValue:n,onChange:t}):(0,d.jsx)("div",{style:{cursor:"pointer"},children:n?(0,d.jsx)(c.Z,{className:r.Z.inputBorder,value:n}):(0,d.jsx)("div",{className:"".concat(r.Z.inputBorder," ").concat(r.Z.placeholder," inputBorderError"),children:i})})}},95154:function(e,n,t){t.d(n,{Z:function(){return D},P:function(){return T}});var i=t(37205),l=t.n(i),s=t(39647),o=t.n(s),a=t(7557),r=t.n(a),c=t(82242),d=t.n(c),u=t(41498),p=t.n(u),m=t(79800),h=t.n(m),_=t(59301),f=t(78241),x=t(43418),v=t(5112),g=t(98135),y=t(14491),j="brief___LOzpE",b="contentTitle___xkdcN",w="content___Vtri0",Z="antdTable___s8T2N",k="tableCell___kN9Fw",N="antdModal___WVBk3",I="orangeColor___ryB2u",A=t(17047),S=t(37712),C=["isImportMultipleCourse"],F=function(e){var n=e.studentNames,t=e.total;return t>3?(0,S.jsxs)(S.Fragment,{children:["课堂内有",(0,S.jsx)("span",{className:I,children:null==n?void 0:n.join("、")}),"等",(0,S.jsx)("span",{className:I,children:t}),"名学生"]}):(0,S.jsxs)(S.Fragment,{children:["课堂内有",(0,S.jsx)("span",{className:I,children:null==n?void 0:n.join("、")}),["","一","两","三"][t],"名学生"]})},P=function(e){var n=e.onCancel,t=e.onOk,i=e.visible,l=(e.inPaper,e.renderData),s=(e.type,e.isMultipleCourse),o=void 0!==s&&s,a=f.Z.useForm(),c=h()(a,1)[0],u=(0,_.useState)(1),m=h()(u,2),g=m[0],y=m[1],j=(0,_.useState)(!1),b=h()(j,2),Z=b[0],k=b[1],A=(0,_.useMemo)((function(){return 1===(null==l?void 0:l.total_num)&&1===(null==l?void 0:l.can_copy_num)}),[l]),C=(0,_.useMemo)((function(){var e;return null==l||null===(e=l.course_data_list)||void 0===e?void 0:e.filter((function(e){return e.is_show}))}),[l]);return(0,S.jsx)(S.Fragment,{children:A?(0,S.jsxs)(x.Z,{centered:!0,closable:!0,open:i,destroyOnClose:!0,title:"提示",className:N,width:682,confirmLoading:Z,onCancel:n,onOk:p()(r()().mark((function e(){var n,i,s;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return k(!0),n=g,o&&(s=d()({},c.getFieldsValue()),n=null==l||null===(i=l.course_data_list)||void 0===i?void 0:i.map((function(e){return void 0!==s[e.id]?d()(d()({},e),{},{is_copy:s[e.id]}):e}))),e.next=5,t(n);case 5:k(!1);case 6:case"end":return e.stop()}}),e)}))),children:[(0,S.jsx)("div",{className:w,style:{marginBottom:20},children:o?"检测到以下课堂已在教学课堂中使用,请问是否复制成新的实训发送至教学课堂中?":(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(F,{studentNames:null==l?void 0:l.student_names,total:null==l?void 0:l.student_count}),"学习过该实践项目。该项目支持复制,请选择是否将该项目复制为新项目发送至课堂中?"]})}),o?(0,S.jsx)(f.Z,{form:c,preserve:!1,children:null==C?void 0:C.map((function(e){return(0,S.jsxs)(_.Fragment,{children:[(0,S.jsx)("h3",{className:"ml15 mb5",children:e.name}),(0,S.jsx)(f.Z.Item,{name:e.id,initialValue:1,children:(0,S.jsxs)(v.ZP.Group,{className:w,children:[(0,S.jsx)(v.ZP,{value:1,style:{color:"#464f66"},children:"复制实训"}),(0,S.jsx)(v.ZP,{value:0,style:{color:"#464f66"},children:"不复制实训"})]})})]},e.id)}))}):(0,S.jsxs)(v.ZP.Group,{value:g,onChange:function(e){return y(e.target.value)},className:w,style:{marginBottom:30},children:[(0,S.jsx)(v.ZP,{value:1,style:{color:"#464f66"},children:"复制"}),(0,S.jsx)(v.ZP,{value:0,style:{color:"#464f66"},children:"不复制"})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("div",{className:w,style:{marginBottom:10},children:"* 说明:"}),(0,S.jsx)("div",{className:w,style:{marginBottom:20},children:"1、复制:系统将复制并创建一个新的项目发送到课堂中使用(不会复制学生的挑战记录),新的项目支持进行编辑并与原项目信息互不影响。"}),(0,S.jsx)("div",{className:"".concat(w," ").concat(I),children:"2、不复制:当前项目会被直接发送到课堂中使用,挑战过该项目的学生再次进入项目开启挑战时,会清空之前的挑战记录。"})]})]}):(0,S.jsx)(x.Z,{centered:!0,closable:!0,destroyOnClose:!0,open:i,confirmLoading:Z,title:"提示",width:682,onCancel:n,onOk:p()(r()().mark((function e(){var n,i,s;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return k(!0),n=0,o&&(s=d()({},c.getFieldsValue()),n=null==l||null===(i=l.course_data_list)||void 0===i?void 0:i.map((function(e){return void 0!==s[e.id]?d()(d()({},e),{},{is_use:s[e.id]}):e}))),e.next=5,t(n);case 5:k(!1);case 6:case"end":return e.stop()}}),e)}))),children:(0,S.jsxs)("div",{className:w,children:[(0,S.jsx)(F,{studentNames:null==l?void 0:l.student_names,total:null==l?void 0:l.student_count}),"学习过该实践项目。",o?(0,S.jsxs)(f.Z,{form:c,preserve:!1,children:[(0,S.jsx)("h3",{children:"当前实训不可复制,已经检测到以下课堂存在该实训,同一实训在课堂中重复使用时,会导致成绩互相影响,请确认是否继续使用"}),null==C?void 0:C.map((function(e){return(0,S.jsxs)(_.Fragment,{children:[(0,S.jsx)("h3",{className:"ml15 mb5",children:e.name}),(0,S.jsx)(f.Z.Item,{name:e.id,initialValue:1,children:(0,S.jsxs)(v.ZP.Group,{className:w,children:[(0,S.jsx)(v.ZP,{value:1,style:{color:"#464f66"},children:"继续使用"}),(0,S.jsx)(v.ZP,{value:0,style:{color:"#464f66"},children:"不使用"})]})})]},e.id)}))]}):(0,S.jsxs)("div",{children:["该项目不支持复制,若确认继续发送,",(0,S.jsx)("span",{className:I,children:"当前项目会被直接发送到课堂中使用,挑战过该项目的学生再次进入项目开启挑战时,会清空之前的挑战记录。"}),"(如果不想清空学生之前的挑战记录,建议参照该实践项目的内容自行创建一个新的项目,或者尝试联系项目创建人开放本项目的复制权限)。"]})]})})})},T=function(){var e=(0,_.useState)(!1),n=h()(e,2),t=n[0],i=n[1],l=(0,_.useState)(),s=h()(l,2),a=s[0],c=s[1],d=function(){var e=p()(r()().mark((function e(n){var t,l,s,a,d;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.isImportMultipleCourse,l=void 0!==t&&t,s=o()(n,C),console.log(n),e.t0=null==n?void 0:n.result,e.t0){e.next=7;break}return e.next=6,(0,A.Tr)(s);case 6:e.t0=e.sent;case 7:if(!("status"in(a=e.t0))){e.next=10;break}return e.abrupt("return",!1);case 10:if(!l){e.next=17;break}if(!(null==a||null===(d=a.course_data_list)||void 0===d?void 0:d.some((function(e){return e.is_show})))){e.next=16;break}return c(a),i(!0),e.abrupt("return",!0);case 16:return e.abrupt("return",a.course_data_list||[]);case 17:if(0!==a.student_count){e.next=19;break}return e.abrupt("return",!1);case 19:return c(a),i(!0),e.abrupt("return",!0);case 22:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();return[t,function(){return i(!1)},a,d]},L=function(e){var n=f.Z.useForm(),t=h()(n,1)[0],i=(0,_.useState)(!1),s=h()(i,2),o=s[0],a=s[1],c=e.onCancel,d=e.onOk,u=e.visible,m=e.inPaper,w=void 0!==m&&m,A=e.renderData,C=e.type,P=e.isMultipleCourse,T=void 0!==P&&P,L=e.position,D=(0,_.useMemo)((function(){return w?[{title:"实践项目名称",dataIndex:"name",width:424,align:"center",ellipsis:!0,className:k,render:function(e,n){return(0,S.jsx)("a",{href:"/shixuns/".concat(n.identifier,"/challenges"),target:"_blank",children:e})}},{title:"是否复制",dataIndex:"is_copy",align:"center",render:function(e,n){return(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(f.Z.Item,{name:["".concat("subject"===C?n.stage_shixun_id:n.shixun_course_id||n.id),"is_copy"],initialValue:1,children:(0,S.jsxs)(v.ZP.Group,{children:[(0,S.jsx)(v.ZP,{value:1,children:"是"}),(0,S.jsx)(v.ZP,{value:0,children:"否"})]})}),(0,S.jsx)(f.Z.Item,{name:["".concat("subject"===C?null==n?void 0:n.stage_shixun_id:n.shixun_course_id||n.id),"is_use"],hidden:!0,initialValue:1,children:(0,S.jsx)(g.Z,{type:"hidden"})})]})}}]:[{title:"实践项目名称",dataIndex:"name",width:424,align:"center",ellipsis:!0,className:k,render:function(e,n){return(0,S.jsx)("a",{href:"/shixuns/".concat(n.identifier,"/challenges"),target:"_blank",children:e})}},{title:"是否使用",dataIndex:"is_use",align:"center",render:function(e,n){return(0,S.jsx)(f.Z.Item,{name:["".concat("subject"===C?n.stage_shixun_id:n.shixun_course_id||n.id),"is_use"],initialValue:1,children:(0,S.jsxs)(v.ZP.Group,{children:[(0,S.jsx)(v.ZP,{value:1,children:"是"}),(0,S.jsx)(v.ZP,{value:0,children:"否"})]})})}},{title:"是否复制",dataIndex:"is_copy",align:"center",render:function(e,n){return(0,S.jsx)(f.Z.Item,{name:["".concat("subject"===C?n.stage_shixun_id:n.shixun_course_id||n.id),"is_copy"],initialValue:1,children:(0,S.jsxs)(v.ZP.Group,{children:[(0,S.jsx)(v.ZP,{value:1,children:"是"}),(0,S.jsx)(v.ZP,{value:0,children:"否"})]})})}}]}),[w]),E=(0,_.useMemo)((function(){return w?[{title:"实践项目名称",dataIndex:"name",width:424,className:k,align:"center",ellipsis:!0,render:function(e,n){return(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)("a",{href:"/shixuns/".concat(n.identifier,"/challenges"),target:"_blank",children:e}),(0,S.jsx)(f.Z.Item,{name:["".concat("subject"===C?null==n?void 0:n.stage_shixun_id:n.shixun_course_id||n.id),"is_copy"],hidden:!0,initialValue:0,children:(0,S.jsx)(g.Z,{type:"hidden"})}),(0,S.jsx)(f.Z.Item,{name:["".concat("subject"===C?null==n?void 0:n.stage_shixun_id:n.shixun_course_id||n.id),"is_use"],hidden:!0,initialValue:1,children:(0,S.jsx)(g.Z,{type:"hidden"})})]})}}]:[{title:"实践项目名称",dataIndex:"name",width:424,className:k,ellipsis:!0,align:"center",render:function(e,n){return(0,S.jsx)("a",{href:"/shixuns/".concat(n.identifier,"/challenges"),target:"_blank",children:e})}},{title:"是否使用",dataIndex:"is_use",align:"center",render:function(e,n){return(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(f.Z.Item,{name:["".concat("subject"===C?null==n?void 0:n.stage_shixun_id:n.shixun_course_id||n.id),"is_use"],initialValue:0,children:(0,S.jsxs)(v.ZP.Group,{children:[(0,S.jsx)(v.ZP,{value:1,children:"是"}),(0,S.jsx)(v.ZP,{value:0,children:"否"})]})}),(0,S.jsx)(f.Z.Item,{name:["".concat("subject"===C?null==n?void 0:n.stage_shixun_id:n.shixun_course_id||n.id),"is_copy"],hidden:!0,initialValue:0,children:(0,S.jsx)(g.Z,{type:"hidden"})})]})}}]}),[w]);if(T){var R={title:"课堂名称",ellipsis:!0,dataIndex:"course_name",width:190,align:"center",className:k,render:function(e,n){return(0,S.jsx)("a",{href:"/classrooms/".concat(n.course_id),children:e})}};D=[R].concat(l()(D)),E=[R].concat(l()(E))}var M=(0,_.useMemo)((function(){return function(e){var n=e.used,t=e.copy,i=e.canNotCopy,l=e.studentNames,s=e.studentCount,o=e.inPaper,a=e.is_random,r=void 0!==a&&a,c=e.position,d=(void 0===c?"":c)||(o?"试卷":"课程");return(0,S.jsxs)("span",{children:[(0,S.jsx)(F,{studentNames:l,total:s}),"学习过",d,"中的",(0,S.jsx)("span",{className:I,children:n}),"个项目,",t>0&&i>0?(0,S.jsxs)(S.Fragment,{children:["其中",(0,S.jsx)("span",{className:I,children:t}),"个项目支持复制,",(0,S.jsx)("span",{className:I,children:i}),"个项目不支持复制"]}):t>0&&0===i?(0,S.jsxs)(S.Fragment,{children:["其中",(0,S.jsx)("span",{className:I,children:t}),"个项目支持复制"]}):0===t&&i>0?(0,S.jsxs)(S.Fragment,{children:["其中",(0,S.jsx)("span",{className:I,children:i}),"个项目不支持复制"]}):void 0,"。请选择",r?"":"是否继续使用和","是否复制为新项目发送至课堂中?"]})}({used:null==A?void 0:A.repeat_shixun_num,copy:null==A?void 0:A.can_copy_num,canNotCopy:null==A?void 0:A.no_copy_num,studentNames:null==A?void 0:A.student_names,studentCount:null==A?void 0:A.student_count,is_random:null==A?void 0:A.is_random,inPaper:w,position:L})}),[A,w,L]);return(0,S.jsx)(x.Z,{title:"提示",centered:!0,open:u,confirmLoading:o,onOk:p()(r()().mark((function e(){var n,i;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a(!0),n=t.getFieldsValue(),i=Object.keys(n).map((function(e){return{id:parseInt(e.split("_")[0]),course_id:parseInt(e.split("_")[1]),is_use:n[e].is_use,is_copy:n[e].is_copy}})),e.next=5,d(i);case 5:a(!1);case 6:case"end":return e.stop()}}),e)}))),onCancel:c,width:880,okText:"确认",className:N,destroyOnClose:!0,children:(0,S.jsxs)(f.Z,{form:t,preserve:!1,children:[(0,S.jsx)("div",{className:j,children:M}),(0,S.jsxs)("div",{style:{marginBottom:30},children:[(0,S.jsx)("div",{style:{marginBottom:20},children:"* 说明"}),(0,S.jsx)("div",{style:{marginBottom:20},children:"1、复制:系统将复制并创建一个新的项目发送到课堂中使用(不会复制学生的挑战记录),新的项目支持进行编辑并与原项目信息互不影响。"}),(0,S.jsx)("div",{className:I,children:"2、不复制:当前项目会被直接发送到课堂中使用,挑战过该项目的学生再次进入项目开启挑战时,会清空之前的挑战记录。"})]}),(null==A?void 0:A.can_copy_num)>0&&(0,S.jsxs)("div",{children:[(0,S.jsx)("div",{className:b,children:"支持复制的项目"}),(0,S.jsx)(y.Z,{columns:D,className:Z,dataSource:null==A?void 0:A.can_copy_list,rowKey:"subject"===C?"stage_shixun_id":"id",pagination:!1,scroll:{y:240},bordered:!0})]}),(null==A?void 0:A.no_copy_num)>0&&(0,S.jsxs)("div",{children:[(0,S.jsx)("div",{className:b,children:"不支持复制的项目"}),(0,S.jsx)(y.Z,{columns:E,className:Z,dataSource:null==A?void 0:A.no_copy_list,rowKey:"subject"===C?"stage_shixun_id":"id",pagination:!1,scroll:{y:200},bordered:!0})]}),(null==A?void 0:A.no_use_list.length)>0&&(null==A?void 0:A.no_use_list.map((function(e){return(0,S.jsxs)("div",{children:[(0,S.jsx)(f.Z.Item,{name:["".concat("subject"===C?null==e?void 0:e.stage_shixun_id:e.shixun_course_id||e.id),"is_copy"],hidden:!0,initialValue:0,children:(0,S.jsx)(g.Z,{type:"hidden"})}),(0,S.jsx)(f.Z.Item,{name:["".concat("subject"===C?null==e?void 0:e.stage_shixun_id:e.shixun_course_id||e.id),"is_use"],hidden:!0,initialValue:1,children:(0,S.jsx)(g.Z,{type:"hidden"})})]},"subject"===C?e.stage_shixun_id:e.shixun_course_id||e.id)})))]})})},D=function(e){return"multiple"===e.modalType?(0,S.jsx)(L,d()({},e)):(0,S.jsx)(P,d()({},e))}},22318:function(e,n,t){t.r(n),t.d(n,{default:function(){return cl}});var i=t(82242),l=t.n(i),s=t(7557),o=t.n(s),a=t(41498),r=t.n(a),c=t(79800),d=t.n(c),u=t(39647),p=t.n(u),m=t(59301),h=t(75102),_=t(57809),f=t(78241),x=t(43418),v=t(8591),g=t(66104),y=t(6848),j=t(98135),b=t(5112),w=t(88522),Z=t(3113),k={flex_box_center:"flex_box_center___Pwy41",flex_space_between:"flex_space_between___iGrQJ",flex_box_vertical_center:"flex_box_vertical_center___yCxnY",flex_box_center_end:"flex_box_center_end___WYWWp",flex_box_column:"flex_box_column___XMpFi",bg:"bg___WrQc9",top:"top___eHaMu",title:"title___ZzSKL",img:"img___TSo4p",span:"span___i1hTN",button:"button___M8rSK",content:"content___BOwAQ",Banner:"Banner___t6PnF",right:"right___x1tqT",titles:"titles___UHOD8",bonus:"bonus___l9Tlu",items:"items___CPICU",bottom:"bottom___HHYt7",tag:"tag___DBN6l",jsinput:"jsinput___oh61y",baseFormItem:"baseFormItem___t5ZrH",scoremodal:"scoremodal___yE6h8",yes:"yes___XyW4g",no:"no___kIYD7",bottoms:"bottoms___X64Ij",loaderimg:"loaderimg___w2vWU",enroll:"enroll___lbTQ5",publish:"publish___kDAkJ",ended:"ended___mycKl",form_item:"form_item___lsqU3",form_item_item:"form_item_item___Zdnul",form_item_item_select:"form_item_item_select____5lDo",shareicon:"shareicon___Z_RCj",ApplyStyle:"ApplyStyle___Hyn8j"},N=t(12752),I="all___CqKTx",A="setting___v3_ot",S="setting_title___WxGAY",C="setting_content___XAWD6",F="setting_menu___oKuAW",P="menu_item___qbDG8",T="menu_item_active___kzN6I",L="setting_info___pqlf5",D="all___dBmCY",E="title___IeVqW",R="content___zp_KL",M="form_item___hXuXB",V="form_item_basic___K4a8V",B="form_item_time___h8rdI",z="form_item_model____Mn2H",O="form_item_item___CR0Q5",Y="form_item_item_select___eeMCh",H="textarea_father___XVeQz",q="textarea_length___Xdwl4",Q="upload_button___zltZE",G="upload_button_file___vVqry",U="upload_text___pdO7Y",W="date_text___gvUlY",J="upload_download___KCtvw",K="checkbox_text___yn4Cf",X="footer___t6QDc",$="save_button___l7JJ7",ee="radio_style___tWyOo",ne=t(46651),te=t(84291),ie=t(24905),le=t(95237),se=t(43604),oe=t(14491),ae=t(99232),re=t.n(ae),ce=t(58899),de=t(45020),ue=t(22107),pe=t(67016),me=t(11298),he=t(37712),_e=["competitions","dispatch"],fe=j.Z.TextArea,xe=(0,h.connect)((function(e){return{competitions:e.competitions}}))((function(e){var n,t,i,s=e.competitions,a=e.dispatch,c=p()(e,_e),u=f.Z.useForm(),g=d()(u,1)[0],w=(0,m.useState)({}),k=d()(w,2),N=k[0],I=k[1],A=(0,m.useState)(0),S=d()(A,2),C=S[0],F=S[1],P=(0,m.useState)(),T=d()(P,2),L=T[0],ae=T[1],xe=(0,m.useState)(),ve=d()(xe,2),ge=ve[0],ye=ve[1],je=(0,m.useState)(!1),be=d()(je,2),we=be[0],Ze=be[1],ke=(0,m.useState)(!1),Ne=d()(ke,2),Ie=Ne[0],Ae=Ne[1],Se=(0,m.useState)(!1),Ce=d()(Se,2),Fe=Ce[0],Pe=Ce[1],Te=(0,m.useState)(!1),Le=d()(Te,2),De=Le[0],Ee=Le[1],Re=(0,m.useState)(!1),Me=d()(Re,2),Ve=Me[0],Be=Me[1],ze=(0,m.useState)([]),Oe=d()(ze,2),Ye=Oe[0],He=Oe[1],qe=(0,m.useState)(0),Qe=d()(qe,2),Ge=Qe[0],Ue=Qe[1],We=(0,m.useState)(!1),Je=d()(We,2),Ke=Je[0],Xe=Je[1],$e=(0,m.useState)([]),en=d()($e,2),nn=en[0],tn=en[1],ln=(0,m.useState)(!1),sn=d()(ln,2),on=(sn[0],sn[1]),an=s.Header,rn=(0,h.useParams)(),cn=function(){var e=r()(o()().mark((function e(n){var t,i,s;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!n.personal||(n.is_student||n.is_teacher||n.is_professional)){e.next=3;break}return v.ZP.error("请选择至少一种身份可以报名参赛"),e.abrupt("return");case 3:i=[],(null==L?void 0:L.length)>0&&(null==L||L.map((function(e){var n;i.push((null==e||null===(n=e.response)||void 0===n?void 0:n.id)||(null==e?void 0:e.id))}))),g.setFieldValue("attachment_ids",i),s=[],(null==ge?void 0:ge.length)>0&&(null==ge||ge.map((function(e){var n;s.push((null==e||null===(n=e.response)||void 0===n?void 0:n.id)||(null==e?void 0:e.id))}))),g.setFieldValue("file_id",s),g.setFieldValue("is_authentication",we),g.setFieldValue("need_phone",Ie),g.setFieldValue("need_mail",Fe),g.setFieldValue("competition_staffs",[{minimum:g.getFieldValue("student_min"),maximum:g.getFieldValue("student_max"),category:"student",mutiple_limited:De,check_phone:!1},{minimum:g.getFieldValue("teacher_min"),maximum:g.getFieldValue("teacher_max"),category:"teacher",mutiple_limited:Ve,check_phone:!1}]),(null===(t=N.identifier)||void 0===t?void 0:t.length)<3?v.ZP.error("比赛网址最少要输入三个字符"):(0,ce.IN)({id:Ge,identifier:g.getFieldValue("identifier")}).then(function(){var e=r()(o()().mark((function e(n){var t,i,s;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!=(null==n?void 0:n.status)&&g.setFieldValue("identifier",""),0!=(null==n?void 0:n.status)){e.next=6;break}return e.next=4,(0,ce.$M)(l()(l()({id:null==c?void 0:c.competitionId},g.getFieldsValue()),{},{enroll_start_time:g.getFieldValue("enroll_start_time")?re()(g.getFieldValue("enroll_start_time")).format("YYYY-MM-DD HH:mm"):"",enroll_end_time:g.getFieldValue("enroll_end_time")?re()(g.getFieldValue("enroll_end_time")).format("YYYY-MM-DD HH:mm"):"",start_time:g.getFieldValue("start_time")?re()(g.getFieldValue("start_time")).format("YYYY-MM-DD HH:mm"):"",end_time:g.getFieldValue("end_time")?re()(g.getFieldValue("end_time")).format("YYYY-MM-DD HH:mm"):""}));case 4:if(0==(null==(t=e.sent)?void 0:t.status)){if(v.ZP.success("更改成功"),(null==t?void 0:t.failed.length)>0){for(s in Xe(!0),i=[],null==t?void 0:t.failed)i.push({phone:null==t?void 0:t.failed[s][0],name:null==t?void 0:t.failed[s][1],email:null==t?void 0:t.failed[s][2]});tn(i)}(null==rn?void 0:rn.identifier)==g.getFieldValue("identifier")?(a({type:"competitions/getStaff",payload:{identifier:null==c?void 0:c.competitionId}}),a({type:"competitions/getHeader",payload:{identifier:null==c?void 0:c.competitionId}})):(null==rn?void 0:rn.identifier)!=g.getFieldValue("identifier")&&h.history.push("/competitions/detail/".concat(g.getFieldValue("identifier"),"?type=4"))}case 6:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}());case 14:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();(0,m.useEffect)((function(){(0,de.GY)({}).then((function(e){He(null==e?void 0:e.schools)})).then((function(){(0,ce.o3)(null==c?void 0:c.competitionId).then((function(e){var n,t,i,s,o,a,r,d,u,p,m,h,_,f,x,v,y,j,b,w;(Ue(null==e?void 0:e.id),g.setFieldValue("is_student",null==e?void 0:e.is_student),g.setFieldValue("is_teacher",null==e?void 0:e.is_teacher),g.setFieldValue("is_professional",null==e?void 0:e.is_professional),g.setFieldValue("name",null==e?void 0:e.name),g.setFieldValue("sub_title",null==e?void 0:e.sub_title),g.setFieldValue("description",null==e?void 0:e.description),g.setFieldValue("identifier",null==e?void 0:e.identifier),g.setFieldValue("bonus",null==e?void 0:e.bonus),g.setFieldValue("awards_count",null==e?void 0:e.awards_count),g.setFieldValue("need_apply_name",null==e||null===(n=e.need_apply_info)||void 0===n?void 0:n.need_apply_name),g.setFieldValue("need_apply_student_id",null==e||null===(t=e.need_apply_info)||void 0===t?void 0:t.need_apply_student_id),g.setFieldValue("need_apply_sex",null==e||null===(i=e.need_apply_info)||void 0===i?void 0:i.need_apply_sex),g.setFieldValue("need_apply_phone",null==e||null===(s=e.need_apply_info)||void 0===s?void 0:s.need_apply_phone),g.setFieldValue("need_apply_grade",null==e||null===(o=e.need_apply_info)||void 0===o?void 0:o.need_apply_grade),g.setFieldValue("need_apply_teacher_name",null==e||null===(a=e.need_apply_info)||void 0===a?void 0:a.need_apply_teacher_name),g.setFieldValue("need_apply_school",null==e||null===(r=e.need_apply_info)||void 0===r?void 0:r.need_apply_school),null==e||null===(d=e.attachments)||void 0===d||d.map((function(e){e.name=e.title})),g.setFieldValue("attachment_ids",null==e?void 0:e.attachments),ae(null==e?void 0:e.attachments),g.setFieldValue("enroll_start_time",null!=e&&e.enroll_start_time?re()(null==e?void 0:e.enroll_start_time):""),g.setFieldValue("enroll_end_time",null!=e&&e.enroll_end_time?re()(null==e?void 0:e.enroll_end_time):""),g.setFieldValue("start_time",null!=e&&e.start_time?re()(null==e?void 0:e.start_time):""),g.setFieldValue("end_time",null!=e&&e.end_time?re()(null==e?void 0:e.end_time):""),g.setFieldValue("rule",null==e?void 0:e.rule),null!=e&&e.file)&&(e.file.name=null==e||null===(h=e.file)||void 0===h?void 0:h.title);(g.setFieldValue("file_id",null==e?void 0:e.file),null!=e&&e.file&&ye([null==e?void 0:e.file]),g.setFieldValue("region_rule",null==e?void 0:e.region_rule),g.setFieldValue("region_schools",null==e?void 0:e.region_school_array),g.setFieldValue("is_authentication",null==e?void 0:e.is_authentication),g.setFieldValue("apply_success_tips",(null==e?void 0:e.apply_success_tips)||"参赛者可扫码加入大赛官方交流群,获取最新竞赛通知"),Ze(null==e?void 0:e.is_authentication),g.setFieldValue("need_phone",null==e?void 0:e.need_phone),Ae(null==e?void 0:e.need_phone),g.setFieldValue("need_mail",null==e?void 0:e.need_mail),Pe(null==e?void 0:e.need_mail),g.setFieldValue("personal",null==e?void 0:e.personal),null!=e&&e.member_staff)?(g.setFieldValue("student_min",null==e||null===(_=e.member_staff)||void 0===_?void 0:_.minimum),g.setFieldValue("student_max",null==e||null===(f=e.member_staff)||void 0===f?void 0:f.maximum),g.setFieldValue("student_checkbox",null==e||null===(x=e.member_staff)||void 0===x?void 0:x.mutiple_limited)):(g.setFieldValue("student_min",0),g.setFieldValue("student_max",1));null!=e&&e.teacher_staff?(g.setFieldValue("teacher_min",null==e||null===(v=e.teacher_staff)||void 0===v?void 0:v.minimum),g.setFieldValue("teacher_max",null==e||null===(y=e.teacher_staff)||void 0===y?void 0:y.maximum),g.setFieldValue("teacher_checkbox",null==e||null===(j=e.teacher_staff)||void 0===j?void 0:j.mutiple_limited)):(g.setFieldValue("teacher_min",0),g.setFieldValue("teacher_max",0));3===(null==e?void 0:e.mode)?(Be(!0),Ee(!0)):(Be(null==e||null===(b=e.teacher_staff)||void 0===b?void 0:b.mutiple_limited),Ee(null==e||null===(w=e.member_staff)||void 0===w?void 0:w.mutiple_limited));Ee(null==e||null===(u=e.member_staff)||void 0===u?void 0:u.mutiple_limited),Be(null==e||null===(p=e.teacher_staff)||void 0===p?void 0:p.mutiple_limited),I(l()({},g.getFieldsValue())),F(null===(m=g.getFieldValue("description"))||void 0===m?void 0:m.length),null==c||c.loadingFunction(!1)}))})),null!=c&&c.formName&&g.scrollToField(null==c?void 0:c.formName)}),[]);var dn=function(e,n){"报名开始时间"==n?g.getFieldValue("enroll_end_time")&&e>=g.getFieldValue("enroll_end_time")&&(v.ZP.error("报名开始时间必须小于报名结束时间"),g.setFieldValue("enroll_start_time",""),g.setFieldValue("enroll_end_time","")):"报名结束时间"==n?g.getFieldValue("enroll_start_time")?e<=g.getFieldValue("enroll_start_time")&&(v.ZP.error("报名结束时间必须大于报名开始时间"),g.setFieldValue("enroll_end_time","")):(v.ZP.error("报名结束时间必须大于报名开始时间"),g.setFieldValue("enroll_end_time","")):"竞赛开始时间"==n?g.getFieldValue("end_time")&&e>=g.getFieldValue("end_time")&&(v.ZP.error("竞赛开始时间必须小于竞赛结束时间"),g.setFieldValue("start_time",""),g.setFieldValue("end_time","")):"竞赛结束时间"==n&&(g.getFieldValue("start_time")?e<=g.getFieldValue("start_time")&&(v.ZP.error("竞赛结束时间必须大于竞赛开始时间"),g.setFieldValue("end_time","")):(v.ZP.error("竞赛结束时间必须大于竞赛开始时间"),g.setFieldValue("end_time","")))};return(0,he.jsxs)("div",{className:D,children:[(0,he.jsxs)(f.Z,{form:g,labelCol:{flex:"120px"},scrollToFirstError:!0,colon:!1,initialValues:{region_rule:0,student_min:0,student_max:1,teacher_min:0,teacher_max:0,is_student:!0,is_teacher:!0,is_professional:!0},onFinish:cn,onFinishFailed:function(){var e=r()(o()().mark((function e(n){var t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:g.scrollToField(null==n||null===(t=n.errorFields)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.name,{behavior:"auto",block:"center"});case 1:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),onChange:function(){var e,n,t=null==g||null===(e=g.getFieldValue("sponsor_user_name"))||void 0===e?void 0:e.replaceAll(" ","");g.setFieldValue("sponsor_user_name",t);var i=g.getFieldsValue();F(null===(n=i.description)||void 0===n?void 0:n.length),I(l()({},i))},children:[(0,he.jsx)("div",{className:E,children:"基本信息"}),(0,he.jsxs)("div",{className:R,children:[(0,he.jsx)(f.Z.Item,{style:{marginTop:"-15px"},className:M,label:"竞赛主标题",colon:!1,name:"name",rules:[{required:!0,message:"必填项:不能为空"}],children:(0,he.jsx)(j.Z,{className:O,placeholder:"请输入竞赛主标题",maxLength:60,suffix:(0,he.jsxs)("span",{children:[(null===(n=N.name)||void 0===n?void 0:n.length)||0,(0,he.jsx)("span",{style:{color:"#c5c5c5"},children:"/60"})]})})}),(0,he.jsx)(f.Z.Item,{className:V,label:"竞赛副标题",colon:!1,name:"sub_title",children:(0,he.jsx)(j.Z,{className:O,placeholder:"请输入竞赛副标题",maxLength:60,suffix:(0,he.jsxs)("span",{children:[(null===(t=N.sub_title)||void 0===t?void 0:t.length)||0,(0,he.jsx)("span",{style:{color:"#c5c5c5"},children:"/60"})]})})}),(0,he.jsxs)("div",{className:H,children:[(0,he.jsx)(f.Z.Item,{className:M,label:"竞赛简介",colon:!1,name:"description",children:(0,he.jsx)(fe,{maxLength:200,placeholder:"请输入简介",rows:5})}),(0,he.jsxs)("span",{className:q,children:[C||0,(0,he.jsx)("span",{style:{color:"#c5c5c5"},children:"/200"})]})]}),(0,he.jsx)(f.Z.Item,{className:V,label:(0,he.jsxs)("div",{children:[(0,he.jsx)("span",{style:{color:"#ff4d4f",marginRight:"4px",fontFamily:"SimSun, sans-serif"},children:"*"}),"比赛网址"]}),colon:!1,children:(0,he.jsxs)("div",{style:{display:"flex"},children:[(0,he.jsxs)("div",{style:{width:"40%"},children:[window.location.origin,"/competitions/detail/"]}),(0,he.jsx)(y.Z,{placement:"topLeft",color:"#fb3226",overlayStyle:{maxWidth:"350px",width:"350px"},title:"如果修改竞赛网址,会造成参赛人员无法再次通过旧网址进入",children:(0,he.jsx)(f.Z.Item,{style:{width:"calc(68% + 16px)",marginLeft:"-16px"},label:(0,he.jsx)("div",{style:{width:"0px"}}),colon:!1,name:"identifier",rules:[{required:!0,message:"必填项:不能为空"},{pattern:new RegExp(/^[A-Za-z0-9\-_]*$/,""),message:"必须是数字、字母、下划线或者横线"}],children:(0,he.jsx)(j.Z,{className:O,placeholder:"请输入网址",maxLength:20,suffix:(0,he.jsxs)("span",{children:[(null===(i=N.identifier)||void 0===i?void 0:i.length)||0,(0,he.jsx)("span",{style:{color:"#c5c5c5"},children:"/20"})]}),onBlur:function(){on(!1),(0,ce.IN)({id:Ge,identifier:g.getFieldValue("identifier")}).then((function(e){0!=(null==e?void 0:e.status)&&g.setFieldValue("identifier","")}))},onChange:function(){on(!0)},disabled:"ended"==(null==an?void 0:an.competition_status)})})})]})}),(0,he.jsx)(f.Z.Item,{className:V,style:{marginTop:"-12px"},label:"奖金金额",colon:!1,name:"bonus",rules:[{pattern:new RegExp(/^\d{0,8}$/,"g"),message:"必须是8位数以内的正整数"}],children:(0,he.jsx)(j.Z,{autoComplete:"off",className:O,placeholder:"如果需要设置奖金,请与平台客服人员对接",suffix:(0,he.jsx)("span",{style:{color:"#c5c5c5"},children:"元"})})}),(0,he.jsx)(f.Z.Item,{className:V,label:"奖项数量",colon:!1,name:"awards_count",rules:[{pattern:new RegExp(/^\d{0,9}$/,"g"),message:"必须是正整数"}],children:(0,he.jsx)(j.Z,{autoComplete:"off",className:O,placeholder:"请输入奖项数量",suffix:(0,he.jsx)("span",{style:{color:"#c5c5c5"},children:"个"})})}),(0,he.jsx)(f.Z.Item,{name:"attachment_ids",label:"举办资质文档",colon:!1,getValueFromEvent:function(e){return Array.isArray(e)?e:e&&e.fileList},children:(0,he.jsxs)("div",{style:{display:"flex"},children:[(0,he.jsx)(ne.Z,{action:ue.Z.API_SERVER+"/api/attachments.json",onChange:function(e){ae(null==e?void 0:e.fileList)},onRemove:function(e){console.log(e),ae([])},fileList:L,withCredentials:!0,children:(0,he.jsx)("div",{className:Q,children:"上传文档"})}),(0,he.jsx)("div",{className:U,children:"如果涉及到竞赛奖金相关事项,请上传相关资质的证明文件,有便于竞赛快速审核通过"})]})}),(0,he.jsx)(f.Z.Item,{className:V,label:"报名时间",colon:!1,children:(0,he.jsxs)("div",{style:{display:"flex"},children:[(0,he.jsx)(f.Z.Item,{name:"enroll_start_time",children:(0,he.jsx)(te.default,{style:{height:"40px"},showTime:!0,format:"YYYY-MM-DD HH:mm",onChange:function(e){dn(e,"报名开始时间")}})}),(0,he.jsx)("span",{style:{margin:"0 10px"},children:"至"}),(0,he.jsx)(f.Z.Item,{name:"enroll_end_time",children:(0,he.jsx)(te.default,{style:{height:"40px"},showTime:!0,format:"YYYY-MM-DD HH:mm",onChange:function(e){dn(e,"报名结束时间")}})}),(0,he.jsx)("div",{className:W,children:"如果不填报名时间,则竞赛发布后将不展示报名入口"})]})}),(0,he.jsx)(f.Z.Item,{className:B,label:(0,he.jsxs)("div",{children:[(0,he.jsx)("span",{style:{color:"#ff4d4f",marginRight:"4px",fontFamily:"SimSun, sans-serif"},children:"*"}),"竞赛时间"]}),colon:!1,children:(0,he.jsxs)("div",{style:{display:"flex"},children:[(0,he.jsx)(f.Z.Item,{name:"start_time",rules:[{required:!0,message:"必填项:不能为空"}],children:(0,he.jsx)(te.default,{style:{height:"40px"},showTime:!0,format:"YYYY-MM-DD HH:mm",onChange:function(e){dn(e,"竞赛开始时间")},disabled:"progressing"==(null==an?void 0:an.competition_status)||"ended"==(null==an?void 0:an.competition_status)})}),(0,he.jsx)("span",{style:{margin:"0 10px"},children:"至"}),(0,he.jsx)(f.Z.Item,{name:"end_time",rules:[{required:!0,message:"必填项:不能为空"}],children:(0,he.jsx)(te.default,{style:{height:"40px"},showTime:!0,format:"YYYY-MM-DD HH:mm",onChange:function(e){dn(e,"竞赛结束时间")},disabled:"ended"==(null==an?void 0:an.competition_status)})})]})}),(0,he.jsx)(f.Z.Item,{className:B,label:(0,he.jsxs)("div",{children:[(0,he.jsx)("span",{style:{color:"#ff4d4f",marginRight:"4px",fontFamily:"SimSun, sans-serif"},children:"*"}),"报名成功提示"]}),colon:!1,children:(0,he.jsxs)("div",{style:{display:"flex"},children:[(0,he.jsx)(f.Z.Item,{style:{width:"100%"},colon:!1,name:"apply_success_tips",children:(0,he.jsx)(j.Z,{autoComplete:"off",style:{width:"100%"},className:O,placeholder:"请输入报名成功提示"})}),(0,he.jsx)(Z.ZP,{onClick:function(){var e;x.Z.confirm({title:!1,closable:!0,icon:null,footer:!1,content:(0,he.jsxs)("div",{children:[(0,he.jsxs)("div",{style:{fontSize:26,color:"#3d3d3d",textAlign:"center",marginBottom:20},children:[(0,he.jsx)("i",{style:{fontSize:26,color:"#52C41A"},className:"iconfont icon-tongguo"})," 报名成功"]}),(0,he.jsxs)("div",{style:{alignItems:"center",textAlign:"center"},children:[(0,he.jsx)("img",{style:{width:180,border:"1px solid #eeeeef",padding:10,marginBottom:20},src:ue.Z.IMG_SERVER+(null==an?void 0:an.QR_code)}),(0,he.jsx)("p",{style:{color:"#AAAAAA"},children:null===(e=g.getFieldsValue())||void 0===e?void 0:e.apply_success_tips})]})]})})},style:{marginLeft:10,marginTop:3},type:"primary",children:"示例"})]})})]}),(0,he.jsx)("div",{className:E,children:"开放范围"}),(0,he.jsxs)("div",{className:R,children:[(0,he.jsx)(f.Z.Item,{className:ee,label:"参赛规则",name:"rule",colon:!1,children:(0,he.jsxs)(b.ZP.Group,{children:[(0,he.jsx)(b.ZP,{value:0,style:{width:"120px"},children:"按范围参加"}),(0,he.jsx)(b.ZP,{value:1,style:{width:"120px"},children:"自定用户参加"})]})}),1==g.getFieldValue("rule")&&(0,he.jsx)(f.Z.Item,{name:"file_id",label:" ",colon:!1,getValueFromEvent:function(e){return Array.isArray(e)?e:e&&e.fileList},children:(0,he.jsxs)("div",{style:{marginLeft:"0px",display:"flex"},children:[(0,he.jsx)(ne.Z,{accept:".xls, .xlsx",maxCount:1,action:ue.Z.API_SERVER+"/api/attachments.json",onChange:function(e){ye(null==e?void 0:e.fileList)},onRemove:function(e){console.log(e),ye([])},fileList:ge,withCredentials:!0,children:(0,he.jsx)("div",{className:G,children:"选择文件"})}),(0,he.jsxs)("div",{className:J,style:{marginLeft:30},onClick:function(){(0,me.Nd)(null,ue.Z.API_SERVER+"/api/competitions/download_template")},children:["下载模版",(0,he.jsx)("i",{className:"iconfont icon-xiazai5 font14 ml5"})]})]})}),0==g.getFieldValue("rule")&&(0,he.jsx)(f.Z.Item,{label:"选择院校",name:"region_rule",className:ee,colon:!1,style:{marginTop:"-3px"},children:(0,he.jsxs)(b.ZP.Group,{children:[(0,he.jsx)(b.ZP,{value:0,style:{width:"120px"},children:"全部院校"}),(0,he.jsx)(b.ZP,{value:1,style:{width:"120px"},children:"部分院校"})]})}),1==g.getFieldValue("region_rule")&&0==g.getFieldValue("rule")&&(0,he.jsx)(f.Z.Item,{className:M,style:{marginTop:"-3px"},label:" ",colon:!1,name:"region_schools",children:(0,he.jsx)(_.default,{mode:"multiple",className:Y,options:Ye,fieldNames:{label:"name",value:"id"},filterOption:function(e,n){var t;return(null!==(t=null==n?void 0:n.name)&&void 0!==t?t:"").toLowerCase().includes(e.toLowerCase())}})})]}),(0,he.jsx)("div",{className:E,children:"报名者条件"}),(0,he.jsxs)("div",{className:R,children:[(0,he.jsx)(f.Z.Item,{label:"报名条件",name:"is_authentication",className:ee,style:{marginTop:"-10px"},colon:!1,children:(0,he.jsxs)(ie.Z,{checked:we,onChange:function(e){var n;return Ze(null==e||null===(n=e.target)||void 0===n?void 0:n.checked)},children:["实名认证",(0,he.jsx)("span",{className:K,children:"(参赛人员账号必须实名认证)"})]})}),(0,he.jsx)(f.Z.Item,{label:" ",name:"need_phone",style:{marginTop:"-10px"},colon:!1,children:(0,he.jsxs)(ie.Z,{checked:Ie,onChange:function(e){var n;return Ae(null==e||null===(n=e.target)||void 0===n?void 0:n.checked)},children:["绑定手机",(0,he.jsx)("span",{className:K,children:"(参赛人员账号必须绑定手机号)"})]})}),(0,he.jsx)(f.Z.Item,{label:" ",name:"need_mail",style:{marginTop:"-10px"},colon:!1,children:(0,he.jsxs)(ie.Z,{checked:Fe,onChange:function(e){var n;return Pe(null==e||null===(n=e.target)||void 0===n?void 0:n.checked)},children:["绑定邮箱",(0,he.jsx)("span",{className:K,children:"(参赛人员账号必须绑定邮箱)"})]})}),(0,he.jsx)("div",{style:{display:"flex",marginBottom:20},children:(0,he.jsxs)("div",{style:{paddingLeft:50,textAlign:"end"},children:["报名信息 ",(0,he.jsx)("span",{style:{marginLeft:0},className:K,children:"(参赛人员报名时需填写的信息)"})]})}),(0,he.jsx)(f.Z.Item,{label:" ",children:(0,he.jsxs)(le.Z,{wrap:!1,gutter:10,children:[(0,he.jsx)(se.Z,{children:(0,he.jsx)(f.Z.Item,{name:"need_apply_name",style:{marginTop:"-12px"},valuePropName:"checked",children:(0,he.jsx)(ie.Z,{children:"姓名"})})}),(0,he.jsx)(se.Z,{children:(0,he.jsx)(f.Z.Item,{name:"need_apply_student_id",style:{marginTop:"-12px"},valuePropName:"checked",children:(0,he.jsx)(ie.Z,{children:"学号"})})}),(0,he.jsx)(se.Z,{children:(0,he.jsx)(f.Z.Item,{name:"need_apply_sex",style:{marginTop:"-12px"},valuePropName:"checked",children:(0,he.jsx)(ie.Z,{children:"性别"})})}),(0,he.jsx)(se.Z,{children:(0,he.jsx)(f.Z.Item,{name:"need_apply_phone",style:{marginTop:"-12px"},valuePropName:"checked",children:(0,he.jsx)(ie.Z,{children:"电话"})})}),(0,he.jsx)(se.Z,{children:(0,he.jsx)(f.Z.Item,{name:"need_apply_grade",style:{marginTop:"-12px"},valuePropName:"checked",children:(0,he.jsx)(ie.Z,{children:"年级"})})}),(0,he.jsx)(se.Z,{children:(0,he.jsx)(f.Z.Item,{name:"need_apply_teacher_name",style:{marginTop:"-12px"},valuePropName:"checked",children:(0,he.jsx)(ie.Z,{children:"指导老师姓名"})})}),(0,he.jsx)(se.Z,{children:(0,he.jsx)(f.Z.Item,{name:"need_apply_school",style:{marginTop:"-12px"},valuePropName:"checked",children:(0,he.jsx)(ie.Z,{children:"学校/单位"})})})]})})]}),(0,he.jsx)("div",{className:E,children:"参赛模式"}),(0,he.jsxs)("div",{className:R,children:[(0,he.jsx)(f.Z.Item,{label:" ",name:"personal",colon:!1,children:(0,he.jsxs)(b.ZP.Group,{disabled:"progressing"==(null==an?void 0:an.competition_status)||"ended"==(null==an?void 0:an.competition_status),children:[(0,he.jsx)(b.ZP,{value:!1,style:{width:"120px"},children:"战队赛"}),(0,he.jsx)(b.ZP,{value:!0,style:{width:"120px"},children:"个人赛"})]})}),0==g.getFieldValue("personal")&&(0,he.jsxs)(he.Fragment,{children:[(0,he.jsx)(f.Z.Item,{className:z,style:{marginTop:"-2px"},label:" ",colon:!1,children:(0,he.jsxs)("div",{style:{display:"flex"},children:[(0,he.jsx)("span",{style:{margin:"0 10px 0 -50px"},children:"学生数"}),(0,he.jsx)(f.Z.Item,{name:"student_min",rules:[{pattern:new RegExp(/^[0-9]+([.]{1}[0-9]+){0,1}$/,"g"),message:"必须是数值"}],children:(0,he.jsx)(j.Z,{style:{width:"100px"}})}),(0,he.jsx)("span",{style:{margin:"0 10px"},children:"至"}),(0,he.jsx)(f.Z.Item,{name:"student_max",rules:[{pattern:new RegExp(/^[0-9]+([.]{1}[0-9]+){0,1}$/,"g"),message:"必须是数值"}],children:(0,he.jsx)(j.Z,{style:{width:"100px"}})}),(0,he.jsx)("span",{style:{margin:"0 10px"},children:"人"}),(0,he.jsx)(f.Z.Item,{name:"student_checkbox",children:(0,he.jsx)(ie.Z,{style:{marginLeft:"20px"},disabled:3===(null==an?void 0:an.mode),checked:De,onChange:function(e){var n;return Ee(null==e||null===(n=e.target)||void 0===n?void 0:n.checked)},children:(0,he.jsx)("span",{children:"不可存在多个战队中"})})})]})}),(0,he.jsx)(f.Z.Item,{className:z,style:{marginTop:"-12px"},label:" ",name:"competition_staffs",colon:!1,children:(0,he.jsxs)("div",{style:{display:"flex"},children:[(0,he.jsx)("span",{style:{margin:"0 10px 0 -50px"},children:"教师数"}),(0,he.jsx)(f.Z.Item,{name:"teacher_min",rules:[{pattern:new RegExp(/^[0-9]+([.]{1}[0-9]+){0,1}$/,"g"),message:"必须是数值"}],children:(0,he.jsx)(j.Z,{style:{width:"100px"}})}),(0,he.jsx)("span",{style:{margin:"0 10px"},children:"至"}),(0,he.jsx)(f.Z.Item,{name:"teacher_max",rules:[{pattern:new RegExp(/^[0-9]+([.]{1}[0-9]+){0,1}$/,"g"),message:"必须是数值"}],children:(0,he.jsx)(j.Z,{style:{width:"100px"}})}),(0,he.jsx)("span",{style:{margin:"0 10px"},children:"人"}),(0,he.jsx)(f.Z.Item,{name:"teacher_checkbox",children:(0,he.jsx)(ie.Z,{style:{marginLeft:"20px"},disabled:3===(null==an?void 0:an.mode),checked:Ve,onChange:function(e){var n;return Be(null==e||null===(n=e.target)||void 0===n?void 0:n.checked)},children:(0,he.jsx)("span",{children:"不可存在多个战队中"})})})]})})]}),1==g.getFieldValue("personal")&&(0,he.jsx)(f.Z.Item,{label:" ",children:(0,he.jsxs)(le.Z,{wrap:!1,gutter:10,children:[(0,he.jsx)(se.Z,{children:(0,he.jsx)(f.Z.Item,{name:"is_student",style:{marginTop:"-12px"},valuePropName:"checked",normalize:function(e,n,t){return e||t.is_teacher||t.is_professional?e:(v.ZP.warning("请选择至少一种身份可以报名参赛"),!(e||t.is_teacher||t.is_professional))},children:(0,he.jsx)(ie.Z,{children:"学生身份参赛"})})}),(0,he.jsx)(se.Z,{children:(0,he.jsx)(f.Z.Item,{name:"is_teacher",style:{marginTop:"-12px"},valuePropName:"checked",normalize:function(e,n,t){return e||t.is_student||t.is_professional?e:(v.ZP.warning("请选择至少一种身份可以报名参赛"),!(e||t.is_student||t.is_professional))},children:(0,he.jsx)(ie.Z,{children:"教师身份参赛"})})}),(0,he.jsx)(se.Z,{children:(0,he.jsx)(f.Z.Item,{name:"is_professional",style:{marginTop:"-12px"},valuePropName:"checked",normalize:function(e,n,t){return e||t.is_teacher||t.is_student?e:(v.ZP.warning("请选择至少一种身份可以报名参赛"),!(e||t.is_teacher||t.is_student))},children:(0,he.jsx)(ie.Z,{children:"专业人士身份参赛"})})})]})})]}),(0,he.jsx)("div",{className:X,children:(0,he.jsx)(pe.Z,{className:$,htmlType:"submit",onClick:r()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)}))),children:"保存更改"})})]}),(0,he.jsx)(x.Z,{centered:!0,title:"以下数据导入失败",open:Ke,okText:"确定",cancelText:"取消",onOk:function(){Xe(!1)},onCancel:function(){Xe(!1)},children:(0,he.jsx)(oe.Z,{bordered:!0,columns:[{title:"手机号",dataIndex:"phone"},{title:"姓名",dataIndex:"name"},{title:"邮箱",dataIndex:"email"}],dataSource:nn,pagination:!1,rowKey:function(e){return e.name}})})]})})),ve="all___GiQqZ",ge="title___YtceA",ye="content___Es9RO",je="content_icon___SNFzF",be="content_info___rSAWs",we="content_title___Hkmmk",Ze="content_size___jLmmn",ke="content_img___NRn9i",Ne="content_img2___D23TM",Ie="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAA+9JREFUWEeVl12IVVUUx39rnyuj2UswQiEp1osURFESPoimkPgShJMQQ2UFDsOoEYmOn4yUToXcoSxNsYJewg+klxgJJ8GnqPzoSURUQh998MGBKWdcsvc959599t3nwwuXc+496+z1X//1LXqEXv7jMLCGhLkIkAAm/drf2b292mfhf/7z2L2V1/Q93P0khnGUQdEmJxH6ckoyBb6yR1WcGeJfW8pbBrSup0QPcA9hbs5inwFrkc9KeP8orESYEP0CzVkfUuhb4CvLQMYAlbkkACE6WgGg6LAqN4Uu839nICy5ug/NBVaRr8vckL0TshKy5xtjnzkAn3kMxKyqivDwUMMUDf5CmCFhCaTx5YPM9DgAeyMuKKMvUxhjSrhAD2tlLf+6gD/DU0xxnIRl7UAOjBQdCQD4AlkG1Iv0+xgWSz83WuS2PvorTzLNNQyPd6V6YhnYE7igyo/F9eCCvMcrvvI2iF84i7Aqx0KqR3RXrSx4gEHSb6cu5Om8KO/zchTAaSYQVnalu1gGdlQASFyWLEe4heEs8Gw7a/Js3aeH56WfazkXnGA+wlWMV+y8wBUdDgB0U/y7DLPK+XOMFzH8gdDTVR1bcXIZQ5+s57qT/5mngeMYlhYVO9GtXh2I+bfBRhnm27Y/xxgCvmk3rLB5Gf7HOCAzCC9hmF3WwES3FBQiC8bSP4sFso3bOVqbnMbwZiyqo5bGGlPqBtFP0K7o7LTbP2WEV8PA0kM8wRSXMCysVBj2j6A6in6cxkA3lZaB7TLC59HIHmMpcB5DIzofJPyEcBfDZgeyoJSLflSQBfaFOSyW3VyNAXBBdoBhDKNtFjrl9ksZYJuT+YETGN6KtnuXhpsilbDl/yuyn+eKlLvDrfOanMHwepuFhAnmsVrWMeNkfmQFyrkiV4kOFTDQYL+MsrMMgFPwNfOYdpXuBYSLzGG1DHCnnTUW5Pdcx7AoBkJ0sADAbJbIPv6uApAyYTjIIjZxU4QHXUF7jD0Ie2OxIjoQSUPDLWmyoI7yOjJ6jIUoNxFXzltDbhovohsi88AsDkqTzXUOryujR5kAVoZFSfTDFIA/MCQMyVccqnt4HTn9jk8RdnnB6lJT9INoDIzTyxsywnSdw6tk9BwNrvAbwmthOoquL6wDN2jwTzpadZaRol3BLzT5nmIbuW1iz8TngXdrzQPxSlY2Q9ZZZJwL3gl6QdFqFdsD/PUtNnTWGOVE+1MAZcNmFahwduyelDv7pr9Xupnwbe65aaVshi+jM2xivoKMAR9g3tBJ0XWcJKEvTI/cwOFbVGdxKVvv8kvMKctAL8phDGvcEhFTUGdPKHJTfB6YRBjnMQYfAr/L5O84EyIQAAAAAElFTkSuQmCC",Ae=t(10032),Se=["competitions","globalSetting","loading","dispatch","user"],Ce=(0,h.connect)((function(e){var n=e.competitions,t=e.loading,i=e.globalSetting,l=e.user;return{competitions:n,globalSetting:i,loading:t.models.competitions,user:l}}))((function(e){e.competitions,e.globalSetting,e.loading;var n=e.dispatch,t=(e.user,p()(e,Se)),i=(0,m.useState)(""),l=d()(i,2),s=l[0],o=l[1],a=(0,m.useState)(""),r=d()(a,2),c=r[0],u=r[1];(0,m.useEffect)((function(){h()}),[]);var h=function(){(0,ce.Mn)(null==t?void 0:t.competitionId).then((function(e){var n,i;0==(null==e?void 0:e.status)?(o(null==e||null===(n=e.data)||void 0===n?void 0:n.competition_image),u(null==e||null===(i=e.data)||void 0===i?void 0:i.qr_code_image),null==t||t.loadingFunction(!1)):v.ZP.error(null==e?void 0:e.message)}))},_=function(e,i){(0,ce.o3)(null==t?void 0:t.competitionId).then((function(l){var s=new FormData;s.append("file",null==e?void 0:e.file),s.append("source_id",null==l?void 0:l.id),s.append("source_type",i),(0,Ae.ZP)("/api/competitions/set_attachments.json",{method:"post",body:s},!0).then((function(e){"success"==(null==e?void 0:e.message)?(v.ZP.success("上传成功"),h(),n({type:"competitions/getStaff",payload:{identifier:null==t?void 0:t.competitionId}}),n({type:"competitions/getHeader",payload:{identifier:null==t?void 0:t.competitionId}})):v.ZP.error(null==e?void 0:e.message)}))}))};return(0,he.jsxs)("div",{className:ve,children:[(0,he.jsx)("div",{className:ge,children:"上传图片"}),(0,he.jsxs)("div",{className:ye,children:[(0,he.jsx)("img",{src:Ie,className:je}),(0,he.jsxs)("div",{className:be,children:[(0,he.jsx)(ne.Z,{accept:"image/*",customRequest:function(e){return _(e,"Competition")},showUploadList:!1,children:(0,he.jsx)("div",{className:we,children:"上传竞赛封面图"})}),(0,he.jsx)("div",{className:Ze,children:"图片尺寸:792 x 340"})]}),(0,he.jsx)("img",{src:s,className:ke})]}),(0,he.jsxs)("div",{className:ye,children:[(0,he.jsx)("img",{src:Ie,className:je}),(0,he.jsxs)("div",{className:be,children:[(0,he.jsx)(ne.Z,{accept:"image/*",customRequest:function(e){return _(e,"Competition_code")},showUploadList:!1,children:(0,he.jsx)("div",{className:we,children:"上传交流群二维码"})}),(0,he.jsx)("div",{className:Ze,children:"图片尺寸:160 x 160"})]}),(0,he.jsx)("img",{src:c,className:Ne})]})]})})),Fe=t(37205),Pe=t.n(Fe),Te="all___d1AWD",Le="title___VIjuM",De="add_people___qkPex",Ee="people_icon___lz5gl",Re="content___a8dSX",Me="content_info___ekLIa",Ve="info_icon___kXP8P",Be="info_title___Hld67",ze="info_content___kbIuT",Oe="info_content_icon___uNxzs",Ye="info_content_title___IfIi8",He="info_open___NzrUi",qe="info_delete___rZhhO",Qe="questions_info___n9Fnq",Ge="form_item___oxzha",Ue="form_item_item___yPf7l",We="form_item_small___EkG9G",Je="guanka_title___uUWQl",Ke="nandu_1___qifbd",Xe="nandu_2___qVJU8",$e="nandu_3___NRfLL",en="close_icon___f2hON",nn="footer___UDiYB",tn="save_button___t7iMm",ln="textone___TAI4F",sn="deletecolor___ldQnR",on="qselect___uuNp6",an="qinput___xHGmH",rn="modalclass___dPDG7",cn="popu___G8M92",dn="pingcesetting___zHJaT",un=t(81327),pn=t(94001),mn=t(43428),hn=t(71418),_n=t(28103),fn=t(53864),xn=t(52943),vn="drawer___HuOiD",gn="menu___JTt0c",yn="actived___zd6GY",jn="actived2___hNW2h",bn="subTag___rHkqz",wn="listItem___dr1wg",Zn="info___bpBpK",kn="title___typIH",Nn="titleLeft___b4niC",In="filter___HBJIT",An="description___Rqa6Q",Sn="menuCourse____Msk3",Cn="button_right___T8tiB",Fn=t(73759),Pn=t(33706),Tn=t(95888),Ln=t(95154),Dn=t(78745),En=["classroomList","loading","dispatch","shixunsList"],Rn=(j.Z.Search,[{id:"type",name:"来源",children:[{name:"全部",id:"all",type:"type"},{name:"我的",id:"mine",type:"type"}]},{id:"diff",name:"难度",children:[{name:"全部",id:"",type:"diff"},{name:"初级",id:1,type:"diff"},{name:"中级",id:2,type:"diff"},{name:"中高级",id:3,type:"diff"},{name:"高级",id:4,type:"diff"}]}]),Mn=(0,h.connect)((function(e){return{classroomList:e.classroomList,shixunsList:e.shixunsList,loading:e.loading.effects}}))((function(e){var n,t,i=e.classroomList,s=(e.loading,e.dispatch),a=e.shixunsList,c=p()(e,En),u=(0,m.useState)(l()({},(0,h.useParams)())),_=d()(u,2),f=_[0],x=(_[1],i.shixunLists),g=i.shixunAiRecommendLists,j=(0,m.useState)(""),w=d()(j,2),k=w[0],N=w[1],I=(0,m.useState)({}),A=d()(I,2),S=A[0],C=A[1],F=(0,m.useState)([]),P=d()(F,2),T=P[0],L=P[1],D=(0,m.useState)(!1),E=d()(D,2),R=E[0],M=E[1],V=[{name:"最新",id:"created_at"},{name:"最热",id:"myshixuns_count"}].filter((function(e){return!!e})),B=(0,m.useState)({page:1,type:"mine",diff:"",status:"published",order:"desc",not_open:!0,limit:20,sort:"myshixuns_count",no_jupyter:1,group_id:null}),z=d()(B,2),O=z[0],Y=z[1];(0,m.useEffect)((function(){H()}),[f.coursesId,O]),(0,m.useEffect)((function(){"新增赛题"===i.actionTabs.key&&(N(""),Y({page:1,type:"mine",diff:"",status:"published",order:"desc",not_open:!0,limit:20,sort:"myshixuns_count",no_jupyter:1,group_id:null})),s({type:"shixunsList/getMenus",payload:{}})}),[i.actionTabs.key]),(0,m.useEffect)((function(){(null!=x&&x.shixun_list||null!=g&&g.shixun_list)&&C("recommend"===O.sort?g:x)}),[x,g]);var H=function(){var e=r()(o()().mark((function e(){var n,t,i;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(M(!0),n=l()({},O),"recommend"===O.sort&&(n.sort="myshixuns_count"),"recommend"!==O.sort){e.next=8;break}return e.next=6,s({type:"classroomList/getShixunAiRecommendLists",payload:l()(l()({},n),{},{course_id:f.coursesId})});case 6:e.next=11;break;case 8:return t=l()({},n),e.next=11,s({type:"classroomList/getShixunLists",payload:t});case 11:return e.next=13,(0,Ae.ZP)("/api/users/user_setting_groups.json",{method:"get",params:{type:"Shixun"}});case 13:i=e.sent,L([{id:null,name:"全部"},{id:-1,name:"未加入目录"}].concat(Pe()((null==i?void 0:i.groups)||[]))),N(""),M(!1);case 17:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();if("选用实践课程"!==i.actionTabs.key){var q=(0,Ln.P)(),Q=d()(q,4),G=Q[0],U=Q[1],W=Q[2],J=(Q[3],function(){var e=r()(o()().mark((function e(n){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(0,ce.su)({id:null==c?void 0:c.competitionId,shixun_ids:n.map((function(e){return e.id}))}).then((function(e){0==(null==e?void 0:e.status)?(v.ZP.success("添加成功"),s({type:"classroomList/setActionTabs",payload:{}}),s({type:"competitions/getHeader",payload:{identifier:null==c?void 0:c.competitionId}}),null==c||c.queryQuetions(!0)):v.ZP.error(null==e?void 0:e.message)}));case 1:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}()),K=(0,m.useState)(!1),X=d()(K,2),$=X[0],ee=X[1];return(0,he.jsxs)(he.Fragment,{children:[(0,he.jsxs)(mn.Z,{title:"选用实践项目",placement:"bottom",height:"100%",closable:!0,open:"新增赛题"===i.actionTabs.key,rootClassName:vn,destroyOnClose:!0,onClose:function(){s({type:"classroomList/setActionTabs",payload:{key:""}})},footer:(0,he.jsxs)("div",{className:"tc",style:{height:"64px",display:"flex",alignItems:"center",justifyContent:"center"},children:[(0,he.jsx)(Z.ZP,{size:"middle",onClick:function(){s({type:"classroomList/setActionTabs",payload:{}})},style:{marginRight:8,width:"120px",height:"40px",fontSize:"16px",borderRadius:"4px"},children:"取消"}),(0,he.jsx)(Z.ZP,{style:{width:"120px",height:"40px",fontSize:"16px",borderRadius:"4px"},size:"middle",onClick:r()(o()().mark((function e(){var n,t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!k){e.next=8;break}return ee(!0),t=null==S||null===(n=S.shixun_list)||void 0===n?void 0:n.filter((function(e){return k.includes(e.identifier)})).map((function(e){return{id:e.id,is_copy:0,is_use:1}})),e.next=5,J(t);case 5:ee(!1),e.next=9;break;case 8:v.ZP.error("请选择实践项目");case 9:case"end":return e.stop()}}),e)}))),type:"primary",loading:$,children:"确定"})]}),children:[(0,he.jsx)("section",{className:"tc",children:(0,he.jsx)(Pn.Z,{onChange:function(e){null!=e&&e.keyword.trim()&&(0,Dn.tk)({name:null==e?void 0:e.keyword.trim(),copywriting:null==e?void 0:e.keyword.trim(),position:"Shixun"}),Y(l()(l()({},O),{},{keyword:null==e?void 0:e.keyword.trim(),schools:null==e?void 0:e.schools.trim(),creator:null==e?void 0:e.creator.trim(),page:1}))}})}),(0,he.jsx)("section",{className:"edu-container",children:(0,he.jsx)(hn.Z,{spinning:R,children:(0,he.jsxs)("aside",{children:[Rn.map((function(e,n){var t;return 0!==n?null:(0,he.jsxs)("ul",{className:gn,children:[(0,he.jsx)("li",{children:e.name}),null==e||null===(t=e.children)||void 0===t?void 0:t.map((function(n,t){return(0,he.jsx)("li",{className:O[e.id]==n.id?yn:"",onClick:function(){O[e.id]=n.id,O.page=1,Y(l()({},O))},children:(0,he.jsx)("strong",{children:n.name})},t)}))]},n)})),(0,he.jsxs)("ul",{className:gn,children:[(0,he.jsx)("li",{children:"方向"}),(0,he.jsx)("li",{className:null!=O&&O.discipline_id?"":yn,onClick:function(){delete O.tag_level,delete O.sub_discipline_id,delete O.discipline_id,O.page=1,Y(l()({},O))},children:(0,he.jsx)("strong",{children:"全部"})}),a.menus&&a.menus.map((function(e,n){return(0,he.jsxs)("li",{className:(null==O?void 0:O.discipline_id)==e.id?yn:"",children:[(0,he.jsx)("strong",{onClick:function(){O.tag_level=1,O.discipline_id=e.id,delete O.sub_discipline_id,O.page=1,Y(l()({},O))},children:e.name}),(0,he.jsx)("div",{children:e.sub_repertoires.map((function(n,t){return(0,he.jsxs)("div",{className:"mt5",children:[(0,he.jsx)("div",{className:(null==O?void 0:O.sub_discipline_id)==n.id&&2===O.tag_level?"".concat(jn," ").concat(bn):bn,onClick:function(){O.tag_level=2,O.discipline_id=e.id,O.sub_discipline_id=n.id,Y(l()({},O))},children:n.name}),(0,he.jsx)("ul",{className:"mt5",children:n.tags&&n.tags.map((function(n,t){return(0,he.jsx)("li",{className:O.sub_discipline_id==n.id&&3===O.tag_level?jn:"",onClick:function(){O.tag_level=3,O.discipline_id=e.id,O.sub_discipline_id=n.id,Y(l()({},O))},children:n.name},t)}))})]},t)}))})]},n)}))]}),"mine"===O.type&&(0,he.jsxs)("ul",{className:gn,children:[(0,he.jsx)("li",{children:"目录"}),null==T?void 0:T.map((function(e,n){return(0,he.jsx)("li",{className:O.group_id==e.id?yn:"",onClick:function(){O.group_id=e.id,O.page=1,Y(l()({},O))},children:(0,he.jsx)("strong",{children:e.name})},n)}))]}),Rn.map((function(e,n){var t;return 1!==n?null:(0,he.jsxs)("ul",{className:gn,children:[(0,he.jsx)("li",{children:e.name}),null==e||null===(t=e.children)||void 0===t?void 0:t.map((function(n,t){return(0,he.jsx)("li",{className:O[e.id]==n.id?yn:"",onClick:function(){O[e.id]=n.id,Y(l()({},O))},children:(0,he.jsx)("strong",{children:n.name})},t)}))]},n)})),"mine"==(null==O?void 0:O.type)&&(0,he.jsxs)("ul",{className:gn,children:[(0,he.jsx)("li",{children:"状态"}),(0,he.jsx)("li",{className:0==O.not_open?yn:"",onClick:function(){O.not_open=!1,O.page=1,Y(l()({},O))},children:(0,he.jsx)("strong",{children:"公开"})}),(0,he.jsx)("li",{className:1==O.not_open?yn:"",onClick:function(){O.not_open=!0,O.page=1,Y(l()({},O))},children:(0,he.jsx)("strong",{children:"未公开"})})]}),(0,he.jsxs)(le.Z,{align:"middle",children:[(0,he.jsx)(se.Z,{flex:"1",className:In,children:V.map((function(e,n){return(0,he.jsx)(Z.ZP,{className:"mr20",type:O.sort===e.id?"primary":"default",onClick:function(){O.sort=e.id,Y(l()({},O))},children:e.name},n)}))}),(0,he.jsx)(se.Z,{className:"c-grey-999",children:(0,he.jsx)("div",{className:Sn,children:(0,he.jsxs)("ul",{children:[(0,he.jsxs)("li",{children:["已选",(0,he.jsx)("span",{className:"c-blue",children:k.length>0?1:0}),"个"]}),(0,he.jsxs)("li",{children:["共",(0,he.jsx)("span",{className:"c-blue",children:S.shixuns_count}),"个"]}),(0,he.jsxs)("li",{className:"current",onClick:function(){O.order="asc"===O.order?"desc":"asc",Y(l()({},O))},children:["学习人数",(0,he.jsxs)("p",{className:"edu-sorter current ".concat(O.order),children:[(0,he.jsx)("span",{className:"iconfont icon-sanjiaoxing-up"}),(0,he.jsx)("span",{className:"iconfont icon-sanjiaoxing-down"})]})]})]})})})]}),0===(null==S||null===(n=S.shixun_list)||void 0===n?void 0:n.length)&&(0,he.jsx)(xn.Z,{}),(0,he.jsx)(b.ZP.Group,{style:{display:"block"},value:k,onChange:function(e){N(e.target.value)},children:null==S||null===(t=S.shixun_list)||void 0===t?void 0:t.map((function(e,n){var t,i;return(0,he.jsx)("div",{className:wn,style:{cursor:"auto"},children:(0,he.jsx)(b.ZP,{value:null==e?void 0:e.identifier,style:{marginTop:"3px"},disabled:null==e?void 0:e.need_authorize,children:(0,he.jsxs)("div",{className:Zn,children:[(0,he.jsx)("div",{className:kn,children:(0,he.jsxs)("div",{className:Nn,children:[(0,he.jsx)(h.Link,{to:"/shixuns/".concat(e.identifier,"/challenges"),target:"_blank",children:(0,he.jsx)("strong",{className:"font16",dangerouslySetInnerHTML:{__html:e.title}})}),(null==e?void 0:e.need_authorize)&&(0,he.jsx)("span",{onClick:function(){(0,Fn.rX)(!1)},style:{marginRight:"auto"},className:"tag-style bg-pink current ml10",children:"需授权"}),(0,Tn.Ny)()&&1===(null==e?void 0:e.mark_status)&&(0,he.jsx)(y.Z,{zIndex:1e4,title:null==e?void 0:e.mark_content,children:(0,he.jsx)("span",{style:{marginRight:"auto",background:"#2FA34F"},className:"tag-style current ml10",children:"正常"})}),(0,Tn.Ny)()&&2===(null==e?void 0:e.mark_status)&&(0,he.jsx)(y.Z,{zIndex:1e4,title:null==e?void 0:e.mark_content,children:(0,he.jsx)("span",{style:{marginRight:"auto",background:"#FF8C29"},className:"tag-style current ml10",children:"需完善"})}),(0,Tn.Ny)()&&3===(null==e?void 0:e.mark_status)&&(0,he.jsx)(y.Z,{zIndex:1e4,title:null==e?void 0:e.mark_content,children:(0,he.jsx)("span",{style:{marginRight:"auto",background:"#E53333"},className:"tag-style current ml10",children:"无法使用"})}),(0,he.jsx)(Z.ZP,{ghost:!0,href:"/shixuns/".concat(e.identifier,"/challenges"),type:"primary",target:"_blank",className:Cn,children:"体验实训"})]})}),(0,he.jsx)("div",{className:"flex-wrp mt10 font14 c-light-black",children:(0,he.jsx)("span",{className:An,dangerouslySetInnerHTML:{__html:e.description}})}),(0,he.jsx)("div",{className:" mt15",children:e.challenge_names.map((function(e,n){return(0,he.jsxs)("span",{className:"mr30",children:["第",n+1,"关 ",e," "]},n)}))}),(0,he.jsx)(_n.Z,{dashed:!0}),(0,he.jsxs)("div",{className:"c-light-black mt20",children:[null!=e&&null!==(t=e.content)&&void 0!==t&&t.author_name?(0,he.jsx)("span",{dangerouslySetInnerHTML:{__html:null==e||null===(i=e.content)||void 0===i||null===(i=i.author_name)||void 0===i?void 0:i[0]}}):(0,he.jsx)("span",{children:e.author_name}),(0,he.jsx)("span",{className:"ml15 mr15",children:"|"}),e.author_school_name&&(0,he.jsxs)(m.Fragment,{children:[(0,he.jsx)("span",{children:e.author_school_name}),(0,he.jsx)("span",{className:"ml15 mr15",children:"|"})]}),(0,he.jsxs)("span",{children:["难度系数 ",e.level]}),(0,he.jsx)("span",{className:"ml15 mr15",children:"|"}),(0,he.jsx)("span",{children:"学习人数 "}),(0,he.jsx)("span",{children:e.study_count})]})]})})},n)}))})]})})}),(0,he.jsx)("div",{className:"tc mt20",children:(0,he.jsx)(fn.Z,{defaultCurrent:1,hideOnSinglePage:!0,defaultPageSize:20,showSizeChanger:!1,current:O.page||1,showQuickJumper:!0,total:null==S?void 0:S.shixuns_count,onChange:function(e){O.page=e,Y(l()({},O))}})})]},"bottom"),(0,he.jsx)(Ln.Z,{visible:G,onCancel:U,renderData:W,inPaper:!1,onOk:J,modalType:"multiple",type:"shixun",position:"选中实训"})]})}})),Vn=["competitions","shixunHomeworks","globalSetting","dispatch","user"],Bn=j.Z.TextArea,zn=function(e){return null!=e&&e.includes("已截止")?(0,he.jsx)("div",{style:{borderRadius:13,width:56,height:20,display:"inline-flex",alignItems:"center",justifyContent:"center",border:"1px solid #FFC4C4",color:"#E53333",fontSize:12,marginRight:8},children:"已截止"}):null!=e&&e.includes("进行中")?(0,he.jsx)("div",{style:{borderRadius:13,width:56,height:20,display:"inline-flex",alignItems:"center",justifyContent:"center",border:"1px solid #C4D2F1",color:"#3061D0",fontSize:12,marginRight:8},children:"进行中"}):null!=e&&e.includes("未发布")?(0,he.jsx)("div",{style:{borderRadius:13,width:56,height:20,display:"inline-flex",alignItems:"center",justifyContent:"center",border:"1px solid #DADBDE",color:"#999999",fontSize:12,marginRight:8},children:"未发布"}):null!=e&&e.includes("提交中")?(0,he.jsx)("div",{style:{borderRadius:13,width:56,height:20,display:"inline-flex",alignItems:"center",justifyContent:"center",border:"1px solid #B1F0E1",color:"#00B187",fontSize:12,marginRight:8},children:"提交中"}):null!=e&&e.includes("已结束")?(0,he.jsx)("div",{style:{borderRadius:13,width:56,height:20,display:"inline-flex",alignItems:"center",justifyContent:"center",border:"1px solid #FFC4C4",color:"#E53333",fontSize:12,marginRight:8},children:"已结束"}):null!=e&&e.includes("考试中")?(0,he.jsx)("div",{style:{borderRadius:13,width:56,height:20,display:"inline-flex",alignItems:"center",justifyContent:"center",border:"1px solid #C4D2F1",color:"#3061D0",fontSize:12,marginRight:8},children:"考试中"}):null!=e&&e.includes("未开始")?(0,he.jsx)("div",{style:{borderRadius:13,width:56,height:20,display:"inline-flex",alignItems:"center",justifyContent:"center",border:"1px solid #DADBDE",color:"#999999",fontSize:12,marginRight:8},children:"未开始"}):null!=e&&e.includes("补交中")?(0,he.jsx)("div",{style:{borderRadius:13,width:56,height:20,display:"inline-flex",alignItems:"center",justifyContent:"center",border:"1px solid rgba(255,157,24,0.3)",color:"#FF9D18",fontSize:12,marginRight:8},children:"补交中"}):void 0},On=(0,h.connect)((function(e){return{competitions:e.competitions,shixunHomeworks:e.shixunHomeworks,globalSetting:e.globalSetting,user:e.user}}))((function(e){var n,t,i,s,a=e.competitions,c=(e.shixunHomeworks,e.globalSetting,e.dispatch),u=e.user,g=p()(e,Vn),w=f.Z.useForm(),k=d()(w,1)[0],I=f.Z.useForm(),A=d()(I,1)[0],S=(0,m.useState)(!0),C=d()(S,2),F=C[0],P=C[1],T=(0,m.useState)([]),L=d()(T,2),D=L[0],E=L[1],R=(0,m.useState)(!1),M=d()(R,2),V=M[0],B=(M[1],(0,m.useState)([])),z=d()(B,2),O=z[0],Y=z[1],H=a.Header,q=(0,m.useState)(1),Q=d()(q,2),G=(Q[0],Q[1],(0,m.useState)({})),U=d()(G,2),W=U[0],J=U[1],K=(0,h.useParams)(),X=K.identifier,$=(K.enter,(0,m.useState)({})),ee=d()($,2),ne=ee[0],te=ee[1],oe=(0,m.useState)([]),ae=d()(oe,2),re=ae[0],de=ae[1],ue=(0,m.useState)(""),me=d()(ue,2),_e=me[0],fe=me[1],xe=(0,m.useState)([]),ve=d()(xe,2),ge=ve[0],ye=ve[1],je=(0,m.useState)(!1),be=d()(je,2),we=be[0],Ze=be[1],ke=(0,m.useState)([{type:"practice",name:"课堂实验",open:!1,url:"shixun_homework"},{type:"normal",name:"图文作业",open:!1,url:"common_homework"},{type:"group",name:"分组作业",open:!1,url:"group_homework"},{type:"hack",name:"编程作业",open:!1,url:"program_homework"},{type:"exercise",name:"在线考试",open:!1,url:"exercise"}]),Ne=d()(ke,2),Ie=Ne[0],Se=Ne[1],Ce=(0,m.useState)({input:""}),Fe=d()(Ce,2),mn=Fe[0],hn=Fe[1];function _n(){return(_n=r()(o()().mark((function e(){var n;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ae.ZP)("/api/competitions/".concat(X,"/get_course_settings.json"),{method:"get"});case 2:0===(null==(n=e.sent)?void 0:n.status)&&te(n.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function fn(){return vn.apply(this,arguments)}function vn(){return(vn=r()(o()().mark((function e(){var n;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return null==g||g.loadingFunction(!0),e.next=3,(0,Ae.ZP)("/api/users/".concat(u.userInfo.login,"/courses.json"),{method:"get",params:{category:"manage",page:1,per_page:1e3,username:u.userInfo.login,no_limit_per_page:1}});case 3:n=e.sent,null==g||g.loadingFunction(!1),de(null==n?void 0:n.courses);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}(0,m.useEffect)((function(){1===H.mode?(A.resetFields(),yn(!0)):2===H.mode?(A.resetFields(),function(){_n.apply(this,arguments)}()):function(){Nn.apply(this,arguments)}()}),[H]),(0,m.useEffect)((function(){u.userInfo.login&&fn()}),[u]);var gn=function(e){var n,t=e.total_score,i=e.difficulty_level_sort,l=null===(n=e.challenge_settings)||void 0===n?void 0:n.filter((function(e){return e.checked})).length;if(l){var s,o=t/e.challenge_settings.filter((function(e){return e.checked})).map((function(e){return"desc"===i?e.challenge_exp_desc:e.challenge_exp})).reduce((function(e,n){return e+n})),a=0,r=0;switch(e.score_setting){case 0:var c=parseFloat((t/l).toFixed(1));e.challenge_settings.map((function(e,n){e.checked?(a=n,e.score=c>0?c:0):e.score=0})),s=(t-c*(l-1)).toFixed(1),e.challenge_settings[a].score=s>0?s:0;break;case 1:e.challenge_settings.map((function(e,n){e.checked?(a=n,r+=Number((Math.round(("desc"===i?e.challenge_exp_desc:e.challenge_exp)*o*10)/10).toFixed(1)),e.score=(Math.round(("desc"===i?e.challenge_exp_desc:e.challenge_exp)*o*10)/10).toFixed(1)):e.score=0}));var d=e.challenge_settings[a].score;s=(t-r+Number(d)).toFixed(1),e.challenge_settings[a].score=s>0?s:0}}else e.challenge_settings.map((function(e,n){e.challenge_score=0}))},yn=function(e){(0,ce.lm)(null==g?void 0:g.competitionId).then((function(n){if(0==(null==n?void 0:n.status)){if(null!=n&&n.data){var t=null==n?void 0:n.data;if(e){for(var i in t)t[i].show_info=!1;Y(t)}else for(var l in O)t[l].show_info=O[l].show_info;E(t)}else E([]);null==g||g.loadingFunction(!1)}else v.ZP.error(null==n?void 0:n.message)}))},jn=function(e,n){var t=D;for(var i in t)t[i].id==e.id&&("open"==n?t[i].show_info=!0:"close"==n&&(t[i].show_info=!1));E(Pe()(t)),Y(Pe()(t))},bn=function(){if(function(e){var n=[];for(var t in e){var i,l,s=null===(i=e[t])||void 0===i||null===(i=i.challenge_settings)||void 0===i?void 0:i.reduce((function(e,n){return e+Number(n.score)}),0);(null==s?void 0:s.toFixed(10))!==(null===(l=e[t])||void 0===l||null===(l=l.total_score)||void 0===l?void 0:l.toFixed(10))&&n.push("赛题".concat(Number(t)+1,"的关卡任务总分必须等于总分值:").concat(e[t].total_score,"分\n"))}return!(n.length>0&&(v.ZP.warning(n),1))}(D)){for(var e in D){var n,t;if(D[e].shixun_id=null===(n=D[e])||void 0===n||null===(n=n.challenge_settings[0])||void 0===n?void 0:n.shixun_id,(null===(t=D[e])||void 0===t||null===(t=t.challenge_settings)||void 0===t?void 0:t.length)>0)for(var i in null===(l=D[e])||void 0===l?void 0:l.challenge_settings){var l,s;D[e].challenge_settings[i].challenge_score=null===(s=D[e])||void 0===s?void 0:s.challenge_settings[i].score}}(0,ce.JM)({id:null==g?void 0:g.competitionId,shixuns:D}).then((function(e){0==(null==e?void 0:e.status)?(v.ZP.success("更改成功"),yn(!1)):v.ZP.error(null==e?void 0:e.message)}))}};function wn(e){return Zn.apply(this,arguments)}function Zn(){return Zn=r()(o()().mark((function e(n){var t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return null==g||g.loadingFunction(!0),e.next=3,(0,Ae.ZP)("/api/competitions/".concat(X,"/switch_mode.json"),{method:"post",body:{mode:n}});case 3:return t=e.sent,null==g||g.loadingFunction(!1),0===(null==t?void 0:t.status)&&c({type:"competitions/getHeader",payload:{identifier:X}}),e.abrupt("return",!0);case 7:case"end":return e.stop()}}),e)}))),Zn.apply(this,arguments)}function kn(){return(kn=r()(o()().mark((function e(n){var t,i;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Ze(!0),e.next=3,(0,Ae.ZP)("/api/competitions/get_competition_course_homework.json",{method:"get",params:{course_id:ne.course_id,competition_course_game_id:n,id:X}});case 3:t=e.sent,Ze(!1),0===(null==t?void 0:t.status)?(fe(n),ye(null==t||null===(i=t.data)||void 0===i?void 0:i.list)):v.ZP.info("当前课堂暂无数据,请更换绑定课堂或在当前课堂新增作业或考试");case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Nn(){return(Nn=r()(o()().mark((function e(){var n,t,i,l,s;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ae.ZP)("/api/competitions/".concat(X,"/get_work_settings.json0"),{method:"get"});case 2:0===(null==(n=e.sent)?void 0:n.status)&&(P(null==n?void 0:n.data.is_new),A.setFieldsValue({evaluation_setting:null==n||null===(t=n.data)||void 0===t?void 0:t.evaluation_setting,commit_num:null==n||null===(i=n.data)||void 0===i?void 0:i.commit_num,evaluation_time:null==n||null===(l=n.data)||void 0===l?void 0:l.evaluation_time,evaluation_script:null==n||null===(s=n.data)||void 0===s?void 0:s.evaluation_script}));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var In=function(e){var n=e.getFieldsValue();for(var t in console.log(n),n)if(void 0!==n[t])return!0;return!1};return(0,he.jsxs)("div",{className:Te,children:[(0,he.jsxs)("div",{style:{padding:30},children:[(0,he.jsx)("div",{style:{marginBottom:30,fontSize:14,fontWeight:600,color:"#232B40"},children:"模式设置"}),(0,he.jsxs)("div",{style:{marginLeft:42},children:[(0,he.jsx)("span",{children:"竞赛模式"}),(0,he.jsx)(b.ZP.Group,{disabled:"progressing"===H.competition_status||"ended"===H.competition_status,value:H.mode,onChange:function(){var e=r()(o()().mark((function e(n){var t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!((null==ne||null===(t=ne.competition_course_games)||void 0===t||null===(t=t[0])||void 0===t||null===(t=t.homeworks)||void 0===t?void 0:t.length)>0||(null==D?void 0:D.length)>0||In(A))){e.next=3;break}return x.Z.confirm({icon:!1,title:"提示",content:"切换模式后,当前已经设置的赛题数据将会被清理,且不可撤回,请确认是否进行切换",onOk:function(){var e=r()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,wn(n.target.value);case 2:e.sent&&fn();case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()}),e.abrupt("return");case 3:return e.next=5,wn(n.target.value);case 5:e.sent&&fn();case 7:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),style:{marginLeft:10,fontSize:14},children:(0,he.jsxs)(un.Z,{direction:"vertical",children:[(0,he.jsxs)(b.ZP,{value:1,children:["实训模式",(0,he.jsx)("span",{style:{color:"#9096A3",marginLeft:10},children:"挑战实训,系统评审"})]}),(0,he.jsxs)(b.ZP,{value:2,children:["课堂模式",(0,he.jsx)("span",{style:{color:"#9096A3",marginLeft:10},children:"参赛者需要进入课堂完成作业,将选择计入成绩的作业生成排行榜"})]}),(0,he.jsxs)(b.ZP,{value:3,disabled:!(0,Tn.Ny)()&&(null==H?void 0:H.is_manager)||"progressing"===H.competition_status||"ended"===H.competition_status,children:["作品模式",(0,he.jsx)("span",{style:{color:"#9096A3",marginLeft:10},children:"参赛者提交作品,系统评审"})]})]})})]})]}),1===H.mode&&(0,he.jsxs)("div",{children:[(0,he.jsxs)("div",{className:Le,style:{display:"flex",alignItems:"center"},children:[(0,he.jsxs)("div",{style:{flex:1},children:["赛题设置",(0,he.jsxs)("span",{style:{marginLeft:20,color:"#9096A3",fontSize:"12px",fontWeight:"normal"},children:["答题起止时间:",(0,he.jsxs)("span",{style:{margin:"0 5px",color:"#165DFF",fontSize:"12px",fontWeight:"normal"},children:[null==H?void 0:H.start_time,"~",null==H?void 0:H.end_time]}),((0,Tn.eB)()||(null==H||null===(n=H.permission)||void 0===n?void 0:n.editable))&&(0,he.jsxs)("a",{style:{marginLeft:10,color:"#165DFF",display:"inline-flex"},onClick:function(){c({type:"competitions/setActionTabs",payload:{key:"7"}})},children:[(0,he.jsx)("i",{className:"iconfont icon-bianji10 font14",style:{color:"#165DFF",marginRight:3}})," 编辑"]})]})]}),"progressing"!=(null==H?void 0:H.competition_status)&&"ended"!=(null==H?void 0:H.competition_status)&&(0,he.jsxs)("div",{className:De,style:{top:"auto"},onClick:function(){c({type:"classroomList/setActionTabs",payload:{key:"新增赛题",params:""}})},children:[(0,he.jsx)("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAF9JREFUOE9jZKAQMOLTb5B0voHhH8OBCwsMD+BSR9gABgaGC/MMG0YNIBAGBgnnHRiYGBwwAuo/oz1YjPH/QWyBCApccCyAowsbwGcANHpHo5GBgcZhAI1esvMCMTkdAHAwQhEikgNIAAAAAElFTkSuQmCC",className:Ee}),"新增赛题"]})]}),(0,he.jsx)("div",{style:{marginTop:"25px"}}),D.map((function(e,n){var t,i,s;return(0,he.jsxs)("div",{className:Re,children:[(0,he.jsxs)("div",{className:Me,children:[(0,he.jsx)("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAAAXNSR0IArs4c6QAAA0JJREFUSEullk2ITlEYx3/PufdlxAYrTKyUhcgkG2LQzMbGhkJMyUca32mMyVdoMrOgoSkTZXxEmY2NDU1RWChEdlaEsfBZihozj+597533vOeee+ctb93e+3HO83/O//k/HwKgF6hH6CagEWEGAWByruibQO6agJ+E9MgqTkS23Z/EYH95RcC0DMh4xiOnbOfS+8ghw15p4mIWsJtbBGyIvU5PlW60DbiGfeuj/enpA4YpsUpW8tgGFT3LJ0xCYxFVrjMu5f4wfGYSDbKcoRRUtBP1xsQ1UE3vo2TPiqow+EPwlOk0ymKGI1DR02gchwoVlXv7xPZ9idWxx4bBjLO2rYrNXmlmdxnwFDrmZR6l1fF7IttYFqv7Go8JWFqTokNapInroicsQFd1dtxSZ0KaZTsPYsAbNDHK/QytvvgKvymxVPRYAphS4YqjAvQdYVBaWWerTvsZwLAaw9QYOFWvTwOGQdGOJIa2V2Xw55ToQXjLRN7Kbr76Ejl9p9eYTsDc+DLsBxqqtFG2PyLa7gEsUxvFdqe0c7kIyP2mN9mOoQ+D+NQv2uZQWq1YJWSPtNFbC6j204rhYgzli7+JVHqoBtEYDsoRzhdSeoUDwLmCGhtXMtEDOZRmy9wcaee9D1T7mI3ybixmrh4sQYrucxLfXVxW3h/mMUXWM+IFvEPAF35hqMvUYydFRPcUxDBdHPJSjtNQSGkvL4BFXkotXYi2OjH0JX/IDTnJljjZu1jCCJ2EQEiHHORZ0lOvY9icW3USu6K7LMDqflbudVEihxymxD1GOYNhrVN772I4SsAahK5M8js1WnSHIxq7nlaqxWsC5sditxmoVJVRAt4gLBj7nlOXRbdZMRxvrPB1+Fp7aOKc6FaH0qKOkdeucpLcV9RFWxxKff0sW2eLhih/P01siG7JqPQ0M+mUk/yppZzlrdGr1PGDDoRjdqqIbnIAJ1Ivl/j4P2BjHeQcs4APtqpFN/LJmUUHEHqYkJywlGxP/6PHWt4FcdXZB6yzlD0kuj4ZE/Maryui8WbVvNGybP92RGl5EDbOIFyL4bzunqZPdU5/o8TC6BUx6AjdCI3xjFqkyqIT+1IqYAjhIZNpk718+AfZ8LVXyCfCsQAAAABJRU5ErkJggg==",className:Ve}),(0,he.jsxs)("div",{className:Be,children:["赛题",n+1]}),(0,he.jsxs)("div",{className:ze,children:[(0,he.jsx)("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAAAXNSR0IArs4c6QAAAnZJREFUSEvtlk1IVFEUx39n3gwpUxKEM35QEU3QJlxYK8FNtWjhJqhFOH4UCBl9UCQVYdMmSLLAQkhJxRmKCipy2yKpTdEH7oSipKAZx00Uhc3MeyfupOGMPS0ZBgLf7t177v2d8z/n3nsEoDKsW23YB2xQ8JqxQn0CGeC9BTfjUXkhBpaBc4UCLLSPF85LIKyXFTYVAyjwxgDvF1pGN+eNvFIe1pFiRDfLWAYWXO3/TlKdkUD+VorFIhzzQI8qNSocydlUSJT66chMszKdoVeUnjLl2VeLVkfZ4Xo0XI6FinK7PcStSESc6iZdk1KG8oAXp4blaXmjhhCueJWueEyeGJtgs25Xh4MKK/LB8yIU+GIp3fGYvMouDmvAUc4gbJyz+G1ymOMiooEmjahSK/DDA1cTURnN3s8HdL2d5rQq1XOh84A+4dCnYflgjAKNWoPQoVCWs0g5m4zJWLBFtzg2F+bOeeBhfQMDd/eKHQyr34EbgN/14K8rZffLPklXNmu9rZxQxZMHe52MSWfWIZd72AMPJqNiQMbmukKVK9BvEZ4Yks+1ber7+J1WFRpyIvBxdHJA3gWatU4dTuXnyFLubQ4RfRyRjIlQhX5VVrkCRRj3WHQlBmXKGFW06DbH5piRVZTRZEwu7bmj1ugIvTmem9x76Y4P/sr92v1aNZ3mJBBaMIczk98QrpkqNP+zlWhZHE4MyURFk+6ylfY/5XUm9zuBNhVKFq3SHPmER1YJ/ekUZdj0e6DPZzGecuhUZXUOEAZ9Ds9TFo0odf96Dn/bm3IHrEK9mYvdNG6OLnl8Gbhk6VyLpuhNVNHbxKI3wtmnpIit/k8rJx6Q0AVqRgAAAABJRU5ErkJggg==",className:Oe}),(0,he.jsx)(h.Link,{to:"/shixuns/".concat(null==e?void 0:e.shixun_identifier,"/challenges"),target:"_blank",children:(0,he.jsx)(y.Z,{title:null==e||null===(t=e.shixun)||void 0===t?void 0:t.name,placement:"bottom",children:(0,he.jsx)("div",{className:Ye,children:null==e||null===(i=e.shixun)||void 0===i?void 0:i.name})})})]}),(0,he.jsx)("div",{className:He,onClick:function(){jn(e,"open")},children:!(null!=e&&e.show_info)&&(0,he.jsxs)(he.Fragment,{children:["展开更多",(0,he.jsx)("i",{className:"iconfont icon-xiajiantou",style:{fontSize:"8px"}})]})}),"progressing"!=(null==H?void 0:H.competition_status)&&"ended"!=(null==H?void 0:H.competition_status)&&(0,he.jsx)("div",{className:qe,onClick:function(){var n,t;n=null==e?void 0:e.id,x.Z.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"删除提示",icon:null,content:"删除该赛题后,数据不可恢复,请确认是否删除?",onOk:(t=r()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(0,ce.pS)({id:null==g?void 0:g.competitionId,data_id:n}).then((function(e){0==(null==e?void 0:e.status)?(v.ZP.success("删除成功"),yn(!0),c({type:"competitions/getHeader",payload:{identifier:null==g?void 0:g.competitionId}})):v.ZP.error(null==e?void 0:e.message)}));case 1:case"end":return e.stop()}}),e)}))),function(){return t.apply(this,arguments)})})},children:"删除该赛题"})]}),(null==e?void 0:e.show_info)&&(0,he.jsxs)("div",{className:Qe,children:[(0,he.jsxs)(f.Z,{form:k,labelCol:{flex:"70px"},children:[(0,he.jsxs)(f.Z.Item,{className:Ge,label:"题目总分",colon:!1,children:[(0,he.jsx)(pn.Z,{min:0,value:null==e?void 0:e.total_score,disabled:"progressing"==(null==H?void 0:H.competition_status)||"ended"==(null==H?void 0:H.competition_status),className:Ue,onChange:function(n){e.total_score=n,J(Object.assign({},W)),gn(e)},onBlur:function(){bn()}})," 分"]}),(0,he.jsx)(f.Z.Item,{className:We,label:" ",colon:!1,children:(0,he.jsx)(f.Z.Item,{className:We,label:"关卡分值",colon:!1,children:(0,he.jsxs)(b.ZP.Group,{disabled:"progressing"==(null==H?void 0:H.competition_status)||"ended"==(null==H?void 0:H.competition_status),value:null==e?void 0:e.score_setting,onChange:function(n){e.score_setting=n.target.value,1!==n.target.value&&(e.difficulty_level_sort="asc"),J(Object.assign({},W)),gn(e)},onBlur:function(){bn()},children:[(0,he.jsx)(b.ZP,{value:0,children:"均分比例"}),(0,he.jsx)(b.ZP,{value:1,children:"难易度"}),(0,he.jsx)(b.ZP,{value:2,children:"自定义分值"})]})})}),null==e||null===(s=e.challenge_settings)||void 0===s?void 0:s.map((function(n,t){return(0,he.jsx)(f.Z.Item,{className:We,label:" ",colon:!1,children:(0,he.jsxs)("div",{style:{display:"flex"},children:[(0,he.jsx)("i",{className:"iconfont icon-shixunti",style:{color:"#165DFF",width:"14px",height:"14px",margin:"6px 15px 7px 0"}}),(0,he.jsxs)(f.Z.Item,{className:We,label:(0,he.jsx)(y.Z,{title:null==n?void 0:n.subject,placement:"left",children:(0,he.jsx)("div",{className:Je,children:null==n?void 0:n.subject})}),colon:!1,children:[(0,he.jsx)(pn.Z,{min:0,step:.1,value:null==n?void 0:n.score,disabled:V||2!==(null==e?void 0:e.score_setting),style:{width:"96px"},onChange:function(n){e.challenge_settings[t].score=n,J(l()({},W))},onBlur:function(){bn()}}),(0,he.jsx)("span",{className:"ml10",children:"分"})]}),(0,he.jsx)("div",{className:"简单"==(null==n?void 0:n.difficulty)?Ke:"中等"==(null==n?void 0:n.difficulty)?Xe:$e,children:null==n?void 0:n.difficulty})]})},t)}))]}),(0,he.jsxs)("div",{className:en,onClick:function(){jn(e,"close")},children:["收起更多",(0,he.jsx)("i",{className:"iconfont icon-shangjiantou",style:{fontSize:"8px"}})]})]})]},n)})),0==(null==D?void 0:D.length)&&(0,he.jsx)(xn.Z,{customText:"您还没有添加赛题,点击添加赛题"}),(0,he.jsx)(Mn,{competitionId:null==g?void 0:g.competitionId,queryQuetions:yn})]}),2===H.mode&&(0,he.jsxs)("div",{style:{paddingLeft:78,paddingRight:30},children:[(0,he.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,he.jsx)("label",{style:{marginRight:10,width:50,textAlign:"end"},children:"课堂"}),(0,he.jsx)(_.default,{popupClassName:cn,showSearch:!0,filterOption:function(e,n){return-1!==n.key.toUpperCase().indexOf(e.toUpperCase())},disabled:"progressing"===H.competition_status||"ended"===H.competition_status,className:on,onChange:function(){var e=r()(o()().mark((function e(n){var t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return null==g||g.loadingFunction(!0),e.next=3,(0,Ae.ZP)("/api/competitions/".concat(X,"/course_select.json"),{method:"post",body:{course_id:n}});case 3:t=e.sent,null==g||g.loadingFunction(!1),0===(null==t?void 0:t.status)&&c({type:"competitions/getHeader",payload:{identifier:X}});case 6:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),size:"large",style:{flex:1},value:[ne.course_id||ne.default_course_id],placeholder:"请选择需要计算成绩的课堂",children:null==re?void 0:re.map((function(e){return(0,he.jsx)(_.default.Option,{value:null==e?void 0:e.id,children:(0,he.jsxs)(le.Z,{align:"middle",style:{padding:"0px 12px"},children:[(0,he.jsxs)(le.Z,{align:"middle",style:{flex:1},children:[(0,he.jsx)(se.Z,{children:(0,he.jsx)("div",{className:"mr20 font12",style:{lineHeight:"12px",padding:"4px 10px",borderRadius:13,color:e.is_end?"#E53333":"#3061D0",border:"1px solid ".concat(e.is_end?"#FFC4C4":"#C4D2F1")},children:e.is_end?"已结束":"进行中"})}),(0,he.jsx)(se.Z,{style:{flex:1},children:(0,he.jsx)(y.Z,{placement:"topLeft",title:null==e?void 0:e.name,overlayStyle:{maxWidth:430,zIndex:1e4},children:(0,he.jsx)(se.Z,{style:{textOverflow:"ellipsis",overflow:"hidden",maxWidth:430},children:null==e?void 0:e.name})})})]}),(0,he.jsx)(se.Z,{style:{color:"#9096A3"},children:null==e?void 0:e.created_at})]})},"".concat(null==e?void 0:e.name).concat(null==e?void 0:e.id))}))}),(0,he.jsx)("div",{className:De,style:{position:"relative",justifyContent:"center",top:0,right:0,marginLeft:20,height:40,borderRadius:2,alignItems:"center"},onClick:function(){window.open(H.first_category_url)},children:"进入该课堂"})]}),H.course_is_end&&(0,he.jsx)("div",{style:{color:"red",marginLeft:60,marginTop:10},children:"选择已结束的课堂,则无法进行答题的任何操作"}),null==ne||null===(t=ne.competition_course_games)||void 0===t?void 0:t.map((function(e,n){var t;return(0,he.jsxs)("div",{style:{marginBottom:20},children:[(0,he.jsxs)("div",{style:{marginTop:20,display:"flex",alignItems:"center"},children:[(0,he.jsxs)("label",{style:{marginRight:10,width:50,textAlign:"end"},children:["赛道",n+1]}),(0,he.jsx)(j.Z,{className:an,value:e.name,onChange:function(n){e.name=n.target.value,te(l()({},ne))},onBlur:function(){var n=r()(o()().mark((function n(t){return o()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(t.target.value){n.next=2;break}return n.abrupt("return");case 2:return n.next=4,(0,Ae.ZP)("/api/competitions/".concat(X,"/create_course_game.json"),{method:"post",body:{course_id:null==ne?void 0:ne.course_id,competition_course_game_id:e.competition_course_game_id,name:t.target.value}});case 4:0===n.sent.status&&c({type:"competitions/getHeader",payload:{identifier:X}});case 6:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}(),placeholder:"请输入赛道名称",style:{flex:1},maxLength:30,size:"large"}),(0,he.jsx)("i",{onClick:r()(o()().mark((function e(){var n;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!((null==ne||null===(n=ne.competition_course_games)||void 0===n?void 0:n.filter((function(e){return e.homeworks.length<=0})).length)>0)){e.next=3;break}return v.ZP.info("请先完成上一个赛道的作业/考试的选择,只有上一个赛道中添加了作业/试卷才能新增赛道"),e.abrupt("return");case 3:return e.next=5,(0,Ae.ZP)("/api/competitions/".concat(X,"/create_course_game.json"),{method:"post",body:{course_id:null==ne?void 0:ne.course_id}});case 5:0===e.sent.status&&c({type:"competitions/getHeader",payload:{identifier:X}});case 7:case"end":return e.stop()}}),e)}))),style:{color:"#145DFF",marginLeft:15,cursor:"pointer"},className:"iconfont icon-tianjia2"}),0!==n&&(0,he.jsx)("i",{style:{marginLeft:10,cursor:"pointer"},onClick:function(){var n;x.Z.confirm({icon:!1,title:"提示",content:"请确认是否删除该赛道,删除后,不可恢复。",onOk:(n=r()(o()().mark((function n(){return o()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,Ae.ZP)("/api/competitions/".concat(X,"/delete_course_game.json"),{method:"delete",body:{competition_course_game_id:e.competition_course_game_id}});case 2:0===n.sent.status&&c({type:"competitions/getHeader",payload:{identifier:X}});case 4:case"end":return n.stop()}}),n)}))),function(){return n.apply(this,arguments)})})},className:"".concat(sn," iconfont icon-weishezhi")})]}),(0,he.jsxs)("div",{style:{marginTop:20,marginLeft:60},children:[(0,he.jsx)("span",{children:"计入成绩的作业/试卷"}),(0,he.jsx)(Z.ZP,{loading:we,onClick:function(){!function(e){kn.apply(this,arguments)}(e.competition_course_game_id)},style:{marginLeft:10,marginRight:20,background:"#3061D0",display:"inline-flex",height:30,alignItems:"center",justifyContent:"center",width:119,color:"#fff",borderRadius:2,cursor:"pointer",border:"none"},children:"选择作业/试卷"}),(0,he.jsx)("span",{style:{color:"#9096A3"},children:"为了满足竞赛的正常计分排行,请关联作业/试卷"})]}),e.homeworks.length>0?(0,he.jsx)("div",{style:{marginLeft:199,marginTop:10,padding:"30px 20px",background:"#F6F7F9"},children:null==e||null===(t=e.homeworks)||void 0===t?void 0:t.map((function(e,n){var t,i;return(0,he.jsxs)("div",{style:{display:"flex",marginTop:n>0&&20,height:20,alignItems:"center",justifyContent:"space-between"},children:[(0,he.jsx)("div",{style:{minWidth:68,height:24,display:"flex",alignItems:"center",justifyContent:"center",fontSize:12,background:"rgba(22,93,255,0.1)",color:"#3061D0",marginRight:20},children:null===(t=Ie.find((function(n){return n.type===e.homework_type})))||void 0===t?void 0:t.name}),(0,he.jsx)(y.Z,{title:(null==e||null===(i=e.name)||void 0===i?void 0:i.length)>6&&(null==e?void 0:e.name),placement:"topLeft",children:(0,he.jsx)("span",{onClick:function(){window.open("/classrooms/".concat(null==ne?void 0:ne.course_id,"/").concat(Ie.find((function(n){return n.type===e.homework_type})).url,"/").concat(e.homework_id||e.exercise_id,"/detail"))},style:{width:"90%",color:"#3061D0",cursor:"pointer"},className:ln,children:null==e?void 0:e.name})}),(0,he.jsx)("i",{style:{marginLeft:10,cursor:"pointer"},onClick:function(){var n;x.Z.confirm({icon:!1,title:"提示",content:"请确认是否删除该作业,删除后,不可恢复。",onOk:(n=r()(o()().mark((function n(){return o()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,Ae.ZP)("/api/competitions/".concat(X,"/delete_course_homework.json"),{method:"delete",body:{competition_course_homework_id:e.competition_course_homework_id}});case 2:0===n.sent.status&&c({type:"competitions/getHeader",payload:{identifier:X}});case 4:case"end":return n.stop()}}),n)}))),function(){return n.apply(this,arguments)})})},className:"".concat(sn," iconfont icon-weishezhi")})]})}))}):(0,he.jsx)(xn.Z,{})]})})),(0,he.jsx)(x.Z,{open:_e,onCancel:function(){fe(""),Ze(!1)},width:850,title:"选择作业",className:rn,okButtonProps:{loading:we},onOk:r()(o()().mark((function e(){var n,t,i,l,s,a,r;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!((null==ge||null===(n=ge.filter((function(e){return e.checked})))||void 0===n?void 0:n.length)<=0)){e.next=3;break}return v.ZP.info("请选择作业或试卷"),e.abrupt("return");case 3:return Ze(!0),e.next=6,(0,Ae.ZP)("/api/competitions/".concat(X,"/homework_select.json"),{method:"post",body:{course_id:ne.course_id,competition_course_game_id:_e,shixun_homework_ids:null==ge||null===(t=ge.filter((function(e){return e.checked&&"practice"===e.homework_type})))||void 0===t?void 0:t.map((function(e){return e.id})),common_homework_ids:null==ge||null===(i=ge.filter((function(e){return e.checked&&"normal"===e.homework_type})))||void 0===i?void 0:i.map((function(e){return e.id})),group_homework_ids:null==ge||null===(l=ge.filter((function(e){return e.checked&&"group"===e.homework_type})))||void 0===l?void 0:l.map((function(e){return e.id})),program_homework_ids:null==ge||null===(s=ge.filter((function(e){return e.checked&&"hack"===e.homework_type})))||void 0===s?void 0:s.map((function(e){return e.id})),exercise_ids:null==ge||null===(a=ge.filter((function(e){return e.checked&&"exercise"===e.homework_type})))||void 0===a?void 0:a.map((function(e){return e.id}))}});case 6:r=e.sent,Ze(!1),fe(""),0===r.status&&c({type:"competitions/getHeader",payload:{identifier:X}});case 10:case"end":return e.stop()}}),e)}))),children:(0,he.jsxs)("div",{style:{border:"1px solid #F6F7F9",display:"flex",maxHeight:480},children:[(0,he.jsxs)("div",{style:{width:350,borderRight:"1px solid #F6F7F9",overflowY:"auto",overflowX:"hidden",padding:14},children:[(0,he.jsx)(N.t7,{style:{width:312,marginRight:15},dataSource:[],value:{id:"",value:mn.input},onChange:function(e,n){mn.input=e,hn(l()({},mn)),null==Ie||Ie.map((function(e){e.open=!0})),Se(Pe()(Ie))},placeholder:"请输入搜索内容"}),null==Ie?void 0:Ie.map((function(e){var n,t,i,l,s,o,a,r,c;return(0,he.jsxs)("div",{children:[(0,he.jsxs)("div",{style:{marginTop:16,height:22,alignItems:"center",display:"flex",justifyContent:"space-between"},children:[(0,he.jsxs)("div",{style:{cursor:"pointer",color:"#232B40"},onClick:function(){e.open=!e.open,Se(Pe()(Ie))},children:[(0,he.jsx)("i",{style:{marginRight:10,color:"#999999"},className:"iconfont ".concat(e.open?"icon-changyongtubiao-xianxingdaochu-zhuanqu-":"icon-a-bianzu11")}),e.name,(0,he.jsx)("span",{style:{marginLeft:6,color:"#ADB2B8"},children:null==ge||null===(n=ge.filter((function(n){return n.homework_type===e.type})))||void 0===n?void 0:n.length})]}),(0,he.jsx)(ie.Z,{indeterminate:(null==ge||null===(t=ge.filter((function(n){return n.homework_type===e.type})))||void 0===t?void 0:t.length)>(null==ge||null===(i=ge.filter((function(n){return n.homework_type===e.type&&n.checked})))||void 0===i?void 0:i.length)&&0!==(null==ge||null===(l=ge.filter((function(n){return n.homework_type===e.type})))||void 0===l?void 0:l.length)&&(null==ge||null===(s=ge.filter((function(n){return n.homework_type===e.type&&n.checked})))||void 0===s?void 0:s.length)>0,checked:(null==ge||null===(o=ge.filter((function(n){return n.homework_type===e.type})))||void 0===o?void 0:o.length)===(null==ge||null===(a=ge.filter((function(n){return n.homework_type===e.type&&n.checked})))||void 0===a?void 0:a.length)&&0!==(null==ge||null===(r=ge.filter((function(n){return n.homework_type===e.type})))||void 0===r?void 0:r.length),onChange:function(n){n.target.checked?ge.map((function(n){n.homework_type===e.type&&(n.checked=!0)})):ge.map((function(n){n.homework_type===e.type&&(n.checked=!1)})),ye(Pe()(ge))}})]}),null==ge||null===(c=ge.filter((function(n){return n.homework_type===e.type&&e.open&&n.name.includes(decodeURIComponent(mn.input))})))||void 0===c?void 0:c.map((function(e){return(0,he.jsxs)("div",{style:{display:"flex",marginTop:12,height:20,alignItems:"center",justifyContent:"space-between"},children:[zn(e.status||e.exercise_tips[0]),(0,he.jsx)(y.Z,{title:null==e?void 0:e.name,children:(0,he.jsx)("span",{style:{width:"70%"},className:ln,children:null==e?void 0:e.name})}),(0,he.jsx)(ie.Z,{onChange:function(n){e.checked=n.target.checked,ye(Pe()(ge))},checked:e.checked})]})}))]})}))]}),(0,he.jsxs)("div",{style:{width:450,padding:20,overflowY:"auto",overflowX:"hidden"},children:[(0,he.jsxs)("div",{style:{display:"flex",justifyContent:"space-between"},children:[(0,he.jsxs)("span",{children:[(0,he.jsx)("span",{style:{color:"#6B758B"},children:"已选"}),(0,he.jsx)("span",{style:{color:"#3061D0",marginLeft:3},children:null==ge?void 0:ge.filter((function(e){return e.checked})).length})]}),(0,he.jsx)("span",{onClick:function(){ge.map((function(e){e.checked=!1})),ye(Pe()(ge))},style:{color:"#3061D0",cursor:"pointer"},children:"全部清除"})]}),null==ge||null===(i=ge.filter((function(e){return e.checked})))||void 0===i?void 0:i.map((function(e){return(0,he.jsxs)("div",{style:{display:"flex",marginTop:12,height:20,alignItems:"center",justifyContent:"space-between"},children:[zn(e.status||e.exercise_tips[0]),(0,he.jsx)(y.Z,{title:null==e?void 0:e.name,children:(0,he.jsx)("span",{style:{width:"70%"},className:ln,children:null==e?void 0:e.name})}),(0,he.jsx)("i",{style:{marginLeft:10,cursor:"pointer"},onClick:function(){e.checked=!1,ye(Pe()(ge))},className:"".concat(sn," iconfont icon-weishezhi")})]})}))]})]})})]}),3===H.mode&&(0,he.jsxs)("div",{children:[(0,he.jsx)("div",{className:Le,style:{display:"flex",alignItems:"center"},children:(0,he.jsxs)("div",{style:{flex:1},children:["评测设置",(0,he.jsxs)("span",{style:{marginLeft:20,color:"#9096A3",fontSize:"12px",fontWeight:"normal"},children:["答题起止时间:",(0,he.jsxs)("span",{style:{margin:"0 5px",color:"#165DFF",fontSize:"12px",fontWeight:"normal"},children:[null==H?void 0:H.start_time,"~",null==H?void 0:H.end_time]}),((0,Tn.eB)()||(null==H||null===(s=H.permission)||void 0===s?void 0:s.editable))&&(0,he.jsxs)("a",{style:{marginLeft:10,color:"#165DFF",display:"inline-flex"},onClick:function(){c({type:"competitions/setActionTabs",payload:{key:"7"}})},children:[(0,he.jsx)("i",{className:"iconfont icon-bianji10 font14",style:{color:"#165DFF",marginRight:3}})," 编辑"]})]})]})}),(0,he.jsxs)(f.Z,{form:A,layout:"vertical",scrollToFirstError:!0,className:dn,onValuesChange:function(){},children:[(0,he.jsx)(f.Z.Item,{className:Ge,label:"评测服务器配置",colon:!1,name:"evaluation_setting",rules:[{required:!0,message:"必填项:不能为空"}],children:(0,he.jsx)(Bn,{placeholder:"请填写评测服务器配置,格式为:服务器ip 端口 账号 密码,多台服务器用多行表示,如:127.0.0.1 22 root Qz_123123 127.0.0.2 22 root Qz_123123",rows:6,autoSize:{minRows:6,maxRows:999},disabled:!(0,Tn.Ny)()&&(null==H?void 0:H.is_manager)})}),(0,he.jsxs)("div",{style:{display:"flex",justifyContent:"space-between"},children:[(0,he.jsx)(f.Z.Item,{style:{width:400},className:Ge,label:"每日最多提交次数(未填则不限制)",colon:!1,name:"commit_num",rules:[{pattern:new RegExp(/^[1-9]\d*$/,"g"),message:"必须是正整数"}],children:(0,he.jsx)(pn.Z,{disabled:!(0,Tn.Ny)()&&(null==H?void 0:H.is_manager),style:{width:400},autoComplete:"off",controls:!1,precision:0,min:1,className:Ue,placeholder:"请输入提交次数",suffix:(0,he.jsx)("span",{style:{color:"#c5c5c5"},children:"次"})})}),(0,he.jsx)(f.Z.Item,{style:{width:400},className:Ge,label:"评测时长(S)",colon:!1,name:"evaluation_time",rules:[{required:!0,pattern:new RegExp(/^[1-9]\d*$/,"g"),message:"必须是正整数"}],children:(0,he.jsx)(pn.Z,{disabled:!(0,Tn.Ny)()&&(null==H?void 0:H.is_manager),style:{width:400},autoComplete:"off",controls:!1,precision:0,min:1,className:Ue,placeholder:"请输入评测时长",suffix:(0,he.jsx)("span",{style:{color:"#c5c5c5"},children:"S"})})})]}),(0,he.jsx)(f.Z.Item,{className:Ge,label:"运行脚本",colon:!1,name:"evaluation_script",rules:[{required:!0,message:"必填项:不能为空"}],children:(0,he.jsx)(Bn,{disabled:!(0,Tn.Ny)()&&(null==H?void 0:H.is_manager),placeholder:"请输入运行脚本",rows:6,autoSize:{minRows:6,maxRows:999}})})]}),(0,Tn.Ny)()&&(0,he.jsx)("div",{className:nn,children:(0,he.jsx)(pe.Z,{className:tn,onClick:r()(o()().mark((function e(){var n,t,i;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,A.validateFields();case 2:if(n=A.getFieldsValue(),!F){e.next=10;break}return e.next=6,(0,Ae.ZP)("/api/competitions/".concat(X,"/create_work_settings.json"),{method:"post",body:l()({},n)});case 6:0===(null==(t=e.sent)?void 0:t.status)&&v.ZP.info("更改成功"),e.next=14;break;case 10:return e.next=12,(0,Ae.ZP)("/api/competitions/".concat(X,"/update_work_settings.json"),{method:"put",body:l()({},n)});case 12:0===(null==(i=e.sent)?void 0:i.status)&&v.ZP.info("更改成功");case 14:case"end":return e.stop()}}),e)}))),children:"保存更改"})})]})]})})),Yn="all___ZbAJW",Hn="title___QPivo",qn="add_people___jqyIi",Qn="people_icon___Gf35v",Gn="content_user___mESiF",Un="content_left___JUfAC",Wn="user_img_box___rq6y5",Jn="user_img___tN5UW",Kn="user_rule_create___i4hOF",Xn="user_info___ncafT",$n="user_name___hqLNP",et="user_school___m7TBE",nt="delete_text___j_0I0",tt="select_modal___j0vsx",it=t(26724),lt=t.n(it),st=t(77278),ot=["classroomList","loading","dispatch"],at=(0,h.connect)((function(e){return{classroomList:e.classroomList,loading:e.loading}}))((function(e){var n,t,i=e.classroomList,l=(e.loading,e.dispatch),s=p()(e,ot),a=((0,h.useParams)(),i.actionTabs),c=(0,m.useState)([]),u=d()(c,2),g=u[0],b=u[1],k=(0,m.useState)(!0),N=d()(k,2),I=N[0],A=N[1],S=(0,m.useState)(!1),C=d()(S,2),F=C[0],P=C[1],T=f.Z.useForm(),L=d()(T,1)[0],D=(0,m.useState)([]),E=d()(D,2),R=E[0],M=E[1],V=(0,m.useState)(0),B=d()(V,2),z=B[0],O=B[1],Y=(0,m.useState)([]),H=d()(Y,2),q=H[0],Q=H[1],G=(0,m.useState)(!0),U=d()(G,2),W=U[0],J=U[1];(0,m.useRef)();(0,m.useEffect)((function(){"添加管理员"===i.actionTabs.key&&(J(!0),K())}),[i.actionTabs.key]);var K=function(){var e=r()(o()().mark((function e(){var n;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l({type:"classroomList/getSchoolList",payload:{}});case 2:n=e.sent,b(n.map((function(e){return{value:e}})));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),X=function(){var e=r()(o()().mark((function e(){var n,t,l,s,a=arguments;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=a.length>0&&void 0!==a[0]&&a[0])&&!I||F){e.next=11;break}return l=L.getFieldValue(),P(!0),O(n?1:z+1),e.next=7,(0,ce.pA)({id:i.actionTabs.id,page:n?1:z+1,type:(null==l?void 0:l.search_type)||"",school:(null==l?void 0:l.school_name)||"",keyword:(null==l?void 0:l.keyword)||""});case 7:s=e.sent,M(n?Pe()(null==s?void 0:s.data):[].concat(Pe()(R),Pe()(null==s?void 0:s.data))),P(!1),(null===(t=s.users)||void 0===t?void 0:t.length)<10&&A(!1);case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),$=function(){var e=r()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:""==q?v.ZP.error("请选择人数"):(console.log(q),(0,ce.q0)({id:null==s?void 0:s.competitionId,ids:q}).then((function(e){0==e.status?(v.ZP.success("添加成功"),l({type:"classroomList/setActionTabs",payload:{}}),s.queryData()):v.ZP.error(null==e?void 0:e.message)})));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ee=[{title:"",dataIndex:"id",width:40,ellipsis:!0,render:function(e,n){return(0,he.jsx)(ie.Z,{value:n.id,checked:q.includes(String(n.id)),disabled:null==n?void 0:n.checked})}},{title:"姓名",width:100,ellipsis:!0,dataIndex:"name",render:function(e,n){return(0,he.jsx)(y.Z,{placement:"bottom",title:e,children:(0,he.jsx)(h.Link,{className:"bold c-black",to:"/users/".concat(n.login),target:"_blank",children:e||"--"})})}},{title:"职业",dataIndex:"identity",width:130,ellipsis:!0,render:function(e){return(0,he.jsx)(y.Z,{placement:"bottom",title:e,children:(0,he.jsx)("span",{children:e||"--"})})}},{title:"学号/工号",width:100,dataIndex:"student_id",ellipsis:!0,render:function(e){return(0,he.jsx)(y.Z,{placement:"bottom",title:e,children:(0,he.jsx)("span",{children:e||"--"})})}},{title:"手机",width:100,dataIndex:"phone",ellipsis:!0,render:function(e){return(0,he.jsx)(y.Z,{placement:"bottom",title:e,children:(0,he.jsx)("span",{children:e||"--"})})}},{title:"邮箱",dataIndex:"mail",width:100,ellipsis:!0,render:function(e){return(0,he.jsx)(y.Z,{placement:"bottom",title:e,children:(0,he.jsx)("span",{children:e||"--"})})}},{title:"学校/单位",width:150,dataIndex:"school",ellipsis:!0,render:function(e){return(0,he.jsx)(y.Z,{placement:"bottom",title:e,children:(0,he.jsx)("span",{children:e||"--"})})}},{title:"实名认证",dataIndex:"school_name",width:100,render:function(e){return e?"是":"否"}},{title:"状态",dataIndex:"checked",width:80,render:function(e){if(e)return(0,he.jsx)("span",{className:"c-green",children:"已添加"})}}];return(0,he.jsx)(x.Z,{className:"modal_styles",centered:!0,title:"添加管理员",open:"添加管理员"===i.actionTabs.key,okText:"确定",cancelText:"取消",width:1100,zIndex:1e3,bodyStyle:{minHeight:200},onOk:r()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:$();case 1:case"end":return e.stop()}}),e)}))),onCancel:function(){Q([]),l({type:"classroomList/setActionTabs",payload:{}})},children:(0,he.jsxs)("div",{style:{padding:"0 14px"},children:[(0,he.jsxs)(f.Z,{layout:"inline",form:L,initialValues:{school_name:"",keyword:"",search_type:"name"},children:[(0,he.jsx)(f.Z.Item,{name:"search_type",label:"搜索类型",children:(0,he.jsxs)(_.default,{style:{width:120},className:tt,children:[(0,he.jsx)(_.default.Option,{value:"name",children:"姓名"}),(0,he.jsx)(_.default.Option,{value:"phone",children:"手机号"}),(0,he.jsx)(_.default.Option,{value:"mail",children:"邮箱"})]})}),(0,he.jsx)(f.Z.Item,{name:"keyword",label:"搜索内容:",children:(0,he.jsx)(j.Z,{allowClear:!0,style:{width:305},size:"middle",defaultValue:(null===(n=a.selectArrs)||void 0===n?void 0:n.category_name)||(null===(t=a.selectArrs)||void 0===t?void 0:t.name)})}),(0,he.jsx)(f.Z.Item,{name:"school_name",label:"单位:",children:(0,he.jsx)(w.Z,{options:g,style:{width:306},size:"middle",placeholder:"请输入单位名称",filterOption:function(e,n){return-1!==n.value.toUpperCase().indexOf(e.toUpperCase())}})}),(0,he.jsx)(f.Z.Item,{style:{marginRight:0},children:(0,he.jsx)(Z.ZP,{htmlType:"submit",type:"primary",size:"middle",onClick:function(){return function(){var e;if(""===(null===(e=L.getFieldValue())||void 0===e?void 0:e.keyword))return M([]),void v.ZP.error("请输入搜索内容");J(!1),A(!0),P(!1),Q([]),setTimeout((function(){X(!0)}),200)}()},children:"搜索"})})]}),W&&(0,he.jsxs)("div",{className:"tc font16 c-light-black mt40 pb30",children:[(0,he.jsx)("img",{src:st.RL,width:"100",alt:""}),(0,he.jsx)("br",{}),(0,he.jsx)("p",{className:"mt20",children:"请搜索要添加的管理员"})]}),!W&&""==R&&!F&&(0,he.jsxs)("div",{className:"tc font16 c-light-black mt40 pb30",children:[(0,he.jsx)("img",{src:st.z3,width:"100",alt:""}),(0,he.jsx)("br",{}),(0,he.jsx)("p",{className:"mt20",children:"暂时还没有相关数据哦!"})]}),(!W&&""!=R||F)&&(0,he.jsxs)("section",{children:[(0,he.jsx)("div",{className:"flexd-table-header mt20",children:(0,he.jsx)(oe.Z,{pagination:!1,dataSource:[],columns:ee})}),(0,he.jsx)("div",{style:{maxHeight:260,overflow:"auto"},children:(0,he.jsx)(lt(),{initialLoad:!1,pageStart:1,threshold:20,loadMore:function(e){X()},hasMore:I,useWindow:!1,children:(0,he.jsx)(oe.Z,{loading:F,showHeader:!1,pagination:!1,dataSource:R,columns:ee,onRow:function(e){return{onClick:function(e){e.currentTarget.querySelector("input").disabled||function(e){e=String(e);var n=q.indexOf(e);n<0?q.push(e):q.splice(n,1),Q(Pe()(q))}(e.currentTarget.querySelector("input").value)}}}})})})]})]})})})),rt=["globalSetting","dispatch","user"],ct=(0,h.connect)((function(e){return{globalSetting:e.globalSetting,user:e.user}}))((function(e){e.globalSetting;var n,t=e.dispatch,i=e.user,l=p()(e,rt),s=(0,m.useState)([]),a=d()(s,2),c=a[0],u=a[1],h=(0,m.useState)(""),_=d()(h,2),f=_[0],g=_[1];(0,m.useEffect)((function(){y()}),[]);var y=function(){(0,ce.sL)(null==l?void 0:l.competitionId).then((function(e){if(0==(null==e?void 0:e.status)){var n;g(null==e||null===(n=e.creator)||void 0===n?void 0:n.id);var t=[];for(var i in t.push(null==e?void 0:e.creator),null==e?void 0:e.data)t.push(null==e?void 0:e.data[i]);u(t),null==l||l.loadingFunction(!1)}else v.ZP.error(null==e?void 0:e.message)}))};return(0,he.jsxs)("div",{className:Yn,children:[(0,he.jsx)("div",{className:Hn,children:"管理员设置"}),(f==(null==i||null===(n=i.userInfo)||void 0===n?void 0:n.user_id)||(0,Tn.Ny)())&&(0,he.jsxs)("div",{className:qn,onClick:function(){t({type:"classroomList/setActionTabs",payload:{key:"添加管理员",id:null==l?void 0:l.competitionId}})},children:[(0,he.jsx)("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAABvZJREFUWEfNmGlsVFUUx8+5b5a+DhqpKCg0IagJikRFbOlMC8USoRZZLU4LrWCAiMsHg4krERFQE+WLCwaMlEU6UBZRquyUtjNFLIoBFOMaFYTIomBnOsu7x9w386bvvZlOZ9rUOF/e5C7n/t7/nnvuOQ/hf/7D/zkf9BiQTk4pAQndwGk0ANwYfWE6DQiNgMyDQ7cf6IkI3Qakb92DgQdriGAMAQECgnhG+QDUVyfxwENosc/GWz2/dAe0W4B0Yto9nHAXEc8RiyIiEJH6VPkEGEaf4scYXEDCCTh8a2umkBkD0nflA5UgHCXi/aMymSRLSoAC+Jxks4zAoZ4zmUBmDBg6NmMDEJ9pkEiTK6ZgbHc78DVFATfY7txc1WuAdKx6YJiCv4ndNC6iczq1IwFRbUMksmJWLt657nS6kBkpGGqtXMCBv5tg3MyTYnWGsMA2wvNerwD6j1auAE5PaSdWPJMLZjolOkURYUXWyI0LewUwcGTWagKaazZuPrUmlzQMR4DVct6H83sFsO3wrCUEsMgcVhKBoyFHhJ6oR0ZjpKo4Y0sceWtf6h3AlupSAvi0qyORcnGJlfbJq9nVK4B0crGt7fLPvwJRfw0ynSiowSDiOYfVnosjV4V7BVAYbWupmkeAq/Q3h/5qSxFlxAbPcxSsez9dOC1gZTJe+BW2Ha7eCATu+N1rsmA+5VH/Y7WOgrUzETF2Aaa3bEZxUDNJ3z9p95//eyURn5POMohsTfbVQx7FYYtD6YzXj+kWoGbA76ueSkBLCPjthmwmvgKeQAkWOfI3fJQpWNxvuztRPy945OFhEUUZDYADAbiI0mcsktRoz1t7sqf2e6RgTxdPZ36XgO1fVA5RwngbQz6AE+Nose3NzlvzWzLjdOqRq9STN/SDK8n6/Ufm5CJvHwcEEjLpDwL8Rs5f/3Mq0E4B6esqR8CvvE9Ebn0GygAWyS7P0qQAvoqNoj3bWVuZrD/QUvkiJ3pFC1HqTcPQ48i2zMU71rclm9MpoN/n3kQEM8xxDQEPZDtrS8zGAi3ueZzDKtHOGMyXCzyrzWP8vor9RHSvoSYQijPclF3gcacNGGhxFxPRQS1lNxx7hIB83fV98Za3glp70DdzOMfI55yDHAMMMLLk250fHteHpsCf5y4RgZysRGDIimVn7SEzZFIF/b6HPgGiiVo2lVBjoBQ3JlyhvS3UyomG6gsAhngqy2EbqW1dwFcxhkhpEADmuzy6S7jT4dz0QJeA1FrRrz2knOEi+Y2NNhtkgC/Lrs2LRXfAV76OAKvifqoWTVoBReuznXXVYlybd8ZiBFKzmMRkA0XKE5alrBswf90Fw44l+lL5bOKwJuXJQmiUnXVj6KvZ17QH/rnIBU9sYVWMWHrFEClLduTgXTV/BXwzDhGptXM89dKuSm0uYzhHLqirSQno9z24GYiXd9QVia/MEIN2ZH3RWRdo900/SgQj9EbjdTLSl9nObXeTr1xuJ+USAdrVcSaf0XySMVaX5dwSPZixn8EHRSLQ3jL9PBCp9W6nPzU8WMbJzi37A83TlgPSc/ot7rCOr8rObc8HfA+WACn7tLo+oaaK0+DFrIKt/fQJhQEw6J16OyfleOIpM2XIIlsGWCa7drwY9k0dE+FKgz6D1tazMKnY6tx+KOCdvBSIXtDqaHNJoI+LDKXhdtf2E0kVDHknP8aJv5NSvaiTCT/z2V0fu6h1vjUUPHuBgK7SK4SAV2z2AdeK5DToneQlIKfoZ0zKBwaKfg2u8C1AfLCwypA9bnPtiFeOBgVD3om14uboKqUX/QwhbO2T01eEkWBz2UcEMDn+rQPV6mOHvbB+ighDoSsXhP9ZRT8C7ARkBMCFFZUTAcZyoD4CBhE9NtfOiqQKBr33/w5EA5MHKpPnCjUkNsHqrN8d8pYtIDLWy4jsMZurfmXYVzaec566BtErgnjaXvjpoARAOlw6KBTmahKQ6CPGj0FaP2PwutW1+1lqKhsSxsiP+pvHBpabsKj+p2DT+NcA4JkuwpbhjFktLBdHffZ7TN3o1EjLhGk8omzt0v8MQuIRa9GefNEUar7vewC6OdqNP9gK99wi/oWb7vuckPLiuyIak14lHYYZStMthbu2GQDDzSXLiOD5ZIAJXxJiKyCAIlmtOTjqs8uR5pK3OcHjYj5DeMdSuP8JOlx6dSQcvkhAUkYvjmy5tXDvC0YFG8fuIoTxSQ2leGOUpIkW1776SNO9DxDQx1GjOMlSdOCTiHdcGXFlZ2cfk6JSJiqKCLstRQcnGAGbis8CUP/YFulmdX41qaeO4ZuSq+FpOlncR7lI6j0q5eC1OKzhn3BT8RtAtDBdn459vRNWz1mKGgYYADPZgv9ybJcp/38Jk2ytfwErhCtWL5ZsugAAAABJRU5ErkJggg==",className:Qn}),"添加管理员"]}),(0,he.jsx)("div",{className:Gn,children:c.map((function(e,n){var t,s,a;return(0,he.jsxs)("div",{className:Un,children:[(0,he.jsx)("div",{className:Wn,children:(0,he.jsxs)("a",{href:"/users/".concat(e.login,"/classrooms"),target:"_blank",children:[(0,he.jsx)("img",{src:ue.Z.IMG_SERVER+"/images/"+(null==e?void 0:e.image_url),className:Jn}),f==(null==e?void 0:e.id)&&(0,he.jsx)("div",{className:Kn,children:"创建者"})]})}),(0,he.jsxs)("div",{className:Xn,children:[(0,he.jsx)("div",{className:$n,children:null==e?void 0:e.name}),(0,he.jsx)("div",{className:et,children:null==e?void 0:e.school})]}),f!=(null==e?void 0:e.id)&&(f==(null==i||null===(t=i.userInfo)||void 0===t?void 0:t.user_id)||1==(null==i||null===(s=i.userInfo)||void 0===s?void 0:s.role)||2==(null==i||null===(a=i.userInfo)||void 0===a?void 0:a.role))&&(0,he.jsx)("div",{className:nt,onClick:function(){var n,t;n=null==e?void 0:e.id,x.Z.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"删除提示",icon:null,content:"是否确定删除该管理员?",onOk:(t=r()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(0,ce.qN)({id:null==l?void 0:l.competitionId,ids:[n]}).then((function(e){0==(null==e?void 0:e.status)?(v.ZP.success("删除成功"),y()):v.ZP.error(null==e?void 0:e.message)}));case 1:case"end":return e.stop()}}),e)}))),function(){return t.apply(this,arguments)})})},children:"删除"})]},n)}))}),(0,he.jsx)(at,{queryData:y,competitionId:null==l?void 0:l.competitionId})]})})),dt={flex_box_center:"flex_box_center___yg5U2",flex_space_between:"flex_space_between___RNHqN",flex_box_vertical_center:"flex_box_vertical_center___ZT47P",flex_box_center_end:"flex_box_center_end___X4Xs3",flex_box_column:"flex_box_column___OzmB0",all:"all___uSCy0",content:"content___pnhPh",content_left_red:"content_left_red___SmVi6",content_left_none:"content_left_none___jTbL2",content_left_flag:"content_left_flag___mae5L",content_left_info:"content_left_info___mISvV",content_left_title:"content_left_title___lcDeu",content_left_description:"content_left_description___Ris52",content_right:"content_right___AcQrD",content_right_span:"content_right_span___WiMTr",form_item:"form_item___eHCux",form_item_item:"form_item_item___IAs6n",fuzhi:"fuzhi___rSsFz",fuzhi_text:"fuzhi_text___UV3Dz",tijiao:"tijiao___AYAeP",tijiao_text:"tijiao_text___TC6tI",quetions_info:"quetions_info___qHhFg",scoremodal:"scoremodal___LmU2Z",title:"title___M1zQX",bottom:"bottom___P728Z",yes:"yes___gRJi8",no:"no___voaWW",form_item_item_select:"form_item_item_select___g8gNL"},ut="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAAAXNSR0IArs4c6QAAAtxJREFUSEu9lktME1EUhv+/M51GayTGGCPGhRs1btqKGF0oAmHBaloejRbciS6NiUtjonHnxqWPlWEKCZVX3GkiPhJB5CEaiRASV2rUYAS6sK85ZqaUlFc7gOndzdz/nG/uueecOYSDdbyzMZDKpIMETotwP4hy20zwjZSvArx2K2rfyPnu8WLuWEgQMBqaTGRuQ3C4mCN7n5hyQbk+3trzeD39msATXc0HE8lkBwQnHYFWioghj6ZFhsOxL6u3VrwJdISqJCPdAtm9KdiiEcFZKmwcj/S+zPez7ISLsGcCcW8FlrMlmKLCunzoEtAKYzKRerfVk60OIWc1j7syF94loM/QBzd9Z8XCQQxNtPafyuYVADsbJRMrZudkn8AMSK+I7MvXu6g0W9lrA32G/tlx6hegkuyCF5cljm5AapZJiamJ1v4jtIs6nR5z8vUFNAmXi1fHIr33AtHgfRG0raV1q+ox+gz9JgQ3Ngu0QqiqatjqMv5o8K6YcmVdX8Qt+g39uQiqNwMk+MZDb/3b1ui8P6pfExN3CvkhMUBfe3AKkENrC2mSEhfBzlXpTg574K2zYMc6QjWmKU9FRCn84ZymzwguQGTHaoeYd8HVomrqp2Qi1SsQ35KGHKMXte9DfX8qO/UDqTRHBbKnaJTI+PpAYEaBcmb0Qs/3iieXtmfmfj4UkQiBD5rXVTPc0DsrIgwYoQGBVBWFZQULBUNKYpKadnY8HPtlqf3t+kV6tP6lZyPUJmI+cAizyn66aNJYJ9rm0aoHw7Hf+Y4DnefKJfN3UkTKnAKzSeOkLMhRVXPXjoZjcznn/nbdEKDFKczWWWXhuPCJoV2aVvciHIsHjOajpqQ+AuLaCNAu/I20NhKvlLK99Zm5H49E0LQRmDUN2K3NMtpI8yYwIkQFJNv4na5lzXvxlKX7PVnAkv+A7dBm55nSjBi5uyjpEJWDlnRMXNZNSjUIr0z1/znq/wN40G8Rfw3IyQAAAABJRU5ErkJggg==",pt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAAAXNSR0IArs4c6QAAAhdJREFUSEvFlr1vE0EQxd87O6KBFqREokSCFISCii8hKqhuz3KB+CtSBCEo4gJRBETLXwAFJl53VAniSxRIEJpEaZFwkTZQoMT70F3Ox+W4Dyu2jiusk2dufzuzb3aGGOORMech+SCvQZoFOQdJAAYgB5DeguzT2m9Vy7HMQa2WD+ceSTpbtVBoJ7kFz7vP1dV+kX8uUO32aezvP5d0eRxQ1ofkBzSbd9jtfv/Hlv1DQXAJUk/SyaPARt+Q3AEZsNf7mF7nUIQRzLk1AccmgSVQ4Dc870YamgDjNH6eNLKc9O6g2bw4Su9foDHvj3pmVdkIz5TWXomEFf6EatRwaKs+nMTORsOE6j0AGrNZJH0Cv0A+AzAv6WYelORLkJ/g3D0Bpwp8tmjtOardXtDe3tfCuiGf0NqleGMrkqL3lBof09q7sX1R0tPCtWZmLlBB0JFzyyXA17T21sguYxIoyQQWA19Iul1S9B3KmHVJ18vOJ2fhlUgAcWRF0eco9k0I3JZ0pkoQWWjaPx116caB7RC4K+l4FTCKKJPCcSNLnffPeoHA7n9JaZ2iWad8f1lAZypl4fuvBLTKy2K6hf9Q0oOSzS9M52oD+vC8L3BuScCJ0qstknbdl3dcT/W1pwh4MMfU14AjaJ0jRtIN6hyiEmidY+KhLlDXIJyto3AqwHDoQ7oKYA7AbOwzAPAD5Ds0Gn12uxtVXecPo4t94UegNcAAAAAASUVORK5CYII=",mt=["competitions","globalSetting","loading","dispatch","user"],ht=(0,h.connect)((function(e){var n=e.competitions,t=e.loading,i=e.globalSetting,l=e.user;return{competitions:n,globalSetting:i,loading:t.models.competitions,user:l}}))((function(e){var n=e.competitions,t=(e.globalSetting,e.loading),i=e.dispatch,s=e.user,a=p()(e,mt),c=f.Z.useForm(),u=d()(c,1)[0],h=(0,m.useState)(!0),g=d()(h,2),b=g[0],w=g[1],k=(0,m.useState)(!0),N=d()(k,2),I=N[0],A=N[1],S=(0,m.useState)(!0),C=d()(S,2),F=C[0],P=C[1],T=(0,m.useState)(!0),L=d()(T,2),D=L[0],E=L[1],R=(0,m.useState)(""),M=d()(R,2),V=M[0],B=M[1],z=(0,m.useState)(""),O=d()(z,2),Y=O[0],H=O[1],q=(0,m.useState)(""),Q=d()(q,2),G=Q[0],U=Q[1],W=(0,m.useState)(""),J=d()(W,2),K=J[0],X=J[1],$=n.Header,ee=(0,m.useState)(!1),ne=d()(ee,2),te=ne[0],ie=ne[1],le=(0,m.useState)([]),se=d()(le,2),oe=se[0],ae=se[1];console.log("Header:",$),(0,m.useEffect)((function(){ue()}),[]);var ue=function(){(0,ce.rZ)(null==a?void 0:a.competitionId).then((function(e){var n,t,i;w(null==e?void 0:e.name_finish),A(null==e?void 0:e.url_finish),P(null==e?void 0:e.time_finish),E(null==e?void 0:e.question_finish),B(null==e||null===(n=e.competition)||void 0===n?void 0:n.name),U(re()(null==e||null===(t=e.competition)||void 0===t?void 0:t.start_time).format("YYYY-MM-DD HH:mm")+" ~ "+re()(null==e||null===(i=e.competition)||void 0===i?void 0:i.end_time).format("YYYY-MM-DD HH:mm")),H("".concat(window.location.origin,"/competitions/detail/")+(null==e?void 0:e.identifier));var l="";for(var s in null==e?void 0:e.data){var o,r;if(Number(s)==Number((null==e?void 0:e.data.length)-1))l+="赛题"+(Number(s)+1)+":"+(null==e||null===(o=e.data[s])||void 0===o||null===(o=o.shixun)||void 0===o?void 0:o.name);else l+="赛题"+(Number(s)+1)+":"+(null==e||null===(r=e.data[s])||void 0===r||null===(r=r.shixun)||void 0===r?void 0:r.name)+"、"}X(l),u.setFieldValue("identifier",null==e?void 0:e.identifier),null==a||a.loadingFunction(!1)}))};return(0,he.jsxs)("div",{className:dt.all,children:[(0,he.jsxs)("div",{className:dt.content,children:[(0,he.jsxs)("div",{className:b?dt.content_left_none:dt.content_left_red,children:[(0,he.jsx)("img",{className:dt.content_left_flag,src:b?ut:pt}),(0,he.jsxs)("div",{className:dt.content_left_info,children:[(0,he.jsx)("div",{className:dt.content_left_title,children:"主标题设置"}),(0,he.jsx)("div",{className:dt.content_left_description,children:b?"您已设置主标题为:".concat(V):"请在设置中填写正确的竞赛主标题"})]})]}),b?(0,he.jsx)("div",{className:dt.content_right,onClick:function(){a.clickInformation("主标题")},children:"查看"}):(0,he.jsxs)("div",{className:dt.content_right,onClick:function(){a.clickInformation("主标题")},children:["去完善信息",(0,he.jsx)("i",{className:"iconfont icon-xiaojiantou",style:{fontSize:"10px"}})]})]}),(0,he.jsxs)("div",{className:dt.content,children:[(0,he.jsxs)("div",{className:I?dt.content_left_none:dt.content_left_red,children:[(0,he.jsx)("img",{className:dt.content_left_flag,src:I?ut:pt}),(0,he.jsxs)("div",{className:dt.content_left_info,children:[(0,he.jsx)("div",{className:dt.content_left_title,children:"网址设置"}),(0,he.jsxs)("div",{className:dt.content_left_description,children:[I&&(0,he.jsxs)("span",{children:["您已设置网址为:",(0,he.jsx)("a",{href:Y,target:"_blank",children:Y})]}),!I&&(0,he.jsx)("span",{children:"请在设置中填写正确的网址"})]})]})]}),I?(0,he.jsx)("div",{className:dt.content_right,onClick:function(){a.clickInformation("比赛地址")},children:"查看"}):(0,he.jsxs)("div",{className:dt.content_right,onClick:function(){a.clickInformation("比赛地址")},children:["去完善信息",(0,he.jsx)("i",{className:"iconfont icon-xiaojiantou",style:{fontSize:"10px"}})]})]}),(0,he.jsxs)("div",{className:dt.content,children:[(0,he.jsxs)("div",{className:F?dt.content_left_none:dt.content_left_red,children:[(0,he.jsx)("img",{className:dt.content_left_flag,src:F?ut:pt}),(0,he.jsxs)("div",{className:dt.content_left_info,children:[(0,he.jsx)("div",{className:dt.content_left_title,children:"竞赛时间"}),(0,he.jsx)("div",{className:dt.content_left_description,children:F?"您已设置竞赛时间为:".concat(G):"请在设置中填写正确的竞赛时间"})]})]}),F?(0,he.jsx)("div",{className:dt.content_right,onClick:function(){a.clickInformation("竞赛时间")},children:"查看"}):(0,he.jsxs)("div",{className:dt.content_right,onClick:function(){a.clickInformation("竞赛时间")},children:["去完善信息",(0,he.jsx)("i",{className:"iconfont icon-xiaojiantou",style:{fontSize:"10px"}})]})]}),(0,he.jsxs)("div",{className:dt.content,children:[(0,he.jsxs)("div",{className:D?dt.content_left_none:dt.content_left_red,children:[(0,he.jsx)("img",{className:dt.content_left_flag,src:D?ut:pt}),(0,he.jsxs)("div",{className:dt.content_left_info,children:[(0,he.jsx)("div",{className:dt.content_left_title,children:"赛题设置"}),1===$.mode&&(0,he.jsxs)("div",{children:[D&&(0,he.jsx)(y.Z,{placement:"bottom",title:"您已经设置的:"+K,children:(0,he.jsxs)("div",{className:dt.content_left_description,children:["您已经设置的:",K]})}),!D&&(0,he.jsx)("div",{className:dt.content_left_description,children:"请在设置中填写正确的赛题设置"})]}),2===$.mode&&(0,he.jsxs)("div",{children:[$.course_id&&(0,he.jsx)(y.Z,{placement:"bottom",title:"您已经成功设置:"+$.course_name+"为本次竞赛的课堂",children:(0,he.jsxs)("div",{className:dt.content_left_description,children:["您已经成功设置“",$.course_name,"”为本次竞赛的课堂"]})}),!$.course_id&&(0,he.jsx)("div",{className:dt.content_left_description,children:"请在设置中填写正确的赛题设置"})]})]})]}),D?(0,he.jsx)("div",{className:dt.content_right,onClick:a.clickQuetions,children:"查看"}):(0,he.jsxs)("div",{className:dt.content_right,onClick:a.clickQuetions,children:["去完善信息",(0,he.jsx)("i",{className:"iconfont icon-xiaojiantou",style:{fontSize:"10px"}})]})]}),b&&I&&F&&D&&(0,he.jsx)(he.Fragment,{children:(0,he.jsxs)("div",{className:dt.content,children:[(0,he.jsx)(f.Z,{form:u,style:{marginLeft:22},labelCol:{flex:"100px"},children:(0,he.jsx)(f.Z.Item,{className:dt.form_item,colon:!1,name:"identifier",children:(0,he.jsx)(j.Z,{prefix:"".concat(window.location.origin,"/competitions/detail/"),disabled:!0,className:dt.form_item_item})})}),(0,he.jsxs)("div",{className:dt.fuzhi,onClick:function(){var e=document.createElement("input");e.value="".concat(window.location.origin,"/competitions/detail/")+u.getFieldValue("identifier"),document.body.appendChild(e),e.select(),document.execCommand("Copy"),v.ZP.success("复制成功"),e.remove()},children:[(0,he.jsx)("i",{className:"iconfont icon-fuzhi",style:{marginRight:"5px"}}),"复制"]}),(0,he.jsx)("div",{className:dt.fuzhi_text,children:"参赛人员可访问该网址参加比赛"})]})}),(0,he.jsxs)("div",{className:dt.content,children:[(0,he.jsx)(pe.Z,{disabled:!(b&&I&&F&&D),type:"primary",className:dt.tijiao,onClick:r()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:ie(!0),(0,de.GY)({}).then((function(e){ae(null==e?void 0:e.schools)})).then((function(){var e,n,t;u.setFieldsValue({sponsor_schools:null===(e=s.userInfo)||void 0===e?void 0:e.user_school_id,sponsor_user_name:null===(n=s.userInfo)||void 0===n?void 0:n.real_name,sponsor_user_phone:null===(t=s.userInfo)||void 0===t?void 0:t.phone})}));case 2:case"end":return e.stop()}}),e)}))),children:"提交审核"}),(0,he.jsx)("div",{className:"".concat(dt.tijiao_text," ").concat(b&&I&&F&&D?"":"c-red"),children:b&&I&&F&&D?"准备好后,您可发起审核":"请完成竞赛指引后,再提交审核"})]}),(0,he.jsxs)(x.Z,{title:!1,footer:!1,open:te,width:610,className:dt.scoremodal,closable:!1,centered:!0,onCancel:function(){return ie(!1)},children:[(0,he.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,he.jsx)("div",{className:dt.title,children:"为了加快竞赛审核速度,请确认以下信息是否准确"}),(0,he.jsx)("span",{onClick:function(){return ie(!1)},style:{cursor:"pointer"},className:dt.close,children:(0,he.jsx)("i",{className:"iconfont icon-guanbi",style:{color:"#979797",fontSize:"15px"}})})]}),(0,he.jsx)("div",{className:dt.content,children:(0,he.jsxs)(f.Z,{form:u,className:dt.formWrap,onFinish:function(e){(0,ce.qt)(l()(l()({},e),{},{id:null==a?void 0:a.competitionId})).then((function(e){0==(null==e?void 0:e.status)?(v.ZP.success("提交成功"),ie(!1),i({type:"competitions/getStaff",payload:{identifier:null==a?void 0:a.competitionId}}),i({type:"competitions/getHeader",payload:{identifier:null==a?void 0:a.competitionId}})):v.ZP.error(null==e?void 0:e.message)}))},labelCol:{flex:"110px"},children:[(0,he.jsx)(f.Z.Item,{className:dt.form_item,label:"主办方",colon:!1,name:"sponsor_schools",children:(0,he.jsx)(_.default,{mode:"multiple",className:dt.form_item_item_select,options:oe,fieldNames:{label:"name",value:"id"},placeholder:"请输入主办方",filterOption:function(e,n){var t;return(null!==(t=null==n?void 0:n.name)&&void 0!==t?t:"").toLowerCase().includes(e.toLowerCase())}})}),(0,he.jsx)(f.Z.Item,{className:dt.form_item,label:"主要负责人姓名",colon:!1,name:"sponsor_user_name",children:(0,he.jsx)(j.Z,{className:dt.form_item_item,placeholder:"请输入主要负责人姓名"})}),(0,he.jsx)(f.Z.Item,{className:dt.form_item,label:"主要负责人电话",colon:!1,name:"sponsor_user_phone",rules:[{pattern:new RegExp(/^((0\d{2,3}(-)?\d{7,8})|(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8})$/,"g"),message:"必须是正确的座机号或者手机号"}],children:(0,he.jsx)(j.Z,{className:dt.form_item_item,placeholder:"请输入主要负责人电话"})}),(0,he.jsx)("div",{className:dt.bottom,children:(0,he.jsxs)(f.Z.Item,{children:[(0,he.jsx)(Z.ZP,{size:"middle",className:dt.no,onClick:function(){ie(!1)},children:"取消"}),(0,he.jsx)(Z.ZP,{className:dt.yes,size:"middle",type:"primary",htmlType:"submit",loading:t,children:"保存"})]})})]})})]})]})})),_t="ModalStyle___cW8H3",ft=["competitions","globalSetting","dispatch","user","loadingFunction","loading"],xt=["key","name"],vt=(0,h.connect)((function(e){return{competitions:e.competitions,loading:e.loading.effects}}))((function(e){var n=e.competitions,t=(e.globalSetting,e.dispatch),i=(e.user,e.loadingFunction),s=void 0===i?function(e){}:i,a=e.loading,c=(p()(e,ft),n.GuidesData),u=(0,h.useParams)().identifier,_=(0,m.useRef)(),g=f.Z.useForm(),y=d()(g,1)[0],b=f.Z.useWatch("list",y),w=function(){var e=r()(o()().mark((function e(n){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(console.log("====",n),!(n.list.length<2)){e.next=4;break}return v.ZP.warning("请至少添加2个赛程"),e.abrupt("return");case 4:return e.next=6,t({type:"competitions/postGuides",payload:l()({identifier:u},n)});case 6:0==e.sent.status&&(v.ZP.success("更新成功"),t({type:"competitions/getHeader",payload:{identifier:u}}),k());case 8:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),k=function(){t({type:"competitions/getGuides",payload:{identifier:u}})};return(0,m.useEffect)((function(){s(!1),k()}),[]),(0,m.useEffect)((function(){var e;y.setFieldsValue(l()(l()({},(null==c?void 0:c.data)||{}),{},{list:null==c||null===(e=c.data)||void 0===e||null===(e=e.list)||void 0===e?void 0:e.map((function(e){return l()(l()({},e),{},{competition_time:null!=e&&e.competition_time?re()(null==e?void 0:e.competition_time):null})}))}))}),[c]),(0,he.jsx)(hn.Z,{spinning:!!a["competitions/getGuides"]||!!a["competitions/postGuides"],children:(0,he.jsx)("div",{className:"p30",children:(0,he.jsxs)(f.Z,{form:y,colon:!1,onFinish:w,initialValues:{list:[{},{}]},children:[(0,he.jsxs)(le.Z,{wrap:!1,align:"middle",gutter:20,children:[(0,he.jsx)(se.Z,{children:"赛程设置"}),(0,he.jsx)(se.Z,{children:(0,he.jsx)(f.Z.Item,{style:{marginBottom:0},name:"guides_is_hidden",valuePropName:"checked",children:(0,he.jsx)(ie.Z,{children:"隐藏"})})}),(0,he.jsx)(se.Z,{flex:1,children:(0,he.jsx)(le.Z,{wrap:!1,align:"middle",justify:"end",children:(0,he.jsx)(se.Z,{children:(0,he.jsx)(N.op,{icon:(0,he.jsx)("i",{className:"iconfont icon-xiaojiahao "}),onClick:function(){6!=(null==b?void 0:b.length)?_.current({}):v.ZP.warning("赛程最多可添加6个")},children:"新增"})})})})]}),(0,he.jsx)("div",{className:"mt25 mb30",style:{padding:"14px 20px",background:"#F6F7F9",color:"#464F66"},children:"规则说明:在此版块管理员可以创建赛事的日程时间轴,每个赛程将在时间轴上按序号顺序依次排列。创建成功后将对平台用户公开,使用户能够轻松了解整个赛事的进度和安排。"}),(0,he.jsx)(f.Z.List,{name:"list",children:function(e,n){var t=n.add,i=n.remove;return _.current=t,(0,he.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"20px"},children:e.map((function(e,n){var t=e.key,s=e.name,o=p()(e,xt);return(0,he.jsxs)("div",{children:[(0,he.jsx)("div",{style:{background:"#F6F7F9",padding:"10px 20px"},children:(0,he.jsxs)(le.Z,{wrap:!1,align:"middle",justify:"space-between",children:[(0,he.jsxs)(se.Z,{children:["赛程",(0,me.EM)(n+1)]}),(0,he.jsx)(se.Z,{children:(0,he.jsx)("span",{className:"c-red current",onClick:function(){x.Z.confirm({className:_t,icon:null,centered:!0,title:"提示",width:460,content:"确定要删除此赛程吗?删除后,请点击“保存更改”按钮以保存此次操作。",onOk:function(){i(s)}})},children:"删除"})})]})}),(0,he.jsx)("div",{className:"p20",style:{border:"1px solid #F1F1F1",borderTopColor:"transparent"},children:(0,he.jsxs)(le.Z,{wrap:!1,align:"middle",gutter:40,children:[(0,he.jsx)(se.Z,{children:(0,he.jsx)(f.Z.Item,l()(l()({label:"赛程名称"},o),{},{name:[s,"name"],rules:[{required:!0,message:"请输入赛程名称"},{whitespace:!0,message:"赛程名称不能全为空格"}],children:(0,he.jsx)(j.Z,{placeholder:"请输入赛程名称",maxLength:10,showCount:!0,style:{width:360}})}))}),(0,he.jsx)(se.Z,{flex:1,children:(0,he.jsx)(f.Z.Item,l()(l()({label:"赛程时间"},o),{},{name:[s,"competition_time"],rules:[{required:!0,validator:function(e,t){var i;return null===t?Promise.reject("请选择截止时间"):0!==n&&re()(t).startOf("second")<=re()(null==b||null===(i=b[n-1])||void 0===i?void 0:i.competition_time).startOf("second")?Promise.reject("当前赛程时间需晚于上一个赛程时间,请重新选择"):Promise.resolve()}}],children:(0,he.jsx)(te.default,{style:{width:"100%"},placeholder:"请选择赛程时间",format:"YYYY-MM-DD HH:mm",disabledDate:0!==n&&function(e){var t;return(0,me.Q8)(e,null,null,null==b||null===(t=b[n-1])||void 0===t?void 0:t.competition_time)},disabledTime:0!==n&&function(e){var t;return(0,me.d0)(e,null==b||null===(t=b[n-1])||void 0===t?void 0:t.competition_time)},suffixIcon:(0,he.jsx)(he.Fragment,{}),showTime:{format:"HH:mm",defaultValue:re()((0,me.U6)(),"HH:mm")}})}))})]})})]},t)}))})}}),(0,he.jsx)(le.Z,{className:"mt20",wrap:!1,justify:"end",gutter:20,children:(0,he.jsx)(se.Z,{children:(0,he.jsx)(f.Z.Item,{children:(0,he.jsx)(Z.ZP,{type:"primary",htmlType:"submit",children:"保存更改"})})})})]})})})})),gt=["competitions","globalSetting","dispatch","user"],yt=(0,h.connect)((function(e){return{competitions:e.competitions,globalSetting:e.globalSetting,user:e.user}}))((function(e){var n=e.competitions,t=(e.globalSetting,e.dispatch),i=(e.user,p()(e,gt),(0,h.useParams)().identifier),l=(0,m.useState)(!0),s=d()(l,2),o=(s[0],s[1],(0,m.useState)("竞赛信息")),a=d()(o,2),r=a[0],c=a[1],u=(0,m.useState)(!0),_=d()(u,2),f=_[0],x=_[1],v=(0,m.useState)(null),g=d()(v,2),y=(g[0],g[1]),j=(0,m.useState)(""),b=d()(j,2),w=b[0],Z=b[1],k=function(e){x(e)};return(0,m.useEffect)((function(){}),[r]),(0,m.useEffect)((function(){"1"===n.actionTabs.key?(c("赛题设置"),t({type:"competitions/setActionTabs",payload:{}})):"5"===n.actionTabs.key?(c("竞赛指引"),t({type:"competitions/setActionTabs",payload:{}})):"7"===n.actionTabs.key&&(c("竞赛信息"),t({type:"competitions/setActionTabs",payload:{}}))}),[n.actionTabs]),(0,he.jsx)("div",{className:I,ref:y,children:(0,he.jsxs)("div",{className:A,children:[(0,he.jsx)("div",{className:S,children:"基础设置"}),(0,he.jsxs)("div",{className:C,children:[(0,he.jsx)("div",{className:F,children:(0,he.jsx)("div",{children:["竞赛信息","图片设置","赛题设置","赛程设置","管理人员","竞赛指引"].map((function(e,n){return(0,he.jsx)("div",{className:r==e?T:P,onClick:function(){document.body.scrollIntoView({block:"start",behavior:"smooth"}),c(e),x(!0)},children:e},n)}))})}),(0,he.jsx)("div",{className:L,children:(0,he.jsxs)(hn.Z,{spinning:f,children:["竞赛信息"==r&&(0,he.jsx)(xe,{competitionId:i,loadingFunction:k,formName:w}),"图片设置"==r&&(0,he.jsx)(Ce,{competitionId:i,loadingFunction:k}),"赛题设置"==r&&(0,he.jsx)(On,{competitionId:i,loadingFunction:k}),"赛程设置"==r&&(0,he.jsx)(vt,{loadingFunction:k}),"管理人员"==r&&(0,he.jsx)(ct,{competitionId:i,loadingFunction:k}),"竞赛指引"==r&&(0,he.jsx)(ht,{competitions:n,clickInformation:function(e){c("竞赛信息"),"主标题"==e?Z("name"):"比赛地址"==e?Z("identifier"):"竞赛时间"==e&&Z("start_time")},clickQuetions:function(){c("赛题设置")},competitionId:i,loadingFunction:k})]})})]})]})})})),jt=t(20834),bt="bg___htQ1O",wt="title___dw_wz",Zt="left___CDy7v",kt="muitem___pDhZj",Nt="muitemclick___WXoKV",It="right___tNRAa",At="button___tMn5K",St={flex_box_center:"flex_box_center___Y72kq",flex_space_between:"flex_space_between___d30ej",flex_box_vertical_center:"flex_box_vertical_center___p_tif",flex_box_center_end:"flex_box_center_end___AyBVH",flex_box_column:"flex_box_column___NQalW",bg:"bg___cLFww",btns:"btns___uWjSy",confirm:"confirm___ZvnTx",cancel:"cancel___v9uv4",deletetitle:"deletetitle___DnoRO",submitwork:"submitwork___tVjOE",scoremodal:"scoremodal___iKA69",title:"title___GESKF",content:"content___r8E9Y",bottom:"bottom___HS8jb",yes:"yes___itu44",no:"no___Qs1U3",bottoms:"bottoms___ng0EW",loaderimg:"loaderimg___XJWfN",upload:"upload___zGUpB"},Ct=t(68446),Ft=t(1012),Pt=t(47257),Tt=t.n(Pt),Lt=t(28388),Dt=t(70464),Et=["competitions","globalSetting","loading","dispatch","selectedKeys","isedit","setisedit","user"],Rt=(0,h.connect)((function(e){var n=e.competitions,t=e.loading,i=e.globalSetting,l=e.user;return{competitions:n,globalSetting:i,loading:t.models.competitions,user:l}}))((function(e){var n,t,i=e.competitions,s=(e.globalSetting,e.loading,e.dispatch),a=(e.selectedKeys,e.isedit),c=e.setisedit,u=e.user,_=(p()(e,Et),(0,h.useParams)().identifier),f=i.RightItems,g=i.Header,b=(0,m.useState)(!1),w=d()(b,2),k=w[0],I=w[1],A=(0,m.useState)(!1),S=d()(A,2),C=S[0],F=S[1],P=(0,m.useState)(!0),T=d()(P,2),L=T[0],D=T[1],E=(0,m.useState)([]),R=d()(E,2),M=R[0],V=R[1],B=(0,m.useState)([]),z=d()(B,2),O=z[0],Y=z[1],H=(0,m.useState)(f.md_content),q=d()(H,2),Q=q[0],G=q[1],U=(0,m.useState)(!1),W=d()(U,2),J=W[0],K=W[1],X=(0,m.useState)(""),$=d()(X,2),ee=$[0],te=$[1],ae=(0,m.useState)([]),de=d()(ae,2),_e=de[0],fe=de[1],xe=(0,m.useState)(!1),ve=d()(xe,2),ge=ve[0],ye=ve[1],je=(0,m.useState)(),be=d()(je,2),we=be[0],Ze=be[1],ke=(0,m.useState)(!1),Ne=d()(ke,2),Ie=Ne[0],Se=(Ne[1],(0,m.useState)(0)),Ce=d()(Se,2),Fe=Ce[0],Te=Ce[1],Le=((0,h.useParams)(),re()()>re()(null==g?void 0:g.start_time)&&re()()0,openFileDialogOnClick:re()()>re()(null==g?void 0:g.start_time)&&re()()400)){e.next=5;break}return v.ZP.error("文件名称长度不能超过400个字符"),e.abrupt("return",!1);case 5:if("zip"==i){e.next=8;break}return v.ZP.error("仅支持zip上传"),e.abrupt("return",!1);case 8:if(!(t>2)){e.next=11;break}return v.ZP.error("《".concat(n.name,"》文件无法上传。超过单个文件上传大小限制(2GB)")),e.abrupt("return",!1);case 11:return fe([{name:n.name,file:n}]),e.abrupt("return",!1);case 13:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)}),onRemove:(n=r()(o()().mark((function e(n){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:fe(Pe()(_e.filter((function(e){return e.name!==n.name}))));case 1:case"end":return e.stop()}}),e)}))),function(e){return n.apply(this,arguments)})}),De=[{title:"选手姓名",dataIndex:"user_name",width:100,ellipsis:!0,render:function(e){return e||"--"}},{title:"提交状态",width:100,dataIndex:"evaluation_status",render:function(e){return"waiting"==e?(0,he.jsx)("span",{style:{color:"#00B187 "},children:"排队中"}):"progress"==e?(0,he.jsx)("span",{style:{color:""},children:"进行中"}):"cancelled"==e?(0,he.jsx)("span",{style:{color:"#E53333"},children:"已取消"}):"completed"==e?(0,he.jsx)("span",{style:{color:"#165DFF"},children:"已完成"}):"error"==e?(0,he.jsx)("span",{style:{color:"#ff4d4f"},children:"提交失败"}):"--"}},{title:"得分",width:80,dataIndex:"evaluation_score",render:function(e){return e||"--"}},{title:"描述",width:222,dataIndex:"comment",render:function(e){return(0,he.jsx)(y.Z,{title:e,children:(0,he.jsx)("span",{children:e||"- -"})})}},{title:"提交时间",width:200,dataIndex:"commit_at",render:function(e){return e?re()(e).format("YYYY.MM.DD HH:mm:ss"):"--"}},{title:"下载文件",ellipsis:!0,dataIndex:"commit_id",render:function(e,n){var t,i,l,s,o,a;return(0,he.jsx)(y.Z,{placement:"topLeft",title:null==n||null===(t=n.attachments)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.title,children:null!=n&&null!==(i=n.attachments)&&void 0!==i&&null!==(i=i[0])&&void 0!==i&&i.is_oss?(0,he.jsx)("a",{onClick:function(){var e;(0,me.Nd)("","".concat(null==n||null===(e=n.attachments)||void 0===e||null===(e=e[0])||void 0===e?void 0:e.url.replace("disposition=inline","")))},children:(null==n||null===(l=n.attachments)||void 0===l||null===(l=l[0])||void 0===l?void 0:l.title)||"--"}):(0,he.jsx)("a",{href:ue.Z.API_SERVER+(null==n||null===(s=n.attachments)||void 0===s||null===(s=s[0])||void 0===s?void 0:s.url),download:null==n||null===(o=n.attachments)||void 0===o||null===(o=o[0])||void 0===o?void 0:o.title,children:(null==n||null===(a=n.attachments)||void 0===a||null===(a=a[0])||void 0===a?void 0:a.title)||"--"})})}},{title:"测评信息",width:120,dataIndex:"commit_id",render:function(e,n){return(0,he.jsxs)(he.Fragment,{children:[(0,he.jsx)(Z.ZP,{style:{padding:0},type:"link",disabled:"completed"!=(null==n?void 0:n.evaluation_status),onClick:function(){var e=x.Z.confirm({centered:!0,okText:"确定",icon:null,cancelText:"取消",title:"运行结果",content:(0,he.jsx)("div",{style:{maxHeight:500,overflow:"auto"},children:null==n?void 0:n.evaluation_info}),onOk:function(){return e.destroy()},onCancel:function(){return e.destroy()}})},children:"查看"}),(0,he.jsx)(Z.ZP,{className:"ml10",style:{padding:0},type:"link",danger:!0,disabled:"waiting"!=(null==n?void 0:n.evaluation_status),onClick:function(){var e,t=x.Z.confirm({centered:!0,okText:"确定",icon:null,cancelText:"取消",title:"",content:(0,he.jsx)(he.Fragment,{children:"取消后,该成员提交的作品将不进行评测排队,请确认是否取消。"}),onOk:(e=r()(o()().mark((function e(){var i;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ae.ZP)("/api/competitions/".concat(_,"/competition_commit_records/").concat(n.id,"/cancel.json"),{method:"POST",body:{record_id:n.id}});case 2:0==(null==(i=e.sent)?void 0:i.status)&&(v.ZP.success("取消成功"),t.destroy(),Ye());case 4:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)}),onCancel:function(){return t.destroy()}})},children:"取消"})]})}}];(0,m.useEffect)((function(){var e;Ie&&(null===(e=we)||void 0===e||e.cancel())}),[Ie]);var Ee=0;(0,m.useEffect)((function(){Fe<3&&Fe&&_e.map(function(){var e=r()(o()().mark((function e(n){var t,i,l,s;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.status&&"error"!==n.status||Ie){e.next=22;break}return n.status="uploading",n.file.status="uploading",e.next=5,Re(n,{login:null==u||null===(t=u.userInfo)||void 0===t?void 0:t.login,container_type:"CompetitionWorkMode",container_id:null,description:"",realFileName:!0});case 5:if(0!=(null==(i=e.sent)?void 0:i.status)){e.next=20;break}if(console.log(i),++Ee!=_e.length){e.next=18;break}return Te(0),ye(!1),e.next=14,(0,Ae.ZP)("/api/competitions/".concat(_,"/competition_commit_records.json"),{method:"post",body:{attachment_ids:[null==i||null===(l=i.data)||void 0===l?void 0:l.attachment_id]}});case 14:0===(null==(s=e.sent)?void 0:s.status)&&(v.ZP.info(null==s?void 0:s.message),Ye()),fe([]),Ye();case 18:e.next=22;break;case 20:Te(2),ye(!1);case 22:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}())}),[Fe]);var Re=function(){var e=r()(o()().mark((function e(n,t){var i,l,s,a,r,c,d,p,m,h,_;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.file_name=n.name,d=n.name,e.next=4,(0,Ae.ZP)("/api/buckets/get_competition_work_mode_token.json",{method:"get"});case 4:if(0===(null==(p=e.sent)?void 0:p.status)){e.next=12;break}return _e[_e.findIndex((function(e){return e.name===d}))].status="error",_e[_e.findIndex((function(e){return e.name===d}))].file.status="error",v.ZP.warning("上传失败,请重新尝试"),Te(2),ye(!1),e.abrupt("return");case 12:return p.data=JSON.parse((0,Ct.pe)(p.data)),we=new(Tt())({endpoint:null==p||null===(i=p.data)||void 0===i?void 0:i.end_point,region:null==p||null===(l=p.data)||void 0===l?void 0:l.region,accessKeyId:null==p||null===(s=p.data)||void 0===s?void 0:s.access_key_id,accessKeySecret:null==p||null===(a=p.data)||void 0===a?void 0:a.access_key_secret,bucket:null==p||null===(r=p.data)||void 0===r?void 0:r.bucket,stsToken:null==p||null===(c=p.data)||void 0===c?void 0:c.security_token}),console.log(n,"file"),Ze(we),(m=n.name.split(".")).pop(),h=t.realFileName?m.join("."):(0,Ft.Z)(),_=(new Date).getTime(),e.abrupt("return",new Promise((function(e,i){try{var l,s;we.multipartUpload("competition_work_mode/".concat(null==u||null===(l=u.userInfo)||void 0===l?void 0:l.login,"/").concat(h+"_"+_).concat(d.indexOf(".")>-1?"."+d.split(".").pop():""),new Blob([n.file],{type:n.file.type}),{timeout:36e5,partSize:1002400,progress:function(e,n,t){try{console.log("进度",e,n,t),2==Fe&&(Te(1),ye(!0));var i=_e.findIndex((function(e){return e.name===d}));console.log("index",i),_e[i].file.percent=100*e,_e[i].tempCheckpoint=n,fe(Pe()(_e))}catch(e){}},checkpoint:_e[_e.findIndex((function(e){return e.name===d}))].tempCheckpoint,callback:{customValue:{id:d+""},url:null==p||null===(s=p.data)||void 0===s?void 0:s.callback_url,host:null==p?void 0:p.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,Ae.rz)(t)}}).then((function(t){var i,l=_e.findIndex((function(e){return e.name===d})),s="done";if(0===(null===(i=t.data)||void 0===i?void 0:i.status)){var o;n.response=null===(o=t.data)||void 0===o?void 0:o.data;var a=_e.findIndex((function(e){return e.name===d}));_e[a].status="done",_e[a].file.status="done"}else{var r;v.ZP.warning(null===(r=t.data)||void 0===r?void 0:r.message),s="error"}_e[l].status=s,_e[l].file.status=s,e(null==t?void 0:t.data)})).catch((function(e){_e[_e.findIndex((function(e){return e.name===d}))].status="error",_e[_e.findIndex((function(e){return e.name===d}))].file.status="error",v.ZP.warning("上传失败,请重新尝试"),fe(Pe()(_e)),i(e),Te(2),ye(!1),console.log("err:",e)}))}catch(e){}})));case 21:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),Me=function(){var e=r()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==_e.length){e.next=3;break}return v.ZP.info("提交失败,请上传作品文件"),e.abrupt("return");case 3:ye(!0),Te(1);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();(0,m.useEffect)((function(){null!=g&&g.is_member&&3===(null==g?void 0:g.mode)&&Ye()}),[g]),(0,m.useEffect)((function(){var e,n=[];null==f||null===(e=f.attachments)||void 0===e||e.map((function(e){var t={uid:e.id,name:e.title,response:{id:e.id}};n.push(t)})),Y(n)}),[null==f?void 0:f.attachments]),(0,m.useEffect)((function(){te(null==f?void 0:f.name),G(f.md_content),K(null==f?void 0:f.hidden)}),[f.md_content||f.name||f.hidden]),console.log("---",O);var Ve={name:"file",multiple:!0,withCredentials:!0,action:ue.Z.API_SERVER+"/api/attachments.json",fileList:O,onRemove:function(e){(0,ce.y8)({id:e.response.id})},onChange:function(e){Y(Pe()(e.fileList))},beforeUpload:function(e){var n=e.size/1024/1024<150;return n||(v.ZP.info("文件大小必须小于150MB"),ne.Z.LIST_IGNORE)}};function Be(){return(Be=r()(o()().mark((function e(){var n;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,s({type:"competitions/updateMdContent",payload:{attachment_ids:ze(O),competition_module_id:f.id,md_content_id:f.md_id,content:Q,identifier:_,hidden:J,description:ee}});case 2:0===(null==(n=e.sent)?void 0:n.status)&&(v.ZP.info("提交成功"),c(!1),s({type:"competitions/getItem",payload:{url:f.params_url}}),s({type:"competitions/getHeader",payload:{identifier:_}}),s({type:"competitions/setActionTabs",payload:{key:"showheader"}}));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ze(e){var n=[];return(null==e?void 0:e.length)<=0||e&&(null==e||e.map((function(e){n.push(e.response.id)}))),n}function Oe(){return Oe=r()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:x.Z.confirm({icon:!1,title:"提示",content:"删除页面后,数据不可恢复,请确认是否删除",onOk:function(){var e=r()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ae.ZP)("/api/competitions/".concat(_,"/competition_modules/").concat(f.id,".json"),{method:"delete"});case 2:0===e.sent.status&&(s({type:"competitions/getHeader",payload:{identifier:_}}),c(!1));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()});case 1:case"end":return e.stop()}}),e)}))),Oe.apply(this,arguments)}var Ye=function(){var e=r()(o()().mark((function e(){var n,t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return D(!0),e.next=3,(0,Ae.ZP)("/api/competitions/".concat(_,"/competition_commit_records.json"),{method:"get"});case 3:0===(null==(n=e.sent)?void 0:n.status)&&(V(null==n||null===(t=n.data)||void 0===t?void 0:t.records),D(!1));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,he.jsxs)("section",{className:St.bg,children:[a?(0,he.jsxs)("div",{children:[!(3===(null==g?void 0:g.mode)&&"entrance"===(null==f?void 0:f.module_type))&&(0,he.jsxs)("div",{style:{marginBottom:30,display:"flex",alignItems:"center"},children:[(0,he.jsx)(j.Z,{style:{width:"82%",height:40,borderRadius:2,border:"1px solid #DCDCDC"},value:ee,onChange:function(e){te(e.target.value)}})," ",(0,he.jsx)(ie.Z,{className:"ml40 font14",style:{marginLeft:"23px"},checked:J,onChange:function(e){K(e.target.checked)},children:(0,he.jsx)("span",{style:{display:"inline-block"},children:"隐藏"})}),(0,he.jsxs)("span",{className:St.deletetitle,onClick:function(){!function(){Oe.apply(this,arguments)}()},children:[(0,he.jsx)("i",{className:"iconfont icon-piliangshanchu3",style:{fontSize:14,marginRight:6}}),"删除页面"]})]}),(0,he.jsx)(Dt.Z,{defaultValue:f.md_content,onChange:function(e){return G(e)}}),(0,he.jsxs)(ne.Z,l()(l()({},Ve),{},{children:[(0,he.jsx)("div",{className:"inline-block current",children:(0,he.jsx)(N.op,{style:{borderRadius:2,marginTop:18},children:"上传附件"})}),(0,he.jsx)("span",{className:"ml25 c-grey-999",children:"(单个文件150M以内)"})]})),(0,he.jsxs)("div",{className:St.btns,children:[(0,he.jsx)(Z.ZP,{className:St.cancel,onClick:function(){return c(!1)},children:"取消"}),(0,he.jsx)(pe.Z,{className:St.confirm,type:"primary",onClick:function(){return Be.apply(this,arguments)},children:"保存更改"})]})]}):(0,he.jsxs)("div",{children:[!(null!=f&&f.md_content)&&!(3===(null==g?void 0:g.mode)&&"entrance"===(null==f?void 0:f.module_type))&&(0,he.jsx)(xn.Z,{}),(0,he.jsx)(Lt.Z,{style:{marginBottom:30,width:"calc(1015px - 60px)"},value:f.md_content||""}),f&&f.attachments&&f.attachments.map((function(e,n){return(0,he.jsx)("div",{children:(0,he.jsxs)("a",{href:(null===ue.Z||void 0===ue.Z?void 0:ue.Z.API_SERVER)+e.url,target:"_self",download:e.title,children:[(0,he.jsx)("i",{style:{color:"#29BD8B"},className:"font-14 color-green iconfont icon-fujian mr8"}),(0,he.jsx)("span",{style:{color:"#000000"},children:e.title}),(0,he.jsx)("span",{style:{color:"#000000",marginLeft:"10px"},children:e.filesize})]})})}))]}),a&&3===(null==g?void 0:g.mode)&&"entrance"===(null==f?void 0:f.module_type)&&(0,he.jsx)("div",{style:{borderTop:"1px solid #f1f1f1",margin:"20px 0"}}),"entrance"===(null==f?void 0:f.module_type)&&(0,he.jsxs)("div",{style:{marginTop:15},children:[(0,he.jsxs)("div",{style:{justifyContent:"space-between",display:"flex"},children:[(0,he.jsx)("span",{style:{color:"#333333",fontWeight:600,fontSize:"14px"},children:"作品提交"}),(0,he.jsxs)("span",{style:{color:"#9096A3",marginLeft:"auto",fontSize:"12px"},children:["作品提交时间",(0,he.jsxs)("span",{style:{color:"#232B40",marginLeft:5},children:[null==g?void 0:g.start_time,"~",null==g?void 0:g.end_time]})]})]}),(0,he.jsxs)("div",{style:{display:"flex",position:"relative",marginBottom:20},children:[(0,he.jsx)("div",{className:"mt20",style:{width:333},onClick:function(){re()()re()(null==g?void 0:g.end_time)?v.ZP.warning("非作品提交时间,不可操作"):null!=g&&g.is_member||F(!0)},children:(0,he.jsx)(ne.Z.Dragger,l()(l()({},Le),{},{maxCount:1,children:(0,he.jsxs)("div",{style:{textAlign:"center"},children:[(0,he.jsx)("p",{style:{marginTop:22},children:(0,he.jsx)("i",{className:"iconfont icon-shangchuan",style:{color:"#5091FF",fontSize:"30px"}})}),(0,he.jsxs)("p",{className:"mt10",style:{marginBottom:22},children:["拖拽文件或",(0,he.jsx)("a",{children:"点击此处上传"})]})]})}))}),(0,he.jsxs)("div",{style:{marginLeft:20,marginTop:120},children:[re()()>re()(null==g?void 0:g.start_time)&&re()()0&&(0,he.jsxs)("div",{className:"mt40",style:{borderTop:"1px solid #F1F1F1"},children:[(0,he.jsxs)(le.Z,{className:"mt30",align:"middle",justify:"space-between",children:[(0,he.jsx)(se.Z,{style:{fontWeight:600},children:"我的成绩"}),(0,he.jsx)(se.Z,{children:(0,he.jsx)(Z.ZP,{type:"primary",onClick:Ye,children:"更新"})})]}),(0,he.jsx)(oe.Z,{className:"mt30",loading:L,pagination:!1,dataSource:M,columns:De})]})]}),(0,he.jsx)(x.Z,{title:"报名",open:C,okText:"立即报名",cancelText:"取消",centered:!0,width:320,onCancel:function(){F(!1)},onOk:function(){F(!1),I(!0)},children:(0,he.jsx)("div",{children:"你暂未报名,请先报名"})}),(0,he.jsxs)(x.Z,{title:!1,footer:!1,open:k,width:318,className:St.scoremodal,closable:!1,centered:!0,children:[(0,he.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,he.jsx)("div",{className:St.title,children:"报名"}),(0,he.jsx)("span",{onClick:function(){return I(!1)},style:{cursor:"pointer"},className:St.close,children:(0,he.jsx)("i",{className:"iconfont icon-danchuangguanbi",style:{fontSize:"14px"}})})]}),(0,he.jsx)("div",{className:St.content,children:"选择参赛方式"}),(0,he.jsxs)("div",{className:St.bottoms,children:[(0,he.jsx)(Z.ZP,{className:St.no,onClick:function(){s({type:"competitions/setActionTabs",payload:{key:"2"}}),I(!1)},children:"加入战队"}),(0,he.jsx)(Z.ZP,{className:St.yes,onClick:function(){s({type:"competitions/setActionTabs",payload:{key:"3"}}),I(!1)},children:"创建战队"})]})]})]})})),Mt=t(43971),Vt=t(78389),Bt=t(89831),zt=function(e){var n=e.data,t=e.isedit,i=e.selectedKeys,s=e.dispatch,a=(0,m.useState)([]),c=d()(a,2),u=c[0],p=c[1],_=(0,m.useState)(!1),f=d()(_,2),x=f[0],g=f[1],j=(0,h.useParams)().identifier,b=function(e,n,t){var i=Array.from(e),l=i.splice(n,1),s=d()(l,1)[0];return i.splice(t,0,s),i};(0,m.useEffect)((function(){n.length>0&&p(Pe()(n)||[])}),[n]);var w=function(){var e=r()(o()().mark((function e(n,i){var l,a;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.destination){e.next=2;break}return e.abrupt("return");case 2:if(!t){e.next=5;break}return v.ZP.info("请先保存或取消当前正在编辑的内容。"),e.abrupt("return");case 5:return l=b(i,n.source.index,n.destination.index),console.log("---",i,l),g(!0),e.next=10,(0,Ae.ZP)("/api/competitions/".concat(j,"/competition_modules/update_position.json"),{method:"post",body:{position_array:l}});case 10:a=e.sent,g(!1),0===a.status&&(s({type:"competitions/getHeader",payload:{identifier:j}}),s({type:"competitions/setActionTabs",payload:{key:"showheader"}}));case 13:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}();return(0,he.jsx)("div",{children:(0,he.jsx)(Bt.Z5,{onDragEnd:function(e){return w(e,u)},children:(0,he.jsx)(Bt.bK,{droppableId:"droppable",children:function(e,n){return(0,he.jsxs)("div",l()(l()({ref:e.innerRef},e.droppableProps),{},{children:[(0,he.jsx)(hn.Z,{spinning:x,children:u.map((function(e,n){return(0,he.jsx)(Bt._l,{draggableId:n.toString(),index:n,children:function(n,t){return(0,he.jsx)("aside",l()(l()(l()({ref:n.innerRef},n.draggableProps),n.dragHandleProps),{},{children:(0,he.jsx)(y.Z,{title:e.name,children:(0,he.jsx)("div",{onClick:e.onClick,className:i===e.id?Nt:e.className,children:e.name})})}))}},n)}))}),e.placeholder]}))}})})})},Ot=["competitions","globalSetting","loading","dispatch","user"],Yt=(0,h.connect)((function(e){var n=e.competitions,t=e.loading,i=e.globalSetting,l=e.user;return{competitions:n,globalSetting:i,loading:t.models.competitions,user:l}}))((function(e){var n,t,i,s,a,c,u,_,f,x,v=e.competitions,g=(e.globalSetting,e.loading,e.dispatch),y=e.user,j=(p()(e,Ot),(0,h.useParams)().identifier),b=v.Header,w=(v.RightItems,v.Staff),Z=v.Prizes,k=v.Account,N=(0,m.useState)([]),I=d()(N,2),A=I[0],S=I[1],C=(0,m.useState)("qit"),F=d()(C,2),P=F[0],T=F[1],L=(0,m.useState)(!1),D=d()(L,2),E=D[0],R=D[1],M=(0,m.useState)([]),V=d()(M,2),B=V[0],z=V[1],O=(0,m.useState)(!1),Y=d()(O,2),H=Y[0],q=Y[1],Q=(0,m.useRef)(null),G=(0,m.useState)(),U=d()(G,2),W=U[0],J=U[1],K=[{type:"entrance",content:3!==(null==b?void 0:b.mode)?(0,he.jsxs)("div",{style:{marginLeft:20},children:[(null==B||null===(n=B.data)||void 0===n?void 0:n.length)<=0&&((0,Tn.eB)()||(null==b||null===(t=b.permission)||void 0===t?void 0:t.editable))&&(0,he.jsx)(xn.Z,{ButtonText:"去设置",Buttonclass:At,ButtonClick:function(){g({type:"competitions/setActionTabs",payload:{key:"1"}})},customText:"您还没有设置赛题"}),re()()re()(null==b?void 0:b.start_time)||(0,Tn.eB)()||(null==b||null===(s=b.permission)||void 0===s?void 0:s.editable))&&(null==B||null===(a=B.data)||void 0===a?void 0:a.map((function(e,n){return(0,he.jsx)(Mt.Z,{dispatch:g,Header:b,StaffDetail:w,item:e,index:n})})))]}):(0,he.jsx)(Rt,{isedit:H,setisedit:q,selectedKeys:W,isshow:!0})},{type:"certificate",content:(0,he.jsxs)("div",{style:{padding:"15px 30px"},children:[" ",(0,he.jsx)(Vt.Z,{dispatch:g,userid:null==y||null===(c=y.userInfo)||void 0===c?void 0:c.user_id,Prize:Z,Accounts:k,getAccounts:function(){var e;g({type:"competitions/Accounts",payload:{id:null==y||null===(e=y.userInfo)||void 0===e?void 0:e.user_id}})}})]})},{type:"qit",content:(0,he.jsx)(Rt,{isedit:H,setisedit:q,selectedKeys:W})}];function X(){return $.apply(this,arguments)}function $(){return($=r()(o()().mark((function e(){var n;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ae.ZP)("/api/competitions/".concat(j,"/get_shixun_settings.json"),{method:"get"});case 2:0===(null==(n=e.sent)?void 0:n.status)&&z(n);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return(0,m.useEffect)((function(){var e;if((null==b||null===(e=b.competition_modules)||void 0===e?void 0:e.length)>0){var n,t,i,s;if("showheader"!==v.actionTabs.key)"entrance"===(null==b||null===(t=b.competition_modules)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.module_type)&&T("entrance"),J(null==b||null===(i=b.competition_modules)||void 0===i||null===(i=i[0])||void 0===i?void 0:i.id),g({type:"competitions/getItem",payload:{url:null==b||null===(s=b.competition_modules)||void 0===s||null===(s=s[0])||void 0===s?void 0:s.module_url}});var a=null==b||null===(n=b.competition_modules)||void 0===n?void 0:n.map((function(e){return l()(l()({},e),{},{label:null==e?void 0:e.name,key:null==e?void 0:e.id,className:kt,onClick:(n=r()(o()().mark((function n(){var t,i,l;return o()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(J(null==e?void 0:e.id),q(!1),R(!0),document.body.scrollIntoView({block:"start",behavior:"smooth"}),"entrance"!==e.module_type){n.next=16;break}if(3!==(null==b?void 0:b.mode)){n.next=10;break}return n.next=8,g({type:"competitions/getItem",payload:{url:e.module_url}});case 8:return R(!1),n.abrupt("return");case 10:(0,Tn.eB)()||null!==(t=b.permission)&&void 0!==t&&t.editable||null!=b&&b.team_member_present||null!=w&&w.enroll_ended||(b.personal?g({type:"competitions/setActionTabs",payload:{key:"6"}}):g({type:"competitions/setActionTabs",payload:{key:"4"}})),T("entrance"),X(),R(!1),n.next=28;break;case 16:if("certificate"!==e.module_type){n.next=24;break}return T("certificate"),n.next=20,g({type:"competitions/Prize",payload:{identifier:j,user_id:null==y||null===(i=y.userInfo)||void 0===i?void 0:i.user_id}});case 20:g({type:"competitions/Accounts",payload:{id:null==y||null===(l=y.userInfo)||void 0===l?void 0:l.user_id}}),R(!1),n.next=28;break;case 24:return T("qit"),n.next=27,g({type:"competitions/getItem",payload:{url:e.module_url}});case 27:R(!1);case 28:case"end":return n.stop()}}),n)}))),function(){return n.apply(this,arguments)})});var n})).filter((function(e){return"chart"!==(null==e?void 0:e.module_type)}));S(a),g({type:"competitions/setActionTabs",payload:{key:""}})}}),[b]),(0,m.useEffect)((function(){if("entrance"===v.actionTabs.key){var e;T("entrance");var n=null==b||null===(e=b.competition_modules)||void 0===e?void 0:e.find((function(e){return"entrance"===(null==e?void 0:e.module_type)}));J(n.id),3===(null==b?void 0:b.mode)?(R(!0),g({type:"competitions/getItem",payload:{url:n.module_url}}),R(!1)):X()}}),[v.actionTabs]),(0,he.jsxs)("section",{className:bt,ref:Q,children:[(0,he.jsxs)("div",{className:wt,children:[(0,he.jsx)("span",{children:"竞赛概览"}),["qit","entrance"].includes(P)&&((0,Tn.eB)()||(null==b||null===(u=b.permission)||void 0===u?void 0:u.editable))&&(0,he.jsxs)("a",{style:{float:"right",color:"#165DFF"},onClick:function(){"qit"===P||3===(null==b?void 0:b.mode)?q(!0):g({type:"competitions/setActionTabs",payload:{key:"1"}})},children:[(0,he.jsx)("i",{className:"iconfont icon-bianji10 font14",style:{color:"#165DFF"}})," 编辑"]})]}),(0,he.jsxs)("div",{style:{display:"flex"},children:[(0,he.jsxs)("div",{className:Zt,children:[(0,Tn.Ny)()||null!=b&&null!==(_=b.permission)&&void 0!==_&&_.editable?(0,he.jsx)("div",{children:(0,he.jsx)(zt,{dispatch:g,selectedKeys:W,data:A,isedit:H})}):(0,he.jsx)(jt.Z,{style:{border:"none"},selectedKeys:["".concat(W)],items:A}),((0,Tn.Ny)()||(null==b||null===(f=b.permission)||void 0===f?void 0:f.editable))&&(0,he.jsx)("span",{onClick:r()(o()().mark((function e(){var n,t,i;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ae.ZP)("/api/competitions/".concat(j,"/competition_modules.json"),{method:"POST"});case 2:if(0!==(n=e.sent).status){e.next=10;break}return J(null==n||null===(t=n.data)||void 0===t?void 0:t.id),g({type:"competitions/getHeader",payload:{identifier:j}}),T("qit"),e.next=9,g({type:"competitions/getItem",payload:{url:null==n||null===(i=n.data)||void 0===i?void 0:i.module_url}});case 9:g({type:"competitions/setActionTabs",payload:{key:"showheader"}});case 10:case"end":return e.stop()}}),e)}))),style:{marginLeft:20,marginTop:20,border:"1px solid #BACFFE",color:"#3061D0",fontSize:12,width:80,height:28,display:"inline-flex",alignItems:"center",justifyContent:"center",cursor:"pointer"},children:"+ 新增栏目"})]}),(0,he.jsx)("div",{className:It,children:(0,he.jsx)(hn.Z,{spinning:E,children:(0,he.jsx)("div",{style:{minHeight:200},children:null===(x=K.find((function(e){return e.type===P})))||void 0===x?void 0:x.content})})})]})]})})),Ht={flex_box_center:"flex_box_center___M4JlS",flex_space_between:"flex_space_between___ft0RM",flex_box_vertical_center:"flex_box_vertical_center___q2FOd",flex_box_center_end:"flex_box_center_end___sHMG4",flex_box_column:"flex_box_column____iI7H",bg:"bg___k6sPc",title:"title___g14V4",right:"right___m_DFD",left:"left___mwgoj",muitem:"muitem___oVuqT",muitemselect:"muitemselect___S4V8Y",searchWrap:"searchWrap___VZKxz",search:"search___NaLMi",searchIcon:"searchIcon___kyXjW",button:"button___9r1Cv",footer:"footer___FeXKb",clear_button:"clear_button___tLyhc",save_button:"save_button___jdXaq"},qt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAuNJREFUOE+dlE1oXFUUx3/nvo/pzKtp4li0hkYHNw22m4qLxoWWSkG6UMSvgmC6kCzdSN25d2lBaF3ppoIb0a6kXVRKVxIohgiGlkpSa2OTGKeTeZ/3HrlvJulUFNSzetx7zu/877n/+2Tz3MxTiH5n4BFVAgQTPNmej6Ynrzs4LiLjojinbk2M+ab8/sZLutabRHEKDlisWu6oAHQ/PTLjlEtmfFczPDSFGWuBs2jRB1uBzwoiJGqBMbi7XcqFFSQrf4nUzDTnri7XIB/9K69+JE/sPY06tLcOeQ/UgiuoSSYGCaA5hiQPQ2nh1vps8/mvPvf1NahYnn3Wya6rWuWRbt5Bqh5SrCM2BXTYStAwwcVtiHYj448jxvzaqPLD0vnsTg3KVuYW1LmDunELqfoYe+9+/bbkYVdFsNEYxAlmYhJVvmxOnXtT8punTmrYOO+6v0F2j8CWtU4nBvVHkeHp1SFqMX7EHhaEsLuNScZVquppyZffPa/OnXQbKxiCWokTu6Mj65Y4q7Qm4sGaQkCIw6G+z8R+jNgPJf15do0ia2tvAyNNnPq5DKK7mtO7m9NIAtqd5IFDGmngNEPGHkWC8FvJbr5TuawXkG4NB7s93EFdulnS/734C8jvGLyNJJlAonhJshtvFy7vR2S9kY73P/8ZNMiR1h4kjBYlXXrrttpiH+n/A5Hs8Sb9WtKlN86q6hxbf/x3RWKg9RBg35f0p1eOQXBR80ywFu/sfxcCcQxhaBU7VZsk/fHlS6p6jCIHE4H30o6j/wYbNsCVEMVg9Exr+sJ7Nai/cHw/Jp5Xp3ulKiFoDJTVwJHwJsSg6nNCROTaatI70ulcznYe7dYPJ54RcRdUdV/9g1Bval84Yge1qL9173aRa0TVieTAxdv17Y021MUXHkvL6GOE1z2nZgxexGhYET5Z3Sg/6By9nG1vPJgyXM3nX5x2gb7m4DmBjqqWglxHuKLOfJEcHqgYjT8BLuRat62RywwAAAAASUVORK5CYII=",Qt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAyZJREFUOE91VE1oVFcU/s69703eJBNSg2iysDXJEIkWIv6hFaUWXLSILoSIurAru9JFu+q2i+5a0bUL3biQQuuuoBQMGBcmGsdJZyjOmESNia0mgn0z895958h5SSaJ4oH7uPfcw3e/8333Pvr6ynSfY7kNkfUQWCKYw5v9u9/0mFki8xUgHRAkIOj6xsWx+snKgnwCCEPAIPwV9352lADg8OWp/UJys7eDsqcGfGxoNYAApJ+lSGe0mCn+m+BaKUbo6JG49gO3vut8kwJpXL4z88vebvO9gYBEYAAwJ+AkUURY6wFkIApGhFc1Ruk/+vLswe7b6Rn6KT2f+0IiGYaINSJI4joa9bdIXIyUWhoE3w/Qks2BrA8mAgz93RlgT1dX1/8kIlSanC1D0L8M4qKw2ZLWy0qHICL4Le0g64GNUfa/DvR2/0DFJy/OkOCKgpC24mqpFmT8xaFIyosTCLt0aM74WTAZVdsFkllPxcrMbwQc97SaY8WAQPUgOOdQqTyBcwn6+noQBC2pWSQOQhZMFski27P06PHz1wSs89OWGSy22daDBwXk+3pgPQ8TEyXs3r2j6aEhAYtBgxnGmAtU+OdZYpSpUZ8Uvmkk5uZeYuPGDYjjGIXCBHbu3L6i3VJ1w6mr5ncaL09H1pCfsStMmtUAwjBEsVjGtm1b0NbWtnornddip8dfo/Hy1DSENmUzqUprYn5+AdXqJAYHP4fnfbgvIggbMciYn+l+aeoSJ3wuF2SaDi2jDQ+PoL09pxogmw3Q359fc1DsEtSjGNaaI3S/NLmPHd/xPUtBxv+A1ccTgre1CMIyUy2Pfpoqe69Q/YOZj+VaW+B9RKv3AWuNCA1lQ/TtrsH81RRoZOJpp41qowL05FqDVA/dEH13yy42DRWE9Qj1RgRr7PU92/Mnmm9NJ2Njj/MR8Q1h3prxPQRBBr4CLt1sFkYUOdTqDbiElfn1cCF/+tAhcmuAdPHw4WxbGL/5iYXPi8BL36XR/4GoFlCXiOiFIfPjvl1brq5ud+X2rcqOjlY6YnJDCfMABJshqJHBpEd2ZKo6/ufQ0FDyvmbvANHBbUYnb2MgAAAAAElFTkSuQmCC",Gt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAA0JJREFUOE+NU11oXEUU/s7MvXfv7t1NdpdUBH+jRdzYWKlVrFpoq2KFog+FiBaqVCm+6IOC4Jv44Iuo4JsSaGIhShG0T0YSA2m1Fm36oo2FWqhJTZZtus1usj/33pk5MnetdrsKHpiHmfnOd875+A4tHNx0JwlnFsAAAAmC8Ia3/eBterQMwi6A+wHSAJUF89H16c+f48pingGDzpm5+cb80wQAv79y3yMCmBIbbkr7D+2GyBXAIBjpgEmAGCDWIKNgE9TF82if/BqIWj8Hxtle/GSulhDZuHTozfflHcOvQ0goN412pBC1WtC6kyxdD34mA48MpGqD12sw5Qs7Nhx4z06TYFA/8dnDWuljRkgZyQwaV6pQYZgU4KuVEjAhlc0ikwvgRg0QYT7fpx+kzfsbxMy0enziLBPdFXk5hPU6jFIgsmJ5gBAAM1hrmDhOaJ10GinfgxutAyQ+KGx//g1a+W7iBaH1mEploTTBRCHIcSFSXkJ2bbAx0O0QMAYynYarW5A6VpxxB+jy7OEvANobZ/Iw2iTJZLsAEIYhfjkzD2M0hkolBEGQvButOx2zhmzXQcI9SCuzh6tGuAXj57qq28vssePYfO8wHMfBjz+dwq6dO7oxzBDNqhX6Q6rMjGvj+gJ+tocoimIrKCqVCpaWl/HA1q09GFq3ROZLKs+MRXB9F//Skc1ardVw7txvyAYBSqW7e4h47bL12AQtTY8tQDq3iGyhBzR3+jTu37IleZ+a/hZPPP7YdaMZ6Nolq9e7tDx16CPN5lWZvwFEHZGvxpn5X1G9Uk3MVCwWcM/QUNe/CVvQjVWQcPbQxenxbazV98IPSGZ6BVexSmxrBe/2AiOqrwBaL52s5W5NjLIwOfqVYX7G7R9IVuH/RNyoQzXXAOm8OPjkgfGEaHFytKjYnGLQYKqvCOn5/8nFzLAkcXMNjnSO3Lb7pWct+G/rLk6Oboy0OcpshpxUBm4mC+H+427rahW2ETfr0CqGdOSRwdQf+2jn26qLyF7K33waNFT7HW30a2A4iculhO2Cje5ssKBlIZ23Nj718vi1bXcv018/56c+7ufYGdEqKhHR7WBukcAFAffEXLNvcmRkRF8/+59ZfmcgM6jazwAAAABJRU5ErkJggg==",Ut=["competitions","globalSetting","loading","dispatch","user"],Wt=(0,h.connect)((function(e){var n=e.competitions,t=e.loading,i=e.globalSetting,l=e.user;return{competitions:n,globalSetting:i,loading:t.models.competitions,user:l}}))((function(e){var n,t,i,s,a,c,u,_=e.competitions,f=(e.globalSetting,e.loading,e.dispatch,e.user,p()(e,Ut),(0,h.useParams)().identifier),x=_.Header,v=(_.RightItems,_.Staff,_.Prizes,_.Account,(0,m.useState)([])),g=d()(v,2),b=g[0],w=g[1],Z=(0,m.useState)("qit"),k=d()(Z,2),I=(k[0],k[1],(0,m.useState)(!1)),A=d()(I,2),S=A[0],C=A[1],F=(0,m.useState)(!1),P=d()(F,2),T=P[0],L=P[1],D=(0,m.useState)(!1),E=d()(D,2),R=E[0],M=E[1],V=(0,m.useState)({page:1,per_page:10,keyword:""}),B=d()(V,2),z=B[0],O=B[1],Y=(0,m.useState)(""),H=d()(Y,2),q=H[0],Q=H[1],G=(0,m.useState)(""),U=d()(G,2),W=U[0],J=U[1],K=(0,m.useState)(),X=d()(K,2),$=X[0],ee=X[1],ne=(0,m.useState)(),te=d()(ne,2),ae=te[0],ce=te[1],de=(0,m.useState)(""),pe=d()(de,2),_e=pe[0],fe=pe[1],xe=(0,m.useState)(!1),ve=d()(xe,2),ge=ve[0],ye=ve[1];function je(){return be.apply(this,arguments)}function be(){return(be=r()(o()().mark((function e(){var n,t,i,s,a;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return C(!0),e.next=3,(0,Ae.ZP)("/api/competitions/".concat(f,"/competition_questions.json"),{method:"get"});case 3:0===(null==(n=e.sent)?void 0:n.status)&&(Q(null==n||null===(t=n.data)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.identifier),we(null==n||null===(i=n.data)||void 0===i||null===(i=i[0])||void 0===i?void 0:i.identifier),a=null==n||null===(s=n.data)||void 0===s?void 0:s.map((function(e){return l()(l()({},e),{},{label:null==e?void 0:e.name,key:null==e?void 0:e.identifier,className:Ht.muitem,onClick:function(){Q(e.identifier),z.keyword="",O(l()({},z)),we(e.identifier)}})})),w(a),fe(null==n?void 0:n.md_id),L(null==n?void 0:n.hidden_ranking),ye(null==n?void 0:n.is_running_update_score));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function we(e){return Ze.apply(this,arguments)}function Ze(){return(Ze=r()(o()().mark((function e(n){var t,i,s,a;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return C(!0),t=null!=x&&x.personal?"/api/competitions/".concat(f,"/competition_charts/person_ranking.json"):"/api/competitions/".concat(f,"/competition_charts/team_ranking.json"),e.next=4,(0,Ae.ZP)(t,{method:"get",params:l()(l()({},z),{},{question_identifier:n||q})});case 4:if(i=e.sent,C(!1),0===(null==i?void 0:i.status)&&(ee(null==i?void 0:i.data),J(null==i||null===(s=i.data)||void 0===s?void 0:s.description)),3!==(null==x?void 0:x.mode)){e.next=13;break}return e.next=10,(0,Ae.ZP)("/api/competitions/".concat(f,"/competition_charts/work_mode.json"),{method:"get",params:l()({},z)});case 10:a=e.sent,C(!1),0===(null==a?void 0:a.status)&&ce(a);case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ke(){return(ke=r()(o()().mark((function e(n){var t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=null!=x&&x.personal?"/api/competitions/".concat(f,"/competition_charts/person_ranking.xlsx"):"/api/competitions/".concat(f,"/competition_charts/team_ranking.xlsx"),(0,me.FH)("",(0,me.NY)({url:ue.Z.API_SERVER+t,query:l()(l()({},z),{},{question_identifier:n||q})}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ne(){return(Ne=r()(o()().mark((function e(){var n;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n="/api/competitions/".concat(f,"/competition_charts/work_mode.xlsx"),(0,me.FH)("",(0,me.NY)({url:ue.Z.API_SERVER+n,query:{keyword:null==z?void 0:z.keyword}}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}(0,m.useEffect)((function(){je()}),[x]);var Ie=function(e){z.keyword=e,O(l()({},z)),we()},Se=[{title:"排名",align:"center",dataIndex:"rank",width:80,ellipsis:!0,render:function(e,n,t){return(0,he.jsxs)("span",{children:[1===e&&(0,he.jsx)("img",{src:qt}),2===e&&(0,he.jsx)("img",{src:Qt}),3===e&&(0,he.jsx)("img",{src:Gt}),e>3&&e]})}},{title:null!=x&&x.personal?"参赛人员":"战队",align:"left",dataIndex:"name",width:222,ellipsis:!0,render:function(e,n){return(0,he.jsx)(y.Z,{title:e,children:(0,he.jsxs)("span",{children:[(0,he.jsx)("img",{width:30,height:30,style:{borderRadius:"50%",marginRight:"10px"},src:ue.Z.IMG_SERVER+"/images/"+(null==n?void 0:n.image_url)}),e||"- -"]})})}},{title:"单位",align:"left",dataIndex:"school_name",width:533,ellipsis:!0,render:function(e){return(0,he.jsx)(y.Z,{title:e,children:(0,he.jsx)("span",{children:""==(null==e?void 0:e[0])?"- -":e})})}},{title:"完成时长",align:"left",dataIndex:"times",width:195,ellipsis:!0,render:function(e){return(0,he.jsx)("span",{children:e||"- -"})}},{title:"比赛成绩",align:"right",dataIndex:"all_score",width:100,ellipsis:!0,render:function(e){return(0,he.jsx)("span",{children:e||"- -"})}},{title:"",align:"center",dataIndex:"",ellipsis:!0,width:24}],Ce=[{title:"排名",align:"center",dataIndex:"ranking",width:80,ellipsis:!0,render:function(e,n,t){return(0,he.jsxs)("span",{children:[1===e&&(0,he.jsx)("img",{src:qt}),2===e&&(0,he.jsx)("img",{src:Qt}),3===e&&(0,he.jsx)("img",{src:Gt}),e>3&&e]})}},{title:null!=x&&x.personal?"参赛人员":"战队",align:"left",dataIndex:null!=x&&x.personal?"user_name":"team_name",width:222,ellipsis:!0,render:function(e,n){return(0,he.jsx)(y.Z,{title:e,children:(0,he.jsxs)("span",{children:[(0,he.jsx)("img",{width:30,height:30,style:{borderRadius:"50%",marginRight:"10px"},src:ue.Z.IMG_SERVER+"/images/"+(null==n?void 0:n.image_url)}),e||"- -"]})})}},{title:"单位",align:"left",dataIndex:"school_names",width:222,ellipsis:!0,render:function(e){return(0,he.jsx)(y.Z,{title:e,children:(0,he.jsx)("span",{children:""==(null==e?void 0:e[0])?"- -":e})})}},{title:"最高成绩提交时间",align:"left",dataIndex:"max_score_submit_time",width:195,ellipsis:!0,render:function(e){return e?re()(e).format("YYYY-MM-DD HH:mm:ss"):"--"}},{title:"描述",align:"left",dataIndex:"comment",width:222,ellipsis:!0,render:function(e){return(0,he.jsx)(y.Z,{title:e,children:(0,he.jsx)("span",{children:e||"- -"})})}},{title:"比赛成绩",align:"center",dataIndex:"score",width:100,ellipsis:!0,render:function(e){return(0,he.jsx)("span",{children:e||"- -"})}},{title:"提交总次数",align:"center",dataIndex:"submit_sum",ellipsis:!0,width:100}];return(0,he.jsxs)("section",{className:Ht.bg,children:[(0,he.jsxs)(le.Z,{align:"middle",className:Ht.title,children:[(0,he.jsxs)(se.Z,{flex:"1",children:[(0,he.jsx)("span",{style:{color:"#232B40"},children:"排行榜"}),((0,Tn.eB)()||(null==x||null===(n=x.permission)||void 0===n?void 0:n.editable))&&(0,he.jsx)(ie.Z,{checked:T,style:{marginLeft:10},onChange:function(e){var n;L(e.target.checked),(0,Ae.ZP)("/api/competitions/".concat(f,"/update_md_hidden_raking.json"),{method:"POST",body:{hidden_raking:e.target.checked,md_content_id:_e,competition_module_id:null==x||null===(n=x.competition_modules)||void 0===n||null===(n=n.find((function(e){return"chart"===e.module_type})))||void 0===n?void 0:n.id}})},children:(0,he.jsx)("span",{style:{color:"#828693",marginLeft:"-3px"},children:"隐藏"})})]}),(0,he.jsx)(se.Z,{children:((0,Tn.eB)()||(null==x||null===(t=x.permission)||void 0===t?void 0:t.editable))&&(0,he.jsxs)("a",{style:{float:"right",color:"#165DFF",marginTop:"-2px"},onClick:function(){M(!0)},children:[(0,he.jsx)("i",{className:"iconfont icon-bianji10 font14",style:{color:"#165DFF"}})," 编辑"]})})]}),(0,he.jsx)("div",{children:(0,he.jsxs)("div",{className:Ht.right,children:[!(null==$||null===(i=$.description)||void 0===i||!i.length)&&(0,he.jsx)(Lt.Z,{className:"pl20 pr20",style:{marginTop:20,marginBottom:20,fontSize:"14px",color:"#6A7283"},value:null==$?void 0:$.description}),(0,he.jsx)(hn.Z,{spinning:S,children:R?(0,he.jsxs)("div",{style:{padding:20},children:[(0,he.jsx)(Dt.Z,{defaultValue:W,onChange:function(e){return J(e)}}),(0,he.jsxs)("div",{className:Ht.footer,children:[(0,he.jsx)("div",{className:Ht.clear_button,onClick:function(){return M(!1)},children:"取消"}),(0,he.jsx)("div",{className:Ht.save_button,type:"primary",onClick:r()(o()().mark((function e(){var n,t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ae.ZP)("/api/competitions/".concat(f,"/update_md_content.json"),{method:"POST",body:{content:W,md_content_id:_e,competition_module_id:null==x||null===(n=x.competition_modules)||void 0===n||null===(n=n.find((function(e){return"chart"===e.module_type})))||void 0===n?void 0:n.id}});case 2:0===(null==(t=e.sent)?void 0:t.status)&&(M(!1),we());case 4:case"end":return e.stop()}}),e)}))),children:"保存更改"})]})]}):(0,he.jsxs)("div",{style:{padding:"0 20px 20px 20px"},children:[(0,he.jsxs)("div",{className:Ht.left,style:{display:"flex",alignItems:"center"},children:[(0,he.jsx)("div",{style:{width:"80%",overflowX:"auto",overflowY:"hidden",marginRight:10},children:(0,he.jsx)("ul",{style:{display:"flex",lineHeight:"38px",padding:0},children:null==b?void 0:b.map((function(e){return(0,he.jsx)("li",{className:(null==e?void 0:e.identifier)===q?Ht.muitemselect:e.className,onClick:e.onClick,children:e.name})}))})}),(0,he.jsxs)("div",{style:{display:"flex"},children:[(0,he.jsx)("div",{className:Ht.searchWrap,children:(0,he.jsx)(j.Z.Search,{placeholder:null!=x&&x.personal?"请输入参赛人员名称":"请输入战队名称",size:"large",className:Ht.search,value:z.keyword,onChange:function(e){z.keyword=e.target.value,O(l()({},z))},suffix:(0,he.jsx)("i",{className:"iconfont icon-sousuo9 font14 ".concat(Ht.searchIcon),onClick:function(){return Ie(z.keyword)}}),onSearch:Ie})}),(0,he.jsxs)("div",{style:{marginLeft:20,display:"flex"},children:[((0,Tn.eB)()||(null==x||null===(s=x.permission)||void 0===s?void 0:s.editable))&&(0,he.jsx)("span",{className:Ht.button,onClick:function(){3===(null==x?void 0:x.mode)?function(){Ne.apply(this,arguments)}():function(e){ke.apply(this,arguments)}(q)},children:"导出名单"}),((0,Tn.eB)()||(null==x||null===(a=x.permission)||void 0===a?void 0:a.editable))&&(0,he.jsx)("span",{className:Ht.button,style:{marginLeft:10},onClick:r()(o()().mark((function e(){var n;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!ge){e.next=2;break}return e.abrupt("return");case 2:if(C(!0),!S){e.next=5;break}return e.abrupt("return");case 5:return e.next=7,(0,Ae.ZP)("/api/competitions/".concat(f,"/update_course_score.json"),{method:"post"});case 7:0===e.sent.status&&(C(!1),n=setInterval(r()(o()().mark((function e(){var t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ae.ZP)("/api/competitions/".concat(f,"/get_update_score_status.json"),{method:"get"});case 2:0===(null==(t=e.sent)?void 0:t.status)&&(ye(null==t?void 0:t.is_running_update_score),null!=t&&t.is_running_update_score||(je(),clearInterval(n)));case 4:case"end":return e.stop()}}),e)}))),5e3));case 9:case"end":return e.stop()}}),e)}))),children:ge?"成绩更新中":"更新成绩"})]})]})]}),!(null!=x&&null!==(c=x.permission)&&void 0!==c&&c.editable)&&T&&(0,he.jsx)(xn.Z,{customText:"排行榜当前为封榜状态"}),((0,Tn.eB)()||(null==x||null===(u=x.permission)||void 0===u?void 0:u.editable)||!T)&&(0,he.jsx)(N.Gi,{style:{marginTop:20,marginLeft:0},children:3===(null==x?void 0:x.mode)?(0,he.jsx)(oe.Z,{columns:Ce,dataSource:null==ae?void 0:ae.list,pagination:!1}):(0,he.jsx)(oe.Z,{columns:Se,dataSource:null==$?void 0:$.ranking,pagination:!1})}),(0,he.jsx)("div",{className:Ht.countWrap,style:{marginTop:20},children:(0,he.jsx)(fn.Z,{showQuickJumper:!0,hideOnSinglePage:!0,showSizeChanger:!0,pageSizeOptions:["10","15","50","100","200"],total:3===(null==x?void 0:x.mode)?null==ae?void 0:ae.count:null==$?void 0:$.count,onChange:function(e,n){z.page=e,z.per_page=n,O(l()({},z)),we()},pageSize:z.per_page,current:z.page})})]})})]})})]})})),Jt={flex_box_center:"flex_box_center___Ix1yk",flex_space_between:"flex_space_between___Nvu1L",flex_box_vertical_center:"flex_box_vertical_center___FcD_R",flex_box_center_end:"flex_box_center_end___xtV5Z",flex_box_column:"flex_box_column___rSUdX",bg:"bg___Fi0Vv",title:"title___oBAHH",left:"left___x4G2N",muitem:"muitem___JmDfB",right:"right___RXHwC",searchWrap:"searchWrap___yt5Di",search:"search___sA8FE",searchIcon:"searchIcon___yiKfD",button:"button___ZPcVk",items:"items___wZfml",img:"img___f3zFn",names:"names___k3ZzZ",teamname:"teamname___or8vu",time:"time___qmAOy",createtime:"createtime___KKvxc",width30:"width30___NxY4W",loaderimg:"loaderimg___aQ_vt",scoreByBlankRadio:"scoreByBlankRadio___X8rMJ",scoremodal:"scoremodal___jE4qx",content:"content___wGyD2",bottom:"bottom___mdNOm",yes:"yes___hQBiA",no:"no___AOje6",bottoms:"bottoms___ogmBQ",drawer_style:"drawer_style___aspKt",baseFormItem:"baseFormItem___L4XPW",jsinput:"jsinput___IhGOr",Spanradius:"Spanradius___Phpyg",modal_close:"modal_close___yAd65","ant-btn-default":"ant-btn-default___HT0Nv",ssss:"ssss___RB5TB",text:"text___nAWn1"};Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;var Kt="data:image/svg+xml;base64,PHN2ZyBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMTYiIGhlaWdodD0iMTYiPjxwYXRoIGQ9Ik00OTkuNTY2IDEwMjAuNjM1Yy0xNDguODQ2IDAtNDI1LjYxOS0yMjcuNjkzLTQyNS42MTktNDQzLjAyNlYxNDguNjI2bDQyLjM1LS43MzFjLjg3OCAwIDk1LjM3OC0xLjk3NSAxOTIuODA1LTQxLjU0NUM0MDkuMDg4IDY1LjgyOSA0NzMuNiAxOS4wOSA0NzQuMTg1IDE4LjY1TDQ5OS41NjUuMjkzIDUyNS4wMiAxOC42NWMuNTg2LjQ0IDY1LjA5OCA0Ny4xMDQgMTY1LjA4NCA4Ny43NzJhNjA0LjQ1MyA2MDQuNDUzIDAgMCAwIDE5Mi45NSA0MS41NDVsNDIuMDU4LjczMS4yMiA0MjguODM3YzAgMjE1LjMzMy0yNzYuNyA0NDMuMS00MjUuNjkyIDQ0My4xTTE1OS44OSAyMzAuODM4djM0Ni42OTdjMCAxNjYuNTQ2IDI0MS4wOCAzNTcuMDgzIDMzOS42NzYgMzU3LjA4MyA5OC41OTYgMCAzMzkuNjc1LTE5MC41MzcgMzM5LjY3NS0zNTcuMDgzVjIzMC44MzlhNjkxLjYzOSA2OTEuNjM5IDAgMCAxLTE4MS40NjctNDQuODM3IDEwMDEuNjkxIDEwMDEuNjkxIDAgMCAxLTE1OC4yMDgtODAuOTY5Yy0yOS45ODkgMTkuMTY0LTg1LjI4NSA1MS4zNDYtMTU3Ljk4OSA4MC45N2E2OTEuNzEyIDY5MS43MTIgMCAwIDEtMTgxLjY4NyA0NC44MzZtMzE3LjAwMSA1MDcuOTA0TDI5Ni4yMyA1ODQuNzc3bDU1LjU4OC02NS4zMTYgMTE1LjcxMiA5OC41OTYgMjIwLjA4Ny0yNTMuNTEzIDY0Ljk1IDU2LjM5My0yNzUuNjc1IDMxNy44MDYiIGZpbGw9IiMxNjVERkYiIGZpbGwtb3BhY2l0eT0iLjgiLz48L3N2Zz4=",Xt=["competitions","globalSetting","loading","dispatch","user"],$t=[{id:"",name:"全部"},{id:1,name:"战队名称"},{id:2,name:"队长姓名"},{id:3,name:"指导老师"}],ei={teacher:"教师",student:"学生",professional:"专业人士"},ni=(0,h.connect)((function(e){var n=e.competitions,t=e.loading,i=e.globalSetting,l=e.user;return{competitions:n,globalSetting:i,loading:t.models.competitions,user:l}}))((function(e){var n=e.competitions,t=(e.globalSetting,e.loading,e.dispatch,e.user,p()(e,Xt),(0,h.useParams)().identifier),i=n.Header,s=(n.RightItems,n.Staff,n.Prizes,n.Account,(0,m.useState)([])),a=d()(s,2),c=a[0],u=a[1],_=(0,m.useState)({page:1,per_page:10,keyword:"",type:"",isteam:"mine"}),f=d()(_,2),v=f[0],g=f[1],j=(0,m.useState)(!1),w=d()(j,2),Z=w[0],k=w[1];function I(){return A.apply(this,arguments)}function A(){return(A=r()(o()().mark((function e(){var n,i;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return k(!0),n="mine"===v.isteam?"/api/competitions/".concat(t,"/competition_teams.json"):"/api/competitions/".concat(t,"/all_team_members.json"),e.next=4,(0,Ae.ZP)(n,{method:"get",params:v});case 4:i=e.sent,k(!1),0===(null==i?void 0:i.status)&&u(i);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}(0,m.useEffect)((function(){I()}),[i]);var S=[{title:"序号",align:"left",dataIndex:"name",width:62,render:function(e,n,t){return(0,he.jsx)("span",{style:{color:"#000000"},children:t+1})}},{title:"战队ID",align:"left",dataIndex:"competition_team_id",width:72,render:function(e){return(0,he.jsx)("span",{style:{color:"#000000"},children:e||"- -"})}},{title:"战队名称",align:"left",dataIndex:"team_name",width:175,ellipsis:{showTitle:!1},render:function(e){return(0,he.jsx)(y.Z,{placement:"topLeft",title:e,children:(0,he.jsx)("span",{style:{color:"#000"},children:e||"- -"})})}},{title:"队员姓名",align:"left",dataIndex:"name",width:110,ellipsis:{showTitle:!1},render:function(e,n){return(0,he.jsxs)("span",{style:{color:"#000000"},children:[e||"- -",(null==n?void 0:n.authentication)&&(0,he.jsx)(y.Z,{title:"已实名认证",children:(0,he.jsx)("img",{src:Kt,style:{marginLeft:5,marginTop:"-2px"}})})]})}},{title:"个人成绩",dataIndex:"score",width:86,render:function(e){return(0,he.jsx)("span",{style:{color:"#000000"},children:(null==e?void 0:e.toString())||"- -"})}},{title:"角色",align:"left",dataIndex:"identity",width:102,render:function(e,n){return(0,he.jsxs)("span",{style:{color:"#000000"},children:[ei[e],(null==n?void 0:n.professional_certification)&&(0,he.jsx)(y.Z,{title:"已职业认证",children:(0,he.jsx)("img",{src:Kt,style:{marginLeft:5,marginTop:"-2px"}})})]})}},{title:"手机号",align:"left",dataIndex:"phone",width:120,render:function(e){return(0,he.jsx)("span",{style:{color:"#666666"},children:e||"- -"})}},{title:"学号/工号",align:"left",width:110,ellipsis:{showTitle:!1},dataIndex:"student_id",render:function(e){return(0,he.jsx)("span",{style:{color:"#666666"},children:e||"- -"})}},{title:"学校/单位",align:"left",dataIndex:"school",ellipsis:{showTitle:!1},render:function(e){return(0,he.jsx)(y.Z,{placement:"topLeft",title:e,children:(0,he.jsx)("span",{style:{color:"#666666"},children:e||"- -"})})}},{title:"地区",align:"left",dataIndex:"province",width:58,render:function(e){return(0,he.jsx)("span",{style:{color:"#666666"},children:e||"- -"})}},{title:"操作",align:"right",dataIndex:"is_cancel_score",width:120,render:function(e,n){return(0,he.jsx)("span",{children:0===e?(0,he.jsx)("span",{style:{color:"#165DFF",cursor:"pointer"},onClick:function(){var e;x.Z.confirm({icon:null,title:"取消成绩",content:"请确认是否取消该成员成绩,取消后该成员的成绩将不能用于团队成绩。",onOk:(e=r()(o()().mark((function e(){var i;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ae.ZP)("/api/competitions/".concat(t,"/set_score_status.json"),{method:"put",body:{competition_score_id:null==n?void 0:n.competition_score_id,is_cancel_score:1}});case 2:0===(null==(i=e.sent)?void 0:i.status)&&(v.page=1,g(l()({},v)),I());case 4:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})},children:"取消成绩"}):(0,he.jsx)("span",{onClick:r()(o()().mark((function e(){var i;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ae.ZP)("/api/competitions/".concat(t,"/set_score_status.json"),{method:"put",body:{competition_score_id:null==n?void 0:n.competition_score_id,is_cancel_score:0}});case 2:0===(null==(i=e.sent)?void 0:i.status)&&(v.page=1,g(l()({},v)),I());case 4:case"end":return e.stop()}}),e)}))),style:{color:"#FD9200",cursor:"pointer"},children:"恢复成绩"})})}}],C=[{title:"序号",align:"left",dataIndex:"name",width:72,render:function(e,n,t){return(0,he.jsx)("span",{style:{color:"#000000"},children:t+1})}},{title:"战队ID",align:"left",dataIndex:"id",width:113,render:function(e){return(0,he.jsx)("span",{style:{color:"#000000"},children:e||"- -"})}},{title:"战队名称",align:"left",dataIndex:"name",width:167,render:function(e){return(0,he.jsx)("span",{style:{color:"#000000"},children:null==e?void 0:e.toString()})}},{title:"战队成绩",align:"left",dataIndex:"score",width:136,render:function(e){return(0,he.jsx)("span",{style:{color:"#000000"},children:e})}},{title:"队长姓名",align:"left",dataIndex:"leader_name",width:149,ellipsis:{showTitle:!1},render:function(e,n){return(0,he.jsx)(y.Z,{placement:"topLeft",title:e,children:(0,he.jsx)("span",{style:{color:"#666666"},children:e||"- -"})})}},{title:"指导老师",align:"left",dataIndex:"mail",width:150,ellipsis:{showTitle:!1},render:function(e,n){var t,i;return(0,he.jsx)(y.Z,{placement:"topLeft",title:null==n||null===(t=n.creator)||void 0===t?void 0:t.name,children:(0,he.jsx)("span",{style:{color:"#666666"},children:(null==n||null===(i=n.team_members)||void 0===i||null===(i=i.filter((function(e){return null==e?void 0:e.is_teacher})))||void 0===i?void 0:i.map((function(e){return e.name})).toString())||"- -"})})}},{title:"战队人数",align:"left",dataIndex:"mail",width:125,render:function(e,n){var t;return(0,he.jsx)("span",{style:{color:"#666666"},children:(null==n||null===(t=n.team_members)||void 0===t?void 0:t.length)||"- -"})}},{title:"报名时间",align:"left",dataIndex:"created_at",width:165,render:function(e){return(0,he.jsx)("span",{style:{color:"#666666"},children:e||"- -"})}},{title:"操作",align:"right",dataIndex:"is_cancel_score",render:function(e,n){return(0,he.jsx)("span",{children:0===e||!1===e?(0,he.jsx)("span",{style:{color:"#165DFF",cursor:"pointer"},onClick:function(){var e;x.Z.confirm({icon:null,centered:!0,title:"取消成绩",content:"请确认是否取消该战队成绩,取消后该战队的成绩在排行榜将视为无成绩,不进行排名。",onOk:(e=r()(o()().mark((function e(){var i;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ae.ZP)("/api/competitions/".concat(t,"/set_score_status.json"),{method:"put",body:{competition_team_id:null==n?void 0:n.id,is_cancel_score:1}});case 2:0===(null==(i=e.sent)?void 0:i.status)&&(v.page=1,g(l()({},v)),I());case 4:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})},children:"取消成绩"}):(0,he.jsx)("span",{onClick:r()(o()().mark((function e(){var i;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ae.ZP)("/api/competitions/".concat(t,"/set_score_status.json"),{method:"put",body:{competition_team_id:null==n?void 0:n.id,is_cancel_score:0}});case 2:0===(null==(i=e.sent)?void 0:i.status)&&(v.page=1,g(l()({},v)),I());case 4:case"end":return e.stop()}}),e)}))),style:{color:"#FD9200",cursor:"pointer"},children:"恢复成绩"})})}}];return(0,he.jsxs)("div",{style:{padding:"15px 0",width:"1200px",margin:"auto"},children:[(0,he.jsxs)("div",{style:{display:"flex",marginTop:"-10px"},children:[(0,he.jsx)("div",{children:3!==(null==i?void 0:i.mode)?(0,he.jsx)(b.ZP.Group,{className:Jt.scoreByBlankRadio,optionType:"button",options:[{label:"战队信息",value:"mine"},{label:"队员信息",value:"join"}],onChange:function(e){v.isteam=e.target.value,v.page=1,I()},value:v.isteam}):(0,he.jsx)(b.ZP.Group,{className:Jt.scoreByBlankRadio,optionType:"button",options:[{label:"战队信息",value:"mine"}],onChange:function(e){v.isteam=e.target.value,v.page=1,I()},value:v.isteam})}),(0,he.jsxs)("div",{style:{flex:1,textAlign:"end",display:"flex",justifyContent:"end"},children:[(0,he.jsx)(N.t7,{style:{width:327,marginRight:20},dataSource:$t,value:{id:v.type,value:v.keyword},onChange:function(e,n){v.keyword=e,v.type=n||"",g(l()({},v)),I()},placeholder:"请输入搜索内容"}),(0,he.jsx)("span",{className:Jt.button,onClick:function(){var e="mine"===v.isteam?"/api/competitions/".concat(t,"/competition_teams.xlsx"):"/api/competitions/".concat(t,"/all_team_members.xlsx");(0,me.FH)("",(0,me.NY)({url:ue.Z.API_SERVER+e,query:l()({},v)}))},children:"导出"})]})]}),(0,he.jsx)(oe.Z,{loading:Z,columns:"mine"===v.isteam?C:S,dataSource:"mine"===v.isteam?null==c?void 0:c.competition_teams:null==c?void 0:c.data,pagination:!1}),(0,he.jsx)("div",{className:Jt.countWrap,style:{marginTop:20},children:(0,he.jsx)(fn.Z,{showQuickJumper:!0,hideOnSinglePage:!0,showTotal:function(e){return(0,he.jsxs)("div",{style:{fontSize:14},children:["共 ",(0,he.jsx)("span",{style:{color:"#165DFF"},children:e})," 条数据"]})},showSizeChanger:!0,pageSizeOptions:["10","15","50","100","200"],total:null==c?void 0:c.count,onChange:function(e,n){v.page=e,v.per_page=n,g(l()({},v)),I()},pageSize:v.per_page,current:v.page})})]})})),ti=t(60324),ii=t(88289),li=t(56102),si=t(33555),oi=(t(36814),t(89392)),ai=["competitions","globalSetting","loading","dispatch","user"],ri=_.default.Option,ci=(0,h.connect)((function(e){var n=e.competitions,t=e.loading,i=e.globalSetting,l=e.user;return{competitions:n,globalSetting:i,loading:t.models.competitions,user:l}}))((function(e){var n,t,i,s,a,c,u,g,k,I,A,S,C,F,P,T,L,D,E,R,M,V,B,z,O,Y=e.competitions,H=(e.globalSetting,e.loading,e.dispatch),q=e.user,Q=(p()(e,ai),(0,h.useParams)().identifier),G=Y.Header,U=Y.competition_team,W=Y.Staff,J=(Y.Prizes,Y.Account,(0,m.useState)({page:1,per_page:10,keyword:"",type:1,isteam:"mine"})),K=d()(J,2),X=K[0],$=K[1],ee=(0,m.useState)([]),ne=d()(ee,2),te=ne[0],ie=ne[1],ae=(0,m.useState)([]),re=d()(ae,2),ce=re[0],de=re[1],pe=(0,m.useState)(!1),me=d()(pe,2),_e=me[0],fe=me[1],xe=(0,m.useState)([]),ve=d()(xe,2),ge=ve[0],ye=ve[1],je=(0,m.useState)(!1),be=d()(je,2),we=be[0],Ze=be[1],ke=(0,m.useState)(""),Ne=d()(ke,2),Ie=Ne[0],Ae=Ne[1],Se=(0,m.useState)(""),Ce=d()(Se,2),Fe=Ce[0],Te=Ce[1],Le=(0,m.useState)([]),De=d()(Le,2),Ee=De[0],Re=De[1],Me=(0,m.useState)(!1),Ve=d()(Me,2),Be=Ve[0],ze=Ve[1],Oe=(0,m.useState)([]),Ye=d()(Oe,2),He=Ye[0],qe=Ye[1],Qe=(0,m.useRef)(),Ge=(0,m.useState)(""),Ue=d()(Ge,2),We=(Ue[0],Ue[1]),Je=(0,m.useRef)(""),Ke=(0,m.useState)(!0),Xe=d()(Ke,2),$e=Xe[0],en=Xe[1],nn=(0,m.useState)(!1),tn=d()(nn,2),ln=tn[0],sn=tn[1],on=f.Z.useForm(),an=d()(on,1)[0],rn=(0,m.useState)(),cn=d()(rn,2),dn=cn[0],un=cn[1],pn=(0,m.useRef)(null),mn=(0,m.useState)(),hn=d()(mn,2),_n=hn[0],vn=hn[1],gn=(0,m.useState)(1),yn=d()(gn,2),jn=yn[0],bn=yn[1],wn=(0,m.useState)(!1),Zn=d()(wn,2),kn=Zn[0],Nn=Zn[1],In=(0,m.useState)([]),An=d()(In,2),Sn=An[0],Cn=An[1],Fn=(0,m.useRef)((0,oi.throttle)((function(e){return Rn(e)}),1200,{leading:!0,trailing:!0})).current,Pn=(0,m.useState)([]),Ln=d()(Pn,2),Dn=Ln[0],En=Ln[1],Rn=function(){var e=r()(o()().mark((function e(n){var t,i;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,H({type:"account/getSchoolOption",payload:{keyword:n,limit:10}});case 2:t=e.sent,Cn(null==t?void 0:t.schools),n&&""!=n&&En(null==t||null===(i=t.schools)||void 0===i?void 0:i.filter((function(e){return e.name.includes(n)})));case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();(0,m.useEffect)((function(){var e;Rn(null==q||null===(e=q.userInfo)||void 0===e?void 0:e.school_name)}),[(null==G||null===(n=G.need_apply_info)||void 0===n?void 0:n.need_apply_name)||(null==G||null===(t=G.need_apply_info)||void 0===t?void 0:t.need_apply_student_id)||(null==G||null===(i=G.need_apply_info)||void 0===i?void 0:i.need_apply_sex)||(null==G||null===(s=G.need_apply_info)||void 0===s?void 0:s.need_apply_phone)||(null==G||null===(a=G.need_apply_info)||void 0===a?void 0:a.need_apply_grade)||(null==G||null===(c=G.need_apply_info)||void 0===c?void 0:c.need_apply_teacher_name)||(null==G||null===(u=G.need_apply_info)||void 0===u?void 0:u.need_apply_school)]);function Mn(){return Vn.apply(this,arguments)}function Vn(){return(Vn=r()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:H({type:"competitions/competition_teams",payload:l()(l()({},X),{},{identifier:Q})});case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Bn(e){return zn.apply(this,arguments)}function zn(){return zn=r()(o()().mark((function e(n){var t,i;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,H({type:"competitions/getStudents",payload:{identifier:Q,keyword:Fe,team_id:He,page:n}});case 2:return(i=e.sent)&&Re(1===n?Pe()(i.teachers):[].concat(Pe()(Ee),Pe()(i.teachers))),e.abrupt("return",!((null===(t=i.teachers)||void 0===t?void 0:t.length)<20));case 5:case"end":return e.stop()}}),e)}))),zn.apply(this,arguments)}(0,m.useEffect)((function(){ln||(un(""),We(""),Je.current="")}),[ln]),(0,m.useEffect)((function(){Mn()}),[G]);var On,Yn=function(){var e=r()(o()().mark((function e(){var n,t,i,l=arguments;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=l.length>0&&void 0!==l[0]&&l[0])&&!$e||kn){e.next=10;break}return Nn(!0),bn(n?1:jn+1),e.next=6,H({type:"competitions/getTeacher",payload:{identifier:Q,keyword:Ie,team_id:He,page:n?1:jn+1}});case 6:i=e.sent,ye(n?Pe()(i.teachers):[].concat(Pe()(ge),Pe()(i.teachers))),Nn(!1),(null===(t=i.teachers)||void 0===t?void 0:t.length)<20&&en(!1);case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Hn=function(){var e=r()(o()().mark((function e(){var n,t,i,l=arguments;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=l.length>0&&void 0!==l[0]&&l[0])&&!$e||kn){e.next=10;break}return Nn(!0),bn(n?1:jn+1),e.next=6,H({type:"competitions/getStudents",payload:{identifier:Q,keyword:Fe,team_id:He,page:n?1:jn+1}});case 6:i=e.sent,Re(n?Pe()(i.teachers):[].concat(Pe()(Ee),Pe()(i.teachers))),Nn(!1),(null===(t=i.teachers)||void 0===t?void 0:t.length)<20&&en(!1);case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();function qn(e){return Qn.apply(this,arguments)}function Qn(){return Qn=r()(o()().mark((function e(n){var t,i;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,H({type:"competitions/getTeacher",payload:{identifier:Q,keyword:Ie,team_id:He,page:n}});case 2:return(i=e.sent)&&ye(1===n?Pe()(i.teachers):[].concat(Pe()(ge),Pe()(i.teachers))),e.abrupt("return",!((null===(t=i.teachers)||void 0===t?void 0:t.length)<20));case 5:case"end":return e.stop()}}),e)}))),Qn.apply(this,arguments)}return(0,he.jsxs)("div",{style:{padding:"20px",width:"100%"},children:[(0,he.jsxs)("div",{style:{display:"flex",marginBottom:20},children:[(0,he.jsxs)("div",{style:{display:"flex",alignItems:"baseline",zIndex:0},children:[((0,Tn.eB)()||(null==G||null===(g=G.permission)||void 0===g?void 0:g.editable))&&(0,he.jsx)(b.ZP.Group,{className:Jt.scoreByBlankRadio,optionType:"button",options:[{label:"我的战队",value:"mine"},{label:"全部战队",value:"join"}],onChange:function(e){X.isteam=e.target.value,X.keyword="",X.type="",X.page=1,Mn()},value:X.isteam}),"mine"===X.isteam&&!((0,Tn.eB)()||null!=G&&null!==(k=G.permission)&&void 0!==k&&k.editable)&&(0,he.jsxs)("span",{style:{fontSize:14},children:["我的战队(",null==U?void 0:U.my_teams_count,")"]}),"join"===X.isteam&&(0,he.jsxs)("div",{style:{marginLeft:30,color:"#5F6368"},children:[(0,he.jsx)("span",{children:"战队总数"}),(0,he.jsx)("span",{style:{color:"#165DFF"},children:null==U?void 0:U.count}),(0,he.jsx)("span",{style:{marginRight:20},children:"个"}),(0,he.jsx)("span",{children:"参赛总人数"}),(0,he.jsx)("span",{style:{color:"#165DFF"},children:null==U?void 0:U.members_count}),(0,he.jsx)("span",{children:"个"})]})]}),(0,he.jsxs)("div",{style:{flex:1,textAlign:"end",display:"flex",justifyContent:"end"},children:["join"===X.isteam&&(0,he.jsx)(N.t7,{style:{width:379},dataSource:[],value:{id:X.type,value:X.keyword},onChange:function(e,n){X.keyword=e,X.page=1,X.type=1,$(l()({},X)),Mn()},placeholder:"请输入战队名称进行搜索"}),"mine"===X.isteam&&(null==U||null===(I=U.my_teams)||void 0===I?void 0:I.filter((function(e){return!e.active})).length)>0&&(0,he.jsxs)("span",{style:{fontSize:14,color:"#FA6400"},children:[(0,he.jsx)(ii.Z,{style:{marginRight:6,fontSize:14}})," 您有",null==U||null===(A=U.my_teams)||void 0===A?void 0:A.filter((function(e){return!e.active})).length,"个战队未满足参赛要求!为了不影响成绩,请设置战队成员"]})]})]}),"mine"===(null==X?void 0:X.isteam)&&(0,he.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"20px"},children:null==U||null===(S=U.my_teams)||void 0===S?void 0:S.map((function(e,n){var t,i,l,s;return(0,he.jsx)("div",{className:"p20",style:{border:"1px solid #F6F7F9"},children:(0,he.jsxs)(le.Z,{wrap:!1,align:"middle",gutter:30,children:[(0,he.jsx)(se.Z,{flex:"396px",children:(0,he.jsxs)(le.Z,{wrap:!1,align:"middle",gutter:10,children:[(0,he.jsx)(se.Z,{children:null!=e&&e.team_log?(0,he.jsx)("img",{width:66,height:66,style:{borderRadius:"50%"},src:ue.Z.IMG_SERVER+"/"+(null==e?void 0:e.team_log)}):(0,he.jsx)("div",{style:{background:"#4EACFF",color:"#fff",display:"flex",alignItems:"center",justifyContent:"center",width:66,height:66,borderRadius:"50%"},children:e.name.length>2?e.name.substring(0,2):e.name})}),(0,he.jsxs)(se.Z,{children:[(0,he.jsxs)(le.Z,{wrap:!1,align:"middle",gutter:10,children:[(0,he.jsx)(se.Z,{children:(0,he.jsx)(y.Z,{title:null==e?void 0:e.name,children:(0,he.jsx)("span",{className:"multi_ellipsis1",style:{color:"#232B40"},children:null==e?void 0:e.name})})}),(0,he.jsx)(se.Z,{children:(0,he.jsx)("i",{onClick:function(){"ended"!=(null==G?void 0:G.competition_status)?(sn(!0),vn(e)):v.ZP.warning("竞赛已结束,无法编辑相关信息")},style:{color:"#165DFF",cursor:"pointer"},className:"iconfont icon-bianji10 font14"})})]}),(0,he.jsxs)("div",{className:"mt10 font12",style:{color:"#5F6367"},children:["创建时间",(0,he.jsx)("span",{className:"ml10",style:{color:"#232B40"},children:null==e?void 0:e.created_at})]})]})]})}),(0,he.jsx)(se.Z,{children:(0,he.jsx)("div",{style:{height:66,width:1,background:"#F6F7F9"}})}),(0,he.jsx)(se.Z,{flex:"396px",children:(0,he.jsxs)(le.Z,{wrap:!1,align:"middle",gutter:30,children:[(0,he.jsx)(se.Z,{flex:"110px",children:(0,he.jsxs)("span",{className:"multi_ellipsis1",children:["姓名",(0,he.jsx)(y.Z,{title:null==e||null===(t=e.creator)||void 0===t?void 0:t.name,children:(0,he.jsx)("span",{className:"ml10",style:{color:"#232B40"},children:null==e||null===(i=e.creator)||void 0===i?void 0:i.name})})]})}),(0,he.jsx)(se.Z,{flex:"136px",children:(0,he.jsxs)("span",{className:"multi_ellipsis1",children:["学校",(0,he.jsx)(y.Z,{title:null==e?void 0:e.school_name,children:(0,he.jsx)("span",{className:"ml10",style:{color:"#232B40"},children:(null==e?void 0:e.school_name)||"--"})})]})}),(0,he.jsx)(se.Z,{flex:1,children:(0,he.jsxs)("span",{className:"multi_ellipsis1",children:["指导教师",(0,he.jsx)(y.Z,{title:null==e?void 0:e.teacher_name,children:(0,he.jsx)("span",{className:"ml10",style:{color:"#232B40"},children:(null==e?void 0:e.teacher_name)||"--"})})]})})]})}),(0,he.jsx)(se.Z,{children:(0,he.jsx)("div",{style:{height:66,width:1,background:"#F6F7F9"}})}),(0,he.jsxs)(se.Z,{flex:1,children:[(0,he.jsxs)(le.Z,{wrap:!1,align:"middle",justify:"end",gutter:20,children:[(0,he.jsx)(se.Z,{children:(0,he.jsxs)("span",{style:{color:"#5F6368"},children:["战队成员",(0,he.jsxs)("span",{className:"ml10",style:{color:"#232B40"},children:[null==e||null===(l=e.team_members)||void 0===l?void 0:l.length,"人"]})]})}),(null==e?void 0:e.manage_permission)&&(0,he.jsx)(se.Z,{children:(0,he.jsx)("span",{style:{color:"#3061D0",cursor:"pointer"},onClick:function(){de(null==e?void 0:e.team_members),qe(null==e?void 0:e.id)},children:"设置"})}),!(null!=e&&e.active)&&(0,he.jsx)(se.Z,{children:(0,he.jsx)(ii.Z,{style:{color:"#FA6400"}})}),(0,he.jsx)(se.Z,{children:(0,he.jsx)("span",{className:"c-red",style:{cursor:"pointer"},onClick:function(){var n;x.Z.confirm({title:null!=e&&e.manage_permission?"解散战队":"退出战队",content:"是否确认".concat(null!=e&&e.manage_permission?"解散":"退出","战队"),okButtonProps:{loading:_e},onOk:(n=r()(o()().mark((function n(){var t,i;return o()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(fe(!0),null==e||!e.manage_permission){n.next=8;break}return n.next=4,H({type:"competitions/DeleteTeam",payload:{identifier:Q,id:null==e?void 0:e.id}});case 4:(t=n.sent)&&0===t.status&&(v.ZP.info("解散成功"),H({type:"competitions/getStaff",payload:{identifier:Q}}),H({type:"competitions/getHeader",payload:{identifier:Q}})),n.next=12;break;case 8:return n.next=10,H({type:"competitions/ExitTeam",payload:{identifier:Q,id:null==e?void 0:e.id}});case 10:(i=n.sent)&&0===i.status&&(v.ZP.info("退出战队成功"),H({type:"competitions/getStaff",payload:{identifier:Q}}),H({type:"competitions/getHeader",payload:{identifier:Q}}));case 12:fe(!1);case 13:case"end":return n.stop()}}),n)}))),function(){return n.apply(this,arguments)})})},children:null!=e&&e.manage_permission?"解散战队":"退出战队"})})]}),(0,he.jsx)(le.Z,{className:"mt20",wrap:!1,align:"middle",justify:"end",children:(0,he.jsx)(se.Z,{children:(0,he.jsxs)("span",{style:{color:"#5F6367"},children:[(0,he.jsx)("span",{children:"邀请码"}),(0,he.jsx)("span",{style:{margin:"0px 10px",color:"#232B40"},title:e.invite_code,children:e.invite_code||"--"}),(0,he.jsx)(li.CopyToClipboard,{text:"【竞赛邀请】".concat(null==q||null===(s=q.userInfo)||void 0===s?void 0:s.username,"邀请您加入【").concat(null==G?void 0:G.name,"】-《").concat(null==e?void 0:e.name,"》战队,您可以访问下方的链接,以队员的身份加入该战队。”链接:").concat(window.location.origin).concat(window.location.pathname,"?code=").concat(e.invite_code),onCopy:function(){return v.ZP.success("复制成功")},children:(0,he.jsx)("i",{className:"iconfont icon-fuzhi font-14",style:{display:"inline-block",color:"#0152d9",cursor:"pointer"}})})]})})})]})]})})}))}),"join"===(null==X?void 0:X.isteam)&&0===(null==U||null===(C=U.competition_teams)||void 0===C?void 0:C.length)&&(0,he.jsx)(xn.Z,{}),"mine"===(null==X?void 0:X.isteam)&&0===(null==U||null===(F=U.my_teams)||void 0===F?void 0:F.length)&&(0,he.jsx)(xn.Z,{}),"join"===(null==X?void 0:X.isteam)&&(null==U||null===(P=U.competition_teams)||void 0===P?void 0:P.map((function(e,n){var t;return(0,he.jsxs)("div",{className:Jt.items,children:[null!=e&&e.team_log?(0,he.jsx)("img",{src:ue.Z.IMG_SERVER+"/"+(null==e?void 0:e.team_log)}):(0,he.jsx)("div",{className:Jt.img,children:e.name.length>2?e.name.substring(0,2):e.name}),(0,he.jsxs)("div",{className:Jt.names,children:[(0,he.jsx)("div",{className:Jt.teamname,children:null==e?void 0:e.name}),(0,he.jsxs)("div",{className:Jt.time,children:[(0,he.jsx)("span",{className:Jt.createtime,children:"创建时间"})," ",null==e?void 0:e.created_at]})]}),(0,he.jsxs)("div",{className:Jt.width30,children:[(0,he.jsx)("img",{className:Jt.loaderimg,src:ue.Z.IMG_SERVER+"/images/"+"".concat(e.creator.image_url)}),(0,he.jsx)("span",{title:e.creator.name,children:e.creator.name.length>6?e.creator.name.substring(0,6)+"...":e.creator.name}),(0,he.jsx)("span",{style:{marginLeft:20},children:e.school_name?e.school_name.length>6?e.school_name.substring(0,6)+"...":e.school_name:"--"})]}),(0,he.jsxs)("div",{className:Jt.width30,style:{justifyContent:"end"},children:[(0,he.jsx)("span",{style:{color:"#5F6368"},children:"战队成员"}),(0,he.jsxs)("span",{style:{color:"#232B40",margin:"0px 10px"},children:[null==e||null===(t=e.team_members)||void 0===t?void 0:t.length,"人"]}),(0,he.jsx)("span",{style:{color:"#3061D0",cursor:"pointer"},onClick:function(){ie(e)},children:"查看"})]})]})}))),(0,he.jsx)("div",{className:Jt.countWrap,style:{marginTop:20},children:(0,he.jsx)(fn.Z,{showQuickJumper:!0,hideOnSinglePage:!0,showSizeChanger:!0,pageSizeOptions:["10","15","50","100","200"],total:"mine"===X.isteam?null==U?void 0:U.my_teams_count:null==U?void 0:U.count,onChange:function(e,n){X.page=e,X.per_page=n,$(l()({},X)),Mn()},pageSize:X.per_page,current:X.page})}),(0,he.jsxs)(x.Z,{title:!1,footer:!1,open:(null==te||null===(T=te.team_members)||void 0===T?void 0:T.length)>0,width:1e3,className:Jt.scoremodal,closable:!1,centered:!0,onCancel:function(){return ie([])},children:[(0,he.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,he.jsx)("div",{className:Jt.title,children:null==te?void 0:te.name}),(0,he.jsx)("span",{onClick:function(){return ie([])},style:{cursor:"pointer"},className:Jt.close,children:(0,he.jsx)("i",{className:"iconfont icon-danchuangguanbi"})})]}),(0,he.jsx)(oe.Z,{dataSource:null==te?void 0:te.team_members,pagination:!1,style:{marginTop:30},scroll:{y:300},columns:[{title:"头像",align:"left",dataIndex:"image_url",render:function(e,n){return(0,he.jsx)("img",{className:Jt.loaderimg,src:ue.Z.IMG_SERVER+"/images/"+"".concat(e)})}},{title:"姓名",align:"left",dataIndex:"name",render:function(e){return(0,he.jsx)(y.Z,{title:e,children:(0,he.jsx)("span",{children:(null==e?void 0:e.length)>6?(null==e?void 0:e.substring(0,6))+"...":e||"- -"})})}},{title:"手机",align:"left",dataIndex:"phone",ellipsis:{showTitle:!0},render:function(e){return(0,he.jsx)("span",{children:e||"- -"})}},{title:"学校/单位",align:"left",dataIndex:"school_name",render:function(e,n){return(0,he.jsx)(y.Z,{title:e,children:(0,he.jsx)("span",{children:(null==e?void 0:e.length)>6?(null==e?void 0:e.substring(0,6))+"...":e||"- -"})})}},{title:"职业",align:"left",ellipsis:{showTitle:!0},dataIndex:"identity",render:function(e,n){return e||"- -"}},{title:"学号",align:"left",ellipsis:{showTitle:!0},dataIndex:"student_id",render:function(e,n){return e||"- -"}},{title:"角色",align:"left",dataIndex:"role",render:function(e,n){return(0,he.jsxs)("span",{style:{color:"leader"===e?"#3061D0":"#01795D"},children:["leader"===e?"队长":"队员",(null==n?void 0:n.creator)&&(0,he.jsx)("span",{style:{color:"#FA6400",display:"inline-flex",width:48,height:22,borderRadius:4,lineHeight:"22px",background:"#FEEADC",textAlign:"center",marginLeft:10,justifyContent:"center",fontSize:12},children:"创建者"})]})}}]})]}),(0,he.jsx)(x.Z,{title:!1,footer:!1,open:(null==ce?void 0:ce.length)>0,width:1e3,className:Jt.scoremodal,closable:!1,destroyOnClose:!0,centered:!0,onCancel:function(){de([])},children:(0,he.jsxs)("div",{onClick:function(){Ze(!1),ze(!1)},children:[(0,he.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,he.jsx)("div",{className:Jt.title,children:"设置战队成员"}),(0,he.jsx)("span",{onClick:function(){Mn(),Ze(!1),ze(!1),Te(""),Ae(""),de([])},style:{cursor:"pointer"},className:Jt.close,children:(0,he.jsx)("i",{className:"iconfont icon-danchuangguanbi"})})]}),(0,he.jsxs)("div",{style:{display:"flex",marginTop:30},children:[(0,he.jsxs)("div",{style:{display:"flex",alignItems:"center",flex:1},children:[(0,he.jsx)("span",{style:{color:"#5F6368"},children:"添加老师"}),(0,he.jsx)(ti.Z,{overlayStyle:{width:600},content:(0,he.jsx)("div",{style:{maxHeight:260,overflow:"auto"},children:(0,he.jsx)(lt(),{initialLoad:!1,pageStart:1,threshold:20,loadMore:function(e){Yn()},hasMore:$e,useWindow:!1,children:(0,he.jsx)(oe.Z,{showHeader:!1,pagination:!1,dataSource:ge,columns:[{align:"left",width:60,dataIndex:"image_url",render:function(e){return(0,he.jsx)("img",{style:{marginLeft:"10px",marginRight:"3px"},className:Jt.loaderimg,src:ue.Z.IMG_SERVER+"/images/"+"".concat(e)})}},{align:"left",dataIndex:"name"},{align:"left",dataIndex:"phone"},{align:"left",dataIndex:"identity"},{align:"left",dataIndex:"school_name"},{align:"left",dataIndex:"image_url",render:function(e,n){return(0,he.jsx)("span",{className:Jt.task_hide,style:{textAlign:"left",width:"24%",color:n.enrolled?"#28be6c":n.enrolled||!1!==n.enrollable?"":"#F3730C",padding:"0px 5px",fontSize:"12px"},children:n.enrolled?"已加入本战队":n.enrolled||!1!==n.enrollable?"":"已加入其他战队"})}}],onRow:function(e){return{onClick:function(n){if(null!=e&&e.authentication||null==G||!G.is_authentication)if(e.enrolled)v.ZP.info("该用户已经加入战队");else if(e.need_mail)v.ZP.info("该用户没有邮箱");else if(e.need_phone)v.ZP.info("该用户没有手机号");else if((null==ce?void 0:ce.filter((function(n){return e.id===n.id})).length)>0)v.ZP.info("该用户已在战队列表,请不要重复添加");else{var t=ce;t.push(e),console.log("---",t),Ze(!1),de(Pe()(t))}else v.ZP.info("当前竞赛需要实名认证,该用户未进行实名认证不能参与。")}}}})})}),title:"",placement:"bottomLeft",open:we,children:(0,he.jsx)("div",{style:{marginLeft:16},className:Jt.searchWrap,children:(0,he.jsx)(j.Z.Search,{placeholder:"请搜索教师姓名/手机号进行添加",size:"large",className:Jt.search,value:Ie,onChange:function(e){Ae(e.target.value)},onSearch:function(e){Ze(!0),ye([]),bn(1),qn(1)},onBlur:function(){en(!0),bn(1),Nn(!1)},suffix:(0,he.jsx)("i",{className:"iconfont icon-sousuo9 font14 ".concat(Jt.searchIcon),onClick:function(e){e.stopPropagation(),Ze(!0),ye([]),bn(1),qn(1)}})})})})]}),(0,he.jsxs)("div",{style:{display:"flex",alignItems:"center",flex:1,justifyContent:"flex-end"},children:[(0,he.jsx)("span",{style:{color:"#5F6368"},children:"添加学生/专业人士"}),(0,he.jsx)(ti.Z,{overlayStyle:{width:700},content:(0,he.jsx)("div",{style:{maxHeight:260,overflow:"auto"},children:(0,he.jsx)(lt(),{initialLoad:!1,pageStart:1,threshold:20,loadMore:function(e){Hn()},hasMore:$e,useWindow:!1,children:(0,he.jsx)(oe.Z,{showHeader:!1,pagination:!1,dataSource:Ee,columns:[{align:"left",width:60,dataIndex:"image_url",render:function(e){return(0,he.jsx)("img",{style:{marginLeft:"10px",marginRight:"3px"},className:Jt.loaderimg,src:ue.Z.IMG_SERVER+"/images/"+"".concat(e)})}},{align:"left",dataIndex:"name"},{align:"left",dataIndex:"phone"},{align:"left",dataIndex:"student_id"},{align:"left",dataIndex:"school_name"},{align:"left",dataIndex:"image_url",render:function(e,n){return(0,he.jsx)("span",{className:Jt.task_hide,style:{textAlign:"left",width:"24%",color:n.enrolled?"#28be6c":n.enrolled||!1!==n.enrollable?"":"#F3730C",padding:"0px 5px",fontSize:"12px"},children:n.enrolled?"已加入本战队":n.enrolled||!1!==n.enrollable?"":"已加入其他战队"})}}],onRow:function(e){return{onClick:function(n){if(null!=e&&e.authentication||null==G||!G.is_authentication)if(e.enrolled)v.ZP.info("该用户已经加入战队");else if(e.need_mail)v.ZP.info("该用户没有邮箱");else if(e.need_phone)v.ZP.info("该用户没有手机号");else if((null==ce?void 0:ce.filter((function(n){return e.id===n.id})).length)>0)v.ZP.info("该用户已在战队列表,请不要重复添加");else{var t=ce;t.push(e),ze(!1),de(Pe()(t))}else v.ZP.info("当前竞赛需要实名认证,该用户未进行实名认证不能参与。")}}}})})}),title:"",placement:"bottomRight",open:Be,children:(0,he.jsx)("div",{style:{marginLeft:16},className:Jt.searchWrap,children:(0,he.jsx)(j.Z.Search,{placeholder:"请搜索队员姓名/手机号并添加",size:"large",className:Jt.search,value:Fe,onChange:function(e){Te(e.target.value)},onSearch:function(e){ze(!0),Re([]),bn(1),Bn(1)},onBlur:function(){en(!0),bn(1),Nn(!1)},suffix:(0,he.jsx)("i",{className:"iconfont icon-sousuo9 font14 ".concat(Jt.searchIcon),onClick:function(e){e.stopPropagation(),ze(!0),Re([]),bn(1),Bn(1)}})})})})]})]}),(0,he.jsx)("div",{style:{display:"flex",marginBottom:"12px",marginTop:"20px"},children:(0,he.jsxs)("p",{style:{flex:"1",color:"#666666"},children:[(0,he.jsx)("span",{style:{color:"#9B9B9B"},children:"请添加战队成员:"}),W&&W.all_staff?(0,he.jsxs)("span",{children:[W&&W.all_staff.minimum,"-",W&&W.all_staff.maximum,"名成员"]}):"",W&&W.teacher_staff?(0,he.jsxs)("span",{children:[W&&W.teacher_staff.minimum,"-",W&&W.teacher_staff.maximum,"名教师"]}):"",W&&W.teacher_staff&&W.member_staff?"/":"",W&&W.member_staff?(0,he.jsxs)("span",{children:[W&&W.member_staff.minimum,"-",W&&W.member_staff.maximum,"名学生"]}):""]})}),(0,he.jsx)(oe.Z,{dataSource:ce,pagination:!1,style:{marginTop:"-10px"},scroll:{y:300},columns:[{title:"头像",align:"left",width:60,dataIndex:"image_url",render:function(e,n){return(0,he.jsx)("img",{className:Jt.loaderimg,style:{width:20,height:20},src:ue.Z.IMG_SERVER+"/images/"+"".concat(e)})}},{title:"姓名",align:"left",dataIndex:"name",render:function(e){return(0,he.jsx)(y.Z,{title:e,children:(0,he.jsx)("span",{children:(null==e?void 0:e.length)>6?(null==e?void 0:e.substring(0,6))+"...":e||"- -"})})}},{title:"手机",align:"left",width:130,dataIndex:"phone",render:function(e){return(0,he.jsx)(y.Z,{title:e,children:(0,he.jsx)("span",{children:e||"- -"})})}},{title:"学校/单位",align:"left",dataIndex:"school_name",render:function(e,n){return(0,he.jsx)(y.Z,{title:e,children:(0,he.jsx)("span",{children:(null==e?void 0:e.length)>6?(null==e?void 0:e.substring(0,6))+"...":e||"- -"})})}},{title:"职业",align:"left",dataIndex:"identity",render:function(e,n){return e||"- -"}},{title:"学号",align:"left",dataIndex:"student_id",render:function(e,n){return e||"- -"}},{title:"角色",align:"left",dataIndex:"role",render:function(e,n){return(0,he.jsxs)("span",{style:{color:"leader"===e?"#3061D0":"#01795D"},children:["leader"===e?"队长":"队员",(null==n?void 0:n.creator)&&(0,he.jsx)("span",{style:{color:"#FA6400",display:"inline-flex",width:48,height:22,borderRadius:4,lineHeight:"22px",background:"#FEEADC",textAlign:"center",marginLeft:10,justifyContent:"center",fontSize:12},children:"创建者"})]})}},{title:"操作",align:"right",width:150,dataIndex:"role",render:function(e,n,t){return(0,he.jsxs)("span",{style:{color:"#3061D0"},children:["leader"!=e&&(0,he.jsx)("a",{onClick:function(){var e=ce,i=ce&&ce.findIndex((function(e){return"leader"===e.role}));e[t].role="leader",e[i].role=e&&e[i].is_teacher?"teacher":"member";var l=e.sort((function(e,n){return e.creator?-1:1})).sort((function(e,n){return"leader"===e.role?-1:1}));de(Pe()(l)),Qe.current=n.id},children:"设置队长"}),"leader"!=e&&(0,he.jsx)("a",{onClick:function(){var e=ce&&ce.filter((function(e){return e.id!=n.id}));de(Pe()(e))},style:{marginLeft:20},children:"删除"})]})}}]}),(0,he.jsxs)("div",{className:Jt.bottom,children:[(0,he.jsx)(Z.ZP,{className:Jt.no,onClick:function(){de([]),ze(!1),Ze(!1),Te(""),Ae(""),Mn()},children:"取消"}),(0,he.jsx)(Z.ZP,{loading:_e,className:Jt.yes,onClick:r()(o()().mark((function e(){var n,t,i;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=[],t=[],ce&&ce.map((function(e,i){e.is_teacher?t.push(e.id):n.push(e.id)})),e.next=5,H({type:"competitions/SubmitTeam",payload:{identifier:Q,teamid:He,member_ids:n,teacher_ids:t,leader:Qe.current}});case 5:(i=e.sent)&&0===i.status&&(v.ZP.info("修改成功"),de([]),Mn());case 7:case"end":return e.stop()}}),e)}))),children:"确认"})]})]})}),(0,he.jsxs)(x.Z,{title:!1,footer:!1,open:ln,width:610,className:Jt.scoremodal,closable:!1,destroyOnClose:!0,centered:!0,onCancel:function(){return sn(!1)},children:[(0,he.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,he.jsx)("div",{className:Jt.title,children:"编辑战队"}),(0,he.jsx)("span",{onClick:function(){return sn(!1)},style:{cursor:"pointer"},className:Jt.close,children:(0,he.jsx)("i",{className:"iconfont icon-danchuangguanbi"})})]}),(0,he.jsxs)("div",{className:Jt.content,children:[(0,he.jsxs)(f.Z,{form:an,layout:"vertical",initialValues:l()({name:null==_n?void 0:_n.name},null==_n?void 0:_n.apply_info),onFinish:function(){var e=r()(o()().mark((function e(n){var t,i,s,a;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return fe(!0),s=null===(t=Sn.find((function(e){return e.name===(null==n?void 0:n.school)})))||void 0===t?void 0:t.id,e.next=4,H({type:"competitions/UpTeam",payload:l()(l()({},n),{},{identifier:Q,Teannameid:null==_n?void 0:_n.id,name:null==n?void 0:n.name,school_id:s,image:(null===(i=pn.current)||void 0===i||null===(i=i.getCroppedCanvas())||void 0===i?void 0:i.toDataURL("image/jpeg"))||""})});case 4:a=e.sent,fe(!1),0===(null==a?void 0:a.status)&&(Mn(),sn(!1));case 7:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:[(0,he.jsx)(f.Z.Item,{label:"战队名称",name:"name",rules:[{required:!0,validator:function(e,n){var t;return(null==n||null===(t=n.replaceAll(" ",""))||void 0===t?void 0:t.length)>0?Promise.resolve():Promise.reject("请填写竞赛名称")}}],children:(0,he.jsx)(j.Z,{maxLength:60,className:Jt.baseFormItem,showCount:!0})}),(null==G||null===(L=G.need_apply_info)||void 0===L?void 0:L.need_apply_name)&&(0,he.jsx)(f.Z.Item,{label:"参赛人员姓名",name:"real_name",className:Jt.jsinput,rules:[{required:!0,message:"请输入参赛人员姓名"},{whitespace:!0,message:"姓名不能为空"}],children:(0,he.jsx)(j.Z,{className:Jt.baseFormItem,placeholder:"请输入参赛人员姓名",showCount:!0,maxLength:60})}),(null==G||null===(D=G.need_apply_info)||void 0===D?void 0:D.need_apply_sex)&&(0,he.jsx)(f.Z.Item,{label:"性别",name:"sex",className:Jt.jsinput,rules:[{required:!0,message:"请选择参赛人员性别"}],children:(0,he.jsxs)(b.ZP.Group,{children:[(0,he.jsx)(b.ZP,{value:0,children:"男"}),(0,he.jsx)(b.ZP,{value:1,children:"女"})]})}),(null==G||null===(E=G.need_apply_info)||void 0===E?void 0:E.need_apply_student_id)&&(0,he.jsx)(f.Z.Item,{label:"学号",name:"student_id",className:Jt.jsinput,rules:[{required:!0,message:"请输入参赛人员学号"},{whitespace:!0,message:"学号不能为空"}],children:(0,he.jsx)(j.Z,{className:Jt.baseFormItem,placeholder:"请输入参赛人员学号",showCount:!0,maxLength:60})}),(null==G||null===(R=G.need_apply_info)||void 0===R?void 0:R.need_apply_phone)&&(0,he.jsx)(f.Z.Item,{label:"电话",name:"phone",className:Jt.jsinput,rules:[{required:!0,message:"请输入参赛人员电话"},{whitespace:!0,message:"电话不能为空"}],children:(0,he.jsx)(j.Z,{className:Jt.baseFormItem,placeholder:"请输入参赛人员电话",showCount:!0,maxLength:60})}),(null==G||null===(M=G.need_apply_info)||void 0===M?void 0:M.need_apply_grade)&&(0,he.jsx)(f.Z.Item,{label:"年级",name:"grade",className:Jt.jsinput,rules:[{required:!0,message:"请选择参赛人员年级"}],children:(0,he.jsx)(_.default,{placeholder:"请选择参赛人员年级",size:"large",children:(On=(new Date).getFullYear(),Array(31).fill({}).map((function(e,n){return(0,he.jsx)(ri,{value:On-n,children:(0,he.jsx)("span",{children:On-n})},n)})))})}),(null==G||null===(V=G.need_apply_info)||void 0===V?void 0:V.need_apply_teacher_name)&&(0,he.jsx)(f.Z.Item,{label:"指导老师姓名",name:"teacher_name",className:Jt.jsinput,rules:[{required:!0,message:"请输入指导老师姓名"},{whitespace:!0,message:"指导老师姓名不能为空"}],children:(0,he.jsx)(j.Z,{className:Jt.baseFormItem,placeholder:"请输入指导老师姓名",showCount:!0,maxLength:60})}),(null==G||null===(B=G.need_apply_info)||void 0===B?void 0:B.need_apply_school)&&(0,he.jsx)(f.Z.Item,{label:"学校/单位",name:"school",className:Jt.jsinput,rules:[{required:!0,message:"请选择学校/单位"}],children:(0,he.jsx)(w.Z,{size:"large",showSearch:!0,onChange:Fn,children:Dn.map((function(e,n){return(0,he.jsx)(ri,{value:e.name,children:e.name},n)}))})})]}),(0,he.jsxs)("p",{style:{marginTop:"15px",marginLeft:"8px",width:"544px"},children:[(0,he.jsx)("span",{children:"LOGO:"}),(0,he.jsxs)("label",{id:"uploadBtn",style:{color:"#4DACFF",cursor:"pointer"},children:[(0,he.jsx)("input",{type:"file",className:"sr-only",id:"inputImage",name:"file",accept:"image/*",onChange:function(e){var n=e.target.files[0];if(n&&n.size>2097152)v.ZP.info("仅支持文件大小小于2M的文件");else{var t=new FileReader;t.readAsBinaryString(n),t.onload=function(){var e=btoa(t.result);Je.current="data:".concat(n.type,";base64,").concat(e),We("data:".concat(n.type,";base64,").concat(e))},t.onerror=function(){}}},style:{display:"none"}}),"上传LOGO"]})," ",(0,he.jsx)("span",{style:{marginLeft:10,color:"#FA6400"},children:"(支持jpg、gif、png格式的图片,建议文件小于2M)"})]}),(0,he.jsxs)("div",{style:{marginTop:"15px",marginLeft:"8px",display:"flex"},children:[dn?(0,he.jsx)("img",{className:Jt.Spanradius,src:dn}):null!=_n&&_n.team_log?(0,he.jsx)("img",{src:ue.Z.IMG_SERVER+"/"+(null==_n?void 0:_n.team_log),className:Jt.Spanradius}):(0,he.jsx)("div",{className:Jt.Spanradius,children:(null==_n||null===(z=_n.name)||void 0===z?void 0:z.length)>2?null==_n||null===(O=_n.name)||void 0===O?void 0:O.substring(0,2):null==_n?void 0:_n.name}),(0,he.jsx)(si.Z,{style:{width:"320px",height:"320px",marginLeft:"30px",background:"#EEEEEE"},src:Je.current||ue.Z.IMG_SERVER+"/"+(null==_n?void 0:_n.team_log),guides:!1,ref:pn,crop:function(){un(pn.current.getCroppedCanvas().toDataURL())}})]})]}),(0,he.jsxs)("div",{className:Jt.bottom,children:[(0,he.jsx)(Z.ZP,{className:Jt.no,onClick:function(){sn(!1)},children:"取消"}),(0,he.jsx)(Z.ZP,{loading:_e,className:Jt.yes,onClick:function(){an.submit()},children:"确认"})]})]})]})})),di=["competitions","globalSetting","loading","dispatch","user"],ui=[{id:"",name:"全部"},{id:1,name:"姓名"},{id:2,name:"手机号"},{id:3,name:"邮箱"}],pi={teacher:"教师",student:"学生",professional:"专业人士"},mi=(0,h.connect)((function(e){var n=e.competitions,t=e.loading,i=e.globalSetting,l=e.user;return{competitions:n,globalSetting:i,loading:t.models.competitions,user:l}}))((function(e){var n,t=e.competitions,i=(e.globalSetting,e.loading,e.dispatch),s=(e.user,p()(e,di),(0,h.useParams)().identifier),a=t.Header,c=(t.competition_team,t.Staff),u=(t.Prizes,t.Account,(0,m.useState)([])),_=d()(u,2),f=_[0],g=_[1],j=(0,m.useState)(""),b=d()(j,2),w=(b[0],b[1],(0,m.useState)({page:1,per_page:10,keyword:"",type:"",personal:!0})),Z=d()(w,2),k=Z[0],I=Z[1];function A(){return S.apply(this,arguments)}function S(){return(S=r()(o()().mark((function e(){var n;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ae.ZP)("/api/competitions/".concat(s,"/all_team_members.json"),{method:"get",params:k});case 2:0===(null==(n=e.sent)?void 0:n.status)&&g(n);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var C=(0,m.useState)(!1),F=d()(C,2),P=F[0],T=F[1];(0,m.useEffect)((function(){null!=a&&a.personal&&A()}),[a]);var L=[{title:"序号",align:"left",dataIndex:"name",width:80,render:function(e,n,t){return(0,he.jsx)("span",{children:t+1})}},{title:"参赛人",align:"left",dataIndex:"name",width:120,ellipsis:{showTitle:!1},render:function(e,n){return(0,he.jsxs)(he.Fragment,{children:[(0,he.jsx)(y.Z,{placement:"topLeft",title:e,children:(null==e?void 0:e.length)>4?e.substring(0,4)+"...":e}),(null==n?void 0:n.authentication)&&(0,he.jsx)(y.Z,{title:"已实名认证",children:(0,he.jsx)("img",{src:Kt,style:{marginLeft:5,marginTop:"-2px"}})})]})}},{title:"个人成绩",align:"left",width:100,dataIndex:"score",render:function(e){return(0,he.jsx)("span",{children:e||"- -"})}},{title:"角色",align:"left",width:100,dataIndex:"identity",render:function(e,n){return(0,he.jsxs)("span",{children:[pi[e],(null==n?void 0:n.professional_certification)&&(0,he.jsx)(y.Z,{title:"已职业认证",children:(0,he.jsx)("img",{src:Kt,style:{marginLeft:5,marginTop:"-2px"}})})]})}},{title:"手机号",align:"left",width:160,dataIndex:"phone",render:function(e){return(0,he.jsx)("span",{children:e||"- -"})}},{title:"学号/工号",align:"left",dataIndex:"student_id",width:160,ellipsis:{showTitle:!1},render:function(e){return(0,he.jsx)(y.Z,{placement:"topLeft",title:e,children:e||"- -"})}},{title:"学校/单位",align:"left",dataIndex:"school",ellipsis:{showTitle:!1},render:function(e){return(0,he.jsx)(y.Z,{placement:"topLeft",title:e||"",children:e||"--"})}},{title:"地区",align:"left",dataIndex:"province",width:100,ellipsis:{showTitle:!1},render:function(e){return(0,he.jsx)(y.Z,{placement:"topLeft",title:e||"",children:e||"- -"})}},{title:"操作",align:"right",dataIndex:"is_cancel_score",width:100,render:function(e,n){return(0,he.jsx)("span",{children:0===e||!1===e?(0,he.jsx)("span",{style:{color:"#165DFF",cursor:"pointer"},onClick:function(){var e;x.Z.confirm({icon:null,centered:!0,title:"取消成绩",content:"请确认是否取消该成员成绩,取消后该成员的成绩将视为无成绩,不进行排名。",onOk:(e=r()(o()().mark((function e(){var t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ae.ZP)("/api/competitions/".concat(s,"/set_score_status.json"),{method:"put",body:{competition_score_id:null==n?void 0:n.competition_score_id,competition_team_id:null==n?void 0:n.competition_team_id,is_cancel_score:1}});case 2:0===(null==(t=e.sent)?void 0:t.status)&&(v.ZP.info("取消成功"),k.page=1,I(l()({},k)),A());case 4:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})},children:"取消成绩"}):(0,he.jsx)("span",{onClick:r()(o()().mark((function e(){var t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ae.ZP)("/api/competitions/".concat(s,"/set_score_status.json"),{method:"put",body:{competition_score_id:null==n?void 0:n.competition_score_id,competition_team_id:null==n?void 0:n.competition_team_id,is_cancel_score:0}});case 2:0===(null==(t=e.sent)?void 0:t.status)&&(v.ZP.info("恢复成功"),k.page=1,I(l()({},k)),A());case 4:case"end":return e.stop()}}),e)}))),style:{color:"#FD9200",cursor:"pointer"},children:"恢复成绩"})})}}];return(0,he.jsxs)("section",{className:Jt.bg,children:[(0,he.jsx)("div",{className:Jt.title,style:{display:"flex"},children:(0,he.jsxs)(le.Z,{style:{width:"100%"},children:[(0,he.jsx)(se.Z,{flex:"1",children:null!=a&&a.personal?"参赛人员":"战队详情"}),(0,he.jsxs)(se.Z,{children:[((0,Tn.eB)()||(null==a||null===(n=a.permission)||void 0===n?void 0:n.editable)&&!a.personal)&&(0,he.jsx)("span",{className:Jt.button,onClick:function(){T(!0)},children:"管理战队成绩"}),!(null!=c&&c.enroll_ended)&&!a.personal&&(0,he.jsx)("span",{className:Jt.button,style:{margin:"0px 20px"},onClick:function(){i({type:"competitions/setActionTabs",payload:{key:"2"}})},children:"加入战队"})," ",!(null!=c&&c.enroll_ended)&&!a.personal&&(0,he.jsxs)("span",{className:Jt.button,onClick:function(){i({type:"competitions/setActionTabs",payload:{key:"3"}})},children:[(0,he.jsx)("i",{className:"iconfont icon-qizhi",style:{marginRight:6,fontSize:14,color:"#3061D0"}})," 创建战队"]})]})]})}),(0,he.jsxs)("div",{style:{display:"flex"},children:[null!=a&&a.personal?(0,he.jsxs)("div",{style:{padding:"20px",width:"100%"},children:[(0,he.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,he.jsx)("div",{children:(0,he.jsx)(N.t7,{style:{width:327,marginRight:15},dataSource:ui,value:{id:k.type,value:k.keyword},onChange:function(e,n){k.keyword=e,k.type=n||"",I(l()({},k)),A()},placeholder:"请输入搜索内容"})}),(0,he.jsx)("div",{style:{flex:1,textAlign:"end"},children:(0,he.jsx)("span",{className:Jt.button,onClick:function(){(0,me.FH)("",(0,me.NY)({url:ue.Z.API_SERVER+"/api/competitions/".concat(s,"/all_team_members.xlsx"),query:l()({},k)}))},children:"导出"})})]}),(0,he.jsx)(oe.Z,{style:{marginTop:20},columns:L,bordered:!1,dataSource:null==f?void 0:f.data,pagination:!1}),(0,he.jsx)("div",{className:Jt.countWrap,style:{marginTop:20},children:(0,he.jsx)(fn.Z,{showQuickJumper:!0,hideOnSinglePage:!0,showSizeChanger:!0,pageSizeOptions:["10","15","50","100","200"],total:null==f?void 0:f.count,onChange:function(e,n){k.page=e,k.per_page=n,I(l()({},k)),A()},pageSize:k.per_page,current:k.page})})]}):(0,he.jsx)(ci,{}),(0,he.jsx)(mn.Z,{rootClassName:Jt.drawer_style,title:(0,he.jsx)("div",{style:{fontSize:"16px"},children:"战队成绩"}),placement:"bottom",width:500,height:564,onClose:function(){return T(!1)},open:P,children:P?(0,he.jsx)(ni,{}):""})]})]})})),hi={flex_box_center:"flex_box_center___s9TxG",flex_space_between:"flex_space_between___MGe6n",flex_box_vertical_center:"flex_box_vertical_center___nNXLw",flex_box_center_end:"flex_box_center_end___KE6DE",flex_box_column:"flex_box_column___gv8RV",bg:"bg___gk5zM",title:"title___Pp6ij",button:"button___EI7ve"},_i=["competitions","globalSetting","loading","dispatch","user"],fi=_.default.Option,xi=[{id:"",name:"全部"},{id:1,name:"姓名"},{id:2,name:"手机号"},{id:3,name:"邮箱"}],vi={teacher:"教师",student:"学生",professional:"专业人士"},gi=(0,h.connect)((function(e){var n=e.competitions,t=e.loading,i=e.globalSetting,l=e.user;return{competitions:n,globalSetting:i,loading:t.models.competitions,user:l}}))((function(e){var n,t,i,s,a,c,u,g,Z,k,I,A,S,C,F,P,T,L,D,E,R,M,V,B,z,O,Y,H=e.competitions,q=(e.globalSetting,e.loading,e.dispatch),Q=e.user,G=(p()(e,_i),(0,h.useParams)().identifier),U=H.Header,W=(0,m.useState)([]),J=d()(W,2),K=J[0],X=J[1],$=(0,m.useState)(!1),ee=d()($,2),ne=ee[0],te=ee[1],ae=f.Z.useForm(),re=d()(ae,1)[0],de=(0,m.useState)(!1),pe=d()(de,2),_e=pe[0],fe=pe[1],xe=(0,m.useState)(!1),ve=d()(xe,2),ge=ve[0],ye=ve[1],je=(0,m.useState)({page:1,per_page:10,keyword:"",type:"",personal:!0}),be=d()(je,2),we=be[0],Ze=be[1],ke=(0,m.useState)([]),Ne=d()(ke,2),Ie=Ne[0],Se=Ne[1],Ce=(0,m.useRef)((0,oi.throttle)((function(e){return De(e)}),1200,{leading:!0,trailing:!0})).current,Fe=(0,m.useState)([]),Pe=d()(Fe,2),Te=Pe[0],Le=Pe[1],De=function(){var e=r()(o()().mark((function e(n){var t,i;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,q({type:"account/getSchoolOption",payload:{keyword:n,limit:10}});case 2:t=e.sent,Se(null==t?void 0:t.schools),n&&""!=n&&Le(null==t||null===(i=t.schools)||void 0===i?void 0:i.filter((function(e){return e.name.includes(n)})));case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();(0,m.useEffect)((function(){var e;De(null==Q||null===(e=Q.userInfo)||void 0===e?void 0:e.school_name)}),[(null==U||null===(n=U.need_apply_info)||void 0===n?void 0:n.need_apply_name)||(null==U||null===(t=U.need_apply_info)||void 0===t?void 0:t.need_apply_student_id)||(null==U||null===(i=U.need_apply_info)||void 0===i?void 0:i.need_apply_sex)||(null==U||null===(s=U.need_apply_info)||void 0===s?void 0:s.need_apply_phone)||(null==U||null===(a=U.need_apply_info)||void 0===a?void 0:a.need_apply_grade)||(null==U||null===(c=U.need_apply_info)||void 0===c?void 0:c.need_apply_teacher_name)||(null==U||null===(u=U.need_apply_info)||void 0===u?void 0:u.need_apply_school)]);function Ee(){return Re.apply(this,arguments)}function Re(){return(Re=r()(o()().mark((function e(){var n;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return fe(!0),e.next=3,(0,Ae.ZP)("/api/competitions/".concat(G,"/all_team_members.json"),{method:"get",params:we});case 3:0===(null==(n=e.sent)?void 0:n.status)&&(X(n),ye(null==n?void 0:n.hidden_score)),fe(!1);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}(0,m.useEffect)((function(){Ee()}),[U]);var Me,Ve=null===(g=[{title:"序号",align:"left",dataIndex:"name",width:80,fixed:"left",render:function(e,n,t){return(0,he.jsx)("span",{children:t+1})}},{title:"参赛人",align:"left",dataIndex:"name",width:120,fixed:"left",ellipsis:{showTitle:!1},render:function(e,n){return(0,he.jsxs)(he.Fragment,{children:[(0,he.jsx)(y.Z,{placement:"topLeft",title:e,children:(null==e?void 0:e.length)>4?e.substring(0,4)+"...":e}),(null==n?void 0:n.authentication)&&(0,he.jsx)(y.Z,{title:"已实名认证",children:(0,he.jsx)("img",{src:Kt,style:{marginLeft:5,marginTop:"-2px"}})})]})}},{title:"个人成绩",align:"left",width:100,dataIndex:"score",fixed:"left",render:function(e){return(0,he.jsx)("span",{children:e||"- -"})}},((0,Tn.eB)()||(null==U||null===(Z=U.permission)||void 0===Z?void 0:Z.editable))&&{title:"角色",align:"left",width:100,dataIndex:"identity",render:function(e,n){return(0,he.jsxs)("span",{children:[vi[e],(null==n?void 0:n.professional_certification)&&(0,he.jsx)(y.Z,{title:"已职业认证",children:(0,he.jsx)("img",{src:Kt,style:{marginLeft:5,marginTop:"-2px"}})})]})}},{title:"手机号",align:"left",width:160,dataIndex:"phone",render:function(e){return(0,he.jsx)("span",{children:e||"- -"})}},{title:"学号/工号",align:"left",dataIndex:"student_id",width:160,ellipsis:{showTitle:!1},render:function(e){return(0,he.jsx)(y.Z,{placement:"topLeft",title:e,children:e||"- -"})}},{title:"学校/单位",align:"left",dataIndex:"school",ellipsis:{showTitle:!1},width:160,render:function(e){return(0,he.jsx)(y.Z,{placement:"topLeft",title:e||"",children:e||"--"})}},((0,Tn.eB)()||(null==U||null===(k=U.permission)||void 0===k?void 0:k.editable))&&{title:"地区",align:"left",dataIndex:"province",width:100,ellipsis:{showTitle:!1},render:function(e){return(0,he.jsx)(y.Z,{placement:"topLeft",title:e||"",children:e||"- -"})}},(null==U?void 0:U.can_write_teacher_info)&&{title:"指导教师姓名",align:"left",dataIndex:"teacher_name",width:120,ellipsis:{showTitle:!1},render:function(e){return(0,he.jsx)(y.Z,{placement:"topLeft",title:e||"",children:e||"- -"})}},((0,Tn.eB)()||(null==U||null===(I=U.need_apply_info)||void 0===I?void 0:I.need_apply_name)||(null==U||null===(A=U.need_apply_info)||void 0===A?void 0:A.need_apply_student_id)||(null==U||null===(S=U.need_apply_info)||void 0===S?void 0:S.need_apply_sex)||(null==U||null===(C=U.need_apply_info)||void 0===C?void 0:C.need_apply_phone)||(null==U||null===(F=U.need_apply_info)||void 0===F?void 0:F.need_apply_grade)||(null==U||null===(P=U.need_apply_info)||void 0===P?void 0:P.need_apply_teacher_name)||(null==U||null===(T=U.need_apply_info)||void 0===T?void 0:T.need_apply_school))&&{title:"操作",align:"right",dataIndex:"is_cancel_score",width:100,fixed:"right",render:function(e,n){var t;return(0,Tn.eB)()||null!=U&&null!==(t=U.permission)&&void 0!==t&&t.editable?(0,he.jsx)("span",{children:0===e||!1===e?(0,he.jsx)("span",{style:{color:"#165DFF",cursor:"pointer"},onClick:function(){var e;x.Z.confirm({icon:null,centered:!0,title:"取消成绩",content:"请确认是否取消该成员成绩,取消后该成员的成绩将视为无成绩,不进行排名。",onOk:(e=r()(o()().mark((function e(){var t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ae.ZP)("/api/competitions/".concat(G,"/set_score_status.json"),{method:"put",body:{competition_score_id:null==n?void 0:n.competition_score_id,competition_team_id:null==n?void 0:n.competition_team_id,is_cancel_score:1}});case 2:0===(null==(t=e.sent)?void 0:t.status)&&(v.ZP.info("取消成功"),we.page=1,Ze(l()({},we)),Ee());case 4:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})},children:"取消成绩"}):(0,he.jsx)("span",{onClick:r()(o()().mark((function e(){var t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ae.ZP)("/api/competitions/".concat(G,"/set_score_status.json"),{method:"put",body:{competition_score_id:null==n?void 0:n.competition_score_id,competition_team_id:null==n?void 0:n.competition_team_id,is_cancel_score:0}});case 2:0===(null==(t=e.sent)?void 0:t.status)&&(v.ZP.info("恢复成功"),we.page=1,Ze(l()({},we)),Ee());case 4:case"end":return e.stop()}}),e)}))),style:{color:"#FD9200",cursor:"pointer"},children:"恢复成绩"})}):(0,he.jsx)("span",{style:{color:"#165DFF",cursor:"pointer"},onClick:function(){"ended"!=(null==U?void 0:U.competition_status)?(re.setFieldsValue(l()(l()({},n),null==n?void 0:n.apply_info)),te(!0)):v.ZP.warning("竞赛已结束,无法编辑相关信息")},children:"编辑"})}}])||void 0===g?void 0:g.filter((function(e){return e}));return(0,he.jsxs)("section",{className:hi.bg,children:[(0,he.jsx)("div",{className:hi.title,style:{display:"flex"},children:(0,he.jsxs)(le.Z,{style:{width:"100%"},children:[(0,he.jsx)("span",{children:"参赛人员"}),((0,Tn.eB)()||(null==U||null===(L=U.permission)||void 0===L?void 0:L.editable))&&(0,he.jsx)(ie.Z,{checked:ge,style:{marginLeft:10,alignItems:"center"},onChange:function(){var e=r()(o()().mark((function e(n){var t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return ye(n.target.checked),e.next=3,(0,Ae.ZP)("/api/competitions/".concat(G,"/hidden_score.json"),{method:"POST",body:{hidden_score:n.target.checked}});case 3:0===(null==(t=e.sent)?void 0:t.status)&&Ee();case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:(0,he.jsx)("span",{style:{color:"#828693",marginLeft:"-3px"},children:"隐藏成绩"})})]})}),(0,he.jsxs)("div",{style:{padding:"20px",width:"100%"},children:[((0,Tn.eB)()||(null==U||null===(D=U.permission)||void 0===D?void 0:D.editable))&&(0,he.jsxs)(le.Z,{wrap:!1,align:"middle",justify:"space-between",children:[(0,he.jsx)(se.Z,{children:(0,he.jsx)(N.t7,{style:{width:327,marginRight:15},dataSource:xi,value:{id:we.type,value:we.keyword},onChange:function(e,n){we.keyword=e,we.type=n||"",Ze(l()({},we)),Ee()},placeholder:"请输入搜索内容"})}),(0,he.jsx)(se.Z,{children:(0,he.jsx)("span",{className:hi.button,onClick:function(){(0,me.FH)("",(0,me.NY)({url:ue.Z.API_SERVER+"/api/competitions/".concat(G,"/all_team_members.xlsx"),query:l()({},we)}))},children:"导出"})})]}),(0,he.jsx)(oe.Z,{loading:_e,style:{marginTop:20},columns:Ve,bordered:!1,dataSource:null==K?void 0:K.data,pagination:!1,scroll:((0,Tn.eB)()||(null==U||null===(E=U.permission)||void 0===E?void 0:E.editable))&&(null==U?void 0:U.can_write_teacher_info)&&{x:1160}}),(0,he.jsx)("div",{style:{marginTop:20},children:(0,he.jsx)(fn.Z,{showQuickJumper:!0,hideOnSinglePage:!0,showSizeChanger:!0,pageSizeOptions:["10","15","50","100","200"],total:null==K?void 0:K.count,onChange:function(e,n){we.page=e,we.per_page=n,Ze(l()({},we)),Ee()},pageSize:we.per_page,current:we.page})})]}),(0,he.jsx)(x.Z,{width:650,title:"编辑报名信息",open:ne,centered:!0,onCancel:function(){te(!1)},onOk:function(){re.submit()},confirmLoading:_e,children:(0,he.jsxs)(f.Z,{form:re,colon:!1,size:"large",labelCol:{span:5},onFinish:function(){var e=r()(o()().mark((function e(n){var t,i;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=null===(t=Ie.find((function(e){return e.name===(null==n?void 0:n.school)})))||void 0===t?void 0:t.id,e.next=3,(0,ce.bu)(l()(l()({},n),{},{identifier:G,school_id:i}));case 3:0===e.sent.status&&(v.ZP.success("修改成功"),te(!1),Ee());case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:[(0,he.jsx)(f.Z.Item,{hidden:!0,name:"competition_team_id"}),(null==U||null===(R=U.need_apply_info)||void 0===R?void 0:R.need_apply_name)&&(0,he.jsx)(f.Z.Item,{label:"参赛人员姓名",name:"real_name",className:hi.jsinput,rules:[{required:!0,message:"请输入参赛人员姓名"},{whitespace:!0,message:"姓名不能为空"}],children:(0,he.jsx)(j.Z,{className:hi.baseFormItem,placeholder:"请输入参赛人员姓名",showCount:!0,maxLength:60})}),(null==U||null===(M=U.need_apply_info)||void 0===M?void 0:M.need_apply_sex)&&(0,he.jsx)(f.Z.Item,{label:"性别",name:"sex",className:hi.jsinput,rules:[{required:!0,message:"请选择参赛人员性别"}],children:(0,he.jsxs)(b.ZP.Group,{children:[(0,he.jsx)(b.ZP,{value:0,children:"男"}),(0,he.jsx)(b.ZP,{value:1,children:"女"})]})}),(null==U||null===(V=U.need_apply_info)||void 0===V?void 0:V.need_apply_student_id)&&(0,he.jsx)(f.Z.Item,{label:"学号",name:"student_id",className:hi.jsinput,rules:[{required:!0,message:"请输入参赛人员学号"},{whitespace:!0,message:"学号不能为空"}],children:(0,he.jsx)(j.Z,{className:hi.baseFormItem,placeholder:"请输入参赛人员学号",showCount:!0,maxLength:60})}),(null==U||null===(B=U.need_apply_info)||void 0===B?void 0:B.need_apply_phone)&&(0,he.jsx)(f.Z.Item,{label:"电话",name:"phone",className:hi.jsinput,rules:[{required:!0,message:"请输入参赛人员电话"},{whitespace:!0,message:"电话不能为空"}],children:(0,he.jsx)(j.Z,{className:hi.baseFormItem,placeholder:"请输入参赛人员电话",showCount:!0,maxLength:60})}),(null==U||null===(z=U.need_apply_info)||void 0===z?void 0:z.need_apply_grade)&&(0,he.jsx)(f.Z.Item,{label:"年级",name:"grade",className:hi.jsinput,rules:[{required:!0,message:"请选择参赛人员年级"}],children:(0,he.jsx)(_.default,{placeholder:"请选择参赛人员年级",size:"large",children:(Me=(new Date).getFullYear(),Array(31).fill({}).map((function(e,n){return(0,he.jsx)(fi,{value:Me-n,children:(0,he.jsx)("span",{children:Me-n})},n)})))})}),(null==U||null===(O=U.need_apply_info)||void 0===O?void 0:O.need_apply_teacher_name)&&(0,he.jsx)(f.Z.Item,{label:"指导老师姓名",name:"teacher_name",className:hi.jsinput,rules:[{required:!0,message:"请输入指导老师姓名"},{whitespace:!0,message:"指导老师姓名不能为空"}],children:(0,he.jsx)(j.Z,{className:hi.baseFormItem,placeholder:"请输入指导老师姓名",showCount:!0,maxLength:60})}),(null==U||null===(Y=U.need_apply_info)||void 0===Y?void 0:Y.need_apply_school)&&(0,he.jsx)(f.Z.Item,{label:"学校/单位",name:"school",className:hi.jsinput,rules:[{required:!0,message:"请选择学校/单位"}],children:(0,he.jsx)(w.Z,{size:"large",showSearch:!0,onChange:Ce,children:Te.map((function(e,n){return(0,he.jsx)(fi,{value:e.name,children:e.name},n)}))})})]})})]})})),yi="bg___UYFEh",ji="Title___n7fIZ",bi="SrollStage___GnCkk",wi=t(70516),Zi=["competitions","globalSetting","loading","dispatch","user"],ki=(0,h.connect)((function(e){var n=e.competitions,t=e.loading,i=e.globalSetting,l=e.user;return{competitions:n,globalSetting:i,loading:t.effects,user:l}}))((function(e){var n,i,s,a,c=e.competitions,u=(e.globalSetting,e.loading),_=e.dispatch,f=(e.user,p()(e,Zi),c.is_manager,c.MemberWorks),v=c.competitionStage,g=c.Header,j=(0,h.useParams)().identifier,b=(0,m.useState)({page:1,per_page:20,competition_id:j,keyword:null}),w=d()(b,2),k=w[0],I=w[1],A=[{title:"选手名称",dataIndex:"user_name",ellipsis:!0,render:function(e){return e||"--"}},!(null!=g&&g.is_personal)&&{title:"战队名称",dataIndex:"team_name",ellipsis:!0,render:function(e){return(0,he.jsx)(y.Z,{placement:"topLeft",title:e,children:e||"--"})}},{title:"成绩",dataIndex:"evaluation_score",render:function(e){return e||"--"}},{title:"描述",width:222,dataIndex:"comment",render:function(e){return(0,he.jsx)(y.Z,{title:e,children:(0,he.jsx)("span",{children:e||"- -"})})}},{title:"提交时间",width:150,dataIndex:"commit_at",render:function(e){return e?re()(e).format("YYYY.MM.DD HH:mm:ss"):"--"}},{title:"提交状态",width:100,dataIndex:"evaluation_status",render:function(e){return"waiting"==e?(0,he.jsx)("span",{style:{color:"#00B187 "},children:"排队中"}):"progress"==e?(0,he.jsx)("span",{style:{color:"00B187"},children:"评测中"}):"cancelled"==e?(0,he.jsx)("span",{style:{color:"#E53333"},children:"已取消"}):"completed"==e?(0,he.jsx)("span",{style:{color:"#165DFF"},children:"已完成"}):"error"==e?(0,he.jsx)("span",{style:{color:"#ff4d4f"},children:"提交失败"}):"--"}},{title:"评测文件",dataIndex:"commit_id",ellipsis:!0,render:function(e,n){var t,i,l,s,o,a;return(0,he.jsx)(y.Z,{placement:"topLeft",title:null==n||null===(t=n.attachments)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.title,children:null!=n&&null!==(i=n.attachments)&&void 0!==i&&null!==(i=i[0])&&void 0!==i&&i.is_oss?(0,he.jsx)("a",{onClick:function(){var e;(0,me.Nd)("","".concat(null==n||null===(e=n.attachments)||void 0===e||null===(e=e[0])||void 0===e?void 0:e.url.replace("disposition=inline","")))},children:(null==n||null===(l=n.attachments)||void 0===l||null===(l=l[0])||void 0===l?void 0:l.title)||"--"}):(0,he.jsx)("a",{href:ue.Z.API_SERVER+(null==n||null===(s=n.attachments)||void 0===s||null===(s=s[0])||void 0===s?void 0:s.url),download:null==n||null===(o=n.attachments)||void 0===o||null===(o=o[0])||void 0===o?void 0:o.title,children:(null==n||null===(a=n.attachments)||void 0===a||null===(a=a[0])||void 0===a?void 0:a.title)||"--"})})}},{title:"操作",align:"right",width:200,dataIndex:"commit_id",render:function(e,n){return(0,he.jsxs)(he.Fragment,{children:[(0,he.jsx)(Z.ZP,{type:"link",disabled:"completed"!=(null==n?void 0:n.evaluation_status),style:{padding:0},onClick:function(){var e=x.Z.confirm({centered:!0,okText:"确定",icon:null,cancelText:"取消",title:"运行结果",content:(0,he.jsx)("div",{style:{maxHeight:500,overflow:"auto"},children:null==n?void 0:n.evaluation_info}),onOk:function(){return e.destroy()},onCancel:function(){return e.destroy()}})},children:"运行信息"}),(0,he.jsx)(Z.ZP,{className:"ml20",disabled:"progress"==(null==n?void 0:n.evaluation_status),type:"link",style:{padding:0},onClick:r()(o()().mark((function e(){var t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return _({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"正在重测,请稍后..."}}),e.next=3,(0,Ae.ZP)("/api/competitions/".concat(j,"/competition_commit_records/").concat(n.id,"/retest.json"),{method:"post",body:l()(l()({},k),{},{record_id:n.id})});case 3:t=e.sent,_({type:"globalSetting/setGlobalLoading",payload:{show:!1,text:""}}),0==t.status&&S();case 6:case"end":return e.stop()}}),e)}))),children:"重测"}),(0,he.jsx)(Z.ZP,{className:"ml20",type:"link",disabled:"waiting"!=(null==n?void 0:n.evaluation_status),style:{padding:0},danger:!0,onClick:function(){var e,t=x.Z.confirm({centered:!0,okText:"确定",icon:null,cancelText:"取消",title:"",content:(0,he.jsx)(he.Fragment,{children:"取消后,该成员提交的作品将不进行评测排队,请确认是否取消。"}),onOk:(e=r()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ae.ZP)("/api/competitions/".concat(j,"/competition_commit_records/").concat(n.id,"/cancel.json"),{method:"post",body:l()(l()({},k),{},{record_id:n.id})});case 2:0==e.sent.status&&S();case 4:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)}),onCancel:function(){return t.destroy()}})},children:"取消"})]})}}].filter((function(e){return!!e})),S=function(){var e=r()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:_({type:"competitions/getMemberWorks",payload:l()({identifier:j},k)});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,m.useEffect)((function(){I(l()(l()({},k),{},{section_id:null==v?void 0:v.id}))}),[]),(0,m.useEffect)((function(){S()}),[k]),(0,he.jsxs)("section",{className:yi,children:[(0,he.jsx)(le.Z,{align:"middle",className:ji,children:(0,he.jsx)(se.Z,{children:"选手作品"})}),(0,he.jsxs)(le.Z,{style:{margin:20},align:"middle",justify:"space-between",children:[(0,he.jsx)(le.Z,{className:bi,style:{flex:1,whiteSpace:"nowrap",flexWrap:"nowrap",overflowX:"auto"}}),(0,he.jsxs)(le.Z,{className:"ml20",align:"middle",children:[(0,he.jsx)(N.t7,{style:{width:260},placeholder:null!=g&&g.is_personal?"请输入选手名称":"请输入队伍名称",value:k.keyword,onChange:function(e){return I(l()(l()({},k),{},{keyword:e,page:1}))}}),(0,he.jsx)(N.op,{openLoading:!0,type:"default",size:"large",className:"ml20",onClick:r()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,wi.KM)(l()({identifier:j},k));case 2:case"end":return e.stop()}}),e)}))),children:"导出"}),(0,he.jsx)(N.op,{size:"large",type:"default",className:"ml20",onClick:function(){return S()},children:"更新"})]})]}),(0,he.jsxs)(hn.Z,{spinning:u["competitions/getMemberWorks"],children:[(0,he.jsx)(oe.Z,{className:"ml20 mr20",locale:{emptyText:(0,he.jsx)(xn.Z,{imgUrl:t(93314)})},pagination:!1,dataSource:(null==f||null===(n=f.data)||void 0===n?void 0:n.records)||[],columns:A}),(null==f||null===(i=f.data)||void 0===i?void 0:i.count)>0&&(0,he.jsxs)(le.Z,{className:"ml20 mr20 mt20 mb30",align:"middle",justify:"space-between",children:[(0,he.jsxs)(se.Z,{className:"font14",style:{color:"#333"},children:["共",(0,he.jsx)("span",{style:{color:"#165DFF"},children:(null==f||null===(s=f.data)||void 0===s?void 0:s.count)||0}),"条数据"]}),(0,he.jsx)(se.Z,{children:(0,he.jsx)(fn.Z,{showQuickJumper:!0,current:k.page,pageSize:k.per_page,onChange:function(e){return I(l()(l()({},k),{},{page:e}))},onShowSizeChange:function(e,n){return I(l()(l()({},k),{},{page:1,per_page:n}))},total:(null==f||null===(a=f.data)||void 0===a?void 0:a.count)||0})})]})]})]})})),Ni=t(64980),Ii=t(63490),Ai="bg___tjnCL",Si="title___kqIVC",Ci=t(19860),Fi=t(51932),Pi=t(45132),Ti=t(52560),Li={flex_box_center:"flex_box_center___PytGn",flex_space_between:"flex_space_between___lsol9",flex_box_vertical_center:"flex_box_vertical_center___fZ7Lr",flex_box_center_end:"flex_box_center_end___eItTF",flex_box_column:"flex_box_column____TIyk",title:"title___lY3pZ",export:"export___FJnGB",tabs:"tabs___lND2P",btn:"btn___TPnQ5",sticky:"sticky___JTo3M",publishRuleContent:"publishRuleContent___BCpFe",groupSelector:"groupSelector___xVPXf",addAndDelete:"addAndDelete___alHeZ",deleteIcon:"deleteIcon___PxYRF",addIcon:"addIcon___wwP2i"},Di=t(78091),Ei=t(57703),Ri=(0,h.connect)((function(e){var n=e.shixunHomeworks,t=e.classroomList,i=e.loading,l=e.user,s=e.boards;return{shixunHomeworks:n,globalSetting:e.globalSetting,classroomList:t,user:l,boards:s,loading:i.effects}}))((function(e){e.shixunHomeworks;var n,t,i,s,a=e.classroomList,c=(e.globalSetting,e.boards),u=(e.loading,e.user),p=e.Header,x=e.is_hidden,g=(e.isClick,e.dispatch),y=((0,h.useParams)(),(0,h.useLocation)(),f.Z.useForm()),w=d()(y,1)[0],k=(0,m.useState)({content:""}),N=d()(k,2),I=N[0],A=N[1],S=(0,m.useState)([{}]),C=d()(S,2),F=C[0],P=C[1],T=(u.userInfo,a.detailLeftMenus,a.detailCourseGroupsList),L=c.boardsDetail,D=c.boardsCategoryList,E=(0,m.useState)([]),R=d()(E,2),M=R[0],V=R[1],B=(0,m.useState)({unified_setting:!0,view_message_setting:D.allow_view_message?"0":"1"}),z=d()(B,2),O=z[0],Y=z[1];return(0,m.useEffect)((function(){g({type:"boards/getBoardsCategoryList",payload:{board_id:null==p?void 0:p.board_id}}).then((function(e){O.view_message_setting=null!=e&&e.allow_view_message?"0":"1"})),g({type:"classroomList/getCourseGroupsList",payload:{page:1,id:null==p?void 0:p.course_identifier,limit:1e3,nonenavigate:!0}})}),[null==p?void 0:p.board_id]),(0,m.useEffect)((function(){w.setFieldsValue({select_board_id:parseInt(null==p?void 0:p.board_id)})}),[a.detailLeftMenus]),(0,m.useEffect)((function(){null!=p&&p.message_id&&g({type:"boards/getBoardsDetail",payload:{boardId:null==p?void 0:p.message_id}}).then((function(e){var n;V(e),w.setFieldsValue({select_board_id:[null==e?void 0:e.board_id],subject:null==e?void 0:e.subject,attachment_ids:(0,Ci.z)(e.attachments),content:null==e?void 0:e.content,sticky:!(null==e||!e.sticky),publish_time:null!=e&&e.publish_time?re()(null==e?void 0:e.publish_time):null}),A({subject:null==e?void 0:e.subject,content:null==e?void 0:e.content}),e.unified_setting=e.unified_setting,e.view_message_setting=e.view_message_setting,Y(l()({},e)),F=(null==e||null===(n=e.group_settings)||void 0===n?void 0:n.map((function(e){return{group_id:e.group_id,publish_time:e.publish_time}})))||[{}],P(F.length>0?F:[{}])}))}),[null==p?void 0:p.message_id]),(0,m.useEffect)((function(){var e;null==T||null===(e=T.course_groups)||void 0===e||e.map((function(e){var n;null==M||null===(n=M.group_settings)||void 0===n||n.map((function(n,t){(null==n?void 0:n.group_id)===(null==e?void 0:e.id)&&(e.cilckkey=t,e.isselect=!0)}))}))}),[M]),(0,he.jsx)("section",{className:Li.bg,children:(0,he.jsx)("div",{children:(0,he.jsxs)(f.Z,{layout:"vertical",form:w,initialValues:{name:"",sticky:!1},scrollToFirstError:!0,onValuesChange:function(e){A(l()({},e))},onFinish:function(){var e=r()(o()().mark((function e(n){var t,i,s,a;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.attachment_ids=null===(t=n.attachment_ids)||void 0===t?void 0:t.map((function(e){return e.response.id})),n.view_message_setting=O.view_message_setting,n.is_hidden=x,n.competition_id=null==p?void 0:p.id,!(0,Tn.eB)()){e.next=13;break}if(n.unified_setting=O.unified_setting,n.view_message_setting="1",n.group_settings=F,O.unified_setting){e.next=13;break}if(F.length){e.next=12;break}return v.ZP.warning("提交失败:分班发布设置不能为空"),e.abrupt("return");case 12:F.map((function(e){if(!e.group_id)throw v.ZP.error("分班不能为空"),new String("分班不能为空");if(!e.publish_time)throw v.ZP.error("发布时间不能为空"),new String("发布时间不能为空")}));case 13:return n=l()({},n),i=p.message_id?"/api/messages/".concat(p.message_id,".json"):"/api/boards/".concat(null==p?void 0:p.board_id,"/messages.json"),e.next=17,(0,Ae.ZP)(i,{method:p.message_id?"put":"post",body:n});case 17:0===(s=e.sent).status&&((0,me.L9)(["教学课堂","讨论","发帖"]),v.ZP.success(p.message_id?"修改成功":"发布成功"),p.message_id||(g({type:"competitions/getHeader",payload:{identifier:null==p?void 0:p.identifier}}),(0,me.xg)("/classrooms/".concat(null==p?void 0:p.course_identifier,"/board/").concat(null==p?void 0:p.board_id,"/Detail/").concat(null==s||null===(a=s.data)||void 0===a?void 0:a.id))));case 19:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:[(0,he.jsxs)("aside",{className:"mt30 relative bg-white pl30 pr30 pt30 w100 inline-block",children:[(0,he.jsx)(f.Z.Item,{label:"",name:"sticky",valuePropName:"checked",className:Li.sticky,children:(0,he.jsx)(ie.Z,{children:"置顶"})}),(0,he.jsx)(f.Z.Item,{label:"标题",name:"subject",rules:[{required:!0,message:"请输入标题"}],children:(0,he.jsx)(j.Z,{suffix:"".concat((null===(n=I.subject)||void 0===n?void 0:n.length)||0,"/60"),maxLength:60})}),(0,he.jsx)(f.Z.Item,{label:"目录",name:"select_board_id",rules:[{required:!0,message:"请选择目录"}],children:(0,he.jsx)(_.default,{children:null==D||null===(t=D.boards)||void 0===t?void 0:t.map((function(e){return(0,he.jsx)(_.default.Option,{value:null==e?void 0:e.id,children:null==e?void 0:e.name})}))})}),(0,he.jsx)(f.Z.Item,{label:"内容",style:{position:"relative",zIndex:0},name:"content",rules:[{required:!0,message:"请输入内容"}],children:(0,he.jsx)(Dt.Z,{watch:!0,defaultValue:L.content||"",placeholder:"请在此输入帖子详情,最大限制为10000个字符"})}),(0,he.jsx)(f.Z.Item,{name:"attachment_ids",children:(0,he.jsx)(Ci.Z,{})}),(0,he.jsxs)("div",{children:[(0,he.jsxs)(b.ZP.Group,{onChange:function(){O.unified_setting=!O.unified_setting,Y(Object.assign({},O))},value:O.unified_setting,children:[(0,he.jsx)(b.ZP,{value:!0,children:"统一发布"}),(null==T||null===(i=T.course_groups)||void 0===i?void 0:i.length)>0&&(0,he.jsx)(b.ZP,{value:!1,children:"分班发布"})]}),(null==O?void 0:O.unified_setting)&&(0,he.jsx)(f.Z.Item,{style:{marginTop:16},rules:[{required:!0,message:"请选择发布时间"}],label:"发布时间",name:"publish_time",children:(0,he.jsx)(te.default,{showTime:{format:"HH:mm"},disabledDate:function(e){return e&&e0&&void 0!==arguments[0]?arguments[0]:s,i=arguments.length>1?arguments[1]:void 0,l=arguments.length>2?arguments[2]:void 0;return(null==t||null===(e=t[l])||void 0===e||null===(e=e.competition_time)||void 0===e?void 0:e.diff((null==t||null===(n=t[i])||void 0===n?void 0:n.competition_time)||0))||0},u=c(s,0,s.length-1),h=s.map((function(e,n){var t=c(s,n,n+1)/u*100,i=20;return n>(null==s?void 0:s.length)-4&&(i=32),l()(l()({},e),{},{isChu:t>i,DistanceValue:n===(null==s?void 0:s.length)-1?0:Math.round(t(null==t?void 0:t.competition_time)&&x>(null==h||null===(l=h[i+1])||void 0===l?void 0:l.competition_time)&&(e+=(null==t?void 0:t.DistanceValue)/n*100),i!==h.length-1&&x>(null==t?void 0:t.competition_time)&&x<(null==h||null===(o=h[i+1])||void 0===o?void 0:o.competition_time)&&(e+=(null==x?void 0:x.diff(null==t?void 0:t.competition_time))/c(s,i,i+1)*(null==t?void 0:t.DistanceValue)/n*100)})),x>h[h.length-1].competition_time?100:e},j=function(e,n){var t=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return(0,he.jsx)("div",{className:"".concat(qi," ").concat(n===h.length-1?Gi:Qi),style:{width:b(e,n,t)},children:(0,he.jsxs)(le.Z,{wrap:!1,align:"middle",gutter:5,justify:n===h.length-1?"end":"start",children:[(0,he.jsx)(se.Z,{children:(0,he.jsxs)(le.Z,{wrap:!1,align:"middle",children:[(0,he.jsx)(se.Z,{children:(0,he.jsx)("span",{className:"".concat(Ui," ").concat(t?Wi:""),children:n+1})}),(0,he.jsx)(se.Z,{children:(0,he.jsx)("div",{className:Ji})})]})}),(0,he.jsxs)(se.Z,{children:[(0,he.jsx)(y.Z,{title:null==e?void 0:e.name,placement:"topLeft",children:(0,he.jsx)("div",{className:"".concat(Ki," ").concat(t?Xi:""," multi_ellipsis1"),children:null==e?void 0:e.name})}),(0,he.jsx)(y.Z,{placement:"topLeft",title:null!=e&&e.competition_time?re()(null==e?void 0:e.competition_time).format((null==e?void 0:e.format)||"YYYY年MM月DD日 HH:mm"):"",children:(0,he.jsx)("div",{className:"".concat($i," ").concat(t?el:""," multi_ellipsis1"),children:null!=e&&e.competition_time?re()(null==e?void 0:e.competition_time).format((null==e?void 0:e.format)||"YYYY年MM月DD日 HH:mm"):""})})]})]})})},b=function(e,n){var t,i=h.reduce((function(e,n){return e+n.DistanceValue}),0),l=(null==e?void 0:e.DistanceValue)/i*r,s=(null==h||null===(t=h[n+1])||void 0===t?void 0:t.DistanceValue)/i*r,o=Math.round(l+s)-12;return n===h.length-1?Math.round(((null==h?void 0:h[n-1].DistanceValue)+(null==h?void 0:h[n-2].DistanceValue))/i*r/2-12):n===h.length-2?l-12:n===h.length-3?Math.round(((null==h?void 0:h[n].DistanceValue)+(null==h?void 0:h[n+1].DistanceValue))/i*r/2-12):o};return(0,m.useEffect)((function(){var e=setInterval((function(){v(re()())}),6e4);return function(){clearInterval(e)}}),[]),(0,he.jsxs)("div",l()(l()({ref:a,className:ll()(Bi,t)},o),{},{children:[(0,he.jsx)("div",{className:zi,children:(0,he.jsx)("div",{className:Oi,style:{width:g()>=100?"100%":"".concat(g(),"%")}})}),h.map((function(e,n){var t=x<(null==e?void 0:e.competition_time);return(0,he.jsxs)("div",{className:"".concat(Hi),style:{width:n===(null==h?void 0:h.length)-1?"auto":(null==e?void 0:e.DistanceValue)+(null==e?void 0:e.StyleUnit)},children:[(0,he.jsx)("div",{style:{height:45,position:"relative",width:"100%"},children:(n+1)%2!=0&&j(e,n,!t)}),(0,he.jsx)("div",{className:"".concat(nl," ").concat(t?"":tl)}),(0,he.jsx)("div",{style:{height:45,position:"relative",width:"100%"},children:(n+1)%2==0&&j(e,n,!t)})]})})),(0,he.jsx)("div",{className:zi,style:{zIndex:1,backgroundColor:"transparent"},children:(0,he.jsx)(y.Z,{title:x.format("当前时间:YYYY年MM月DD日 HH:mm"),children:(0,he.jsx)("div",{className:Yi,style:{left:g()>=100?"calc(100% - 12px)":"".concat(g(),"%")}})})})]}))},al=["competitions","globalSetting","loading","dispatch","user"],rl=_.default.Option,cl=(0,h.connect)((function(e){var n=e.competitions,t=e.loading,i=e.globalSetting,l=e.user;return{competitions:n,globalSetting:i,loading:t.models.competitions,user:l}}))((function(e){var n,t,i,s,a,c,u,I,A,S,C,F,P,T,L,D,E,R,M,V,B,z,O,Y,H,q,Q,G,U,W,J,K,X,$,ee,ne,te,ie,le,se,oe,ae,ue,pe,me,_e,fe,xe,ve,ge,ye,je,be,we,Ze,ke,Ne,Ie,Se,Ce,Fe,Pe,Te,Le,De,Ee,Re,Me=e.competitions,Ve=(e.globalSetting,e.loading),Be=e.dispatch,ze=e.user,Oe=(p()(e,al),(0,m.useState)({tabsIndex:"1"})),Ye=d()(Oe,2),He=Ye[0],qe=Ye[1],Qe=(0,h.useParams)(),Ge=Qe.identifier,Ue=(Qe.enter,Me.Header),We=Me.Staff,Je=Me.GuidesData,Ke=(0,m.useState)(!1),Xe=d()(Ke,2),$e=Xe[0],en=Xe[1],nn=(0,h.useSearchParams)(),tn=d()(nn,1)[0],ln=(0,m.useState)(!1),sn=d()(ln,2),on=sn[0],an=sn[1],rn=(0,m.useState)(!1),cn=d()(rn,2),dn=cn[0],un=cn[1],pn=(0,m.useState)(!1),mn=d()(pn,2),hn=mn[0],_n=mn[1],fn=f.Z.useForm(),xn=d()(fn,1)[0],vn=f.Z.useForm(),gn=d()(vn,1)[0],yn=(0,m.useState)(!1),jn=d()(yn,2),bn=jn[0],wn=jn[1],Zn=(0,m.useState)(!1),kn=d()(Zn,2),Nn=kn[0],In=kn[1],An=(0,m.useState)(),Sn=d()(An,2),Cn=Sn[0],Pn=Sn[1],Ln=(0,m.useState)(!1),Dn=d()(Ln,2),En=Dn[0],Rn=Dn[1],Mn=(0,m.useState)(!1),Vn=d()(Mn,2),Bn=Vn[0],zn=Vn[1],On=(0,m.useState)(!1),Yn=d()(On,2),Hn=Yn[0],qn=Yn[1],Qn=(0,m.useState)([]),Gn=d()(Qn,2),Un=Gn[0],Wn=Gn[1],Jn=(0,m.useState)([]),Kn=d()(Jn,2),Xn=Kn[0],$n=Kn[1],et=(0,m.useState)(!1),nt=d()(et,2),tt=nt[0],it=nt[1],lt=(0,m.useRef)((0,oi.throttle)((function(e){return dt(e)}),1200,{leading:!0,trailing:!0})).current,st=(0,m.useState)([]),ot=d()(st,2),at=ot[0],rt=ot[1],ct=function(){var e=(new Date).getFullYear();return Array(31).fill({}).map((function(n,t){return(0,he.jsx)(rl,{value:e-t,children:(0,he.jsx)("span",{children:e-t})},t)}))};(0,m.useEffect)((function(){var e;dt(null==ze||null===(e=ze.userInfo)||void 0===e?void 0:e.school_name)}),[(null==Ue||null===(n=Ue.need_apply_info)||void 0===n?void 0:n.need_apply_name)||(null==Ue||null===(t=Ue.need_apply_info)||void 0===t?void 0:t.need_apply_student_id)||(null==Ue||null===(i=Ue.need_apply_info)||void 0===i?void 0:i.need_apply_sex)||(null==Ue||null===(s=Ue.need_apply_info)||void 0===s?void 0:s.need_apply_phone)||(null==Ue||null===(a=Ue.need_apply_info)||void 0===a?void 0:a.need_apply_grade)||(null==Ue||null===(c=Ue.need_apply_info)||void 0===c?void 0:c.need_apply_teacher_name)||(null==Ue||null===(u=Ue.need_apply_info)||void 0===u?void 0:u.need_apply_school)]);var dt=function(){var e=r()(o()().mark((function e(n){var t,i;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Be({type:"account/getSchoolOption",payload:{keyword:n,limit:10}});case 2:t=e.sent,$n(null==t?void 0:t.schools),n&&""!=n&&rt(null==t||null===(i=t.schools)||void 0===i?void 0:i.filter((function(e){return e.name.includes(n)})));case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();(0,m.useEffect)((function(){if("4"===tn.get("type")){var e,n;if(!((0,Tn.eB)()||null!=Ue&&null!==(e=Ue.permission)&&void 0!==e&&e.editable))15===(null==ze||null===(n=ze.userInfo)||void 0===n?void 0:n.role)&&h.history.push("/competitions/detail/".concat(Ge,"?type=1"));qe({tabsIndex:"4"}),en(!0)}else if(tn.get("type")){var t,i,l;if("3"===tn.get("type"))null!=Ue&&Ue.personal&&((0,Tn.eB)()||null!=Ue&&null!==(t=Ue.permission)&&void 0!==t&&t.editable||null!=Ue&&Ue.team_member_present)||null==Ue||!Ue.personal||h.history.push("/competitions/detail/".concat(Ge,"?type=1"));if("5"===tn.get("type"))null!=Ue&&null!==(i=Ue.permission)&&void 0!==i&&i.editable&&3===(null==Ue?void 0:Ue.mode)||h.history.push("/competitions/detail/".concat(Ge,"?type=1"));if("6"===tn.get("type"))(0,Tn.eB)()||null!=Ue&&null!==(l=Ue.permission)&&void 0!==l&&l.editable||h.history.push(null==Ue||!Ue.memo_id||null!=Ue&&Ue.is_hidden?"/competitions/detail/".concat(Ge,"?type=1"):"/forums/".concat(null==Ue?void 0:Ue.memo_id));qe({tabsIndex:tn.get("type")})}else qe({tabsIndex:"1"});Ue.identifier&&(!tn.get("identifier")||null!=Ue&&Ue.team_member_present||null!=We&&We.enroll_ended||ft(1),!tn.get("code")||null!=Ue&&Ue.team_member_present||null!=We&&We.enroll_ended||function(){_t.apply(this,arguments)}(),Be({type:"globalSetting/setShareData",payload:{title:null==Ue?void 0:Ue.name,desc:null==Ue?void 0:Ue.description,imgUrl:"".concat(null==Ue?void 0:Ue.image,"?x-oss-process=image/resize,h_200,w_200,m_pad")}}))}),[tn.get("type"),Ue]);var ut=[{id:"1",name:"概览",content:(0,he.jsx)(Yt,{})},{id:"2",name:"排行榜",content:(0,he.jsx)(Wt,{})},(null==Ue?void 0:Ue.personal)&&((0,Tn.eB)()||(null==Ue||null===(I=Ue.permission)||void 0===I?void 0:I.editable)||(null==Ue?void 0:Ue.team_member_present))&&{id:"3",name:"参赛人员",content:(0,he.jsx)(gi,{})},!(null!=Ue&&Ue.personal)&&{id:"3",name:"战队",content:(0,he.jsx)(mi,{})},((0,Tn.eB)()||(null==Ue||null===(A=Ue.permission)||void 0===A?void 0:A.editable)||(null==Ue?void 0:Ue.message_id)&&!(null!=Ue&&Ue.is_hidden)||(null==Ue?void 0:Ue.memo_id)&&!(null!=Ue&&Ue.is_hidden))&&{id:"6",name:"讨论",content:(0,he.jsx)(Vi,{})},((0,Tn.eB)()||(null==Ue||null===(S=Ue.permission)||void 0===S?void 0:S.editable))&&{id:"4",name:"设置",content:(0,he.jsx)(yt,{enterDocument:$e,changeKey:new Date})},(null==Ue||null===(C=Ue.permission)||void 0===C?void 0:C.editable)&&3===(null==Ue?void 0:Ue.mode)&&{id:"5",name:"选手作品",content:(0,he.jsx)(ki,{})}].filter((function(e){return!!e}));function pt(){return mt.apply(this,arguments)}function mt(){return(mt=r()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Be({type:"competitions/getStaff",payload:{identifier:Ge}}),Be({type:"competitions/getHeader",payload:{identifier:Ge}}),Be({type:"competitions/getGuides",payload:{identifier:Ge}});case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ht(){var e,n,t,i,l,s;if(null!=ze&&null!==(e=ze.userInfo)&&void 0!==e&&e.is_teacher){if((null!=We&&null!==(t=We.all_staff)&&void 0!==t&&t.mutiple_limited||null!=We&&null!==(i=We.teacher_staff)&&void 0!==i&&i.mutiple_limited)&&null!=We&&We.enrolled)return v.ZP.info("你已经报名,不能重复报名"),!0}else if((null!=We&&null!==(l=We.all_staff)&&void 0!==l&&l.mutiple_limited||null!=We&&null!==(s=We.member_staff)&&void 0!==s&&s.mutiple_limited)&&null!=We&&We.enrolled)return v.ZP.info("你已经报名,不能重复报名"),!0;if(null!=We&&We.enroll_ended)return v.ZP.info("报名已截止,无需报名"),!0;if(null!=We&&We.all_staff)return!1;if(null!=ze&&null!==(n=ze.userInfo)&&void 0!==n&&n.is_teacher){if(!We.teacher_staff)return v.ZP.info("已禁止老师报名"),!0}else if(null==We||!We.member_staff)return v.ZP.info("已禁止学生报名"),!0}(0,m.useEffect)((function(){window.location.href.split("enter=").length>1&&qe({tabsIndex:"4"})}),[]),(0,m.useEffect)((function(){var e;16===(null==ze||null===(e=ze.userInfo)||void 0===e?void 0:e.role)&&Be({type:"user/showPopLogin",payload:{showPopLogin:!0,showClosable:!1}})}),[null==ze?void 0:ze.userInfo]),(0,m.useEffect)((function(){if("1"===Me.actionTabs.key)qe({tabsIndex:"4"});else if("2"===Me.actionTabs.key){var e;if(Ue.teacher_need_phone||Ue.member_need_phone)return void wn(!0);if(!(0,Fn.tJ)(Be))return;if(null!=Ue&&Ue.need_check_mail)return void x.Z.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",icon:null,content:"您暂未绑定邮箱,为了后续竞赛奖项颁发等相关事宜的正常且准确进行,请完成绑定再参加报名。",onOk:function(){window.open("/account/secure")}});if(null!=Ue&&Ue.is_authentication&&(null==ze||null===(e=ze.userInfo)||void 0===e||!e.authentication))return void Be({type:"shixunsDetail/setActionTabs",payload:{key:"Banner-Auth"}});an(!0)}else if("3"===Me.actionTabs.key){var n;if(null!=Ue&&Ue.need_check_mail)return void x.Z.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",icon:null,content:"您暂未绑定邮箱,为了后续竞赛奖项颁发等相关事宜的正常且准确进行,请完成绑定再参加报名。",onOk:function(){window.open("/account/secure")}});if(Ue.teacher_need_phone||Ue.member_need_phone)return void wn(!0);if(!(0,Fn.tJ)(Be))return;if(null!=Ue&&Ue.is_authentication&&(null==ze||null===(n=ze.userInfo)||void 0===n||!n.authentication))return void Be({type:"shixunsDetail/setActionTabs",payload:{key:"Banner-Auth"}});un(!0)}else"4"===Me.actionTabs.key?Rn(!0):"6"===Me.actionTabs.key?zn(!0):(un(!1),an(!1))}),[Me.actionTabs]),(0,m.useEffect)((function(){Ge&&pt()}),[Ge]);function _t(){return(_t=r()(o()().mark((function e(){var n,t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ae.ZP)("/api/competitions/".concat(Ge,"/check_open.json"),{method:"post"});case 2:if(0===e.sent.status){e.next=5;break}return e.abrupt("return");case 5:if((0,Fn.tJ)(Be)){e.next=7;break}return e.abrupt("return");case 7:if(!Ue.teacher_need_phone&&!Ue.member_need_phone){e.next=10;break}return wn(!0),e.abrupt("return");case 10:if(null==Ue||!Ue.need_check_mail){e.next=13;break}return x.Z.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",icon:null,content:"您暂未绑定邮箱,为了后续竞赛奖项颁发等相关事宜的正常且准确进行,请完成绑定再参加报名。",onOk:function(){window.open("/account/secure")}}),e.abrupt("return");case 13:if(null==Ue||!Ue.is_authentication||null!=ze&&null!==(n=ze.userInfo)&&void 0!==n&&n.authentication){e.next=16;break}return Be({type:"shixunsDetail/setActionTabs",payload:{key:"Banner-Auth"}}),e.abrupt("return");case 16:if(!ht()){e.next=19;break}return _n(!1),e.abrupt("return");case 19:if(!hn){e.next=21;break}return e.abrupt("return");case 21:return _n(!0),e.next=24,Be({type:"competitions/JoinTeam",payload:{identifier:Ge,invite_code:tn.get("code")}});case 24:t=e.sent,_n(!1),t&&0===t.status&&(Pn(t),In(!0),pt(),Be({type:"competitions/setActionTabs",payload:{}}));case 27:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ft(e){return xt.apply(this,arguments)}function xt(){return xt=r()(o()().mark((function e(n){var t,i,s,a,c,d,u,p,m;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ae.ZP)("/api/competitions/".concat(Ge,"/check_open.json"),{method:"post"});case 2:if(0===e.sent.status){e.next=5;break}return e.abrupt("return");case 5:if((0,Fn.tJ)(Be)){e.next=7;break}return e.abrupt("return");case 7:if(null==Ue||!Ue.enroll_url){e.next=10;break}return window.open(null==Ue?void 0:Ue.enroll_url),e.abrupt("return");case 10:if(!(null!=Ue&&Ue.personal||1===n)){e.next=32;break}if(!Ue.teacher_need_phone&&!Ue.member_need_phone){e.next=14;break}return wn(!0),e.abrupt("return");case 14:if(null==Ue||!Ue.need_check_mail){e.next=17;break}return x.Z.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",icon:null,content:"您暂未绑定邮箱,为了后续竞赛奖项颁发等相关事宜的正常且准确进行,请完成绑定再参加报名。",onOk:function(){window.open("/account/secure")}}),e.abrupt("return");case 17:if(null==Ue||!Ue.is_authentication||null!=ze&&null!==(t=ze.userInfo)&&void 0!==t&&t.authentication){e.next=20;break}return Be({type:"shixunsDetail/setActionTabs",payload:{key:"Banner-Auth"}}),e.abrupt("return");case 20:if(!ht()){e.next=23;break}return _n(!1),e.abrupt("return");case 23:if(!hn){e.next=25;break}return e.abrupt("return");case 25:if(m=function(){var e=r()(o()().mark((function e(){var n,t,i,s,a=arguments;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=a.length>0&&void 0!==a[0]?a[0]:{},i=null===(n=Xn.find((function(e){return e.name===(null==t?void 0:t.school)})))||void 0===n?void 0:n.id,_n(!0),e.next=5,Be({type:"competitions/AddTeam",payload:l()(l()({},t),{},{identifier:Ge,name:ze.userInfo.real_name+"的战队",school_id:i})});case 5:s=e.sent,_n(!1),s&&0===s.status&&(Pn(s),In(!0),pt(),Be({type:"competitions/setActionTabs",payload:{}}));case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),!(null!=Ue&&null!==(i=Ue.need_apply_info)&&void 0!==i&&i.need_apply_name||null!=Ue&&null!==(s=Ue.need_apply_info)&&void 0!==s&&s.need_apply_student_id||null!=Ue&&null!==(a=Ue.need_apply_info)&&void 0!==a&&a.need_apply_sex||null!=Ue&&null!==(c=Ue.need_apply_info)&&void 0!==c&&c.need_apply_phone||null!=Ue&&null!==(d=Ue.need_apply_info)&&void 0!==d&&d.need_apply_grade||null!=Ue&&null!==(u=Ue.need_apply_info)&&void 0!==u&&u.need_apply_teacher_name||null!=Ue&&null!==(p=Ue.need_apply_info)&&void 0!==p&&p.need_apply_school)){e.next=29;break}return it(!0),e.abrupt("return");case 29:m(),e.next=33;break;case 32:Rn(!0);case 33:case"end":return e.stop()}}),e)}))),xt.apply(this,arguments)}return(0,he.jsxs)("section",{className:k.bg,children:[(0,he.jsxs)("div",{className:"edu-container",children:[(0,he.jsxs)("div",{className:k.top,children:[(0,he.jsxs)(g.Z,{separator:">",children:[(0,he.jsx)(g.Z.Item,{children:(0,he.jsx)(h.Link,{style:{fontSize:12},to:"/competitions",children:"在线竞赛"})}),(0,he.jsx)(g.Z.Item,{children:(0,he.jsx)("span",{style:{fontSize:12},children:null==Ue?void 0:Ue.name})})]}),(0,he.jsxs)("div",{className:k.content,children:[(0,he.jsx)("div",{style:{width:700,height:300,maxHeight:300,background:"#f1f1f1",flexShrink:0},children:(null==Ue?void 0:Ue.image)&&(0,he.jsx)("img",{className:k.Banner,src:"".concat(null==Ue?void 0:Ue.image)})}),(0,he.jsxs)("div",{className:k.right,children:[(0,he.jsxs)("div",{className:k.titles,children:[null==Ue?void 0:Ue.name,null!=Ue&&Ue.sub_title?"-"+Ue.sub_title:null]}),(0,he.jsxs)("div",{className:k.bonus,children:[(0,he.jsxs)("div",{children:[(0,he.jsx)("p",{children:null!=Ue&&Ue.bonus?(0,he.jsxs)("span",{className:"font20",children:["¥",parseInt(Ue&&Ue.bonus).toLocaleString()]}):(0,he.jsx)("span",{style:{fontSize:"20px",color:"#C5C5C5"},children:"暂无"})}),(0,he.jsxs)("div",{className:k.items,children:[(0,he.jsx)("i",{className:"iconfont icon-jiangjin"})," ",(0,he.jsx)("span",{children:"奖金"})]})]}),(0,he.jsxs)("div",{children:[(0,he.jsx)("p",{className:"font20",children:parseInt(Ue&&(null==Ue?void 0:Ue.visits_count)).toLocaleString()}),(0,he.jsxs)("div",{className:k.items,children:[(0,he.jsx)("i",{className:"iconfont icon-liulan1"}),(0,he.jsx)("span",{children:"浏览"})]})]}),(0,he.jsxs)("div",{children:[(0,he.jsx)("p",{className:"font20",children:parseInt(Ue&&(null==Ue?void 0:Ue.member_count)).toLocaleString()}),(0,he.jsxs)("div",{className:k.items,children:[(0,he.jsx)("i",{className:"iconfont icon-baoming"})," ",(0,he.jsx)("span",{children:"报名"})]})]})]}),(0,he.jsxs)("div",{className:k.bottom,children:[(0,he.jsxs)("div",{children:[(0,he.jsx)("span",{style:{color:"#9096A3"},children:"竞赛时间"}),(0,he.jsx)("span",{style:{marginLeft:20},children:null!=Ue&&Ue.start_time?(0,he.jsxs)("span",{children:[null==Ue?void 0:Ue.start_time,"~",null==Ue?void 0:Ue.end_time]}):(0,he.jsx)("span",{style:{color:"#3061D0",cursor:"pointer"},onClick:function(){qe({tabsIndex:"4"}),Be({type:"competitions/setActionTabs",payload:{key:"7"}})},children:"去完善"})})]}),(0,he.jsxs)("div",{style:{margin:"14px 0px"},children:[(0,he.jsx)("span",{style:{color:"#9096A3"},children:"报名截止"}),(0,he.jsx)("span",{style:{marginLeft:20},children:null!=Ue&&Ue.enroll_end_time?(0,he.jsx)("span",{children:null==Ue?void 0:Ue.enroll_end_time}):(0,he.jsx)("span",{style:{color:"3061D0",cursor:"pointer"},onClick:function(){qe({tabsIndex:"4"}),Be({type:"competitions/setActionTabs",payload:{key:"7"}})},children:"去完善"})})]}),(0,he.jsxs)("div",{children:[(0,he.jsx)("span",{style:{color:"#9096A3"},children:"竞赛状态"}),(0,he.jsx)("span",{style:{marginLeft:20},children:null===(F=[{name:"待审核",type:"preparing"},{name:"审核中",type:"review"},{name:"被驳回",type:"not_passed"},{name:"即将发布",type:"nearly_published"},{name:"进行中",type:"progressing"},{name:"已结束",type:"ended"},{name:"未发布",type:"unpublish"}].find((function(e){return e.type===(null==Ue?void 0:Ue.competition_status)})))||void 0===F?void 0:F.name})]}),["unpublish","preparing","review","not_passed"].includes(null==Ue?void 0:Ue.competition_status)&&(0,he.jsx)("span",{className:k.publish,onClick:function(){var e;(null==Ue?void 0:Ue.not_finish_count)>0?x.Z.confirm({icon:null,title:"",okText:"去完善",content:"检测到当前您还未完善竞赛指引的内容,请先完善指引清单,再发布审核竞赛",onOk:(e=r()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:qe({tabsIndex:"4"}),Be({type:"competitions/setActionTabs",payload:{key:"5"}});case 2:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})}):(qn(!0),(0,de.GY)({}).then((function(e){Wn(null==e?void 0:e.schools)})).then((function(){var e,n,t;xn.setFieldsValue({sponsor_schools:null===(e=ze.userInfo)||void 0===e?void 0:e.user_school_id,sponsor_user_name:null===(n=ze.userInfo)||void 0===n?void 0:n.real_name,sponsor_user_phone:null===(t=ze.userInfo)||void 0===t?void 0:t.phone})})))},children:"发布竞赛"}),"progressing"===(null==Ue?void 0:Ue.competition_status)&&!(null!=Ue&&Ue.team_member_present)&&!(null!=We&&We.enroll_ended)&&(0,he.jsx)("span",{className:k.publish,onClick:r()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:ft(2);case 1:case"end":return e.stop()}}),e)}))),children:2===(null==Ue?void 0:Ue.mode)&&null!=Ue&&Ue.member_of_course?"进入课堂":"立即报名"}),("progressing"===(null==Ue?void 0:Ue.competition_status)&&(null==Ue?void 0:Ue.team_member_present)||((0,Tn.Ny)()||(null==Ue?void 0:Ue.is_manager))&&"ended"!=(null==Ue?void 0:Ue.competition_status))&&(0,he.jsx)("span",{className:k.publish,onClick:function(){1===Ue.mode||3===Ue.mode?(qe({tabsIndex:"1"}),Be({type:"competitions/setActionTabs",payload:{key:"entrance"}})):window.open(Ue.first_category_url)},children:1===Ue.mode||3===Ue.mode?"赛题入口":"进入考场"}),"ended"===(null==Ue?void 0:Ue.competition_status)&&(0,he.jsx)("span",{onClick:function(){(null!=Ue&&Ue.team_member_present||(0,Tn.Ny)()||null!=Ue&&Ue.is_manager)&&(1===Ue.mode||3===Ue.mode?(qe({tabsIndex:"1"}),Be({type:"competitions/setActionTabs",payload:{key:"entrance"}})):window.open(Ue.first_category_url))},className:(null!=Ue&&Ue.team_member_present||(0,Tn.Ny)()||null!=Ue&&Ue.is_manager)&&1!==Ue.mode&&3!==Ue.mode?k.publish:k.ended,children:(null!=Ue&&Ue.team_member_present||(0,Tn.Ny)()||null!=Ue&&Ue.is_manager)&&1!==Ue.mode&&3!==Ue.mode?"进入考场":"已结束"}),"progressing"===(null==Ue?void 0:Ue.competition_status)&&(0,he.jsx)(li.CopyToClipboard,{text:"【竞赛邀请】".concat(null==ze||null===(P=ze.userInfo)||void 0===P?void 0:P.username,"邀请您参加头歌平台竞赛组织《").concat(null==Ue?void 0:Ue.name,"竞赛》,您可以点击下方的链接,报名该赛项。链接:").concat(window.location.origin).concat(window.location.pathname,"?identifier=").concat(null==Ue?void 0:Ue.identifier),onCopy:function(){return v.ZP.success("已复制链接,请直接粘贴发送好友")},children:(0,he.jsxs)("span",{className:"".concat(k.shareicon),children:[(0,he.jsx)("i",{style:{marginRight:6,fontSize:14},className:"iconfont icon-fenxiangketang"}),"分享"]})})]})]})]})]}),!(null!=Je&&null!==(T=Je.data)&&void 0!==T&&T.guides_is_hidden)&&(null==Je||null===(L=Je.data)||void 0===L||null===(L=L.list)||void 0===L?void 0:L.length)>0&&(0,he.jsx)(ol,{className:"mt20 mb20",LineData:null==Je||null===(D=Je.data)||void 0===D||null===(D=D.list)||void 0===D?void 0:D.map((function(e){return l()(l()({},e),{},{competition_time:null!=e&&e.competition_time?re()(null==e?void 0:e.competition_time):null})}))}),(0,he.jsx)(N.YG,{value:He.tabsIndex,style:{marginBottom:25,paddingLeft:20,background:"#fff",height:64,position:"sticky",top:0,zIndex:1},onChange:function(e){var n,t;(He.tabsIndex=e,qe(l()({},He)),"3"===e)&&((0,Tn.eB)()||null!==(n=Ue.permission)&&void 0!==n&&n.editable||null!=Ue&&Ue.team_member_present||null!=We&&We.enroll_ended||(Ue.personal?Be({type:"competitions/setActionTabs",payload:{key:"6"}}):Be({type:"competitions/setActionTabs",payload:{key:"4"}})));if(("4"==e&&en(!1),"6"===e)&&!((0,Tn.eB)()||null!=Ue&&null!==(t=Ue.permission)&&void 0!==t&&t.editable))return void h.history.push(null==Ue||!Ue.memo_id||null!=Ue&&Ue.is_hidden?null==Ue||!Ue.message_id||null!=Ue&&Ue.is_hidden?"/competitions/detail/".concat(Ge,"?type=1"):"/classrooms/".concat(null==Ue?void 0:Ue.course_identifier,"/board/").concat(null==Ue?void 0:Ue.board_id,"/Detail/").concat(null==Ue?void 0:Ue.message_id):"/forums/".concat(null==Ue?void 0:Ue.memo_id));h.history.replace("/competitions/detail/".concat(Ge,"?type=").concat(e))},dataSource:ut}),("unpublish"===Ue.competition_status||"preparing"===Ue.competition_status||"review"===Ue.competition_status)&&(0,he.jsxs)("div",{className:k.tag,children:[(0,he.jsx)(ii.Z,{})," 提示:该竞赛还未审核,暂时只有管理员可见"]}),"not_passed"===Ue.competition_status&&(0,he.jsxs)("div",{className:k.tag,style:{color:"red",background:"rgba(229,51,51,0.1)"},children:[(0,he.jsx)(ii.Z,{})," 审核被驳回",(0,he.jsx)(y.Z,{placement:"bottom",title:null==Ue?void 0:Ue.not_passed_reason,children:(0,he.jsxs)("span",{style:{marginLeft:20},children:["驳回理由:",null==Ue?void 0:Ue.not_passed_reason]})})]}),null===(E=ut.find((function(e){return e.id===He.tabsIndex})))||void 0===E?void 0:E.content]}),(0,he.jsx)(x.Z,{title:"加入战队",open:on,width:650,className:k.scoremodal,onOk:function(){xn.submit()},centered:!0,onCancel:function(){return an(!1)},children:(0,he.jsx)("div",{children:(0,he.jsxs)(f.Z,{form:xn,initialValues:l()(l()({},ze.userInfo),{},{sex:null==ze||null===(R=ze.userInfo)||void 0===R?void 0:R.gender,grade:null==ze||null===(M=ze.userInfo)||void 0===M?void 0:M.edu_entry_year,school:null==ze||null===(V=ze.userInfo)||void 0===V?void 0:V.school_name}),size:"large",labelCol:{span:5},onFinish:function(){var e=r()(o()().mark((function e(n){var t,i,s,a;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(_n(!0),!ht()){e.next=4;break}return _n(!1),e.abrupt("return");case 4:if((s=null===(t=Xn.find((function(e){return e.name===(null==n?void 0:n.school)})))||void 0===t?void 0:t.id)||null==Ue||null===(i=Ue.need_apply_info)||void 0===i||!i.need_apply_school){e.next=8;break}return v.ZP.info("请选择正确的学校"),e.abrupt("return");case 8:return e.next=10,Be({type:"competitions/JoinTeam",payload:l()(l()({},n),{},{identifier:Ge,invite_code:n.name,school_id:s})});case 10:a=e.sent,_n(!1),0===a.status&&(In(!0),Pn(a),pt(),Be({type:"competitions/setActionTabs",payload:{}}));case 13:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:[((null==Ue||null===(B=Ue.need_apply_info)||void 0===B?void 0:B.need_apply_name)||(null==Ue||null===(z=Ue.need_apply_info)||void 0===z?void 0:z.need_apply_student_id)||(null==Ue||null===(O=Ue.need_apply_info)||void 0===O?void 0:O.need_apply_sex)||(null==Ue||null===(Y=Ue.need_apply_info)||void 0===Y?void 0:Y.need_apply_phone)||(null==Ue||null===(H=Ue.need_apply_info)||void 0===H?void 0:H.need_apply_grade)||(null==Ue||null===(q=Ue.need_apply_info)||void 0===q?void 0:q.need_apply_teacher_name)||(null==Ue||null===(Q=Ue.need_apply_info)||void 0===Q?void 0:Q.need_apply_school))&&(0,he.jsx)("div",{className:"mb20",children:"根据竞赛官方的规定,参赛人员需填写必填信息才可完成报名,请确保填写的信息准确完整。"}),(0,he.jsx)(f.Z.Item,{label:"邀请码",name:"name",rules:[{required:!0,validator:function(e,n){var t;return(null==n||null===(t=n.replaceAll(" ",""))||void 0===t?void 0:t.length)>0?Promise.resolve():Promise.reject("请填写竞赛名称")}}],children:(0,he.jsx)(j.Z,{maxLength:60,showCount:!0,placeholder:"请输入邀请码"})}),(null==Ue||null===(G=Ue.need_apply_info)||void 0===G?void 0:G.need_apply_sex)&&(0,he.jsx)(f.Z.Item,{label:"性别",name:"sex",rules:[{required:!0,message:"请选择参赛人员性别"}],children:(0,he.jsxs)(b.ZP.Group,{children:[(0,he.jsx)(b.ZP,{value:0,children:"男"}),(0,he.jsx)(b.ZP,{value:1,children:"女"})]})}),(null==Ue||null===(U=Ue.need_apply_info)||void 0===U?void 0:U.need_apply_student_id)&&(0,he.jsx)(f.Z.Item,{label:"学号",name:"student_id",rules:[{required:!0,message:"请输入参赛人员学号"},{whitespace:!0,message:"学号不能为空"}],children:(0,he.jsx)(j.Z,{placeholder:"请输入参赛人员学号",showCount:!0,maxLength:60})}),(null==Ue||null===(W=Ue.need_apply_info)||void 0===W?void 0:W.need_apply_phone)&&(0,he.jsx)(f.Z.Item,{label:"电话",name:"phone",rules:[{required:!0,message:"请输入参赛人员电话"},{whitespace:!0,message:"电话不能为空"}],children:(0,he.jsx)(j.Z,{placeholder:"请输入参赛人员电话",showCount:!0,maxLength:60})}),(null==Ue||null===(J=Ue.need_apply_info)||void 0===J?void 0:J.need_apply_grade)&&(0,he.jsx)(f.Z.Item,{label:"年级",name:"grade",rules:[{required:!0,message:"请选择参赛人员年级"}],children:(0,he.jsx)(_.default,{placeholder:"请选择参赛人员年级",size:"large",children:ct()})}),(null==Ue||null===(K=Ue.need_apply_info)||void 0===K?void 0:K.need_apply_teacher_name)&&(0,he.jsx)(f.Z.Item,{label:"指导老师姓名",name:"teacher_name",rules:[{required:!0,message:"请输入指导老师姓名"},{whitespace:!0,message:"指导老师姓名不能为空"}],children:(0,he.jsx)(j.Z,{placeholder:"请输入指导老师姓名",showCount:!0,maxLength:60})}),(null==Ue||null===(X=Ue.need_apply_info)||void 0===X?void 0:X.need_apply_school)&&(0,he.jsx)(f.Z.Item,{label:"学校/单位",name:"school",rules:[{required:!0,message:"请选择学校/单位"}],children:(0,he.jsx)(w.Z,{size:"large",showSearch:!0,onChange:lt,children:at.map((function(e,n){return(0,he.jsx)(rl,{value:e.name,children:e.name},n)}))})})]})})}),(0,he.jsxs)(x.Z,{title:!1,footer:!1,open:En,width:318,className:k.scoremodal,closable:!1,centered:!0,children:[(0,he.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,he.jsx)("div",{className:k.title,children:"报名"}),(0,he.jsx)("span",{onClick:function(){return Rn(!1)},style:{cursor:"pointer"},className:k.close,children:(0,he.jsx)("i",{className:"iconfont icon-danchuangguanbi",style:{fontSize:"14px"}})})]}),(0,he.jsx)("div",{className:k.content,children:"选择参赛方式"}),(0,he.jsxs)("div",{className:k.bottoms,children:[(0,he.jsx)(Z.ZP,{className:k.no,onClick:function(){Be({type:"competitions/setActionTabs",payload:{key:"2"}}),Rn(!1)},children:"加入战队"}),(0,he.jsx)(Z.ZP,{className:k.yes,onClick:function(){Be({type:"competitions/setActionTabs",payload:{key:"3"}}),Rn(!1)},children:"创建战队"})]})]}),(0,he.jsxs)(x.Z,{title:!1,footer:!1,open:Bn,width:318,className:k.scoremodal,closable:!1,centered:!0,children:[(0,he.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,he.jsx)("div",{className:k.title,children:"报名"}),(0,he.jsx)("span",{onClick:function(){return zn(!1)},style:{cursor:"pointer"},className:k.close,children:(0,he.jsx)("i",{className:"iconfont icon-danchuangguanbi"})})]}),(0,he.jsx)("div",{className:k.content,children:"您暂未报名,请先报名"}),(0,he.jsxs)("div",{className:k.bottoms,children:[(0,he.jsx)(Z.ZP,{className:k.no,onClick:function(){zn(!1)},children:"取消"}),(0,he.jsx)(Z.ZP,{className:k.yes,loading:hn,onClick:r()(o()().mark((function e(){var n;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!ht()){e.next=3;break}return _n(!1),e.abrupt("return");case 3:if(!hn){e.next=5;break}return e.abrupt("return");case 5:return _n(!0),e.next=8,Be({type:"competitions/AddTeam",payload:{identifier:Ge}});case 8:n=e.sent,_n(!1),n&&0===n.status&&(Pn(n),In(!0),pt(),Be({type:"competitions/setActionTabs",payload:{}})),zn(!1);case 12:case"end":return e.stop()}}),e)}))),children:"立即报名"})]})]}),(0,he.jsx)(x.Z,{title:"报名信息填写",open:tt,width:650,className:k.scoremodal,onOk:function(){gn.submit()},centered:!0,onCancel:function(){return it(!1)},children:(0,he.jsxs)(f.Z,{initialValues:l()(l()({},ze.userInfo),{},{sex:null==ze||null===($=ze.userInfo)||void 0===$?void 0:$.gender,grade:null==ze||null===(ee=ze.userInfo)||void 0===ee?void 0:ee.edu_entry_year,school:null==ze||null===(ne=ze.userInfo)||void 0===ne?void 0:ne.school_name}),form:gn,colon:!1,labelCol:{span:5},size:"large",onFinish:function(){var e=r()(o()().mark((function e(n){var t,i,s,a;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((s=null===(t=Xn.find((function(e){return e.name===(null==n?void 0:n.school)})))||void 0===t?void 0:t.id)||null==Ue||null===(i=Ue.need_apply_info)||void 0===i||!i.need_apply_school){e.next=4;break}return v.ZP.info("请选择正确的学校"),e.abrupt("return");case 4:return _n(!0),e.next=7,Be({type:"competitions/AddTeam",payload:l()(l()({},n),{},{identifier:Ge,name:ze.userInfo.real_name+"的战队",school_id:s})});case 7:a=e.sent,_n(!1),a&&0===a.status&&(Pn(a),In(!0),pt(),Be({type:"competitions/setActionTabs",payload:{}})),it(!1);case 11:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:[((null==Ue||null===(te=Ue.need_apply_info)||void 0===te?void 0:te.need_apply_name)||(null==Ue||null===(ie=Ue.need_apply_info)||void 0===ie?void 0:ie.need_apply_student_id)||(null==Ue||null===(le=Ue.need_apply_info)||void 0===le?void 0:le.need_apply_sex)||(null==Ue||null===(se=Ue.need_apply_info)||void 0===se?void 0:se.need_apply_phone)||(null==Ue||null===(oe=Ue.need_apply_info)||void 0===oe?void 0:oe.need_apply_grade)||(null==Ue||null===(ae=Ue.need_apply_info)||void 0===ae?void 0:ae.need_apply_teacher_name)||(null==Ue||null===(ue=Ue.need_apply_info)||void 0===ue?void 0:ue.need_apply_school))&&(0,he.jsx)("div",{className:"mb20",children:"根据竞赛官方的规定,参赛人员需填写必填信息才可完成报名,请确保填写的信息准确完整。"}),(null==Ue||null===(pe=Ue.need_apply_info)||void 0===pe?void 0:pe.need_apply_name)&&(0,he.jsx)(f.Z.Item,{label:"参赛人员姓名",name:"real_name",rules:[{required:!0,message:"请输入参赛人员姓名"},{whitespace:!0,message:"姓名不能为空"}],children:(0,he.jsx)(j.Z,{placeholder:"请输入参赛人员姓名",showCount:!0,maxLength:60})}),(null==Ue||null===(me=Ue.need_apply_info)||void 0===me?void 0:me.need_apply_sex)&&(0,he.jsx)(f.Z.Item,{label:"性别",name:"sex",rules:[{required:!0,message:"请选择参赛人员性别"}],children:(0,he.jsxs)(b.ZP.Group,{children:[(0,he.jsx)(b.ZP,{value:0,children:"男"}),(0,he.jsx)(b.ZP,{value:1,children:"女"})]})}),(null==Ue||null===(_e=Ue.need_apply_info)||void 0===_e?void 0:_e.need_apply_student_id)&&(0,he.jsx)(f.Z.Item,{label:"学号",name:"student_id",rules:[{required:!0,message:"请输入参赛人员学号"},{whitespace:!0,message:"学号不能为空"}],children:(0,he.jsx)(j.Z,{placeholder:"请输入参赛人员学号",showCount:!0,maxLength:60})}),(null==Ue||null===(fe=Ue.need_apply_info)||void 0===fe?void 0:fe.need_apply_phone)&&(0,he.jsx)(f.Z.Item,{label:"电话",name:"phone",rules:[{required:!0,message:"请输入参赛人员电话"},{whitespace:!0,message:"电话不能为空"}],children:(0,he.jsx)(j.Z,{placeholder:"请输入参赛人员电话",showCount:!0,maxLength:60})}),(null==Ue||null===(xe=Ue.need_apply_info)||void 0===xe?void 0:xe.need_apply_grade)&&(0,he.jsx)(f.Z.Item,{label:"年级",name:"grade",rules:[{required:!0,message:"请选择参赛人员年级"}],children:(0,he.jsx)(_.default,{placeholder:"请选择参赛人员年级",size:"large",children:ct()})}),(null==Ue||null===(ve=Ue.need_apply_info)||void 0===ve?void 0:ve.need_apply_teacher_name)&&(0,he.jsx)(f.Z.Item,{label:"指导老师姓名",name:"teacher_name",rules:[{required:!0,message:"请输入指导老师姓名"},{whitespace:!0,message:"指导老师姓名不能为空"}],children:(0,he.jsx)(j.Z,{placeholder:"请输入指导老师姓名",showCount:!0,maxLength:60})}),(null==Ue||null===(ge=Ue.need_apply_info)||void 0===ge?void 0:ge.need_apply_school)&&(0,he.jsx)(f.Z.Item,{label:"学校/单位",name:"school",rules:[{required:!0,message:"请选择学校/单位"}],children:(0,he.jsx)(w.Z,{size:"large",showSearch:!0,onChange:lt,children:at.map((function(e,n){return(0,he.jsx)(rl,{value:e.name,children:e.name},n)}))})})]})}),(0,he.jsx)(x.Z,{title:"创建战队",open:dn,width:650,className:k.scoremodal,onOk:function(){xn.submit()},centered:!0,onCancel:function(){return un(!1)},children:(0,he.jsx)("div",{children:(0,he.jsxs)(f.Z,{form:xn,labelCol:{span:5},initialValues:l()(l()({},ze.userInfo),{},{sex:null==ze||null===(ye=ze.userInfo)||void 0===ye?void 0:ye.gender,grade:null==ze||null===(je=ze.userInfo)||void 0===je?void 0:je.edu_entry_year,school:null==ze||null===(be=ze.userInfo)||void 0===be?void 0:be.school_name}),size:"large",onFinish:function(){var e=r()(o()().mark((function e(n){var t,i,s,a;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(_n(!0),(s=null===(t=Xn.find((function(e){return e.name===(null==n?void 0:n.school)})))||void 0===t?void 0:t.id)||null==Ue||null===(i=Ue.need_apply_info)||void 0===i||!i.need_apply_school){e.next=5;break}return v.ZP.info("请选择正确的学校"),e.abrupt("return");case 5:if(!ht()){e.next=8;break}return _n(!1),e.abrupt("return");case 8:return e.next=10,Be({type:"competitions/AddTeam",payload:l()(l()({},n),{},{identifier:Ge,name:n.name,school_id:s})});case 10:a=e.sent,_n(!1),a&&0===a.status&&(Pn(a),In(!0),pt(),Be({type:"competitions/setActionTabs",payload:{}}));case 13:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:[((null==Ue||null===(we=Ue.need_apply_info)||void 0===we?void 0:we.need_apply_name)||(null==Ue||null===(Ze=Ue.need_apply_info)||void 0===Ze?void 0:Ze.need_apply_student_id)||(null==Ue||null===(ke=Ue.need_apply_info)||void 0===ke?void 0:ke.need_apply_sex)||(null==Ue||null===(Ne=Ue.need_apply_info)||void 0===Ne?void 0:Ne.need_apply_phone)||(null==Ue||null===(Ie=Ue.need_apply_info)||void 0===Ie?void 0:Ie.need_apply_grade)||(null==Ue||null===(Se=Ue.need_apply_info)||void 0===Se?void 0:Se.need_apply_teacher_name)||(null==Ue||null===(Ce=Ue.need_apply_info)||void 0===Ce?void 0:Ce.need_apply_school))&&(0,he.jsx)("div",{className:"mb20",children:"根据竞赛官方的规定,参赛人员需填写必填信息才可完成报名,请确保填写的信息准确完整。"}),(0,he.jsx)(f.Z.Item,{label:"队伍名称",name:"name",rules:[{required:!0,validator:function(e,n){var t;return(null==n||null===(t=n.replaceAll(" ",""))||void 0===t?void 0:t.length)>0?Promise.resolve():Promise.reject("请填写队伍名称")}}],children:(0,he.jsx)(j.Z,{maxLength:60,showCount:!0,placeholder:"请输入队伍名称"})}),(null==Ue||null===(Fe=Ue.need_apply_info)||void 0===Fe?void 0:Fe.need_apply_name)&&(0,he.jsx)(f.Z.Item,{label:"参赛人员姓名",name:"real_name",rules:[{required:!0,message:"请输入参赛人员姓名"},{whitespace:!0,message:"姓名不能为空"}],children:(0,he.jsx)(j.Z,{placeholder:"请输入参赛人员姓名",showCount:!0,maxLength:60})}),(null==Ue||null===(Pe=Ue.need_apply_info)||void 0===Pe?void 0:Pe.need_apply_sex)&&(0,he.jsx)(f.Z.Item,{label:"性别",name:"sex",rules:[{required:!0,message:"请选择参赛人员性别"}],children:(0,he.jsxs)(b.ZP.Group,{children:[(0,he.jsx)(b.ZP,{value:0,children:"男"}),(0,he.jsx)(b.ZP,{value:1,children:"女"})]})}),(null==Ue||null===(Te=Ue.need_apply_info)||void 0===Te?void 0:Te.need_apply_student_id)&&(0,he.jsx)(f.Z.Item,{label:"学号",name:"student_id",rules:[{required:!0,message:"请输入参赛人员学号"},{whitespace:!0,message:"学号不能为空"}],children:(0,he.jsx)(j.Z,{placeholder:"请输入参赛人员学号",showCount:!0,maxLength:60})}),(null==Ue||null===(Le=Ue.need_apply_info)||void 0===Le?void 0:Le.need_apply_phone)&&(0,he.jsx)(f.Z.Item,{label:"电话",name:"phone",rules:[{required:!0,message:"请输入参赛人员电话"},{whitespace:!0,message:"电话不能为空"}],children:(0,he.jsx)(j.Z,{placeholder:"请输入参赛人员电话",showCount:!0,maxLength:60})}),(null==Ue||null===(De=Ue.need_apply_info)||void 0===De?void 0:De.need_apply_grade)&&(0,he.jsx)(f.Z.Item,{label:"年级",name:"grade",rules:[{required:!0,message:"请选择参赛人员年级"}],children:(0,he.jsx)(_.default,{placeholder:"请选择参赛人员年级",size:"large",children:ct()})}),(null==Ue||null===(Ee=Ue.need_apply_info)||void 0===Ee?void 0:Ee.need_apply_teacher_name)&&(0,he.jsx)(f.Z.Item,{label:"指导老师姓名",name:"teacher_name",rules:[{required:!0,message:"请输入指导老师姓名"},{whitespace:!0,message:"指导老师姓名不能为空"}],children:(0,he.jsx)(j.Z,{placeholder:"请输入指导老师姓名",showCount:!0,maxLength:60})}),(null==Ue||null===(Re=Ue.need_apply_info)||void 0===Re?void 0:Re.need_apply_school)&&(0,he.jsx)(f.Z.Item,{label:"学校/单位",name:"school",rules:[{required:!0,message:"请选择学校/单位"}],children:(0,he.jsx)(w.Z,{size:"large",showSearch:!0,onChange:lt,children:at.map((function(e,n){return(0,he.jsx)(rl,{value:e.name,children:e.name},n)}))})})]})})}),(0,he.jsxs)(x.Z,{title:!1,footer:!1,open:Hn,width:650,className:k.scoremodal,closable:!1,centered:!0,onCancel:function(){return qn(!1)},children:[(0,he.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,he.jsx)("div",{className:k.title,children:"为了加快竞赛审核速度,请确认以下信息是否准确"}),(0,he.jsx)("span",{onClick:function(){return qn(!1)},style:{cursor:"pointer"},className:k.close,children:(0,he.jsx)("i",{className:"iconfont icon-guanbi",style:{color:"#979797",fontSize:"15px"}})})]}),(0,he.jsx)("div",{className:k.content,children:(0,he.jsxs)(f.Z,{form:xn,className:k.formWrap,onFinish:function(e){(0,ce.qt)(l()(l()({},e),{},{id:Ge})).then((function(e){0==(null==e?void 0:e.status)?(v.ZP.success("发布审核成功,审核通过后,竞赛可上线启动"),qn(!1),pt()):v.ZP.error(null==e?void 0:e.message)}))},labelCol:{flex:"110px"},children:[(0,he.jsx)(f.Z.Item,{className:k.form_item,label:"主办方",colon:!1,name:"sponsor_schools",children:(0,he.jsx)(_.default,{mode:"multiple",className:k.form_item_item_select,options:Un,fieldNames:{label:"name",value:"id"},placeholder:"请输入主办方",filterOption:function(e,n){var t;return(null!==(t=null==n?void 0:n.name)&&void 0!==t?t:"").toLowerCase().includes(e.toLowerCase())}})}),(0,he.jsx)(f.Z.Item,{className:k.form_item,label:"主要负责人姓名",colon:!1,name:"sponsor_user_name",children:(0,he.jsx)(j.Z,{className:k.form_item_item,placeholder:"请输入主要负责人姓名"})}),(0,he.jsx)(f.Z.Item,{className:k.form_item,label:"主要负责人电话",colon:!1,name:"sponsor_user_phone",rules:[{pattern:new RegExp(/^((0\d{2,3}(-)?\d{7,8})|(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8})$/,"g"),message:"必须是正确的座机号或者手机号"}],children:(0,he.jsx)(j.Z,{className:k.form_item_item,placeholder:"请输入主要负责人电话"})}),(0,he.jsx)("div",{className:k.bottom,children:(0,he.jsxs)(f.Z.Item,{children:[(0,he.jsx)(Z.ZP,{size:"middle",className:k.no,onClick:function(){qn(!1)},children:"取消"}),(0,he.jsx)(Z.ZP,{className:k.yes,size:"middle",type:"primary",htmlType:"submit",loading:Ve,children:"保存"})]})})]})})]}),(0,he.jsx)(Ii.Z,{}),(0,he.jsx)(Ni.Z,{datas:Cn,Header:Ue,isopen:Nn,setisopen:In,isShowPhone:bn,setIsShowPhone:wn,user:ze,dispatch:Be,onOK:function(){pt()}})]})}))},87271:function(e,n,t){t.d(n,{$J:function(){return r},JZ:function(){return d},bN:function(){return m},jP:function(){return p},rO:function(){return c}});var i=t(7557),l=t.n(i),s=t(41498),o=t.n(s),a=t(10032);function r(e){return(0,a.U2)("libraries/".concat(e,".json"))}function c(){return(0,a.U2)("library_tags.json")}function d(e){return u.apply(this,arguments)}function u(){return(u=o()(l()().mark((function e(n){var t;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,a.IV)("attachments/".concat(n,".json"));case 2:return t=e.sent,e.abrupt("return",0===t.status);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function p(e){return(0,a.v_)("libraries.json",e)}function m(e,n){return(0,a.gz)("libraries/".concat(e,".json"),n)}},70516:function(e,n,t){t.d(n,{AD:function(){return P},D9:function(){return M},Hp:function(){return Z},IM:function(){return B},Iy:function(){return N},KM:function(){return J},MJ:function(){return k},Ne:function(){return V},ON:function(){return q},Uj:function(){return U},VY:function(){return Y},YO:function(){return G},YX:function(){return Q},Zn:function(){return f},_g:function(){return j},_k:function(){return E},c6:function(){return C},cr:function(){return x},eV:function(){return F},fi:function(){return v},gh:function(){return A},hS:function(){return z},iA:function(){return g},j6:function(){return b},je:function(){return D},jj:function(){return w},kS:function(){return H},o6:function(){return S},pO:function(){return W},rQ:function(){return T},sA:function(){return I},xm:function(){return R},xo:function(){return O},y8:function(){return L},yd:function(){return y}});var i=t(7557),l=t.n(i),s=t(82242),o=t.n(s),a=t(41498),r=t.n(a),c=t(85889),d=t(75102),u=t(11298),p=t(8591),m=t(22107),h=function(){(0,d.getDvaApp)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"正在生成文件,请稍后..."}})},_=function(){(0,d.getDvaApp)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!1,text:""}})},f=function(){var e=r()(l()().mark((function e(n){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return h(),e.next=3,(0,c.YR)(o()({},n));case 3:if(0!==e.sent.status){e.next=7;break}return e.next=7,(0,u.QH)("",(0,u.NY)({url:m.Z.API_SERVER+"/api/courses/".concat(n.coursesId,"/export_couser_info.json"),query:n}));case 7:_();case 8:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),x=function(){var e=r()(l()().mark((function e(n){var t;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,c.yS)(o()({},n));case 2:if(0!==(t=e.sent).status){e.next=8;break}p.ZP.info("导出任务生成成功"),d.history.push("/classrooms/".concat(n.coursesId,"/exportlist/course_member_act_score")),e.next=13;break;case 8:if(-2!==t.status){e.next=12;break}return e.abrupt("return",t);case 12:-3===t.status&&((0,d.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),d.history.push("/classrooms/".concat(n.coursesId,"/exportlist/course_member_act_score")));case 13:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),v=function(){var e=r()(l()().mark((function e(n){var t;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,c.W0)(o()({},n));case 2:if(0!==(t=e.sent).status){e.next=8;break}p.ZP.info("导出任务生成成功"),d.history.push("/classrooms/".concat(n.coursesId,"/exportlist/course_total_score")),e.next=13;break;case 8:if(-4!==t.status){e.next=12;break}return e.abrupt("return",t);case 12:-3===t.status&&((0,d.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),d.history.push("/classrooms/".concat(n.coursesId,"/exportlist/course_total_score")));case 13:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),g=function(){var e=r()(l()().mark((function e(n){var t;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,c.Nl)(o()({},n));case 2:if(0!==(t=e.sent).status){e.next=8;break}p.ZP.info("导出任务生成成功"),d.history.push("/classrooms/".concat(n.coursesId,"/exportlist/course_total_exercise_and_other")),e.next=13;break;case 8:if(-4!==t.status){e.next=12;break}return e.abrupt("return",t);case 12:-3===t.status&&((0,d.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),d.history.push("/classrooms/".concat(n.coursesId,"/exportlist/course_total_exercise_and_other")));case 13:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),y=function(){var e=r()(l()().mark((function e(n){var t;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,c.IU)(o()({},n));case 2:if(0!==(t=e.sent).status){e.next=8;break}p.ZP.info("导出任务生成成功"),d.history.push("/classrooms/".concat(n.coursesId,"/exportlist/export_star_user")),e.next=13;break;case 8:if(-4!==t.status){e.next=12;break}return e.abrupt("return",t);case 12:-3===t.status&&((0,d.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),d.history.push("/classrooms/".concat(n.coursesId,"/exportlist/export_star_user")));case 13:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),j=function(){var e=r()(l()().mark((function e(n){var t;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,c.td)(o()({},n));case 2:if(0!==(t=e.sent).status){e.next=8;break}p.ZP.info("导出任务生成成功"),d.history.push("/classrooms/".concat(n.coursesId,"/exportlist/course_total_exercise_and_other")),e.next=19;break;case 8:if(-2!==t.status){e.next=12;break}return e.abrupt("return",t);case 12:if(-3!==t.status){e.next=17;break}(0,d.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),d.history.push("/classrooms/".concat(n.coursesId,"/exportlist/course_total_exercise_and_other")),e.next=19;break;case 17:if(-4!==t.status){e.next=19;break}return e.abrupt("return",t);case 19:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),b=function(){var e=r()(l()().mark((function e(n){var t;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,c.QX)(o()({},n));case 2:if(0!==(t=e.sent).status){e.next=8;break}p.ZP.info("导出任务生成成功"),d.history.push("/classrooms/".concat(n.coursesId,"/exportlist/course_total_homework")),e.next=13;break;case 8:if(-4!==t.status){e.next=12;break}return e.abrupt("return",t);case 12:-3===t.status&&((0,d.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),d.history.push("/classrooms/".concat(n.coursesId,"/exportlist/course_total_homework")));case 13:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),w=function(){var e=r()(l()().mark((function e(n,t){var i;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,c.o_)(o()({},n));case 2:0===(i=e.sent).status?(p.ZP.info("导出任务生成成功!导出后文件保存时间为7天,请及时下载"),d.history.push("/classrooms/".concat(n.coursesId,"/exportlist/").concat(t))):-3===i.status&&((0,d.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),d.history.push("/classrooms/".concat(n.coursesId,"/exportlist/").concat(t)));case 4:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),Z=function(){var e=r()(l()().mark((function e(n,t){var i;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,c.ZL)(o()({},n));case 2:0===(i=e.sent).status?(p.ZP.info("导出任务生成成功!导出后文件保存时间为7天,请及时下载"),d.history.push("/classrooms/".concat(n.coursesId,"/exportlist/").concat(t))):-3===i.status&&((0,d.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),d.history.push("/classrooms/".concat(n.coursesId,"/exportlist/").concat(t)));case 4:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),k=function(){var e=r()(l()().mark((function e(n,t){var i;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,c.vV)(o()({},n));case 2:0===(i=e.sent).status?(p.ZP.info("导出任务生成成功!导出后文件保存时间为7天,请及时下载"),d.history.push("/classrooms/".concat(n.coursesId,"/exportlist/").concat(t))):-3===i.status&&((0,d.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),d.history.push("/classrooms/".concat(n.coursesId,"/exportlist/").concat(t)));case 4:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),N=function(){var e=r()(l()().mark((function e(n,t){var i;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,c.aP)(o()({},n));case 2:0===(i=e.sent).status?(p.ZP.info("导出任务生成成功"),d.history.push("/classrooms/".concat(n.coursesId,"/exportlist/").concat(t))):-3===i.status&&((0,d.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),d.history.push("/classrooms/".concat(n.coursesId,"/exportlist/").concat(t)));case 4:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),I=function(){var e=r()(l()().mark((function e(n){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return h(),e.next=3,(0,c.MJ)(o()({},n));case 3:if(0!==e.sent.status){e.next=7;break}return e.next=7,(0,u.FH)("",(0,u.NY)({url:m.Z.API_SERVER+"/api/polls/".concat(n.categoryId,"/commit_result.xlsx"),query:n}));case 7:_();case 8:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),A=function(){var e=r()(l()().mark((function e(n){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.FH)("",(0,u.NY)({url:m.Z.API_SERVER+"/api/courses/".concat(n.coursesId,"/attendances/export_xlsx_data.xlsx"),query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),S=function(){var e=r()(l()().mark((function e(n){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.FH)("",(0,u.NY)({url:m.Z.API_SERVER+"/api/courses/".concat(n.coursesId,"/video_study_statics.xlsx"),query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),C=function(){var e=r()(l()().mark((function e(n){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.FH)("",(0,u.NY)({url:m.Z.API_SERVER+"/api/courses/".concat(n.coursesId,"/export_video_study.xlsx"),query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),F=function(){var e=r()(l()().mark((function e(n){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.FH)("",(0,u.NY)({url:m.Z.API_SERVER+"/api/courses/".concat(n.coursesId,"/export_course_students_info.xlsx"),query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),P=function(){var e=r()(l()().mark((function e(n){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.FH)("",(0,u.NY)({url:m.Z.API_SERVER+"/api/school_manages/students.xlsx",query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),T=function(){var e=r()(l()().mark((function e(n){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.FH)("",(0,u.NY)({url:m.Z.API_SERVER+"/api/item_banks/export.xlsx",query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),L=function(){var e=r()(l()().mark((function e(n){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.FH)("",(0,u.NY)({url:m.Z.API_SERVER+"/api/competitions/region_reports.xlsx",query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),D=function(){var e=r()(l()().mark((function e(n){var t;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,c.Uy)(o()({},n));case 2:0===(t=e.sent).status?(p.ZP.info("导出任务生成成功"),d.history.push("/classrooms/".concat(n.coursesId,"/exportlist/exercise_score"))):-3===t.status&&((0,d.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),d.history.push("/classrooms/".concat(n.coursesId,"/exportlist/exercise_score")));case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),E=function(){var e=r()(l()().mark((function e(n){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("----------","调用下载"),e.next=3,(0,u.FH)("",(0,u.NY)({url:m.Z.API_SERVER+"/api/export_records/".concat(n.id,".xlsx"),query:n}));case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),R=function(){var e=r()(l()().mark((function e(n){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.FH)("",(0,u.NY)({url:m.Z.API_SERVER+"/api/ec_major_schools/0/ec_years.xlsx",query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),M=function(){var e=r()(l()().mark((function e(n){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.FH)("",(0,u.NY)({url:m.Z.API_SERVER+"/api/courses/".concat(null==n?void 0:n.coursesId,"/").concat(n.menuKey,"_statistic.xlsx?").concat(n.checkedList.map((function(e){return"course_group_id[]=".concat(e)})).join("&")),query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),V=function(){var e=r()(l()().mark((function e(n){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.FH)("",(0,u.NY)({url:m.Z.API_SERVER+"/api/ec_years/".concat(null==n?void 0:n.ec_year_id,"/ec_training_objectives.xlsx"),query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),B=function(){var e=r()(l()().mark((function e(n){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.FH)(null==n?void 0:n.name,(0,u.NY)({url:m.Z.API_SERVER+"/api/attachments/get_ecs_attachment.docx",query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),z=function(){var e=r()(l()().mark((function e(n){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.FH)("",(0,u.NY)({url:m.Z.API_SERVER+"/api/ec_years/".concat(null==n?void 0:n.ec_year_id,"/ec_courses.xlsx"),query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),O=function(){var e=r()(l()().mark((function e(n){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.FH)("",(0,u.NY)({url:m.Z.API_SERVER+"/api/ec_years/".concat(null==n?void 0:n.ec_year_id,"/ec_graduation_requirements.xlsx"),query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),Y=function(){var e=r()(l()().mark((function e(n){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.FH)("",(0,u.NY)({url:m.Z.API_SERVER+"/api/courses/rank_list.xlsx",query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),H=function(){var e=r()(l()().mark((function e(n){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.FH)("",(0,u.NY)({url:m.Z.API_SERVER+"/api/courses/question_rank_list.xlsx",query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),q=function(){var e=r()(l()().mark((function e(n){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.FH)("",(0,u.NY)({url:m.Z.API_SERVER+"/api/examination_banks/".concat(n.id,".json"),query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),Q=function(){var e=r()(l()().mark((function e(n){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.FH)("",(0,u.NY)({url:m.Z.API_SERVER+"/api/exercises/".concat(n.categoryId,".json"),query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),G=function(){var e=r()(l()().mark((function e(n){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.FH)("",(0,u.NY)({url:m.Z.API_SERVER+"/api/polls/".concat(null==n?void 0:n.id,"/commit_result.json"),query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),U=function(){var e=r()(l()().mark((function e(n){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.FH)("",(0,u.NY)({url:m.Z.API_SERVER+"/api/paths/get_task_pass.json",query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),W=function(){var e=r()(l()().mark((function e(n,t){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.FH)(t||"",(0,u.NY)({url:m.Z.API_SERVER+"/api/exercises/".concat(null==n?void 0:n.exercise_id,"/consult_exercise.json"),query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),J=function(){var e=r()(l()().mark((function e(n){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.FH)("",(0,u.NY)({url:m.Z.API_SERVER+"/api/competitions/".concat(null==n?void 0:n.identifier,"/competition_commit_records/member_works.xlsx"),query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}()},52560:function(e,n,t){t.d(n,{U:function(){return p}});var i=t(7557),l=t.n(i),s=t(82242),o=t.n(s),a=t(41498),r=t.n(a),c=t(79800),d=t.n(c),u=t(59301);function p(e,n){var t=(0,u.useState)(n),i=d()(t,2),s=i[0],a=i[1],c=(0,u.useState)(!1),p=d()(c,2),m=p[0],h=p[1],_=(0,u.useState)(),f=d()(_,2),x=f[0],v=f[1],g=function(){var t=r()(l()().mark((function t(i){var r,c,d,u=arguments;return l()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=u.length>1&&void 0!==u[1]&&u[1],c=r?n:o()(o()({},s),i),h(!0),a(c),t.next=6,e(c);case 6:return d=t.sent,h(!1),v(d),t.abrupt("return",d);case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return[s,m,g,x]}},47109:function(e,n){n.Z={wrap:"wrap___ilWvf",deleteIcon:"deleteIcon___JBDG8",keywordTag:"keywordTag___iieCb",questionTitleEditorWrap:"questionTitleEditorWrap___MHB5s",choiceListWrap:"choiceListWrap___jB8b1",choiceWrap:"choiceWrap___QFkTc",choiceIndex:"choiceIndex___Mr2YO",judgementIndex:"judgementIndex___fUVWK",setAnswerBtn:"setAnswerBtn___Whox5",activeAnswer:"activeAnswer___fGU6Y",activeJudgementAnswer:"activeJudgementAnswer___wJv8P",actionWrapper:"actionWrapper___ERQ7k",addIcon:"addIcon___L9TE0",inputBorder:"inputBorder___Q5tRE",placeholder:"placeholder___p9sFY",blankInputNumberWrapper:"blankInputNumberWrapper___uEHb0",addBtn:"addBtn___WR5ZI",blankIndex:"blankIndex___x9Pny",baseInputWrapper:"baseInputWrapper___eVsG7",collapseWrapper:"collapseWrapper___ZTysU",panelHeader:"panelHeader___QSN9g",open:"open___B6FU9",close:"close___QX19r",hide:"hide___mn25n"}}}]); \ No newline at end of file +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[38797,70516],{33706:function(e,n,t){t.d(n,{Z:function(){return u}});var i=t(79800),l=t.n(i),s=t(78241),o=t(98135),a=t(3113),r=t(59301),c={search:"search___JA0r9",btn:"btn___GGtZC"},d=t(37712),u=function(e){var n=e.value,t=e.onChange,i=s.Z.useForm(),u=l()(i,1)[0],p=(0,r.useRef)(!1);(0,r.useEffect)((function(){n&&u.setFieldsValue(n)}),n);return(0,d.jsx)("div",{className:c.search,children:(0,d.jsxs)(s.Z,{className:c.formWrap,colon:!1,form:u,size:"large",layout:"inline",onFinish:function(e){p.current||function(e){p.current||t(e),p.current=!0,setTimeout((function(){p.current=!1}),2e3)}(e)},children:[(0,d.jsx)(s.Z.Item,{label:"实践项目名称",name:"keyword",initialValue:"",children:(0,d.jsx)(o.Z,{style:{width:280,height:40}})}),(0,d.jsx)(s.Z.Item,{label:"学校/单位",name:"schools",initialValue:"",style:{margin:"0 40px"},children:(0,d.jsx)(o.Z,{style:{width:280,height:40}})}),(0,d.jsx)(s.Z.Item,{label:"创建者/合作者",name:"creator",initialValue:"",children:(0,d.jsx)(o.Z,{style:{width:200,height:40}})}),(0,d.jsx)(a.ZP,{className:c.btn,type:"primary",htmlType:"submit",children:"搜索"})]})})}},19860:function(e,n,t){t.d(n,{z:function(){return N},Z:function(){return I}});var i=t(7557),l=t.n(i),s=t(41498),o=t.n(s),a=t(82242),r=t.n(a),c=t(37205),d=t.n(c),u=t(79800),p=t.n(u),m=t(59301),h=t(46651),_=t(8591),f=t(43418),x=t(3113),v=t(22107),g=t(87271),y=t(37712),j="  ";function b(e){if(0==e)return"0 Byte";var n=parseInt(""+Math.floor(Math.log(e)/Math.log(1024)),10);return(e/Math.pow(1024,n)).toFixed(1)+" "+["Bytes","KB","MB","GB","TB"][n]}var w=t(93737),Z=t(89392);Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;var k=h.Z.Dragger;function N(e){var n=[];return e&&e.length>0&&(n=e.map((function(e){return{uid:e.id,id:e.id,name:e.title+j+e.filesize,url:e.url,filesize:e.filesize,status:"done",response:{id:e.id}}}))),n}var I=function(e){var n=e.value,t=e.onChange,i=e.action,s=e.data,a=e.className,c=e.maxSize,u=void 0===c?150:c,N=e.title,I=void 0===N?"上传附件":N,A=e.showRemoveModal,S=void 0!==A&&A,C=e.accept,F=void 0===C?"":C,P=e.additionalText,T=e.isDragger,L=e.number,D=void 0===L?1e3:L,E=e.aloneClear,R=void 0!==E&&E,M=e.realTimeRemove,V=void 0===M||M,B=(0,m.useState)(!1),z=p()(B,2),O=z[0],Y=z[1],H=(0,m.useState)(n||[]),q=p()(H,2),Q=q[0],G=q[1],U=(0,m.useState)(1),W=p()(U,2),J=W[0],K=W[1];(0,m.useEffect)((function(){n&&(1===J&&G(d()(n)),K(2),D===(null==n?void 0:n.length)&&Y(!0))}),[n]);var X,$=function(){setTimeout((function(){Q.pop(),G(d()(Q))}),500)},ee={multiple:!0,disabled:O,accept:F,withCredentials:!0,fileList:Q,beforeUpload:function(e,n){var t=e.size/1024/1024;return Q.concat(n).length>D?(Q.pop(),G(d()(Q)),_.ZP.error("最多只能上传".concat(D,"个文件")),R?Promise.reject():($(),!1)):t=D?Y(!0):Y(!1),G(d()(Q)),Q=Q.map((function(e){var n,t;null!=e&&null!==(n=e.response)&&void 0!==n&&n.id&&(e.url=null==e||null===(t=e.response)||void 0===t?void 0:t.url);return-1===e.name.indexOf(j)&&(e.name="".concat(e.name).concat(j).concat(b(e.size))),r()({},e)})),console.log("info:",e,Q),t(Q)):_.ZP.error(null===(i=e.file)||void 0===i||null===(i=i.response)||void 0===i?void 0:i.message)},onRemove:(X=o()(l()().mark((function e(n){var t;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(V){e.next=2;break}return e.abrupt("return",!0);case 2:if(t=function(){var e=o()(l()().mark((function e(){var t;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n.response?n.response.id:n.id)){e.next=8;break}return e.next=4,(0,g.JZ)(n.response?n.response.id:n.uid);case 4:return t=e.sent,e.abrupt("return",Promise.resolve(t));case 8:return e.abrupt("return",!0);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),!S){e.next=7;break}return e.abrupt("return",new Promise((function(e,n){var i;f.Z.confirm({centered:!0,width:530,okText:"确定",cancelText:"取消",title:"提示",content:(0,y.jsx)("div",{className:"tc font16",children:"是否确认删除?"}),onOk:(i=o()(l()().mark((function n(){return l()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,t();case 2:n.sent,_.ZP.success("删除成功"),e(!0);case 5:case"end":return n.stop()}}),n)}))),function(){return i.apply(this,arguments)}),onCancel:function(){return e(!1)}})})));case 7:return e.next=9,t();case 9:return e.abrupt("return",e.sent);case 10:case"end":return e.stop()}}),e)}))),function(e){return X.apply(this,arguments)})};return(0,y.jsxs)("div",{className:"multi-upload ".concat(a||""),children:[T&&(0,y.jsxs)(k,r()(r()({},ee),{},{children:[(0,y.jsx)("p",{className:"ant-upload-drag-icon",children:(0,y.jsx)(w.Z,{})}),(0,y.jsxs)("p",{className:"ant-upload-text",children:["点击上传图标,选择要上传的文件或将文件拖拽到此",(0,y.jsx)("br",{}),"(单个文件最大限制为",u,"MB)"," "]}),P]})),!T&&(0,y.jsxs)(h.Z,r()(r()({},ee),{},{children:[(0,y.jsxs)(x.ZP,{disabled:O,className:"upload_button",children:[(0,y.jsx)("img",{className:"aBtn_img",src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEwLjM1NCAzLjVoLTIuNzd2OC4xNjdINi40MTZWMy41SDMuNjQ2TDcgMGwzLjM1NCAzLjVaTTE0IDdoLTEuMTY3djUuODMzSDEuMTY3VjdIMHY3aDE0VjdaIiBmaWxsPSIjMzA2MUQwIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4="}),I]}),(0,y.jsxs)("span",{onClick:function(e){e.preventDefault(),e.stopPropagation()},className:"upload_text",children:["(单个文件最大",u,"MB)"," "]})]}))]})}},51932:function(e,n,t){t.d(n,{h:function(){return p},x:function(){return m}});var i=t(82242),l=t.n(i),s=t(39647),o=t.n(s),a=t(70464),r=t(47109),c=t(28388),d=t(37712),u=["value","onChange","scrollId"],p=function(e){var n=e.value,t=e.onChange,i=e.scrollId,s=o()(e,u);return(0,d.jsx)("div",{id:i||"",children:(0,d.jsx)(a.Z,l()(l()({},s),{},{defaultValue:n,onChange:function(e,n){console.log("a:",e,n),null!=n&&n.length?t(e,n):t(e)}}))})},m=function(e){var n=e.value,t=e.onChange,i=e.placeholder,l=e.height,s=void 0===l?140:l;return e.isEdit?(0,d.jsx)(a.Z,{watch:!0,isFocus:!0,height:s,placeholder:i,defaultValue:n,onChange:t}):(0,d.jsx)("div",{style:{cursor:"pointer"},children:n?(0,d.jsx)(c.Z,{className:r.Z.inputBorder,value:n}):(0,d.jsx)("div",{className:"".concat(r.Z.inputBorder," ").concat(r.Z.placeholder," inputBorderError"),children:i})})}},95154:function(e,n,t){t.d(n,{Z:function(){return D},P:function(){return T}});var i=t(37205),l=t.n(i),s=t(39647),o=t.n(s),a=t(7557),r=t.n(a),c=t(82242),d=t.n(c),u=t(41498),p=t.n(u),m=t(79800),h=t.n(m),_=t(59301),f=t(78241),x=t(43418),v=t(5112),g=t(98135),y=t(14491),j="brief___LOzpE",b="contentTitle___xkdcN",w="content___Vtri0",Z="antdTable___s8T2N",k="tableCell___kN9Fw",N="antdModal___WVBk3",I="orangeColor___ryB2u",A=t(17047),S=t(37712),C=["isImportMultipleCourse"],F=function(e){var n=e.studentNames,t=e.total;return t>3?(0,S.jsxs)(S.Fragment,{children:["课堂内有",(0,S.jsx)("span",{className:I,children:null==n?void 0:n.join("、")}),"等",(0,S.jsx)("span",{className:I,children:t}),"名学生"]}):(0,S.jsxs)(S.Fragment,{children:["课堂内有",(0,S.jsx)("span",{className:I,children:null==n?void 0:n.join("、")}),["","一","两","三"][t],"名学生"]})},P=function(e){var n=e.onCancel,t=e.onOk,i=e.visible,l=(e.inPaper,e.renderData),s=(e.type,e.isMultipleCourse),o=void 0!==s&&s,a=f.Z.useForm(),c=h()(a,1)[0],u=(0,_.useState)(1),m=h()(u,2),g=m[0],y=m[1],j=(0,_.useState)(!1),b=h()(j,2),Z=b[0],k=b[1],A=(0,_.useMemo)((function(){return 1===(null==l?void 0:l.total_num)&&1===(null==l?void 0:l.can_copy_num)}),[l]),C=(0,_.useMemo)((function(){var e;return null==l||null===(e=l.course_data_list)||void 0===e?void 0:e.filter((function(e){return e.is_show}))}),[l]);return(0,S.jsx)(S.Fragment,{children:A?(0,S.jsxs)(x.Z,{centered:!0,closable:!0,open:i,destroyOnClose:!0,title:"提示",className:N,width:682,confirmLoading:Z,onCancel:n,onOk:p()(r()().mark((function e(){var n,i,s;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return k(!0),n=g,o&&(s=d()({},c.getFieldsValue()),n=null==l||null===(i=l.course_data_list)||void 0===i?void 0:i.map((function(e){return void 0!==s[e.id]?d()(d()({},e),{},{is_copy:s[e.id]}):e}))),e.next=5,t(n);case 5:k(!1);case 6:case"end":return e.stop()}}),e)}))),children:[(0,S.jsx)("div",{className:w,style:{marginBottom:20},children:o?"检测到以下课堂已在教学课堂中使用,请问是否复制成新的实训发送至教学课堂中?":(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(F,{studentNames:null==l?void 0:l.student_names,total:null==l?void 0:l.student_count}),"学习过该实践项目。该项目支持复制,请选择是否将该项目复制为新项目发送至课堂中?"]})}),o?(0,S.jsx)(f.Z,{form:c,preserve:!1,children:null==C?void 0:C.map((function(e){return(0,S.jsxs)(_.Fragment,{children:[(0,S.jsx)("h3",{className:"ml15 mb5",children:e.name}),(0,S.jsx)(f.Z.Item,{name:e.id,initialValue:1,children:(0,S.jsxs)(v.ZP.Group,{className:w,children:[(0,S.jsx)(v.ZP,{value:1,style:{color:"#464f66"},children:"复制实训"}),(0,S.jsx)(v.ZP,{value:0,style:{color:"#464f66"},children:"不复制实训"})]})})]},e.id)}))}):(0,S.jsxs)(v.ZP.Group,{value:g,onChange:function(e){return y(e.target.value)},className:w,style:{marginBottom:30},children:[(0,S.jsx)(v.ZP,{value:1,style:{color:"#464f66"},children:"复制"}),(0,S.jsx)(v.ZP,{value:0,style:{color:"#464f66"},children:"不复制"})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("div",{className:w,style:{marginBottom:10},children:"* 说明:"}),(0,S.jsx)("div",{className:w,style:{marginBottom:20},children:"1、复制:系统将复制并创建一个新的项目发送到课堂中使用(不会复制学生的挑战记录),新的项目支持进行编辑并与原项目信息互不影响。"}),(0,S.jsx)("div",{className:"".concat(w," ").concat(I),children:"2、不复制:当前项目会被直接发送到课堂中使用,挑战过该项目的学生再次进入项目开启挑战时,会清空之前的挑战记录。"})]})]}):(0,S.jsx)(x.Z,{centered:!0,closable:!0,destroyOnClose:!0,open:i,confirmLoading:Z,title:"提示",width:682,onCancel:n,onOk:p()(r()().mark((function e(){var n,i,s;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return k(!0),n=0,o&&(s=d()({},c.getFieldsValue()),n=null==l||null===(i=l.course_data_list)||void 0===i?void 0:i.map((function(e){return void 0!==s[e.id]?d()(d()({},e),{},{is_use:s[e.id]}):e}))),e.next=5,t(n);case 5:k(!1);case 6:case"end":return e.stop()}}),e)}))),children:(0,S.jsxs)("div",{className:w,children:[(0,S.jsx)(F,{studentNames:null==l?void 0:l.student_names,total:null==l?void 0:l.student_count}),"学习过该实践项目。",o?(0,S.jsxs)(f.Z,{form:c,preserve:!1,children:[(0,S.jsx)("h3",{children:"当前实训不可复制,已经检测到以下课堂存在该实训,同一实训在课堂中重复使用时,会导致成绩互相影响,请确认是否继续使用"}),null==C?void 0:C.map((function(e){return(0,S.jsxs)(_.Fragment,{children:[(0,S.jsx)("h3",{className:"ml15 mb5",children:e.name}),(0,S.jsx)(f.Z.Item,{name:e.id,initialValue:1,children:(0,S.jsxs)(v.ZP.Group,{className:w,children:[(0,S.jsx)(v.ZP,{value:1,style:{color:"#464f66"},children:"继续使用"}),(0,S.jsx)(v.ZP,{value:0,style:{color:"#464f66"},children:"不使用"})]})})]},e.id)}))]}):(0,S.jsxs)("div",{children:["该项目不支持复制,若确认继续发送,",(0,S.jsx)("span",{className:I,children:"当前项目会被直接发送到课堂中使用,挑战过该项目的学生再次进入项目开启挑战时,会清空之前的挑战记录。"}),"(如果不想清空学生之前的挑战记录,建议参照该实践项目的内容自行创建一个新的项目,或者尝试联系项目创建人开放本项目的复制权限)。"]})]})})})},T=function(){var e=(0,_.useState)(!1),n=h()(e,2),t=n[0],i=n[1],l=(0,_.useState)(),s=h()(l,2),a=s[0],c=s[1],d=function(){var e=p()(r()().mark((function e(n){var t,l,s,a,d;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.isImportMultipleCourse,l=void 0!==t&&t,s=o()(n,C),console.log(n),e.t0=null==n?void 0:n.result,e.t0){e.next=7;break}return e.next=6,(0,A.Tr)(s);case 6:e.t0=e.sent;case 7:if(!("status"in(a=e.t0))){e.next=10;break}return e.abrupt("return",!1);case 10:if(!l){e.next=17;break}if(!(null==a||null===(d=a.course_data_list)||void 0===d?void 0:d.some((function(e){return e.is_show})))){e.next=16;break}return c(a),i(!0),e.abrupt("return",!0);case 16:return e.abrupt("return",a.course_data_list||[]);case 17:if(0!==a.student_count){e.next=19;break}return e.abrupt("return",!1);case 19:return c(a),i(!0),e.abrupt("return",!0);case 22:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();return[t,function(){return i(!1)},a,d]},L=function(e){var n=f.Z.useForm(),t=h()(n,1)[0],i=(0,_.useState)(!1),s=h()(i,2),o=s[0],a=s[1],c=e.onCancel,d=e.onOk,u=e.visible,m=e.inPaper,w=void 0!==m&&m,A=e.renderData,C=e.type,P=e.isMultipleCourse,T=void 0!==P&&P,L=e.position,D=(0,_.useMemo)((function(){return w?[{title:"实践项目名称",dataIndex:"name",width:424,align:"center",ellipsis:!0,className:k,render:function(e,n){return(0,S.jsx)("a",{href:"/shixuns/".concat(n.identifier,"/challenges"),target:"_blank",children:e})}},{title:"是否复制",dataIndex:"is_copy",align:"center",render:function(e,n){return(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(f.Z.Item,{name:["".concat("subject"===C?n.stage_shixun_id:n.shixun_course_id||n.id),"is_copy"],initialValue:1,children:(0,S.jsxs)(v.ZP.Group,{children:[(0,S.jsx)(v.ZP,{value:1,children:"是"}),(0,S.jsx)(v.ZP,{value:0,children:"否"})]})}),(0,S.jsx)(f.Z.Item,{name:["".concat("subject"===C?null==n?void 0:n.stage_shixun_id:n.shixun_course_id||n.id),"is_use"],hidden:!0,initialValue:1,children:(0,S.jsx)(g.Z,{type:"hidden"})})]})}}]:[{title:"实践项目名称",dataIndex:"name",width:424,align:"center",ellipsis:!0,className:k,render:function(e,n){return(0,S.jsx)("a",{href:"/shixuns/".concat(n.identifier,"/challenges"),target:"_blank",children:e})}},{title:"是否使用",dataIndex:"is_use",align:"center",render:function(e,n){return(0,S.jsx)(f.Z.Item,{name:["".concat("subject"===C?n.stage_shixun_id:n.shixun_course_id||n.id),"is_use"],initialValue:1,children:(0,S.jsxs)(v.ZP.Group,{children:[(0,S.jsx)(v.ZP,{value:1,children:"是"}),(0,S.jsx)(v.ZP,{value:0,children:"否"})]})})}},{title:"是否复制",dataIndex:"is_copy",align:"center",render:function(e,n){return(0,S.jsx)(f.Z.Item,{name:["".concat("subject"===C?n.stage_shixun_id:n.shixun_course_id||n.id),"is_copy"],initialValue:1,children:(0,S.jsxs)(v.ZP.Group,{children:[(0,S.jsx)(v.ZP,{value:1,children:"是"}),(0,S.jsx)(v.ZP,{value:0,children:"否"})]})})}}]}),[w]),E=(0,_.useMemo)((function(){return w?[{title:"实践项目名称",dataIndex:"name",width:424,className:k,align:"center",ellipsis:!0,render:function(e,n){return(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)("a",{href:"/shixuns/".concat(n.identifier,"/challenges"),target:"_blank",children:e}),(0,S.jsx)(f.Z.Item,{name:["".concat("subject"===C?null==n?void 0:n.stage_shixun_id:n.shixun_course_id||n.id),"is_copy"],hidden:!0,initialValue:0,children:(0,S.jsx)(g.Z,{type:"hidden"})}),(0,S.jsx)(f.Z.Item,{name:["".concat("subject"===C?null==n?void 0:n.stage_shixun_id:n.shixun_course_id||n.id),"is_use"],hidden:!0,initialValue:1,children:(0,S.jsx)(g.Z,{type:"hidden"})})]})}}]:[{title:"实践项目名称",dataIndex:"name",width:424,className:k,ellipsis:!0,align:"center",render:function(e,n){return(0,S.jsx)("a",{href:"/shixuns/".concat(n.identifier,"/challenges"),target:"_blank",children:e})}},{title:"是否使用",dataIndex:"is_use",align:"center",render:function(e,n){return(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(f.Z.Item,{name:["".concat("subject"===C?null==n?void 0:n.stage_shixun_id:n.shixun_course_id||n.id),"is_use"],initialValue:0,children:(0,S.jsxs)(v.ZP.Group,{children:[(0,S.jsx)(v.ZP,{value:1,children:"是"}),(0,S.jsx)(v.ZP,{value:0,children:"否"})]})}),(0,S.jsx)(f.Z.Item,{name:["".concat("subject"===C?null==n?void 0:n.stage_shixun_id:n.shixun_course_id||n.id),"is_copy"],hidden:!0,initialValue:0,children:(0,S.jsx)(g.Z,{type:"hidden"})})]})}}]}),[w]);if(T){var R={title:"课堂名称",ellipsis:!0,dataIndex:"course_name",width:190,align:"center",className:k,render:function(e,n){return(0,S.jsx)("a",{href:"/classrooms/".concat(n.course_id),children:e})}};D=[R].concat(l()(D)),E=[R].concat(l()(E))}var M=(0,_.useMemo)((function(){return function(e){var n=e.used,t=e.copy,i=e.canNotCopy,l=e.studentNames,s=e.studentCount,o=e.inPaper,a=e.is_random,r=void 0!==a&&a,c=e.position,d=(void 0===c?"":c)||(o?"试卷":"课程");return(0,S.jsxs)("span",{children:[(0,S.jsx)(F,{studentNames:l,total:s}),"学习过",d,"中的",(0,S.jsx)("span",{className:I,children:n}),"个项目,",t>0&&i>0?(0,S.jsxs)(S.Fragment,{children:["其中",(0,S.jsx)("span",{className:I,children:t}),"个项目支持复制,",(0,S.jsx)("span",{className:I,children:i}),"个项目不支持复制"]}):t>0&&0===i?(0,S.jsxs)(S.Fragment,{children:["其中",(0,S.jsx)("span",{className:I,children:t}),"个项目支持复制"]}):0===t&&i>0?(0,S.jsxs)(S.Fragment,{children:["其中",(0,S.jsx)("span",{className:I,children:i}),"个项目不支持复制"]}):void 0,"。请选择",r?"":"是否继续使用和","是否复制为新项目发送至课堂中?"]})}({used:null==A?void 0:A.repeat_shixun_num,copy:null==A?void 0:A.can_copy_num,canNotCopy:null==A?void 0:A.no_copy_num,studentNames:null==A?void 0:A.student_names,studentCount:null==A?void 0:A.student_count,is_random:null==A?void 0:A.is_random,inPaper:w,position:L})}),[A,w,L]);return(0,S.jsx)(x.Z,{title:"提示",centered:!0,open:u,confirmLoading:o,onOk:p()(r()().mark((function e(){var n,i;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a(!0),n=t.getFieldsValue(),i=Object.keys(n).map((function(e){return{id:parseInt(e.split("_")[0]),course_id:parseInt(e.split("_")[1]),is_use:n[e].is_use,is_copy:n[e].is_copy}})),e.next=5,d(i);case 5:a(!1);case 6:case"end":return e.stop()}}),e)}))),onCancel:c,width:880,okText:"确认",className:N,destroyOnClose:!0,children:(0,S.jsxs)(f.Z,{form:t,preserve:!1,children:[(0,S.jsx)("div",{className:j,children:M}),(0,S.jsxs)("div",{style:{marginBottom:30},children:[(0,S.jsx)("div",{style:{marginBottom:20},children:"* 说明"}),(0,S.jsx)("div",{style:{marginBottom:20},children:"1、复制:系统将复制并创建一个新的项目发送到课堂中使用(不会复制学生的挑战记录),新的项目支持进行编辑并与原项目信息互不影响。"}),(0,S.jsx)("div",{className:I,children:"2、不复制:当前项目会被直接发送到课堂中使用,挑战过该项目的学生再次进入项目开启挑战时,会清空之前的挑战记录。"})]}),(null==A?void 0:A.can_copy_num)>0&&(0,S.jsxs)("div",{children:[(0,S.jsx)("div",{className:b,children:"支持复制的项目"}),(0,S.jsx)(y.Z,{columns:D,className:Z,dataSource:null==A?void 0:A.can_copy_list,rowKey:"subject"===C?"stage_shixun_id":"id",pagination:!1,scroll:{y:240},bordered:!0})]}),(null==A?void 0:A.no_copy_num)>0&&(0,S.jsxs)("div",{children:[(0,S.jsx)("div",{className:b,children:"不支持复制的项目"}),(0,S.jsx)(y.Z,{columns:E,className:Z,dataSource:null==A?void 0:A.no_copy_list,rowKey:"subject"===C?"stage_shixun_id":"id",pagination:!1,scroll:{y:200},bordered:!0})]}),(null==A?void 0:A.no_use_list.length)>0&&(null==A?void 0:A.no_use_list.map((function(e){return(0,S.jsxs)("div",{children:[(0,S.jsx)(f.Z.Item,{name:["".concat("subject"===C?null==e?void 0:e.stage_shixun_id:e.shixun_course_id||e.id),"is_copy"],hidden:!0,initialValue:0,children:(0,S.jsx)(g.Z,{type:"hidden"})}),(0,S.jsx)(f.Z.Item,{name:["".concat("subject"===C?null==e?void 0:e.stage_shixun_id:e.shixun_course_id||e.id),"is_use"],hidden:!0,initialValue:1,children:(0,S.jsx)(g.Z,{type:"hidden"})})]},"subject"===C?e.stage_shixun_id:e.shixun_course_id||e.id)})))]})})},D=function(e){return"multiple"===e.modalType?(0,S.jsx)(L,d()({},e)):(0,S.jsx)(P,d()({},e))}},22318:function(e,n,t){t.r(n),t.d(n,{default:function(){return cl}});var i=t(82242),l=t.n(i),s=t(7557),o=t.n(s),a=t(41498),r=t.n(a),c=t(79800),d=t.n(c),u=t(39647),p=t.n(u),m=t(59301),h=t(75102),_=t(57809),f=t(78241),x=t(43418),v=t(8591),g=t(66104),y=t(6848),j=t(98135),b=t(5112),w=t(88522),Z=t(3113),k={flex_box_center:"flex_box_center___Pwy41",flex_space_between:"flex_space_between___iGrQJ",flex_box_vertical_center:"flex_box_vertical_center___yCxnY",flex_box_center_end:"flex_box_center_end___WYWWp",flex_box_column:"flex_box_column___XMpFi",bg:"bg___WrQc9",top:"top___eHaMu",title:"title___ZzSKL",img:"img___TSo4p",span:"span___i1hTN",button:"button___M8rSK",content:"content___BOwAQ",Banner:"Banner___t6PnF",right:"right___x1tqT",titles:"titles___UHOD8",bonus:"bonus___l9Tlu",items:"items___CPICU",bottom:"bottom___HHYt7",tag:"tag___DBN6l",jsinput:"jsinput___oh61y",baseFormItem:"baseFormItem___t5ZrH",scoremodal:"scoremodal___yE6h8",yes:"yes___XyW4g",no:"no___kIYD7",bottoms:"bottoms___X64Ij",loaderimg:"loaderimg___w2vWU",enroll:"enroll___lbTQ5",publish:"publish___kDAkJ",ended:"ended___mycKl",form_item:"form_item___lsqU3",form_item_item:"form_item_item___Zdnul",form_item_item_select:"form_item_item_select____5lDo",shareicon:"shareicon___Z_RCj",ApplyStyle:"ApplyStyle___Hyn8j"},N=t(12752),I="all___CqKTx",A="setting___v3_ot",S="setting_title___WxGAY",C="setting_content___XAWD6",F="setting_menu___oKuAW",P="menu_item___qbDG8",T="menu_item_active___kzN6I",L="setting_info___pqlf5",D="all___dBmCY",E="title___IeVqW",R="content___zp_KL",M="form_item___hXuXB",V="form_item_basic___K4a8V",B="form_item_time___h8rdI",z="form_item_model____Mn2H",O="form_item_item___CR0Q5",Y="form_item_item_select___eeMCh",H="textarea_father___XVeQz",q="textarea_length___Xdwl4",Q="upload_button___zltZE",G="upload_button_file___vVqry",U="upload_text___pdO7Y",W="date_text___gvUlY",J="upload_download___KCtvw",K="checkbox_text___yn4Cf",X="footer___t6QDc",$="save_button___l7JJ7",ee="radio_style___tWyOo",ne=t(46651),te=t(84291),ie=t(24905),le=t(95237),se=t(43604),oe=t(14491),ae=t(99232),re=t.n(ae),ce=t(58899),de=t(45020),ue=t(22107),pe=t(67016),me=t(11298),he=t(37712),_e=["competitions","dispatch"],fe=j.Z.TextArea,xe=(0,h.connect)((function(e){return{competitions:e.competitions}}))((function(e){var n,t,i,s=e.competitions,a=e.dispatch,c=p()(e,_e),u=f.Z.useForm(),g=d()(u,1)[0],w=(0,m.useState)({}),k=d()(w,2),N=k[0],I=k[1],A=(0,m.useState)(0),S=d()(A,2),C=S[0],F=S[1],P=(0,m.useState)(),T=d()(P,2),L=T[0],ae=T[1],xe=(0,m.useState)(),ve=d()(xe,2),ge=ve[0],ye=ve[1],je=(0,m.useState)(!1),be=d()(je,2),we=be[0],Ze=be[1],ke=(0,m.useState)(!1),Ne=d()(ke,2),Ie=Ne[0],Ae=Ne[1],Se=(0,m.useState)(!1),Ce=d()(Se,2),Fe=Ce[0],Pe=Ce[1],Te=(0,m.useState)(!1),Le=d()(Te,2),De=Le[0],Ee=Le[1],Re=(0,m.useState)(!1),Me=d()(Re,2),Ve=Me[0],Be=Me[1],ze=(0,m.useState)([]),Oe=d()(ze,2),Ye=Oe[0],He=Oe[1],qe=(0,m.useState)(0),Qe=d()(qe,2),Ge=Qe[0],Ue=Qe[1],We=(0,m.useState)(!1),Je=d()(We,2),Ke=Je[0],Xe=Je[1],$e=(0,m.useState)([]),en=d()($e,2),nn=en[0],tn=en[1],ln=(0,m.useState)(!1),sn=d()(ln,2),on=(sn[0],sn[1]),an=s.Header,rn=(0,h.useParams)(),cn=function(){var e=r()(o()().mark((function e(n){var t,i,s;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!n.personal||(n.is_student||n.is_teacher||n.is_professional)){e.next=3;break}return v.ZP.error("请选择至少一种身份可以报名参赛"),e.abrupt("return");case 3:i=[],(null==L?void 0:L.length)>0&&(null==L||L.map((function(e){var n;i.push((null==e||null===(n=e.response)||void 0===n?void 0:n.id)||(null==e?void 0:e.id))}))),g.setFieldValue("attachment_ids",i),s=[],(null==ge?void 0:ge.length)>0&&(null==ge||ge.map((function(e){var n;s.push((null==e||null===(n=e.response)||void 0===n?void 0:n.id)||(null==e?void 0:e.id))}))),g.setFieldValue("file_id",s),g.setFieldValue("is_authentication",we),g.setFieldValue("need_phone",Ie),g.setFieldValue("need_mail",Fe),g.setFieldValue("competition_staffs",[{minimum:g.getFieldValue("student_min"),maximum:g.getFieldValue("student_max"),category:"student",mutiple_limited:De,check_phone:!1},{minimum:g.getFieldValue("teacher_min"),maximum:g.getFieldValue("teacher_max"),category:"teacher",mutiple_limited:Ve,check_phone:!1}]),(null===(t=N.identifier)||void 0===t?void 0:t.length)<3?v.ZP.error("比赛网址最少要输入三个字符"):(0,ce.IN)({id:Ge,identifier:g.getFieldValue("identifier")}).then(function(){var e=r()(o()().mark((function e(n){var t,i,s;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!=(null==n?void 0:n.status)&&g.setFieldValue("identifier",""),0!=(null==n?void 0:n.status)){e.next=6;break}return e.next=4,(0,ce.$M)(l()(l()({id:null==c?void 0:c.competitionId},g.getFieldsValue()),{},{enroll_start_time:g.getFieldValue("enroll_start_time")?re()(g.getFieldValue("enroll_start_time")).format("YYYY-MM-DD HH:mm"):"",enroll_end_time:g.getFieldValue("enroll_end_time")?re()(g.getFieldValue("enroll_end_time")).format("YYYY-MM-DD HH:mm"):"",start_time:g.getFieldValue("start_time")?re()(g.getFieldValue("start_time")).format("YYYY-MM-DD HH:mm"):"",end_time:g.getFieldValue("end_time")?re()(g.getFieldValue("end_time")).format("YYYY-MM-DD HH:mm"):""}));case 4:if(0==(null==(t=e.sent)?void 0:t.status)){if(v.ZP.success("更改成功"),(null==t?void 0:t.failed.length)>0){for(s in Xe(!0),i=[],null==t?void 0:t.failed)i.push({phone:null==t?void 0:t.failed[s][0],name:null==t?void 0:t.failed[s][1],email:null==t?void 0:t.failed[s][2]});tn(i)}(null==rn?void 0:rn.identifier)==g.getFieldValue("identifier")?(a({type:"competitions/getStaff",payload:{identifier:null==c?void 0:c.competitionId}}),a({type:"competitions/getHeader",payload:{identifier:null==c?void 0:c.competitionId}})):(null==rn?void 0:rn.identifier)!=g.getFieldValue("identifier")&&h.history.push("/competitions/detail/".concat(g.getFieldValue("identifier"),"?type=4"))}case 6:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}());case 14:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();(0,m.useEffect)((function(){(0,de.GY)({}).then((function(e){He(null==e?void 0:e.schools)})).then((function(){(0,ce.o3)(null==c?void 0:c.competitionId).then((function(e){var n,t,i,s,o,a,r,d,u,p,m,h,_,f,x,v,y,j,b,w;(Ue(null==e?void 0:e.id),g.setFieldValue("is_student",null==e?void 0:e.is_student),g.setFieldValue("is_teacher",null==e?void 0:e.is_teacher),g.setFieldValue("is_professional",null==e?void 0:e.is_professional),g.setFieldValue("name",null==e?void 0:e.name),g.setFieldValue("sub_title",null==e?void 0:e.sub_title),g.setFieldValue("description",null==e?void 0:e.description),g.setFieldValue("identifier",null==e?void 0:e.identifier),g.setFieldValue("bonus",null==e?void 0:e.bonus),g.setFieldValue("awards_count",null==e?void 0:e.awards_count),g.setFieldValue("need_apply_name",null==e||null===(n=e.need_apply_info)||void 0===n?void 0:n.need_apply_name),g.setFieldValue("need_apply_student_id",null==e||null===(t=e.need_apply_info)||void 0===t?void 0:t.need_apply_student_id),g.setFieldValue("need_apply_sex",null==e||null===(i=e.need_apply_info)||void 0===i?void 0:i.need_apply_sex),g.setFieldValue("need_apply_phone",null==e||null===(s=e.need_apply_info)||void 0===s?void 0:s.need_apply_phone),g.setFieldValue("need_apply_grade",null==e||null===(o=e.need_apply_info)||void 0===o?void 0:o.need_apply_grade),g.setFieldValue("need_apply_teacher_name",null==e||null===(a=e.need_apply_info)||void 0===a?void 0:a.need_apply_teacher_name),g.setFieldValue("need_apply_school",null==e||null===(r=e.need_apply_info)||void 0===r?void 0:r.need_apply_school),null==e||null===(d=e.attachments)||void 0===d||d.map((function(e){e.name=e.title})),g.setFieldValue("attachment_ids",null==e?void 0:e.attachments),ae(null==e?void 0:e.attachments),g.setFieldValue("enroll_start_time",null!=e&&e.enroll_start_time?re()(null==e?void 0:e.enroll_start_time):""),g.setFieldValue("enroll_end_time",null!=e&&e.enroll_end_time?re()(null==e?void 0:e.enroll_end_time):""),g.setFieldValue("start_time",null!=e&&e.start_time?re()(null==e?void 0:e.start_time):""),g.setFieldValue("end_time",null!=e&&e.end_time?re()(null==e?void 0:e.end_time):""),g.setFieldValue("rule",null==e?void 0:e.rule),null!=e&&e.file)&&(e.file.name=null==e||null===(h=e.file)||void 0===h?void 0:h.title);(g.setFieldValue("file_id",null==e?void 0:e.file),null!=e&&e.file&&ye([null==e?void 0:e.file]),g.setFieldValue("region_rule",null==e?void 0:e.region_rule),g.setFieldValue("region_schools",null==e?void 0:e.region_school_array),g.setFieldValue("is_authentication",null==e?void 0:e.is_authentication),g.setFieldValue("apply_success_tips",(null==e?void 0:e.apply_success_tips)||"参赛者可扫码加入大赛官方交流群,获取最新竞赛通知"),Ze(null==e?void 0:e.is_authentication),g.setFieldValue("need_phone",null==e?void 0:e.need_phone),Ae(null==e?void 0:e.need_phone),g.setFieldValue("need_mail",null==e?void 0:e.need_mail),Pe(null==e?void 0:e.need_mail),g.setFieldValue("personal",null==e?void 0:e.personal),null!=e&&e.member_staff)?(g.setFieldValue("student_min",null==e||null===(_=e.member_staff)||void 0===_?void 0:_.minimum),g.setFieldValue("student_max",null==e||null===(f=e.member_staff)||void 0===f?void 0:f.maximum),g.setFieldValue("student_checkbox",null==e||null===(x=e.member_staff)||void 0===x?void 0:x.mutiple_limited)):(g.setFieldValue("student_min",0),g.setFieldValue("student_max",1));null!=e&&e.teacher_staff?(g.setFieldValue("teacher_min",null==e||null===(v=e.teacher_staff)||void 0===v?void 0:v.minimum),g.setFieldValue("teacher_max",null==e||null===(y=e.teacher_staff)||void 0===y?void 0:y.maximum),g.setFieldValue("teacher_checkbox",null==e||null===(j=e.teacher_staff)||void 0===j?void 0:j.mutiple_limited)):(g.setFieldValue("teacher_min",0),g.setFieldValue("teacher_max",0));3===(null==e?void 0:e.mode)?(Be(!0),Ee(!0)):(Be(null==e||null===(b=e.teacher_staff)||void 0===b?void 0:b.mutiple_limited),Ee(null==e||null===(w=e.member_staff)||void 0===w?void 0:w.mutiple_limited));Ee(null==e||null===(u=e.member_staff)||void 0===u?void 0:u.mutiple_limited),Be(null==e||null===(p=e.teacher_staff)||void 0===p?void 0:p.mutiple_limited),I(l()({},g.getFieldsValue())),F(null===(m=g.getFieldValue("description"))||void 0===m?void 0:m.length),null==c||c.loadingFunction(!1)}))})),null!=c&&c.formName&&g.scrollToField(null==c?void 0:c.formName)}),[]);var dn=function(e,n){"报名开始时间"==n?g.getFieldValue("enroll_end_time")&&e>=g.getFieldValue("enroll_end_time")&&(v.ZP.error("报名开始时间必须小于报名结束时间"),g.setFieldValue("enroll_start_time",""),g.setFieldValue("enroll_end_time","")):"报名结束时间"==n?g.getFieldValue("enroll_start_time")?e<=g.getFieldValue("enroll_start_time")&&(v.ZP.error("报名结束时间必须大于报名开始时间"),g.setFieldValue("enroll_end_time","")):(v.ZP.error("报名结束时间必须大于报名开始时间"),g.setFieldValue("enroll_end_time","")):"竞赛开始时间"==n?g.getFieldValue("end_time")&&e>=g.getFieldValue("end_time")&&(v.ZP.error("竞赛开始时间必须小于竞赛结束时间"),g.setFieldValue("start_time",""),g.setFieldValue("end_time","")):"竞赛结束时间"==n&&(g.getFieldValue("start_time")?e<=g.getFieldValue("start_time")&&(v.ZP.error("竞赛结束时间必须大于竞赛开始时间"),g.setFieldValue("end_time","")):(v.ZP.error("竞赛结束时间必须大于竞赛开始时间"),g.setFieldValue("end_time","")))};return(0,he.jsxs)("div",{className:D,children:[(0,he.jsxs)(f.Z,{form:g,labelCol:{flex:"120px"},scrollToFirstError:!0,colon:!1,initialValues:{region_rule:0,student_min:0,student_max:1,teacher_min:0,teacher_max:0,is_student:!0,is_teacher:!0,is_professional:!0},onFinish:cn,onFinishFailed:function(){var e=r()(o()().mark((function e(n){var t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:g.scrollToField(null==n||null===(t=n.errorFields)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.name,{behavior:"auto",block:"center"});case 1:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),onChange:function(){var e,n,t=null==g||null===(e=g.getFieldValue("sponsor_user_name"))||void 0===e?void 0:e.replaceAll(" ","");g.setFieldValue("sponsor_user_name",t);var i=g.getFieldsValue();F(null===(n=i.description)||void 0===n?void 0:n.length),I(l()({},i))},children:[(0,he.jsx)("div",{className:E,children:"基本信息"}),(0,he.jsxs)("div",{className:R,children:[(0,he.jsx)(f.Z.Item,{style:{marginTop:"-15px"},className:M,label:"竞赛主标题",colon:!1,name:"name",rules:[{required:!0,message:"必填项:不能为空"}],children:(0,he.jsx)(j.Z,{className:O,placeholder:"请输入竞赛主标题",maxLength:60,suffix:(0,he.jsxs)("span",{children:[(null===(n=N.name)||void 0===n?void 0:n.length)||0,(0,he.jsx)("span",{style:{color:"#c5c5c5"},children:"/60"})]})})}),(0,he.jsx)(f.Z.Item,{className:V,label:"竞赛副标题",colon:!1,name:"sub_title",children:(0,he.jsx)(j.Z,{className:O,placeholder:"请输入竞赛副标题",maxLength:60,suffix:(0,he.jsxs)("span",{children:[(null===(t=N.sub_title)||void 0===t?void 0:t.length)||0,(0,he.jsx)("span",{style:{color:"#c5c5c5"},children:"/60"})]})})}),(0,he.jsxs)("div",{className:H,children:[(0,he.jsx)(f.Z.Item,{className:M,label:"竞赛简介",colon:!1,name:"description",children:(0,he.jsx)(fe,{maxLength:200,placeholder:"请输入简介",rows:5})}),(0,he.jsxs)("span",{className:q,children:[C||0,(0,he.jsx)("span",{style:{color:"#c5c5c5"},children:"/200"})]})]}),(0,he.jsx)(f.Z.Item,{className:V,label:(0,he.jsxs)("div",{children:[(0,he.jsx)("span",{style:{color:"#ff4d4f",marginRight:"4px",fontFamily:"SimSun, sans-serif"},children:"*"}),"比赛网址"]}),colon:!1,children:(0,he.jsxs)("div",{style:{display:"flex"},children:[(0,he.jsxs)("div",{style:{width:"40%"},children:[window.location.origin,"/competitions/detail/"]}),(0,he.jsx)(y.Z,{placement:"topLeft",color:"#fb3226",overlayStyle:{maxWidth:"350px",width:"350px"},title:"如果修改竞赛网址,会造成参赛人员无法再次通过旧网址进入",children:(0,he.jsx)(f.Z.Item,{style:{width:"calc(68% + 16px)",marginLeft:"-16px"},label:(0,he.jsx)("div",{style:{width:"0px"}}),colon:!1,name:"identifier",rules:[{required:!0,message:"必填项:不能为空"},{pattern:new RegExp(/^[A-Za-z0-9\-_]*$/,""),message:"必须是数字、字母、下划线或者横线"}],children:(0,he.jsx)(j.Z,{className:O,placeholder:"请输入网址",maxLength:20,suffix:(0,he.jsxs)("span",{children:[(null===(i=N.identifier)||void 0===i?void 0:i.length)||0,(0,he.jsx)("span",{style:{color:"#c5c5c5"},children:"/20"})]}),onBlur:function(){on(!1),(0,ce.IN)({id:Ge,identifier:g.getFieldValue("identifier")}).then((function(e){0!=(null==e?void 0:e.status)&&g.setFieldValue("identifier","")}))},onChange:function(){on(!0)},disabled:"ended"==(null==an?void 0:an.competition_status)})})})]})}),(0,he.jsx)(f.Z.Item,{className:V,style:{marginTop:"-12px"},label:"奖金金额",colon:!1,name:"bonus",rules:[{pattern:new RegExp(/^\d{0,8}$/,"g"),message:"必须是8位数以内的正整数"}],children:(0,he.jsx)(j.Z,{autoComplete:"off",className:O,placeholder:"如果需要设置奖金,请与平台客服人员对接",suffix:(0,he.jsx)("span",{style:{color:"#c5c5c5"},children:"元"})})}),(0,he.jsx)(f.Z.Item,{className:V,label:"奖项数量",colon:!1,name:"awards_count",rules:[{pattern:new RegExp(/^\d{0,9}$/,"g"),message:"必须是正整数"}],children:(0,he.jsx)(j.Z,{autoComplete:"off",className:O,placeholder:"请输入奖项数量",suffix:(0,he.jsx)("span",{style:{color:"#c5c5c5"},children:"个"})})}),(0,he.jsx)(f.Z.Item,{name:"attachment_ids",label:"举办资质文档",colon:!1,getValueFromEvent:function(e){return Array.isArray(e)?e:e&&e.fileList},children:(0,he.jsxs)("div",{style:{display:"flex"},children:[(0,he.jsx)(ne.Z,{action:ue.Z.API_SERVER+"/api/attachments.json",onChange:function(e){ae(null==e?void 0:e.fileList)},onRemove:function(e){console.log(e),ae([])},fileList:L,withCredentials:!0,children:(0,he.jsx)("div",{className:Q,children:"上传文档"})}),(0,he.jsx)("div",{className:U,children:"如果涉及到竞赛奖金相关事项,请上传相关资质的证明文件,有便于竞赛快速审核通过"})]})}),(0,he.jsx)(f.Z.Item,{className:V,label:"报名时间",colon:!1,children:(0,he.jsxs)("div",{style:{display:"flex"},children:[(0,he.jsx)(f.Z.Item,{name:"enroll_start_time",children:(0,he.jsx)(te.default,{style:{height:"40px"},showTime:!0,format:"YYYY-MM-DD HH:mm",onChange:function(e){dn(e,"报名开始时间")}})}),(0,he.jsx)("span",{style:{margin:"0 10px"},children:"至"}),(0,he.jsx)(f.Z.Item,{name:"enroll_end_time",children:(0,he.jsx)(te.default,{style:{height:"40px"},showTime:!0,format:"YYYY-MM-DD HH:mm",onChange:function(e){dn(e,"报名结束时间")}})}),(0,he.jsx)("div",{className:W,children:"如果不填报名时间,则竞赛发布后将不展示报名入口"})]})}),(0,he.jsx)(f.Z.Item,{className:B,label:(0,he.jsxs)("div",{children:[(0,he.jsx)("span",{style:{color:"#ff4d4f",marginRight:"4px",fontFamily:"SimSun, sans-serif"},children:"*"}),"竞赛时间"]}),colon:!1,children:(0,he.jsxs)("div",{style:{display:"flex"},children:[(0,he.jsx)(f.Z.Item,{name:"start_time",rules:[{required:!0,message:"必填项:不能为空"}],children:(0,he.jsx)(te.default,{style:{height:"40px"},showTime:!0,format:"YYYY-MM-DD HH:mm",onChange:function(e){dn(e,"竞赛开始时间")},disabled:"progressing"==(null==an?void 0:an.competition_status)||"ended"==(null==an?void 0:an.competition_status)})}),(0,he.jsx)("span",{style:{margin:"0 10px"},children:"至"}),(0,he.jsx)(f.Z.Item,{name:"end_time",rules:[{required:!0,message:"必填项:不能为空"}],children:(0,he.jsx)(te.default,{style:{height:"40px"},showTime:!0,format:"YYYY-MM-DD HH:mm",onChange:function(e){dn(e,"竞赛结束时间")},disabled:"ended"==(null==an?void 0:an.competition_status)})})]})}),(0,he.jsx)(f.Z.Item,{className:B,label:(0,he.jsxs)("div",{children:[(0,he.jsx)("span",{style:{color:"#ff4d4f",marginRight:"4px",fontFamily:"SimSun, sans-serif"},children:"*"}),"报名成功提示"]}),colon:!1,children:(0,he.jsxs)("div",{style:{display:"flex"},children:[(0,he.jsx)(f.Z.Item,{style:{width:"100%"},colon:!1,name:"apply_success_tips",children:(0,he.jsx)(j.Z,{autoComplete:"off",style:{width:"100%"},className:O,placeholder:"请输入报名成功提示"})}),(0,he.jsx)(Z.ZP,{onClick:function(){var e;x.Z.confirm({title:!1,closable:!0,icon:null,footer:!1,content:(0,he.jsxs)("div",{children:[(0,he.jsxs)("div",{style:{fontSize:26,color:"#3d3d3d",textAlign:"center",marginBottom:20},children:[(0,he.jsx)("i",{style:{fontSize:26,color:"#52C41A"},className:"iconfont icon-tongguo"})," 报名成功"]}),(0,he.jsxs)("div",{style:{alignItems:"center",textAlign:"center"},children:[(0,he.jsx)("img",{style:{width:180,border:"1px solid #eeeeef",padding:10,marginBottom:20},src:ue.Z.IMG_SERVER+(null==an?void 0:an.QR_code)}),(0,he.jsx)("p",{style:{color:"#AAAAAA"},children:null===(e=g.getFieldsValue())||void 0===e?void 0:e.apply_success_tips})]})]})})},style:{marginLeft:10,marginTop:3},type:"primary",children:"示例"})]})})]}),(0,he.jsx)("div",{className:E,children:"开放范围"}),(0,he.jsxs)("div",{className:R,children:[(0,he.jsx)(f.Z.Item,{className:ee,label:"参赛规则",name:"rule",colon:!1,children:(0,he.jsxs)(b.ZP.Group,{children:[(0,he.jsx)(b.ZP,{value:0,style:{width:"120px"},children:"按范围参加"}),(0,he.jsx)(b.ZP,{value:1,style:{width:"120px"},children:"自定用户参加"})]})}),1==g.getFieldValue("rule")&&(0,he.jsx)(f.Z.Item,{name:"file_id",label:" ",colon:!1,getValueFromEvent:function(e){return Array.isArray(e)?e:e&&e.fileList},children:(0,he.jsxs)("div",{style:{marginLeft:"0px",display:"flex"},children:[(0,he.jsx)(ne.Z,{accept:".xls, .xlsx",maxCount:1,action:ue.Z.API_SERVER+"/api/attachments.json",onChange:function(e){ye(null==e?void 0:e.fileList)},onRemove:function(e){console.log(e),ye([])},fileList:ge,withCredentials:!0,children:(0,he.jsx)("div",{className:G,children:"选择文件"})}),(0,he.jsxs)("div",{className:J,style:{marginLeft:30},onClick:function(){(0,me.Nd)(null,ue.Z.API_SERVER+"/api/competitions/download_template")},children:["下载模版",(0,he.jsx)("i",{className:"iconfont icon-xiazai5 font14 ml5"})]})]})}),0==g.getFieldValue("rule")&&(0,he.jsx)(f.Z.Item,{label:"选择院校",name:"region_rule",className:ee,colon:!1,style:{marginTop:"-3px"},children:(0,he.jsxs)(b.ZP.Group,{children:[(0,he.jsx)(b.ZP,{value:0,style:{width:"120px"},children:"全部院校"}),(0,he.jsx)(b.ZP,{value:1,style:{width:"120px"},children:"部分院校"})]})}),1==g.getFieldValue("region_rule")&&0==g.getFieldValue("rule")&&(0,he.jsx)(f.Z.Item,{className:M,style:{marginTop:"-3px"},label:" ",colon:!1,name:"region_schools",children:(0,he.jsx)(_.default,{mode:"multiple",className:Y,options:Ye,fieldNames:{label:"name",value:"id"},filterOption:function(e,n){var t;return(null!==(t=null==n?void 0:n.name)&&void 0!==t?t:"").toLowerCase().includes(e.toLowerCase())}})})]}),(0,he.jsx)("div",{className:E,children:"报名者条件"}),(0,he.jsxs)("div",{className:R,children:[(0,he.jsx)(f.Z.Item,{label:"报名条件",name:"is_authentication",className:ee,style:{marginTop:"-10px"},colon:!1,children:(0,he.jsxs)(ie.Z,{checked:we,onChange:function(e){var n;return Ze(null==e||null===(n=e.target)||void 0===n?void 0:n.checked)},children:["实名认证",(0,he.jsx)("span",{className:K,children:"(参赛人员账号必须实名认证)"})]})}),(0,he.jsx)(f.Z.Item,{label:" ",name:"need_phone",style:{marginTop:"-10px"},colon:!1,children:(0,he.jsxs)(ie.Z,{checked:Ie,onChange:function(e){var n;return Ae(null==e||null===(n=e.target)||void 0===n?void 0:n.checked)},children:["绑定手机",(0,he.jsx)("span",{className:K,children:"(参赛人员账号必须绑定手机号)"})]})}),(0,he.jsx)(f.Z.Item,{label:" ",name:"need_mail",style:{marginTop:"-10px"},colon:!1,children:(0,he.jsxs)(ie.Z,{checked:Fe,onChange:function(e){var n;return Pe(null==e||null===(n=e.target)||void 0===n?void 0:n.checked)},children:["绑定邮箱",(0,he.jsx)("span",{className:K,children:"(参赛人员账号必须绑定邮箱)"})]})}),(0,he.jsx)("div",{style:{display:"flex",marginBottom:20},children:(0,he.jsxs)("div",{style:{paddingLeft:50,textAlign:"end"},children:["报名信息 ",(0,he.jsx)("span",{style:{marginLeft:0},className:K,children:"(参赛人员报名时需填写的信息)"})]})}),(0,he.jsx)(f.Z.Item,{label:" ",children:(0,he.jsxs)(le.Z,{wrap:!1,gutter:10,children:[(0,he.jsx)(se.Z,{children:(0,he.jsx)(f.Z.Item,{name:"need_apply_name",style:{marginTop:"-12px"},valuePropName:"checked",children:(0,he.jsx)(ie.Z,{children:"姓名"})})}),(0,he.jsx)(se.Z,{children:(0,he.jsx)(f.Z.Item,{name:"need_apply_student_id",style:{marginTop:"-12px"},valuePropName:"checked",children:(0,he.jsx)(ie.Z,{children:"学号"})})}),(0,he.jsx)(se.Z,{children:(0,he.jsx)(f.Z.Item,{name:"need_apply_sex",style:{marginTop:"-12px"},valuePropName:"checked",children:(0,he.jsx)(ie.Z,{children:"性别"})})}),(0,he.jsx)(se.Z,{children:(0,he.jsx)(f.Z.Item,{name:"need_apply_phone",style:{marginTop:"-12px"},valuePropName:"checked",children:(0,he.jsx)(ie.Z,{children:"电话"})})}),(0,he.jsx)(se.Z,{children:(0,he.jsx)(f.Z.Item,{name:"need_apply_grade",style:{marginTop:"-12px"},valuePropName:"checked",children:(0,he.jsx)(ie.Z,{children:"年级"})})}),(0,he.jsx)(se.Z,{children:(0,he.jsx)(f.Z.Item,{name:"need_apply_teacher_name",style:{marginTop:"-12px"},valuePropName:"checked",children:(0,he.jsx)(ie.Z,{children:"指导老师姓名"})})}),(0,he.jsx)(se.Z,{children:(0,he.jsx)(f.Z.Item,{name:"need_apply_school",style:{marginTop:"-12px"},valuePropName:"checked",children:(0,he.jsx)(ie.Z,{children:"学校/单位"})})})]})})]}),(0,he.jsx)("div",{className:E,children:"参赛模式"}),(0,he.jsxs)("div",{className:R,children:[(0,he.jsx)(f.Z.Item,{label:" ",name:"personal",colon:!1,children:(0,he.jsxs)(b.ZP.Group,{disabled:"progressing"==(null==an?void 0:an.competition_status)||"ended"==(null==an?void 0:an.competition_status),children:[(0,he.jsx)(b.ZP,{value:!1,style:{width:"120px"},children:"战队赛"}),(0,he.jsx)(b.ZP,{value:!0,style:{width:"120px"},children:"个人赛"})]})}),0==g.getFieldValue("personal")&&(0,he.jsxs)(he.Fragment,{children:[(0,he.jsx)(f.Z.Item,{className:z,style:{marginTop:"-2px"},label:" ",colon:!1,children:(0,he.jsxs)("div",{style:{display:"flex"},children:[(0,he.jsx)("span",{style:{margin:"0 10px 0 -50px"},children:"学生数"}),(0,he.jsx)(f.Z.Item,{name:"student_min",rules:[{pattern:new RegExp(/^[0-9]+([.]{1}[0-9]+){0,1}$/,"g"),message:"必须是数值"}],children:(0,he.jsx)(j.Z,{style:{width:"100px"}})}),(0,he.jsx)("span",{style:{margin:"0 10px"},children:"至"}),(0,he.jsx)(f.Z.Item,{name:"student_max",rules:[{pattern:new RegExp(/^[0-9]+([.]{1}[0-9]+){0,1}$/,"g"),message:"必须是数值"}],children:(0,he.jsx)(j.Z,{style:{width:"100px"}})}),(0,he.jsx)("span",{style:{margin:"0 10px"},children:"人"}),(0,he.jsx)(f.Z.Item,{name:"student_checkbox",children:(0,he.jsx)(ie.Z,{style:{marginLeft:"20px"},disabled:3===(null==an?void 0:an.mode),checked:De,onChange:function(e){var n;return Ee(null==e||null===(n=e.target)||void 0===n?void 0:n.checked)},children:(0,he.jsx)("span",{children:"不可存在多个战队中"})})})]})}),(0,he.jsx)(f.Z.Item,{className:z,style:{marginTop:"-12px"},label:" ",name:"competition_staffs",colon:!1,children:(0,he.jsxs)("div",{style:{display:"flex"},children:[(0,he.jsx)("span",{style:{margin:"0 10px 0 -50px"},children:"教师数"}),(0,he.jsx)(f.Z.Item,{name:"teacher_min",rules:[{pattern:new RegExp(/^[0-9]+([.]{1}[0-9]+){0,1}$/,"g"),message:"必须是数值"}],children:(0,he.jsx)(j.Z,{style:{width:"100px"}})}),(0,he.jsx)("span",{style:{margin:"0 10px"},children:"至"}),(0,he.jsx)(f.Z.Item,{name:"teacher_max",rules:[{pattern:new RegExp(/^[0-9]+([.]{1}[0-9]+){0,1}$/,"g"),message:"必须是数值"}],children:(0,he.jsx)(j.Z,{style:{width:"100px"}})}),(0,he.jsx)("span",{style:{margin:"0 10px"},children:"人"}),(0,he.jsx)(f.Z.Item,{name:"teacher_checkbox",children:(0,he.jsx)(ie.Z,{style:{marginLeft:"20px"},disabled:3===(null==an?void 0:an.mode),checked:Ve,onChange:function(e){var n;return Be(null==e||null===(n=e.target)||void 0===n?void 0:n.checked)},children:(0,he.jsx)("span",{children:"不可存在多个战队中"})})})]})})]}),1==g.getFieldValue("personal")&&(0,he.jsx)(f.Z.Item,{label:" ",children:(0,he.jsxs)(le.Z,{wrap:!1,gutter:10,children:[(0,he.jsx)(se.Z,{children:(0,he.jsx)(f.Z.Item,{name:"is_student",style:{marginTop:"-12px"},valuePropName:"checked",normalize:function(e,n,t){return e||t.is_teacher||t.is_professional?e:(v.ZP.warning("请选择至少一种身份可以报名参赛"),!(e||t.is_teacher||t.is_professional))},children:(0,he.jsx)(ie.Z,{children:"学生身份参赛"})})}),(0,he.jsx)(se.Z,{children:(0,he.jsx)(f.Z.Item,{name:"is_teacher",style:{marginTop:"-12px"},valuePropName:"checked",normalize:function(e,n,t){return e||t.is_student||t.is_professional?e:(v.ZP.warning("请选择至少一种身份可以报名参赛"),!(e||t.is_student||t.is_professional))},children:(0,he.jsx)(ie.Z,{children:"教师身份参赛"})})}),(0,he.jsx)(se.Z,{children:(0,he.jsx)(f.Z.Item,{name:"is_professional",style:{marginTop:"-12px"},valuePropName:"checked",normalize:function(e,n,t){return e||t.is_teacher||t.is_student?e:(v.ZP.warning("请选择至少一种身份可以报名参赛"),!(e||t.is_teacher||t.is_student))},children:(0,he.jsx)(ie.Z,{children:"专业人士身份参赛"})})})]})})]}),(0,he.jsx)("div",{className:X,children:(0,he.jsx)(pe.Z,{className:$,htmlType:"submit",onClick:r()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)}))),children:"保存更改"})})]}),(0,he.jsx)(x.Z,{centered:!0,title:"以下数据导入失败",open:Ke,okText:"确定",cancelText:"取消",onOk:function(){Xe(!1)},onCancel:function(){Xe(!1)},children:(0,he.jsx)(oe.Z,{bordered:!0,columns:[{title:"手机号",dataIndex:"phone"},{title:"姓名",dataIndex:"name"},{title:"邮箱",dataIndex:"email"}],dataSource:nn,pagination:!1,rowKey:function(e){return e.name}})})]})})),ve="all___GiQqZ",ge="title___YtceA",ye="content___Es9RO",je="content_icon___SNFzF",be="content_info___rSAWs",we="content_title___Hkmmk",Ze="content_size___jLmmn",ke="content_img___NRn9i",Ne="content_img2___D23TM",Ie="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAA+9JREFUWEeVl12IVVUUx39rnyuj2UswQiEp1osURFESPoimkPgShJMQQ2UFDsOoEYmOn4yUToXcoSxNsYJewg+klxgJJ8GnqPzoSURUQh998MGBKWdcsvc959599t3nwwuXc+496+z1X//1LXqEXv7jMLCGhLkIkAAm/drf2b292mfhf/7z2L2V1/Q93P0khnGUQdEmJxH6ckoyBb6yR1WcGeJfW8pbBrSup0QPcA9hbs5inwFrkc9KeP8orESYEP0CzVkfUuhb4CvLQMYAlbkkACE6WgGg6LAqN4Uu839nICy5ug/NBVaRr8vckL0TshKy5xtjnzkAn3kMxKyqivDwUMMUDf5CmCFhCaTx5YPM9DgAeyMuKKMvUxhjSrhAD2tlLf+6gD/DU0xxnIRl7UAOjBQdCQD4AlkG1Iv0+xgWSz83WuS2PvorTzLNNQyPd6V6YhnYE7igyo/F9eCCvMcrvvI2iF84i7Aqx0KqR3RXrSx4gEHSb6cu5Om8KO/zchTAaSYQVnalu1gGdlQASFyWLEe4heEs8Gw7a/Js3aeH56WfazkXnGA+wlWMV+y8wBUdDgB0U/y7DLPK+XOMFzH8gdDTVR1bcXIZQ5+s57qT/5mngeMYlhYVO9GtXh2I+bfBRhnm27Y/xxgCvmk3rLB5Gf7HOCAzCC9hmF3WwES3FBQiC8bSP4sFso3bOVqbnMbwZiyqo5bGGlPqBtFP0K7o7LTbP2WEV8PA0kM8wRSXMCysVBj2j6A6in6cxkA3lZaB7TLC59HIHmMpcB5DIzofJPyEcBfDZgeyoJSLflSQBfaFOSyW3VyNAXBBdoBhDKNtFjrl9ksZYJuT+YETGN6KtnuXhpsilbDl/yuyn+eKlLvDrfOanMHwepuFhAnmsVrWMeNkfmQFyrkiV4kOFTDQYL+MsrMMgFPwNfOYdpXuBYSLzGG1DHCnnTUW5Pdcx7AoBkJ0sADAbJbIPv6uApAyYTjIIjZxU4QHXUF7jD0Ie2OxIjoQSUPDLWmyoI7yOjJ6jIUoNxFXzltDbhovohsi88AsDkqTzXUOryujR5kAVoZFSfTDFIA/MCQMyVccqnt4HTn9jk8RdnnB6lJT9INoDIzTyxsywnSdw6tk9BwNrvAbwmthOoquL6wDN2jwTzpadZaRol3BLzT5nmIbuW1iz8TngXdrzQPxSlY2Q9ZZZJwL3gl6QdFqFdsD/PUtNnTWGOVE+1MAZcNmFahwduyelDv7pr9Xupnwbe65aaVshi+jM2xivoKMAR9g3tBJ0XWcJKEvTI/cwOFbVGdxKVvv8kvMKctAL8phDGvcEhFTUGdPKHJTfB6YRBjnMQYfAr/L5O84EyIQAAAAAElFTkSuQmCC",Ae=t(10032),Se=["competitions","globalSetting","loading","dispatch","user"],Ce=(0,h.connect)((function(e){var n=e.competitions,t=e.loading,i=e.globalSetting,l=e.user;return{competitions:n,globalSetting:i,loading:t.models.competitions,user:l}}))((function(e){e.competitions,e.globalSetting,e.loading;var n=e.dispatch,t=(e.user,p()(e,Se)),i=(0,m.useState)(""),l=d()(i,2),s=l[0],o=l[1],a=(0,m.useState)(""),r=d()(a,2),c=r[0],u=r[1];(0,m.useEffect)((function(){h()}),[]);var h=function(){(0,ce.Mn)(null==t?void 0:t.competitionId).then((function(e){var n,i;0==(null==e?void 0:e.status)?(o(null==e||null===(n=e.data)||void 0===n?void 0:n.competition_image),u(null==e||null===(i=e.data)||void 0===i?void 0:i.qr_code_image),null==t||t.loadingFunction(!1)):v.ZP.error(null==e?void 0:e.message)}))},_=function(e,i){(0,ce.o3)(null==t?void 0:t.competitionId).then((function(l){var s=new FormData;s.append("file",null==e?void 0:e.file),s.append("source_id",null==l?void 0:l.id),s.append("source_type",i),(0,Ae.ZP)("/api/competitions/set_attachments.json",{method:"post",body:s},!0).then((function(e){"success"==(null==e?void 0:e.message)?(v.ZP.success("上传成功"),h(),n({type:"competitions/getStaff",payload:{identifier:null==t?void 0:t.competitionId}}),n({type:"competitions/getHeader",payload:{identifier:null==t?void 0:t.competitionId}})):v.ZP.error(null==e?void 0:e.message)}))}))};return(0,he.jsxs)("div",{className:ve,children:[(0,he.jsx)("div",{className:ge,children:"上传图片"}),(0,he.jsxs)("div",{className:ye,children:[(0,he.jsx)("img",{src:Ie,className:je}),(0,he.jsxs)("div",{className:be,children:[(0,he.jsx)(ne.Z,{accept:"image/*",customRequest:function(e){return _(e,"Competition")},showUploadList:!1,children:(0,he.jsx)("div",{className:we,children:"上传竞赛封面图"})}),(0,he.jsx)("div",{className:Ze,children:"图片尺寸:792 x 340"})]}),(0,he.jsx)("img",{src:s,className:ke})]}),(0,he.jsxs)("div",{className:ye,children:[(0,he.jsx)("img",{src:Ie,className:je}),(0,he.jsxs)("div",{className:be,children:[(0,he.jsx)(ne.Z,{accept:"image/*",customRequest:function(e){return _(e,"Competition_code")},showUploadList:!1,children:(0,he.jsx)("div",{className:we,children:"上传交流群二维码"})}),(0,he.jsx)("div",{className:Ze,children:"图片尺寸:160 x 160"})]}),(0,he.jsx)("img",{src:c,className:Ne})]})]})})),Fe=t(37205),Pe=t.n(Fe),Te="all___d1AWD",Le="title___VIjuM",De="add_people___qkPex",Ee="people_icon___lz5gl",Re="content___a8dSX",Me="content_info___ekLIa",Ve="info_icon___kXP8P",Be="info_title___Hld67",ze="info_content___kbIuT",Oe="info_content_icon___uNxzs",Ye="info_content_title___IfIi8",He="info_open___NzrUi",qe="info_delete___rZhhO",Qe="questions_info___n9Fnq",Ge="form_item___oxzha",Ue="form_item_item___yPf7l",We="form_item_small___EkG9G",Je="guanka_title___uUWQl",Ke="nandu_1___qifbd",Xe="nandu_2___qVJU8",$e="nandu_3___NRfLL",en="close_icon___f2hON",nn="footer___UDiYB",tn="save_button___t7iMm",ln="textone___TAI4F",sn="deletecolor___ldQnR",on="qselect___uuNp6",an="qinput___xHGmH",rn="modalclass___dPDG7",cn="popu___G8M92",dn="pingcesetting___zHJaT",un=t(81327),pn=t(94001),mn=t(43428),hn=t(71418),_n=t(28103),fn=t(53864),xn=t(52943),vn="drawer___HuOiD",gn="menu___JTt0c",yn="actived___zd6GY",jn="actived2___hNW2h",bn="subTag___rHkqz",wn="listItem___dr1wg",Zn="info___bpBpK",kn="title___typIH",Nn="titleLeft___b4niC",In="filter___HBJIT",An="description___Rqa6Q",Sn="menuCourse____Msk3",Cn="button_right___T8tiB",Fn=t(73759),Pn=t(33706),Tn=t(95888),Ln=t(95154),Dn=t(78745),En=["classroomList","loading","dispatch","shixunsList"],Rn=(j.Z.Search,[{id:"type",name:"来源",children:[{name:"全部",id:"all",type:"type"},{name:"我的",id:"mine",type:"type"}]},{id:"diff",name:"难度",children:[{name:"全部",id:"",type:"diff"},{name:"初级",id:1,type:"diff"},{name:"中级",id:2,type:"diff"},{name:"中高级",id:3,type:"diff"},{name:"高级",id:4,type:"diff"}]}]),Mn=(0,h.connect)((function(e){return{classroomList:e.classroomList,shixunsList:e.shixunsList,loading:e.loading.effects}}))((function(e){var n,t,i=e.classroomList,s=(e.loading,e.dispatch),a=e.shixunsList,c=p()(e,En),u=(0,m.useState)(l()({},(0,h.useParams)())),_=d()(u,2),f=_[0],x=(_[1],i.shixunLists),g=i.shixunAiRecommendLists,j=(0,m.useState)(""),w=d()(j,2),k=w[0],N=w[1],I=(0,m.useState)({}),A=d()(I,2),S=A[0],C=A[1],F=(0,m.useState)([]),P=d()(F,2),T=P[0],L=P[1],D=(0,m.useState)(!1),E=d()(D,2),R=E[0],M=E[1],V=[{name:"最新",id:"created_at"},{name:"最热",id:"myshixuns_count"}].filter((function(e){return!!e})),B=(0,m.useState)({page:1,type:"mine",diff:"",status:"published",order:"desc",not_open:!0,limit:20,sort:"myshixuns_count",no_jupyter:1,group_id:null}),z=d()(B,2),O=z[0],Y=z[1];(0,m.useEffect)((function(){H()}),[f.coursesId,O]),(0,m.useEffect)((function(){"新增赛题"===i.actionTabs.key&&(N(""),Y({page:1,type:"mine",diff:"",status:"published",order:"desc",not_open:!0,limit:20,sort:"myshixuns_count",no_jupyter:1,group_id:null})),s({type:"shixunsList/getMenus",payload:{}})}),[i.actionTabs.key]),(0,m.useEffect)((function(){(null!=x&&x.shixun_list||null!=g&&g.shixun_list)&&C("recommend"===O.sort?g:x)}),[x,g]);var H=function(){var e=r()(o()().mark((function e(){var n,t,i;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(M(!0),n=l()({},O),"recommend"===O.sort&&(n.sort="myshixuns_count"),"recommend"!==O.sort){e.next=8;break}return e.next=6,s({type:"classroomList/getShixunAiRecommendLists",payload:l()(l()({},n),{},{course_id:f.coursesId})});case 6:e.next=11;break;case 8:return t=l()({},n),e.next=11,s({type:"classroomList/getShixunLists",payload:t});case 11:return e.next=13,(0,Ae.ZP)("/api/users/user_setting_groups.json",{method:"get",params:{type:"Shixun"}});case 13:i=e.sent,L([{id:null,name:"全部"},{id:-1,name:"未加入目录"}].concat(Pe()((null==i?void 0:i.groups)||[]))),N(""),M(!1);case 17:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();if("选用实践课程"!==i.actionTabs.key){var q=(0,Ln.P)(),Q=d()(q,4),G=Q[0],U=Q[1],W=Q[2],J=(Q[3],function(){var e=r()(o()().mark((function e(n){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(0,ce.su)({id:null==c?void 0:c.competitionId,shixun_ids:n.map((function(e){return e.id}))}).then((function(e){0==(null==e?void 0:e.status)?(v.ZP.success("添加成功"),s({type:"classroomList/setActionTabs",payload:{}}),s({type:"competitions/getHeader",payload:{identifier:null==c?void 0:c.competitionId}}),null==c||c.queryQuetions(!0)):v.ZP.error(null==e?void 0:e.message)}));case 1:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}()),K=(0,m.useState)(!1),X=d()(K,2),$=X[0],ee=X[1];return(0,he.jsxs)(he.Fragment,{children:[(0,he.jsxs)(mn.Z,{title:"选用实践项目",placement:"bottom",height:"100%",closable:!0,open:"新增赛题"===i.actionTabs.key,rootClassName:vn,destroyOnClose:!0,onClose:function(){s({type:"classroomList/setActionTabs",payload:{key:""}})},footer:(0,he.jsxs)("div",{className:"tc",style:{height:"64px",display:"flex",alignItems:"center",justifyContent:"center"},children:[(0,he.jsx)(Z.ZP,{size:"middle",onClick:function(){s({type:"classroomList/setActionTabs",payload:{}})},style:{marginRight:8,width:"120px",height:"40px",fontSize:"16px",borderRadius:"4px"},children:"取消"}),(0,he.jsx)(Z.ZP,{style:{width:"120px",height:"40px",fontSize:"16px",borderRadius:"4px"},size:"middle",onClick:r()(o()().mark((function e(){var n,t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!k){e.next=8;break}return ee(!0),t=null==S||null===(n=S.shixun_list)||void 0===n?void 0:n.filter((function(e){return k.includes(e.identifier)})).map((function(e){return{id:e.id,is_copy:0,is_use:1}})),e.next=5,J(t);case 5:ee(!1),e.next=9;break;case 8:v.ZP.error("请选择实践项目");case 9:case"end":return e.stop()}}),e)}))),type:"primary",loading:$,children:"确定"})]}),children:[(0,he.jsx)("section",{className:"tc",children:(0,he.jsx)(Pn.Z,{onChange:function(e){null!=e&&e.keyword.trim()&&(0,Dn.tk)({name:null==e?void 0:e.keyword.trim(),copywriting:null==e?void 0:e.keyword.trim(),position:"Shixun"}),Y(l()(l()({},O),{},{keyword:null==e?void 0:e.keyword.trim(),schools:null==e?void 0:e.schools.trim(),creator:null==e?void 0:e.creator.trim(),page:1}))}})}),(0,he.jsx)("section",{className:"edu-container",children:(0,he.jsx)(hn.Z,{spinning:R,children:(0,he.jsxs)("aside",{children:[Rn.map((function(e,n){var t;return 0!==n?null:(0,he.jsxs)("ul",{className:gn,children:[(0,he.jsx)("li",{children:e.name}),null==e||null===(t=e.children)||void 0===t?void 0:t.map((function(n,t){return(0,he.jsx)("li",{className:O[e.id]==n.id?yn:"",onClick:function(){O[e.id]=n.id,O.page=1,Y(l()({},O))},children:(0,he.jsx)("strong",{children:n.name})},t)}))]},n)})),(0,he.jsxs)("ul",{className:gn,children:[(0,he.jsx)("li",{children:"方向"}),(0,he.jsx)("li",{className:null!=O&&O.discipline_id?"":yn,onClick:function(){delete O.tag_level,delete O.sub_discipline_id,delete O.discipline_id,O.page=1,Y(l()({},O))},children:(0,he.jsx)("strong",{children:"全部"})}),a.menus&&a.menus.map((function(e,n){return(0,he.jsxs)("li",{className:(null==O?void 0:O.discipline_id)==e.id?yn:"",children:[(0,he.jsx)("strong",{onClick:function(){O.tag_level=1,O.discipline_id=e.id,delete O.sub_discipline_id,O.page=1,Y(l()({},O))},children:e.name}),(0,he.jsx)("div",{children:e.sub_repertoires.map((function(n,t){return(0,he.jsxs)("div",{className:"mt5",children:[(0,he.jsx)("div",{className:(null==O?void 0:O.sub_discipline_id)==n.id&&2===O.tag_level?"".concat(jn," ").concat(bn):bn,onClick:function(){O.tag_level=2,O.discipline_id=e.id,O.sub_discipline_id=n.id,Y(l()({},O))},children:n.name}),(0,he.jsx)("ul",{className:"mt5",children:n.tags&&n.tags.map((function(n,t){return(0,he.jsx)("li",{className:O.sub_discipline_id==n.id&&3===O.tag_level?jn:"",onClick:function(){O.tag_level=3,O.discipline_id=e.id,O.sub_discipline_id=n.id,Y(l()({},O))},children:n.name},t)}))})]},t)}))})]},n)}))]}),"mine"===O.type&&(0,he.jsxs)("ul",{className:gn,children:[(0,he.jsx)("li",{children:"目录"}),null==T?void 0:T.map((function(e,n){return(0,he.jsx)("li",{className:O.group_id==e.id?yn:"",onClick:function(){O.group_id=e.id,O.page=1,Y(l()({},O))},children:(0,he.jsx)("strong",{children:e.name})},n)}))]}),Rn.map((function(e,n){var t;return 1!==n?null:(0,he.jsxs)("ul",{className:gn,children:[(0,he.jsx)("li",{children:e.name}),null==e||null===(t=e.children)||void 0===t?void 0:t.map((function(n,t){return(0,he.jsx)("li",{className:O[e.id]==n.id?yn:"",onClick:function(){O[e.id]=n.id,Y(l()({},O))},children:(0,he.jsx)("strong",{children:n.name})},t)}))]},n)})),"mine"==(null==O?void 0:O.type)&&(0,he.jsxs)("ul",{className:gn,children:[(0,he.jsx)("li",{children:"状态"}),(0,he.jsx)("li",{className:0==O.not_open?yn:"",onClick:function(){O.not_open=!1,O.page=1,Y(l()({},O))},children:(0,he.jsx)("strong",{children:"公开"})}),(0,he.jsx)("li",{className:1==O.not_open?yn:"",onClick:function(){O.not_open=!0,O.page=1,Y(l()({},O))},children:(0,he.jsx)("strong",{children:"未公开"})})]}),(0,he.jsxs)(le.Z,{align:"middle",children:[(0,he.jsx)(se.Z,{flex:"1",className:In,children:V.map((function(e,n){return(0,he.jsx)(Z.ZP,{className:"mr20",type:O.sort===e.id?"primary":"default",onClick:function(){O.sort=e.id,Y(l()({},O))},children:e.name},n)}))}),(0,he.jsx)(se.Z,{className:"c-grey-999",children:(0,he.jsx)("div",{className:Sn,children:(0,he.jsxs)("ul",{children:[(0,he.jsxs)("li",{children:["已选",(0,he.jsx)("span",{className:"c-blue",children:k.length>0?1:0}),"个"]}),(0,he.jsxs)("li",{children:["共",(0,he.jsx)("span",{className:"c-blue",children:S.shixuns_count}),"个"]}),(0,he.jsxs)("li",{className:"current",onClick:function(){O.order="asc"===O.order?"desc":"asc",Y(l()({},O))},children:["学习人数",(0,he.jsxs)("p",{className:"edu-sorter current ".concat(O.order),children:[(0,he.jsx)("span",{className:"iconfont icon-sanjiaoxing-up"}),(0,he.jsx)("span",{className:"iconfont icon-sanjiaoxing-down"})]})]})]})})})]}),0===(null==S||null===(n=S.shixun_list)||void 0===n?void 0:n.length)&&(0,he.jsx)(xn.Z,{}),(0,he.jsx)(b.ZP.Group,{style:{display:"block"},value:k,onChange:function(e){N(e.target.value)},children:null==S||null===(t=S.shixun_list)||void 0===t?void 0:t.map((function(e,n){var t,i;return(0,he.jsx)("div",{className:wn,style:{cursor:"auto"},children:(0,he.jsx)(b.ZP,{value:null==e?void 0:e.identifier,style:{marginTop:"3px"},disabled:null==e?void 0:e.need_authorize,children:(0,he.jsxs)("div",{className:Zn,children:[(0,he.jsx)("div",{className:kn,children:(0,he.jsxs)("div",{className:Nn,children:[(0,he.jsx)(h.Link,{to:"/shixuns/".concat(e.identifier,"/challenges"),target:"_blank",children:(0,he.jsx)("strong",{className:"font16",dangerouslySetInnerHTML:{__html:e.title}})}),(null==e?void 0:e.need_authorize)&&(0,he.jsx)("span",{onClick:function(){(0,Fn.rX)(!1)},style:{marginRight:"auto"},className:"tag-style bg-pink current ml10",children:"需授权"}),(0,Tn.Ny)()&&1===(null==e?void 0:e.mark_status)&&(0,he.jsx)(y.Z,{zIndex:1e4,title:null==e?void 0:e.mark_content,children:(0,he.jsx)("span",{style:{marginRight:"auto",background:"#2FA34F"},className:"tag-style current ml10",children:"正常"})}),(0,Tn.Ny)()&&2===(null==e?void 0:e.mark_status)&&(0,he.jsx)(y.Z,{zIndex:1e4,title:null==e?void 0:e.mark_content,children:(0,he.jsx)("span",{style:{marginRight:"auto",background:"#FF8C29"},className:"tag-style current ml10",children:"需完善"})}),(0,Tn.Ny)()&&3===(null==e?void 0:e.mark_status)&&(0,he.jsx)(y.Z,{zIndex:1e4,title:null==e?void 0:e.mark_content,children:(0,he.jsx)("span",{style:{marginRight:"auto",background:"#E53333"},className:"tag-style current ml10",children:"无法使用"})}),(0,he.jsx)(Z.ZP,{ghost:!0,href:"/shixuns/".concat(e.identifier,"/challenges"),type:"primary",target:"_blank",className:Cn,children:"体验实训"})]})}),(0,he.jsx)("div",{className:"flex-wrp mt10 font14 c-light-black",children:(0,he.jsx)("span",{className:An,dangerouslySetInnerHTML:{__html:e.description}})}),(0,he.jsx)("div",{className:" mt15",children:e.challenge_names.map((function(e,n){return(0,he.jsxs)("span",{className:"mr30",children:["第",n+1,"关 ",e," "]},n)}))}),(0,he.jsx)(_n.Z,{dashed:!0}),(0,he.jsxs)("div",{className:"c-light-black mt20",children:[null!=e&&null!==(t=e.content)&&void 0!==t&&t.author_name?(0,he.jsx)("span",{dangerouslySetInnerHTML:{__html:null==e||null===(i=e.content)||void 0===i||null===(i=i.author_name)||void 0===i?void 0:i[0]}}):(0,he.jsx)("span",{children:e.author_name}),(0,he.jsx)("span",{className:"ml15 mr15",children:"|"}),e.author_school_name&&(0,he.jsxs)(m.Fragment,{children:[(0,he.jsx)("span",{children:e.author_school_name}),(0,he.jsx)("span",{className:"ml15 mr15",children:"|"})]}),(0,he.jsxs)("span",{children:["难度系数 ",e.level]}),(0,he.jsx)("span",{className:"ml15 mr15",children:"|"}),(0,he.jsx)("span",{children:"学习人数 "}),(0,he.jsx)("span",{children:e.study_count})]})]})})},n)}))})]})})}),(0,he.jsx)("div",{className:"tc mt20",children:(0,he.jsx)(fn.Z,{defaultCurrent:1,hideOnSinglePage:!0,defaultPageSize:20,showSizeChanger:!1,current:O.page||1,showQuickJumper:!0,total:null==S?void 0:S.shixuns_count,onChange:function(e){O.page=e,Y(l()({},O))}})})]},"bottom"),(0,he.jsx)(Ln.Z,{visible:G,onCancel:U,renderData:W,inPaper:!1,onOk:J,modalType:"multiple",type:"shixun",position:"选中实训"})]})}})),Vn=["competitions","shixunHomeworks","globalSetting","dispatch","user"],Bn=j.Z.TextArea,zn=function(e){return null!=e&&e.includes("已截止")?(0,he.jsx)("div",{style:{borderRadius:13,width:56,height:20,display:"inline-flex",alignItems:"center",justifyContent:"center",border:"1px solid #FFC4C4",color:"#E53333",fontSize:12,marginRight:8},children:"已截止"}):null!=e&&e.includes("进行中")?(0,he.jsx)("div",{style:{borderRadius:13,width:56,height:20,display:"inline-flex",alignItems:"center",justifyContent:"center",border:"1px solid #C4D2F1",color:"#3061D0",fontSize:12,marginRight:8},children:"进行中"}):null!=e&&e.includes("未发布")?(0,he.jsx)("div",{style:{borderRadius:13,width:56,height:20,display:"inline-flex",alignItems:"center",justifyContent:"center",border:"1px solid #DADBDE",color:"#999999",fontSize:12,marginRight:8},children:"未发布"}):null!=e&&e.includes("提交中")?(0,he.jsx)("div",{style:{borderRadius:13,width:56,height:20,display:"inline-flex",alignItems:"center",justifyContent:"center",border:"1px solid #B1F0E1",color:"#00B187",fontSize:12,marginRight:8},children:"提交中"}):null!=e&&e.includes("已结束")?(0,he.jsx)("div",{style:{borderRadius:13,width:56,height:20,display:"inline-flex",alignItems:"center",justifyContent:"center",border:"1px solid #FFC4C4",color:"#E53333",fontSize:12,marginRight:8},children:"已结束"}):null!=e&&e.includes("考试中")?(0,he.jsx)("div",{style:{borderRadius:13,width:56,height:20,display:"inline-flex",alignItems:"center",justifyContent:"center",border:"1px solid #C4D2F1",color:"#3061D0",fontSize:12,marginRight:8},children:"考试中"}):null!=e&&e.includes("未开始")?(0,he.jsx)("div",{style:{borderRadius:13,width:56,height:20,display:"inline-flex",alignItems:"center",justifyContent:"center",border:"1px solid #DADBDE",color:"#999999",fontSize:12,marginRight:8},children:"未开始"}):null!=e&&e.includes("补交中")?(0,he.jsx)("div",{style:{borderRadius:13,width:56,height:20,display:"inline-flex",alignItems:"center",justifyContent:"center",border:"1px solid rgba(255,157,24,0.3)",color:"#FF9D18",fontSize:12,marginRight:8},children:"补交中"}):void 0},On=(0,h.connect)((function(e){return{competitions:e.competitions,shixunHomeworks:e.shixunHomeworks,globalSetting:e.globalSetting,user:e.user}}))((function(e){var n,t,i,s,a=e.competitions,c=(e.shixunHomeworks,e.globalSetting,e.dispatch),u=e.user,g=p()(e,Vn),w=f.Z.useForm(),k=d()(w,1)[0],I=f.Z.useForm(),A=d()(I,1)[0],S=(0,m.useState)(!0),C=d()(S,2),F=C[0],P=C[1],T=(0,m.useState)([]),L=d()(T,2),D=L[0],E=L[1],R=(0,m.useState)(!1),M=d()(R,2),V=M[0],B=(M[1],(0,m.useState)([])),z=d()(B,2),O=z[0],Y=z[1],H=a.Header,q=(0,m.useState)(1),Q=d()(q,2),G=(Q[0],Q[1],(0,m.useState)({})),U=d()(G,2),W=U[0],J=U[1],K=(0,h.useParams)(),X=K.identifier,$=(K.enter,(0,m.useState)({})),ee=d()($,2),ne=ee[0],te=ee[1],oe=(0,m.useState)([]),ae=d()(oe,2),re=ae[0],de=ae[1],ue=(0,m.useState)(""),me=d()(ue,2),_e=me[0],fe=me[1],xe=(0,m.useState)([]),ve=d()(xe,2),ge=ve[0],ye=ve[1],je=(0,m.useState)(!1),be=d()(je,2),we=be[0],Ze=be[1],ke=(0,m.useState)([{type:"practice",name:"课堂实验",open:!1,url:"shixun_homework"},{type:"normal",name:"图文作业",open:!1,url:"common_homework"},{type:"group",name:"分组作业",open:!1,url:"group_homework"},{type:"hack",name:"编程作业",open:!1,url:"program_homework"},{type:"exercise",name:"在线考试",open:!1,url:"exercise"}]),Ne=d()(ke,2),Ie=Ne[0],Se=Ne[1],Ce=(0,m.useState)({input:""}),Fe=d()(Ce,2),mn=Fe[0],hn=Fe[1];function _n(){return(_n=r()(o()().mark((function e(){var n;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ae.ZP)("/api/competitions/".concat(X,"/get_course_settings.json"),{method:"get"});case 2:0===(null==(n=e.sent)?void 0:n.status)&&te(n.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function fn(){return vn.apply(this,arguments)}function vn(){return(vn=r()(o()().mark((function e(){var n;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return null==g||g.loadingFunction(!0),e.next=3,(0,Ae.ZP)("/api/users/".concat(u.userInfo.login,"/courses.json"),{method:"get",params:{category:"manage",page:1,per_page:1e3,username:u.userInfo.login,no_limit_per_page:1}});case 3:n=e.sent,null==g||g.loadingFunction(!1),de(null==n?void 0:n.courses);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}(0,m.useEffect)((function(){1===H.mode?(A.resetFields(),yn(!0)):2===H.mode?(A.resetFields(),function(){_n.apply(this,arguments)}()):function(){Nn.apply(this,arguments)}()}),[H]),(0,m.useEffect)((function(){u.userInfo.login&&fn()}),[u]);var gn=function(e){var n,t=e.total_score,i=e.difficulty_level_sort,l=null===(n=e.challenge_settings)||void 0===n?void 0:n.filter((function(e){return e.checked})).length;if(l){var s,o=t/e.challenge_settings.filter((function(e){return e.checked})).map((function(e){return"desc"===i?e.challenge_exp_desc:e.challenge_exp})).reduce((function(e,n){return e+n})),a=0,r=0;switch(e.score_setting){case 0:var c=parseFloat((t/l).toFixed(1));e.challenge_settings.map((function(e,n){e.checked?(a=n,e.score=c>0?c:0):e.score=0})),s=(t-c*(l-1)).toFixed(1),e.challenge_settings[a].score=s>0?s:0;break;case 1:e.challenge_settings.map((function(e,n){e.checked?(a=n,r+=Number((Math.round(("desc"===i?e.challenge_exp_desc:e.challenge_exp)*o*10)/10).toFixed(1)),e.score=(Math.round(("desc"===i?e.challenge_exp_desc:e.challenge_exp)*o*10)/10).toFixed(1)):e.score=0}));var d=e.challenge_settings[a].score;s=(t-r+Number(d)).toFixed(1),e.challenge_settings[a].score=s>0?s:0}}else e.challenge_settings.map((function(e,n){e.challenge_score=0}))},yn=function(e){(0,ce.lm)(null==g?void 0:g.competitionId).then((function(n){if(0==(null==n?void 0:n.status)){if(null!=n&&n.data){var t=null==n?void 0:n.data;if(e){for(var i in t)t[i].show_info=!1;Y(t)}else for(var l in O)t[l].show_info=O[l].show_info;E(t)}else E([]);null==g||g.loadingFunction(!1)}else v.ZP.error(null==n?void 0:n.message)}))},jn=function(e,n){var t=D;for(var i in t)t[i].id==e.id&&("open"==n?t[i].show_info=!0:"close"==n&&(t[i].show_info=!1));E(Pe()(t)),Y(Pe()(t))},bn=function(){if(function(e){var n=[];for(var t in e){var i,l,s=null===(i=e[t])||void 0===i||null===(i=i.challenge_settings)||void 0===i?void 0:i.reduce((function(e,n){return e+Number(n.score)}),0);(null==s?void 0:s.toFixed(10))!==(null===(l=e[t])||void 0===l||null===(l=l.total_score)||void 0===l?void 0:l.toFixed(10))&&n.push("赛题".concat(Number(t)+1,"的关卡任务总分必须等于总分值:").concat(e[t].total_score,"分\n"))}return!(n.length>0&&(v.ZP.warning(n),1))}(D)){for(var e in D){var n,t;if(D[e].shixun_id=null===(n=D[e])||void 0===n||null===(n=n.challenge_settings[0])||void 0===n?void 0:n.shixun_id,(null===(t=D[e])||void 0===t||null===(t=t.challenge_settings)||void 0===t?void 0:t.length)>0)for(var i in null===(l=D[e])||void 0===l?void 0:l.challenge_settings){var l,s;D[e].challenge_settings[i].challenge_score=null===(s=D[e])||void 0===s?void 0:s.challenge_settings[i].score}}(0,ce.JM)({id:null==g?void 0:g.competitionId,shixuns:D}).then((function(e){0==(null==e?void 0:e.status)?(v.ZP.success("更改成功"),yn(!1)):v.ZP.error(null==e?void 0:e.message)}))}};function wn(e){return Zn.apply(this,arguments)}function Zn(){return Zn=r()(o()().mark((function e(n){var t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return null==g||g.loadingFunction(!0),e.next=3,(0,Ae.ZP)("/api/competitions/".concat(X,"/switch_mode.json"),{method:"post",body:{mode:n}});case 3:return t=e.sent,null==g||g.loadingFunction(!1),0===(null==t?void 0:t.status)&&c({type:"competitions/getHeader",payload:{identifier:X}}),e.abrupt("return",!0);case 7:case"end":return e.stop()}}),e)}))),Zn.apply(this,arguments)}function kn(){return(kn=r()(o()().mark((function e(n){var t,i;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Ze(!0),e.next=3,(0,Ae.ZP)("/api/competitions/get_competition_course_homework.json",{method:"get",params:{course_id:ne.course_id,competition_course_game_id:n,id:X}});case 3:t=e.sent,Ze(!1),0===(null==t?void 0:t.status)?(fe(n),ye(null==t||null===(i=t.data)||void 0===i?void 0:i.list)):v.ZP.info("当前课堂暂无数据,请更换绑定课堂或在当前课堂新增作业或考试");case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Nn(){return(Nn=r()(o()().mark((function e(){var n,t,i,l,s;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ae.ZP)("/api/competitions/".concat(X,"/get_work_settings.json0"),{method:"get"});case 2:0===(null==(n=e.sent)?void 0:n.status)&&(P(null==n?void 0:n.data.is_new),A.setFieldsValue({evaluation_setting:null==n||null===(t=n.data)||void 0===t?void 0:t.evaluation_setting,commit_num:null==n||null===(i=n.data)||void 0===i?void 0:i.commit_num,evaluation_time:null==n||null===(l=n.data)||void 0===l?void 0:l.evaluation_time,evaluation_script:null==n||null===(s=n.data)||void 0===s?void 0:s.evaluation_script}));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var In=function(e){var n=e.getFieldsValue();for(var t in console.log(n),n)if(void 0!==n[t])return!0;return!1};return(0,he.jsxs)("div",{className:Te,children:[(0,he.jsxs)("div",{style:{padding:30},children:[(0,he.jsx)("div",{style:{marginBottom:30,fontSize:14,fontWeight:600,color:"#232B40"},children:"模式设置"}),(0,he.jsxs)("div",{style:{marginLeft:42},children:[(0,he.jsx)("span",{children:"竞赛模式"}),(0,he.jsx)(b.ZP.Group,{disabled:"progressing"===H.competition_status||"ended"===H.competition_status,value:H.mode,onChange:function(){var e=r()(o()().mark((function e(n){var t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!((null==ne||null===(t=ne.competition_course_games)||void 0===t||null===(t=t[0])||void 0===t||null===(t=t.homeworks)||void 0===t?void 0:t.length)>0||(null==D?void 0:D.length)>0||In(A))){e.next=3;break}return x.Z.confirm({icon:!1,title:"提示",content:"切换模式后,当前已经设置的赛题数据将会被清理,且不可撤回,请确认是否进行切换",onOk:function(){var e=r()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,wn(n.target.value);case 2:e.sent&&fn();case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()}),e.abrupt("return");case 3:return e.next=5,wn(n.target.value);case 5:e.sent&&fn();case 7:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),style:{marginLeft:10,fontSize:14},children:(0,he.jsxs)(un.Z,{direction:"vertical",children:[(0,he.jsxs)(b.ZP,{value:1,children:["实训模式",(0,he.jsx)("span",{style:{color:"#9096A3",marginLeft:10},children:"挑战实训,系统评审"})]}),(0,he.jsxs)(b.ZP,{value:2,children:["课堂模式",(0,he.jsx)("span",{style:{color:"#9096A3",marginLeft:10},children:"参赛者需要进入课堂完成作业,将选择计入成绩的作业生成排行榜"})]}),(0,he.jsxs)(b.ZP,{value:3,disabled:!(0,Tn.Ny)()&&(null==H?void 0:H.is_manager)||"progressing"===H.competition_status||"ended"===H.competition_status,children:["作品模式",(0,he.jsx)("span",{style:{color:"#9096A3",marginLeft:10},children:"参赛者提交作品,系统评审"})]})]})})]})]}),1===H.mode&&(0,he.jsxs)("div",{children:[(0,he.jsxs)("div",{className:Le,style:{display:"flex",alignItems:"center"},children:[(0,he.jsxs)("div",{style:{flex:1},children:["赛题设置",(0,he.jsxs)("span",{style:{marginLeft:20,color:"#9096A3",fontSize:"12px",fontWeight:"normal"},children:["答题起止时间:",(0,he.jsxs)("span",{style:{margin:"0 5px",color:"#165DFF",fontSize:"12px",fontWeight:"normal"},children:[null==H?void 0:H.start_time,"~",null==H?void 0:H.end_time]}),((0,Tn.eB)()||(null==H||null===(n=H.permission)||void 0===n?void 0:n.editable))&&(0,he.jsxs)("a",{style:{marginLeft:10,color:"#165DFF",display:"inline-flex"},onClick:function(){c({type:"competitions/setActionTabs",payload:{key:"7"}})},children:[(0,he.jsx)("i",{className:"iconfont icon-bianji10 font14",style:{color:"#165DFF",marginRight:3}})," 编辑"]})]})]}),"progressing"!=(null==H?void 0:H.competition_status)&&"ended"!=(null==H?void 0:H.competition_status)&&(0,he.jsxs)("div",{className:De,style:{top:"auto"},onClick:function(){c({type:"classroomList/setActionTabs",payload:{key:"新增赛题",params:""}})},children:[(0,he.jsx)("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAF9JREFUOE9jZKAQMOLTb5B0voHhH8OBCwsMD+BSR9gABgaGC/MMG0YNIBAGBgnnHRiYGBwwAuo/oz1YjPH/QWyBCApccCyAowsbwGcANHpHo5GBgcZhAI1esvMCMTkdAHAwQhEikgNIAAAAAElFTkSuQmCC",className:Ee}),"新增赛题"]})]}),(0,he.jsx)("div",{style:{marginTop:"25px"}}),D.map((function(e,n){var t,i,s;return(0,he.jsxs)("div",{className:Re,children:[(0,he.jsxs)("div",{className:Me,children:[(0,he.jsx)("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAAAXNSR0IArs4c6QAAA0JJREFUSEullk2ITlEYx3/PufdlxAYrTKyUhcgkG2LQzMbGhkJMyUca32mMyVdoMrOgoSkTZXxEmY2NDU1RWChEdlaEsfBZihozj+597533vOeee+ctb93e+3HO83/O//k/HwKgF6hH6CagEWEGAWByruibQO6agJ+E9MgqTkS23Z/EYH95RcC0DMh4xiOnbOfS+8ghw15p4mIWsJtbBGyIvU5PlW60DbiGfeuj/enpA4YpsUpW8tgGFT3LJ0xCYxFVrjMu5f4wfGYSDbKcoRRUtBP1xsQ1UE3vo2TPiqow+EPwlOk0ymKGI1DR02gchwoVlXv7xPZ9idWxx4bBjLO2rYrNXmlmdxnwFDrmZR6l1fF7IttYFqv7Go8JWFqTokNapInroicsQFd1dtxSZ0KaZTsPYsAbNDHK/QytvvgKvymxVPRYAphS4YqjAvQdYVBaWWerTvsZwLAaw9QYOFWvTwOGQdGOJIa2V2Xw55ToQXjLRN7Kbr76Ejl9p9eYTsDc+DLsBxqqtFG2PyLa7gEsUxvFdqe0c7kIyP2mN9mOoQ+D+NQv2uZQWq1YJWSPtNFbC6j204rhYgzli7+JVHqoBtEYDsoRzhdSeoUDwLmCGhtXMtEDOZRmy9wcaee9D1T7mI3ybixmrh4sQYrucxLfXVxW3h/mMUXWM+IFvEPAF35hqMvUYydFRPcUxDBdHPJSjtNQSGkvL4BFXkotXYi2OjH0JX/IDTnJljjZu1jCCJ2EQEiHHORZ0lOvY9icW3USu6K7LMDqflbudVEihxymxD1GOYNhrVN772I4SsAahK5M8js1WnSHIxq7nlaqxWsC5sditxmoVJVRAt4gLBj7nlOXRbdZMRxvrPB1+Fp7aOKc6FaH0qKOkdeucpLcV9RFWxxKff0sW2eLhih/P01siG7JqPQ0M+mUk/yppZzlrdGr1PGDDoRjdqqIbnIAJ1Ivl/j4P2BjHeQcs4APtqpFN/LJmUUHEHqYkJywlGxP/6PHWt4FcdXZB6yzlD0kuj4ZE/Maryui8WbVvNGybP92RGl5EDbOIFyL4bzunqZPdU5/o8TC6BUx6AjdCI3xjFqkyqIT+1IqYAjhIZNpk718+AfZ8LVXyCfCsQAAAABJRU5ErkJggg==",className:Ve}),(0,he.jsxs)("div",{className:Be,children:["赛题",n+1]}),(0,he.jsxs)("div",{className:ze,children:[(0,he.jsx)("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAAAXNSR0IArs4c6QAAAnZJREFUSEvtlk1IVFEUx39n3gwpUxKEM35QEU3QJlxYK8FNtWjhJqhFOH4UCBl9UCQVYdMmSLLAQkhJxRmKCipy2yKpTdEH7oSipKAZx00Uhc3MeyfupOGMPS0ZBgLf7t177v2d8z/n3nsEoDKsW23YB2xQ8JqxQn0CGeC9BTfjUXkhBpaBc4UCLLSPF85LIKyXFTYVAyjwxgDvF1pGN+eNvFIe1pFiRDfLWAYWXO3/TlKdkUD+VorFIhzzQI8qNSocydlUSJT66chMszKdoVeUnjLl2VeLVkfZ4Xo0XI6FinK7PcStSESc6iZdk1KG8oAXp4blaXmjhhCueJWueEyeGJtgs25Xh4MKK/LB8yIU+GIp3fGYvMouDmvAUc4gbJyz+G1ymOMiooEmjahSK/DDA1cTURnN3s8HdL2d5rQq1XOh84A+4dCnYflgjAKNWoPQoVCWs0g5m4zJWLBFtzg2F+bOeeBhfQMDd/eKHQyr34EbgN/14K8rZffLPklXNmu9rZxQxZMHe52MSWfWIZd72AMPJqNiQMbmukKVK9BvEZ4Yks+1ber7+J1WFRpyIvBxdHJA3gWatU4dTuXnyFLubQ4RfRyRjIlQhX5VVrkCRRj3WHQlBmXKGFW06DbH5piRVZTRZEwu7bmj1ugIvTmem9x76Y4P/sr92v1aNZ3mJBBaMIczk98QrpkqNP+zlWhZHE4MyURFk+6ylfY/5XUm9zuBNhVKFq3SHPmER1YJ/ekUZdj0e6DPZzGecuhUZXUOEAZ9Ds9TFo0odf96Dn/bm3IHrEK9mYvdNG6OLnl8Gbhk6VyLpuhNVNHbxKI3wtmnpIit/k8rJx6Q0AVqRgAAAABJRU5ErkJggg==",className:Oe}),(0,he.jsx)(h.Link,{to:"/shixuns/".concat(null==e?void 0:e.shixun_identifier,"/challenges"),target:"_blank",children:(0,he.jsx)(y.Z,{title:null==e||null===(t=e.shixun)||void 0===t?void 0:t.name,placement:"bottom",children:(0,he.jsx)("div",{className:Ye,children:null==e||null===(i=e.shixun)||void 0===i?void 0:i.name})})})]}),(0,he.jsx)("div",{className:He,onClick:function(){jn(e,"open")},children:!(null!=e&&e.show_info)&&(0,he.jsxs)(he.Fragment,{children:["展开更多",(0,he.jsx)("i",{className:"iconfont icon-xiajiantou",style:{fontSize:"8px"}})]})}),"progressing"!=(null==H?void 0:H.competition_status)&&"ended"!=(null==H?void 0:H.competition_status)&&(0,he.jsx)("div",{className:qe,onClick:function(){var n,t;n=null==e?void 0:e.id,x.Z.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"删除提示",icon:null,content:"删除该赛题后,数据不可恢复,请确认是否删除?",onOk:(t=r()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(0,ce.pS)({id:null==g?void 0:g.competitionId,data_id:n}).then((function(e){0==(null==e?void 0:e.status)?(v.ZP.success("删除成功"),yn(!0),c({type:"competitions/getHeader",payload:{identifier:null==g?void 0:g.competitionId}})):v.ZP.error(null==e?void 0:e.message)}));case 1:case"end":return e.stop()}}),e)}))),function(){return t.apply(this,arguments)})})},children:"删除该赛题"})]}),(null==e?void 0:e.show_info)&&(0,he.jsxs)("div",{className:Qe,children:[(0,he.jsxs)(f.Z,{form:k,labelCol:{flex:"70px"},children:[(0,he.jsxs)(f.Z.Item,{className:Ge,label:"题目总分",colon:!1,children:[(0,he.jsx)(pn.Z,{min:0,value:null==e?void 0:e.total_score,disabled:"progressing"==(null==H?void 0:H.competition_status)||"ended"==(null==H?void 0:H.competition_status),className:Ue,onChange:function(n){e.total_score=n,J(Object.assign({},W)),gn(e)},onBlur:function(){bn()}})," 分"]}),(0,he.jsx)(f.Z.Item,{className:We,label:" ",colon:!1,children:(0,he.jsx)(f.Z.Item,{className:We,label:"关卡分值",colon:!1,children:(0,he.jsxs)(b.ZP.Group,{disabled:"progressing"==(null==H?void 0:H.competition_status)||"ended"==(null==H?void 0:H.competition_status),value:null==e?void 0:e.score_setting,onChange:function(n){e.score_setting=n.target.value,1!==n.target.value&&(e.difficulty_level_sort="asc"),J(Object.assign({},W)),gn(e)},onBlur:function(){bn()},children:[(0,he.jsx)(b.ZP,{value:0,children:"均分比例"}),(0,he.jsx)(b.ZP,{value:1,children:"难易度"}),(0,he.jsx)(b.ZP,{value:2,children:"自定义分值"})]})})}),null==e||null===(s=e.challenge_settings)||void 0===s?void 0:s.map((function(n,t){return(0,he.jsx)(f.Z.Item,{className:We,label:" ",colon:!1,children:(0,he.jsxs)("div",{style:{display:"flex"},children:[(0,he.jsx)("i",{className:"iconfont icon-shixunti",style:{color:"#165DFF",width:"14px",height:"14px",margin:"6px 15px 7px 0"}}),(0,he.jsxs)(f.Z.Item,{className:We,label:(0,he.jsx)(y.Z,{title:null==n?void 0:n.subject,placement:"left",children:(0,he.jsx)("div",{className:Je,children:null==n?void 0:n.subject})}),colon:!1,children:[(0,he.jsx)(pn.Z,{min:0,step:.1,value:null==n?void 0:n.score,disabled:V||2!==(null==e?void 0:e.score_setting),style:{width:"96px"},onChange:function(n){e.challenge_settings[t].score=n,J(l()({},W))},onBlur:function(){bn()}}),(0,he.jsx)("span",{className:"ml10",children:"分"})]}),(0,he.jsx)("div",{className:"简单"==(null==n?void 0:n.difficulty)?Ke:"中等"==(null==n?void 0:n.difficulty)?Xe:$e,children:null==n?void 0:n.difficulty})]})},t)}))]}),(0,he.jsxs)("div",{className:en,onClick:function(){jn(e,"close")},children:["收起更多",(0,he.jsx)("i",{className:"iconfont icon-shangjiantou",style:{fontSize:"8px"}})]})]})]},n)})),0==(null==D?void 0:D.length)&&(0,he.jsx)(xn.Z,{customText:"您还没有添加赛题,点击添加赛题"}),(0,he.jsx)(Mn,{competitionId:null==g?void 0:g.competitionId,queryQuetions:yn})]}),2===H.mode&&(0,he.jsxs)("div",{style:{paddingLeft:78,paddingRight:30},children:[(0,he.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,he.jsx)("label",{style:{marginRight:10,width:50,textAlign:"end"},children:"课堂"}),(0,he.jsx)(_.default,{popupClassName:cn,showSearch:!0,filterOption:function(e,n){return-1!==n.key.toUpperCase().indexOf(e.toUpperCase())},disabled:"progressing"===H.competition_status||"ended"===H.competition_status,className:on,onChange:function(){var e=r()(o()().mark((function e(n){var t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return null==g||g.loadingFunction(!0),e.next=3,(0,Ae.ZP)("/api/competitions/".concat(X,"/course_select.json"),{method:"post",body:{course_id:n}});case 3:t=e.sent,null==g||g.loadingFunction(!1),0===(null==t?void 0:t.status)&&c({type:"competitions/getHeader",payload:{identifier:X}});case 6:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),size:"large",style:{flex:1},value:[ne.course_id||ne.default_course_id],placeholder:"请选择需要计算成绩的课堂",children:null==re?void 0:re.map((function(e){return(0,he.jsx)(_.default.Option,{value:null==e?void 0:e.id,children:(0,he.jsxs)(le.Z,{align:"middle",style:{padding:"0px 12px"},children:[(0,he.jsxs)(le.Z,{align:"middle",style:{flex:1},children:[(0,he.jsx)(se.Z,{children:(0,he.jsx)("div",{className:"mr20 font12",style:{lineHeight:"12px",padding:"4px 10px",borderRadius:13,color:e.is_end?"#E53333":"#3061D0",border:"1px solid ".concat(e.is_end?"#FFC4C4":"#C4D2F1")},children:e.is_end?"已结束":"进行中"})}),(0,he.jsx)(se.Z,{style:{flex:1},children:(0,he.jsx)(y.Z,{placement:"topLeft",title:null==e?void 0:e.name,overlayStyle:{maxWidth:430,zIndex:1e4},children:(0,he.jsx)(se.Z,{style:{textOverflow:"ellipsis",overflow:"hidden",maxWidth:430},children:null==e?void 0:e.name})})})]}),(0,he.jsx)(se.Z,{style:{color:"#9096A3"},children:null==e?void 0:e.created_at})]})},"".concat(null==e?void 0:e.name).concat(null==e?void 0:e.id))}))}),(0,he.jsx)("div",{className:De,style:{position:"relative",justifyContent:"center",top:0,right:0,marginLeft:20,height:40,borderRadius:2,alignItems:"center"},onClick:function(){window.open(H.first_category_url)},children:"进入该课堂"})]}),H.course_is_end&&(0,he.jsx)("div",{style:{color:"red",marginLeft:60,marginTop:10},children:"选择已结束的课堂,则无法进行答题的任何操作"}),null==ne||null===(t=ne.competition_course_games)||void 0===t?void 0:t.map((function(e,n){var t;return(0,he.jsxs)("div",{style:{marginBottom:20},children:[(0,he.jsxs)("div",{style:{marginTop:20,display:"flex",alignItems:"center"},children:[(0,he.jsxs)("label",{style:{marginRight:10,width:50,textAlign:"end"},children:["赛道",n+1]}),(0,he.jsx)(j.Z,{className:an,value:e.name,onChange:function(n){e.name=n.target.value,te(l()({},ne))},onBlur:function(){var n=r()(o()().mark((function n(t){return o()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(t.target.value){n.next=2;break}return n.abrupt("return");case 2:return n.next=4,(0,Ae.ZP)("/api/competitions/".concat(X,"/create_course_game.json"),{method:"post",body:{course_id:null==ne?void 0:ne.course_id,competition_course_game_id:e.competition_course_game_id,name:t.target.value}});case 4:0===n.sent.status&&c({type:"competitions/getHeader",payload:{identifier:X}});case 6:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}(),placeholder:"请输入赛道名称",style:{flex:1},maxLength:30,size:"large"}),(0,he.jsx)("i",{onClick:r()(o()().mark((function e(){var n;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!((null==ne||null===(n=ne.competition_course_games)||void 0===n?void 0:n.filter((function(e){return e.homeworks.length<=0})).length)>0)){e.next=3;break}return v.ZP.info("请先完成上一个赛道的作业/考试的选择,只有上一个赛道中添加了作业/试卷才能新增赛道"),e.abrupt("return");case 3:return e.next=5,(0,Ae.ZP)("/api/competitions/".concat(X,"/create_course_game.json"),{method:"post",body:{course_id:null==ne?void 0:ne.course_id}});case 5:0===e.sent.status&&c({type:"competitions/getHeader",payload:{identifier:X}});case 7:case"end":return e.stop()}}),e)}))),style:{color:"#145DFF",marginLeft:15,cursor:"pointer"},className:"iconfont icon-tianjia2"}),0!==n&&(0,he.jsx)("i",{style:{marginLeft:10,cursor:"pointer"},onClick:function(){var n;x.Z.confirm({icon:!1,title:"提示",content:"请确认是否删除该赛道,删除后,不可恢复。",onOk:(n=r()(o()().mark((function n(){return o()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,Ae.ZP)("/api/competitions/".concat(X,"/delete_course_game.json"),{method:"delete",body:{competition_course_game_id:e.competition_course_game_id}});case 2:0===n.sent.status&&c({type:"competitions/getHeader",payload:{identifier:X}});case 4:case"end":return n.stop()}}),n)}))),function(){return n.apply(this,arguments)})})},className:"".concat(sn," iconfont icon-weishezhi")})]}),(0,he.jsxs)("div",{style:{marginTop:20,marginLeft:60},children:[(0,he.jsx)("span",{children:"计入成绩的作业/试卷"}),(0,he.jsx)(Z.ZP,{loading:we,onClick:function(){!function(e){kn.apply(this,arguments)}(e.competition_course_game_id)},style:{marginLeft:10,marginRight:20,background:"#3061D0",display:"inline-flex",height:30,alignItems:"center",justifyContent:"center",width:119,color:"#fff",borderRadius:2,cursor:"pointer",border:"none"},children:"选择作业/试卷"}),(0,he.jsx)("span",{style:{color:"#9096A3"},children:"为了满足竞赛的正常计分排行,请关联作业/试卷"})]}),e.homeworks.length>0?(0,he.jsx)("div",{style:{marginLeft:199,marginTop:10,padding:"30px 20px",background:"#F6F7F9"},children:null==e||null===(t=e.homeworks)||void 0===t?void 0:t.map((function(e,n){var t,i;return(0,he.jsxs)("div",{style:{display:"flex",marginTop:n>0&&20,height:20,alignItems:"center",justifyContent:"space-between"},children:[(0,he.jsx)("div",{style:{minWidth:68,height:24,display:"flex",alignItems:"center",justifyContent:"center",fontSize:12,background:"rgba(22,93,255,0.1)",color:"#3061D0",marginRight:20},children:null===(t=Ie.find((function(n){return n.type===e.homework_type})))||void 0===t?void 0:t.name}),(0,he.jsx)(y.Z,{title:(null==e||null===(i=e.name)||void 0===i?void 0:i.length)>6&&(null==e?void 0:e.name),placement:"topLeft",children:(0,he.jsx)("span",{onClick:function(){window.open("/classrooms/".concat(null==ne?void 0:ne.course_id,"/").concat(Ie.find((function(n){return n.type===e.homework_type})).url,"/").concat(e.homework_id||e.exercise_id,"/detail"))},style:{width:"90%",color:"#3061D0",cursor:"pointer"},className:ln,children:null==e?void 0:e.name})}),(0,he.jsx)("i",{style:{marginLeft:10,cursor:"pointer"},onClick:function(){var n;x.Z.confirm({icon:!1,title:"提示",content:"请确认是否删除该作业,删除后,不可恢复。",onOk:(n=r()(o()().mark((function n(){return o()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,Ae.ZP)("/api/competitions/".concat(X,"/delete_course_homework.json"),{method:"delete",body:{competition_course_homework_id:e.competition_course_homework_id}});case 2:0===n.sent.status&&c({type:"competitions/getHeader",payload:{identifier:X}});case 4:case"end":return n.stop()}}),n)}))),function(){return n.apply(this,arguments)})})},className:"".concat(sn," iconfont icon-weishezhi")})]})}))}):(0,he.jsx)(xn.Z,{})]})})),(0,he.jsx)(x.Z,{open:_e,onCancel:function(){fe(""),Ze(!1)},width:850,title:"选择作业",className:rn,okButtonProps:{loading:we},onOk:r()(o()().mark((function e(){var n,t,i,l,s,a,r;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!((null==ge||null===(n=ge.filter((function(e){return e.checked})))||void 0===n?void 0:n.length)<=0)){e.next=3;break}return v.ZP.info("请选择作业或试卷"),e.abrupt("return");case 3:return Ze(!0),e.next=6,(0,Ae.ZP)("/api/competitions/".concat(X,"/homework_select.json"),{method:"post",body:{course_id:ne.course_id,competition_course_game_id:_e,shixun_homework_ids:null==ge||null===(t=ge.filter((function(e){return e.checked&&"practice"===e.homework_type})))||void 0===t?void 0:t.map((function(e){return e.id})),common_homework_ids:null==ge||null===(i=ge.filter((function(e){return e.checked&&"normal"===e.homework_type})))||void 0===i?void 0:i.map((function(e){return e.id})),group_homework_ids:null==ge||null===(l=ge.filter((function(e){return e.checked&&"group"===e.homework_type})))||void 0===l?void 0:l.map((function(e){return e.id})),program_homework_ids:null==ge||null===(s=ge.filter((function(e){return e.checked&&"hack"===e.homework_type})))||void 0===s?void 0:s.map((function(e){return e.id})),exercise_ids:null==ge||null===(a=ge.filter((function(e){return e.checked&&"exercise"===e.homework_type})))||void 0===a?void 0:a.map((function(e){return e.id}))}});case 6:r=e.sent,Ze(!1),fe(""),0===r.status&&c({type:"competitions/getHeader",payload:{identifier:X}});case 10:case"end":return e.stop()}}),e)}))),children:(0,he.jsxs)("div",{style:{border:"1px solid #F6F7F9",display:"flex",maxHeight:480},children:[(0,he.jsxs)("div",{style:{width:350,borderRight:"1px solid #F6F7F9",overflowY:"auto",overflowX:"hidden",padding:14},children:[(0,he.jsx)(N.t7,{style:{width:312,marginRight:15},dataSource:[],value:{id:"",value:mn.input},onChange:function(e,n){mn.input=e,hn(l()({},mn)),null==Ie||Ie.map((function(e){e.open=!0})),Se(Pe()(Ie))},placeholder:"请输入搜索内容"}),null==Ie?void 0:Ie.map((function(e){var n,t,i,l,s,o,a,r,c;return(0,he.jsxs)("div",{children:[(0,he.jsxs)("div",{style:{marginTop:16,height:22,alignItems:"center",display:"flex",justifyContent:"space-between"},children:[(0,he.jsxs)("div",{style:{cursor:"pointer",color:"#232B40"},onClick:function(){e.open=!e.open,Se(Pe()(Ie))},children:[(0,he.jsx)("i",{style:{marginRight:10,color:"#999999"},className:"iconfont ".concat(e.open?"icon-changyongtubiao-xianxingdaochu-zhuanqu-":"icon-a-bianzu11")}),e.name,(0,he.jsx)("span",{style:{marginLeft:6,color:"#ADB2B8"},children:null==ge||null===(n=ge.filter((function(n){return n.homework_type===e.type})))||void 0===n?void 0:n.length})]}),(0,he.jsx)(ie.Z,{indeterminate:(null==ge||null===(t=ge.filter((function(n){return n.homework_type===e.type})))||void 0===t?void 0:t.length)>(null==ge||null===(i=ge.filter((function(n){return n.homework_type===e.type&&n.checked})))||void 0===i?void 0:i.length)&&0!==(null==ge||null===(l=ge.filter((function(n){return n.homework_type===e.type})))||void 0===l?void 0:l.length)&&(null==ge||null===(s=ge.filter((function(n){return n.homework_type===e.type&&n.checked})))||void 0===s?void 0:s.length)>0,checked:(null==ge||null===(o=ge.filter((function(n){return n.homework_type===e.type})))||void 0===o?void 0:o.length)===(null==ge||null===(a=ge.filter((function(n){return n.homework_type===e.type&&n.checked})))||void 0===a?void 0:a.length)&&0!==(null==ge||null===(r=ge.filter((function(n){return n.homework_type===e.type})))||void 0===r?void 0:r.length),onChange:function(n){n.target.checked?ge.map((function(n){n.homework_type===e.type&&(n.checked=!0)})):ge.map((function(n){n.homework_type===e.type&&(n.checked=!1)})),ye(Pe()(ge))}})]}),null==ge||null===(c=ge.filter((function(n){return n.homework_type===e.type&&e.open&&n.name.includes(decodeURIComponent(mn.input))})))||void 0===c?void 0:c.map((function(e){return(0,he.jsxs)("div",{style:{display:"flex",marginTop:12,height:20,alignItems:"center",justifyContent:"space-between"},children:[zn(e.status||e.exercise_tips[0]),(0,he.jsx)(y.Z,{title:null==e?void 0:e.name,children:(0,he.jsx)("span",{style:{width:"70%"},className:ln,children:null==e?void 0:e.name})}),(0,he.jsx)(ie.Z,{onChange:function(n){e.checked=n.target.checked,ye(Pe()(ge))},checked:e.checked})]})}))]})}))]}),(0,he.jsxs)("div",{style:{width:450,padding:20,overflowY:"auto",overflowX:"hidden"},children:[(0,he.jsxs)("div",{style:{display:"flex",justifyContent:"space-between"},children:[(0,he.jsxs)("span",{children:[(0,he.jsx)("span",{style:{color:"#6B758B"},children:"已选"}),(0,he.jsx)("span",{style:{color:"#3061D0",marginLeft:3},children:null==ge?void 0:ge.filter((function(e){return e.checked})).length})]}),(0,he.jsx)("span",{onClick:function(){ge.map((function(e){e.checked=!1})),ye(Pe()(ge))},style:{color:"#3061D0",cursor:"pointer"},children:"全部清除"})]}),null==ge||null===(i=ge.filter((function(e){return e.checked})))||void 0===i?void 0:i.map((function(e){return(0,he.jsxs)("div",{style:{display:"flex",marginTop:12,height:20,alignItems:"center",justifyContent:"space-between"},children:[zn(e.status||e.exercise_tips[0]),(0,he.jsx)(y.Z,{title:null==e?void 0:e.name,children:(0,he.jsx)("span",{style:{width:"70%"},className:ln,children:null==e?void 0:e.name})}),(0,he.jsx)("i",{style:{marginLeft:10,cursor:"pointer"},onClick:function(){e.checked=!1,ye(Pe()(ge))},className:"".concat(sn," iconfont icon-weishezhi")})]})}))]})]})})]}),3===H.mode&&(0,he.jsxs)("div",{children:[(0,he.jsx)("div",{className:Le,style:{display:"flex",alignItems:"center"},children:(0,he.jsxs)("div",{style:{flex:1},children:["评测设置",(0,he.jsxs)("span",{style:{marginLeft:20,color:"#9096A3",fontSize:"12px",fontWeight:"normal"},children:["答题起止时间:",(0,he.jsxs)("span",{style:{margin:"0 5px",color:"#165DFF",fontSize:"12px",fontWeight:"normal"},children:[null==H?void 0:H.start_time,"~",null==H?void 0:H.end_time]}),((0,Tn.eB)()||(null==H||null===(s=H.permission)||void 0===s?void 0:s.editable))&&(0,he.jsxs)("a",{style:{marginLeft:10,color:"#165DFF",display:"inline-flex"},onClick:function(){c({type:"competitions/setActionTabs",payload:{key:"7"}})},children:[(0,he.jsx)("i",{className:"iconfont icon-bianji10 font14",style:{color:"#165DFF",marginRight:3}})," 编辑"]})]})]})}),(0,he.jsxs)(f.Z,{form:A,layout:"vertical",scrollToFirstError:!0,className:dn,onValuesChange:function(){},children:[(0,he.jsx)(f.Z.Item,{className:Ge,label:"评测服务器配置",colon:!1,name:"evaluation_setting",rules:[{required:!0,message:"必填项:不能为空"}],children:(0,he.jsx)(Bn,{placeholder:"请填写评测服务器配置,格式为:服务器ip 端口 账号 密码,多台服务器用多行表示,如:127.0.0.1 22 root Qz_123123 127.0.0.2 22 root Qz_123123",rows:6,autoSize:{minRows:6,maxRows:999},disabled:!(0,Tn.Ny)()&&(null==H?void 0:H.is_manager)})}),(0,he.jsxs)("div",{style:{display:"flex",justifyContent:"space-between"},children:[(0,he.jsx)(f.Z.Item,{style:{width:400},className:Ge,label:"每日最多提交次数(未填则不限制)",colon:!1,name:"commit_num",rules:[{pattern:new RegExp(/^[1-9]\d*$/,"g"),message:"必须是正整数"}],children:(0,he.jsx)(pn.Z,{disabled:!(0,Tn.Ny)()&&(null==H?void 0:H.is_manager),style:{width:400},autoComplete:"off",controls:!1,precision:0,min:1,className:Ue,placeholder:"请输入提交次数",suffix:(0,he.jsx)("span",{style:{color:"#c5c5c5"},children:"次"})})}),(0,he.jsx)(f.Z.Item,{style:{width:400},className:Ge,label:"评测时长(S)",colon:!1,name:"evaluation_time",rules:[{required:!0,pattern:new RegExp(/^[1-9]\d*$/,"g"),message:"必须是正整数"}],children:(0,he.jsx)(pn.Z,{disabled:!(0,Tn.Ny)()&&(null==H?void 0:H.is_manager),style:{width:400},autoComplete:"off",controls:!1,precision:0,min:1,className:Ue,placeholder:"请输入评测时长",suffix:(0,he.jsx)("span",{style:{color:"#c5c5c5"},children:"S"})})})]}),(0,he.jsx)(f.Z.Item,{className:Ge,label:"运行脚本",colon:!1,name:"evaluation_script",rules:[{required:!0,message:"必填项:不能为空"}],children:(0,he.jsx)(Bn,{disabled:!(0,Tn.Ny)()&&(null==H?void 0:H.is_manager),placeholder:"请输入运行脚本",rows:6,autoSize:{minRows:6,maxRows:999}})})]}),(0,Tn.Ny)()&&(0,he.jsx)("div",{className:nn,children:(0,he.jsx)(pe.Z,{className:tn,onClick:r()(o()().mark((function e(){var n,t,i;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,A.validateFields();case 2:if(n=A.getFieldsValue(),!F){e.next=10;break}return e.next=6,(0,Ae.ZP)("/api/competitions/".concat(X,"/create_work_settings.json"),{method:"post",body:l()({},n)});case 6:0===(null==(t=e.sent)?void 0:t.status)&&v.ZP.info("更改成功"),e.next=14;break;case 10:return e.next=12,(0,Ae.ZP)("/api/competitions/".concat(X,"/update_work_settings.json"),{method:"put",body:l()({},n)});case 12:0===(null==(i=e.sent)?void 0:i.status)&&v.ZP.info("更改成功");case 14:case"end":return e.stop()}}),e)}))),children:"保存更改"})})]})]})})),Yn="all___ZbAJW",Hn="title___QPivo",qn="add_people___jqyIi",Qn="people_icon___Gf35v",Gn="content_user___mESiF",Un="content_left___JUfAC",Wn="user_img_box___rq6y5",Jn="user_img___tN5UW",Kn="user_rule_create___i4hOF",Xn="user_info___ncafT",$n="user_name___hqLNP",et="user_school___m7TBE",nt="delete_text___j_0I0",tt="select_modal___j0vsx",it=t(26724),lt=t.n(it),st=t(77278),ot=["classroomList","loading","dispatch"],at=(0,h.connect)((function(e){return{classroomList:e.classroomList,loading:e.loading}}))((function(e){var n,t,i=e.classroomList,l=(e.loading,e.dispatch),s=p()(e,ot),a=((0,h.useParams)(),i.actionTabs),c=(0,m.useState)([]),u=d()(c,2),g=u[0],b=u[1],k=(0,m.useState)(!0),N=d()(k,2),I=N[0],A=N[1],S=(0,m.useState)(!1),C=d()(S,2),F=C[0],P=C[1],T=f.Z.useForm(),L=d()(T,1)[0],D=(0,m.useState)([]),E=d()(D,2),R=E[0],M=E[1],V=(0,m.useState)(0),B=d()(V,2),z=B[0],O=B[1],Y=(0,m.useState)([]),H=d()(Y,2),q=H[0],Q=H[1],G=(0,m.useState)(!0),U=d()(G,2),W=U[0],J=U[1];(0,m.useRef)();(0,m.useEffect)((function(){"添加管理员"===i.actionTabs.key&&(J(!0),K())}),[i.actionTabs.key]);var K=function(){var e=r()(o()().mark((function e(){var n;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l({type:"classroomList/getSchoolList",payload:{}});case 2:n=e.sent,b(n.map((function(e){return{value:e}})));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),X=function(){var e=r()(o()().mark((function e(){var n,t,l,s,a=arguments;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=a.length>0&&void 0!==a[0]&&a[0])&&!I||F){e.next=11;break}return l=L.getFieldValue(),P(!0),O(n?1:z+1),e.next=7,(0,ce.pA)({id:i.actionTabs.id,page:n?1:z+1,type:(null==l?void 0:l.search_type)||"",school:(null==l?void 0:l.school_name)||"",keyword:(null==l?void 0:l.keyword)||""});case 7:s=e.sent,M(n?Pe()(null==s?void 0:s.data):[].concat(Pe()(R),Pe()(null==s?void 0:s.data))),P(!1),(null===(t=s.users)||void 0===t?void 0:t.length)<10&&A(!1);case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),$=function(){var e=r()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:""==q?v.ZP.error("请选择人数"):(console.log(q),(0,ce.q0)({id:null==s?void 0:s.competitionId,ids:q}).then((function(e){0==e.status?(v.ZP.success("添加成功"),l({type:"classroomList/setActionTabs",payload:{}}),s.queryData()):v.ZP.error(null==e?void 0:e.message)})));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ee=[{title:"",dataIndex:"id",width:40,ellipsis:!0,render:function(e,n){return(0,he.jsx)(ie.Z,{value:n.id,checked:q.includes(String(n.id)),disabled:null==n?void 0:n.checked})}},{title:"姓名",width:100,ellipsis:!0,dataIndex:"name",render:function(e,n){return(0,he.jsx)(y.Z,{placement:"bottom",title:e,children:(0,he.jsx)(h.Link,{className:"bold c-black",to:"/users/".concat(n.login),target:"_blank",children:e||"--"})})}},{title:"职业",dataIndex:"identity",width:130,ellipsis:!0,render:function(e){return(0,he.jsx)(y.Z,{placement:"bottom",title:e,children:(0,he.jsx)("span",{children:e||"--"})})}},{title:"学号/工号",width:100,dataIndex:"student_id",ellipsis:!0,render:function(e){return(0,he.jsx)(y.Z,{placement:"bottom",title:e,children:(0,he.jsx)("span",{children:e||"--"})})}},{title:"手机",width:100,dataIndex:"phone",ellipsis:!0,render:function(e){return(0,he.jsx)(y.Z,{placement:"bottom",title:e,children:(0,he.jsx)("span",{children:e||"--"})})}},{title:"邮箱",dataIndex:"mail",width:100,ellipsis:!0,render:function(e){return(0,he.jsx)(y.Z,{placement:"bottom",title:e,children:(0,he.jsx)("span",{children:e||"--"})})}},{title:"学校/单位",width:150,dataIndex:"school",ellipsis:!0,render:function(e){return(0,he.jsx)(y.Z,{placement:"bottom",title:e,children:(0,he.jsx)("span",{children:e||"--"})})}},{title:"实名认证",dataIndex:"school_name",width:100,render:function(e){return e?"是":"否"}},{title:"状态",dataIndex:"checked",width:80,render:function(e){if(e)return(0,he.jsx)("span",{className:"c-green",children:"已添加"})}}];return(0,he.jsx)(x.Z,{className:"modal_styles",centered:!0,title:"添加管理员",open:"添加管理员"===i.actionTabs.key,okText:"确定",cancelText:"取消",width:1100,zIndex:1e3,bodyStyle:{minHeight:200},onOk:r()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:$();case 1:case"end":return e.stop()}}),e)}))),onCancel:function(){Q([]),l({type:"classroomList/setActionTabs",payload:{}})},children:(0,he.jsxs)("div",{style:{padding:"0 14px"},children:[(0,he.jsxs)(f.Z,{layout:"inline",form:L,initialValues:{school_name:"",keyword:"",search_type:"name"},children:[(0,he.jsx)(f.Z.Item,{name:"search_type",label:"搜索类型",children:(0,he.jsxs)(_.default,{style:{width:120},className:tt,children:[(0,he.jsx)(_.default.Option,{value:"name",children:"姓名"}),(0,he.jsx)(_.default.Option,{value:"phone",children:"手机号"}),(0,he.jsx)(_.default.Option,{value:"mail",children:"邮箱"})]})}),(0,he.jsx)(f.Z.Item,{name:"keyword",label:"搜索内容:",children:(0,he.jsx)(j.Z,{allowClear:!0,style:{width:305},size:"middle",defaultValue:(null===(n=a.selectArrs)||void 0===n?void 0:n.category_name)||(null===(t=a.selectArrs)||void 0===t?void 0:t.name)})}),(0,he.jsx)(f.Z.Item,{name:"school_name",label:"单位:",children:(0,he.jsx)(w.Z,{options:g,style:{width:306},size:"middle",placeholder:"请输入单位名称",filterOption:function(e,n){return-1!==n.value.toUpperCase().indexOf(e.toUpperCase())}})}),(0,he.jsx)(f.Z.Item,{style:{marginRight:0},children:(0,he.jsx)(Z.ZP,{htmlType:"submit",type:"primary",size:"middle",onClick:function(){return function(){var e;if(""===(null===(e=L.getFieldValue())||void 0===e?void 0:e.keyword))return M([]),void v.ZP.error("请输入搜索内容");J(!1),A(!0),P(!1),Q([]),setTimeout((function(){X(!0)}),200)}()},children:"搜索"})})]}),W&&(0,he.jsxs)("div",{className:"tc font16 c-light-black mt40 pb30",children:[(0,he.jsx)("img",{src:st.RL,width:"100",alt:""}),(0,he.jsx)("br",{}),(0,he.jsx)("p",{className:"mt20",children:"请搜索要添加的管理员"})]}),!W&&""==R&&!F&&(0,he.jsxs)("div",{className:"tc font16 c-light-black mt40 pb30",children:[(0,he.jsx)("img",{src:st.z3,width:"100",alt:""}),(0,he.jsx)("br",{}),(0,he.jsx)("p",{className:"mt20",children:"暂时还没有相关数据哦!"})]}),(!W&&""!=R||F)&&(0,he.jsxs)("section",{children:[(0,he.jsx)("div",{className:"flexd-table-header mt20",children:(0,he.jsx)(oe.Z,{pagination:!1,dataSource:[],columns:ee})}),(0,he.jsx)("div",{style:{maxHeight:260,overflow:"auto"},children:(0,he.jsx)(lt(),{initialLoad:!1,pageStart:1,threshold:20,loadMore:function(e){X()},hasMore:I,useWindow:!1,children:(0,he.jsx)(oe.Z,{loading:F,showHeader:!1,pagination:!1,dataSource:R,columns:ee,onRow:function(e){return{onClick:function(e){e.currentTarget.querySelector("input").disabled||function(e){e=String(e);var n=q.indexOf(e);n<0?q.push(e):q.splice(n,1),Q(Pe()(q))}(e.currentTarget.querySelector("input").value)}}}})})})]})]})})})),rt=["globalSetting","dispatch","user"],ct=(0,h.connect)((function(e){return{globalSetting:e.globalSetting,user:e.user}}))((function(e){e.globalSetting;var n,t=e.dispatch,i=e.user,l=p()(e,rt),s=(0,m.useState)([]),a=d()(s,2),c=a[0],u=a[1],h=(0,m.useState)(""),_=d()(h,2),f=_[0],g=_[1];(0,m.useEffect)((function(){y()}),[]);var y=function(){(0,ce.sL)(null==l?void 0:l.competitionId).then((function(e){if(0==(null==e?void 0:e.status)){var n;g(null==e||null===(n=e.creator)||void 0===n?void 0:n.id);var t=[];for(var i in t.push(null==e?void 0:e.creator),null==e?void 0:e.data)t.push(null==e?void 0:e.data[i]);u(t),null==l||l.loadingFunction(!1)}else v.ZP.error(null==e?void 0:e.message)}))};return(0,he.jsxs)("div",{className:Yn,children:[(0,he.jsx)("div",{className:Hn,children:"管理员设置"}),(f==(null==i||null===(n=i.userInfo)||void 0===n?void 0:n.user_id)||(0,Tn.Ny)())&&(0,he.jsxs)("div",{className:qn,onClick:function(){t({type:"classroomList/setActionTabs",payload:{key:"添加管理员",id:null==l?void 0:l.competitionId}})},children:[(0,he.jsx)("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAABvZJREFUWEfNmGlsVFUUx8+5b5a+DhqpKCg0IagJikRFbOlMC8USoRZZLU4LrWCAiMsHg4krERFQE+WLCwaMlEU6UBZRquyUtjNFLIoBFOMaFYTIomBnOsu7x9w386bvvZlOZ9rUOF/e5C7n/t7/nnvuOQ/hf/7D/zkf9BiQTk4pAQndwGk0ANwYfWE6DQiNgMyDQ7cf6IkI3Qakb92DgQdriGAMAQECgnhG+QDUVyfxwENosc/GWz2/dAe0W4B0Yto9nHAXEc8RiyIiEJH6VPkEGEaf4scYXEDCCTh8a2umkBkD0nflA5UgHCXi/aMymSRLSoAC+Jxks4zAoZ4zmUBmDBg6NmMDEJ9pkEiTK6ZgbHc78DVFATfY7txc1WuAdKx6YJiCv4ndNC6iczq1IwFRbUMksmJWLt657nS6kBkpGGqtXMCBv5tg3MyTYnWGsMA2wvNerwD6j1auAE5PaSdWPJMLZjolOkURYUXWyI0LewUwcGTWagKaazZuPrUmlzQMR4DVct6H83sFsO3wrCUEsMgcVhKBoyFHhJ6oR0ZjpKo4Y0sceWtf6h3AlupSAvi0qyORcnGJlfbJq9nVK4B0crGt7fLPvwJRfw0ynSiowSDiOYfVnosjV4V7BVAYbWupmkeAq/Q3h/5qSxFlxAbPcxSsez9dOC1gZTJe+BW2Ha7eCATu+N1rsmA+5VH/Y7WOgrUzETF2Aaa3bEZxUDNJ3z9p95//eyURn5POMohsTfbVQx7FYYtD6YzXj+kWoGbA76ueSkBLCPjthmwmvgKeQAkWOfI3fJQpWNxvuztRPy945OFhEUUZDYADAbiI0mcsktRoz1t7sqf2e6RgTxdPZ36XgO1fVA5RwngbQz6AE+Nose3NzlvzWzLjdOqRq9STN/SDK8n6/Ufm5CJvHwcEEjLpDwL8Rs5f/3Mq0E4B6esqR8CvvE9Ebn0GygAWyS7P0qQAvoqNoj3bWVuZrD/QUvkiJ3pFC1HqTcPQ48i2zMU71rclm9MpoN/n3kQEM8xxDQEPZDtrS8zGAi3ueZzDKtHOGMyXCzyrzWP8vor9RHSvoSYQijPclF3gcacNGGhxFxPRQS1lNxx7hIB83fV98Za3glp70DdzOMfI55yDHAMMMLLk250fHteHpsCf5y4RgZysRGDIimVn7SEzZFIF/b6HPgGiiVo2lVBjoBQ3JlyhvS3UyomG6gsAhngqy2EbqW1dwFcxhkhpEADmuzy6S7jT4dz0QJeA1FrRrz2knOEi+Y2NNhtkgC/Lrs2LRXfAV76OAKvifqoWTVoBReuznXXVYlybd8ZiBFKzmMRkA0XKE5alrBswf90Fw44l+lL5bOKwJuXJQmiUnXVj6KvZ17QH/rnIBU9sYVWMWHrFEClLduTgXTV/BXwzDhGptXM89dKuSm0uYzhHLqirSQno9z24GYiXd9QVia/MEIN2ZH3RWRdo900/SgQj9EbjdTLSl9nObXeTr1xuJ+USAdrVcSaf0XySMVaX5dwSPZixn8EHRSLQ3jL9PBCp9W6nPzU8WMbJzi37A83TlgPSc/ot7rCOr8rObc8HfA+WACn7tLo+oaaK0+DFrIKt/fQJhQEw6J16OyfleOIpM2XIIlsGWCa7drwY9k0dE+FKgz6D1tazMKnY6tx+KOCdvBSIXtDqaHNJoI+LDKXhdtf2E0kVDHknP8aJv5NSvaiTCT/z2V0fu6h1vjUUPHuBgK7SK4SAV2z2AdeK5DToneQlIKfoZ0zKBwaKfg2u8C1AfLCwypA9bnPtiFeOBgVD3om14uboKqUX/QwhbO2T01eEkWBz2UcEMDn+rQPV6mOHvbB+ighDoSsXhP9ZRT8C7ARkBMCFFZUTAcZyoD4CBhE9NtfOiqQKBr33/w5EA5MHKpPnCjUkNsHqrN8d8pYtIDLWy4jsMZurfmXYVzaec566BtErgnjaXvjpoARAOlw6KBTmahKQ6CPGj0FaP2PwutW1+1lqKhsSxsiP+pvHBpabsKj+p2DT+NcA4JkuwpbhjFktLBdHffZ7TN3o1EjLhGk8omzt0v8MQuIRa9GefNEUar7vewC6OdqNP9gK99wi/oWb7vuckPLiuyIak14lHYYZStMthbu2GQDDzSXLiOD5ZIAJXxJiKyCAIlmtOTjqs8uR5pK3OcHjYj5DeMdSuP8JOlx6dSQcvkhAUkYvjmy5tXDvC0YFG8fuIoTxSQ2leGOUpIkW1776SNO9DxDQx1GjOMlSdOCTiHdcGXFlZ2cfk6JSJiqKCLstRQcnGAGbis8CUP/YFulmdX41qaeO4ZuSq+FpOlncR7lI6j0q5eC1OKzhn3BT8RtAtDBdn459vRNWz1mKGgYYADPZgv9ybJcp/38Jk2ytfwErhCtWL5ZsugAAAABJRU5ErkJggg==",className:Qn}),"添加管理员"]}),(0,he.jsx)("div",{className:Gn,children:c.map((function(e,n){var t,s,a;return(0,he.jsxs)("div",{className:Un,children:[(0,he.jsx)("div",{className:Wn,children:(0,he.jsxs)("a",{href:"/users/".concat(e.login,"/classrooms"),target:"_blank",children:[(0,he.jsx)("img",{src:ue.Z.IMG_SERVER+"/images/"+(null==e?void 0:e.image_url),className:Jn}),f==(null==e?void 0:e.id)&&(0,he.jsx)("div",{className:Kn,children:"创建者"})]})}),(0,he.jsxs)("div",{className:Xn,children:[(0,he.jsx)("div",{className:$n,children:null==e?void 0:e.name}),(0,he.jsx)("div",{className:et,children:null==e?void 0:e.school})]}),f!=(null==e?void 0:e.id)&&(f==(null==i||null===(t=i.userInfo)||void 0===t?void 0:t.user_id)||1==(null==i||null===(s=i.userInfo)||void 0===s?void 0:s.role)||2==(null==i||null===(a=i.userInfo)||void 0===a?void 0:a.role))&&(0,he.jsx)("div",{className:nt,onClick:function(){var n,t;n=null==e?void 0:e.id,x.Z.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"删除提示",icon:null,content:"是否确定删除该管理员?",onOk:(t=r()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(0,ce.qN)({id:null==l?void 0:l.competitionId,ids:[n]}).then((function(e){0==(null==e?void 0:e.status)?(v.ZP.success("删除成功"),y()):v.ZP.error(null==e?void 0:e.message)}));case 1:case"end":return e.stop()}}),e)}))),function(){return t.apply(this,arguments)})})},children:"删除"})]},n)}))}),(0,he.jsx)(at,{queryData:y,competitionId:null==l?void 0:l.competitionId})]})})),dt={flex_box_center:"flex_box_center___yg5U2",flex_space_between:"flex_space_between___RNHqN",flex_box_vertical_center:"flex_box_vertical_center___ZT47P",flex_box_center_end:"flex_box_center_end___X4Xs3",flex_box_column:"flex_box_column___OzmB0",all:"all___uSCy0",content:"content___pnhPh",content_left_red:"content_left_red___SmVi6",content_left_none:"content_left_none___jTbL2",content_left_flag:"content_left_flag___mae5L",content_left_info:"content_left_info___mISvV",content_left_title:"content_left_title___lcDeu",content_left_description:"content_left_description___Ris52",content_right:"content_right___AcQrD",content_right_span:"content_right_span___WiMTr",form_item:"form_item___eHCux",form_item_item:"form_item_item___IAs6n",fuzhi:"fuzhi___rSsFz",fuzhi_text:"fuzhi_text___UV3Dz",tijiao:"tijiao___AYAeP",tijiao_text:"tijiao_text___TC6tI",quetions_info:"quetions_info___qHhFg",scoremodal:"scoremodal___LmU2Z",title:"title___M1zQX",bottom:"bottom___P728Z",yes:"yes___gRJi8",no:"no___voaWW",form_item_item_select:"form_item_item_select___g8gNL"},ut="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAAAXNSR0IArs4c6QAAAtxJREFUSEu9lktME1EUhv+/M51GayTGGCPGhRs1btqKGF0oAmHBaloejRbciS6NiUtjonHnxqWPlWEKCZVX3GkiPhJB5CEaiRASV2rUYAS6sK85ZqaUlFc7gOndzdz/nG/uueecOYSDdbyzMZDKpIMETotwP4hy20zwjZSvArx2K2rfyPnu8WLuWEgQMBqaTGRuQ3C4mCN7n5hyQbk+3trzeD39msATXc0HE8lkBwQnHYFWioghj6ZFhsOxL6u3VrwJdISqJCPdAtm9KdiiEcFZKmwcj/S+zPez7ISLsGcCcW8FlrMlmKLCunzoEtAKYzKRerfVk60OIWc1j7syF94loM/QBzd9Z8XCQQxNtPafyuYVADsbJRMrZudkn8AMSK+I7MvXu6g0W9lrA32G/tlx6hegkuyCF5cljm5AapZJiamJ1v4jtIs6nR5z8vUFNAmXi1fHIr33AtHgfRG0raV1q+ox+gz9JgQ3Ngu0QqiqatjqMv5o8K6YcmVdX8Qt+g39uQiqNwMk+MZDb/3b1ui8P6pfExN3CvkhMUBfe3AKkENrC2mSEhfBzlXpTg574K2zYMc6QjWmKU9FRCn84ZymzwguQGTHaoeYd8HVomrqp2Qi1SsQ35KGHKMXte9DfX8qO/UDqTRHBbKnaJTI+PpAYEaBcmb0Qs/3iieXtmfmfj4UkQiBD5rXVTPc0DsrIgwYoQGBVBWFZQULBUNKYpKadnY8HPtlqf3t+kV6tP6lZyPUJmI+cAizyn66aNJYJ9rm0aoHw7Hf+Y4DnefKJfN3UkTKnAKzSeOkLMhRVXPXjoZjcznn/nbdEKDFKczWWWXhuPCJoV2aVvciHIsHjOajpqQ+AuLaCNAu/I20NhKvlLK99Zm5H49E0LQRmDUN2K3NMtpI8yYwIkQFJNv4na5lzXvxlKX7PVnAkv+A7dBm55nSjBi5uyjpEJWDlnRMXNZNSjUIr0z1/znq/wN40G8Rfw3IyQAAAABJRU5ErkJggg==",pt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAAAXNSR0IArs4c6QAAAhdJREFUSEvFlr1vE0EQxd87O6KBFqREokSCFISCii8hKqhuz3KB+CtSBCEo4gJRBETLXwAFJl53VAniSxRIEJpEaZFwkTZQoMT70F3Ox+W4Dyu2jiusk2dufzuzb3aGGOORMech+SCvQZoFOQdJAAYgB5DeguzT2m9Vy7HMQa2WD+ceSTpbtVBoJ7kFz7vP1dV+kX8uUO32aezvP5d0eRxQ1ofkBzSbd9jtfv/Hlv1DQXAJUk/SyaPARt+Q3AEZsNf7mF7nUIQRzLk1AccmgSVQ4Dc870YamgDjNH6eNLKc9O6g2bw4Su9foDHvj3pmVdkIz5TWXomEFf6EatRwaKs+nMTORsOE6j0AGrNZJH0Cv0A+AzAv6WYelORLkJ/g3D0Bpwp8tmjtOardXtDe3tfCuiGf0NqleGMrkqL3lBof09q7sX1R0tPCtWZmLlBB0JFzyyXA17T21sguYxIoyQQWA19Iul1S9B3KmHVJ18vOJ2fhlUgAcWRF0eco9k0I3JZ0pkoQWWjaPx116caB7RC4K+l4FTCKKJPCcSNLnffPeoHA7n9JaZ2iWad8f1lAZypl4fuvBLTKy2K6hf9Q0oOSzS9M52oD+vC8L3BuScCJ0qstknbdl3dcT/W1pwh4MMfU14AjaJ0jRtIN6hyiEmidY+KhLlDXIJyto3AqwHDoQ7oKYA7AbOwzAPAD5Ds0Gn12uxtVXecPo4t94UegNcAAAAAASUVORK5CYII=",mt=["competitions","globalSetting","loading","dispatch","user"],ht=(0,h.connect)((function(e){var n=e.competitions,t=e.loading,i=e.globalSetting,l=e.user;return{competitions:n,globalSetting:i,loading:t.models.competitions,user:l}}))((function(e){var n=e.competitions,t=(e.globalSetting,e.loading),i=e.dispatch,s=e.user,a=p()(e,mt),c=f.Z.useForm(),u=d()(c,1)[0],h=(0,m.useState)(!0),g=d()(h,2),b=g[0],w=g[1],k=(0,m.useState)(!0),N=d()(k,2),I=N[0],A=N[1],S=(0,m.useState)(!0),C=d()(S,2),F=C[0],P=C[1],T=(0,m.useState)(!0),L=d()(T,2),D=L[0],E=L[1],R=(0,m.useState)(""),M=d()(R,2),V=M[0],B=M[1],z=(0,m.useState)(""),O=d()(z,2),Y=O[0],H=O[1],q=(0,m.useState)(""),Q=d()(q,2),G=Q[0],U=Q[1],W=(0,m.useState)(""),J=d()(W,2),K=J[0],X=J[1],$=n.Header,ee=(0,m.useState)(!1),ne=d()(ee,2),te=ne[0],ie=ne[1],le=(0,m.useState)([]),se=d()(le,2),oe=se[0],ae=se[1];console.log("Header:",$),(0,m.useEffect)((function(){ue()}),[]);var ue=function(){(0,ce.rZ)(null==a?void 0:a.competitionId).then((function(e){var n,t,i;w(null==e?void 0:e.name_finish),A(null==e?void 0:e.url_finish),P(null==e?void 0:e.time_finish),E(null==e?void 0:e.question_finish),B(null==e||null===(n=e.competition)||void 0===n?void 0:n.name),U(re()(null==e||null===(t=e.competition)||void 0===t?void 0:t.start_time).format("YYYY-MM-DD HH:mm")+" ~ "+re()(null==e||null===(i=e.competition)||void 0===i?void 0:i.end_time).format("YYYY-MM-DD HH:mm")),H("".concat(window.location.origin,"/competitions/detail/")+(null==e?void 0:e.identifier));var l="";for(var s in null==e?void 0:e.data){var o,r;if(Number(s)==Number((null==e?void 0:e.data.length)-1))l+="赛题"+(Number(s)+1)+":"+(null==e||null===(o=e.data[s])||void 0===o||null===(o=o.shixun)||void 0===o?void 0:o.name);else l+="赛题"+(Number(s)+1)+":"+(null==e||null===(r=e.data[s])||void 0===r||null===(r=r.shixun)||void 0===r?void 0:r.name)+"、"}X(l),u.setFieldValue("identifier",null==e?void 0:e.identifier),null==a||a.loadingFunction(!1)}))};return(0,he.jsxs)("div",{className:dt.all,children:[(0,he.jsxs)("div",{className:dt.content,children:[(0,he.jsxs)("div",{className:b?dt.content_left_none:dt.content_left_red,children:[(0,he.jsx)("img",{className:dt.content_left_flag,src:b?ut:pt}),(0,he.jsxs)("div",{className:dt.content_left_info,children:[(0,he.jsx)("div",{className:dt.content_left_title,children:"主标题设置"}),(0,he.jsx)("div",{className:dt.content_left_description,children:b?"您已设置主标题为:".concat(V):"请在设置中填写正确的竞赛主标题"})]})]}),b?(0,he.jsx)("div",{className:dt.content_right,onClick:function(){a.clickInformation("主标题")},children:"查看"}):(0,he.jsxs)("div",{className:dt.content_right,onClick:function(){a.clickInformation("主标题")},children:["去完善信息",(0,he.jsx)("i",{className:"iconfont icon-xiaojiantou",style:{fontSize:"10px"}})]})]}),(0,he.jsxs)("div",{className:dt.content,children:[(0,he.jsxs)("div",{className:I?dt.content_left_none:dt.content_left_red,children:[(0,he.jsx)("img",{className:dt.content_left_flag,src:I?ut:pt}),(0,he.jsxs)("div",{className:dt.content_left_info,children:[(0,he.jsx)("div",{className:dt.content_left_title,children:"网址设置"}),(0,he.jsxs)("div",{className:dt.content_left_description,children:[I&&(0,he.jsxs)("span",{children:["您已设置网址为:",(0,he.jsx)("a",{href:Y,target:"_blank",children:Y})]}),!I&&(0,he.jsx)("span",{children:"请在设置中填写正确的网址"})]})]})]}),I?(0,he.jsx)("div",{className:dt.content_right,onClick:function(){a.clickInformation("比赛地址")},children:"查看"}):(0,he.jsxs)("div",{className:dt.content_right,onClick:function(){a.clickInformation("比赛地址")},children:["去完善信息",(0,he.jsx)("i",{className:"iconfont icon-xiaojiantou",style:{fontSize:"10px"}})]})]}),(0,he.jsxs)("div",{className:dt.content,children:[(0,he.jsxs)("div",{className:F?dt.content_left_none:dt.content_left_red,children:[(0,he.jsx)("img",{className:dt.content_left_flag,src:F?ut:pt}),(0,he.jsxs)("div",{className:dt.content_left_info,children:[(0,he.jsx)("div",{className:dt.content_left_title,children:"竞赛时间"}),(0,he.jsx)("div",{className:dt.content_left_description,children:F?"您已设置竞赛时间为:".concat(G):"请在设置中填写正确的竞赛时间"})]})]}),F?(0,he.jsx)("div",{className:dt.content_right,onClick:function(){a.clickInformation("竞赛时间")},children:"查看"}):(0,he.jsxs)("div",{className:dt.content_right,onClick:function(){a.clickInformation("竞赛时间")},children:["去完善信息",(0,he.jsx)("i",{className:"iconfont icon-xiaojiantou",style:{fontSize:"10px"}})]})]}),(0,he.jsxs)("div",{className:dt.content,children:[(0,he.jsxs)("div",{className:D?dt.content_left_none:dt.content_left_red,children:[(0,he.jsx)("img",{className:dt.content_left_flag,src:D?ut:pt}),(0,he.jsxs)("div",{className:dt.content_left_info,children:[(0,he.jsx)("div",{className:dt.content_left_title,children:"赛题设置"}),1===$.mode&&(0,he.jsxs)("div",{children:[D&&(0,he.jsx)(y.Z,{placement:"bottom",title:"您已经设置的:"+K,children:(0,he.jsxs)("div",{className:dt.content_left_description,children:["您已经设置的:",K]})}),!D&&(0,he.jsx)("div",{className:dt.content_left_description,children:"请在设置中填写正确的赛题设置"})]}),2===$.mode&&(0,he.jsxs)("div",{children:[$.course_id&&(0,he.jsx)(y.Z,{placement:"bottom",title:"您已经成功设置:"+$.course_name+"为本次竞赛的课堂",children:(0,he.jsxs)("div",{className:dt.content_left_description,children:["您已经成功设置“",$.course_name,"”为本次竞赛的课堂"]})}),!$.course_id&&(0,he.jsx)("div",{className:dt.content_left_description,children:"请在设置中填写正确的赛题设置"})]})]})]}),D?(0,he.jsx)("div",{className:dt.content_right,onClick:a.clickQuetions,children:"查看"}):(0,he.jsxs)("div",{className:dt.content_right,onClick:a.clickQuetions,children:["去完善信息",(0,he.jsx)("i",{className:"iconfont icon-xiaojiantou",style:{fontSize:"10px"}})]})]}),b&&I&&F&&D&&(0,he.jsx)(he.Fragment,{children:(0,he.jsxs)("div",{className:dt.content,children:[(0,he.jsx)(f.Z,{form:u,style:{marginLeft:22},labelCol:{flex:"100px"},children:(0,he.jsx)(f.Z.Item,{className:dt.form_item,colon:!1,name:"identifier",children:(0,he.jsx)(j.Z,{prefix:"".concat(window.location.origin,"/competitions/detail/"),disabled:!0,className:dt.form_item_item})})}),(0,he.jsxs)("div",{className:dt.fuzhi,onClick:function(){var e=document.createElement("input");e.value="".concat(window.location.origin,"/competitions/detail/")+u.getFieldValue("identifier"),document.body.appendChild(e),e.select(),document.execCommand("Copy"),v.ZP.success("复制成功"),e.remove()},children:[(0,he.jsx)("i",{className:"iconfont icon-fuzhi",style:{marginRight:"5px"}}),"复制"]}),(0,he.jsx)("div",{className:dt.fuzhi_text,children:"参赛人员可访问该网址参加比赛"})]})}),(0,he.jsxs)("div",{className:dt.content,children:[(0,he.jsx)(pe.Z,{disabled:!(b&&I&&F&&D),type:"primary",className:dt.tijiao,onClick:r()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:ie(!0),(0,de.GY)({}).then((function(e){ae(null==e?void 0:e.schools)})).then((function(){var e,n,t;u.setFieldsValue({sponsor_schools:null===(e=s.userInfo)||void 0===e?void 0:e.user_school_id,sponsor_user_name:null===(n=s.userInfo)||void 0===n?void 0:n.real_name,sponsor_user_phone:null===(t=s.userInfo)||void 0===t?void 0:t.phone})}));case 2:case"end":return e.stop()}}),e)}))),children:"提交审核"}),(0,he.jsx)("div",{className:"".concat(dt.tijiao_text," ").concat(b&&I&&F&&D?"":"c-red"),children:b&&I&&F&&D?"准备好后,您可发起审核":"请完成竞赛指引后,再提交审核"})]}),(0,he.jsxs)(x.Z,{title:!1,footer:!1,open:te,width:610,className:dt.scoremodal,closable:!1,centered:!0,onCancel:function(){return ie(!1)},children:[(0,he.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,he.jsx)("div",{className:dt.title,children:"为了加快竞赛审核速度,请确认以下信息是否准确"}),(0,he.jsx)("span",{onClick:function(){return ie(!1)},style:{cursor:"pointer"},className:dt.close,children:(0,he.jsx)("i",{className:"iconfont icon-guanbi",style:{color:"#979797",fontSize:"15px"}})})]}),(0,he.jsx)("div",{className:dt.content,children:(0,he.jsxs)(f.Z,{form:u,className:dt.formWrap,onFinish:function(e){(0,ce.qt)(l()(l()({},e),{},{id:null==a?void 0:a.competitionId})).then((function(e){0==(null==e?void 0:e.status)?(v.ZP.success("提交成功"),ie(!1),i({type:"competitions/getStaff",payload:{identifier:null==a?void 0:a.competitionId}}),i({type:"competitions/getHeader",payload:{identifier:null==a?void 0:a.competitionId}})):v.ZP.error(null==e?void 0:e.message)}))},labelCol:{flex:"110px"},children:[(0,he.jsx)(f.Z.Item,{className:dt.form_item,label:"主办方",colon:!1,name:"sponsor_schools",children:(0,he.jsx)(_.default,{mode:"multiple",className:dt.form_item_item_select,options:oe,fieldNames:{label:"name",value:"id"},placeholder:"请输入主办方",filterOption:function(e,n){var t;return(null!==(t=null==n?void 0:n.name)&&void 0!==t?t:"").toLowerCase().includes(e.toLowerCase())}})}),(0,he.jsx)(f.Z.Item,{className:dt.form_item,label:"主要负责人姓名",colon:!1,name:"sponsor_user_name",children:(0,he.jsx)(j.Z,{className:dt.form_item_item,placeholder:"请输入主要负责人姓名"})}),(0,he.jsx)(f.Z.Item,{className:dt.form_item,label:"主要负责人电话",colon:!1,name:"sponsor_user_phone",rules:[{pattern:new RegExp(/^((0\d{2,3}(-)?\d{7,8})|(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8})$/,"g"),message:"必须是正确的座机号或者手机号"}],children:(0,he.jsx)(j.Z,{className:dt.form_item_item,placeholder:"请输入主要负责人电话"})}),(0,he.jsx)("div",{className:dt.bottom,children:(0,he.jsxs)(f.Z.Item,{children:[(0,he.jsx)(Z.ZP,{size:"middle",className:dt.no,onClick:function(){ie(!1)},children:"取消"}),(0,he.jsx)(Z.ZP,{className:dt.yes,size:"middle",type:"primary",htmlType:"submit",loading:t,children:"保存"})]})})]})})]})]})})),_t="ModalStyle___cW8H3",ft=["competitions","globalSetting","dispatch","user","loadingFunction","loading"],xt=["key","name"],vt=(0,h.connect)((function(e){return{competitions:e.competitions,loading:e.loading.effects}}))((function(e){var n=e.competitions,t=(e.globalSetting,e.dispatch),i=(e.user,e.loadingFunction),s=void 0===i?function(e){}:i,a=e.loading,c=(p()(e,ft),n.GuidesData),u=(0,h.useParams)().identifier,_=(0,m.useRef)(),g=f.Z.useForm(),y=d()(g,1)[0],b=f.Z.useWatch("list",y),w=function(){var e=r()(o()().mark((function e(n){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(console.log("====",n),!(n.list.length<2)){e.next=4;break}return v.ZP.warning("请至少添加2个赛程"),e.abrupt("return");case 4:return e.next=6,t({type:"competitions/postGuides",payload:l()({identifier:u},n)});case 6:0==e.sent.status&&(v.ZP.success("更新成功"),t({type:"competitions/getHeader",payload:{identifier:u}}),k());case 8:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),k=function(){t({type:"competitions/getGuides",payload:{identifier:u}})};return(0,m.useEffect)((function(){s(!1),k()}),[]),(0,m.useEffect)((function(){var e;y.setFieldsValue(l()(l()({},(null==c?void 0:c.data)||{}),{},{list:null==c||null===(e=c.data)||void 0===e||null===(e=e.list)||void 0===e?void 0:e.map((function(e){return l()(l()({},e),{},{competition_time:null!=e&&e.competition_time?re()(null==e?void 0:e.competition_time):null})}))}))}),[c]),(0,he.jsx)(hn.Z,{spinning:!!a["competitions/getGuides"]||!!a["competitions/postGuides"],children:(0,he.jsx)("div",{className:"p30",children:(0,he.jsxs)(f.Z,{form:y,colon:!1,onFinish:w,initialValues:{list:[{},{}]},children:[(0,he.jsxs)(le.Z,{wrap:!1,align:"middle",gutter:20,children:[(0,he.jsx)(se.Z,{children:"赛程设置"}),(0,he.jsx)(se.Z,{children:(0,he.jsx)(f.Z.Item,{style:{marginBottom:0},name:"guides_is_hidden",valuePropName:"checked",children:(0,he.jsx)(ie.Z,{children:"隐藏"})})}),(0,he.jsx)(se.Z,{flex:1,children:(0,he.jsx)(le.Z,{wrap:!1,align:"middle",justify:"end",children:(0,he.jsx)(se.Z,{children:(0,he.jsx)(N.op,{icon:(0,he.jsx)("i",{className:"iconfont icon-xiaojiahao "}),onClick:function(){6!=(null==b?void 0:b.length)?_.current({}):v.ZP.warning("赛程最多可添加6个")},children:"新增"})})})})]}),(0,he.jsx)("div",{className:"mt25 mb30",style:{padding:"14px 20px",background:"#F6F7F9",color:"#464F66"},children:"规则说明:在此版块管理员可以创建赛事的日程时间轴,每个赛程将在时间轴上按序号顺序依次排列。创建成功后将对平台用户公开,使用户能够轻松了解整个赛事的进度和安排。"}),(0,he.jsx)(f.Z.List,{name:"list",children:function(e,n){var t=n.add,i=n.remove;return _.current=t,(0,he.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"20px"},children:e.map((function(e,n){var t=e.key,s=e.name,o=p()(e,xt);return(0,he.jsxs)("div",{children:[(0,he.jsx)("div",{style:{background:"#F6F7F9",padding:"10px 20px"},children:(0,he.jsxs)(le.Z,{wrap:!1,align:"middle",justify:"space-between",children:[(0,he.jsxs)(se.Z,{children:["赛程",(0,me.EM)(n+1)]}),(0,he.jsx)(se.Z,{children:(0,he.jsx)("span",{className:"c-red current",onClick:function(){x.Z.confirm({className:_t,icon:null,centered:!0,title:"提示",width:460,content:"确定要删除此赛程吗?删除后,请点击“保存更改”按钮以保存此次操作。",onOk:function(){i(s)}})},children:"删除"})})]})}),(0,he.jsx)("div",{className:"p20",style:{border:"1px solid #F1F1F1",borderTopColor:"transparent"},children:(0,he.jsxs)(le.Z,{wrap:!1,align:"middle",gutter:40,children:[(0,he.jsx)(se.Z,{children:(0,he.jsx)(f.Z.Item,l()(l()({label:"赛程名称"},o),{},{name:[s,"name"],rules:[{required:!0,message:"请输入赛程名称"},{whitespace:!0,message:"赛程名称不能全为空格"}],children:(0,he.jsx)(j.Z,{placeholder:"请输入赛程名称",maxLength:10,showCount:!0,style:{width:360}})}))}),(0,he.jsx)(se.Z,{flex:1,children:(0,he.jsx)(f.Z.Item,l()(l()({label:"赛程时间"},o),{},{name:[s,"competition_time"],rules:[{required:!0,validator:function(e,t){var i;return null===t?Promise.reject("请选择截止时间"):0!==n&&re()(t).startOf("second")<=re()(null==b||null===(i=b[n-1])||void 0===i?void 0:i.competition_time).startOf("second")?Promise.reject("当前赛程时间需晚于上一个赛程时间,请重新选择"):Promise.resolve()}}],children:(0,he.jsx)(te.default,{style:{width:"100%"},placeholder:"请选择赛程时间",format:"YYYY-MM-DD HH:mm",disabledDate:0!==n&&function(e){var t;return(0,me.Q8)(e,null,null,null==b||null===(t=b[n-1])||void 0===t?void 0:t.competition_time)},disabledTime:0!==n&&function(e){var t;return(0,me.d0)(e,null==b||null===(t=b[n-1])||void 0===t?void 0:t.competition_time)},suffixIcon:(0,he.jsx)(he.Fragment,{}),showTime:{format:"HH:mm",defaultValue:re()((0,me.U6)(),"HH:mm")}})}))})]})})]},t)}))})}}),(0,he.jsx)(le.Z,{className:"mt20",wrap:!1,justify:"end",gutter:20,children:(0,he.jsx)(se.Z,{children:(0,he.jsx)(f.Z.Item,{children:(0,he.jsx)(Z.ZP,{type:"primary",htmlType:"submit",children:"保存更改"})})})})]})})})})),gt=["competitions","globalSetting","dispatch","user"],yt=(0,h.connect)((function(e){return{competitions:e.competitions,globalSetting:e.globalSetting,user:e.user}}))((function(e){var n=e.competitions,t=(e.globalSetting,e.dispatch),i=(e.user,p()(e,gt),(0,h.useParams)().identifier),l=(0,m.useState)(!0),s=d()(l,2),o=(s[0],s[1],(0,m.useState)("竞赛信息")),a=d()(o,2),r=a[0],c=a[1],u=(0,m.useState)(!0),_=d()(u,2),f=_[0],x=_[1],v=(0,m.useState)(null),g=d()(v,2),y=(g[0],g[1]),j=(0,m.useState)(""),b=d()(j,2),w=b[0],Z=b[1],k=function(e){x(e)};return(0,m.useEffect)((function(){}),[r]),(0,m.useEffect)((function(){"1"===n.actionTabs.key?(c("赛题设置"),t({type:"competitions/setActionTabs",payload:{}})):"5"===n.actionTabs.key?(c("竞赛指引"),t({type:"competitions/setActionTabs",payload:{}})):"7"===n.actionTabs.key&&(c("竞赛信息"),t({type:"competitions/setActionTabs",payload:{}}))}),[n.actionTabs]),(0,he.jsx)("div",{className:I,ref:y,children:(0,he.jsxs)("div",{className:A,children:[(0,he.jsx)("div",{className:S,children:"基础设置"}),(0,he.jsxs)("div",{className:C,children:[(0,he.jsx)("div",{className:F,children:(0,he.jsx)("div",{children:["竞赛信息","图片设置","赛题设置","赛程设置","管理人员","竞赛指引"].map((function(e,n){return(0,he.jsx)("div",{className:r==e?T:P,onClick:function(){document.body.scrollIntoView({block:"start",behavior:"smooth"}),c(e),x(!0)},children:e},n)}))})}),(0,he.jsx)("div",{className:L,children:(0,he.jsxs)(hn.Z,{spinning:f,children:["竞赛信息"==r&&(0,he.jsx)(xe,{competitionId:i,loadingFunction:k,formName:w}),"图片设置"==r&&(0,he.jsx)(Ce,{competitionId:i,loadingFunction:k}),"赛题设置"==r&&(0,he.jsx)(On,{competitionId:i,loadingFunction:k}),"赛程设置"==r&&(0,he.jsx)(vt,{loadingFunction:k}),"管理人员"==r&&(0,he.jsx)(ct,{competitionId:i,loadingFunction:k}),"竞赛指引"==r&&(0,he.jsx)(ht,{competitions:n,clickInformation:function(e){c("竞赛信息"),"主标题"==e?Z("name"):"比赛地址"==e?Z("identifier"):"竞赛时间"==e&&Z("start_time")},clickQuetions:function(){c("赛题设置")},competitionId:i,loadingFunction:k})]})})]})]})})})),jt=t(20834),bt="bg___htQ1O",wt="title___dw_wz",Zt="left___CDy7v",kt="muitem___pDhZj",Nt="muitemclick___WXoKV",It="right___tNRAa",At="button___tMn5K",St={flex_box_center:"flex_box_center___Y72kq",flex_space_between:"flex_space_between___d30ej",flex_box_vertical_center:"flex_box_vertical_center___p_tif",flex_box_center_end:"flex_box_center_end___AyBVH",flex_box_column:"flex_box_column___NQalW",bg:"bg___cLFww",btns:"btns___uWjSy",confirm:"confirm___ZvnTx",cancel:"cancel___v9uv4",deletetitle:"deletetitle___DnoRO",submitwork:"submitwork___tVjOE",scoremodal:"scoremodal___iKA69",title:"title___GESKF",content:"content___r8E9Y",bottom:"bottom___HS8jb",yes:"yes___itu44",no:"no___Qs1U3",bottoms:"bottoms___ng0EW",loaderimg:"loaderimg___XJWfN",upload:"upload___zGUpB"},Ct=t(68446),Ft=t(1012),Pt=t(47257),Tt=t.n(Pt),Lt=t(28388),Dt=t(70464),Et=["competitions","globalSetting","loading","dispatch","selectedKeys","isedit","setisedit","user"],Rt=(0,h.connect)((function(e){var n=e.competitions,t=e.loading,i=e.globalSetting,l=e.user;return{competitions:n,globalSetting:i,loading:t.models.competitions,user:l}}))((function(e){var n,t,i=e.competitions,s=(e.globalSetting,e.loading,e.dispatch),a=(e.selectedKeys,e.isedit),c=e.setisedit,u=e.user,_=(p()(e,Et),(0,h.useParams)().identifier),f=i.RightItems,g=i.Header,b=(0,m.useState)(!1),w=d()(b,2),k=w[0],I=w[1],A=(0,m.useState)(!1),S=d()(A,2),C=S[0],F=S[1],P=(0,m.useState)(!0),T=d()(P,2),L=T[0],D=T[1],E=(0,m.useState)([]),R=d()(E,2),M=R[0],V=R[1],B=(0,m.useState)([]),z=d()(B,2),O=z[0],Y=z[1],H=(0,m.useState)(f.md_content),q=d()(H,2),Q=q[0],G=q[1],U=(0,m.useState)(!1),W=d()(U,2),J=W[0],K=W[1],X=(0,m.useState)(""),$=d()(X,2),ee=$[0],te=$[1],ae=(0,m.useState)([]),de=d()(ae,2),_e=de[0],fe=de[1],xe=(0,m.useState)(!1),ve=d()(xe,2),ge=ve[0],ye=ve[1],je=(0,m.useState)(),be=d()(je,2),we=be[0],Ze=be[1],ke=(0,m.useState)(!1),Ne=d()(ke,2),Ie=Ne[0],Se=(Ne[1],(0,m.useState)(0)),Ce=d()(Se,2),Fe=Ce[0],Te=Ce[1],Le=((0,h.useParams)(),re()()>re()(null==g?void 0:g.start_time)&&re()()0,openFileDialogOnClick:re()()>re()(null==g?void 0:g.start_time)&&re()()400)){e.next=5;break}return v.ZP.error("文件名称长度不能超过400个字符"),e.abrupt("return",!1);case 5:if("zip"==i){e.next=8;break}return v.ZP.error("仅支持zip上传"),e.abrupt("return",!1);case 8:if(!(t>2)){e.next=11;break}return v.ZP.error("《".concat(n.name,"》文件无法上传。超过单个文件上传大小限制(2GB)")),e.abrupt("return",!1);case 11:return fe([{name:n.name,file:n}]),e.abrupt("return",!1);case 13:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)}),onRemove:(n=r()(o()().mark((function e(n){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:fe(Pe()(_e.filter((function(e){return e.name!==n.name}))));case 1:case"end":return e.stop()}}),e)}))),function(e){return n.apply(this,arguments)})}),De=[{title:"选手姓名",dataIndex:"user_name",width:100,ellipsis:!0,render:function(e){return e||"--"}},{title:"提交状态",width:100,dataIndex:"evaluation_status",render:function(e){return"waiting"==e?(0,he.jsx)("span",{style:{color:"#00B187 "},children:"排队中"}):"progress"==e?(0,he.jsx)("span",{style:{color:""},children:"进行中"}):"cancelled"==e?(0,he.jsx)("span",{style:{color:"#E53333"},children:"已取消"}):"completed"==e?(0,he.jsx)("span",{style:{color:"#165DFF"},children:"已完成"}):"error"==e?(0,he.jsx)("span",{style:{color:"#ff4d4f"},children:"提交失败"}):"--"}},{title:"得分",width:80,dataIndex:"evaluation_score",render:function(e){return e||"--"}},{title:"描述",width:222,dataIndex:"comment",render:function(e){return(0,he.jsx)(y.Z,{title:e,children:(0,he.jsx)("span",{children:e||"- -"})})}},{title:"提交时间",width:200,dataIndex:"commit_at",render:function(e){return e?re()(e).format("YYYY.MM.DD HH:mm:ss"):"--"}},{title:"下载文件",ellipsis:!0,dataIndex:"commit_id",render:function(e,n){var t,i,l,s,o,a;return(0,he.jsx)(y.Z,{placement:"topLeft",title:null==n||null===(t=n.attachments)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.title,children:null!=n&&null!==(i=n.attachments)&&void 0!==i&&null!==(i=i[0])&&void 0!==i&&i.is_oss?(0,he.jsx)("a",{onClick:function(){var e;(0,me.Nd)("","".concat(null==n||null===(e=n.attachments)||void 0===e||null===(e=e[0])||void 0===e?void 0:e.url.replace("disposition=inline","")))},children:(null==n||null===(l=n.attachments)||void 0===l||null===(l=l[0])||void 0===l?void 0:l.title)||"--"}):(0,he.jsx)("a",{href:ue.Z.API_SERVER+(null==n||null===(s=n.attachments)||void 0===s||null===(s=s[0])||void 0===s?void 0:s.url),download:null==n||null===(o=n.attachments)||void 0===o||null===(o=o[0])||void 0===o?void 0:o.title,children:(null==n||null===(a=n.attachments)||void 0===a||null===(a=a[0])||void 0===a?void 0:a.title)||"--"})})}},{title:"测评信息",width:120,dataIndex:"commit_id",render:function(e,n){return(0,he.jsxs)(he.Fragment,{children:[(0,he.jsx)(Z.ZP,{style:{padding:0},type:"link",disabled:"completed"!=(null==n?void 0:n.evaluation_status),onClick:function(){var e=x.Z.confirm({centered:!0,okText:"确定",icon:null,cancelText:"取消",title:"运行结果",content:(0,he.jsx)("div",{style:{maxHeight:500,overflow:"auto"},children:null==n?void 0:n.evaluation_info}),onOk:function(){return e.destroy()},onCancel:function(){return e.destroy()}})},children:"查看"}),(0,he.jsx)(Z.ZP,{className:"ml10",style:{padding:0},type:"link",danger:!0,disabled:"waiting"!=(null==n?void 0:n.evaluation_status),onClick:function(){var e,t=x.Z.confirm({centered:!0,okText:"确定",icon:null,cancelText:"取消",title:"",content:(0,he.jsx)(he.Fragment,{children:"取消后,该成员提交的作品将不进行评测排队,请确认是否取消。"}),onOk:(e=r()(o()().mark((function e(){var i;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ae.ZP)("/api/competitions/".concat(_,"/competition_commit_records/").concat(n.id,"/cancel.json"),{method:"POST",body:{record_id:n.id}});case 2:0==(null==(i=e.sent)?void 0:i.status)&&(v.ZP.success("取消成功"),t.destroy(),Ye());case 4:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)}),onCancel:function(){return t.destroy()}})},children:"取消"})]})}}];(0,m.useEffect)((function(){var e;Ie&&(null===(e=we)||void 0===e||e.cancel())}),[Ie]);var Ee=0;(0,m.useEffect)((function(){Fe<3&&Fe&&_e.map(function(){var e=r()(o()().mark((function e(n){var t,i,l,s;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.status&&"error"!==n.status||Ie){e.next=22;break}return n.status="uploading",n.file.status="uploading",e.next=5,Re(n,{login:null==u||null===(t=u.userInfo)||void 0===t?void 0:t.login,container_type:"CompetitionWorkMode",container_id:null,description:"",realFileName:!0});case 5:if(0!=(null==(i=e.sent)?void 0:i.status)){e.next=20;break}if(console.log(i),++Ee!=_e.length){e.next=18;break}return Te(0),ye(!1),e.next=14,(0,Ae.ZP)("/api/competitions/".concat(_,"/competition_commit_records.json"),{method:"post",body:{attachment_ids:[null==i||null===(l=i.data)||void 0===l?void 0:l.attachment_id]}});case 14:0===(null==(s=e.sent)?void 0:s.status)&&(v.ZP.info(null==s?void 0:s.message),Ye()),fe([]),Ye();case 18:e.next=22;break;case 20:Te(2),ye(!1);case 22:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}())}),[Fe]);var Re=function(){var e=r()(o()().mark((function e(n,t){var i,l,s,a,r,c,d,p,m,h,_;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.file_name=n.name,d=n.name,e.next=4,(0,Ae.ZP)("/api/buckets/get_competition_work_mode_token.json",{method:"get"});case 4:if(0===(null==(p=e.sent)?void 0:p.status)){e.next=12;break}return _e[_e.findIndex((function(e){return e.name===d}))].status="error",_e[_e.findIndex((function(e){return e.name===d}))].file.status="error",v.ZP.warning("上传失败,请重新尝试"),Te(2),ye(!1),e.abrupt("return");case 12:return p.data=JSON.parse((0,Ct.pe)(p.data)),we=new(Tt())({endpoint:null==p||null===(i=p.data)||void 0===i?void 0:i.end_point,region:null==p||null===(l=p.data)||void 0===l?void 0:l.region,accessKeyId:null==p||null===(s=p.data)||void 0===s?void 0:s.access_key_id,accessKeySecret:null==p||null===(a=p.data)||void 0===a?void 0:a.access_key_secret,bucket:null==p||null===(r=p.data)||void 0===r?void 0:r.bucket,stsToken:null==p||null===(c=p.data)||void 0===c?void 0:c.security_token}),console.log(n,"file"),Ze(we),(m=n.name.split(".")).pop(),h=t.realFileName?m.join("."):(0,Ft.Z)(),_=(new Date).getTime(),e.abrupt("return",new Promise((function(e,i){try{var l,s;we.multipartUpload("competition_work_mode/".concat(null==u||null===(l=u.userInfo)||void 0===l?void 0:l.login,"/").concat(h+"_"+_).concat(d.indexOf(".")>-1?"."+d.split(".").pop():""),new Blob([n.file],{type:n.file.type}),{timeout:36e5,partSize:1002400,progress:function(e,n,t){try{console.log("进度",e,n,t),2==Fe&&(Te(1),ye(!0));var i=_e.findIndex((function(e){return e.name===d}));console.log("index",i),_e[i].file.percent=100*e,_e[i].tempCheckpoint=n,fe(Pe()(_e))}catch(e){}},checkpoint:_e[_e.findIndex((function(e){return e.name===d}))].tempCheckpoint,callback:{customValue:{id:d+""},url:null==p||null===(s=p.data)||void 0===s?void 0:s.callback_url,host:null==p?void 0:p.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,Ae.rz)(t)}}).then((function(t){var i,l=_e.findIndex((function(e){return e.name===d})),s="done";if(0===(null===(i=t.data)||void 0===i?void 0:i.status)){var o;n.response=null===(o=t.data)||void 0===o?void 0:o.data;var a=_e.findIndex((function(e){return e.name===d}));_e[a].status="done",_e[a].file.status="done"}else{var r;v.ZP.warning(null===(r=t.data)||void 0===r?void 0:r.message),s="error"}_e[l].status=s,_e[l].file.status=s,e(null==t?void 0:t.data)})).catch((function(e){_e[_e.findIndex((function(e){return e.name===d}))].status="error",_e[_e.findIndex((function(e){return e.name===d}))].file.status="error",v.ZP.warning("上传失败,请重新尝试"),fe(Pe()(_e)),i(e),Te(2),ye(!1),console.log("err:",e)}))}catch(e){}})));case 21:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),Me=function(){var e=r()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==_e.length){e.next=3;break}return v.ZP.info("提交失败,请上传作品文件"),e.abrupt("return");case 3:ye(!0),Te(1);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();(0,m.useEffect)((function(){null!=g&&g.is_member&&3===(null==g?void 0:g.mode)&&Ye()}),[g]),(0,m.useEffect)((function(){var e,n=[];null==f||null===(e=f.attachments)||void 0===e||e.map((function(e){var t={uid:e.id,name:e.title,response:{id:e.id}};n.push(t)})),Y(n)}),[null==f?void 0:f.attachments]),(0,m.useEffect)((function(){te(null==f?void 0:f.name),G(f.md_content),K(null==f?void 0:f.hidden)}),[f.md_content||f.name||f.hidden]),console.log("---",O);var Ve={name:"file",multiple:!0,withCredentials:!0,action:ue.Z.API_SERVER+"/api/attachments.json",fileList:O,onRemove:function(e){(0,ce.y8)({id:e.response.id})},onChange:function(e){Y(Pe()(e.fileList))},beforeUpload:function(e){var n=e.size/1024/1024<150;return n||(v.ZP.info("文件大小必须小于150MB"),ne.Z.LIST_IGNORE)}};function Be(){return(Be=r()(o()().mark((function e(){var n;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,s({type:"competitions/updateMdContent",payload:{attachment_ids:ze(O),competition_module_id:f.id,md_content_id:f.md_id,content:Q,identifier:_,hidden:J,description:ee}});case 2:0===(null==(n=e.sent)?void 0:n.status)&&(v.ZP.info("提交成功"),c(!1),s({type:"competitions/getItem",payload:{url:f.params_url}}),s({type:"competitions/getHeader",payload:{identifier:_}}),s({type:"competitions/setActionTabs",payload:{key:"showheader"}}));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ze(e){var n=[];return(null==e?void 0:e.length)<=0||e&&(null==e||e.map((function(e){n.push(e.response.id)}))),n}function Oe(){return Oe=r()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:x.Z.confirm({icon:!1,title:"提示",content:"删除页面后,数据不可恢复,请确认是否删除",onOk:function(){var e=r()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ae.ZP)("/api/competitions/".concat(_,"/competition_modules/").concat(f.id,".json"),{method:"delete"});case 2:0===e.sent.status&&(s({type:"competitions/getHeader",payload:{identifier:_}}),c(!1));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()});case 1:case"end":return e.stop()}}),e)}))),Oe.apply(this,arguments)}var Ye=function(){var e=r()(o()().mark((function e(){var n,t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return D(!0),e.next=3,(0,Ae.ZP)("/api/competitions/".concat(_,"/competition_commit_records.json"),{method:"get"});case 3:0===(null==(n=e.sent)?void 0:n.status)&&(V(null==n||null===(t=n.data)||void 0===t?void 0:t.records),D(!1));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,he.jsxs)("section",{className:St.bg,children:[a?(0,he.jsxs)("div",{children:[!(3===(null==g?void 0:g.mode)&&"entrance"===(null==f?void 0:f.module_type))&&(0,he.jsxs)("div",{style:{marginBottom:30,display:"flex",alignItems:"center"},children:[(0,he.jsx)(j.Z,{style:{width:"82%",height:40,borderRadius:2,border:"1px solid #DCDCDC"},value:ee,onChange:function(e){te(e.target.value)}})," ",(0,he.jsx)(ie.Z,{className:"ml40 font14",style:{marginLeft:"23px"},checked:J,onChange:function(e){K(e.target.checked)},children:(0,he.jsx)("span",{style:{display:"inline-block"},children:"隐藏"})}),(0,he.jsxs)("span",{className:St.deletetitle,onClick:function(){!function(){Oe.apply(this,arguments)}()},children:[(0,he.jsx)("i",{className:"iconfont icon-piliangshanchu3",style:{fontSize:14,marginRight:6}}),"删除页面"]})]}),(0,he.jsx)(Dt.Z,{defaultValue:f.md_content,onChange:function(e){return G(e)}}),(0,he.jsxs)(ne.Z,l()(l()({},Ve),{},{children:[(0,he.jsx)("div",{className:"inline-block current",children:(0,he.jsx)(N.op,{style:{borderRadius:2,marginTop:18},children:"上传附件"})}),(0,he.jsx)("span",{className:"ml25 c-grey-999",children:"(单个文件150M以内)"})]})),(0,he.jsxs)("div",{className:St.btns,children:[(0,he.jsx)(Z.ZP,{className:St.cancel,onClick:function(){return c(!1)},children:"取消"}),(0,he.jsx)(pe.Z,{className:St.confirm,type:"primary",onClick:function(){return Be.apply(this,arguments)},children:"保存更改"})]})]}):(0,he.jsxs)("div",{children:[!(null!=f&&f.md_content)&&!(3===(null==g?void 0:g.mode)&&"entrance"===(null==f?void 0:f.module_type))&&(0,he.jsx)(xn.Z,{}),(0,he.jsx)(Lt.Z,{style:{marginBottom:30,width:"calc(1015px - 60px)"},value:f.md_content||""}),f&&f.attachments&&f.attachments.map((function(e,n){return(0,he.jsx)("div",{children:(0,he.jsxs)("a",{href:(null===ue.Z||void 0===ue.Z?void 0:ue.Z.API_SERVER)+e.url,target:"_self",download:e.title,children:[(0,he.jsx)("i",{style:{color:"#29BD8B"},className:"font-14 color-green iconfont icon-fujian mr8"}),(0,he.jsx)("span",{style:{color:"#000000"},children:e.title}),(0,he.jsx)("span",{style:{color:"#000000",marginLeft:"10px"},children:e.filesize})]})})}))]}),a&&3===(null==g?void 0:g.mode)&&"entrance"===(null==f?void 0:f.module_type)&&(0,he.jsx)("div",{style:{borderTop:"1px solid #f1f1f1",margin:"20px 0"}}),"entrance"===(null==f?void 0:f.module_type)&&(0,he.jsxs)("div",{style:{marginTop:15},children:[(0,he.jsxs)("div",{style:{justifyContent:"space-between",display:"flex"},children:[(0,he.jsx)("span",{style:{color:"#333333",fontWeight:600,fontSize:"14px"},children:"作品提交"}),(0,he.jsxs)("span",{style:{color:"#9096A3",marginLeft:"auto",fontSize:"12px"},children:["作品提交时间",(0,he.jsxs)("span",{style:{color:"#232B40",marginLeft:5},children:[null==g?void 0:g.start_time,"~",null==g?void 0:g.end_time]})]})]}),(0,he.jsxs)("div",{style:{display:"flex",position:"relative",marginBottom:20},children:[(0,he.jsx)("div",{className:"mt20",style:{width:333},onClick:function(){re()()re()(null==g?void 0:g.end_time)?v.ZP.warning("非作品提交时间,不可操作"):null!=g&&g.is_member||F(!0)},children:(0,he.jsx)(ne.Z.Dragger,l()(l()({},Le),{},{maxCount:1,children:(0,he.jsxs)("div",{style:{textAlign:"center"},children:[(0,he.jsx)("p",{style:{marginTop:22},children:(0,he.jsx)("i",{className:"iconfont icon-shangchuan",style:{color:"#5091FF",fontSize:"30px"}})}),(0,he.jsxs)("p",{className:"mt10",style:{marginBottom:22},children:["拖拽文件或",(0,he.jsx)("a",{children:"点击此处上传"})]})]})}))}),(0,he.jsxs)("div",{style:{marginLeft:20,marginTop:120},children:[re()()>re()(null==g?void 0:g.start_time)&&re()()0&&(0,he.jsxs)("div",{className:"mt40",style:{borderTop:"1px solid #F1F1F1"},children:[(0,he.jsxs)(le.Z,{className:"mt30",align:"middle",justify:"space-between",children:[(0,he.jsx)(se.Z,{style:{fontWeight:600},children:"我的成绩"}),(0,he.jsx)(se.Z,{children:(0,he.jsx)(Z.ZP,{type:"primary",onClick:Ye,children:"更新"})})]}),(0,he.jsx)(oe.Z,{className:"mt30",loading:L,pagination:!1,dataSource:M,columns:De})]})]}),(0,he.jsx)(x.Z,{title:"报名",open:C,okText:"立即报名",cancelText:"取消",centered:!0,width:320,onCancel:function(){F(!1)},onOk:function(){F(!1),I(!0)},children:(0,he.jsx)("div",{children:"你暂未报名,请先报名"})}),(0,he.jsxs)(x.Z,{title:!1,footer:!1,open:k,width:318,className:St.scoremodal,closable:!1,centered:!0,children:[(0,he.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,he.jsx)("div",{className:St.title,children:"报名"}),(0,he.jsx)("span",{onClick:function(){return I(!1)},style:{cursor:"pointer"},className:St.close,children:(0,he.jsx)("i",{className:"iconfont icon-danchuangguanbi",style:{fontSize:"14px"}})})]}),(0,he.jsx)("div",{className:St.content,children:"选择参赛方式"}),(0,he.jsxs)("div",{className:St.bottoms,children:[(0,he.jsx)(Z.ZP,{className:St.no,onClick:function(){s({type:"competitions/setActionTabs",payload:{key:"2"}}),I(!1)},children:"加入战队"}),(0,he.jsx)(Z.ZP,{className:St.yes,onClick:function(){s({type:"competitions/setActionTabs",payload:{key:"3"}}),I(!1)},children:"创建战队"})]})]})]})})),Mt=t(43971),Vt=t(78389),Bt=t(89831),zt=function(e){var n=e.data,t=e.isedit,i=e.selectedKeys,s=e.dispatch,a=(0,m.useState)([]),c=d()(a,2),u=c[0],p=c[1],_=(0,m.useState)(!1),f=d()(_,2),x=f[0],g=f[1],j=(0,h.useParams)().identifier,b=function(e,n,t){var i=Array.from(e),l=i.splice(n,1),s=d()(l,1)[0];return i.splice(t,0,s),i};(0,m.useEffect)((function(){n.length>0&&p(Pe()(n)||[])}),[n]);var w=function(){var e=r()(o()().mark((function e(n,i){var l,a;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.destination){e.next=2;break}return e.abrupt("return");case 2:if(!t){e.next=5;break}return v.ZP.info("请先保存或取消当前正在编辑的内容。"),e.abrupt("return");case 5:return l=b(i,n.source.index,n.destination.index),console.log("---",i,l),g(!0),e.next=10,(0,Ae.ZP)("/api/competitions/".concat(j,"/competition_modules/update_position.json"),{method:"post",body:{position_array:l}});case 10:a=e.sent,g(!1),0===a.status&&(s({type:"competitions/getHeader",payload:{identifier:j}}),s({type:"competitions/setActionTabs",payload:{key:"showheader"}}));case 13:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}();return(0,he.jsx)("div",{children:(0,he.jsx)(Bt.Z5,{onDragEnd:function(e){return w(e,u)},children:(0,he.jsx)(Bt.bK,{droppableId:"droppable",children:function(e,n){return(0,he.jsxs)("div",l()(l()({ref:e.innerRef},e.droppableProps),{},{children:[(0,he.jsx)(hn.Z,{spinning:x,children:u.map((function(e,n){return(0,he.jsx)(Bt._l,{draggableId:n.toString(),index:n,children:function(n,t){return(0,he.jsx)("aside",l()(l()(l()({ref:n.innerRef},n.draggableProps),n.dragHandleProps),{},{children:(0,he.jsx)(y.Z,{title:e.name,children:(0,he.jsx)("div",{onClick:e.onClick,className:i===e.id?Nt:e.className,children:e.name})})}))}},n)}))}),e.placeholder]}))}})})})},Ot=["competitions","globalSetting","loading","dispatch","user"],Yt=(0,h.connect)((function(e){var n=e.competitions,t=e.loading,i=e.globalSetting,l=e.user;return{competitions:n,globalSetting:i,loading:t.models.competitions,user:l}}))((function(e){var n,t,i,s,a,c,u,_,f,x,v=e.competitions,g=(e.globalSetting,e.loading,e.dispatch),y=e.user,j=(p()(e,Ot),(0,h.useParams)().identifier),b=v.Header,w=(v.RightItems,v.Staff),Z=v.Prizes,k=v.Account,N=(0,m.useState)([]),I=d()(N,2),A=I[0],S=I[1],C=(0,m.useState)("qit"),F=d()(C,2),P=F[0],T=F[1],L=(0,m.useState)(!1),D=d()(L,2),E=D[0],R=D[1],M=(0,m.useState)([]),V=d()(M,2),B=V[0],z=V[1],O=(0,m.useState)(!1),Y=d()(O,2),H=Y[0],q=Y[1],Q=(0,m.useRef)(null),G=(0,m.useState)(),U=d()(G,2),W=U[0],J=U[1],K=[{type:"entrance",content:3!==(null==b?void 0:b.mode)?(0,he.jsxs)("div",{style:{marginLeft:20},children:[(null==B||null===(n=B.data)||void 0===n?void 0:n.length)<=0&&((0,Tn.eB)()||(null==b||null===(t=b.permission)||void 0===t?void 0:t.editable))&&(0,he.jsx)(xn.Z,{ButtonText:"去设置",Buttonclass:At,ButtonClick:function(){g({type:"competitions/setActionTabs",payload:{key:"1"}})},customText:"您还没有设置赛题"}),re()()re()(null==b?void 0:b.start_time)||(0,Tn.eB)()||(null==b||null===(s=b.permission)||void 0===s?void 0:s.editable))&&(null==B||null===(a=B.data)||void 0===a?void 0:a.map((function(e,n){return(0,he.jsx)(Mt.Z,{dispatch:g,Header:b,StaffDetail:w,item:e,index:n})})))]}):(0,he.jsx)(Rt,{isedit:H,setisedit:q,selectedKeys:W,isshow:!0})},{type:"certificate",content:(0,he.jsxs)("div",{style:{padding:"15px 30px"},children:[" ",(0,he.jsx)(Vt.Z,{dispatch:g,userid:null==y||null===(c=y.userInfo)||void 0===c?void 0:c.user_id,Prize:Z,Accounts:k,getAccounts:function(){var e;g({type:"competitions/Accounts",payload:{id:null==y||null===(e=y.userInfo)||void 0===e?void 0:e.user_id}})}})]})},{type:"qit",content:(0,he.jsx)(Rt,{isedit:H,setisedit:q,selectedKeys:W})}];function X(){return $.apply(this,arguments)}function $(){return($=r()(o()().mark((function e(){var n;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ae.ZP)("/api/competitions/".concat(j,"/get_shixun_settings.json"),{method:"get"});case 2:0===(null==(n=e.sent)?void 0:n.status)&&z(n);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return(0,m.useEffect)((function(){var e;if((null==b||null===(e=b.competition_modules)||void 0===e?void 0:e.length)>0){var n,t,i,s;if("showheader"!==v.actionTabs.key)"entrance"===(null==b||null===(t=b.competition_modules)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.module_type)&&T("entrance"),J(null==b||null===(i=b.competition_modules)||void 0===i||null===(i=i[0])||void 0===i?void 0:i.id),g({type:"competitions/getItem",payload:{url:null==b||null===(s=b.competition_modules)||void 0===s||null===(s=s[0])||void 0===s?void 0:s.module_url}});var a=null==b||null===(n=b.competition_modules)||void 0===n?void 0:n.map((function(e){return l()(l()({},e),{},{label:null==e?void 0:e.name,key:null==e?void 0:e.id,className:kt,onClick:(n=r()(o()().mark((function n(){var t,i,l;return o()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(J(null==e?void 0:e.id),q(!1),R(!0),document.body.scrollIntoView({block:"start",behavior:"smooth"}),"entrance"!==e.module_type){n.next=16;break}if(3!==(null==b?void 0:b.mode)){n.next=10;break}return n.next=8,g({type:"competitions/getItem",payload:{url:e.module_url}});case 8:return R(!1),n.abrupt("return");case 10:(0,Tn.eB)()||null!==(t=b.permission)&&void 0!==t&&t.editable||null!=b&&b.team_member_present||null!=w&&w.enroll_ended||(b.personal?g({type:"competitions/setActionTabs",payload:{key:"6"}}):g({type:"competitions/setActionTabs",payload:{key:"4"}})),T("entrance"),X(),R(!1),n.next=28;break;case 16:if("certificate"!==e.module_type){n.next=24;break}return T("certificate"),n.next=20,g({type:"competitions/Prize",payload:{identifier:j,user_id:null==y||null===(i=y.userInfo)||void 0===i?void 0:i.user_id}});case 20:g({type:"competitions/Accounts",payload:{id:null==y||null===(l=y.userInfo)||void 0===l?void 0:l.user_id}}),R(!1),n.next=28;break;case 24:return T("qit"),n.next=27,g({type:"competitions/getItem",payload:{url:e.module_url}});case 27:R(!1);case 28:case"end":return n.stop()}}),n)}))),function(){return n.apply(this,arguments)})});var n})).filter((function(e){return"chart"!==(null==e?void 0:e.module_type)}));S(a),g({type:"competitions/setActionTabs",payload:{key:""}})}}),[b]),(0,m.useEffect)((function(){if("entrance"===v.actionTabs.key){var e;T("entrance");var n=null==b||null===(e=b.competition_modules)||void 0===e?void 0:e.find((function(e){return"entrance"===(null==e?void 0:e.module_type)}));J(n.id),3===(null==b?void 0:b.mode)?(R(!0),g({type:"competitions/getItem",payload:{url:n.module_url}}),R(!1)):X()}}),[v.actionTabs]),(0,he.jsxs)("section",{className:bt,ref:Q,children:[(0,he.jsxs)("div",{className:wt,children:[(0,he.jsx)("span",{children:"竞赛概览"}),["qit","entrance"].includes(P)&&((0,Tn.eB)()||(null==b||null===(u=b.permission)||void 0===u?void 0:u.editable))&&(0,he.jsxs)("a",{style:{float:"right",color:"#165DFF"},onClick:function(){"qit"===P||3===(null==b?void 0:b.mode)?q(!0):g({type:"competitions/setActionTabs",payload:{key:"1"}})},children:[(0,he.jsx)("i",{className:"iconfont icon-bianji10 font14",style:{color:"#165DFF"}})," 编辑"]})]}),(0,he.jsxs)("div",{style:{display:"flex"},children:[(0,he.jsxs)("div",{className:Zt,children:[(0,Tn.Ny)()||null!=b&&null!==(_=b.permission)&&void 0!==_&&_.editable?(0,he.jsx)("div",{children:(0,he.jsx)(zt,{dispatch:g,selectedKeys:W,data:A,isedit:H})}):(0,he.jsx)(jt.Z,{style:{border:"none"},selectedKeys:["".concat(W)],items:A}),((0,Tn.Ny)()||(null==b||null===(f=b.permission)||void 0===f?void 0:f.editable))&&(0,he.jsx)("span",{onClick:r()(o()().mark((function e(){var n,t,i;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ae.ZP)("/api/competitions/".concat(j,"/competition_modules.json"),{method:"POST"});case 2:if(0!==(n=e.sent).status){e.next=10;break}return J(null==n||null===(t=n.data)||void 0===t?void 0:t.id),g({type:"competitions/getHeader",payload:{identifier:j}}),T("qit"),e.next=9,g({type:"competitions/getItem",payload:{url:null==n||null===(i=n.data)||void 0===i?void 0:i.module_url}});case 9:g({type:"competitions/setActionTabs",payload:{key:"showheader"}});case 10:case"end":return e.stop()}}),e)}))),style:{marginLeft:20,marginTop:20,border:"1px solid #BACFFE",color:"#3061D0",fontSize:12,width:80,height:28,display:"inline-flex",alignItems:"center",justifyContent:"center",cursor:"pointer"},children:"+ 新增栏目"})]}),(0,he.jsx)("div",{className:It,children:(0,he.jsx)(hn.Z,{spinning:E,children:(0,he.jsx)("div",{style:{minHeight:200},children:null===(x=K.find((function(e){return e.type===P})))||void 0===x?void 0:x.content})})})]})]})})),Ht={flex_box_center:"flex_box_center___M4JlS",flex_space_between:"flex_space_between___ft0RM",flex_box_vertical_center:"flex_box_vertical_center___q2FOd",flex_box_center_end:"flex_box_center_end___sHMG4",flex_box_column:"flex_box_column____iI7H",bg:"bg___k6sPc",title:"title___g14V4",right:"right___m_DFD",left:"left___mwgoj",muitem:"muitem___oVuqT",muitemselect:"muitemselect___S4V8Y",searchWrap:"searchWrap___VZKxz",search:"search___NaLMi",searchIcon:"searchIcon___kyXjW",button:"button___9r1Cv",footer:"footer___FeXKb",clear_button:"clear_button___tLyhc",save_button:"save_button___jdXaq"},qt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAuNJREFUOE+dlE1oXFUUx3/nvo/pzKtp4li0hkYHNw22m4qLxoWWSkG6UMSvgmC6kCzdSN25d2lBaF3ppoIb0a6kXVRKVxIohgiGlkpSa2OTGKeTeZ/3HrlvJulUFNSzetx7zu/877n/+2Tz3MxTiH5n4BFVAgQTPNmej6Ynrzs4LiLjojinbk2M+ab8/sZLutabRHEKDlisWu6oAHQ/PTLjlEtmfFczPDSFGWuBs2jRB1uBzwoiJGqBMbi7XcqFFSQrf4nUzDTnri7XIB/9K69+JE/sPY06tLcOeQ/UgiuoSSYGCaA5hiQPQ2nh1vps8/mvPvf1NahYnn3Wya6rWuWRbt5Bqh5SrCM2BXTYStAwwcVtiHYj448jxvzaqPLD0vnsTg3KVuYW1LmDunELqfoYe+9+/bbkYVdFsNEYxAlmYhJVvmxOnXtT8punTmrYOO+6v0F2j8CWtU4nBvVHkeHp1SFqMX7EHhaEsLuNScZVquppyZffPa/OnXQbKxiCWokTu6Mj65Y4q7Qm4sGaQkCIw6G+z8R+jNgPJf15do0ia2tvAyNNnPq5DKK7mtO7m9NIAtqd5IFDGmngNEPGHkWC8FvJbr5TuawXkG4NB7s93EFdulnS/734C8jvGLyNJJlAonhJshtvFy7vR2S9kY73P/8ZNMiR1h4kjBYlXXrrttpiH+n/A5Hs8Sb9WtKlN86q6hxbf/x3RWKg9RBg35f0p1eOQXBR80ywFu/sfxcCcQxhaBU7VZsk/fHlS6p6jCIHE4H30o6j/wYbNsCVEMVg9Exr+sJ7Nai/cHw/Jp5Xp3ulKiFoDJTVwJHwJsSg6nNCROTaatI70ulcznYe7dYPJ54RcRdUdV/9g1Bval84Yge1qL9173aRa0TVieTAxdv17Y021MUXHkvL6GOE1z2nZgxexGhYET5Z3Sg/6By9nG1vPJgyXM3nX5x2gb7m4DmBjqqWglxHuKLOfJEcHqgYjT8BLuRat62RywwAAAAASUVORK5CYII=",Qt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAyZJREFUOE91VE1oVFcU/s69703eJBNSg2iysDXJEIkWIv6hFaUWXLSILoSIurAru9JFu+q2i+5a0bUL3biQQuuuoBQMGBcmGsdJZyjOmESNia0mgn0z895958h5SSaJ4oH7uPfcw3e/8333Pvr6ynSfY7kNkfUQWCKYw5v9u9/0mFki8xUgHRAkIOj6xsWx+snKgnwCCEPAIPwV9352lADg8OWp/UJys7eDsqcGfGxoNYAApJ+lSGe0mCn+m+BaKUbo6JG49gO3vut8kwJpXL4z88vebvO9gYBEYAAwJ+AkUURY6wFkIApGhFc1Ruk/+vLswe7b6Rn6KT2f+0IiGYaINSJI4joa9bdIXIyUWhoE3w/Qks2BrA8mAgz93RlgT1dX1/8kIlSanC1D0L8M4qKw2ZLWy0qHICL4Le0g64GNUfa/DvR2/0DFJy/OkOCKgpC24mqpFmT8xaFIyosTCLt0aM74WTAZVdsFkllPxcrMbwQc97SaY8WAQPUgOOdQqTyBcwn6+noQBC2pWSQOQhZMFski27P06PHz1wSs89OWGSy22daDBwXk+3pgPQ8TEyXs3r2j6aEhAYtBgxnGmAtU+OdZYpSpUZ8Uvmkk5uZeYuPGDYjjGIXCBHbu3L6i3VJ1w6mr5ncaL09H1pCfsStMmtUAwjBEsVjGtm1b0NbWtnornddip8dfo/Hy1DSENmUzqUprYn5+AdXqJAYHP4fnfbgvIggbMciYn+l+aeoSJ3wuF2SaDi2jDQ+PoL09pxogmw3Q359fc1DsEtSjGNaaI3S/NLmPHd/xPUtBxv+A1ccTgre1CMIyUy2Pfpoqe69Q/YOZj+VaW+B9RKv3AWuNCA1lQ/TtrsH81RRoZOJpp41qowL05FqDVA/dEH13yy42DRWE9Qj1RgRr7PU92/Mnmm9NJ2Njj/MR8Q1h3prxPQRBBr4CLt1sFkYUOdTqDbiElfn1cCF/+tAhcmuAdPHw4WxbGL/5iYXPi8BL36XR/4GoFlCXiOiFIfPjvl1brq5ud+X2rcqOjlY6YnJDCfMABJshqJHBpEd2ZKo6/ufQ0FDyvmbvANHBbUYnb2MgAAAAAElFTkSuQmCC",Gt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAA0JJREFUOE+NU11oXEUU/s7MvXfv7t1NdpdUBH+jRdzYWKlVrFpoq2KFog+FiBaqVCm+6IOC4Jv44Iuo4JsSaGIhShG0T0YSA2m1Fm36oo2FWqhJTZZtus1usj/33pk5MnetdrsKHpiHmfnOd875+A4tHNx0JwlnFsAAAAmC8Ia3/eBterQMwi6A+wHSAJUF89H16c+f48pingGDzpm5+cb80wQAv79y3yMCmBIbbkr7D+2GyBXAIBjpgEmAGCDWIKNgE9TF82if/BqIWj8Hxtle/GSulhDZuHTozfflHcOvQ0goN412pBC1WtC6kyxdD34mA48MpGqD12sw5Qs7Nhx4z06TYFA/8dnDWuljRkgZyQwaV6pQYZgU4KuVEjAhlc0ikwvgRg0QYT7fpx+kzfsbxMy0enziLBPdFXk5hPU6jFIgsmJ5gBAAM1hrmDhOaJ10GinfgxutAyQ+KGx//g1a+W7iBaH1mEploTTBRCHIcSFSXkJ2bbAx0O0QMAYynYarW5A6VpxxB+jy7OEvANobZ/Iw2iTJZLsAEIYhfjkzD2M0hkolBEGQvButOx2zhmzXQcI9SCuzh6tGuAXj57qq28vssePYfO8wHMfBjz+dwq6dO7oxzBDNqhX6Q6rMjGvj+gJ+tocoimIrKCqVCpaWl/HA1q09GFq3ROZLKs+MRXB9F//Skc1ardVw7txvyAYBSqW7e4h47bL12AQtTY8tQDq3iGyhBzR3+jTu37IleZ+a/hZPPP7YdaMZ6Nolq9e7tDx16CPN5lWZvwFEHZGvxpn5X1G9Uk3MVCwWcM/QUNe/CVvQjVWQcPbQxenxbazV98IPSGZ6BVexSmxrBe/2AiOqrwBaL52s5W5NjLIwOfqVYX7G7R9IVuH/RNyoQzXXAOm8OPjkgfGEaHFytKjYnGLQYKqvCOn5/8nFzLAkcXMNjnSO3Lb7pWct+G/rLk6Oboy0OcpshpxUBm4mC+H+427rahW2ETfr0CqGdOSRwdQf+2jn26qLyF7K33waNFT7HW30a2A4iculhO2Cje5ssKBlIZ23Nj718vi1bXcv018/56c+7ufYGdEqKhHR7WBukcAFAffEXLNvcmRkRF8/+59ZfmcgM6jazwAAAABJRU5ErkJggg==",Ut=["competitions","globalSetting","loading","dispatch","user"],Wt=(0,h.connect)((function(e){var n=e.competitions,t=e.loading,i=e.globalSetting,l=e.user;return{competitions:n,globalSetting:i,loading:t.models.competitions,user:l}}))((function(e){var n,t,i,s,a,c,u,_=e.competitions,f=(e.globalSetting,e.loading,e.dispatch,e.user,p()(e,Ut),(0,h.useParams)().identifier),x=_.Header,v=(_.RightItems,_.Staff,_.Prizes,_.Account,(0,m.useState)([])),g=d()(v,2),b=g[0],w=g[1],Z=(0,m.useState)("qit"),k=d()(Z,2),I=(k[0],k[1],(0,m.useState)(!1)),A=d()(I,2),S=A[0],C=A[1],F=(0,m.useState)(!1),P=d()(F,2),T=P[0],L=P[1],D=(0,m.useState)(!1),E=d()(D,2),R=E[0],M=E[1],V=(0,m.useState)({page:1,per_page:10,keyword:""}),B=d()(V,2),z=B[0],O=B[1],Y=(0,m.useState)(""),H=d()(Y,2),q=H[0],Q=H[1],G=(0,m.useState)(""),U=d()(G,2),W=U[0],J=U[1],K=(0,m.useState)(),X=d()(K,2),$=X[0],ee=X[1],ne=(0,m.useState)(),te=d()(ne,2),ae=te[0],ce=te[1],de=(0,m.useState)(""),pe=d()(de,2),_e=pe[0],fe=pe[1],xe=(0,m.useState)(!1),ve=d()(xe,2),ge=ve[0],ye=ve[1];function je(){return be.apply(this,arguments)}function be(){return(be=r()(o()().mark((function e(){var n,t,i,s,a;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return C(!0),e.next=3,(0,Ae.ZP)("/api/competitions/".concat(f,"/competition_questions.json"),{method:"get"});case 3:0===(null==(n=e.sent)?void 0:n.status)&&(Q(null==n||null===(t=n.data)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.identifier),we(null==n||null===(i=n.data)||void 0===i||null===(i=i[0])||void 0===i?void 0:i.identifier),a=null==n||null===(s=n.data)||void 0===s?void 0:s.map((function(e){return l()(l()({},e),{},{label:null==e?void 0:e.name,key:null==e?void 0:e.identifier,className:Ht.muitem,onClick:function(){Q(e.identifier),z.keyword="",O(l()({},z)),we(e.identifier)}})})),w(a),fe(null==n?void 0:n.md_id),L(null==n?void 0:n.hidden_ranking),ye(null==n?void 0:n.is_running_update_score));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function we(e){return Ze.apply(this,arguments)}function Ze(){return(Ze=r()(o()().mark((function e(n){var t,i,s,a;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return C(!0),t=null!=x&&x.personal?"/api/competitions/".concat(f,"/competition_charts/person_ranking.json"):"/api/competitions/".concat(f,"/competition_charts/team_ranking.json"),e.next=4,(0,Ae.ZP)(t,{method:"get",params:l()(l()({},z),{},{question_identifier:n||q})});case 4:if(i=e.sent,C(!1),0===(null==i?void 0:i.status)&&(ee(null==i?void 0:i.data),J(null==i||null===(s=i.data)||void 0===s?void 0:s.description)),3!==(null==x?void 0:x.mode)){e.next=13;break}return e.next=10,(0,Ae.ZP)("/api/competitions/".concat(f,"/competition_charts/work_mode.json"),{method:"get",params:l()({},z)});case 10:a=e.sent,C(!1),0===(null==a?void 0:a.status)&&ce(a);case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ke(){return(ke=r()(o()().mark((function e(n){var t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=null!=x&&x.personal?"/api/competitions/".concat(f,"/competition_charts/person_ranking.xlsx"):"/api/competitions/".concat(f,"/competition_charts/team_ranking.xlsx"),(0,me.FH)("",(0,me.NY)({url:ue.Z.API_SERVER+t,query:l()(l()({},z),{},{question_identifier:n||q})}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ne(){return(Ne=r()(o()().mark((function e(){var n;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n="/api/competitions/".concat(f,"/competition_charts/work_mode.xlsx"),(0,me.FH)("",(0,me.NY)({url:ue.Z.API_SERVER+n,query:{keyword:null==z?void 0:z.keyword}}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}(0,m.useEffect)((function(){je()}),[x]);var Ie=function(e){z.keyword=e,O(l()({},z)),we()},Se=[{title:"排名",align:"center",dataIndex:"rank",width:80,ellipsis:!0,render:function(e,n,t){return(0,he.jsxs)("span",{children:[1===e&&(0,he.jsx)("img",{src:qt}),2===e&&(0,he.jsx)("img",{src:Qt}),3===e&&(0,he.jsx)("img",{src:Gt}),e>3&&e]})}},{title:null!=x&&x.personal?"参赛人员":"战队",align:"left",dataIndex:"name",width:222,ellipsis:!0,render:function(e,n){return(0,he.jsx)(y.Z,{title:e,children:(0,he.jsxs)("span",{children:[(0,he.jsx)("img",{width:30,height:30,style:{borderRadius:"50%",marginRight:"10px"},src:ue.Z.IMG_SERVER+"/images/"+(null==n?void 0:n.image_url)}),e||"- -"]})})}},{title:"单位",align:"left",dataIndex:"school_name",width:533,ellipsis:!0,render:function(e){return(0,he.jsx)(y.Z,{title:e,children:(0,he.jsx)("span",{children:""==(null==e?void 0:e[0])?"- -":e})})}},{title:"完成时长",align:"left",dataIndex:"times",width:195,ellipsis:!0,render:function(e){return(0,he.jsx)("span",{children:e||"- -"})}},{title:"比赛成绩",align:"right",dataIndex:"all_score",width:100,ellipsis:!0,render:function(e){return(0,he.jsx)("span",{children:e||"- -"})}},{title:"",align:"center",dataIndex:"",ellipsis:!0,width:24}],Ce=[{title:"排名",align:"center",dataIndex:"ranking",width:80,ellipsis:!0,render:function(e,n,t){return(0,he.jsxs)("span",{children:[1===e&&(0,he.jsx)("img",{src:qt}),2===e&&(0,he.jsx)("img",{src:Qt}),3===e&&(0,he.jsx)("img",{src:Gt}),e>3&&e]})}},{title:null!=x&&x.personal?"参赛人员":"战队",align:"left",dataIndex:null!=x&&x.personal?"user_name":"team_name",width:222,ellipsis:!0,render:function(e,n){return(0,he.jsx)(y.Z,{title:e,children:(0,he.jsxs)("span",{children:[(0,he.jsx)("img",{width:30,height:30,style:{borderRadius:"50%",marginRight:"10px"},src:ue.Z.IMG_SERVER+"/images/"+(null==n?void 0:n.image_url)}),e||"- -"]})})}},{title:"单位",align:"left",dataIndex:"school_names",width:222,ellipsis:!0,render:function(e){return(0,he.jsx)(y.Z,{title:e,children:(0,he.jsx)("span",{children:""==(null==e?void 0:e[0])?"- -":e})})}},{title:"最高成绩提交时间",align:"left",dataIndex:"max_score_submit_time",width:195,ellipsis:!0,render:function(e){return e?re()(e).format("YYYY-MM-DD HH:mm:ss"):"--"}},{title:"描述",align:"left",dataIndex:"comment",width:222,ellipsis:!0,render:function(e){return(0,he.jsx)(y.Z,{title:e,children:(0,he.jsx)("span",{children:e||"- -"})})}},{title:"比赛成绩",align:"center",dataIndex:"score",width:100,ellipsis:!0,render:function(e){return(0,he.jsx)("span",{children:e||"- -"})}},{title:"提交总次数",align:"center",dataIndex:"submit_sum",ellipsis:!0,width:100}];return(0,he.jsxs)("section",{className:Ht.bg,children:[(0,he.jsxs)(le.Z,{align:"middle",className:Ht.title,children:[(0,he.jsxs)(se.Z,{flex:"1",children:[(0,he.jsx)("span",{style:{color:"#232B40"},children:"排行榜"}),((0,Tn.eB)()||(null==x||null===(n=x.permission)||void 0===n?void 0:n.editable))&&(0,he.jsx)(ie.Z,{checked:T,style:{marginLeft:10},onChange:function(e){var n;L(e.target.checked),(0,Ae.ZP)("/api/competitions/".concat(f,"/update_md_hidden_raking.json"),{method:"POST",body:{hidden_raking:e.target.checked,md_content_id:_e,competition_module_id:null==x||null===(n=x.competition_modules)||void 0===n||null===(n=n.find((function(e){return"chart"===e.module_type})))||void 0===n?void 0:n.id}})},children:(0,he.jsx)("span",{style:{color:"#828693",marginLeft:"-3px"},children:"隐藏"})})]}),(0,he.jsx)(se.Z,{children:((0,Tn.eB)()||(null==x||null===(t=x.permission)||void 0===t?void 0:t.editable))&&(0,he.jsxs)("a",{style:{float:"right",color:"#165DFF",marginTop:"-2px"},onClick:function(){M(!0)},children:[(0,he.jsx)("i",{className:"iconfont icon-bianji10 font14",style:{color:"#165DFF"}})," 编辑"]})})]}),(0,he.jsx)("div",{children:(0,he.jsxs)("div",{className:Ht.right,children:[!(null==$||null===(i=$.description)||void 0===i||!i.length)&&(0,he.jsx)(Lt.Z,{className:"pl20 pr20",style:{marginTop:20,marginBottom:20,fontSize:"14px",color:"#6A7283"},value:null==$?void 0:$.description}),(0,he.jsx)(hn.Z,{spinning:S,children:R?(0,he.jsxs)("div",{style:{padding:20},children:[(0,he.jsx)(Dt.Z,{defaultValue:W,onChange:function(e){return J(e)}}),(0,he.jsxs)("div",{className:Ht.footer,children:[(0,he.jsx)("div",{className:Ht.clear_button,onClick:function(){return M(!1)},children:"取消"}),(0,he.jsx)("div",{className:Ht.save_button,type:"primary",onClick:r()(o()().mark((function e(){var n,t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ae.ZP)("/api/competitions/".concat(f,"/update_md_content.json"),{method:"POST",body:{content:W,md_content_id:_e,competition_module_id:null==x||null===(n=x.competition_modules)||void 0===n||null===(n=n.find((function(e){return"chart"===e.module_type})))||void 0===n?void 0:n.id}});case 2:0===(null==(t=e.sent)?void 0:t.status)&&(M(!1),we());case 4:case"end":return e.stop()}}),e)}))),children:"保存更改"})]})]}):(0,he.jsxs)("div",{style:{padding:"0 20px 20px 20px"},children:[(0,he.jsxs)("div",{className:Ht.left,style:{display:"flex",alignItems:"center"},children:[(0,he.jsx)("div",{style:{width:"80%",overflowX:"auto",overflowY:"hidden",marginRight:10},children:(0,he.jsx)("ul",{style:{display:"flex",lineHeight:"38px",padding:0},children:null==b?void 0:b.map((function(e){return(0,he.jsx)("li",{className:(null==e?void 0:e.identifier)===q?Ht.muitemselect:e.className,onClick:e.onClick,children:e.name})}))})}),(0,he.jsxs)("div",{style:{display:"flex"},children:[(0,he.jsx)("div",{className:Ht.searchWrap,children:(0,he.jsx)(j.Z.Search,{placeholder:null!=x&&x.personal?"请输入参赛人员名称":"请输入战队名称",size:"large",className:Ht.search,value:z.keyword,onChange:function(e){z.keyword=e.target.value,O(l()({},z))},suffix:(0,he.jsx)("i",{className:"iconfont icon-sousuo9 font14 ".concat(Ht.searchIcon),onClick:function(){return Ie(z.keyword)}}),onSearch:Ie})}),(0,he.jsxs)("div",{style:{marginLeft:20,display:"flex"},children:[((0,Tn.eB)()||(null==x||null===(s=x.permission)||void 0===s?void 0:s.editable))&&(0,he.jsx)("span",{className:Ht.button,onClick:function(){3===(null==x?void 0:x.mode)?function(){Ne.apply(this,arguments)}():function(e){ke.apply(this,arguments)}(q)},children:"导出名单"}),((0,Tn.eB)()||(null==x||null===(a=x.permission)||void 0===a?void 0:a.editable))&&(0,he.jsx)("span",{className:Ht.button,style:{marginLeft:10},onClick:r()(o()().mark((function e(){var n;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!ge){e.next=2;break}return e.abrupt("return");case 2:if(C(!0),!S){e.next=5;break}return e.abrupt("return");case 5:return e.next=7,(0,Ae.ZP)("/api/competitions/".concat(f,"/update_course_score.json"),{method:"post"});case 7:0===e.sent.status&&(C(!1),ye(!0),n=setInterval(r()(o()().mark((function e(){var t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ae.ZP)("/api/competitions/".concat(f,"/get_update_score_status.json"),{method:"get"});case 2:0===(null==(t=e.sent)?void 0:t.status)&&(ye(null==t?void 0:t.is_running_update_score),null!=t&&t.is_running_update_score||(je(),clearInterval(n)));case 4:case"end":return e.stop()}}),e)}))),5e3));case 9:case"end":return e.stop()}}),e)}))),children:ge?"成绩更新中":"更新成绩"})]})]})]}),!(null!=x&&null!==(c=x.permission)&&void 0!==c&&c.editable)&&T&&(0,he.jsx)(xn.Z,{customText:"排行榜当前为封榜状态"}),((0,Tn.eB)()||(null==x||null===(u=x.permission)||void 0===u?void 0:u.editable)||!T)&&(0,he.jsx)(N.Gi,{style:{marginTop:20,marginLeft:0},children:3===(null==x?void 0:x.mode)?(0,he.jsx)(oe.Z,{columns:Ce,dataSource:null==ae?void 0:ae.list,pagination:!1}):(0,he.jsx)(oe.Z,{columns:Se,dataSource:null==$?void 0:$.ranking,pagination:!1})}),(0,he.jsx)("div",{className:Ht.countWrap,style:{marginTop:20},children:(0,he.jsx)(fn.Z,{showQuickJumper:!0,hideOnSinglePage:!0,showSizeChanger:!0,pageSizeOptions:["10","15","50","100","200"],total:3===(null==x?void 0:x.mode)?null==ae?void 0:ae.count:null==$?void 0:$.count,onChange:function(e,n){z.page=e,z.per_page=n,O(l()({},z)),we()},pageSize:z.per_page,current:z.page})})]})})]})})]})})),Jt={flex_box_center:"flex_box_center___Ix1yk",flex_space_between:"flex_space_between___Nvu1L",flex_box_vertical_center:"flex_box_vertical_center___FcD_R",flex_box_center_end:"flex_box_center_end___xtV5Z",flex_box_column:"flex_box_column___rSUdX",bg:"bg___Fi0Vv",title:"title___oBAHH",left:"left___x4G2N",muitem:"muitem___JmDfB",right:"right___RXHwC",searchWrap:"searchWrap___yt5Di",search:"search___sA8FE",searchIcon:"searchIcon___yiKfD",button:"button___ZPcVk",items:"items___wZfml",img:"img___f3zFn",names:"names___k3ZzZ",teamname:"teamname___or8vu",time:"time___qmAOy",createtime:"createtime___KKvxc",width30:"width30___NxY4W",loaderimg:"loaderimg___aQ_vt",scoreByBlankRadio:"scoreByBlankRadio___X8rMJ",scoremodal:"scoremodal___jE4qx",content:"content___wGyD2",bottom:"bottom___mdNOm",yes:"yes___hQBiA",no:"no___AOje6",bottoms:"bottoms___ogmBQ",drawer_style:"drawer_style___aspKt",baseFormItem:"baseFormItem___L4XPW",jsinput:"jsinput___IhGOr",Spanradius:"Spanradius___Phpyg",modal_close:"modal_close___yAd65","ant-btn-default":"ant-btn-default___HT0Nv",ssss:"ssss___RB5TB",text:"text___nAWn1"};Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;var Kt="data:image/svg+xml;base64,PHN2ZyBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMTYiIGhlaWdodD0iMTYiPjxwYXRoIGQ9Ik00OTkuNTY2IDEwMjAuNjM1Yy0xNDguODQ2IDAtNDI1LjYxOS0yMjcuNjkzLTQyNS42MTktNDQzLjAyNlYxNDguNjI2bDQyLjM1LS43MzFjLjg3OCAwIDk1LjM3OC0xLjk3NSAxOTIuODA1LTQxLjU0NUM0MDkuMDg4IDY1LjgyOSA0NzMuNiAxOS4wOSA0NzQuMTg1IDE4LjY1TDQ5OS41NjUuMjkzIDUyNS4wMiAxOC42NWMuNTg2LjQ0IDY1LjA5OCA0Ny4xMDQgMTY1LjA4NCA4Ny43NzJhNjA0LjQ1MyA2MDQuNDUzIDAgMCAwIDE5Mi45NSA0MS41NDVsNDIuMDU4LjczMS4yMiA0MjguODM3YzAgMjE1LjMzMy0yNzYuNyA0NDMuMS00MjUuNjkyIDQ0My4xTTE1OS44OSAyMzAuODM4djM0Ni42OTdjMCAxNjYuNTQ2IDI0MS4wOCAzNTcuMDgzIDMzOS42NzYgMzU3LjA4MyA5OC41OTYgMCAzMzkuNjc1LTE5MC41MzcgMzM5LjY3NS0zNTcuMDgzVjIzMC44MzlhNjkxLjYzOSA2OTEuNjM5IDAgMCAxLTE4MS40NjctNDQuODM3IDEwMDEuNjkxIDEwMDEuNjkxIDAgMCAxLTE1OC4yMDgtODAuOTY5Yy0yOS45ODkgMTkuMTY0LTg1LjI4NSA1MS4zNDYtMTU3Ljk4OSA4MC45N2E2OTEuNzEyIDY5MS43MTIgMCAwIDEtMTgxLjY4NyA0NC44MzZtMzE3LjAwMSA1MDcuOTA0TDI5Ni4yMyA1ODQuNzc3bDU1LjU4OC02NS4zMTYgMTE1LjcxMiA5OC41OTYgMjIwLjA4Ny0yNTMuNTEzIDY0Ljk1IDU2LjM5My0yNzUuNjc1IDMxNy44MDYiIGZpbGw9IiMxNjVERkYiIGZpbGwtb3BhY2l0eT0iLjgiLz48L3N2Zz4=",Xt=["competitions","globalSetting","loading","dispatch","user"],$t=[{id:"",name:"全部"},{id:1,name:"战队名称"},{id:2,name:"队长姓名"},{id:3,name:"指导老师"}],ei={teacher:"教师",student:"学生",professional:"专业人士"},ni=(0,h.connect)((function(e){var n=e.competitions,t=e.loading,i=e.globalSetting,l=e.user;return{competitions:n,globalSetting:i,loading:t.models.competitions,user:l}}))((function(e){var n=e.competitions,t=(e.globalSetting,e.loading,e.dispatch,e.user,p()(e,Xt),(0,h.useParams)().identifier),i=n.Header,s=(n.RightItems,n.Staff,n.Prizes,n.Account,(0,m.useState)([])),a=d()(s,2),c=a[0],u=a[1],_=(0,m.useState)({page:1,per_page:10,keyword:"",type:"",isteam:"mine"}),f=d()(_,2),v=f[0],g=f[1],j=(0,m.useState)(!1),w=d()(j,2),Z=w[0],k=w[1];function I(){return A.apply(this,arguments)}function A(){return(A=r()(o()().mark((function e(){var n,i;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return k(!0),n="mine"===v.isteam?"/api/competitions/".concat(t,"/competition_teams.json"):"/api/competitions/".concat(t,"/all_team_members.json"),e.next=4,(0,Ae.ZP)(n,{method:"get",params:v});case 4:i=e.sent,k(!1),0===(null==i?void 0:i.status)&&u(i);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}(0,m.useEffect)((function(){I()}),[i]);var S=[{title:"序号",align:"left",dataIndex:"name",width:62,render:function(e,n,t){return(0,he.jsx)("span",{style:{color:"#000000"},children:t+1})}},{title:"战队ID",align:"left",dataIndex:"competition_team_id",width:72,render:function(e){return(0,he.jsx)("span",{style:{color:"#000000"},children:e||"- -"})}},{title:"战队名称",align:"left",dataIndex:"team_name",width:175,ellipsis:{showTitle:!1},render:function(e){return(0,he.jsx)(y.Z,{placement:"topLeft",title:e,children:(0,he.jsx)("span",{style:{color:"#000"},children:e||"- -"})})}},{title:"队员姓名",align:"left",dataIndex:"name",width:110,ellipsis:{showTitle:!1},render:function(e,n){return(0,he.jsxs)("span",{style:{color:"#000000"},children:[e||"- -",(null==n?void 0:n.authentication)&&(0,he.jsx)(y.Z,{title:"已实名认证",children:(0,he.jsx)("img",{src:Kt,style:{marginLeft:5,marginTop:"-2px"}})})]})}},{title:"个人成绩",dataIndex:"score",width:86,render:function(e){return(0,he.jsx)("span",{style:{color:"#000000"},children:(null==e?void 0:e.toString())||"- -"})}},{title:"角色",align:"left",dataIndex:"identity",width:102,render:function(e,n){return(0,he.jsxs)("span",{style:{color:"#000000"},children:[ei[e],(null==n?void 0:n.professional_certification)&&(0,he.jsx)(y.Z,{title:"已职业认证",children:(0,he.jsx)("img",{src:Kt,style:{marginLeft:5,marginTop:"-2px"}})})]})}},{title:"手机号",align:"left",dataIndex:"phone",width:120,render:function(e){return(0,he.jsx)("span",{style:{color:"#666666"},children:e||"- -"})}},{title:"学号/工号",align:"left",width:110,ellipsis:{showTitle:!1},dataIndex:"student_id",render:function(e){return(0,he.jsx)("span",{style:{color:"#666666"},children:e||"- -"})}},{title:"学校/单位",align:"left",dataIndex:"school",ellipsis:{showTitle:!1},render:function(e){return(0,he.jsx)(y.Z,{placement:"topLeft",title:e,children:(0,he.jsx)("span",{style:{color:"#666666"},children:e||"- -"})})}},{title:"地区",align:"left",dataIndex:"province",width:58,render:function(e){return(0,he.jsx)("span",{style:{color:"#666666"},children:e||"- -"})}},{title:"操作",align:"right",dataIndex:"is_cancel_score",width:120,render:function(e,n){return(0,he.jsx)("span",{children:0===e?(0,he.jsx)("span",{style:{color:"#165DFF",cursor:"pointer"},onClick:function(){var e;x.Z.confirm({icon:null,title:"取消成绩",content:"请确认是否取消该成员成绩,取消后该成员的成绩将不能用于团队成绩。",onOk:(e=r()(o()().mark((function e(){var i;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ae.ZP)("/api/competitions/".concat(t,"/set_score_status.json"),{method:"put",body:{competition_score_id:null==n?void 0:n.competition_score_id,is_cancel_score:1}});case 2:0===(null==(i=e.sent)?void 0:i.status)&&(v.page=1,g(l()({},v)),I());case 4:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})},children:"取消成绩"}):(0,he.jsx)("span",{onClick:r()(o()().mark((function e(){var i;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ae.ZP)("/api/competitions/".concat(t,"/set_score_status.json"),{method:"put",body:{competition_score_id:null==n?void 0:n.competition_score_id,is_cancel_score:0}});case 2:0===(null==(i=e.sent)?void 0:i.status)&&(v.page=1,g(l()({},v)),I());case 4:case"end":return e.stop()}}),e)}))),style:{color:"#FD9200",cursor:"pointer"},children:"恢复成绩"})})}}],C=[{title:"序号",align:"left",dataIndex:"name",width:72,render:function(e,n,t){return(0,he.jsx)("span",{style:{color:"#000000"},children:t+1})}},{title:"战队ID",align:"left",dataIndex:"id",width:113,render:function(e){return(0,he.jsx)("span",{style:{color:"#000000"},children:e||"- -"})}},{title:"战队名称",align:"left",dataIndex:"name",width:167,render:function(e){return(0,he.jsx)("span",{style:{color:"#000000"},children:null==e?void 0:e.toString()})}},{title:"战队成绩",align:"left",dataIndex:"score",width:136,render:function(e){return(0,he.jsx)("span",{style:{color:"#000000"},children:e})}},{title:"队长姓名",align:"left",dataIndex:"leader_name",width:149,ellipsis:{showTitle:!1},render:function(e,n){return(0,he.jsx)(y.Z,{placement:"topLeft",title:e,children:(0,he.jsx)("span",{style:{color:"#666666"},children:e||"- -"})})}},{title:"指导老师",align:"left",dataIndex:"mail",width:150,ellipsis:{showTitle:!1},render:function(e,n){var t,i;return(0,he.jsx)(y.Z,{placement:"topLeft",title:null==n||null===(t=n.creator)||void 0===t?void 0:t.name,children:(0,he.jsx)("span",{style:{color:"#666666"},children:(null==n||null===(i=n.team_members)||void 0===i||null===(i=i.filter((function(e){return null==e?void 0:e.is_teacher})))||void 0===i?void 0:i.map((function(e){return e.name})).toString())||"- -"})})}},{title:"战队人数",align:"left",dataIndex:"mail",width:125,render:function(e,n){var t;return(0,he.jsx)("span",{style:{color:"#666666"},children:(null==n||null===(t=n.team_members)||void 0===t?void 0:t.length)||"- -"})}},{title:"报名时间",align:"left",dataIndex:"created_at",width:165,render:function(e){return(0,he.jsx)("span",{style:{color:"#666666"},children:e||"- -"})}},{title:"操作",align:"right",dataIndex:"is_cancel_score",render:function(e,n){return(0,he.jsx)("span",{children:0===e||!1===e?(0,he.jsx)("span",{style:{color:"#165DFF",cursor:"pointer"},onClick:function(){var e;x.Z.confirm({icon:null,centered:!0,title:"取消成绩",content:"请确认是否取消该战队成绩,取消后该战队的成绩在排行榜将视为无成绩,不进行排名。",onOk:(e=r()(o()().mark((function e(){var i;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ae.ZP)("/api/competitions/".concat(t,"/set_score_status.json"),{method:"put",body:{competition_team_id:null==n?void 0:n.id,is_cancel_score:1}});case 2:0===(null==(i=e.sent)?void 0:i.status)&&(v.page=1,g(l()({},v)),I());case 4:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})},children:"取消成绩"}):(0,he.jsx)("span",{onClick:r()(o()().mark((function e(){var i;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ae.ZP)("/api/competitions/".concat(t,"/set_score_status.json"),{method:"put",body:{competition_team_id:null==n?void 0:n.id,is_cancel_score:0}});case 2:0===(null==(i=e.sent)?void 0:i.status)&&(v.page=1,g(l()({},v)),I());case 4:case"end":return e.stop()}}),e)}))),style:{color:"#FD9200",cursor:"pointer"},children:"恢复成绩"})})}}];return(0,he.jsxs)("div",{style:{padding:"15px 0",width:"1200px",margin:"auto"},children:[(0,he.jsxs)("div",{style:{display:"flex",marginTop:"-10px"},children:[(0,he.jsx)("div",{children:3!==(null==i?void 0:i.mode)?(0,he.jsx)(b.ZP.Group,{className:Jt.scoreByBlankRadio,optionType:"button",options:[{label:"战队信息",value:"mine"},{label:"队员信息",value:"join"}],onChange:function(e){v.isteam=e.target.value,v.page=1,I()},value:v.isteam}):(0,he.jsx)(b.ZP.Group,{className:Jt.scoreByBlankRadio,optionType:"button",options:[{label:"战队信息",value:"mine"}],onChange:function(e){v.isteam=e.target.value,v.page=1,I()},value:v.isteam})}),(0,he.jsxs)("div",{style:{flex:1,textAlign:"end",display:"flex",justifyContent:"end"},children:[(0,he.jsx)(N.t7,{style:{width:327,marginRight:20},dataSource:$t,value:{id:v.type,value:v.keyword},onChange:function(e,n){v.keyword=e,v.type=n||"",g(l()({},v)),I()},placeholder:"请输入搜索内容"}),(0,he.jsx)("span",{className:Jt.button,onClick:function(){var e="mine"===v.isteam?"/api/competitions/".concat(t,"/competition_teams.xlsx"):"/api/competitions/".concat(t,"/all_team_members.xlsx");(0,me.FH)("",(0,me.NY)({url:ue.Z.API_SERVER+e,query:l()({},v)}))},children:"导出"})]})]}),(0,he.jsx)(oe.Z,{loading:Z,columns:"mine"===v.isteam?C:S,dataSource:"mine"===v.isteam?null==c?void 0:c.competition_teams:null==c?void 0:c.data,pagination:!1}),(0,he.jsx)("div",{className:Jt.countWrap,style:{marginTop:20},children:(0,he.jsx)(fn.Z,{showQuickJumper:!0,hideOnSinglePage:!0,showTotal:function(e){return(0,he.jsxs)("div",{style:{fontSize:14},children:["共 ",(0,he.jsx)("span",{style:{color:"#165DFF"},children:e})," 条数据"]})},showSizeChanger:!0,pageSizeOptions:["10","15","50","100","200"],total:null==c?void 0:c.count,onChange:function(e,n){v.page=e,v.per_page=n,g(l()({},v)),I()},pageSize:v.per_page,current:v.page})})]})})),ti=t(60324),ii=t(88289),li=t(56102),si=t(33555),oi=(t(36814),t(89392)),ai=["competitions","globalSetting","loading","dispatch","user"],ri=_.default.Option,ci=(0,h.connect)((function(e){var n=e.competitions,t=e.loading,i=e.globalSetting,l=e.user;return{competitions:n,globalSetting:i,loading:t.models.competitions,user:l}}))((function(e){var n,t,i,s,a,c,u,g,k,I,A,S,C,F,P,T,L,D,E,R,M,V,B,z,O,Y=e.competitions,H=(e.globalSetting,e.loading,e.dispatch),q=e.user,Q=(p()(e,ai),(0,h.useParams)().identifier),G=Y.Header,U=Y.competition_team,W=Y.Staff,J=(Y.Prizes,Y.Account,(0,m.useState)({page:1,per_page:10,keyword:"",type:1,isteam:"mine"})),K=d()(J,2),X=K[0],$=K[1],ee=(0,m.useState)([]),ne=d()(ee,2),te=ne[0],ie=ne[1],ae=(0,m.useState)([]),re=d()(ae,2),ce=re[0],de=re[1],pe=(0,m.useState)(!1),me=d()(pe,2),_e=me[0],fe=me[1],xe=(0,m.useState)([]),ve=d()(xe,2),ge=ve[0],ye=ve[1],je=(0,m.useState)(!1),be=d()(je,2),we=be[0],Ze=be[1],ke=(0,m.useState)(""),Ne=d()(ke,2),Ie=Ne[0],Ae=Ne[1],Se=(0,m.useState)(""),Ce=d()(Se,2),Fe=Ce[0],Te=Ce[1],Le=(0,m.useState)([]),De=d()(Le,2),Ee=De[0],Re=De[1],Me=(0,m.useState)(!1),Ve=d()(Me,2),Be=Ve[0],ze=Ve[1],Oe=(0,m.useState)([]),Ye=d()(Oe,2),He=Ye[0],qe=Ye[1],Qe=(0,m.useRef)(),Ge=(0,m.useState)(""),Ue=d()(Ge,2),We=(Ue[0],Ue[1]),Je=(0,m.useRef)(""),Ke=(0,m.useState)(!0),Xe=d()(Ke,2),$e=Xe[0],en=Xe[1],nn=(0,m.useState)(!1),tn=d()(nn,2),ln=tn[0],sn=tn[1],on=f.Z.useForm(),an=d()(on,1)[0],rn=(0,m.useState)(),cn=d()(rn,2),dn=cn[0],un=cn[1],pn=(0,m.useRef)(null),mn=(0,m.useState)(),hn=d()(mn,2),_n=hn[0],vn=hn[1],gn=(0,m.useState)(1),yn=d()(gn,2),jn=yn[0],bn=yn[1],wn=(0,m.useState)(!1),Zn=d()(wn,2),kn=Zn[0],Nn=Zn[1],In=(0,m.useState)([]),An=d()(In,2),Sn=An[0],Cn=An[1],Fn=(0,m.useRef)((0,oi.throttle)((function(e){return Rn(e)}),1200,{leading:!0,trailing:!0})).current,Pn=(0,m.useState)([]),Ln=d()(Pn,2),Dn=Ln[0],En=Ln[1],Rn=function(){var e=r()(o()().mark((function e(n){var t,i;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,H({type:"account/getSchoolOption",payload:{keyword:n,limit:10}});case 2:t=e.sent,Cn(null==t?void 0:t.schools),n&&""!=n&&En(null==t||null===(i=t.schools)||void 0===i?void 0:i.filter((function(e){return e.name.includes(n)})));case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();(0,m.useEffect)((function(){var e;Rn(null==q||null===(e=q.userInfo)||void 0===e?void 0:e.school_name)}),[(null==G||null===(n=G.need_apply_info)||void 0===n?void 0:n.need_apply_name)||(null==G||null===(t=G.need_apply_info)||void 0===t?void 0:t.need_apply_student_id)||(null==G||null===(i=G.need_apply_info)||void 0===i?void 0:i.need_apply_sex)||(null==G||null===(s=G.need_apply_info)||void 0===s?void 0:s.need_apply_phone)||(null==G||null===(a=G.need_apply_info)||void 0===a?void 0:a.need_apply_grade)||(null==G||null===(c=G.need_apply_info)||void 0===c?void 0:c.need_apply_teacher_name)||(null==G||null===(u=G.need_apply_info)||void 0===u?void 0:u.need_apply_school)]);function Mn(){return Vn.apply(this,arguments)}function Vn(){return(Vn=r()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:H({type:"competitions/competition_teams",payload:l()(l()({},X),{},{identifier:Q})});case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Bn(e){return zn.apply(this,arguments)}function zn(){return zn=r()(o()().mark((function e(n){var t,i;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,H({type:"competitions/getStudents",payload:{identifier:Q,keyword:Fe,team_id:He,page:n}});case 2:return(i=e.sent)&&Re(1===n?Pe()(i.teachers):[].concat(Pe()(Ee),Pe()(i.teachers))),e.abrupt("return",!((null===(t=i.teachers)||void 0===t?void 0:t.length)<20));case 5:case"end":return e.stop()}}),e)}))),zn.apply(this,arguments)}(0,m.useEffect)((function(){ln||(un(""),We(""),Je.current="")}),[ln]),(0,m.useEffect)((function(){Mn()}),[G]);var On,Yn=function(){var e=r()(o()().mark((function e(){var n,t,i,l=arguments;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=l.length>0&&void 0!==l[0]&&l[0])&&!$e||kn){e.next=10;break}return Nn(!0),bn(n?1:jn+1),e.next=6,H({type:"competitions/getTeacher",payload:{identifier:Q,keyword:Ie,team_id:He,page:n?1:jn+1}});case 6:i=e.sent,ye(n?Pe()(i.teachers):[].concat(Pe()(ge),Pe()(i.teachers))),Nn(!1),(null===(t=i.teachers)||void 0===t?void 0:t.length)<20&&en(!1);case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Hn=function(){var e=r()(o()().mark((function e(){var n,t,i,l=arguments;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=l.length>0&&void 0!==l[0]&&l[0])&&!$e||kn){e.next=10;break}return Nn(!0),bn(n?1:jn+1),e.next=6,H({type:"competitions/getStudents",payload:{identifier:Q,keyword:Fe,team_id:He,page:n?1:jn+1}});case 6:i=e.sent,Re(n?Pe()(i.teachers):[].concat(Pe()(Ee),Pe()(i.teachers))),Nn(!1),(null===(t=i.teachers)||void 0===t?void 0:t.length)<20&&en(!1);case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();function qn(e){return Qn.apply(this,arguments)}function Qn(){return Qn=r()(o()().mark((function e(n){var t,i;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,H({type:"competitions/getTeacher",payload:{identifier:Q,keyword:Ie,team_id:He,page:n}});case 2:return(i=e.sent)&&ye(1===n?Pe()(i.teachers):[].concat(Pe()(ge),Pe()(i.teachers))),e.abrupt("return",!((null===(t=i.teachers)||void 0===t?void 0:t.length)<20));case 5:case"end":return e.stop()}}),e)}))),Qn.apply(this,arguments)}return(0,he.jsxs)("div",{style:{padding:"20px",width:"100%"},children:[(0,he.jsxs)("div",{style:{display:"flex",marginBottom:20},children:[(0,he.jsxs)("div",{style:{display:"flex",alignItems:"baseline",zIndex:0},children:[((0,Tn.eB)()||(null==G||null===(g=G.permission)||void 0===g?void 0:g.editable))&&(0,he.jsx)(b.ZP.Group,{className:Jt.scoreByBlankRadio,optionType:"button",options:[{label:"我的战队",value:"mine"},{label:"全部战队",value:"join"}],onChange:function(e){X.isteam=e.target.value,X.keyword="",X.type="",X.page=1,Mn()},value:X.isteam}),"mine"===X.isteam&&!((0,Tn.eB)()||null!=G&&null!==(k=G.permission)&&void 0!==k&&k.editable)&&(0,he.jsxs)("span",{style:{fontSize:14},children:["我的战队(",null==U?void 0:U.my_teams_count,")"]}),"join"===X.isteam&&(0,he.jsxs)("div",{style:{marginLeft:30,color:"#5F6368"},children:[(0,he.jsx)("span",{children:"战队总数"}),(0,he.jsx)("span",{style:{color:"#165DFF"},children:null==U?void 0:U.count}),(0,he.jsx)("span",{style:{marginRight:20},children:"个"}),(0,he.jsx)("span",{children:"参赛总人数"}),(0,he.jsx)("span",{style:{color:"#165DFF"},children:null==U?void 0:U.members_count}),(0,he.jsx)("span",{children:"个"})]})]}),(0,he.jsxs)("div",{style:{flex:1,textAlign:"end",display:"flex",justifyContent:"end"},children:["join"===X.isteam&&(0,he.jsx)(N.t7,{style:{width:379},dataSource:[],value:{id:X.type,value:X.keyword},onChange:function(e,n){X.keyword=e,X.page=1,X.type=1,$(l()({},X)),Mn()},placeholder:"请输入战队名称进行搜索"}),"mine"===X.isteam&&(null==U||null===(I=U.my_teams)||void 0===I?void 0:I.filter((function(e){return!e.active})).length)>0&&(0,he.jsxs)("span",{style:{fontSize:14,color:"#FA6400"},children:[(0,he.jsx)(ii.Z,{style:{marginRight:6,fontSize:14}})," 您有",null==U||null===(A=U.my_teams)||void 0===A?void 0:A.filter((function(e){return!e.active})).length,"个战队未满足参赛要求!为了不影响成绩,请设置战队成员"]})]})]}),"mine"===(null==X?void 0:X.isteam)&&(0,he.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"20px"},children:null==U||null===(S=U.my_teams)||void 0===S?void 0:S.map((function(e,n){var t,i,l,s;return(0,he.jsx)("div",{className:"p20",style:{border:"1px solid #F6F7F9"},children:(0,he.jsxs)(le.Z,{wrap:!1,align:"middle",gutter:30,children:[(0,he.jsx)(se.Z,{flex:"396px",children:(0,he.jsxs)(le.Z,{wrap:!1,align:"middle",gutter:10,children:[(0,he.jsx)(se.Z,{children:null!=e&&e.team_log?(0,he.jsx)("img",{width:66,height:66,style:{borderRadius:"50%"},src:ue.Z.IMG_SERVER+"/"+(null==e?void 0:e.team_log)}):(0,he.jsx)("div",{style:{background:"#4EACFF",color:"#fff",display:"flex",alignItems:"center",justifyContent:"center",width:66,height:66,borderRadius:"50%"},children:e.name.length>2?e.name.substring(0,2):e.name})}),(0,he.jsxs)(se.Z,{children:[(0,he.jsxs)(le.Z,{wrap:!1,align:"middle",gutter:10,children:[(0,he.jsx)(se.Z,{children:(0,he.jsx)(y.Z,{title:null==e?void 0:e.name,children:(0,he.jsx)("span",{className:"multi_ellipsis1",style:{color:"#232B40"},children:null==e?void 0:e.name})})}),(0,he.jsx)(se.Z,{children:(0,he.jsx)("i",{onClick:function(){"ended"!=(null==G?void 0:G.competition_status)?(sn(!0),vn(e)):v.ZP.warning("竞赛已结束,无法编辑相关信息")},style:{color:"#165DFF",cursor:"pointer"},className:"iconfont icon-bianji10 font14"})})]}),(0,he.jsxs)("div",{className:"mt10 font12",style:{color:"#5F6367"},children:["创建时间",(0,he.jsx)("span",{className:"ml10",style:{color:"#232B40"},children:null==e?void 0:e.created_at})]})]})]})}),(0,he.jsx)(se.Z,{children:(0,he.jsx)("div",{style:{height:66,width:1,background:"#F6F7F9"}})}),(0,he.jsx)(se.Z,{flex:"396px",children:(0,he.jsxs)(le.Z,{wrap:!1,align:"middle",gutter:30,children:[(0,he.jsx)(se.Z,{flex:"110px",children:(0,he.jsxs)("span",{className:"multi_ellipsis1",children:["姓名",(0,he.jsx)(y.Z,{title:null==e||null===(t=e.creator)||void 0===t?void 0:t.name,children:(0,he.jsx)("span",{className:"ml10",style:{color:"#232B40"},children:null==e||null===(i=e.creator)||void 0===i?void 0:i.name})})]})}),(0,he.jsx)(se.Z,{flex:"136px",children:(0,he.jsxs)("span",{className:"multi_ellipsis1",children:["学校",(0,he.jsx)(y.Z,{title:null==e?void 0:e.school_name,children:(0,he.jsx)("span",{className:"ml10",style:{color:"#232B40"},children:(null==e?void 0:e.school_name)||"--"})})]})}),(0,he.jsx)(se.Z,{flex:1,children:(0,he.jsxs)("span",{className:"multi_ellipsis1",children:["指导教师",(0,he.jsx)(y.Z,{title:null==e?void 0:e.teacher_name,children:(0,he.jsx)("span",{className:"ml10",style:{color:"#232B40"},children:(null==e?void 0:e.teacher_name)||"--"})})]})})]})}),(0,he.jsx)(se.Z,{children:(0,he.jsx)("div",{style:{height:66,width:1,background:"#F6F7F9"}})}),(0,he.jsxs)(se.Z,{flex:1,children:[(0,he.jsxs)(le.Z,{wrap:!1,align:"middle",justify:"end",gutter:20,children:[(0,he.jsx)(se.Z,{children:(0,he.jsxs)("span",{style:{color:"#5F6368"},children:["战队成员",(0,he.jsxs)("span",{className:"ml10",style:{color:"#232B40"},children:[null==e||null===(l=e.team_members)||void 0===l?void 0:l.length,"人"]})]})}),(null==e?void 0:e.manage_permission)&&(0,he.jsx)(se.Z,{children:(0,he.jsx)("span",{style:{color:"#3061D0",cursor:"pointer"},onClick:function(){de(null==e?void 0:e.team_members),qe(null==e?void 0:e.id)},children:"设置"})}),!(null!=e&&e.active)&&(0,he.jsx)(se.Z,{children:(0,he.jsx)(ii.Z,{style:{color:"#FA6400"}})}),(0,he.jsx)(se.Z,{children:(0,he.jsx)("span",{className:"c-red",style:{cursor:"pointer"},onClick:function(){var n;x.Z.confirm({title:null!=e&&e.manage_permission?"解散战队":"退出战队",content:"是否确认".concat(null!=e&&e.manage_permission?"解散":"退出","战队"),okButtonProps:{loading:_e},onOk:(n=r()(o()().mark((function n(){var t,i;return o()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(fe(!0),null==e||!e.manage_permission){n.next=8;break}return n.next=4,H({type:"competitions/DeleteTeam",payload:{identifier:Q,id:null==e?void 0:e.id}});case 4:(t=n.sent)&&0===t.status&&(v.ZP.info("解散成功"),H({type:"competitions/getStaff",payload:{identifier:Q}}),H({type:"competitions/getHeader",payload:{identifier:Q}})),n.next=12;break;case 8:return n.next=10,H({type:"competitions/ExitTeam",payload:{identifier:Q,id:null==e?void 0:e.id}});case 10:(i=n.sent)&&0===i.status&&(v.ZP.info("退出战队成功"),H({type:"competitions/getStaff",payload:{identifier:Q}}),H({type:"competitions/getHeader",payload:{identifier:Q}}));case 12:fe(!1);case 13:case"end":return n.stop()}}),n)}))),function(){return n.apply(this,arguments)})})},children:null!=e&&e.manage_permission?"解散战队":"退出战队"})})]}),(0,he.jsx)(le.Z,{className:"mt20",wrap:!1,align:"middle",justify:"end",children:(0,he.jsx)(se.Z,{children:(0,he.jsxs)("span",{style:{color:"#5F6367"},children:[(0,he.jsx)("span",{children:"邀请码"}),(0,he.jsx)("span",{style:{margin:"0px 10px",color:"#232B40"},title:e.invite_code,children:e.invite_code||"--"}),(0,he.jsx)(li.CopyToClipboard,{text:"【竞赛邀请】".concat(null==q||null===(s=q.userInfo)||void 0===s?void 0:s.username,"邀请您加入【").concat(null==G?void 0:G.name,"】-《").concat(null==e?void 0:e.name,"》战队,您可以访问下方的链接,以队员的身份加入该战队。”链接:").concat(window.location.origin).concat(window.location.pathname,"?code=").concat(e.invite_code),onCopy:function(){return v.ZP.success("复制成功")},children:(0,he.jsx)("i",{className:"iconfont icon-fuzhi font-14",style:{display:"inline-block",color:"#0152d9",cursor:"pointer"}})})]})})})]})]})})}))}),"join"===(null==X?void 0:X.isteam)&&0===(null==U||null===(C=U.competition_teams)||void 0===C?void 0:C.length)&&(0,he.jsx)(xn.Z,{}),"mine"===(null==X?void 0:X.isteam)&&0===(null==U||null===(F=U.my_teams)||void 0===F?void 0:F.length)&&(0,he.jsx)(xn.Z,{}),"join"===(null==X?void 0:X.isteam)&&(null==U||null===(P=U.competition_teams)||void 0===P?void 0:P.map((function(e,n){var t;return(0,he.jsxs)("div",{className:Jt.items,children:[null!=e&&e.team_log?(0,he.jsx)("img",{src:ue.Z.IMG_SERVER+"/"+(null==e?void 0:e.team_log)}):(0,he.jsx)("div",{className:Jt.img,children:e.name.length>2?e.name.substring(0,2):e.name}),(0,he.jsxs)("div",{className:Jt.names,children:[(0,he.jsx)("div",{className:Jt.teamname,children:null==e?void 0:e.name}),(0,he.jsxs)("div",{className:Jt.time,children:[(0,he.jsx)("span",{className:Jt.createtime,children:"创建时间"})," ",null==e?void 0:e.created_at]})]}),(0,he.jsxs)("div",{className:Jt.width30,children:[(0,he.jsx)("img",{className:Jt.loaderimg,src:ue.Z.IMG_SERVER+"/images/"+"".concat(e.creator.image_url)}),(0,he.jsx)("span",{title:e.creator.name,children:e.creator.name.length>6?e.creator.name.substring(0,6)+"...":e.creator.name}),(0,he.jsx)("span",{style:{marginLeft:20},children:e.school_name?e.school_name.length>6?e.school_name.substring(0,6)+"...":e.school_name:"--"})]}),(0,he.jsxs)("div",{className:Jt.width30,style:{justifyContent:"end"},children:[(0,he.jsx)("span",{style:{color:"#5F6368"},children:"战队成员"}),(0,he.jsxs)("span",{style:{color:"#232B40",margin:"0px 10px"},children:[null==e||null===(t=e.team_members)||void 0===t?void 0:t.length,"人"]}),(0,he.jsx)("span",{style:{color:"#3061D0",cursor:"pointer"},onClick:function(){ie(e)},children:"查看"})]})]})}))),(0,he.jsx)("div",{className:Jt.countWrap,style:{marginTop:20},children:(0,he.jsx)(fn.Z,{showQuickJumper:!0,hideOnSinglePage:!0,showSizeChanger:!0,pageSizeOptions:["10","15","50","100","200"],total:"mine"===X.isteam?null==U?void 0:U.my_teams_count:null==U?void 0:U.count,onChange:function(e,n){X.page=e,X.per_page=n,$(l()({},X)),Mn()},pageSize:X.per_page,current:X.page})}),(0,he.jsxs)(x.Z,{title:!1,footer:!1,open:(null==te||null===(T=te.team_members)||void 0===T?void 0:T.length)>0,width:1e3,className:Jt.scoremodal,closable:!1,centered:!0,onCancel:function(){return ie([])},children:[(0,he.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,he.jsx)("div",{className:Jt.title,children:null==te?void 0:te.name}),(0,he.jsx)("span",{onClick:function(){return ie([])},style:{cursor:"pointer"},className:Jt.close,children:(0,he.jsx)("i",{className:"iconfont icon-danchuangguanbi"})})]}),(0,he.jsx)(oe.Z,{dataSource:null==te?void 0:te.team_members,pagination:!1,style:{marginTop:30},scroll:{y:300},columns:[{title:"头像",align:"left",dataIndex:"image_url",render:function(e,n){return(0,he.jsx)("img",{className:Jt.loaderimg,src:ue.Z.IMG_SERVER+"/images/"+"".concat(e)})}},{title:"姓名",align:"left",dataIndex:"name",render:function(e){return(0,he.jsx)(y.Z,{title:e,children:(0,he.jsx)("span",{children:(null==e?void 0:e.length)>6?(null==e?void 0:e.substring(0,6))+"...":e||"- -"})})}},{title:"手机",align:"left",dataIndex:"phone",ellipsis:{showTitle:!0},render:function(e){return(0,he.jsx)("span",{children:e||"- -"})}},{title:"学校/单位",align:"left",dataIndex:"school_name",render:function(e,n){return(0,he.jsx)(y.Z,{title:e,children:(0,he.jsx)("span",{children:(null==e?void 0:e.length)>6?(null==e?void 0:e.substring(0,6))+"...":e||"- -"})})}},{title:"职业",align:"left",ellipsis:{showTitle:!0},dataIndex:"identity",render:function(e,n){return e||"- -"}},{title:"学号",align:"left",ellipsis:{showTitle:!0},dataIndex:"student_id",render:function(e,n){return e||"- -"}},{title:"角色",align:"left",dataIndex:"role",render:function(e,n){return(0,he.jsxs)("span",{style:{color:"leader"===e?"#3061D0":"#01795D"},children:["leader"===e?"队长":"队员",(null==n?void 0:n.creator)&&(0,he.jsx)("span",{style:{color:"#FA6400",display:"inline-flex",width:48,height:22,borderRadius:4,lineHeight:"22px",background:"#FEEADC",textAlign:"center",marginLeft:10,justifyContent:"center",fontSize:12},children:"创建者"})]})}}]})]}),(0,he.jsx)(x.Z,{title:!1,footer:!1,open:(null==ce?void 0:ce.length)>0,width:1e3,className:Jt.scoremodal,closable:!1,destroyOnClose:!0,centered:!0,onCancel:function(){de([])},children:(0,he.jsxs)("div",{onClick:function(){Ze(!1),ze(!1)},children:[(0,he.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,he.jsx)("div",{className:Jt.title,children:"设置战队成员"}),(0,he.jsx)("span",{onClick:function(){Mn(),Ze(!1),ze(!1),Te(""),Ae(""),de([])},style:{cursor:"pointer"},className:Jt.close,children:(0,he.jsx)("i",{className:"iconfont icon-danchuangguanbi"})})]}),(0,he.jsxs)("div",{style:{display:"flex",marginTop:30},children:[(0,he.jsxs)("div",{style:{display:"flex",alignItems:"center",flex:1},children:[(0,he.jsx)("span",{style:{color:"#5F6368"},children:"添加老师"}),(0,he.jsx)(ti.Z,{overlayStyle:{width:600},content:(0,he.jsx)("div",{style:{maxHeight:260,overflow:"auto"},children:(0,he.jsx)(lt(),{initialLoad:!1,pageStart:1,threshold:20,loadMore:function(e){Yn()},hasMore:$e,useWindow:!1,children:(0,he.jsx)(oe.Z,{showHeader:!1,pagination:!1,dataSource:ge,columns:[{align:"left",width:60,dataIndex:"image_url",render:function(e){return(0,he.jsx)("img",{style:{marginLeft:"10px",marginRight:"3px"},className:Jt.loaderimg,src:ue.Z.IMG_SERVER+"/images/"+"".concat(e)})}},{align:"left",dataIndex:"name"},{align:"left",dataIndex:"phone"},{align:"left",dataIndex:"identity"},{align:"left",dataIndex:"school_name"},{align:"left",dataIndex:"image_url",render:function(e,n){return(0,he.jsx)("span",{className:Jt.task_hide,style:{textAlign:"left",width:"24%",color:n.enrolled?"#28be6c":n.enrolled||!1!==n.enrollable?"":"#F3730C",padding:"0px 5px",fontSize:"12px"},children:n.enrolled?"已加入本战队":n.enrolled||!1!==n.enrollable?"":"已加入其他战队"})}}],onRow:function(e){return{onClick:function(n){if(null!=e&&e.authentication||null==G||!G.is_authentication)if(e.enrolled)v.ZP.info("该用户已经加入战队");else if(e.need_mail)v.ZP.info("该用户没有邮箱");else if(e.need_phone)v.ZP.info("该用户没有手机号");else if((null==ce?void 0:ce.filter((function(n){return e.id===n.id})).length)>0)v.ZP.info("该用户已在战队列表,请不要重复添加");else{var t=ce;t.push(e),console.log("---",t),Ze(!1),de(Pe()(t))}else v.ZP.info("当前竞赛需要实名认证,该用户未进行实名认证不能参与。")}}}})})}),title:"",placement:"bottomLeft",open:we,children:(0,he.jsx)("div",{style:{marginLeft:16},className:Jt.searchWrap,children:(0,he.jsx)(j.Z.Search,{placeholder:"请搜索教师姓名/手机号进行添加",size:"large",className:Jt.search,value:Ie,onChange:function(e){Ae(e.target.value)},onSearch:function(e){Ze(!0),ye([]),bn(1),qn(1)},onBlur:function(){en(!0),bn(1),Nn(!1)},suffix:(0,he.jsx)("i",{className:"iconfont icon-sousuo9 font14 ".concat(Jt.searchIcon),onClick:function(e){e.stopPropagation(),Ze(!0),ye([]),bn(1),qn(1)}})})})})]}),(0,he.jsxs)("div",{style:{display:"flex",alignItems:"center",flex:1,justifyContent:"flex-end"},children:[(0,he.jsx)("span",{style:{color:"#5F6368"},children:"添加学生/专业人士"}),(0,he.jsx)(ti.Z,{overlayStyle:{width:700},content:(0,he.jsx)("div",{style:{maxHeight:260,overflow:"auto"},children:(0,he.jsx)(lt(),{initialLoad:!1,pageStart:1,threshold:20,loadMore:function(e){Hn()},hasMore:$e,useWindow:!1,children:(0,he.jsx)(oe.Z,{showHeader:!1,pagination:!1,dataSource:Ee,columns:[{align:"left",width:60,dataIndex:"image_url",render:function(e){return(0,he.jsx)("img",{style:{marginLeft:"10px",marginRight:"3px"},className:Jt.loaderimg,src:ue.Z.IMG_SERVER+"/images/"+"".concat(e)})}},{align:"left",dataIndex:"name"},{align:"left",dataIndex:"phone"},{align:"left",dataIndex:"student_id"},{align:"left",dataIndex:"school_name"},{align:"left",dataIndex:"image_url",render:function(e,n){return(0,he.jsx)("span",{className:Jt.task_hide,style:{textAlign:"left",width:"24%",color:n.enrolled?"#28be6c":n.enrolled||!1!==n.enrollable?"":"#F3730C",padding:"0px 5px",fontSize:"12px"},children:n.enrolled?"已加入本战队":n.enrolled||!1!==n.enrollable?"":"已加入其他战队"})}}],onRow:function(e){return{onClick:function(n){if(null!=e&&e.authentication||null==G||!G.is_authentication)if(e.enrolled)v.ZP.info("该用户已经加入战队");else if(e.need_mail)v.ZP.info("该用户没有邮箱");else if(e.need_phone)v.ZP.info("该用户没有手机号");else if((null==ce?void 0:ce.filter((function(n){return e.id===n.id})).length)>0)v.ZP.info("该用户已在战队列表,请不要重复添加");else{var t=ce;t.push(e),ze(!1),de(Pe()(t))}else v.ZP.info("当前竞赛需要实名认证,该用户未进行实名认证不能参与。")}}}})})}),title:"",placement:"bottomRight",open:Be,children:(0,he.jsx)("div",{style:{marginLeft:16},className:Jt.searchWrap,children:(0,he.jsx)(j.Z.Search,{placeholder:"请搜索队员姓名/手机号并添加",size:"large",className:Jt.search,value:Fe,onChange:function(e){Te(e.target.value)},onSearch:function(e){ze(!0),Re([]),bn(1),Bn(1)},onBlur:function(){en(!0),bn(1),Nn(!1)},suffix:(0,he.jsx)("i",{className:"iconfont icon-sousuo9 font14 ".concat(Jt.searchIcon),onClick:function(e){e.stopPropagation(),ze(!0),Re([]),bn(1),Bn(1)}})})})})]})]}),(0,he.jsx)("div",{style:{display:"flex",marginBottom:"12px",marginTop:"20px"},children:(0,he.jsxs)("p",{style:{flex:"1",color:"#666666"},children:[(0,he.jsx)("span",{style:{color:"#9B9B9B"},children:"请添加战队成员:"}),W&&W.all_staff?(0,he.jsxs)("span",{children:[W&&W.all_staff.minimum,"-",W&&W.all_staff.maximum,"名成员"]}):"",W&&W.teacher_staff?(0,he.jsxs)("span",{children:[W&&W.teacher_staff.minimum,"-",W&&W.teacher_staff.maximum,"名教师"]}):"",W&&W.teacher_staff&&W.member_staff?"/":"",W&&W.member_staff?(0,he.jsxs)("span",{children:[W&&W.member_staff.minimum,"-",W&&W.member_staff.maximum,"名学生"]}):""]})}),(0,he.jsx)(oe.Z,{dataSource:ce,pagination:!1,style:{marginTop:"-10px"},scroll:{y:300},columns:[{title:"头像",align:"left",width:60,dataIndex:"image_url",render:function(e,n){return(0,he.jsx)("img",{className:Jt.loaderimg,style:{width:20,height:20},src:ue.Z.IMG_SERVER+"/images/"+"".concat(e)})}},{title:"姓名",align:"left",dataIndex:"name",render:function(e){return(0,he.jsx)(y.Z,{title:e,children:(0,he.jsx)("span",{children:(null==e?void 0:e.length)>6?(null==e?void 0:e.substring(0,6))+"...":e||"- -"})})}},{title:"手机",align:"left",width:130,dataIndex:"phone",render:function(e){return(0,he.jsx)(y.Z,{title:e,children:(0,he.jsx)("span",{children:e||"- -"})})}},{title:"学校/单位",align:"left",dataIndex:"school_name",render:function(e,n){return(0,he.jsx)(y.Z,{title:e,children:(0,he.jsx)("span",{children:(null==e?void 0:e.length)>6?(null==e?void 0:e.substring(0,6))+"...":e||"- -"})})}},{title:"职业",align:"left",dataIndex:"identity",render:function(e,n){return e||"- -"}},{title:"学号",align:"left",dataIndex:"student_id",render:function(e,n){return e||"- -"}},{title:"角色",align:"left",dataIndex:"role",render:function(e,n){return(0,he.jsxs)("span",{style:{color:"leader"===e?"#3061D0":"#01795D"},children:["leader"===e?"队长":"队员",(null==n?void 0:n.creator)&&(0,he.jsx)("span",{style:{color:"#FA6400",display:"inline-flex",width:48,height:22,borderRadius:4,lineHeight:"22px",background:"#FEEADC",textAlign:"center",marginLeft:10,justifyContent:"center",fontSize:12},children:"创建者"})]})}},{title:"操作",align:"right",width:150,dataIndex:"role",render:function(e,n,t){return(0,he.jsxs)("span",{style:{color:"#3061D0"},children:["leader"!=e&&(0,he.jsx)("a",{onClick:function(){var e=ce,i=ce&&ce.findIndex((function(e){return"leader"===e.role}));e[t].role="leader",e[i].role=e&&e[i].is_teacher?"teacher":"member";var l=e.sort((function(e,n){return e.creator?-1:1})).sort((function(e,n){return"leader"===e.role?-1:1}));de(Pe()(l)),Qe.current=n.id},children:"设置队长"}),"leader"!=e&&(0,he.jsx)("a",{onClick:function(){var e=ce&&ce.filter((function(e){return e.id!=n.id}));de(Pe()(e))},style:{marginLeft:20},children:"删除"})]})}}]}),(0,he.jsxs)("div",{className:Jt.bottom,children:[(0,he.jsx)(Z.ZP,{className:Jt.no,onClick:function(){de([]),ze(!1),Ze(!1),Te(""),Ae(""),Mn()},children:"取消"}),(0,he.jsx)(Z.ZP,{loading:_e,className:Jt.yes,onClick:r()(o()().mark((function e(){var n,t,i;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=[],t=[],ce&&ce.map((function(e,i){e.is_teacher?t.push(e.id):n.push(e.id)})),e.next=5,H({type:"competitions/SubmitTeam",payload:{identifier:Q,teamid:He,member_ids:n,teacher_ids:t,leader:Qe.current}});case 5:(i=e.sent)&&0===i.status&&(v.ZP.info("修改成功"),de([]),Mn());case 7:case"end":return e.stop()}}),e)}))),children:"确认"})]})]})}),(0,he.jsxs)(x.Z,{title:!1,footer:!1,open:ln,width:610,className:Jt.scoremodal,closable:!1,destroyOnClose:!0,centered:!0,onCancel:function(){return sn(!1)},children:[(0,he.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,he.jsx)("div",{className:Jt.title,children:"编辑战队"}),(0,he.jsx)("span",{onClick:function(){return sn(!1)},style:{cursor:"pointer"},className:Jt.close,children:(0,he.jsx)("i",{className:"iconfont icon-danchuangguanbi"})})]}),(0,he.jsxs)("div",{className:Jt.content,children:[(0,he.jsxs)(f.Z,{form:an,layout:"vertical",initialValues:l()({name:null==_n?void 0:_n.name},null==_n?void 0:_n.apply_info),onFinish:function(){var e=r()(o()().mark((function e(n){var t,i,s,a;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return fe(!0),s=null===(t=Sn.find((function(e){return e.name===(null==n?void 0:n.school)})))||void 0===t?void 0:t.id,e.next=4,H({type:"competitions/UpTeam",payload:l()(l()({},n),{},{identifier:Q,Teannameid:null==_n?void 0:_n.id,name:null==n?void 0:n.name,school_id:s,image:(null===(i=pn.current)||void 0===i||null===(i=i.getCroppedCanvas())||void 0===i?void 0:i.toDataURL("image/jpeg"))||""})});case 4:a=e.sent,fe(!1),0===(null==a?void 0:a.status)&&(Mn(),sn(!1));case 7:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:[(0,he.jsx)(f.Z.Item,{label:"战队名称",name:"name",rules:[{required:!0,validator:function(e,n){var t;return(null==n||null===(t=n.replaceAll(" ",""))||void 0===t?void 0:t.length)>0?Promise.resolve():Promise.reject("请填写竞赛名称")}}],children:(0,he.jsx)(j.Z,{maxLength:60,className:Jt.baseFormItem,showCount:!0})}),(null==G||null===(L=G.need_apply_info)||void 0===L?void 0:L.need_apply_name)&&(0,he.jsx)(f.Z.Item,{label:"参赛人员姓名",name:"real_name",className:Jt.jsinput,rules:[{required:!0,message:"请输入参赛人员姓名"},{whitespace:!0,message:"姓名不能为空"}],children:(0,he.jsx)(j.Z,{className:Jt.baseFormItem,placeholder:"请输入参赛人员姓名",showCount:!0,maxLength:60})}),(null==G||null===(D=G.need_apply_info)||void 0===D?void 0:D.need_apply_sex)&&(0,he.jsx)(f.Z.Item,{label:"性别",name:"sex",className:Jt.jsinput,rules:[{required:!0,message:"请选择参赛人员性别"}],children:(0,he.jsxs)(b.ZP.Group,{children:[(0,he.jsx)(b.ZP,{value:0,children:"男"}),(0,he.jsx)(b.ZP,{value:1,children:"女"})]})}),(null==G||null===(E=G.need_apply_info)||void 0===E?void 0:E.need_apply_student_id)&&(0,he.jsx)(f.Z.Item,{label:"学号",name:"student_id",className:Jt.jsinput,rules:[{required:!0,message:"请输入参赛人员学号"},{whitespace:!0,message:"学号不能为空"}],children:(0,he.jsx)(j.Z,{className:Jt.baseFormItem,placeholder:"请输入参赛人员学号",showCount:!0,maxLength:60})}),(null==G||null===(R=G.need_apply_info)||void 0===R?void 0:R.need_apply_phone)&&(0,he.jsx)(f.Z.Item,{label:"电话",name:"phone",className:Jt.jsinput,rules:[{required:!0,message:"请输入参赛人员电话"},{whitespace:!0,message:"电话不能为空"}],children:(0,he.jsx)(j.Z,{className:Jt.baseFormItem,placeholder:"请输入参赛人员电话",showCount:!0,maxLength:60})}),(null==G||null===(M=G.need_apply_info)||void 0===M?void 0:M.need_apply_grade)&&(0,he.jsx)(f.Z.Item,{label:"年级",name:"grade",className:Jt.jsinput,rules:[{required:!0,message:"请选择参赛人员年级"}],children:(0,he.jsx)(_.default,{placeholder:"请选择参赛人员年级",size:"large",children:(On=(new Date).getFullYear(),Array(31).fill({}).map((function(e,n){return(0,he.jsx)(ri,{value:On-n,children:(0,he.jsx)("span",{children:On-n})},n)})))})}),(null==G||null===(V=G.need_apply_info)||void 0===V?void 0:V.need_apply_teacher_name)&&(0,he.jsx)(f.Z.Item,{label:"指导老师姓名",name:"teacher_name",className:Jt.jsinput,rules:[{required:!0,message:"请输入指导老师姓名"},{whitespace:!0,message:"指导老师姓名不能为空"}],children:(0,he.jsx)(j.Z,{className:Jt.baseFormItem,placeholder:"请输入指导老师姓名",showCount:!0,maxLength:60})}),(null==G||null===(B=G.need_apply_info)||void 0===B?void 0:B.need_apply_school)&&(0,he.jsx)(f.Z.Item,{label:"学校/单位",name:"school",className:Jt.jsinput,rules:[{required:!0,message:"请选择学校/单位"}],children:(0,he.jsx)(w.Z,{size:"large",showSearch:!0,onChange:Fn,children:Dn.map((function(e,n){return(0,he.jsx)(ri,{value:e.name,children:e.name},n)}))})})]}),(0,he.jsxs)("p",{style:{marginTop:"15px",marginLeft:"8px",width:"544px"},children:[(0,he.jsx)("span",{children:"LOGO:"}),(0,he.jsxs)("label",{id:"uploadBtn",style:{color:"#4DACFF",cursor:"pointer"},children:[(0,he.jsx)("input",{type:"file",className:"sr-only",id:"inputImage",name:"file",accept:"image/*",onChange:function(e){var n=e.target.files[0];if(n&&n.size>2097152)v.ZP.info("仅支持文件大小小于2M的文件");else{var t=new FileReader;t.readAsBinaryString(n),t.onload=function(){var e=btoa(t.result);Je.current="data:".concat(n.type,";base64,").concat(e),We("data:".concat(n.type,";base64,").concat(e))},t.onerror=function(){}}},style:{display:"none"}}),"上传LOGO"]})," ",(0,he.jsx)("span",{style:{marginLeft:10,color:"#FA6400"},children:"(支持jpg、gif、png格式的图片,建议文件小于2M)"})]}),(0,he.jsxs)("div",{style:{marginTop:"15px",marginLeft:"8px",display:"flex"},children:[dn?(0,he.jsx)("img",{className:Jt.Spanradius,src:dn}):null!=_n&&_n.team_log?(0,he.jsx)("img",{src:ue.Z.IMG_SERVER+"/"+(null==_n?void 0:_n.team_log),className:Jt.Spanradius}):(0,he.jsx)("div",{className:Jt.Spanradius,children:(null==_n||null===(z=_n.name)||void 0===z?void 0:z.length)>2?null==_n||null===(O=_n.name)||void 0===O?void 0:O.substring(0,2):null==_n?void 0:_n.name}),(0,he.jsx)(si.Z,{style:{width:"320px",height:"320px",marginLeft:"30px",background:"#EEEEEE"},src:Je.current||ue.Z.IMG_SERVER+"/"+(null==_n?void 0:_n.team_log),guides:!1,ref:pn,crop:function(){un(pn.current.getCroppedCanvas().toDataURL())}})]})]}),(0,he.jsxs)("div",{className:Jt.bottom,children:[(0,he.jsx)(Z.ZP,{className:Jt.no,onClick:function(){sn(!1)},children:"取消"}),(0,he.jsx)(Z.ZP,{loading:_e,className:Jt.yes,onClick:function(){an.submit()},children:"确认"})]})]})]})})),di=["competitions","globalSetting","loading","dispatch","user"],ui=[{id:"",name:"全部"},{id:1,name:"姓名"},{id:2,name:"手机号"},{id:3,name:"邮箱"}],pi={teacher:"教师",student:"学生",professional:"专业人士"},mi=(0,h.connect)((function(e){var n=e.competitions,t=e.loading,i=e.globalSetting,l=e.user;return{competitions:n,globalSetting:i,loading:t.models.competitions,user:l}}))((function(e){var n,t=e.competitions,i=(e.globalSetting,e.loading,e.dispatch),s=(e.user,p()(e,di),(0,h.useParams)().identifier),a=t.Header,c=(t.competition_team,t.Staff),u=(t.Prizes,t.Account,(0,m.useState)([])),_=d()(u,2),f=_[0],g=_[1],j=(0,m.useState)(""),b=d()(j,2),w=(b[0],b[1],(0,m.useState)({page:1,per_page:10,keyword:"",type:"",personal:!0})),Z=d()(w,2),k=Z[0],I=Z[1];function A(){return S.apply(this,arguments)}function S(){return(S=r()(o()().mark((function e(){var n;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ae.ZP)("/api/competitions/".concat(s,"/all_team_members.json"),{method:"get",params:k});case 2:0===(null==(n=e.sent)?void 0:n.status)&&g(n);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var C=(0,m.useState)(!1),F=d()(C,2),P=F[0],T=F[1];(0,m.useEffect)((function(){null!=a&&a.personal&&A()}),[a]);var L=[{title:"序号",align:"left",dataIndex:"name",width:80,render:function(e,n,t){return(0,he.jsx)("span",{children:t+1})}},{title:"参赛人",align:"left",dataIndex:"name",width:120,ellipsis:{showTitle:!1},render:function(e,n){return(0,he.jsxs)(he.Fragment,{children:[(0,he.jsx)(y.Z,{placement:"topLeft",title:e,children:(null==e?void 0:e.length)>4?e.substring(0,4)+"...":e}),(null==n?void 0:n.authentication)&&(0,he.jsx)(y.Z,{title:"已实名认证",children:(0,he.jsx)("img",{src:Kt,style:{marginLeft:5,marginTop:"-2px"}})})]})}},{title:"个人成绩",align:"left",width:100,dataIndex:"score",render:function(e){return(0,he.jsx)("span",{children:e||"- -"})}},{title:"角色",align:"left",width:100,dataIndex:"identity",render:function(e,n){return(0,he.jsxs)("span",{children:[pi[e],(null==n?void 0:n.professional_certification)&&(0,he.jsx)(y.Z,{title:"已职业认证",children:(0,he.jsx)("img",{src:Kt,style:{marginLeft:5,marginTop:"-2px"}})})]})}},{title:"手机号",align:"left",width:160,dataIndex:"phone",render:function(e){return(0,he.jsx)("span",{children:e||"- -"})}},{title:"学号/工号",align:"left",dataIndex:"student_id",width:160,ellipsis:{showTitle:!1},render:function(e){return(0,he.jsx)(y.Z,{placement:"topLeft",title:e,children:e||"- -"})}},{title:"学校/单位",align:"left",dataIndex:"school",ellipsis:{showTitle:!1},render:function(e){return(0,he.jsx)(y.Z,{placement:"topLeft",title:e||"",children:e||"--"})}},{title:"地区",align:"left",dataIndex:"province",width:100,ellipsis:{showTitle:!1},render:function(e){return(0,he.jsx)(y.Z,{placement:"topLeft",title:e||"",children:e||"- -"})}},{title:"操作",align:"right",dataIndex:"is_cancel_score",width:100,render:function(e,n){return(0,he.jsx)("span",{children:0===e||!1===e?(0,he.jsx)("span",{style:{color:"#165DFF",cursor:"pointer"},onClick:function(){var e;x.Z.confirm({icon:null,centered:!0,title:"取消成绩",content:"请确认是否取消该成员成绩,取消后该成员的成绩将视为无成绩,不进行排名。",onOk:(e=r()(o()().mark((function e(){var t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ae.ZP)("/api/competitions/".concat(s,"/set_score_status.json"),{method:"put",body:{competition_score_id:null==n?void 0:n.competition_score_id,competition_team_id:null==n?void 0:n.competition_team_id,is_cancel_score:1}});case 2:0===(null==(t=e.sent)?void 0:t.status)&&(v.ZP.info("取消成功"),k.page=1,I(l()({},k)),A());case 4:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})},children:"取消成绩"}):(0,he.jsx)("span",{onClick:r()(o()().mark((function e(){var t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ae.ZP)("/api/competitions/".concat(s,"/set_score_status.json"),{method:"put",body:{competition_score_id:null==n?void 0:n.competition_score_id,competition_team_id:null==n?void 0:n.competition_team_id,is_cancel_score:0}});case 2:0===(null==(t=e.sent)?void 0:t.status)&&(v.ZP.info("恢复成功"),k.page=1,I(l()({},k)),A());case 4:case"end":return e.stop()}}),e)}))),style:{color:"#FD9200",cursor:"pointer"},children:"恢复成绩"})})}}];return(0,he.jsxs)("section",{className:Jt.bg,children:[(0,he.jsx)("div",{className:Jt.title,style:{display:"flex"},children:(0,he.jsxs)(le.Z,{style:{width:"100%"},children:[(0,he.jsx)(se.Z,{flex:"1",children:null!=a&&a.personal?"参赛人员":"战队详情"}),(0,he.jsxs)(se.Z,{children:[((0,Tn.eB)()||(null==a||null===(n=a.permission)||void 0===n?void 0:n.editable)&&!a.personal)&&(0,he.jsx)("span",{className:Jt.button,onClick:function(){T(!0)},children:"管理战队成绩"}),!(null!=c&&c.enroll_ended)&&!a.personal&&(0,he.jsx)("span",{className:Jt.button,style:{margin:"0px 20px"},onClick:function(){i({type:"competitions/setActionTabs",payload:{key:"2"}})},children:"加入战队"})," ",!(null!=c&&c.enroll_ended)&&!a.personal&&(0,he.jsxs)("span",{className:Jt.button,onClick:function(){i({type:"competitions/setActionTabs",payload:{key:"3"}})},children:[(0,he.jsx)("i",{className:"iconfont icon-qizhi",style:{marginRight:6,fontSize:14,color:"#3061D0"}})," 创建战队"]})]})]})}),(0,he.jsxs)("div",{style:{display:"flex"},children:[null!=a&&a.personal?(0,he.jsxs)("div",{style:{padding:"20px",width:"100%"},children:[(0,he.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,he.jsx)("div",{children:(0,he.jsx)(N.t7,{style:{width:327,marginRight:15},dataSource:ui,value:{id:k.type,value:k.keyword},onChange:function(e,n){k.keyword=e,k.type=n||"",I(l()({},k)),A()},placeholder:"请输入搜索内容"})}),(0,he.jsx)("div",{style:{flex:1,textAlign:"end"},children:(0,he.jsx)("span",{className:Jt.button,onClick:function(){(0,me.FH)("",(0,me.NY)({url:ue.Z.API_SERVER+"/api/competitions/".concat(s,"/all_team_members.xlsx"),query:l()({},k)}))},children:"导出"})})]}),(0,he.jsx)(oe.Z,{style:{marginTop:20},columns:L,bordered:!1,dataSource:null==f?void 0:f.data,pagination:!1}),(0,he.jsx)("div",{className:Jt.countWrap,style:{marginTop:20},children:(0,he.jsx)(fn.Z,{showQuickJumper:!0,hideOnSinglePage:!0,showSizeChanger:!0,pageSizeOptions:["10","15","50","100","200"],total:null==f?void 0:f.count,onChange:function(e,n){k.page=e,k.per_page=n,I(l()({},k)),A()},pageSize:k.per_page,current:k.page})})]}):(0,he.jsx)(ci,{}),(0,he.jsx)(mn.Z,{rootClassName:Jt.drawer_style,title:(0,he.jsx)("div",{style:{fontSize:"16px"},children:"战队成绩"}),placement:"bottom",width:500,height:564,onClose:function(){return T(!1)},open:P,children:P?(0,he.jsx)(ni,{}):""})]})]})})),hi={flex_box_center:"flex_box_center___s9TxG",flex_space_between:"flex_space_between___MGe6n",flex_box_vertical_center:"flex_box_vertical_center___nNXLw",flex_box_center_end:"flex_box_center_end___KE6DE",flex_box_column:"flex_box_column___gv8RV",bg:"bg___gk5zM",title:"title___Pp6ij",button:"button___EI7ve"},_i=["competitions","globalSetting","loading","dispatch","user"],fi=_.default.Option,xi=[{id:"",name:"全部"},{id:1,name:"姓名"},{id:2,name:"手机号"},{id:3,name:"邮箱"}],vi={teacher:"教师",student:"学生",professional:"专业人士"},gi=(0,h.connect)((function(e){var n=e.competitions,t=e.loading,i=e.globalSetting,l=e.user;return{competitions:n,globalSetting:i,loading:t.models.competitions,user:l}}))((function(e){var n,t,i,s,a,c,u,g,Z,k,I,A,S,C,F,P,T,L,D,E,R,M,V,B,z,O,Y,H=e.competitions,q=(e.globalSetting,e.loading,e.dispatch),Q=e.user,G=(p()(e,_i),(0,h.useParams)().identifier),U=H.Header,W=(0,m.useState)([]),J=d()(W,2),K=J[0],X=J[1],$=(0,m.useState)(!1),ee=d()($,2),ne=ee[0],te=ee[1],ae=f.Z.useForm(),re=d()(ae,1)[0],de=(0,m.useState)(!1),pe=d()(de,2),_e=pe[0],fe=pe[1],xe=(0,m.useState)(!1),ve=d()(xe,2),ge=ve[0],ye=ve[1],je=(0,m.useState)({page:1,per_page:10,keyword:"",type:"",personal:!0}),be=d()(je,2),we=be[0],Ze=be[1],ke=(0,m.useState)([]),Ne=d()(ke,2),Ie=Ne[0],Se=Ne[1],Ce=(0,m.useRef)((0,oi.throttle)((function(e){return De(e)}),1200,{leading:!0,trailing:!0})).current,Fe=(0,m.useState)([]),Pe=d()(Fe,2),Te=Pe[0],Le=Pe[1],De=function(){var e=r()(o()().mark((function e(n){var t,i;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,q({type:"account/getSchoolOption",payload:{keyword:n,limit:10}});case 2:t=e.sent,Se(null==t?void 0:t.schools),n&&""!=n&&Le(null==t||null===(i=t.schools)||void 0===i?void 0:i.filter((function(e){return e.name.includes(n)})));case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();(0,m.useEffect)((function(){var e;De(null==Q||null===(e=Q.userInfo)||void 0===e?void 0:e.school_name)}),[(null==U||null===(n=U.need_apply_info)||void 0===n?void 0:n.need_apply_name)||(null==U||null===(t=U.need_apply_info)||void 0===t?void 0:t.need_apply_student_id)||(null==U||null===(i=U.need_apply_info)||void 0===i?void 0:i.need_apply_sex)||(null==U||null===(s=U.need_apply_info)||void 0===s?void 0:s.need_apply_phone)||(null==U||null===(a=U.need_apply_info)||void 0===a?void 0:a.need_apply_grade)||(null==U||null===(c=U.need_apply_info)||void 0===c?void 0:c.need_apply_teacher_name)||(null==U||null===(u=U.need_apply_info)||void 0===u?void 0:u.need_apply_school)]);function Ee(){return Re.apply(this,arguments)}function Re(){return(Re=r()(o()().mark((function e(){var n;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return fe(!0),e.next=3,(0,Ae.ZP)("/api/competitions/".concat(G,"/all_team_members.json"),{method:"get",params:we});case 3:0===(null==(n=e.sent)?void 0:n.status)&&(X(n),ye(null==n?void 0:n.hidden_score)),fe(!1);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}(0,m.useEffect)((function(){Ee()}),[U]);var Me,Ve=null===(g=[{title:"序号",align:"left",dataIndex:"name",width:80,fixed:"left",render:function(e,n,t){return(0,he.jsx)("span",{children:t+1})}},{title:"参赛人",align:"left",dataIndex:"name",width:120,fixed:"left",ellipsis:{showTitle:!1},render:function(e,n){return(0,he.jsxs)(he.Fragment,{children:[(0,he.jsx)(y.Z,{placement:"topLeft",title:e,children:(null==e?void 0:e.length)>4?e.substring(0,4)+"...":e}),(null==n?void 0:n.authentication)&&(0,he.jsx)(y.Z,{title:"已实名认证",children:(0,he.jsx)("img",{src:Kt,style:{marginLeft:5,marginTop:"-2px"}})})]})}},{title:"个人成绩",align:"left",width:100,dataIndex:"score",fixed:"left",render:function(e){return(0,he.jsx)("span",{children:e||"- -"})}},((0,Tn.eB)()||(null==U||null===(Z=U.permission)||void 0===Z?void 0:Z.editable))&&{title:"角色",align:"left",width:100,dataIndex:"identity",render:function(e,n){return(0,he.jsxs)("span",{children:[vi[e],(null==n?void 0:n.professional_certification)&&(0,he.jsx)(y.Z,{title:"已职业认证",children:(0,he.jsx)("img",{src:Kt,style:{marginLeft:5,marginTop:"-2px"}})})]})}},{title:"手机号",align:"left",width:160,dataIndex:"phone",render:function(e){return(0,he.jsx)("span",{children:e||"- -"})}},{title:"学号/工号",align:"left",dataIndex:"student_id",width:160,ellipsis:{showTitle:!1},render:function(e){return(0,he.jsx)(y.Z,{placement:"topLeft",title:e,children:e||"- -"})}},{title:"学校/单位",align:"left",dataIndex:"school",ellipsis:{showTitle:!1},width:160,render:function(e){return(0,he.jsx)(y.Z,{placement:"topLeft",title:e||"",children:e||"--"})}},((0,Tn.eB)()||(null==U||null===(k=U.permission)||void 0===k?void 0:k.editable))&&{title:"地区",align:"left",dataIndex:"province",width:100,ellipsis:{showTitle:!1},render:function(e){return(0,he.jsx)(y.Z,{placement:"topLeft",title:e||"",children:e||"- -"})}},(null==U?void 0:U.can_write_teacher_info)&&{title:"指导教师姓名",align:"left",dataIndex:"teacher_name",width:120,ellipsis:{showTitle:!1},render:function(e){return(0,he.jsx)(y.Z,{placement:"topLeft",title:e||"",children:e||"- -"})}},((0,Tn.eB)()||(null==U||null===(I=U.need_apply_info)||void 0===I?void 0:I.need_apply_name)||(null==U||null===(A=U.need_apply_info)||void 0===A?void 0:A.need_apply_student_id)||(null==U||null===(S=U.need_apply_info)||void 0===S?void 0:S.need_apply_sex)||(null==U||null===(C=U.need_apply_info)||void 0===C?void 0:C.need_apply_phone)||(null==U||null===(F=U.need_apply_info)||void 0===F?void 0:F.need_apply_grade)||(null==U||null===(P=U.need_apply_info)||void 0===P?void 0:P.need_apply_teacher_name)||(null==U||null===(T=U.need_apply_info)||void 0===T?void 0:T.need_apply_school))&&{title:"操作",align:"right",dataIndex:"is_cancel_score",width:100,fixed:"right",render:function(e,n){var t;return(0,Tn.eB)()||null!=U&&null!==(t=U.permission)&&void 0!==t&&t.editable?(0,he.jsx)("span",{children:0===e||!1===e?(0,he.jsx)("span",{style:{color:"#165DFF",cursor:"pointer"},onClick:function(){var e;x.Z.confirm({icon:null,centered:!0,title:"取消成绩",content:"请确认是否取消该成员成绩,取消后该成员的成绩将视为无成绩,不进行排名。",onOk:(e=r()(o()().mark((function e(){var t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ae.ZP)("/api/competitions/".concat(G,"/set_score_status.json"),{method:"put",body:{competition_score_id:null==n?void 0:n.competition_score_id,competition_team_id:null==n?void 0:n.competition_team_id,is_cancel_score:1}});case 2:0===(null==(t=e.sent)?void 0:t.status)&&(v.ZP.info("取消成功"),we.page=1,Ze(l()({},we)),Ee());case 4:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})},children:"取消成绩"}):(0,he.jsx)("span",{onClick:r()(o()().mark((function e(){var t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ae.ZP)("/api/competitions/".concat(G,"/set_score_status.json"),{method:"put",body:{competition_score_id:null==n?void 0:n.competition_score_id,competition_team_id:null==n?void 0:n.competition_team_id,is_cancel_score:0}});case 2:0===(null==(t=e.sent)?void 0:t.status)&&(v.ZP.info("恢复成功"),we.page=1,Ze(l()({},we)),Ee());case 4:case"end":return e.stop()}}),e)}))),style:{color:"#FD9200",cursor:"pointer"},children:"恢复成绩"})}):(0,he.jsx)("span",{style:{color:"#165DFF",cursor:"pointer"},onClick:function(){"ended"!=(null==U?void 0:U.competition_status)?(re.setFieldsValue(l()(l()({},n),null==n?void 0:n.apply_info)),te(!0)):v.ZP.warning("竞赛已结束,无法编辑相关信息")},children:"编辑"})}}])||void 0===g?void 0:g.filter((function(e){return e}));return(0,he.jsxs)("section",{className:hi.bg,children:[(0,he.jsx)("div",{className:hi.title,style:{display:"flex"},children:(0,he.jsxs)(le.Z,{style:{width:"100%"},children:[(0,he.jsx)("span",{children:"参赛人员"}),((0,Tn.eB)()||(null==U||null===(L=U.permission)||void 0===L?void 0:L.editable))&&(0,he.jsx)(ie.Z,{checked:ge,style:{marginLeft:10,alignItems:"center"},onChange:function(){var e=r()(o()().mark((function e(n){var t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return ye(n.target.checked),e.next=3,(0,Ae.ZP)("/api/competitions/".concat(G,"/hidden_score.json"),{method:"POST",body:{hidden_score:n.target.checked}});case 3:0===(null==(t=e.sent)?void 0:t.status)&&Ee();case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:(0,he.jsx)("span",{style:{color:"#828693",marginLeft:"-3px"},children:"隐藏成绩"})})]})}),(0,he.jsxs)("div",{style:{padding:"20px",width:"100%"},children:[((0,Tn.eB)()||(null==U||null===(D=U.permission)||void 0===D?void 0:D.editable))&&(0,he.jsxs)(le.Z,{wrap:!1,align:"middle",justify:"space-between",children:[(0,he.jsx)(se.Z,{children:(0,he.jsx)(N.t7,{style:{width:327,marginRight:15},dataSource:xi,value:{id:we.type,value:we.keyword},onChange:function(e,n){we.keyword=e,we.type=n||"",Ze(l()({},we)),Ee()},placeholder:"请输入搜索内容"})}),(0,he.jsx)(se.Z,{children:(0,he.jsx)("span",{className:hi.button,onClick:function(){(0,me.FH)("",(0,me.NY)({url:ue.Z.API_SERVER+"/api/competitions/".concat(G,"/all_team_members.xlsx"),query:l()({},we)}))},children:"导出"})})]}),(0,he.jsx)(oe.Z,{loading:_e,style:{marginTop:20},columns:Ve,bordered:!1,dataSource:null==K?void 0:K.data,pagination:!1,scroll:((0,Tn.eB)()||(null==U||null===(E=U.permission)||void 0===E?void 0:E.editable))&&(null==U?void 0:U.can_write_teacher_info)&&{x:1160}}),(0,he.jsx)("div",{style:{marginTop:20},children:(0,he.jsx)(fn.Z,{showQuickJumper:!0,hideOnSinglePage:!0,showSizeChanger:!0,pageSizeOptions:["10","15","50","100","200"],total:null==K?void 0:K.count,onChange:function(e,n){we.page=e,we.per_page=n,Ze(l()({},we)),Ee()},pageSize:we.per_page,current:we.page})})]}),(0,he.jsx)(x.Z,{width:650,title:"编辑报名信息",open:ne,centered:!0,onCancel:function(){te(!1)},onOk:function(){re.submit()},confirmLoading:_e,children:(0,he.jsxs)(f.Z,{form:re,colon:!1,size:"large",labelCol:{span:5},onFinish:function(){var e=r()(o()().mark((function e(n){var t,i;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=null===(t=Ie.find((function(e){return e.name===(null==n?void 0:n.school)})))||void 0===t?void 0:t.id,e.next=3,(0,ce.bu)(l()(l()({},n),{},{identifier:G,school_id:i}));case 3:0===e.sent.status&&(v.ZP.success("修改成功"),te(!1),Ee());case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:[(0,he.jsx)(f.Z.Item,{hidden:!0,name:"competition_team_id"}),(null==U||null===(R=U.need_apply_info)||void 0===R?void 0:R.need_apply_name)&&(0,he.jsx)(f.Z.Item,{label:"参赛人员姓名",name:"real_name",className:hi.jsinput,rules:[{required:!0,message:"请输入参赛人员姓名"},{whitespace:!0,message:"姓名不能为空"}],children:(0,he.jsx)(j.Z,{className:hi.baseFormItem,placeholder:"请输入参赛人员姓名",showCount:!0,maxLength:60})}),(null==U||null===(M=U.need_apply_info)||void 0===M?void 0:M.need_apply_sex)&&(0,he.jsx)(f.Z.Item,{label:"性别",name:"sex",className:hi.jsinput,rules:[{required:!0,message:"请选择参赛人员性别"}],children:(0,he.jsxs)(b.ZP.Group,{children:[(0,he.jsx)(b.ZP,{value:0,children:"男"}),(0,he.jsx)(b.ZP,{value:1,children:"女"})]})}),(null==U||null===(V=U.need_apply_info)||void 0===V?void 0:V.need_apply_student_id)&&(0,he.jsx)(f.Z.Item,{label:"学号",name:"student_id",className:hi.jsinput,rules:[{required:!0,message:"请输入参赛人员学号"},{whitespace:!0,message:"学号不能为空"}],children:(0,he.jsx)(j.Z,{className:hi.baseFormItem,placeholder:"请输入参赛人员学号",showCount:!0,maxLength:60})}),(null==U||null===(B=U.need_apply_info)||void 0===B?void 0:B.need_apply_phone)&&(0,he.jsx)(f.Z.Item,{label:"电话",name:"phone",className:hi.jsinput,rules:[{required:!0,message:"请输入参赛人员电话"},{whitespace:!0,message:"电话不能为空"}],children:(0,he.jsx)(j.Z,{className:hi.baseFormItem,placeholder:"请输入参赛人员电话",showCount:!0,maxLength:60})}),(null==U||null===(z=U.need_apply_info)||void 0===z?void 0:z.need_apply_grade)&&(0,he.jsx)(f.Z.Item,{label:"年级",name:"grade",className:hi.jsinput,rules:[{required:!0,message:"请选择参赛人员年级"}],children:(0,he.jsx)(_.default,{placeholder:"请选择参赛人员年级",size:"large",children:(Me=(new Date).getFullYear(),Array(31).fill({}).map((function(e,n){return(0,he.jsx)(fi,{value:Me-n,children:(0,he.jsx)("span",{children:Me-n})},n)})))})}),(null==U||null===(O=U.need_apply_info)||void 0===O?void 0:O.need_apply_teacher_name)&&(0,he.jsx)(f.Z.Item,{label:"指导老师姓名",name:"teacher_name",className:hi.jsinput,rules:[{required:!0,message:"请输入指导老师姓名"},{whitespace:!0,message:"指导老师姓名不能为空"}],children:(0,he.jsx)(j.Z,{className:hi.baseFormItem,placeholder:"请输入指导老师姓名",showCount:!0,maxLength:60})}),(null==U||null===(Y=U.need_apply_info)||void 0===Y?void 0:Y.need_apply_school)&&(0,he.jsx)(f.Z.Item,{label:"学校/单位",name:"school",className:hi.jsinput,rules:[{required:!0,message:"请选择学校/单位"}],children:(0,he.jsx)(w.Z,{size:"large",showSearch:!0,onChange:Ce,children:Te.map((function(e,n){return(0,he.jsx)(fi,{value:e.name,children:e.name},n)}))})})]})})]})})),yi="bg___UYFEh",ji="Title___n7fIZ",bi="SrollStage___GnCkk",wi=t(70516),Zi=["competitions","globalSetting","loading","dispatch","user"],ki=(0,h.connect)((function(e){var n=e.competitions,t=e.loading,i=e.globalSetting,l=e.user;return{competitions:n,globalSetting:i,loading:t.effects,user:l}}))((function(e){var n,i,s,a,c=e.competitions,u=(e.globalSetting,e.loading),_=e.dispatch,f=(e.user,p()(e,Zi),c.is_manager,c.MemberWorks),v=c.competitionStage,g=c.Header,j=(0,h.useParams)().identifier,b=(0,m.useState)({page:1,per_page:20,competition_id:j,keyword:null}),w=d()(b,2),k=w[0],I=w[1],A=[{title:"选手名称",dataIndex:"user_name",ellipsis:!0,render:function(e){return e||"--"}},!(null!=g&&g.is_personal)&&{title:"战队名称",dataIndex:"team_name",ellipsis:!0,render:function(e){return(0,he.jsx)(y.Z,{placement:"topLeft",title:e,children:e||"--"})}},{title:"成绩",dataIndex:"evaluation_score",render:function(e){return e||"--"}},{title:"描述",width:222,dataIndex:"comment",render:function(e){return(0,he.jsx)(y.Z,{title:e,children:(0,he.jsx)("span",{children:e||"- -"})})}},{title:"提交时间",width:150,dataIndex:"commit_at",render:function(e){return e?re()(e).format("YYYY.MM.DD HH:mm:ss"):"--"}},{title:"提交状态",width:100,dataIndex:"evaluation_status",render:function(e){return"waiting"==e?(0,he.jsx)("span",{style:{color:"#00B187 "},children:"排队中"}):"progress"==e?(0,he.jsx)("span",{style:{color:"00B187"},children:"评测中"}):"cancelled"==e?(0,he.jsx)("span",{style:{color:"#E53333"},children:"已取消"}):"completed"==e?(0,he.jsx)("span",{style:{color:"#165DFF"},children:"已完成"}):"error"==e?(0,he.jsx)("span",{style:{color:"#ff4d4f"},children:"提交失败"}):"--"}},{title:"评测文件",dataIndex:"commit_id",ellipsis:!0,render:function(e,n){var t,i,l,s,o,a;return(0,he.jsx)(y.Z,{placement:"topLeft",title:null==n||null===(t=n.attachments)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.title,children:null!=n&&null!==(i=n.attachments)&&void 0!==i&&null!==(i=i[0])&&void 0!==i&&i.is_oss?(0,he.jsx)("a",{onClick:function(){var e;(0,me.Nd)("","".concat(null==n||null===(e=n.attachments)||void 0===e||null===(e=e[0])||void 0===e?void 0:e.url.replace("disposition=inline","")))},children:(null==n||null===(l=n.attachments)||void 0===l||null===(l=l[0])||void 0===l?void 0:l.title)||"--"}):(0,he.jsx)("a",{href:ue.Z.API_SERVER+(null==n||null===(s=n.attachments)||void 0===s||null===(s=s[0])||void 0===s?void 0:s.url),download:null==n||null===(o=n.attachments)||void 0===o||null===(o=o[0])||void 0===o?void 0:o.title,children:(null==n||null===(a=n.attachments)||void 0===a||null===(a=a[0])||void 0===a?void 0:a.title)||"--"})})}},{title:"操作",align:"right",width:200,dataIndex:"commit_id",render:function(e,n){return(0,he.jsxs)(he.Fragment,{children:[(0,he.jsx)(Z.ZP,{type:"link",disabled:"completed"!=(null==n?void 0:n.evaluation_status),style:{padding:0},onClick:function(){var e=x.Z.confirm({centered:!0,okText:"确定",icon:null,cancelText:"取消",title:"运行结果",content:(0,he.jsx)("div",{style:{maxHeight:500,overflow:"auto"},children:null==n?void 0:n.evaluation_info}),onOk:function(){return e.destroy()},onCancel:function(){return e.destroy()}})},children:"运行信息"}),(0,he.jsx)(Z.ZP,{className:"ml20",disabled:"progress"==(null==n?void 0:n.evaluation_status),type:"link",style:{padding:0},onClick:r()(o()().mark((function e(){var t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return _({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"正在重测,请稍后..."}}),e.next=3,(0,Ae.ZP)("/api/competitions/".concat(j,"/competition_commit_records/").concat(n.id,"/retest.json"),{method:"post",body:l()(l()({},k),{},{record_id:n.id})});case 3:t=e.sent,_({type:"globalSetting/setGlobalLoading",payload:{show:!1,text:""}}),0==t.status&&S();case 6:case"end":return e.stop()}}),e)}))),children:"重测"}),(0,he.jsx)(Z.ZP,{className:"ml20",type:"link",disabled:"waiting"!=(null==n?void 0:n.evaluation_status),style:{padding:0},danger:!0,onClick:function(){var e,t=x.Z.confirm({centered:!0,okText:"确定",icon:null,cancelText:"取消",title:"",content:(0,he.jsx)(he.Fragment,{children:"取消后,该成员提交的作品将不进行评测排队,请确认是否取消。"}),onOk:(e=r()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ae.ZP)("/api/competitions/".concat(j,"/competition_commit_records/").concat(n.id,"/cancel.json"),{method:"post",body:l()(l()({},k),{},{record_id:n.id})});case 2:0==e.sent.status&&S();case 4:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)}),onCancel:function(){return t.destroy()}})},children:"取消"})]})}}].filter((function(e){return!!e})),S=function(){var e=r()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:_({type:"competitions/getMemberWorks",payload:l()({identifier:j},k)});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,m.useEffect)((function(){I(l()(l()({},k),{},{section_id:null==v?void 0:v.id}))}),[]),(0,m.useEffect)((function(){S()}),[k]),(0,he.jsxs)("section",{className:yi,children:[(0,he.jsx)(le.Z,{align:"middle",className:ji,children:(0,he.jsx)(se.Z,{children:"选手作品"})}),(0,he.jsxs)(le.Z,{style:{margin:20},align:"middle",justify:"space-between",children:[(0,he.jsx)(le.Z,{className:bi,style:{flex:1,whiteSpace:"nowrap",flexWrap:"nowrap",overflowX:"auto"}}),(0,he.jsxs)(le.Z,{className:"ml20",align:"middle",children:[(0,he.jsx)(N.t7,{style:{width:260},placeholder:null!=g&&g.is_personal?"请输入选手名称":"请输入队伍名称",value:k.keyword,onChange:function(e){return I(l()(l()({},k),{},{keyword:e,page:1}))}}),(0,he.jsx)(N.op,{openLoading:!0,type:"default",size:"large",className:"ml20",onClick:r()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,wi.KM)(l()({identifier:j},k));case 2:case"end":return e.stop()}}),e)}))),children:"导出"}),(0,he.jsx)(N.op,{size:"large",type:"default",className:"ml20",onClick:function(){return S()},children:"更新"})]})]}),(0,he.jsxs)(hn.Z,{spinning:u["competitions/getMemberWorks"],children:[(0,he.jsx)(oe.Z,{className:"ml20 mr20",locale:{emptyText:(0,he.jsx)(xn.Z,{imgUrl:t(93314)})},pagination:!1,dataSource:(null==f||null===(n=f.data)||void 0===n?void 0:n.records)||[],columns:A}),(null==f||null===(i=f.data)||void 0===i?void 0:i.count)>0&&(0,he.jsxs)(le.Z,{className:"ml20 mr20 mt20 mb30",align:"middle",justify:"space-between",children:[(0,he.jsxs)(se.Z,{className:"font14",style:{color:"#333"},children:["共",(0,he.jsx)("span",{style:{color:"#165DFF"},children:(null==f||null===(s=f.data)||void 0===s?void 0:s.count)||0}),"条数据"]}),(0,he.jsx)(se.Z,{children:(0,he.jsx)(fn.Z,{showQuickJumper:!0,current:k.page,pageSize:k.per_page,onChange:function(e){return I(l()(l()({},k),{},{page:e}))},onShowSizeChange:function(e,n){return I(l()(l()({},k),{},{page:1,per_page:n}))},total:(null==f||null===(a=f.data)||void 0===a?void 0:a.count)||0})})]})]})]})})),Ni=t(64980),Ii=t(63490),Ai="bg___tjnCL",Si="title___kqIVC",Ci=t(19860),Fi=t(51932),Pi=t(45132),Ti=t(52560),Li={flex_box_center:"flex_box_center___PytGn",flex_space_between:"flex_space_between___lsol9",flex_box_vertical_center:"flex_box_vertical_center___fZ7Lr",flex_box_center_end:"flex_box_center_end___eItTF",flex_box_column:"flex_box_column____TIyk",title:"title___lY3pZ",export:"export___FJnGB",tabs:"tabs___lND2P",btn:"btn___TPnQ5",sticky:"sticky___JTo3M",publishRuleContent:"publishRuleContent___BCpFe",groupSelector:"groupSelector___xVPXf",addAndDelete:"addAndDelete___alHeZ",deleteIcon:"deleteIcon___PxYRF",addIcon:"addIcon___wwP2i"},Di=t(78091),Ei=t(57703),Ri=(0,h.connect)((function(e){var n=e.shixunHomeworks,t=e.classroomList,i=e.loading,l=e.user,s=e.boards;return{shixunHomeworks:n,globalSetting:e.globalSetting,classroomList:t,user:l,boards:s,loading:i.effects}}))((function(e){e.shixunHomeworks;var n,t,i,s,a=e.classroomList,c=(e.globalSetting,e.boards),u=(e.loading,e.user),p=e.Header,x=e.is_hidden,g=(e.isClick,e.dispatch),y=((0,h.useParams)(),(0,h.useLocation)(),f.Z.useForm()),w=d()(y,1)[0],k=(0,m.useState)({content:""}),N=d()(k,2),I=N[0],A=N[1],S=(0,m.useState)([{}]),C=d()(S,2),F=C[0],P=C[1],T=(u.userInfo,a.detailLeftMenus,a.detailCourseGroupsList),L=c.boardsDetail,D=c.boardsCategoryList,E=(0,m.useState)([]),R=d()(E,2),M=R[0],V=R[1],B=(0,m.useState)({unified_setting:!0,view_message_setting:D.allow_view_message?"0":"1"}),z=d()(B,2),O=z[0],Y=z[1];return(0,m.useEffect)((function(){g({type:"boards/getBoardsCategoryList",payload:{board_id:null==p?void 0:p.board_id}}).then((function(e){O.view_message_setting=null!=e&&e.allow_view_message?"0":"1"})),g({type:"classroomList/getCourseGroupsList",payload:{page:1,id:null==p?void 0:p.course_identifier,limit:1e3,nonenavigate:!0}})}),[null==p?void 0:p.board_id]),(0,m.useEffect)((function(){w.setFieldsValue({select_board_id:parseInt(null==p?void 0:p.board_id)})}),[a.detailLeftMenus]),(0,m.useEffect)((function(){null!=p&&p.message_id&&g({type:"boards/getBoardsDetail",payload:{boardId:null==p?void 0:p.message_id}}).then((function(e){var n;V(e),w.setFieldsValue({select_board_id:[null==e?void 0:e.board_id],subject:null==e?void 0:e.subject,attachment_ids:(0,Ci.z)(e.attachments),content:null==e?void 0:e.content,sticky:!(null==e||!e.sticky),publish_time:null!=e&&e.publish_time?re()(null==e?void 0:e.publish_time):null}),A({subject:null==e?void 0:e.subject,content:null==e?void 0:e.content}),e.unified_setting=e.unified_setting,e.view_message_setting=e.view_message_setting,Y(l()({},e)),F=(null==e||null===(n=e.group_settings)||void 0===n?void 0:n.map((function(e){return{group_id:e.group_id,publish_time:e.publish_time}})))||[{}],P(F.length>0?F:[{}])}))}),[null==p?void 0:p.message_id]),(0,m.useEffect)((function(){var e;null==T||null===(e=T.course_groups)||void 0===e||e.map((function(e){var n;null==M||null===(n=M.group_settings)||void 0===n||n.map((function(n,t){(null==n?void 0:n.group_id)===(null==e?void 0:e.id)&&(e.cilckkey=t,e.isselect=!0)}))}))}),[M]),(0,he.jsx)("section",{className:Li.bg,children:(0,he.jsx)("div",{children:(0,he.jsxs)(f.Z,{layout:"vertical",form:w,initialValues:{name:"",sticky:!1},scrollToFirstError:!0,onValuesChange:function(e){A(l()({},e))},onFinish:function(){var e=r()(o()().mark((function e(n){var t,i,s,a;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.attachment_ids=null===(t=n.attachment_ids)||void 0===t?void 0:t.map((function(e){return e.response.id})),n.view_message_setting=O.view_message_setting,n.is_hidden=x,n.competition_id=null==p?void 0:p.id,!(0,Tn.eB)()){e.next=13;break}if(n.unified_setting=O.unified_setting,n.view_message_setting="1",n.group_settings=F,O.unified_setting){e.next=13;break}if(F.length){e.next=12;break}return v.ZP.warning("提交失败:分班发布设置不能为空"),e.abrupt("return");case 12:F.map((function(e){if(!e.group_id)throw v.ZP.error("分班不能为空"),new String("分班不能为空");if(!e.publish_time)throw v.ZP.error("发布时间不能为空"),new String("发布时间不能为空")}));case 13:return n=l()({},n),i=p.message_id?"/api/messages/".concat(p.message_id,".json"):"/api/boards/".concat(null==p?void 0:p.board_id,"/messages.json"),e.next=17,(0,Ae.ZP)(i,{method:p.message_id?"put":"post",body:n});case 17:0===(s=e.sent).status&&((0,me.L9)(["教学课堂","讨论","发帖"]),v.ZP.success(p.message_id?"修改成功":"发布成功"),p.message_id||(g({type:"competitions/getHeader",payload:{identifier:null==p?void 0:p.identifier}}),(0,me.xg)("/classrooms/".concat(null==p?void 0:p.course_identifier,"/board/").concat(null==p?void 0:p.board_id,"/Detail/").concat(null==s||null===(a=s.data)||void 0===a?void 0:a.id))));case 19:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:[(0,he.jsxs)("aside",{className:"mt30 relative bg-white pl30 pr30 pt30 w100 inline-block",children:[(0,he.jsx)(f.Z.Item,{label:"",name:"sticky",valuePropName:"checked",className:Li.sticky,children:(0,he.jsx)(ie.Z,{children:"置顶"})}),(0,he.jsx)(f.Z.Item,{label:"标题",name:"subject",rules:[{required:!0,message:"请输入标题"}],children:(0,he.jsx)(j.Z,{suffix:"".concat((null===(n=I.subject)||void 0===n?void 0:n.length)||0,"/60"),maxLength:60})}),(0,he.jsx)(f.Z.Item,{label:"目录",name:"select_board_id",rules:[{required:!0,message:"请选择目录"}],children:(0,he.jsx)(_.default,{children:null==D||null===(t=D.boards)||void 0===t?void 0:t.map((function(e){return(0,he.jsx)(_.default.Option,{value:null==e?void 0:e.id,children:null==e?void 0:e.name})}))})}),(0,he.jsx)(f.Z.Item,{label:"内容",style:{position:"relative",zIndex:0},name:"content",rules:[{required:!0,message:"请输入内容"}],children:(0,he.jsx)(Dt.Z,{watch:!0,defaultValue:L.content||"",placeholder:"请在此输入帖子详情,最大限制为10000个字符"})}),(0,he.jsx)(f.Z.Item,{name:"attachment_ids",children:(0,he.jsx)(Ci.Z,{})}),(0,he.jsxs)("div",{children:[(0,he.jsxs)(b.ZP.Group,{onChange:function(){O.unified_setting=!O.unified_setting,Y(Object.assign({},O))},value:O.unified_setting,children:[(0,he.jsx)(b.ZP,{value:!0,children:"统一发布"}),(null==T||null===(i=T.course_groups)||void 0===i?void 0:i.length)>0&&(0,he.jsx)(b.ZP,{value:!1,children:"分班发布"})]}),(null==O?void 0:O.unified_setting)&&(0,he.jsx)(f.Z.Item,{style:{marginTop:16},rules:[{required:!0,message:"请选择发布时间"}],label:"发布时间",name:"publish_time",children:(0,he.jsx)(te.default,{showTime:{format:"HH:mm"},disabledDate:function(e){return e&&e0&&void 0!==arguments[0]?arguments[0]:s,i=arguments.length>1?arguments[1]:void 0,l=arguments.length>2?arguments[2]:void 0;return(null==t||null===(e=t[l])||void 0===e||null===(e=e.competition_time)||void 0===e?void 0:e.diff((null==t||null===(n=t[i])||void 0===n?void 0:n.competition_time)||0))||0},u=c(s,0,s.length-1),h=s.map((function(e,n){var t=c(s,n,n+1)/u*100,i=20;return n>(null==s?void 0:s.length)-4&&(i=32),l()(l()({},e),{},{isChu:t>i,DistanceValue:n===(null==s?void 0:s.length)-1?0:Math.round(t(null==t?void 0:t.competition_time)&&x>(null==h||null===(l=h[i+1])||void 0===l?void 0:l.competition_time)&&(e+=(null==t?void 0:t.DistanceValue)/n*100),i!==h.length-1&&x>(null==t?void 0:t.competition_time)&&x<(null==h||null===(o=h[i+1])||void 0===o?void 0:o.competition_time)&&(e+=(null==x?void 0:x.diff(null==t?void 0:t.competition_time))/c(s,i,i+1)*(null==t?void 0:t.DistanceValue)/n*100)})),x>h[h.length-1].competition_time?100:e},j=function(e,n){var t=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return(0,he.jsx)("div",{className:"".concat(qi," ").concat(n===h.length-1?Gi:Qi),style:{width:b(e,n,t)},children:(0,he.jsxs)(le.Z,{wrap:!1,align:"middle",gutter:5,justify:n===h.length-1?"end":"start",children:[(0,he.jsx)(se.Z,{children:(0,he.jsxs)(le.Z,{wrap:!1,align:"middle",children:[(0,he.jsx)(se.Z,{children:(0,he.jsx)("span",{className:"".concat(Ui," ").concat(t?Wi:""),children:n+1})}),(0,he.jsx)(se.Z,{children:(0,he.jsx)("div",{className:Ji})})]})}),(0,he.jsxs)(se.Z,{children:[(0,he.jsx)(y.Z,{title:null==e?void 0:e.name,placement:"topLeft",children:(0,he.jsx)("div",{className:"".concat(Ki," ").concat(t?Xi:""," multi_ellipsis1"),children:null==e?void 0:e.name})}),(0,he.jsx)(y.Z,{placement:"topLeft",title:null!=e&&e.competition_time?re()(null==e?void 0:e.competition_time).format((null==e?void 0:e.format)||"YYYY年MM月DD日 HH:mm"):"",children:(0,he.jsx)("div",{className:"".concat($i," ").concat(t?el:""," multi_ellipsis1"),children:null!=e&&e.competition_time?re()(null==e?void 0:e.competition_time).format((null==e?void 0:e.format)||"YYYY年MM月DD日 HH:mm"):""})})]})]})})},b=function(e,n){var t,i=h.reduce((function(e,n){return e+n.DistanceValue}),0),l=(null==e?void 0:e.DistanceValue)/i*r,s=(null==h||null===(t=h[n+1])||void 0===t?void 0:t.DistanceValue)/i*r,o=Math.round(l+s)-12;return n===h.length-1?Math.round(((null==h?void 0:h[n-1].DistanceValue)+(null==h?void 0:h[n-2].DistanceValue))/i*r/2-12):n===h.length-2?l-12:n===h.length-3?Math.round(((null==h?void 0:h[n].DistanceValue)+(null==h?void 0:h[n+1].DistanceValue))/i*r/2-12):o};return(0,m.useEffect)((function(){var e=setInterval((function(){v(re()())}),6e4);return function(){clearInterval(e)}}),[]),(0,he.jsxs)("div",l()(l()({ref:a,className:ll()(Bi,t)},o),{},{children:[(0,he.jsx)("div",{className:zi,children:(0,he.jsx)("div",{className:Oi,style:{width:g()>=100?"100%":"".concat(g(),"%")}})}),h.map((function(e,n){var t=x<(null==e?void 0:e.competition_time);return(0,he.jsxs)("div",{className:"".concat(Hi),style:{width:n===(null==h?void 0:h.length)-1?"auto":(null==e?void 0:e.DistanceValue)+(null==e?void 0:e.StyleUnit)},children:[(0,he.jsx)("div",{style:{height:45,position:"relative",width:"100%"},children:(n+1)%2!=0&&j(e,n,!t)}),(0,he.jsx)("div",{className:"".concat(nl," ").concat(t?"":tl)}),(0,he.jsx)("div",{style:{height:45,position:"relative",width:"100%"},children:(n+1)%2==0&&j(e,n,!t)})]})})),(0,he.jsx)("div",{className:zi,style:{zIndex:1,backgroundColor:"transparent"},children:(0,he.jsx)(y.Z,{title:x.format("当前时间:YYYY年MM月DD日 HH:mm"),children:(0,he.jsx)("div",{className:Yi,style:{left:g()>=100?"calc(100% - 12px)":"".concat(g(),"%")}})})})]}))},al=["competitions","globalSetting","loading","dispatch","user"],rl=_.default.Option,cl=(0,h.connect)((function(e){var n=e.competitions,t=e.loading,i=e.globalSetting,l=e.user;return{competitions:n,globalSetting:i,loading:t.models.competitions,user:l}}))((function(e){var n,t,i,s,a,c,u,I,A,S,C,F,P,T,L,D,E,R,M,V,B,z,O,Y,H,q,Q,G,U,W,J,K,X,$,ee,ne,te,ie,le,se,oe,ae,ue,pe,_e,fe,xe,ve,ge,ye,je,be,we,Ze,ke,Ne,Ie,Se,Ce,Fe,Pe,Te,Le,De,Ee,Re,Me,Ve=e.competitions,Be=(e.globalSetting,e.loading),ze=e.dispatch,Oe=e.user,Ye=(p()(e,al),(0,m.useState)({tabsIndex:"1"})),He=d()(Ye,2),qe=He[0],Qe=He[1],Ge=(0,h.useParams)(),Ue=Ge.identifier,We=(Ge.enter,Ve.Header),Je=Ve.Staff,Ke=Ve.GuidesData,Xe=(0,m.useState)(!1),$e=d()(Xe,2),en=$e[0],nn=$e[1],tn=(0,h.useSearchParams)(),ln=d()(tn,1)[0],sn=(0,m.useState)(!1),on=d()(sn,2),an=on[0],rn=on[1],cn=(0,m.useState)(!1),dn=d()(cn,2),un=dn[0],pn=dn[1],mn=(0,m.useState)(!1),hn=d()(mn,2),_n=hn[0],fn=hn[1],xn=f.Z.useForm(),vn=d()(xn,1)[0],gn=f.Z.useForm(),yn=d()(gn,1)[0],jn=(0,m.useState)(!1),bn=d()(jn,2),wn=bn[0],Zn=bn[1],kn=(0,m.useState)(!1),Nn=d()(kn,2),In=Nn[0],An=Nn[1],Sn=(0,m.useState)(),Cn=d()(Sn,2),Pn=Cn[0],Ln=Cn[1],Dn=(0,m.useState)(!1),En=d()(Dn,2),Rn=En[0],Mn=En[1],Vn=(0,m.useState)(!1),Bn=d()(Vn,2),zn=Bn[0],On=Bn[1],Yn=(0,m.useState)(!1),Hn=d()(Yn,2),qn=Hn[0],Qn=Hn[1],Gn=(0,m.useState)([]),Un=d()(Gn,2),Wn=Un[0],Jn=Un[1],Kn=(0,m.useState)([]),Xn=d()(Kn,2),$n=Xn[0],et=Xn[1],nt=(0,m.useState)(!1),tt=d()(nt,2),it=tt[0],lt=tt[1],st=(0,m.useRef)((0,oi.throttle)((function(e){return ut(e)}),1200,{leading:!0,trailing:!0})).current,ot=(0,m.useState)([]),at=d()(ot,2),rt=at[0],ct=at[1],dt=function(){var e=(new Date).getFullYear();return Array(31).fill({}).map((function(n,t){return(0,he.jsx)(rl,{value:e-t,children:(0,he.jsx)("span",{children:e-t})},t)}))};(0,m.useEffect)((function(){var e;ut(null==Oe||null===(e=Oe.userInfo)||void 0===e?void 0:e.school_name)}),[(null==We||null===(n=We.need_apply_info)||void 0===n?void 0:n.need_apply_name)||(null==We||null===(t=We.need_apply_info)||void 0===t?void 0:t.need_apply_student_id)||(null==We||null===(i=We.need_apply_info)||void 0===i?void 0:i.need_apply_sex)||(null==We||null===(s=We.need_apply_info)||void 0===s?void 0:s.need_apply_phone)||(null==We||null===(a=We.need_apply_info)||void 0===a?void 0:a.need_apply_grade)||(null==We||null===(c=We.need_apply_info)||void 0===c?void 0:c.need_apply_teacher_name)||(null==We||null===(u=We.need_apply_info)||void 0===u?void 0:u.need_apply_school)]);var ut=function(){var e=r()(o()().mark((function e(n){var t,i;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ze({type:"account/getSchoolOption",payload:{keyword:n,limit:10}});case 2:t=e.sent,et(null==t?void 0:t.schools),n&&""!=n&&ct(null==t||null===(i=t.schools)||void 0===i?void 0:i.filter((function(e){return e.name.includes(n)})));case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();(0,m.useEffect)((function(){if("4"===ln.get("type")){var e,n;if(!((0,Tn.eB)()||null!=We&&null!==(e=We.permission)&&void 0!==e&&e.editable))15===(null==Oe||null===(n=Oe.userInfo)||void 0===n?void 0:n.role)&&h.history.push("/competitions/detail/".concat(Ue,"?type=1"));Qe({tabsIndex:"4"}),nn(!0)}else if(ln.get("type")){var t,i,l;if("3"===ln.get("type"))null!=We&&We.personal&&((0,Tn.eB)()||null!=We&&null!==(t=We.permission)&&void 0!==t&&t.editable||null!=We&&We.team_member_present)||null==We||!We.personal||h.history.push("/competitions/detail/".concat(Ue,"?type=1"));if("5"===ln.get("type"))null!=We&&null!==(i=We.permission)&&void 0!==i&&i.editable&&3===(null==We?void 0:We.mode)||h.history.push("/competitions/detail/".concat(Ue,"?type=1"));if("6"===ln.get("type"))(0,Tn.eB)()||null!=We&&null!==(l=We.permission)&&void 0!==l&&l.editable||h.history.push(null==We||!We.memo_id||null!=We&&We.is_hidden?"/competitions/detail/".concat(Ue,"?type=1"):"/forums/".concat(null==We?void 0:We.memo_id));Qe({tabsIndex:ln.get("type")})}else Qe({tabsIndex:"1"});We.identifier&&(!ln.get("identifier")||null!=We&&We.team_member_present||null!=Je&&Je.enroll_ended||xt(1),!ln.get("code")||null!=We&&We.team_member_present||null!=Je&&Je.enroll_ended||function(){ft.apply(this,arguments)}(),ze({type:"globalSetting/setShareData",payload:{title:null==We?void 0:We.name,desc:null==We?void 0:We.description,imgUrl:"".concat(null==We?void 0:We.image,"?x-oss-process=image/resize,h_200,w_200,m_pad")}}))}),[ln.get("type"),We]);var pt=[{id:"1",name:"概览",content:(0,he.jsx)(Yt,{})},{id:"2",name:"排行榜",content:(0,he.jsx)(Wt,{})},(null==We?void 0:We.personal)&&((0,Tn.eB)()||(null==We||null===(I=We.permission)||void 0===I?void 0:I.editable)||(null==We?void 0:We.team_member_present))&&{id:"3",name:"参赛人员",content:(0,he.jsx)(gi,{})},!(null!=We&&We.personal)&&{id:"3",name:"战队",content:(0,he.jsx)(mi,{})},((0,Tn.eB)()||(null==We||null===(A=We.permission)||void 0===A?void 0:A.editable)||(null==We?void 0:We.message_id)&&!(null!=We&&We.is_hidden)||(null==We?void 0:We.memo_id)&&!(null!=We&&We.is_hidden))&&{id:"6",name:"讨论",content:(0,he.jsx)(Vi,{})},((0,Tn.eB)()||(null==We||null===(S=We.permission)||void 0===S?void 0:S.editable))&&{id:"4",name:"设置",content:(0,he.jsx)(yt,{enterDocument:en,changeKey:new Date})},(null==We||null===(C=We.permission)||void 0===C?void 0:C.editable)&&3===(null==We?void 0:We.mode)&&{id:"5",name:"选手作品",content:(0,he.jsx)(ki,{})}].filter((function(e){return!!e}));function mt(){return ht.apply(this,arguments)}function ht(){return(ht=r()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:ze({type:"competitions/getStaff",payload:{identifier:Ue}}),ze({type:"competitions/getHeader",payload:{identifier:Ue}}),ze({type:"competitions/getGuides",payload:{identifier:Ue}});case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _t(){var e,n,t,i,l,s;if(null!=Oe&&null!==(e=Oe.userInfo)&&void 0!==e&&e.is_teacher){if((null!=Je&&null!==(t=Je.all_staff)&&void 0!==t&&t.mutiple_limited||null!=Je&&null!==(i=Je.teacher_staff)&&void 0!==i&&i.mutiple_limited)&&null!=Je&&Je.enrolled)return v.ZP.info("你已经报名,不能重复报名"),!0}else if((null!=Je&&null!==(l=Je.all_staff)&&void 0!==l&&l.mutiple_limited||null!=Je&&null!==(s=Je.member_staff)&&void 0!==s&&s.mutiple_limited)&&null!=Je&&Je.enrolled)return v.ZP.info("你已经报名,不能重复报名"),!0;if(null!=Je&&Je.enroll_ended)return v.ZP.info("报名已截止,无需报名"),!0;if(null!=Je&&Je.all_staff)return!1;if(null!=Oe&&null!==(n=Oe.userInfo)&&void 0!==n&&n.is_teacher){if(!Je.teacher_staff)return v.ZP.info("已禁止老师报名"),!0}else if(null==Je||!Je.member_staff)return v.ZP.info("已禁止学生报名"),!0}(0,m.useEffect)((function(){window.location.href.split("enter=").length>1&&Qe({tabsIndex:"4"})}),[]),(0,m.useEffect)((function(){var e;16===(null==Oe||null===(e=Oe.userInfo)||void 0===e?void 0:e.role)&&ze({type:"user/showPopLogin",payload:{showPopLogin:!0,showClosable:!1}})}),[null==Oe?void 0:Oe.userInfo]),(0,m.useEffect)((function(){if("1"===Ve.actionTabs.key)Qe({tabsIndex:"4"});else if("2"===Ve.actionTabs.key){var e;if(We.teacher_need_phone||We.member_need_phone)return void Zn(!0);if(!(0,Fn.tJ)(ze))return;if(null!=We&&We.need_check_mail)return void x.Z.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",icon:null,content:"您暂未绑定邮箱,为了后续竞赛奖项颁发等相关事宜的正常且准确进行,请完成绑定再参加报名。",onOk:function(){window.open("/account/secure")}});if(null!=We&&We.is_authentication&&(null==Oe||null===(e=Oe.userInfo)||void 0===e||!e.authentication))return void ze({type:"shixunsDetail/setActionTabs",payload:{key:"Banner-Auth"}});rn(!0)}else if("3"===Ve.actionTabs.key){var n;if(null!=We&&We.need_check_mail)return void x.Z.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",icon:null,content:"您暂未绑定邮箱,为了后续竞赛奖项颁发等相关事宜的正常且准确进行,请完成绑定再参加报名。",onOk:function(){window.open("/account/secure")}});if(We.teacher_need_phone||We.member_need_phone)return void Zn(!0);if(!(0,Fn.tJ)(ze))return;if(null!=We&&We.is_authentication&&(null==Oe||null===(n=Oe.userInfo)||void 0===n||!n.authentication))return void ze({type:"shixunsDetail/setActionTabs",payload:{key:"Banner-Auth"}});pn(!0)}else"4"===Ve.actionTabs.key?Mn(!0):"6"===Ve.actionTabs.key?On(!0):(pn(!1),rn(!1))}),[Ve.actionTabs]),(0,m.useEffect)((function(){Ue&&mt()}),[Ue]);function ft(){return(ft=r()(o()().mark((function e(){var n,t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ae.ZP)("/api/competitions/".concat(Ue,"/check_open.json"),{method:"post"});case 2:if(0===e.sent.status){e.next=5;break}return e.abrupt("return");case 5:if((0,Fn.tJ)(ze)){e.next=7;break}return e.abrupt("return");case 7:if(!We.teacher_need_phone&&!We.member_need_phone){e.next=10;break}return Zn(!0),e.abrupt("return");case 10:if(null==We||!We.need_check_mail){e.next=13;break}return x.Z.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",icon:null,content:"您暂未绑定邮箱,为了后续竞赛奖项颁发等相关事宜的正常且准确进行,请完成绑定再参加报名。",onOk:function(){window.open("/account/secure")}}),e.abrupt("return");case 13:if(null==We||!We.is_authentication||null!=Oe&&null!==(n=Oe.userInfo)&&void 0!==n&&n.authentication){e.next=16;break}return ze({type:"shixunsDetail/setActionTabs",payload:{key:"Banner-Auth"}}),e.abrupt("return");case 16:if(!_t()){e.next=19;break}return fn(!1),e.abrupt("return");case 19:if(!_n){e.next=21;break}return e.abrupt("return");case 21:return fn(!0),e.next=24,ze({type:"competitions/JoinTeam",payload:{identifier:Ue,invite_code:ln.get("code")}});case 24:t=e.sent,fn(!1),t&&0===t.status&&(Ln(t),An(!0),mt(),ze({type:"competitions/setActionTabs",payload:{}}));case 27:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function xt(e){return vt.apply(this,arguments)}function vt(){return vt=r()(o()().mark((function e(n){var t,i,s,a,c,d,u,p,m;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Ae.ZP)("/api/competitions/".concat(Ue,"/check_open.json"),{method:"post"});case 2:if(0===e.sent.status){e.next=5;break}return e.abrupt("return");case 5:if((0,Fn.tJ)(ze)){e.next=7;break}return e.abrupt("return");case 7:if(null==We||!We.enroll_url){e.next=10;break}return window.open(null==We?void 0:We.enroll_url),e.abrupt("return");case 10:if(!(null!=We&&We.personal||1===n)){e.next=32;break}if(!We.teacher_need_phone&&!We.member_need_phone){e.next=14;break}return Zn(!0),e.abrupt("return");case 14:if(null==We||!We.need_check_mail){e.next=17;break}return x.Z.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",icon:null,content:"您暂未绑定邮箱,为了后续竞赛奖项颁发等相关事宜的正常且准确进行,请完成绑定再参加报名。",onOk:function(){window.open("/account/secure")}}),e.abrupt("return");case 17:if(null==We||!We.is_authentication||null!=Oe&&null!==(t=Oe.userInfo)&&void 0!==t&&t.authentication){e.next=20;break}return ze({type:"shixunsDetail/setActionTabs",payload:{key:"Banner-Auth"}}),e.abrupt("return");case 20:if(!_t()){e.next=23;break}return fn(!1),e.abrupt("return");case 23:if(!_n){e.next=25;break}return e.abrupt("return");case 25:if(m=function(){var e=r()(o()().mark((function e(){var n,t,i,s,a=arguments;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=a.length>0&&void 0!==a[0]?a[0]:{},i=null===(n=$n.find((function(e){return e.name===(null==t?void 0:t.school)})))||void 0===n?void 0:n.id,fn(!0),e.next=5,ze({type:"competitions/AddTeam",payload:l()(l()({},t),{},{identifier:Ue,name:Oe.userInfo.real_name+"的战队",school_id:i})});case 5:s=e.sent,fn(!1),s&&0===s.status&&(Ln(s),An(!0),mt(),ze({type:"competitions/setActionTabs",payload:{}}));case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),!(null!=We&&null!==(i=We.need_apply_info)&&void 0!==i&&i.need_apply_name||null!=We&&null!==(s=We.need_apply_info)&&void 0!==s&&s.need_apply_student_id||null!=We&&null!==(a=We.need_apply_info)&&void 0!==a&&a.need_apply_sex||null!=We&&null!==(c=We.need_apply_info)&&void 0!==c&&c.need_apply_phone||null!=We&&null!==(d=We.need_apply_info)&&void 0!==d&&d.need_apply_grade||null!=We&&null!==(u=We.need_apply_info)&&void 0!==u&&u.need_apply_teacher_name||null!=We&&null!==(p=We.need_apply_info)&&void 0!==p&&p.need_apply_school)){e.next=29;break}return lt(!0),e.abrupt("return");case 29:m(),e.next=33;break;case 32:Mn(!0);case 33:case"end":return e.stop()}}),e)}))),vt.apply(this,arguments)}return(0,he.jsxs)("section",{className:k.bg,children:[(0,he.jsxs)("div",{className:"edu-container",children:[(0,he.jsxs)("div",{className:k.top,children:[(0,he.jsxs)(g.Z,{separator:">",children:[(0,he.jsx)(g.Z.Item,{children:(0,he.jsx)(h.Link,{style:{fontSize:12},to:"/competitions",children:"在线竞赛"})}),(0,he.jsx)(g.Z.Item,{children:(0,he.jsx)("span",{style:{fontSize:12},children:null==We?void 0:We.name})})]}),(0,he.jsxs)("div",{className:k.content,children:[(0,he.jsx)("div",{style:{width:700,height:300,maxHeight:300,background:"#f1f1f1",flexShrink:0},children:(null==We?void 0:We.image)&&(0,he.jsx)("img",{className:k.Banner,src:"".concat(null==We?void 0:We.image)})}),(0,he.jsxs)("div",{className:k.right,children:[(0,he.jsxs)("div",{className:k.titles,children:[null==We?void 0:We.name,null!=We&&We.sub_title?"-"+We.sub_title:null]}),(0,he.jsxs)("div",{className:k.bonus,children:[(0,he.jsxs)("div",{children:[(0,he.jsx)("p",{children:null!=We&&We.bonus?(0,he.jsxs)("span",{className:"font20",children:["¥",parseInt(We&&We.bonus).toLocaleString()]}):(0,he.jsx)("span",{style:{fontSize:"20px",color:"#C5C5C5"},children:"暂无"})}),(0,he.jsxs)("div",{className:k.items,children:[(0,he.jsx)("i",{className:"iconfont icon-jiangjin"})," ",(0,he.jsx)("span",{children:"奖金"})]})]}),(0,he.jsxs)("div",{children:[(0,he.jsx)("p",{className:"font20",children:parseInt(We&&(null==We?void 0:We.visits_count)).toLocaleString()}),(0,he.jsxs)("div",{className:k.items,children:[(0,he.jsx)("i",{className:"iconfont icon-liulan1"}),(0,he.jsx)("span",{children:"浏览"})]})]}),(0,he.jsxs)("div",{children:[(0,he.jsx)("p",{className:"font20",children:parseInt(We&&(null==We?void 0:We.member_count)).toLocaleString()}),(0,he.jsxs)("div",{className:k.items,children:[(0,he.jsx)("i",{className:"iconfont icon-baoming"})," ",(0,he.jsx)("span",{children:"报名"})]})]})]}),(0,he.jsxs)("div",{className:k.bottom,children:[(0,he.jsxs)("div",{children:[(0,he.jsx)("span",{style:{color:"#9096A3"},children:"竞赛时间"}),(0,he.jsx)("span",{style:{marginLeft:20},children:null!=We&&We.start_time?(0,he.jsxs)("span",{children:[null==We?void 0:We.start_time,"~",null==We?void 0:We.end_time]}):(0,he.jsx)("span",{style:{color:"#3061D0",cursor:"pointer"},onClick:function(){Qe({tabsIndex:"4"}),ze({type:"competitions/setActionTabs",payload:{key:"7"}})},children:"去完善"})})]}),(0,he.jsxs)("div",{style:{margin:"14px 0px"},children:[(0,he.jsx)("span",{style:{color:"#9096A3"},children:"报名截止"}),(0,he.jsx)("span",{style:{marginLeft:20},children:null!=We&&We.enroll_end_time?(0,he.jsx)("span",{children:null==We?void 0:We.enroll_end_time}):(0,he.jsx)("span",{style:{color:"3061D0",cursor:"pointer"},onClick:function(){Qe({tabsIndex:"4"}),ze({type:"competitions/setActionTabs",payload:{key:"7"}})},children:"去完善"})})]}),(0,he.jsxs)("div",{children:[(0,he.jsx)("span",{style:{color:"#9096A3"},children:"竞赛状态"}),(0,he.jsx)("span",{style:{marginLeft:20},children:null===(F=[{name:"待审核",type:"preparing"},{name:"审核中",type:"review"},{name:"被驳回",type:"not_passed"},{name:"即将发布",type:"nearly_published"},{name:"进行中",type:"progressing"},{name:"已结束",type:"ended"},{name:"未发布",type:"unpublish"}].find((function(e){return e.type===(null==We?void 0:We.competition_status)})))||void 0===F?void 0:F.name})]}),["unpublish","preparing","review","not_passed"].includes(null==We?void 0:We.competition_status)&&(0,he.jsx)("span",{className:k.publish,onClick:function(){var e;(null==We?void 0:We.not_finish_count)>0?x.Z.confirm({icon:null,title:"",okText:"去完善",content:"检测到当前您还未完善竞赛指引的内容,请先完善指引清单,再发布审核竞赛",onOk:(e=r()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Qe({tabsIndex:"4"}),ze({type:"competitions/setActionTabs",payload:{key:"5"}});case 2:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})}):(Qn(!0),(0,de.GY)({}).then((function(e){Jn(null==e?void 0:e.schools)})).then((function(){var e,n,t;vn.setFieldsValue({sponsor_schools:null===(e=Oe.userInfo)||void 0===e?void 0:e.user_school_id,sponsor_user_name:null===(n=Oe.userInfo)||void 0===n?void 0:n.real_name,sponsor_user_phone:null===(t=Oe.userInfo)||void 0===t?void 0:t.phone})})))},children:"发布竞赛"}),"progressing"===(null==We?void 0:We.competition_status)&&!(null!=We&&We.team_member_present)&&!(null!=Je&&Je.enroll_ended)&&(0,he.jsx)("span",{className:k.publish,onClick:r()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:xt(2);case 1:case"end":return e.stop()}}),e)}))),children:2===(null==We?void 0:We.mode)&&null!=We&&We.member_of_course?"进入课堂":"立即报名"}),("progressing"===(null==We?void 0:We.competition_status)&&(null==We?void 0:We.team_member_present)||((0,Tn.Ny)()||(null==We?void 0:We.is_manager))&&"ended"!=(null==We?void 0:We.competition_status))&&(0,he.jsx)("span",{className:k.publish,onClick:function(){1===We.mode||3===We.mode?(Qe({tabsIndex:"1"}),ze({type:"competitions/setActionTabs",payload:{key:"entrance"}})):window.open(We.first_category_url)},children:1===We.mode||3===We.mode?"赛题入口":"进入考场"}),"ended"===(null==We?void 0:We.competition_status)&&(0,he.jsx)("span",{onClick:function(){(null!=We&&We.team_member_present||(0,Tn.Ny)()||null!=We&&We.is_manager)&&(1===We.mode||3===We.mode?(Qe({tabsIndex:"1"}),ze({type:"competitions/setActionTabs",payload:{key:"entrance"}})):window.open(We.first_category_url))},className:(null!=We&&We.team_member_present||(0,Tn.Ny)()||null!=We&&We.is_manager)&&1!==We.mode&&3!==We.mode?k.publish:k.ended,children:(null!=We&&We.team_member_present||(0,Tn.Ny)()||null!=We&&We.is_manager)&&1!==We.mode&&3!==We.mode?"进入考场":"已结束"}),"progressing"===(null==We?void 0:We.competition_status)&&(0,he.jsx)(li.CopyToClipboard,{text:"【竞赛邀请】".concat(null==Oe||null===(P=Oe.userInfo)||void 0===P?void 0:P.username,"邀请您参加头歌平台竞赛组织《").concat(null==We?void 0:We.name,"竞赛》,您可以点击下方的链接,报名该赛项。链接:").concat(window.location.origin).concat(window.location.pathname,"?identifier=").concat(null==We?void 0:We.identifier),onCopy:function(){return v.ZP.success("已复制链接,请直接粘贴发送好友")},children:(0,he.jsxs)("span",{className:"".concat(k.shareicon),children:[(0,he.jsx)("i",{style:{marginRight:6,fontSize:14},className:"iconfont icon-fenxiangketang"}),"分享"]})})]})]})]})]}),!(null!=Ke&&null!==(T=Ke.data)&&void 0!==T&&T.guides_is_hidden)&&(null==Ke||null===(L=Ke.data)||void 0===L||null===(L=L.list)||void 0===L?void 0:L.length)>0&&(0,he.jsx)(ol,{className:"mt20 mb20",LineData:null==Ke||null===(D=Ke.data)||void 0===D||null===(D=D.list)||void 0===D?void 0:D.map((function(e){return l()(l()({},e),{},{competition_time:null!=e&&e.competition_time?re()(null==e?void 0:e.competition_time):null})}))}),(0,he.jsx)(N.YG,{value:qe.tabsIndex,style:{marginBottom:25,paddingLeft:20,background:"#fff",height:64,position:"sticky",top:0,zIndex:1},onChange:function(e){var n,t;(qe.tabsIndex=e,Qe(l()({},qe)),"3"===e)&&((0,Tn.eB)()||null!==(n=We.permission)&&void 0!==n&&n.editable||null!=We&&We.team_member_present||null!=Je&&Je.enroll_ended||(We.personal?ze({type:"competitions/setActionTabs",payload:{key:"6"}}):ze({type:"competitions/setActionTabs",payload:{key:"4"}})));if(("4"==e&&nn(!1),"6"===e)&&!((0,Tn.eB)()||null!=We&&null!==(t=We.permission)&&void 0!==t&&t.editable))return null==We||!We.message_id||null!=We&&We.is_hidden?void h.history.push(null==We||!We.memo_id||null!=We&&We.is_hidden?"/competitions/detail/".concat(Ue,"?type=1"):"/forums/".concat(null==We?void 0:We.memo_id)):void(0,me.xg)("/classrooms/".concat(null==We?void 0:We.course_identifier,"/board/").concat(null==We?void 0:We.board_id,"/Detail/").concat(null==We?void 0:We.message_id));h.history.replace("/competitions/detail/".concat(Ue,"?type=").concat(e))},dataSource:pt}),("unpublish"===We.competition_status||"preparing"===We.competition_status||"review"===We.competition_status)&&(0,he.jsxs)("div",{className:k.tag,children:[(0,he.jsx)(ii.Z,{})," 提示:该竞赛还未审核,暂时只有管理员可见"]}),"not_passed"===We.competition_status&&(0,he.jsxs)("div",{className:k.tag,style:{color:"red",background:"rgba(229,51,51,0.1)"},children:[(0,he.jsx)(ii.Z,{})," 审核被驳回",(0,he.jsx)(y.Z,{placement:"bottom",title:null==We?void 0:We.not_passed_reason,children:(0,he.jsxs)("span",{style:{marginLeft:20},children:["驳回理由:",null==We?void 0:We.not_passed_reason]})})]}),null===(E=pt.find((function(e){return e.id===qe.tabsIndex})))||void 0===E?void 0:E.content]}),(0,he.jsx)(x.Z,{title:"加入战队",open:an,width:650,className:k.scoremodal,onOk:function(){vn.submit()},centered:!0,onCancel:function(){return rn(!1)},children:(0,he.jsx)("div",{children:(0,he.jsxs)(f.Z,{form:vn,initialValues:l()(l()({},Oe.userInfo),{},{sex:null==Oe||null===(R=Oe.userInfo)||void 0===R?void 0:R.gender,grade:null==Oe||null===(M=Oe.userInfo)||void 0===M?void 0:M.edu_entry_year,school:null==Oe||null===(V=Oe.userInfo)||void 0===V?void 0:V.school_name}),size:"large",labelCol:{span:5},onFinish:function(){var e=r()(o()().mark((function e(n){var t,i,s,a;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(fn(!0),!_t()){e.next=4;break}return fn(!1),e.abrupt("return");case 4:if((s=null===(t=$n.find((function(e){return e.name===(null==n?void 0:n.school)})))||void 0===t?void 0:t.id)||null==We||null===(i=We.need_apply_info)||void 0===i||!i.need_apply_school){e.next=8;break}return v.ZP.info("请选择正确的学校"),e.abrupt("return");case 8:return e.next=10,ze({type:"competitions/JoinTeam",payload:l()(l()({},n),{},{identifier:Ue,invite_code:n.name,school_id:s})});case 10:a=e.sent,fn(!1),0===a.status&&(An(!0),Ln(a),mt(),ze({type:"competitions/setActionTabs",payload:{}}));case 13:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:[((null==We||null===(B=We.need_apply_info)||void 0===B?void 0:B.need_apply_name)||(null==We||null===(z=We.need_apply_info)||void 0===z?void 0:z.need_apply_student_id)||(null==We||null===(O=We.need_apply_info)||void 0===O?void 0:O.need_apply_sex)||(null==We||null===(Y=We.need_apply_info)||void 0===Y?void 0:Y.need_apply_phone)||(null==We||null===(H=We.need_apply_info)||void 0===H?void 0:H.need_apply_grade)||(null==We||null===(q=We.need_apply_info)||void 0===q?void 0:q.need_apply_teacher_name)||(null==We||null===(Q=We.need_apply_info)||void 0===Q?void 0:Q.need_apply_school))&&(0,he.jsx)("div",{className:"mb20",children:"根据竞赛官方的规定,参赛人员需填写必填信息才可完成报名,请确保填写的信息准确完整。"}),(0,he.jsx)(f.Z.Item,{label:"邀请码",name:"name",rules:[{required:!0,validator:function(e,n){var t;return(null==n||null===(t=n.replaceAll(" ",""))||void 0===t?void 0:t.length)>0?Promise.resolve():Promise.reject("请填写竞赛名称")}}],children:(0,he.jsx)(j.Z,{maxLength:60,showCount:!0,placeholder:"请输入邀请码"})}),(null==We||null===(G=We.need_apply_info)||void 0===G?void 0:G.need_apply_sex)&&(0,he.jsx)(f.Z.Item,{label:"性别",name:"sex",rules:[{required:!0,message:"请选择参赛人员性别"}],children:(0,he.jsxs)(b.ZP.Group,{children:[(0,he.jsx)(b.ZP,{value:0,children:"男"}),(0,he.jsx)(b.ZP,{value:1,children:"女"})]})}),(null==We||null===(U=We.need_apply_info)||void 0===U?void 0:U.need_apply_student_id)&&(0,he.jsx)(f.Z.Item,{label:"学号",name:"student_id",rules:[{required:!0,message:"请输入参赛人员学号"},{whitespace:!0,message:"学号不能为空"}],children:(0,he.jsx)(j.Z,{placeholder:"请输入参赛人员学号",showCount:!0,maxLength:60})}),(null==We||null===(W=We.need_apply_info)||void 0===W?void 0:W.need_apply_phone)&&(0,he.jsx)(f.Z.Item,{label:"电话",name:"phone",rules:[{required:!0,message:"请输入参赛人员电话"},{whitespace:!0,message:"电话不能为空"}],children:(0,he.jsx)(j.Z,{placeholder:"请输入参赛人员电话",showCount:!0,maxLength:60})}),(null==We||null===(J=We.need_apply_info)||void 0===J?void 0:J.need_apply_grade)&&(0,he.jsx)(f.Z.Item,{label:"年级",name:"grade",rules:[{required:!0,message:"请选择参赛人员年级"}],children:(0,he.jsx)(_.default,{placeholder:"请选择参赛人员年级",size:"large",children:dt()})}),(null==We||null===(K=We.need_apply_info)||void 0===K?void 0:K.need_apply_teacher_name)&&(0,he.jsx)(f.Z.Item,{label:"指导老师姓名",name:"teacher_name",rules:[{required:!0,message:"请输入指导老师姓名"},{whitespace:!0,message:"指导老师姓名不能为空"}],children:(0,he.jsx)(j.Z,{placeholder:"请输入指导老师姓名",showCount:!0,maxLength:60})}),(null==We||null===(X=We.need_apply_info)||void 0===X?void 0:X.need_apply_school)&&(0,he.jsx)(f.Z.Item,{label:"学校/单位",name:"school",rules:[{required:!0,message:"请选择学校/单位"}],children:(0,he.jsx)(w.Z,{size:"large",showSearch:!0,onChange:st,children:rt.map((function(e,n){return(0,he.jsx)(rl,{value:e.name,children:e.name},n)}))})})]})})}),(0,he.jsxs)(x.Z,{title:!1,footer:!1,open:Rn,width:318,className:k.scoremodal,closable:!1,centered:!0,children:[(0,he.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,he.jsx)("div",{className:k.title,children:"报名"}),(0,he.jsx)("span",{onClick:function(){return Mn(!1)},style:{cursor:"pointer"},className:k.close,children:(0,he.jsx)("i",{className:"iconfont icon-danchuangguanbi",style:{fontSize:"14px"}})})]}),(0,he.jsx)("div",{className:k.content,children:"选择参赛方式"}),(0,he.jsxs)("div",{className:k.bottoms,children:[(0,he.jsx)(Z.ZP,{className:k.no,onClick:function(){ze({type:"competitions/setActionTabs",payload:{key:"2"}}),Mn(!1)},children:"加入战队"}),(0,he.jsx)(Z.ZP,{className:k.yes,onClick:function(){ze({type:"competitions/setActionTabs",payload:{key:"3"}}),Mn(!1)},children:"创建战队"})]})]}),(0,he.jsxs)(x.Z,{title:!1,footer:!1,open:zn,width:318,className:k.scoremodal,closable:!1,centered:!0,children:[(0,he.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,he.jsx)("div",{className:k.title,children:"报名"}),(0,he.jsx)("span",{onClick:function(){return On(!1)},style:{cursor:"pointer"},className:k.close,children:(0,he.jsx)("i",{className:"iconfont icon-danchuangguanbi"})})]}),(0,he.jsx)("div",{className:k.content,children:"您暂未报名,请先报名"}),(0,he.jsxs)("div",{className:k.bottoms,children:[(0,he.jsx)(Z.ZP,{className:k.no,onClick:function(){On(!1)},children:"取消"}),(0,he.jsx)(Z.ZP,{className:k.yes,loading:_n,onClick:r()(o()().mark((function e(){var n;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!_t()){e.next=3;break}return fn(!1),e.abrupt("return");case 3:if(!_n){e.next=5;break}return e.abrupt("return");case 5:return fn(!0),e.next=8,ze({type:"competitions/AddTeam",payload:{identifier:Ue}});case 8:n=e.sent,fn(!1),n&&0===n.status&&(Ln(n),An(!0),mt(),ze({type:"competitions/setActionTabs",payload:{}})),On(!1);case 12:case"end":return e.stop()}}),e)}))),children:"立即报名"})]})]}),(0,he.jsx)(x.Z,{title:"报名信息填写",open:it,width:650,className:k.scoremodal,onOk:function(){yn.submit()},centered:!0,onCancel:function(){return lt(!1)},children:(0,he.jsxs)(f.Z,{initialValues:l()(l()({},Oe.userInfo),{},{sex:null==Oe||null===($=Oe.userInfo)||void 0===$?void 0:$.gender,grade:null==Oe||null===(ee=Oe.userInfo)||void 0===ee?void 0:ee.edu_entry_year,school:null==Oe||null===(ne=Oe.userInfo)||void 0===ne?void 0:ne.school_name}),form:yn,colon:!1,labelCol:{span:5},size:"large",onFinish:function(){var e=r()(o()().mark((function e(n){var t,i,s,a;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((s=null===(t=$n.find((function(e){return e.name===(null==n?void 0:n.school)})))||void 0===t?void 0:t.id)||null==We||null===(i=We.need_apply_info)||void 0===i||!i.need_apply_school){e.next=4;break}return v.ZP.info("请选择正确的学校"),e.abrupt("return");case 4:return fn(!0),e.next=7,ze({type:"competitions/AddTeam",payload:l()(l()({},n),{},{identifier:Ue,name:Oe.userInfo.real_name+"的战队",school_id:s})});case 7:a=e.sent,fn(!1),a&&0===a.status&&(Ln(a),An(!0),mt(),ze({type:"competitions/setActionTabs",payload:{}})),lt(!1);case 11:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:[((null==We||null===(te=We.need_apply_info)||void 0===te?void 0:te.need_apply_name)||(null==We||null===(ie=We.need_apply_info)||void 0===ie?void 0:ie.need_apply_student_id)||(null==We||null===(le=We.need_apply_info)||void 0===le?void 0:le.need_apply_sex)||(null==We||null===(se=We.need_apply_info)||void 0===se?void 0:se.need_apply_phone)||(null==We||null===(oe=We.need_apply_info)||void 0===oe?void 0:oe.need_apply_grade)||(null==We||null===(ae=We.need_apply_info)||void 0===ae?void 0:ae.need_apply_teacher_name)||(null==We||null===(ue=We.need_apply_info)||void 0===ue?void 0:ue.need_apply_school))&&(0,he.jsx)("div",{className:"mb20",children:"根据竞赛官方的规定,参赛人员需填写必填信息才可完成报名,请确保填写的信息准确完整。"}),(null==We||null===(pe=We.need_apply_info)||void 0===pe?void 0:pe.need_apply_name)&&(0,he.jsx)(f.Z.Item,{label:"参赛人员姓名",name:"real_name",rules:[{required:!0,message:"请输入参赛人员姓名"},{whitespace:!0,message:"姓名不能为空"}],children:(0,he.jsx)(j.Z,{placeholder:"请输入参赛人员姓名",showCount:!0,maxLength:60})}),(null==We||null===(_e=We.need_apply_info)||void 0===_e?void 0:_e.need_apply_sex)&&(0,he.jsx)(f.Z.Item,{label:"性别",name:"sex",rules:[{required:!0,message:"请选择参赛人员性别"}],children:(0,he.jsxs)(b.ZP.Group,{children:[(0,he.jsx)(b.ZP,{value:0,children:"男"}),(0,he.jsx)(b.ZP,{value:1,children:"女"})]})}),(null==We||null===(fe=We.need_apply_info)||void 0===fe?void 0:fe.need_apply_student_id)&&(0,he.jsx)(f.Z.Item,{label:"学号",name:"student_id",rules:[{required:!0,message:"请输入参赛人员学号"},{whitespace:!0,message:"学号不能为空"}],children:(0,he.jsx)(j.Z,{placeholder:"请输入参赛人员学号",showCount:!0,maxLength:60})}),(null==We||null===(xe=We.need_apply_info)||void 0===xe?void 0:xe.need_apply_phone)&&(0,he.jsx)(f.Z.Item,{label:"电话",name:"phone",rules:[{required:!0,message:"请输入参赛人员电话"},{whitespace:!0,message:"电话不能为空"}],children:(0,he.jsx)(j.Z,{placeholder:"请输入参赛人员电话",showCount:!0,maxLength:60})}),(null==We||null===(ve=We.need_apply_info)||void 0===ve?void 0:ve.need_apply_grade)&&(0,he.jsx)(f.Z.Item,{label:"年级",name:"grade",rules:[{required:!0,message:"请选择参赛人员年级"}],children:(0,he.jsx)(_.default,{placeholder:"请选择参赛人员年级",size:"large",children:dt()})}),(null==We||null===(ge=We.need_apply_info)||void 0===ge?void 0:ge.need_apply_teacher_name)&&(0,he.jsx)(f.Z.Item,{label:"指导老师姓名",name:"teacher_name",rules:[{required:!0,message:"请输入指导老师姓名"},{whitespace:!0,message:"指导老师姓名不能为空"}],children:(0,he.jsx)(j.Z,{placeholder:"请输入指导老师姓名",showCount:!0,maxLength:60})}),(null==We||null===(ye=We.need_apply_info)||void 0===ye?void 0:ye.need_apply_school)&&(0,he.jsx)(f.Z.Item,{label:"学校/单位",name:"school",rules:[{required:!0,message:"请选择学校/单位"}],children:(0,he.jsx)(w.Z,{size:"large",showSearch:!0,onChange:st,children:rt.map((function(e,n){return(0,he.jsx)(rl,{value:e.name,children:e.name},n)}))})})]})}),(0,he.jsx)(x.Z,{title:"创建战队",open:un,width:650,className:k.scoremodal,onOk:function(){vn.submit()},centered:!0,onCancel:function(){return pn(!1)},children:(0,he.jsx)("div",{children:(0,he.jsxs)(f.Z,{form:vn,labelCol:{span:5},initialValues:l()(l()({},Oe.userInfo),{},{sex:null==Oe||null===(je=Oe.userInfo)||void 0===je?void 0:je.gender,grade:null==Oe||null===(be=Oe.userInfo)||void 0===be?void 0:be.edu_entry_year,school:null==Oe||null===(we=Oe.userInfo)||void 0===we?void 0:we.school_name}),size:"large",onFinish:function(){var e=r()(o()().mark((function e(n){var t,i,s,a;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(fn(!0),(s=null===(t=$n.find((function(e){return e.name===(null==n?void 0:n.school)})))||void 0===t?void 0:t.id)||null==We||null===(i=We.need_apply_info)||void 0===i||!i.need_apply_school){e.next=5;break}return v.ZP.info("请选择正确的学校"),e.abrupt("return");case 5:if(!_t()){e.next=8;break}return fn(!1),e.abrupt("return");case 8:return e.next=10,ze({type:"competitions/AddTeam",payload:l()(l()({},n),{},{identifier:Ue,name:n.name,school_id:s})});case 10:a=e.sent,fn(!1),a&&0===a.status&&(Ln(a),An(!0),mt(),ze({type:"competitions/setActionTabs",payload:{}}));case 13:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:[((null==We||null===(Ze=We.need_apply_info)||void 0===Ze?void 0:Ze.need_apply_name)||(null==We||null===(ke=We.need_apply_info)||void 0===ke?void 0:ke.need_apply_student_id)||(null==We||null===(Ne=We.need_apply_info)||void 0===Ne?void 0:Ne.need_apply_sex)||(null==We||null===(Ie=We.need_apply_info)||void 0===Ie?void 0:Ie.need_apply_phone)||(null==We||null===(Se=We.need_apply_info)||void 0===Se?void 0:Se.need_apply_grade)||(null==We||null===(Ce=We.need_apply_info)||void 0===Ce?void 0:Ce.need_apply_teacher_name)||(null==We||null===(Fe=We.need_apply_info)||void 0===Fe?void 0:Fe.need_apply_school))&&(0,he.jsx)("div",{className:"mb20",children:"根据竞赛官方的规定,参赛人员需填写必填信息才可完成报名,请确保填写的信息准确完整。"}),(0,he.jsx)(f.Z.Item,{label:"队伍名称",name:"name",rules:[{required:!0,validator:function(e,n){var t;return(null==n||null===(t=n.replaceAll(" ",""))||void 0===t?void 0:t.length)>0?Promise.resolve():Promise.reject("请填写队伍名称")}}],children:(0,he.jsx)(j.Z,{maxLength:60,showCount:!0,placeholder:"请输入队伍名称"})}),(null==We||null===(Pe=We.need_apply_info)||void 0===Pe?void 0:Pe.need_apply_name)&&(0,he.jsx)(f.Z.Item,{label:"参赛人员姓名",name:"real_name",rules:[{required:!0,message:"请输入参赛人员姓名"},{whitespace:!0,message:"姓名不能为空"}],children:(0,he.jsx)(j.Z,{placeholder:"请输入参赛人员姓名",showCount:!0,maxLength:60})}),(null==We||null===(Te=We.need_apply_info)||void 0===Te?void 0:Te.need_apply_sex)&&(0,he.jsx)(f.Z.Item,{label:"性别",name:"sex",rules:[{required:!0,message:"请选择参赛人员性别"}],children:(0,he.jsxs)(b.ZP.Group,{children:[(0,he.jsx)(b.ZP,{value:0,children:"男"}),(0,he.jsx)(b.ZP,{value:1,children:"女"})]})}),(null==We||null===(Le=We.need_apply_info)||void 0===Le?void 0:Le.need_apply_student_id)&&(0,he.jsx)(f.Z.Item,{label:"学号",name:"student_id",rules:[{required:!0,message:"请输入参赛人员学号"},{whitespace:!0,message:"学号不能为空"}],children:(0,he.jsx)(j.Z,{placeholder:"请输入参赛人员学号",showCount:!0,maxLength:60})}),(null==We||null===(De=We.need_apply_info)||void 0===De?void 0:De.need_apply_phone)&&(0,he.jsx)(f.Z.Item,{label:"电话",name:"phone",rules:[{required:!0,message:"请输入参赛人员电话"},{whitespace:!0,message:"电话不能为空"}],children:(0,he.jsx)(j.Z,{placeholder:"请输入参赛人员电话",showCount:!0,maxLength:60})}),(null==We||null===(Ee=We.need_apply_info)||void 0===Ee?void 0:Ee.need_apply_grade)&&(0,he.jsx)(f.Z.Item,{label:"年级",name:"grade",rules:[{required:!0,message:"请选择参赛人员年级"}],children:(0,he.jsx)(_.default,{placeholder:"请选择参赛人员年级",size:"large",children:dt()})}),(null==We||null===(Re=We.need_apply_info)||void 0===Re?void 0:Re.need_apply_teacher_name)&&(0,he.jsx)(f.Z.Item,{label:"指导老师姓名",name:"teacher_name",rules:[{required:!0,message:"请输入指导老师姓名"},{whitespace:!0,message:"指导老师姓名不能为空"}],children:(0,he.jsx)(j.Z,{placeholder:"请输入指导老师姓名",showCount:!0,maxLength:60})}),(null==We||null===(Me=We.need_apply_info)||void 0===Me?void 0:Me.need_apply_school)&&(0,he.jsx)(f.Z.Item,{label:"学校/单位",name:"school",rules:[{required:!0,message:"请选择学校/单位"}],children:(0,he.jsx)(w.Z,{size:"large",showSearch:!0,onChange:st,children:rt.map((function(e,n){return(0,he.jsx)(rl,{value:e.name,children:e.name},n)}))})})]})})}),(0,he.jsxs)(x.Z,{title:!1,footer:!1,open:qn,width:650,className:k.scoremodal,closable:!1,centered:!0,onCancel:function(){return Qn(!1)},children:[(0,he.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,he.jsx)("div",{className:k.title,children:"为了加快竞赛审核速度,请确认以下信息是否准确"}),(0,he.jsx)("span",{onClick:function(){return Qn(!1)},style:{cursor:"pointer"},className:k.close,children:(0,he.jsx)("i",{className:"iconfont icon-guanbi",style:{color:"#979797",fontSize:"15px"}})})]}),(0,he.jsx)("div",{className:k.content,children:(0,he.jsxs)(f.Z,{form:vn,className:k.formWrap,onFinish:function(e){(0,ce.qt)(l()(l()({},e),{},{id:Ue})).then((function(e){0==(null==e?void 0:e.status)?(v.ZP.success("发布审核成功,审核通过后,竞赛可上线启动"),Qn(!1),mt()):v.ZP.error(null==e?void 0:e.message)}))},labelCol:{flex:"110px"},children:[(0,he.jsx)(f.Z.Item,{className:k.form_item,label:"主办方",colon:!1,name:"sponsor_schools",children:(0,he.jsx)(_.default,{mode:"multiple",className:k.form_item_item_select,options:Wn,fieldNames:{label:"name",value:"id"},placeholder:"请输入主办方",filterOption:function(e,n){var t;return(null!==(t=null==n?void 0:n.name)&&void 0!==t?t:"").toLowerCase().includes(e.toLowerCase())}})}),(0,he.jsx)(f.Z.Item,{className:k.form_item,label:"主要负责人姓名",colon:!1,name:"sponsor_user_name",children:(0,he.jsx)(j.Z,{className:k.form_item_item,placeholder:"请输入主要负责人姓名"})}),(0,he.jsx)(f.Z.Item,{className:k.form_item,label:"主要负责人电话",colon:!1,name:"sponsor_user_phone",rules:[{pattern:new RegExp(/^((0\d{2,3}(-)?\d{7,8})|(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8})$/,"g"),message:"必须是正确的座机号或者手机号"}],children:(0,he.jsx)(j.Z,{className:k.form_item_item,placeholder:"请输入主要负责人电话"})}),(0,he.jsx)("div",{className:k.bottom,children:(0,he.jsxs)(f.Z.Item,{children:[(0,he.jsx)(Z.ZP,{size:"middle",className:k.no,onClick:function(){Qn(!1)},children:"取消"}),(0,he.jsx)(Z.ZP,{className:k.yes,size:"middle",type:"primary",htmlType:"submit",loading:Be,children:"保存"})]})})]})})]}),(0,he.jsx)(Ii.Z,{}),(0,he.jsx)(Ni.Z,{datas:Pn,Header:We,isopen:In,setisopen:An,isShowPhone:wn,setIsShowPhone:Zn,user:Oe,dispatch:ze,onOK:function(){mt()}})]})}))},87271:function(e,n,t){t.d(n,{$J:function(){return r},JZ:function(){return d},bN:function(){return m},jP:function(){return p},rO:function(){return c}});var i=t(7557),l=t.n(i),s=t(41498),o=t.n(s),a=t(10032);function r(e){return(0,a.U2)("libraries/".concat(e,".json"))}function c(){return(0,a.U2)("library_tags.json")}function d(e){return u.apply(this,arguments)}function u(){return(u=o()(l()().mark((function e(n){var t;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,a.IV)("attachments/".concat(n,".json"));case 2:return t=e.sent,e.abrupt("return",0===t.status);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function p(e){return(0,a.v_)("libraries.json",e)}function m(e,n){return(0,a.gz)("libraries/".concat(e,".json"),n)}},70516:function(e,n,t){t.d(n,{AD:function(){return P},D9:function(){return M},Hp:function(){return Z},IM:function(){return B},Iy:function(){return N},KM:function(){return J},MJ:function(){return k},Ne:function(){return V},ON:function(){return q},Uj:function(){return U},VY:function(){return Y},YO:function(){return G},YX:function(){return Q},Zn:function(){return f},_g:function(){return j},_k:function(){return E},c6:function(){return C},cr:function(){return x},eV:function(){return F},fi:function(){return v},gh:function(){return A},hS:function(){return z},iA:function(){return g},j6:function(){return b},je:function(){return D},jj:function(){return w},kS:function(){return H},o6:function(){return S},pO:function(){return W},rQ:function(){return T},sA:function(){return I},xm:function(){return R},xo:function(){return O},y8:function(){return L},yd:function(){return y}});var i=t(7557),l=t.n(i),s=t(82242),o=t.n(s),a=t(41498),r=t.n(a),c=t(85889),d=t(75102),u=t(11298),p=t(8591),m=t(22107),h=function(){(0,d.getDvaApp)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"正在生成文件,请稍后..."}})},_=function(){(0,d.getDvaApp)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!1,text:""}})},f=function(){var e=r()(l()().mark((function e(n){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return h(),e.next=3,(0,c.YR)(o()({},n));case 3:if(0!==e.sent.status){e.next=7;break}return e.next=7,(0,u.QH)("",(0,u.NY)({url:m.Z.API_SERVER+"/api/courses/".concat(n.coursesId,"/export_couser_info.json"),query:n}));case 7:_();case 8:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),x=function(){var e=r()(l()().mark((function e(n){var t;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,c.yS)(o()({},n));case 2:if(0!==(t=e.sent).status){e.next=8;break}p.ZP.info("导出任务生成成功"),d.history.push("/classrooms/".concat(n.coursesId,"/exportlist/course_member_act_score")),e.next=13;break;case 8:if(-2!==t.status){e.next=12;break}return e.abrupt("return",t);case 12:-3===t.status&&((0,d.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),d.history.push("/classrooms/".concat(n.coursesId,"/exportlist/course_member_act_score")));case 13:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),v=function(){var e=r()(l()().mark((function e(n){var t;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,c.W0)(o()({},n));case 2:if(0!==(t=e.sent).status){e.next=8;break}p.ZP.info("导出任务生成成功"),d.history.push("/classrooms/".concat(n.coursesId,"/exportlist/course_total_score")),e.next=13;break;case 8:if(-4!==t.status){e.next=12;break}return e.abrupt("return",t);case 12:-3===t.status&&((0,d.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),d.history.push("/classrooms/".concat(n.coursesId,"/exportlist/course_total_score")));case 13:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),g=function(){var e=r()(l()().mark((function e(n){var t;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,c.Nl)(o()({},n));case 2:if(0!==(t=e.sent).status){e.next=8;break}p.ZP.info("导出任务生成成功"),d.history.push("/classrooms/".concat(n.coursesId,"/exportlist/course_total_exercise_and_other")),e.next=13;break;case 8:if(-4!==t.status){e.next=12;break}return e.abrupt("return",t);case 12:-3===t.status&&((0,d.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),d.history.push("/classrooms/".concat(n.coursesId,"/exportlist/course_total_exercise_and_other")));case 13:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),y=function(){var e=r()(l()().mark((function e(n){var t;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,c.IU)(o()({},n));case 2:if(0!==(t=e.sent).status){e.next=8;break}p.ZP.info("导出任务生成成功"),d.history.push("/classrooms/".concat(n.coursesId,"/exportlist/export_star_user")),e.next=13;break;case 8:if(-4!==t.status){e.next=12;break}return e.abrupt("return",t);case 12:-3===t.status&&((0,d.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),d.history.push("/classrooms/".concat(n.coursesId,"/exportlist/export_star_user")));case 13:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),j=function(){var e=r()(l()().mark((function e(n){var t;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,c.td)(o()({},n));case 2:if(0!==(t=e.sent).status){e.next=8;break}p.ZP.info("导出任务生成成功"),d.history.push("/classrooms/".concat(n.coursesId,"/exportlist/course_total_exercise_and_other")),e.next=19;break;case 8:if(-2!==t.status){e.next=12;break}return e.abrupt("return",t);case 12:if(-3!==t.status){e.next=17;break}(0,d.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),d.history.push("/classrooms/".concat(n.coursesId,"/exportlist/course_total_exercise_and_other")),e.next=19;break;case 17:if(-4!==t.status){e.next=19;break}return e.abrupt("return",t);case 19:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),b=function(){var e=r()(l()().mark((function e(n){var t;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,c.QX)(o()({},n));case 2:if(0!==(t=e.sent).status){e.next=8;break}p.ZP.info("导出任务生成成功"),d.history.push("/classrooms/".concat(n.coursesId,"/exportlist/course_total_homework")),e.next=13;break;case 8:if(-4!==t.status){e.next=12;break}return e.abrupt("return",t);case 12:-3===t.status&&((0,d.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),d.history.push("/classrooms/".concat(n.coursesId,"/exportlist/course_total_homework")));case 13:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),w=function(){var e=r()(l()().mark((function e(n,t){var i;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,c.o_)(o()({},n));case 2:0===(i=e.sent).status?(p.ZP.info("导出任务生成成功!导出后文件保存时间为7天,请及时下载"),d.history.push("/classrooms/".concat(n.coursesId,"/exportlist/").concat(t))):-3===i.status&&((0,d.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),d.history.push("/classrooms/".concat(n.coursesId,"/exportlist/").concat(t)));case 4:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),Z=function(){var e=r()(l()().mark((function e(n,t){var i;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,c.ZL)(o()({},n));case 2:0===(i=e.sent).status?(p.ZP.info("导出任务生成成功!导出后文件保存时间为7天,请及时下载"),d.history.push("/classrooms/".concat(n.coursesId,"/exportlist/").concat(t))):-3===i.status&&((0,d.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),d.history.push("/classrooms/".concat(n.coursesId,"/exportlist/").concat(t)));case 4:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),k=function(){var e=r()(l()().mark((function e(n,t){var i;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,c.vV)(o()({},n));case 2:0===(i=e.sent).status?(p.ZP.info("导出任务生成成功!导出后文件保存时间为7天,请及时下载"),d.history.push("/classrooms/".concat(n.coursesId,"/exportlist/").concat(t))):-3===i.status&&((0,d.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),d.history.push("/classrooms/".concat(n.coursesId,"/exportlist/").concat(t)));case 4:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),N=function(){var e=r()(l()().mark((function e(n,t){var i;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,c.aP)(o()({},n));case 2:0===(i=e.sent).status?(p.ZP.info("导出任务生成成功"),d.history.push("/classrooms/".concat(n.coursesId,"/exportlist/").concat(t))):-3===i.status&&((0,d.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),d.history.push("/classrooms/".concat(n.coursesId,"/exportlist/").concat(t)));case 4:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),I=function(){var e=r()(l()().mark((function e(n){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return h(),e.next=3,(0,c.MJ)(o()({},n));case 3:if(0!==e.sent.status){e.next=7;break}return e.next=7,(0,u.FH)("",(0,u.NY)({url:m.Z.API_SERVER+"/api/polls/".concat(n.categoryId,"/commit_result.xlsx"),query:n}));case 7:_();case 8:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),A=function(){var e=r()(l()().mark((function e(n){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.FH)("",(0,u.NY)({url:m.Z.API_SERVER+"/api/courses/".concat(n.coursesId,"/attendances/export_xlsx_data.xlsx"),query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),S=function(){var e=r()(l()().mark((function e(n){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.FH)("",(0,u.NY)({url:m.Z.API_SERVER+"/api/courses/".concat(n.coursesId,"/video_study_statics.xlsx"),query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),C=function(){var e=r()(l()().mark((function e(n){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.FH)("",(0,u.NY)({url:m.Z.API_SERVER+"/api/courses/".concat(n.coursesId,"/export_video_study.xlsx"),query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),F=function(){var e=r()(l()().mark((function e(n){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.FH)("",(0,u.NY)({url:m.Z.API_SERVER+"/api/courses/".concat(n.coursesId,"/export_course_students_info.xlsx"),query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),P=function(){var e=r()(l()().mark((function e(n){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.FH)("",(0,u.NY)({url:m.Z.API_SERVER+"/api/school_manages/students.xlsx",query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),T=function(){var e=r()(l()().mark((function e(n){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.FH)("",(0,u.NY)({url:m.Z.API_SERVER+"/api/item_banks/export.xlsx",query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),L=function(){var e=r()(l()().mark((function e(n){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.FH)("",(0,u.NY)({url:m.Z.API_SERVER+"/api/competitions/region_reports.xlsx",query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),D=function(){var e=r()(l()().mark((function e(n){var t;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,c.Uy)(o()({},n));case 2:0===(t=e.sent).status?(p.ZP.info("导出任务生成成功"),d.history.push("/classrooms/".concat(n.coursesId,"/exportlist/exercise_score"))):-3===t.status&&((0,d.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),d.history.push("/classrooms/".concat(n.coursesId,"/exportlist/exercise_score")));case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),E=function(){var e=r()(l()().mark((function e(n){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("----------","调用下载"),e.next=3,(0,u.FH)("",(0,u.NY)({url:m.Z.API_SERVER+"/api/export_records/".concat(n.id,".xlsx"),query:n}));case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),R=function(){var e=r()(l()().mark((function e(n){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.FH)("",(0,u.NY)({url:m.Z.API_SERVER+"/api/ec_major_schools/0/ec_years.xlsx",query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),M=function(){var e=r()(l()().mark((function e(n){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.FH)("",(0,u.NY)({url:m.Z.API_SERVER+"/api/courses/".concat(null==n?void 0:n.coursesId,"/").concat(n.menuKey,"_statistic.xlsx?").concat(n.checkedList.map((function(e){return"course_group_id[]=".concat(e)})).join("&")),query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),V=function(){var e=r()(l()().mark((function e(n){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.FH)("",(0,u.NY)({url:m.Z.API_SERVER+"/api/ec_years/".concat(null==n?void 0:n.ec_year_id,"/ec_training_objectives.xlsx"),query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),B=function(){var e=r()(l()().mark((function e(n){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.FH)(null==n?void 0:n.name,(0,u.NY)({url:m.Z.API_SERVER+"/api/attachments/get_ecs_attachment.docx",query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),z=function(){var e=r()(l()().mark((function e(n){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.FH)("",(0,u.NY)({url:m.Z.API_SERVER+"/api/ec_years/".concat(null==n?void 0:n.ec_year_id,"/ec_courses.xlsx"),query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),O=function(){var e=r()(l()().mark((function e(n){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.FH)("",(0,u.NY)({url:m.Z.API_SERVER+"/api/ec_years/".concat(null==n?void 0:n.ec_year_id,"/ec_graduation_requirements.xlsx"),query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),Y=function(){var e=r()(l()().mark((function e(n){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.FH)("",(0,u.NY)({url:m.Z.API_SERVER+"/api/courses/rank_list.xlsx",query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),H=function(){var e=r()(l()().mark((function e(n){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.FH)("",(0,u.NY)({url:m.Z.API_SERVER+"/api/courses/question_rank_list.xlsx",query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),q=function(){var e=r()(l()().mark((function e(n){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.FH)("",(0,u.NY)({url:m.Z.API_SERVER+"/api/examination_banks/".concat(n.id,".json"),query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),Q=function(){var e=r()(l()().mark((function e(n){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.FH)("",(0,u.NY)({url:m.Z.API_SERVER+"/api/exercises/".concat(n.categoryId,".json"),query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),G=function(){var e=r()(l()().mark((function e(n){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.FH)("",(0,u.NY)({url:m.Z.API_SERVER+"/api/polls/".concat(null==n?void 0:n.id,"/commit_result.json"),query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),U=function(){var e=r()(l()().mark((function e(n){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.FH)("",(0,u.NY)({url:m.Z.API_SERVER+"/api/paths/get_task_pass.json",query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),W=function(){var e=r()(l()().mark((function e(n,t){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.FH)(t||"",(0,u.NY)({url:m.Z.API_SERVER+"/api/exercises/".concat(null==n?void 0:n.exercise_id,"/consult_exercise.json"),query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),J=function(){var e=r()(l()().mark((function e(n){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.FH)("",(0,u.NY)({url:m.Z.API_SERVER+"/api/competitions/".concat(null==n?void 0:n.identifier,"/competition_commit_records/member_works.xlsx"),query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}()},52560:function(e,n,t){t.d(n,{U:function(){return p}});var i=t(7557),l=t.n(i),s=t(82242),o=t.n(s),a=t(41498),r=t.n(a),c=t(79800),d=t.n(c),u=t(59301);function p(e,n){var t=(0,u.useState)(n),i=d()(t,2),s=i[0],a=i[1],c=(0,u.useState)(!1),p=d()(c,2),m=p[0],h=p[1],_=(0,u.useState)(),f=d()(_,2),x=f[0],v=f[1],g=function(){var t=r()(l()().mark((function t(i){var r,c,d,u=arguments;return l()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=u.length>1&&void 0!==u[1]&&u[1],c=r?n:o()(o()({},s),i),h(!0),a(c),t.next=6,e(c);case 6:return d=t.sent,h(!1),v(d),t.abrupt("return",d);case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return[s,m,g,x]}},47109:function(e,n){n.Z={wrap:"wrap___ilWvf",deleteIcon:"deleteIcon___JBDG8",keywordTag:"keywordTag___iieCb",questionTitleEditorWrap:"questionTitleEditorWrap___MHB5s",choiceListWrap:"choiceListWrap___jB8b1",choiceWrap:"choiceWrap___QFkTc",choiceIndex:"choiceIndex___Mr2YO",judgementIndex:"judgementIndex___fUVWK",setAnswerBtn:"setAnswerBtn___Whox5",activeAnswer:"activeAnswer___fGU6Y",activeJudgementAnswer:"activeJudgementAnswer___wJv8P",actionWrapper:"actionWrapper___ERQ7k",addIcon:"addIcon___L9TE0",inputBorder:"inputBorder___Q5tRE",placeholder:"placeholder___p9sFY",blankInputNumberWrapper:"blankInputNumberWrapper___uEHb0",addBtn:"addBtn___WR5ZI",blankIndex:"blankIndex___x9Pny",baseInputWrapper:"baseInputWrapper___eVsG7",collapseWrapper:"collapseWrapper___ZTysU",panelHeader:"panelHeader___QSN9g",open:"open___B6FU9",close:"close___QX19r",hide:"hide___mn25n"}}}]); \ No newline at end of file