You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/p__Graduations__Lists__Stud...

1 line
44 KiB

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[54492,12768],{13887:function(e,t,n){n.d(t,{Z:function(){return k}});n(17061),n(17156);var a=n(56690),s=n.n(a),i=n(89728),r=n.n(i),c=n(66115),l=n.n(c),o=n(61655),d=n.n(o),u=n(26389),h=n.n(u),p=n(38416),m=n.n(p),v=n(67294),f=n(11486),x="codeBox___WpkVl",_=n(94184),g=n.n(_),j=n(85893),w=function(e){d()(n,e);var t=h()(n);function n(e){var a;return s()(this,n),a=t.call(this,e),m()(l()(a),"canvas",void 0),m()(l()(a),"randomNum",(function(e,t){return Math.floor(Math.random()*(t-e)+e)})),m()(l()(a),"drawPic",(function(){a.randomCode()})),m()(l()(a),"reloadPic",(function(){a.drawPic()})),m()(l()(a),"changeCode",(function(e){console.log(e.target.value,222),a.setState({value:e.target.value,showError:!1})})),m()(l()(a),"onVerify",(function(){var e;return""!==a.state.value.toLowerCase()&&a.state.value.toLowerCase()!==a.state.code.toLowerCase()||""===a.state.value.toLowerCase()?e=!0:a.state.value.toLowerCase()===a.state.code.toLowerCase()&&(e=!1),a.setState({showError:e}),e})),a.canvas=v.createRef(),a.state={value:"",code:"",codeLength:4,fontSizeMin:20,fontSizeMax:22,backgroundColorMin:240,backgroundColorMax:250,colorMin:10,colorMax:20,lineColorMin:40,lineColorMax:180,contentWidth:96,contentHeight:38,showError:!1},a}return r()(n,[{key:"componentDidMount",value:function(){this.drawPic()}},{key:"randomColor",value:function(e,t){var n=this.randomNum(e,t),a=this.randomNum(e,t),s=this.randomNum(e,t);return"rgb(".concat(n,", ").concat(a,", ").concat(s,")")}},{key:"drawText",value:function(e,t,n){e.fillStyle=this.randomColor(this.state.colorMin,this.state.colorMax);var a=this.randomNum(this.state.fontSizeMin,this.state.fontSizeMax);e.font=a+"px SimHei";var s=(this.state.contentWidth-40)/(this.state.code.length-1),i=10;n>0&&(i=10+n*s);var r=this.randomNum(this.state.fontSizeMax,this.state.contentHeight-5);a>40&&(r=40);var c=this.randomNum(-10,10);e.translate(i,r),e.rotate(c*Math.PI/180),e.fillText(t,0,0),e.rotate(-c*Math.PI/180),e.translate(-i,-r)}},{key:"drawLine",value:function(e){for(var t=0;t<1;t++)e.strokeStyle=this.randomColor(this.state.lineColorMin,this.state.lineColorMax),e.beginPath(),e.moveTo(this.randomNum(0,this.state.contentWidth),this.randomNum(0,this.state.contentHeight)),e.lineTo(this.randomNum(0,this.state.contentWidth),this.randomNum(0,this.state.contentHeight)),e.stroke()}},{key:"drawDot",value:function(e){for(var t=0;t<100;t++)e.fillStyle=this.randomColor(0,255),e.beginPath(),e.arc(this.randomNum(0,this.state.contentWidth),this.randomNum(0,this.state.contentHeight),1,0,2*Math.PI),e.fill()}},{key:"randomCode",value:function(){for(var e=this,t="",n=0;n<this.state.codeLength;n++){t+="QWERTYUPLKJHGFDSAZXCVBNMqwertyupkjhgfdsazxcvbnm1234567890"[Math.floor(57*Math.random())]}this.setState({code:t},(function(){var t=e.canvas.current.getContext("2d");t.textBaseline="bottom",t.fillStyle=e.randomColor(e.state.backgroundColorMin,e.state.backgroundColorMax),t.fillRect(0,0,e.state.contentWidth,e.state.contentHeight);for(var n=0;n<e.state.code.length;n++)e.drawText(t,e.state.code[n],n);e.drawLine(t),e.drawDot(t)}))}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.width,a=void 0===n?300:n;return(0,j.jsxs)("div",{className:g()(x,t),style:{width:a},children:[(0,j.jsxs)("aside",{children:[(0,j.jsx)(f.Z,{value:this.state.value,onChange:this.changeCode,placeholder:"请输入图片中的验证码"}),this.state.showError&&(0,j.jsx)("div",{children:this.state.value?"请输入正确的验证码":"请输入验证码"})]}),(0,j.jsxs)("div",{children:[(0,j.jsx)("canvas",{onClick:this.reloadPic,ref:this.canvas,width:"100",height:"30"}),(0,j.jsx)("div",{className:"current",onClick:this.reloadPic,children:"看不清?换一张"})]})]})}}]),n}(v.Component),k=w},36579:function(e,t,n){n.d(t,{Z:function(){return k}});var a=n(42122),s=n.n(a),i=n(17061),r=n.n(i),c=n(17156),l=n.n(c),o=n(27424),d=n.n(o),u=n(67294),h={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},p=n(71577),m=n(77171),v=n(8691),f=n(83062),x=n(29427),_=n(51412),g=n(82982),j=n(59758),w=n(85893),k=function(e){var t,n,a,i,c,o,k,N=e.editOffice,y=void 0===N?"view":N,C=e.data,S=(e.theme,e.type),b=e.filename,Z=e.monacoEditor,P=e.className,E=e.style,M=e.close,T=e.onClose,L=e.hasMask,O=e.disabledDownload,z=e.onImgDimensions,I=e.showNodata,W=(0,u.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),R=d()(W,2),F=(R[0],R[1],(0,u.useState)("")),H=d()(F,2),B=(H[0],H[1]),A=(0,u.useState)(),D=d()(A,2),Y=D[0],V=D[1],q="build"===window.ENV?"/react/build":"",U=location.host.startsWith("localhost")?j.Z.PROXY_SERVER:j.Z.API_SERVER,G=(0,u.useRef)();null!==(t=C)&&void 0!==t&&t.startsWith("/api")&&"txt"!==S&&(C=j.Z.API_SERVER+C),b&&(Z.filename=b),(0,u.useEffect)((function(){var e,t,n=null===(e=document.cookie)||void 0===e||null===(t=e.replace(/\s/g,""))||void 0===t?void 0:t.split(";");null==n||n.map((function(e){var t=e.split("=");"_educoder_session"===t[0]&&B(t[1])}))}),[]),(0,u.useEffect)((function(){"office"===S&&J()}),[S,C]);var J=function(){var e=l()(r()().mark((function e(){var t,n,a;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=C,C.startsWith("http")||(t=location.origin+t),n=new URL(t).pathname.split("/").pop(),e.next=5,(0,_.gJ)({attachment_id:n});case 5:a=e.sent,V(a);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Q=function(){K()},K=function(){(0,x.Nd)(b||"educoder",decodeURIComponent(C))};return(0,w.jsxs)("div",{style:s()({},E||{}),className:"".concat(L&&h.bgBlack," ").concat(S?h.wrp:"hide"),children:[M&&(0,w.jsxs)("div",{className:h.close,ref:G,children:[!!z&&(0,w.jsx)(f.Z,{title:"点击对图片进行批注",getPopupContainer:function(){return G.current},children:(0,w.jsx)("span",{onClick:function(){T(),z()},children:(0,w.jsx)("i",{className:"icon-yulanpizhu"})})}),!O&&(0,w.jsx)(f.Z,{title:"点击下载此文件",getPopupContainer:function(){return G.current},children:(0,w.jsx)("span",{onClick:K,children:(0,w.jsx)("i",{className:"icon-quxiaozhiding"})})}),(0,w.jsx)(f.Z,{title:"关闭",getPopupContainer:function(){return G.current},children:(0,w.jsx)("span",{className:"",onClick:T,children:(0,w.jsx)("i",{className:"icon-guanbi1"})})})]}),(0,w.jsx)("div",{className:"".concat(h[P]," ").concat(P," ").concat(h.monaco," ").concat("txt"===S?"show":"hide"),children:"txt"===S&&(0,w.jsx)(v.ZP,s()({},Z))}),"audio"===S&&(0,w.jsx)("audio",{src:(null===(n=C)||void 0===n?void 0:n.indexOf("http"))>-1||null!==(a=C)&&void 0!==a&&a.startsWith("/api")?C:"data:image/png;base64,".concat(C),autoPlay:!0}),"video"===S&&(0,w.jsx)(w.Fragment,{children:(null===(i=C)||void 0===i?void 0:i.indexOf("http"))>-1||null!==(c=C)&&void 0!==c&&c.startsWith("/api")?(0,w.jsx)("video",{controls:!0,src:"".concat(C),autoPlay:!0}):(0,w.jsx)("video",{controls:!0,src:"data:video/mp4;base64,".concat(C),autoPlay:!0})}),"office"===S&&Y&&(0,w.jsx)("iframe",{src:"".concat(q,"/office.html?key=").concat(Y.key,"&url=").concat(U+Y.url,"&callbackUrl=").concat(U+Y.callbackUrl,"&fileType=").concat(Y.fileType,"&title=").concat(Y.title,"&model=").concat(y,"&officeServer=").concat(j.Z.ONLYOFFICE,"&disabledDownload=").concat(!!O)}),"html"===S&&(0,w.jsx)("iframe",{src:C+"&disposition=inline"}),"pdf"===S&&(0,w.jsx)("iframe",{src:"".concat(q,"/js/pdfview/index.html?url=").concat(C,"&disabledDownload=").concat(!!O)}),"image"===S&&(0,w.jsx)("img",{src:(null===(o=C)||void 0===o?void 0:o.indexOf("http"))>-1||null!==(k=C)&&void 0!==k&&k.startsWith("/api")?C:"data:image/png;base64,".concat(C)}),("other"===S||"download"===S)&&(0,w.jsx)(w.Fragment,{children:I?(0,w.jsx)(g.Z,{customText:"当前文件不支持预览,可点击下载查看",ButtonTwo:(0,w.jsx)(p.ZP,{icon:(0,w.jsx)("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:Q,children:"下载"})}):(0,w.jsxs)(p.ZP,{type:"primary",size:"middle",onClick:Q,children:[(0,w.jsx)(m.Z,{}),"点击下载"]})})]})}},12768:function(e,t,n){n.d(t,{Z:function(){return Y}});var a=n(42122),s=n.n(a),i=n(861),r=n.n(i),c=n(74704),l=n.n(c),o=n(27424),d=n.n(o),u=n(67294),h=(n(81897),n(47084)),p=n.n(h),m=n(90621);var v=[],f=["<ul>"],x=new(p().Renderer),_=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function g(){v.length=0,f=["<ul>"]}var j={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function w(e,t,n,a){if(t>=e.length||e[t].level<=n)return t;var s=e[t];a.push("<li><a href='#"+s.anchor+"'>"+s.text+"</a>");var i=[];return t=w(e,++t,s.level,i),i.length>0&&(a.push("<ul>"),i.forEach((function(e){a.push(e)})),a.push("</ul>")),a.push("</li>"),t=w(e,t,n,a)}function k(){return w(v,0,0,f),f.push("</ul>"),f.join("")}var N={heading:function(e){var t=_.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[1].length,text:t[2]}},fences:function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],a=function(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var a=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:d()(t,1)[0].length>=a.length?e.slice(a.length):e})).join("\n")}(n,t[3]||""),s=t[2]?t[2].trim():t[2];if(["latex","katex","math"].indexOf(s)>=0){var i=S(),r=a;a=i,b[i]={type:"block",expression:r}}return{type:"code",raw:n,lang:s,text:a}}}},y=/(?:\${2})([^\n`]+?)(?:\${2})/gi,C=0,S=function(){return"__special_katext_id_".concat(C++,"__")},b={};function Z(){return b}function P(){C=0,b={}}function E(e){return e=e.replace(y,(function(e,t){var n=S();return b[n]={type:"inline",expression:t},n}))}var M=x.listitem;x.listitem=function(e){return M(E(e))};var T=x.paragraph;x.paragraph=function(e){return T(E(e))};var L=x.tablecell;x.tablecell=function(e,t){return L(E(e),t)},x.code=function(e,t,n){var a=(t||"").match(/\S*/)[0];return a?["latex","katex","math"].indexOf(a)>=0?"<p class='editormd-tex'>".concat(e,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(t,'">').concat(n?e:(0,m.escape)(e,!0),"</code></pre>\n"):'<pre class="prettyprint linenums"><code>'+(n?e:(0,m.escape)(e,!0))+"</code></pre>"},x.heading=function(e,t,n){var a=this.options.headerPrefix+n.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return v.push({anchor:a,level:t,text:e}),"<h"+t+' id="'+a+'">'+e+"</h"+t+">"},p().setOptions({silent:!0,gfm:!0,pedantic:!1}),p().use({tokenizer:N,renderer:x});var O=p(),z=(n(11771),n(67631)),I=n.n(z),W=n(59758),R=n(20527),F=n(25934),H=n(36579),B=n(85893),A="@▁@",D=/<pre[^>]*>/g;var Y=function(e){var t=e.value,n=void 0===t?"":t,a=e.className,i=e.showTextOnly,c=e.showLines,o=e.style,h=void 0===o?{}:o,p=e.stylesPrev,m=void 0===p?{}:p,v=e.highlightKeywords,f=e.showProgramFill,x=(e.isProgramFill,e.disabledFill),_=void 0!==x&&x,w=e.programFillValue,N=e.onFillChange,y=void 0===N?function(e){}:N,C=e.onFillBlur,S=void 0===C?function(){}:C,b=String(n),E=(0,u.useState)(""),M=d()(E,2),T=M[0],L=M[1],z=(0,u.useState)("office"),Y=d()(z,2),V=Y[0],q=Y[1],U=(0,u.useState)([]),G=d()(U,2),J=G[0],Q=G[1],K=(0,u.useRef)("a"+(0,F.Z)()),X={},$=function(e){return e.replace(/<style.*?>([\s\S]+?)<\/style>/gim,(function(e,t){var n=t.replace(/(\n|\r)/g,"").split("}"),a=[];return n.map((function(e){""!=e&&a.push(".".concat(K.current," ").concat(e))})),"<style>".concat(a.join("}"),"</style>")}))},ee=(0,u.useMemo)((function(){try{b=b.replace(/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,"("+W.Z.API_SERVER+"/api/attachments/").replace(/\"\/api\/attachments\/|\"\/attachments\/download\//g,'"'+W.Z.API_SERVER+"/api/attachments/").replace(/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,'"'+W.Z.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,"\n")}catch(e){}if(f){var e=-1;return b=b.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,(function(t,n,a){return function(e,t){var n=document.createElement(e===A?"input":"textarea");n.style.width="100%",n.style.height=e===A?"40px":"151px",n.rows=5,n.spellcheck=!1,n.name="edu-program-fill",n.placeholder="请输入",n.dataset.id=t;var a=Object.keys(X).length;return X[a]=n,'<span class="edu-program-fill-wrap '.concat(e===A?"":"show",'" style="width:').concat(e===A?"200px":"100%",'"><span>').concat(n.outerHTML,'<span class="edu-program-fill-score"></span></span></span>')}(t,++e)})),'<pre style="background:#fff;padding:4px">'.concat($(b||""),"</pre>")}var t=O(b);t=$(t);var n=Z();b.match(/\[TOC\]/)&&(t=t.replace("<p>[TOC]</p>",k()),g()),t=t.replace(/(__special_katext_id_\d+__)/g,(function(e,t){var a=n[t],s=a.type,i=a.expression;return(0,R.renderToString)(function(e){var t=document.createElement("div");return t.innerHTML=e,0===t.childNodes.length?"":t.childNodes[0].nodeValue}(i)||"",{displayMode:"block"===s,throwOnError:!1,output:"html"})})),t=t.replace(/▁/g,"▁▁▁"),P();var a=document.createElement("div");return a.innerHTML=t,v?(ae(a,v.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),a.innerHTML):i?a.innerText:(setTimeout((function(){return re()}),500),a.innerHTML)}),[b,v]);(0,u.useEffect)((function(){se.current&&se.current.querySelectorAll(["input","textarea"]).forEach((function(e){e.oninput=te,e.onblur=ne}))}),[J]),(0,u.useEffect)((function(){if(null!=w&&w.length){var e,t=se.current.querySelectorAll(".edu-program-fill-score"),n=se.current.querySelectorAll('[name="edu-program-fill"]'),a=l()(n.entries());try{for(a.s();!(e=a.n()).done;){var s,i=d()(e.value,2),r=i[0],c=i[1];c.value=null===(s=w[r])||void 0===s?void 0:s.value,"warning"===w[r].type?c.className="program-fill-warning":"success"===w[r].type?c.className="program-fill-success":c.className=""}}catch(e){a.e(e)}finally{a.f()}var o,u=l()(t.entries());try{for(u.s();!(o=u.n()).done;){var h,p,m=d()(o.value,2),v=m[0];m[1].innerHTML=null!==(h=w[v])&&void 0!==h&&h.score?"".concat(null===(p=w[v])||void 0===p?void 0:p.score,"分"):""}}catch(e){u.e(e)}finally{u.f()}Q(w)}}),[w]);var te=function(e){J[e.target.dataset.id]=J[e.target.dataset.id]||{},J[e.target.dataset.id].value=e.target.value,Q(r()(J)),y(J,e.target.dataset.id)},ne=function(e){J[e.target.dataset.id]=J[e.target.dataset.id]||{},J[e.target.dataset.id].value=e.target.value,Q(r()(J)),S(J,e.target.dataset.id)};function ae(e,t){return e.childNodes.forEach((function(e){if(e.childNodes.length>0)ae(e,t);else if("IMG"!==e.nodeName)if(e.innerHTML){var n;e.innerHTML=null===(n=e.innerHTML)||void 0===n?void 0:n.replace(new RegExp(t,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>')}else{var a=document.createElement("span");a.innerHTML=e.textContent.replace(new RegExp(t,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),e.replaceWith(a)}}))}var se=(0,u.useRef)();function ie(e){var t=e.target;if("A"===t.tagName.toUpperCase()){var n=t.getAttribute("href");if(n.indexOf("office")>-1)e.preventDefault(),L(n),q("office");else if(n.indexOf("application/pdf")>-1)e.preventDefault(),L(n),q("pdf");else if(n.indexOf("text/html")>-1)e.preventDefault(),L(n),q("html");else if(n.startsWith("#")){e.preventDefault();var a=document.getElementById(n.replace("#",""));a&&a.scrollIntoView(!0)}}}j.WebkitLineClamp=c,c&&(h=s()(s()({},h),j));var re=function(){var e,t=null===(e=se.current)||void 0===e?void 0:e.querySelectorAll("video");null==t||t.forEach((function(e){if(e.oncontextmenu=function(){return!1},e.src.indexOf(".m3u8")>-1)if(e.canPlayType("application/vnd.apple.mpegurl"));else if(I().isSupported()){var t=new(I());t.loadSource(e.src),t.attachMedia(e)}}))};return(0,u.useEffect)((function(){if(se.current&&ee&&ee.match(D)&&window.PR.prettyPrint(),se.current)return se.current.addEventListener("click",ie),function(){var e;null===(e=se.current)||void 0===e||e.removeEventListener("click",ie),P(),g()}}),[ee,se.current,ie]),(0,B.jsxs)(B.Fragment,{children:[i&&(0,B.jsx)("div",{ref:se,children:ee}),!i&&(0,B.jsx)("div",{ref:se,style:s()({},h),className:"".concat(a||""," ").concat(_?"disabled-fill":""," markdown-body ").concat(K.current),dangerouslySetInnerHTML:{__html:ee}}),(0,B.jsx)(H.Z,{close:!0,data:T,type:null!=T&&T.length?V:"",style:s()({},m),onClose:function(){return L("")}})]})}},99885:function(e,t,n){n.r(t),n.d(t,{default:function(){return je}});var a=n(67294),s=n(88275),i=n(4310),r=n(42122),c=n.n(r),l=n(861),o=n.n(l),d=n(17061),u=n.n(d),h=n(17156),p=n.n(h),m=n(27424),v=n.n(m),f={flex_box_center:"flex_box_center___Oy3Ur",flex_space_between:"flex_space_between___tSEQI",flex_box_vertical_center:"flex_box_vertical_center___ub8YO",flex_box_center_end:"flex_box_center_end___MdOG3",flex_box_column:"flex_box_column___yn_xj",wrap:"wrap___j5lSK",teacherList:"teacherList___eiRwI",list:"list___xa00z",top:"top___Cgsez",tag:"tag___J4aum",name:"name___tDF5G",num:"num___pHt23",check:"check___kslxc",center:"center___FWR7i",img:"img___xWZT8",col:"col___Wszet",bottom:"bottom___ErSvm"},x=n(83062),_=n(14446),g=n(2453),j=n(76661),w=n(71230),k=n(57953),N=n(34435),y=n(96101),C=n(82749),S=n(25104),b=n(84519),Z=n(29427),P=n(59758),E=n(82982),M="wrap___Lk1KU",T="des___NrGnB",L="row____lS7x",O="list___PEHaz",z="actionBtns___eC3BF",I="state___PF2x0",W="tag0___HB3U8",R="tag1___YmXRD",F="tag2___l3QtF",H="tag3___dBINp",B=n(12768),A=n(7),D=n(85893),Y=function(e){var t,n=e.visible,i=e.data,r=void 0===i?{}:i,l=e.onSucceed,o=void 0===l?function(){}:l,d=e.onClose,h=void 0===d?function(){}:d,m=(0,s.useParams)(),f=(0,a.useState)(!0),x=v()(f,2),w=x[0],k=x[1],N=(0,a.useState)(1),y=v()(N,2),S=y[0],E=y[1],Y=(0,a.useState)(0),V=v()(Y,2),q=V[0],U=V[1],G=(0,a.useState)([]),J=v()(G,2),Q=J[0],K=J[1],X=(0,a.useState)({page:1,per_page:20}),$=v()(X,2),ee=$[0],te=$[1];(0,a.useEffect)((function(){n&&((0,A.tu)()?(ne(ee),E(r.tabs)):k(!1))}),[n]),console.log(r,"data");var ne=function(){var e=p()(u()().mark((function e(t){var n;return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return k(!0),e.next=3,(0,b.ZP)("/api/graduations/".concat(m.id,"/student_tasks/review_list.json"),{method:"get",params:c()(c()({},t),{},{task_id:r.id})});case 3:0===(n=e.sent).status&&(K((null==n?void 0:n.data)||[]),U(null==n?void 0:n.count)),k(!1);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ae=function(){var e=p()(u()().mark((function e(t,n){return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,b.ZP)("/api/graduations/".concat(m.id,"/").concat("通过"===n?"student_tasks":"student_tasks/not_pass",".json"),{method:"post",body:{id:t.id}});case 2:0===e.sent.status&&(g.ZP.success("操作成功"),ne(ee),o());case 4:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),se=[{title:"学生姓名",dataIndex:"name",ellipsis:!0,width:110,render:function(e,t){var n;return(0,D.jsx)("span",{children:null==t||null===(n=t.student)||void 0===n?void 0:n.name})}},{title:"学号",dataIndex:"student_id",ellipsis:!0,width:140,render:function(e,t){var n;return(0,D.jsx)("span",{children:(null==t||null===(n=t.student)||void 0===n?void 0:n.student_id)||"--"})}},{title:"专业",dataIndex:"major",ellipsis:!0,render:function(e,t){return(0,D.jsx)("span",{className:"c-grey-333",children:e})}},{title:"选题审核状态",dataIndex:"state",width:120,ellipsis:!0,render:function(e){return(0,D.jsxs)(D.Fragment,{children:[0===e&&(0,D.jsx)("div",{className:W,children:"待审核"}),1===e&&(0,D.jsx)("div",{className:R,children:"已通过"}),2===e&&(0,D.jsx)("div",{style:{color:"#E30000"},className:F,children:"已驳回"}),3===e&&(0,D.jsx)("div",{className:H,children:"已撤回"})]})}},{title:"申请时间",width:190,dataIndex:"time",render:function(e){return(0,D.jsx)("span",{style:{color:"#232B40"},children:e})}},{title:(0,D.jsx)("span",{children:"操作"}),dataIndex:"action",key:"action",align:"right",width:120,render:function(e,t){return(0,D.jsx)("span",{className:z,children:0===t.state?(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)("span",{onClick:function(){return ae(t,"通过")},children:"通过"}),(0,D.jsx)("span",{onClick:function(){return ae(t,"驳回")},className:"ml10",children:"驳回"})]}):(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)("b",{children:"通过"}),(0,D.jsx)("b",{className:"ml10",children:"驳回"})]})})}}];return(0,D.jsx)(_.Z,{centered:!0,destroyOnClose:!0,onCancel:h,open:n,footer:null,title:(0,A.tu)()?(0,D.jsx)(C.tp,{dataSource:[{id:1,name:"课题详情"},{id:2,name:"申请记录"}],value:S,onChange:function(e){return E(e)}}):"课题详情",width:1e3,afterClose:function(){te({page:1,per_page:20})},children:(0,D.jsxs)("div",{className:M,children:[1===S&&(0,D.jsxs)("div",{className:T,children:[(0,D.jsxs)("div",{className:L,style:{alignItems:"center"},children:[(0,D.jsx)("span",{children:"课题名称"}),(0,D.jsx)("span",{style:{maxWidth:(0,A.tu)()?"100%":"769px"},title:r.name,children:r.name||"--"}),(0,A.h)()&&(0,D.jsxs)("div",{className:I,children:[0===r.state&&(0,D.jsx)("div",{className:W,children:"待审核"}),1===r.state&&(0,D.jsx)("div",{className:R,children:"已通过"}),2===r.state&&(0,D.jsx)("div",{className:F,children:"已驳回"}),3===r.state&&(0,D.jsx)("div",{className:H,children:"已撤回"})]})]}),(0,D.jsxs)("div",{className:L,children:[(0,D.jsx)("span",{children:"指导老师"}),(0,D.jsx)("span",{title:r.teacher_names,children:r.teacher_names||"--"})]}),(0,D.jsxs)("div",{className:L,children:[(0,D.jsx)("span",{children:"课题适合专业"}),(0,D.jsx)("span",{title:r.major,children:r.major||"--"})]}),(0,D.jsxs)("div",{className:L,children:[(0,D.jsx)("span",{children:"课题来源"}),(0,D.jsx)("span",{title:r.source,children:r.source||"--"})]}),(0,D.jsxs)("div",{className:L,children:[(0,D.jsx)("span",{children:"课题学科方向"}),(0,D.jsx)("span",{title:r.direction,children:r.direction||"--"})]}),(0,D.jsxs)("div",{className:L,children:[(0,D.jsx)("span",{children:"课题介绍"}),(0,D.jsx)("span",{children:r.description?(0,D.jsx)(B.Z,{value:r.description}):"--"})]}),(0,D.jsx)("div",{className:O,children:null==r||null===(t=r.attachments)||void 0===t?void 0:t.map((function(e,t){return(0,D.jsx)("div",{onClick:function(){var t;(0,Z.Nd)("","".concat(P.Z.API_SERVER).concat(null==e||null===(t=e.url)||void 0===t?void 0:t.replace("disposition=inline","")))},children:e.title})}))})]}),2===S&&(0,D.jsx)(j.Z,{dataSource:Q,bordered:!1,rowKey:function(e){return e.id},columns:se,loading:w,scroll:{y:500},size:"large",onChange:function(e,t,n){ee.page=null==e?void 0:e.current,ee.per_page=null==e?void 0:e.pageSize,te(c()({},ee)),ne(ee)},pagination:{pageSize:ee.per_page,total:q,current:ee.page,showQuickJumper:!0,showSizeChanger:!0,hideOnSinglePage:!q,size:"default",pageSizeOptions:["10","20","50","100","200"],showTotal:Z.rU}}),(0,D.jsx)("div",{style:{height:"20px"}})]})})},V=n(43035),q=n(13887),U=(0,s.connect)((function(e){return{graduations:e.graduations}}))((function(e){var t,n=e.graduations,r=(e.dispatch,(0,s.useParams)()),l=(0,s.useSearchParams)(),d=v()(l,1)[0],h=(0,a.useState)(1),m=v()(h,2),M=m[0],T=m[1],L=(0,a.useState)(!1),O=v()(L,2),z=O[0],I=O[1],W=(0,a.useState)(0),R=v()(W,2),F=R[0],H=R[1],B=(0,a.useState)(0),A=v()(B,2),U=A[0],G=A[1],J=(0,a.useState)([]),Q=v()(J,2),K=Q[0],X=Q[1],$=(0,a.useState)([]),ee=v()($,2),te=ee[0],ne=ee[1],ae=(0,a.useState)({}),se=v()(ae,2),ie=se[0],re=se[1],ce=(0,a.useState)({}),le=v()(ce,2),oe=le[0],de=le[1],ue=(0,a.useState)(!0),he=v()(ue,2),pe=he[0],me=he[1],ve=(0,a.useState)(!1),fe=v()(ve,2),xe=fe[0],_e=fe[1],ge=n.menus,je=(0,a.useRef)(null),we=null!=d&&d.get("state")?Number(null==d?void 0:d.get("state")):"",ke=ge.find((function(e){return"student_selection"===e.clazz}))||{},Ne=ge.find((function(e){return"student_selection"===e.clazz}))||1,ye=(0,a.useState)({keyword:"",status:we,page:1,per_page:20}),Ce=v()(ye,2),Se=Ce[0],be=Ce[1];(0,a.useEffect)((function(){Ze(Se)}),[M]);var Ze=function(){var e=p()(u()().mark((function e(t){var n;return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return I(!0),e.next=3,(0,b.ZP)("/api/graduations/".concat(null==r?void 0:r.id,"/").concat(1===M?"graduation_tasks":"student_tasks/student_list",".json"),{method:"get",params:t});case 3:0===(n=e.sent).status&&(X((null==n?void 0:n.data)||[]),H(null==n?void 0:n.count),G((null==n?void 0:n.total_count)||0)),I(!1);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Pe=[{title:"学生姓名",dataIndex:"name",ellipsis:!0,width:100,render:function(e,t){return(0,D.jsx)(x.Z,{placement:"topLeft",title:e,children:(0,D.jsx)("span",{children:e||"--"})})}},{title:"学号",ellipsis:!0,width:100,dataIndex:"student_id",render:function(e){return(0,D.jsx)(x.Z,{placement:"topLeft",title:e,children:(0,D.jsx)("span",{children:e||"--"})})}},{title:"专业",dataIndex:"major",ellipsis:!0,width:110,render:function(e){return(0,D.jsx)(x.Z,{placement:"topLeft",title:e,children:(0,D.jsx)("span",{className:"c-grey-666",children:e||"--"})})}},{title:"课题名称",ellipsis:!0,dataIndex:"graduation_tasks",render:function(e){return(0,D.jsx)(x.Z,{placement:"topLeft",title:e,children:(0,D.jsx)("span",{children:e||"--"})})}},{title:"指导老师",dataIndex:"teacher",ellipsis:!0,width:110,render:function(e){return(0,D.jsx)(x.Z,{placement:"topLeft",title:e,children:(0,D.jsx)("span",{children:e||"--"})})}},{title:"双选状态",dataIndex:"status",width:90,render:function(e){return(0,D.jsxs)(D.Fragment,{children:[0===e&&(0,D.jsx)("div",{style:{color:"#E30000"},children:"未达成双选"}),1===e&&(0,D.jsx)("div",{children:"达成双选"})]})}},{title:"操作",dataIndex:"action",align:"right",width:90,render:function(e,t){return(0,D.jsx)("span",{onClick:p()(u()().mark((function e(){var n;return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return me(!0),_e(2),e.next=4,(0,b.ZP)("/api/graduations/".concat(null==r?void 0:r.id,"/graduation_tasks.json"),{method:"get",params:{per_page:1e3,status:0,page:1}});case 4:0===(n=e.sent).status&&(0===t.status?ne(null==n?void 0:n.data):ne([{id:t.task_id,name:t.graduation_tasks}].concat(o()(null==n?void 0:n.data)))),me(!1),de(c()(c()({},t),{},{save_task_id:t.task_id}));case 8:case"end":return e.stop()}}),e)}))),className:"current font14 c-light-primary",children:0===t.status?"分配课题":"变更课题"})}}],Ee=function(){var e=p()(u()().mark((function e(t,n){return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.stopPropagation(),_.Z.confirm({centered:!0,title:"提示",icon:null,content:"确认取消双选?取消双选后学生需要重新进行选题,且学生在原课题提交的文档将被清空且无法恢复。",okText:"确认",cancelText:"取消",onOk:function(){var e=p()(u()().mark((function e(){return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,b.ZP)("/api/graduations/".concat(r.id,"/student_tasks/").concat(n.ger_id,".json"),{method:"delete"});case 2:0===e.sent.status&&(g.ZP.success("操作成功"),Ze(Se));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()});case 2:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();return(0,D.jsxs)("div",{className:f.wrap,children:[(0,D.jsx)(S.Z,{style:{marginBottom:12},title:"学生选题",status:null==ke?void 0:ke.status,startAt:null==ke?void 0:ke.start_at,endAt:null==ke?void 0:ke.end_at}),(0,D.jsx)(C.YG,{value:M,tabBarExtraContent:(0,Z.QB)(null==ke?void 0:ke.next_start_at)&&(0,D.jsxs)(C.op,{onClick:function(){_e(3)},children:[(0,D.jsx)("i",{className:"iconfont icon-anquanshezhi font14 mr5"}),"学生选题设置"]}),dataSource:[{id:1,name:"选题列表"},{id:2,name:"学生列表"}],onChange:function(e){e!==M&&(Se.page=1,Se.keyword="",Se.status="",X([]),H(0),T(e))}}),!!U&&(0,D.jsxs)(w.Z,{align:"middle",justify:"space-between",style:{margin:"6px 0 14px 0"},children:[(0,D.jsx)(C.qp,{title:"双选状态",className:"mt20",value:Se.status,onChange:function(e){Se.status=e,Se.page=1,be(Se),Ze(Se)},dataSource:[{id:"",name:"全部"},{id:1,name:"达成双选"},{id:0,name:"未达成双选"}],titleWidth:56}),(0,D.jsx)(C.t7,{style:{width:329},placeholder:1===M?"请输入课题名称/指导老师进行搜索":"请输入课题名称/学生姓名/学号进行搜索",value:Se.keyword,onChange:function(e){Se.keyword=e,Se.page=1,be(Se),Ze(Se)}})]}),(0,D.jsx)(k.Z,{spinning:z,children:K.length?2===M?(0,D.jsx)(j.Z,{columns:Pe,dataSource:K,pagination:!1,className:"mb30",style:{minHeight:500}}):(0,D.jsx)("div",{className:f.teacherList,children:K.map((function(e){var t,n,a,s,i,r,l;return(0,D.jsxs)("div",{onClick:function(){re(c()(c()({},e),{},{tabs:1})),_e(1)},className:f.list,children:[(0,D.jsxs)("div",{className:f.top,children:[0===e.status&&(0,D.jsx)("div",{className:f.tag,children:"未达成双选"}),1===e.status&&(0,D.jsx)("div",{className:f.tag,style:{borderColor:"#D6F7EF",color:"#01795D"},children:"达成双选"}),(0,D.jsx)(x.Z,{title:e.name,children:(0,D.jsx)("div",{className:f.name,children:e.name})}),0===e.status&&!(null==e||!e.wait_review_count)&&(0,D.jsx)("div",{className:f.num,children:(null==e?void 0:e.wait_review_count)>99?"99+":null==e?void 0:e.wait_review_count}),(0,D.jsxs)("div",{className:f.check,onClick:function(t){t.stopPropagation(),re(c()(c()({},e),{},{tabs:2})),_e(1)},children:[(0,D.jsx)("i",{className:"iconfont icon-HISTORY font14 mr5"}),"查看选题申请"]})]}),1===e.status&&(0,D.jsxs)("div",{className:f.center,children:[(0,D.jsx)("img",{className:f.img,src:P.Z.IMG_SERVER+"/images/"+(null==e||null===(t=e.passed_student)||void 0===t?void 0:t.image_url)}),(0,D.jsxs)("div",{className:f.col,children:[(0,D.jsx)("div",{className:"c-black",title:null==e||null===(n=e.passed_student)||void 0===n?void 0:n.name,children:(0,Z.Pq)(null==e||null===(a=e.passed_student)||void 0===a?void 0:a.name,6)}),(0,D.jsx)("div",{className:"c-black",children:(null==e||null===(s=e.passed_student)||void 0===s?void 0:s.student_id)||"--"})]}),(0,D.jsxs)("div",{className:f.col,children:[(0,D.jsx)("div",{children:"专业"}),(0,D.jsx)("div",{style:{maxWidth:112},title:null==e||null===(i=e.passed_student)||void 0===i?void 0:i.major,className:"c-grey-666 multi-llipsis1e",children:(null==e||null===(r=e.passed_student)||void 0===r?void 0:r.major)||"--"})]}),(0,D.jsxs)("div",{className:f.col,children:[(0,D.jsx)("div",{children:"申请时间"}),(0,D.jsx)("div",{className:"c-black",children:(null==e||null===(l=e.passed_student)||void 0===l?void 0:l.passed_time)||"--"})]}),(0,D.jsxs)("div",{className:f.col,children:[(0,D.jsx)("div",{children:"选题审核状态"}),(0,D.jsx)("div",{className:"c-grey-333",children:null==e?void 0:e.state_name})]}),(0,D.jsx)(C.op,{onClick:function(t){return Ee(t,e)},style:{marginLeft:"auto"},children:"取消双选"})]}),(0,D.jsxs)("div",{className:f.bottom,children:[(0,D.jsxs)("div",{className:"mr30",children:[(0,D.jsx)("div",{children:"指导老师"}),(0,D.jsx)("div",{style:{maxWidth:70},title:null==e?void 0:e.teacher_names,children:(null==e?void 0:e.teacher_names)||"--"})]}),(0,D.jsxs)("div",{className:"mr30",children:[(0,D.jsx)("div",{children:"课题来源"}),(0,D.jsx)("div",{style:{maxWidth:100},title:null==e?void 0:e.source,children:(null==e?void 0:e.source)||"--"})]}),(0,D.jsxs)("div",{children:[(0,D.jsx)("div",{children:"学科方向"}),(0,D.jsx)("div",{style:{maxWidth:180},title:null==e?void 0:e.direction,children:(null==e?void 0:e.direction)||"--"})]})]})]},e.id)}))}):(0,D.jsx)(E.Z,{customText:!U&&(1===M?(0,D.jsxs)("span",{children:["暂无选题,请先完成",(0,D.jsx)(s.Link,{to:"/graduations/".concat(r.id,"/topics"),children:"课题录入"})]}):(0,D.jsxs)("span",{children:["暂无学生,点击去",(0,D.jsx)(s.Link,{to:"/graduations/".concat(r.id,"/students"),children:"邀请学生"}),"加入毕设"]}))})}),(0,D.jsx)(N.Z,{current:Se.page,showQuickJumper:!0,showSizeChanger:!0,hideOnSinglePage:!F,pageSize:Se.per_page,className:"mb30",pageSizeOptions:["10","20","50","100","200"],total:F,showTotal:Z.rU,onChange:function(e,t){Se.page=e,Se.per_page=t,be(Se),Ze(Se)}}),(0,D.jsx)(Y,{data:ie,visible:1===xe,onClose:function(){_e(!1)},onSucceed:function(){Ze(Se)}}),(0,D.jsx)(_.Z,{centered:!0,destroyOnClose:!0,onCancel:function(){return _e(!1)},open:2===xe,title:0===oe.status?"分配课题":"变更课题",width:520,afterClose:function(){de({})},onOk:function(){var e=function(){var e=p()(u()().mark((function e(){return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,b.ZP)("/api/graduations/".concat(r.id,"/student_tasks/give_task.json"),{method:"post",body:{task_id:oe.task_id,student_id:oe.id}});case 2:0===e.sent.status&&(g.ZP.success("操作成功"),Ze(Se),_e(!1));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();oe.task_id===oe.save_task_id||1!==oe.status?e():_.Z.confirm({centered:!0,okText:"确定",icon:null,cancelText:"取消",title:"变更课题",content:(0,D.jsxs)("div",{children:[(0,D.jsx)("p",{children:"该操作无法撤销。确认为该学生变更课题?变更后学生在原课题提交的文档将清空且无法恢复。"}),(0,D.jsx)("div",{children:"请输入验证码后确认变更"}),(0,D.jsx)(q.Z,{ref:function(e){return je.current=e}})]}),onOk:e})},children:(0,D.jsx)("div",{className:f.modal,children:(0,D.jsxs)(i.Z,{loading:pe,children:[(0,D.jsx)("div",{className:"mb10",children:"课题"}),(0,D.jsx)(y.Z,{showSearch:!0,size:"large",placeholder:"请选择课题",optionFilterProp:"children",value:oe.task_id,onChange:function(e){de(c()(c()({},oe),{},{task_id:e}))},style:{width:"100%"},children:te.map((function(e){return(0,D.jsx)(y.Z.Option,{value:e.id,children:e.name},e.id)}))})]})})}),(0,D.jsx)(V.Z,{visible:3===xe,data:c()(c()({},ke),{},{disabled_time:null==ge||null===(t=ge[Ne-1])||void 0===t?void 0:t.end_at}),onClose:function(){return _e(!1)},onSuccess:function(){_e(!1)}})]})})),G="wrap___Cl57w",J="tip___sGVnl",Q="listWrap___OYoyC",K="list___rT4Q_",X="left___b7Ykx",$="state___ZiQzs",ee="tag0___M6FYN",te="tag1___Sg8yD",ne="tag2___iT8lP",ae="tag3___jqhO2",se="name___BNDAZ",ie="info___pKNSG",re="time___jyND5",ce="right___XT6Gh",le="btn___vKu7W",oe="wrap___CkyzG",de="listWrap___d0chX",ue="list___S7Zml",he="top___FxvYM",pe="box___kpIeL",me="name___MGi0J",ve="des___VqXEd",fe="check___tTb0k",xe="bottom____2Rzh",_e=function(e){var t=e.visible,n=e.onSucceed,i=void 0===n?function(){}:n,r=e.onClose,l=void 0===r?function(){}:r,o=e.onListClick,d=(0,s.useParams)(),h=(0,a.useState)(!0),m=v()(h,2),f=m[0],j=m[1],w=(0,a.useState)(0),y=v()(w,2),S=y[0],P=y[1],M=(0,a.useState)([]),T=v()(M,2),L=T[0],O=T[1],z={keyword:"",page:1,per_page:20,status:0},I=(0,a.useState)(c()({},z)),W=v()(I,2),R=W[0],F=W[1];(0,a.useEffect)((function(){t&&H(R)}),[t]);var H=function(){var e=p()(u()().mark((function e(t){var n;return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return j(!0),e.next=3,(0,b.ZP)("/api/graduations/".concat(d.id,"/graduation_tasks.json"),{method:"get",params:t});case 3:0===(n=e.sent).status&&(O((null==n?void 0:n.data)||[]),P(null==n?void 0:n.count)),j(!1);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),A=function(){var e=p()(u()().mark((function e(t,n){return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.stopPropagation(),_.Z.confirm({centered:!0,title:"提示",icon:null,content:"确认加入该课题?",okText:"确认",cancelText:"取消",onOk:function(){var e=p()(u()().mark((function e(){return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,b.ZP)("/api/graduations/".concat(d.id,"/student_tasks/").concat(n,".json"),{method:"put"});case 2:0===e.sent.status&&(g.ZP.success("申请成功"),i());case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()});case 2:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();return(0,D.jsx)(_.Z,{centered:!0,destroyOnClose:!0,onCancel:l,open:t,footer:null,title:"学生选题",width:1e3,afterClose:function(){F(c()({},z))},children:(0,D.jsxs)("div",{className:oe,children:[(0,D.jsx)(C.t7,{style:{width:329},placeholder:"请输入课题名称/指导老师进行搜索",value:R.keyword,onChange:function(e){R.keyword=e,R.page=1,F(R),H(R)},className:"mb20"}),(0,D.jsx)("div",{className:de,children:(0,D.jsx)(k.Z,{spinning:f,children:L.length?L.map((function(e){return(0,D.jsxs)("div",{onClick:function(){o(e)},className:ue,children:[(0,D.jsxs)("div",{className:he,children:[(0,D.jsxs)("div",{className:pe,children:[(0,D.jsx)(x.Z,{title:e.name,children:(0,D.jsx)("div",{className:me,children:e.name})}),(0,D.jsx)("div",{className:ve,children:(0,D.jsx)(B.Z,{showTextOnly:!0,showLines:2,value:e.description||""})})]}),(0,D.jsx)("div",{className:fe,children:(0,D.jsx)(C.op,{onClick:function(t){return A(t,e.id)},children:"申请该课题"})})]}),(0,D.jsxs)("div",{className:xe,children:[(0,D.jsxs)("div",{className:"mr30",children:[(0,D.jsx)("div",{children:"指导老师"}),(0,D.jsx)("div",{title:null==e?void 0:e.teacher_names,style:{maxWidth:70},children:(null==e?void 0:e.teacher_names)||"--"})]}),(0,D.jsxs)("div",{className:"mr30",children:[(0,D.jsx)("div",{children:"课题来源"}),(0,D.jsx)("div",{title:null==e?void 0:e.source,style:{maxWidth:100},children:(null==e?void 0:e.source)||"--"})]}),(0,D.jsxs)("div",{className:"mr30",children:[(0,D.jsx)("div",{children:"学科方向"}),(0,D.jsx)("div",{title:null==e?void 0:e.direction,style:{maxWidth:180},children:(null==e?void 0:e.direction)||"--"})]}),(0,D.jsxs)("div",{children:[(0,D.jsx)("div",{children:"适用专业"}),(0,D.jsx)("div",{title:null==e?void 0:e.major,style:{maxWidth:140},children:(null==e?void 0:e.major)||"--"})]})]})]},e.id)})):(0,D.jsx)(E.Z,{loading:f})})}),(0,D.jsx)(N.Z,{current:R.page,hideOnSinglePage:!S,showQuickJumper:!0,className:"mb20",showSizeChanger:!0,pageSize:R.per_page,pageSizeOptions:["10","20","50","100","200"],total:S,showTotal:Z.rU,onChange:function(e,t){R.page=e,R.per_page=t,F(R),H(R)}})]})})},ge=(0,s.connect)((function(e){return{graduations:e.graduations}}))((function(e){var t=e.graduations,n=(e.dispatch,(0,s.useParams)()),i=(0,s.useSearchParams)(),r=v()(i,1)[0],l=(0,a.useState)(!1),o=v()(l,2),d=o[0],h=o[1],m=(0,a.useState)(0),f=v()(m,2),j=f[0],y=f[1],P=(0,a.useState)(0),M=v()(P,2),T=M[0],L=M[1],O=(0,a.useState)([]),z=v()(O,2),I=z[0],W=z[1],R=(0,a.useState)({}),F=v()(R,2),H=F[0],B=F[1],A=(0,a.useState)(!1),V=v()(A,2),q=V[0],U=V[1],oe=(0,a.useState)(!1),de=v()(oe,2),ue=de[0],he=de[1],pe=null!=r&&r.get("state")?Number(null==r?void 0:r.get("state")):"",me=(0,a.useState)({keyword:"",state:pe,page:1,per_page:20}),ve=v()(me,2),fe=ve[0],xe=ve[1],ge=t.menus.find((function(e){return"student_selection"===e.clazz}))||{};(0,a.useEffect)((function(){je(fe)}),[]);var je=function(){var e=p()(u()().mark((function e(t){var a;return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return h(!0),e.next=3,(0,b.ZP)("/api/graduations/".concat(null==n?void 0:n.id,"/student_tasks/checked_list.json"),{method:"get",params:t});case 3:0===(a=e.sent).status&&(W((null==a?void 0:a.data)||[]),y(null==a?void 0:a.count),L(null==a?void 0:a.total_count)),h(!1);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),we=function(){var e=p()(u()().mark((function e(t,a){return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.stopPropagation(),_.Z.confirm({centered:!0,title:"提示",icon:null,content:0===a.state?"确认撤回该课题申请?":"确认取消双选?取消后需要重新进行选题",okText:"确认",cancelText:"取消",onOk:function(){var e=p()(u()().mark((function e(){return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,b.ZP)("/api/graduations/".concat(n.id,"/student_tasks/").concat(a.id,".json"),{method:"delete"});case 2:0===e.sent.status&&(g.ZP.success("操作成功"),je(fe));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()});case 2:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),ke=!!I.length;return(0,D.jsxs)("div",{className:G,children:[2===(null==ge?void 0:ge.status)&&(0,D.jsxs)("div",{className:J,children:[(0,D.jsx)("i",{style:{paddingTop:2},className:"iconfont icon-weixiada font12 mr5"}),(0,D.jsx)("span",{children:"选题阶段已结束,若要变更课题需联系管理员手动进行变更"})]}),(0,D.jsx)(S.Z,{style:{marginBottom:12},title:"学生选题",status:null==ge?void 0:ge.status,startAt:null==ge?void 0:ge.start_at,endAt:null==ge?void 0:ge.end_at}),!!T&&(0,D.jsxs)(w.Z,{align:"middle",justify:"space-between",children:[(0,D.jsx)(C.qp,{title:"审核状态",className:"mt20",value:fe.state,onChange:function(e){fe.state=e,fe.page=1,xe(fe),je(fe)},dataSource:[{id:"",name:"全部"},{id:0,name:"待审核"},{id:1,name:"已通过"},{id:2,name:"已驳回"},{id:3,name:"已撤回"}],titleWidth:56}),2!==(null==ge?void 0:ge.status)&&(0,D.jsx)(C.op,{onClick:function(){return he(!0)},children:"点击选题"})]}),(0,D.jsx)(k.Z,{spinning:d,children:ke?(0,D.jsx)("div",{className:Q,children:I.map((function(e){return(0,D.jsxs)("div",{onClick:function(){U(!0),B(c()({},e))},className:K,children:[(0,D.jsxs)("div",{className:X,children:[(0,D.jsxs)("div",{className:$,children:[0===e.state&&(0,D.jsx)("div",{className:ee,children:"待审核"}),1===e.state&&(0,D.jsx)("div",{className:te,children:"已通过"}),2===e.state&&(0,D.jsx)("div",{className:ne,children:"已驳回"}),3===e.state&&(0,D.jsx)("div",{className:ae,children:"已撤回"}),(0,D.jsx)(x.Z,{title:e.name,children:(0,D.jsx)("div",{className:se,children:e.name})})]}),(0,D.jsxs)("div",{className:ie,children:[(0,D.jsxs)("span",{children:["指导老师",(0,D.jsx)("span",{title:e.teacher_names,children:(0,Z.Pq)(e.teacher_names,9)})]}),(0,D.jsxs)("span",{children:["课题来源",(0,D.jsx)("span",{title:e.source,children:(0,Z.Pq)(e.source,9)})]}),(0,D.jsxs)("span",{children:["学科方向",(0,D.jsx)("span",{title:e.direction,children:(0,Z.Pq)(e.direction,9)})]})]}),(0,D.jsxs)("div",{className:re,children:["申请时间  ",e.time]})]}),[0,1].includes(null==ge?void 0:ge.status)&&(0,D.jsxs)("div",{className:ce,children:[0===e.state&&(0,D.jsx)("div",{onClick:function(t){return we(t,e)},className:le,children:"撤回申请"}),1===e.state&&(0,D.jsx)("div",{onClick:function(t){return we(t,e)},className:le,children:"取消双选"})]})]},e.id)}))}):(0,D.jsx)(E.Z,{loading:d,ButtonTwo:2!==(null==ge?void 0:ge.status)&&!T&&(0,D.jsx)(C.op,{onClick:function(){return he(!0)},children:"点击选题"})})}),(0,D.jsx)(N.Z,{current:fe.page,hideOnSinglePage:!j,showSizeChanger:!0,showQuickJumper:!0,className:"mb20",pageSizeOptions:["10","20","50","100","200"],total:j,pageSize:fe.per_page,showTotal:Z.rU,onChange:function(e,t){fe.page=e,fe.per_page=t,xe(fe),je(fe)}}),(0,D.jsx)(_e,{onClose:function(){return he(!1)},visible:ue,onListClick:function(e){B(c()({},e)),U(!0)},onSucceed:function(){je(fe),he(!1)}}),(0,D.jsx)(Y,{data:H,visible:q,onClose:function(){return U(!1)},onSucceed:function(){}})]})})),je=(0,s.connect)((function(e){return{loading:e.loading,graduations:e.graduations}}))((function(e){e.graduations,e.dispatch;var t=e.loading;return(0,D.jsx)(i.Z,{style:{margin:"20px 0 0 45px"},loading:t.effects["graduations/getGraduationsDetails"],children:(0,A.tu)()?(0,D.jsx)(U,{}):(0,D.jsx)(ge,{})})}))},25104:function(e,t,n){n.d(t,{Z:function(){return u}});n(67294);var a="title___Ynb7w",s="time___dxFRB",i=n(94184),r=n.n(i),c=n(67617),l=n(27484),o=n.n(l),d=n(85893),u=function(e){var t=e.className,n=e.status,i=e.style,l=void 0===i?{}:i,u=e.startAt,h=e.endAt,p=e.title;return(0,d.jsxs)("div",{className:r()(a,t),style:l,children:[(0,d.jsx)("b",{children:p}),(0,d.jsx)(c.Z,{className:"ml10",status:n}),(0,d.jsxs)("span",{className:s,children:[(0,d.jsxs)("span",{children:["开启时间",(0,d.jsx)("span",{className:"ml10",children:u?o()(u).format("YYYY-MM-DD HH:mm"):"--"})]}),(0,d.jsxs)("span",{className:"ml30",children:["截止时间",(0,d.jsx)("span",{className:"ml10",children:h?o()(h).format("YYYY-MM-DD HH:mm"):"--"})]})]})]})}},67617:function(e,t,n){n.d(t,{Z:function(){return l}});var a=n(67294),s="tag___NEywM",i=n(94184),r=n.n(i),c=n(85893),l=function(e){var t=e.className,n=e.status;return(0,c.jsxs)(a.Fragment,{children:[0===n&&(0,c.jsx)("div",{className:r()(s,t),children:"未开始"}),1===n&&(0,c.jsx)("div",{className:r()(s,t),style:{background:"#19CB70"},children:"进行中"}),2===n&&(0,c.jsx)("div",{className:r()(s,t),style:{background:"#EE5D5D"},children:"已结束"})]})}}}]);