|
|
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[12884,64474],{130:function(e,n,t){t.d(n,{Z:function(){return l}});var r=t(5891),a=t(59301),s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M688 264c0-4.4-3.6-8-8-8H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48zm-8 136H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM480 544H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zm-48 308H208V148h560v344c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h264c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm356.8-74.4c29-26.3 47.2-64.3 47.2-106.6 0-79.5-64.5-144-144-144s-144 64.5-144 144c0 42.3 18.2 80.3 47.2 106.6-57 32.5-96.2 92.7-99.2 162.1-.2 4.5 3.5 8.3 8 8.3h48.1c4.2 0 7.7-3.3 8-7.6C564 871.2 621.7 816 692 816s128 55.2 131.9 124.4c.2 4.2 3.7 7.6 8 7.6H880c4.6 0 8.2-3.8 8-8.3-2.9-69.5-42.2-129.6-99.2-162.1zM692 591c44.2 0 80 35.8 80 80s-35.8 80-80 80-80-35.8-80-80 35.8-80 80-80z"}}]},name:"solution",theme:"outlined"},i=t(22589),o=function(e,n){return a.createElement(i.Z,(0,r.Z)({},e,{ref:n,icon:s}))};var l=a.forwardRef(o)},83385:function(e,n,t){t.d(n,{Z:function(){return b}});var r=t(82242),a=t.n(r),s=t(7557),i=t.n(s),o=t(41498),l=t.n(o),c=t(79800),d=t.n(c),u=t(59301),p={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},m=t(3113),h=t(38827),f=t(71138),x=t(6848),v=t(23756),g=t(37924),j=t(72721),_=t(97730),y=t(37712),b=function(e){var n,t,r,s,o,c,b,k=e.editOffice,w=void 0===k?"view":k,Z=e.data,S=(e.theme,e.type),N=e.filename,O=e.monacoEditor,C=e.className,T=e.style,I=e.close,E=e.onClose,P=e.hasMask,H=e.disabledDownload,A=e.onImgDimensions,R=e.showNodata,L=(0,u.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),W=d()(L,2),F=(W[0],W[1],(0,u.useState)("")),M=d()(F,2),z=(M[0],M[1]),B=(0,u.useState)(),V=d()(B,2),$=V[0],D=V[1],J="build"===window.ENV?"/react/build":"",X=location.host.startsWith("localhost")?_.Z.PROXY_SERVER:_.Z.API_SERVER,G=(0,u.useRef)();null!==(n=Z)&&void 0!==n&&n.startsWith("/api")&&"txt"!==S&&(Z=_.Z.API_SERVER+Z),N&&(O.filename=N),(0,u.useEffect)((function(){var e,n=null===(e=document.cookie)||void 0===e||null===(e=e.replace(/\s/g,""))||void 0===e?void 0:e.split(";");null==n||n.map((function(e){var n=e.split("=");"_educoder_session"===n[0]&&z(n[1])}))}),[]),(0,u.useEffect)((function(){"office"===S&&U()}),[S,Z]);var U=function(){var e=l()(i()().mark((function e(){var n,t,r;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Z,Z.startsWith("http")||(n=location.origin+n),t=new URL(n).pathname.split("/").pop(),e.next=5,(0,g.gJ)({attachment_id:t});case 5:r=e.sent,D(r);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),q=function(){Z.startsWith("http")||Z.startsWith("blob:")?K():(0,v.Sv)(N||"educoder",Z,N)},K=function(){(0,v.Nd)(N||"educoder",decodeURIComponent(Z))};return(0,y.jsxs)("div",{style:a()({},T||{}),className:"".concat(P&&p.bgBlack," ").concat(S?p.wrp:"hide"),children:[I&&(0,y.jsxs)("div",{className:p.close,ref:G,children:[!!A&&(0,y.jsx)(x.Z,{title:"点击对图片进行批注",getPopupContainer:function(){return G.current},children:(0,y.jsx)("span",{onClick:function(){E(),A()},children:(0,y.jsx)("i",{className:"icon-yulanpizhu"})})}),!H&&(0,y.jsx)(x.Z,{title:"点击下载此文件",getPopupContainer:function(){return G.current},children:(0,y.jsx)("span",{onClick:K,children:(0,y.jsx)("i",{className:"icon-quxiaozhiding"})})}),(0,y.jsx)(x.Z,{title:"关闭",getPopupContainer:function(){return G.current},children:(0,y.jsx)("span",{className:"",onClick:E,children:(0,y.jsx)("i",{className:"icon-guanbi1"})})})]}),(0,y.jsx)("div",{className:"".concat(p[C]," ").concat(C," ").concat(p.monaco," ").concat("txt"===S?"show":"hide"),children:"txt"===S&&(0,y.jsx)(f.ZP,a()({},O))}),"audio"===S&&(0,y.jsx)("audio",{src:(null===(t=Z)||void 0===t?void 0:t.indexOf("http"))>-1||null!==(r=Z)&&void 0!==r&&r.startsWith("/api")?Z:"data:image/png;base64,".concat(Z),autoPlay:!0}),"video"===S&&(0,y.jsx)(y.Fragment,{children:(null===(s=Z)||void 0===s?void 0:s.indexOf("http"))>-1||null!==(o=Z)&&void 0!==o&&o.startsWith("/api")?(0,y.jsx)("video",{controls:!0,src:"".concat(Z),autoPlay:!0}):(0,y.jsx)("video",{controls:!0,src:"data:video/mp4;base64,".concat(Z),autoPlay:!0})}),"office"===S&&$&&(0,y.jsx)("iframe",{src:"".concat(J,"/office.html?key=").concat($.key,"&url=").concat(X+$.url,"&callbackUrl=").concat(X+$.callbackUrl,"&fileType=").concat($.fileType,"&title=").concat($.title,"&model=").concat(w,"&officeServer=").concat(_.Z.ONLYOFFICE,"&disabledDownload=").concat(!!H)}),"html"===S&&(0,y.jsx)("iframe",{src:Z+"&disposition=inline"}),"pdf"===S&&(0,y.jsx)("iframe",{src:"".concat(J,"/js/pdfview/index.html?url=").concat(Z,"&disabledDownload=").concat(!!H)}),"image"===S&&(0,y.jsx)("img",{src:(null===(c=Z)||void 0===c?void 0:c.indexOf("http"))>-1||null!==(b=Z)&&void 0!==b&&b.startsWith("/api")?Z:"data:image/png;base64,".concat(Z)}),("other"===S||"download"===S)&&(0,y.jsx)(y.Fragment,{children:R?(0,y.jsx)(j.Z,{customText:"当前文件不支持预览,可点击下载查看",ButtonTwo:(0,y.jsx)(m.ZP,{icon:(0,y.jsx)("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:q,children:"下载"})}):(0,y.jsxs)(m.ZP,{type:"primary",size:"middle",onClick:q,children:[(0,y.jsx)(h.Z,{}),"点击下载"]})})]})}},64474:function(e,n,t){t.d(n,{Z:function(){return V}});var r=t(82242),a=t.n(r),s=t(37205),i=t.n(s),o=t(91232),l=t.n(o),c=t(79800),d=t.n(c),u=t(59301),p=(t(54522),t(32834)),m=t.n(p),h=t(11690);var f=[],x=["<ul>"],v=new(m().Renderer),g=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function j(){f.length=0,x=["<ul>"]}var _={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function y(e,n,t,r){if(n>=e.length||e[n].level<=t)return n;var a=e[n];r.push("<li><a href='#"+a.anchor+"'>"+a.text+"</a>");var s=[];return n=y(e,++n,a.level,s),s.length>0&&(r.push("<ul>"),s.forEach((function(e){r.push(e)})),r.push("</ul>")),r.push("</li>"),n=y(e,n,t,r)}function b(){return y(f,0,0,x),x.push("</ul>"),x.join("")}var k={heading:function(e){var n=g.exec(e);if(n)return{type:"heading",raw:n[0],depth:n[1].length,text:n[2]}},fences:function(e){var n=this.rules.block.fences.exec(e);if(n){var t=n[0],r=function(e,n){var t=e.match(/^(\s+)(?:```)/);if(null===t)return n;var r=t[1];return n.split("\n").map((function(e){var n=e.match(/^\s+/);return null===n?e:d()(n,1)[0].length>=r.length?e.slice(r.length):e})).join("\n")}(t,n[3]||""),a=n[2]?n[2].trim():n[2];if(["latex","katex","math"].indexOf(a)>=0){var s=S(),i=r;r=s,N[s]={type:"block",expression:i}}return{type:"code",raw:t,lang:a,text:r}}}},w=/(?:\${2})([^\n`]+?)(?:\${2})/gi,Z=0,S=function(){return"__special_katext_id_".concat(Z++,"__")},N={};function O(){return N}function C(){Z=0,N={}}function T(e){return e=e.replace(w,(function(e,n){var t=S();return N[t]={type:"inline",expression:n},t}))}var I=v.listitem;v.listitem=function(e){return I(T(e))};var E=v.paragraph;v.paragraph=function(e){return E(T(e))};var P=v.tablecell;v.tablecell=function(e,n){return P(T(e),n)},v.code=function(e,n,t){var r=(n||"").match(/\S*/)[0];return r?["latex","katex","math"].indexOf(r)>=0?"<p class='editormd-tex'>".concat(e,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(n,'">').concat(t?e:(0,h.escape)(e,!0),"</code></pre>\n"):'<pre class="prettyprint linenums"><code>'+(t?e:(0,h.escape)(e,!0))+"</code></pre>"},v.heading=function(e,n,t){var r=this.options.headerPrefix+t.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return f.push({anchor:r,level:n,text:e}),"<h"+n+' id="'+r+'">'+e+"</h"+n+">"},m().setOptions({silent:!0,gfm:!0,pedantic:!1}),m().use({tokenizer:k,renderer:v});var H=m(),A=(t(64018),t(24830)),R=t(97730),L=t(15342),W=t(1012),F=t(83385),M=t(37712),z="@▁@",B=/<pre[^>]*>/g;var V=function(e){var n=e.value,t=void 0===n?"":n,r=e.className,s=e.showTextOnly,o=e.showLines,c=e.style,p=void 0===c?{}:c,m=e.stylesPrev,h=void 0===m?{}:m,f=e.highlightKeywords,x=e.showProgramFill,v=(e.isProgramFill,e.disabledFill),g=void 0!==v&&v,y=e.programFillValue,k=e.onFillChange,w=void 0===k?function(e){}:k,Z=e.onFillBlur,S=void 0===Z?function(){}:Z,N=String(t),T=(0,u.useState)(""),I=d()(T,2),E=I[0],P=I[1],V=(0,u.useState)("office"),$=d()(V,2),D=$[0],J=$[1],X=(0,u.useState)([]),G=d()(X,2),U=G[0],q=G[1],K=(0,u.useRef)("a"+(0,W.Z)()),Y={},Q=function(e){return e.replace(/<style.*?>([\s\S]+?)<\/style>/gim,(function(e,n){var t=n.replace(/(\n|\r)/g,"").split("}"),r=[];return t.map((function(e){""!=e&&r.push(".".concat(K.current," ").concat(e))})),"<style>".concat(r.join("}"),"</style>")}))},ee=(0,u.useMemo)((function(){try{N=N.replace(/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,"("+R.Z.API_SERVER+"/api/attachments/").replace(/\"\/api\/attachments\/|\"\/attachments\/download\//g,'"'+R.Z.API_SERVER+"/api/attachments/").replace(/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,'"'+R.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(x){var e=-1;return N=N.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,(function(n,t,r){return function(e,n){var t=document.createElement(e===z?"input":"textarea");t.style.width="100%",t.style.height=e===z?"40px":"151px",t.rows=5,t.spellcheck=!1,t.name="edu-program-fill",t.placeholder="请输入",t.dataset.id=n;var r=Object.keys(Y).length;return Y[r]=t,'<span class="edu-program-fill-wrap '.concat(e===z?"":"show",'" style="width:').concat(e===z?"200px":"100%",'"><span>').concat(t.outerHTML,'<span class="edu-program-fill-score"></span></span></span>')}(n,++e)})),'<pre style="background:#fff;padding:4px">'.concat(Q(N||""),"</pre>")}var n=H(N);n=Q(n);var t=O();N.match(/\[TOC\]/)&&(n=n.replace("<p>[TOC]</p>",b()),j()),n=n.replace(/(__special_katext_id_\d+__)/g,(function(e,n){var r=t[n],a=r.type,s=r.expression;return(0,L.renderToString)(function(e){var n=document.createElement("div");return n.innerHTML=e,0===n.childNodes.length?"":n.childNodes[0].nodeValue}(s)||"",{displayMode:"block"===a,throwOnError:!1,output:"html"})})),n=n.replace(/▁/g,"▁▁▁"),C();var r=document.createElement("div");return r.innerHTML=n,f?(re(r,f.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),r.innerHTML):s?r.innerText:(setTimeout((function(){return ie()}),500),r.innerHTML)}),[N,f]);(0,u.useEffect)((function(){ae.current&&ae.current.querySelectorAll(["input","textarea"]).forEach((function(e){e.oninput=ne,e.onblur=te}))}),[U]),(0,u.useEffect)((function(){if(null!=y&&y.length){var e,n=ae.current.querySelectorAll(".edu-program-fill-score"),t=ae.current.querySelectorAll('[name="edu-program-fill"]'),r=l()(t.entries());try{for(r.s();!(e=r.n()).done;){var a,s=d()(e.value,2),i=s[0],o=s[1];o.value=null===(a=y[i])||void 0===a?void 0:a.value,"warning"===y[i].type?o.className="program-fill-warning":"success"===y[i].type?o.className="program-fill-success":o.className=""}}catch(e){r.e(e)}finally{r.f()}var c,u=l()(n.entries());try{for(u.s();!(c=u.n()).done;){var p,m,h=d()(c.value,2),f=h[0];h[1].innerHTML=null!==(p=y[f])&&void 0!==p&&p.score?"".concat(null===(m=y[f])||void 0===m?void 0:m.score,"分"):""}}catch(e){u.e(e)}finally{u.f()}q(y)}}),[y]);var ne=function(e){U[e.target.dataset.id]=U[e.target.dataset.id]||{},U[e.target.dataset.id].value=e.target.value,q(i()(U)),w(U,e.target.dataset.id)},te=function(e){U[e.target.dataset.id]=U[e.target.dataset.id]||{},U[e.target.dataset.id].value=e.target.value,q(i()(U)),S(U,e.target.dataset.id)};function re(e,n){return e.childNodes.forEach((function(e){if(e.childNodes.length>0)re(e,n);else if("IMG"!==e.nodeName)if(e.innerHTML){var t;e.innerHTML=null===(t=e.innerHTML)||void 0===t?void 0:t.replace(new RegExp(n,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>')}else{var r=document.createElement("span");r.innerHTML=e.textContent.replace(new RegExp(n,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),e.replaceWith(r)}}))}var ae=(0,u.useRef)();function se(e){var n=e.target;if("A"===n.tagName.toUpperCase()){var t=n.getAttribute("href");if(t.indexOf("office")>-1)e.preventDefault(),P(t),J("office");else if(t.indexOf("application/pdf")>-1)e.preventDefault(),P(t),J("pdf");else if(t.indexOf("text/html")>-1)e.preventDefault(),P(t),J("html");else if(t.startsWith("#")){e.preventDefault();var r=document.getElementById(t.replace("#",""));r&&r.scrollIntoView(!0)}}}_.WebkitLineClamp=o,o&&(p=a()(a()({},p),_));var ie=function(){var e,n=null===(e=ae.current)||void 0===e?void 0:e.querySelectorAll("video");null==n||n.forEach((function(e){if(e.oncontextmenu=function(){return!1},e.src.indexOf(".m3u8")>-1)if(e.canPlayType("application/vnd.apple.mpegurl"));else if(A.ZP.isSupported()){var n=new A.ZP;n.loadSource(e.src),n.attachMedia(e)}}))};return(0,u.useEffect)((function(){if(ae.current&&ee&&ee.match(B)&&window.PR.prettyPrint(),ae.current)return ae.current.addEventListener("click",se),function(){var e;null===(e=ae.current)||void 0===e||e.removeEventListener("click",se),C(),j()}}),[ee,ae.current,se]),(0,M.jsxs)(M.Fragment,{children:[s&&(0,M.jsx)("div",{ref:ae,children:ee}),!s&&(0,M.jsx)("div",{ref:ae,style:a()({},p),className:"".concat(r||""," ").concat(g?"disabled-fill":""," markdown-body ").concat(K.current),dangerouslySetInnerHTML:{__html:ee}}),(0,M.jsx)(F.Z,{close:!0,data:E,type:null!=E&&E.length?D:"",style:a()({},h),onClose:function(){return P("")}})]})}},18971:function(e,n,t){t.d(n,{Z:function(){return E}});var r=t(7557),a=t.n(r),s=t(41498),i=t.n(s),o=t(79800),l=t.n(o),c=t(82242),d=t.n(c),u=t(59301),p=t(5112),m=t(3113),h=t(8591),f=t(43418),x=t(94001),v=t(95237),g=t(43604),j=t(28103),_=t(71138),y="title___dVHM9",b=t(74505),k=t(24334),w=t(23634),Z=t(35699),S=t(64474),N=t(18123),O=t(680),C=t(71371),T=t(37712),I={selectOnLineNumbers:!0,readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,enableSplitViewResizing:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1};var E=function(e){var n=e.language,t=e.dispatch,r=e.shixunWorkReport,s=e.v,o=e.languages,c=e.classroomList,E=e.autoHeight,P=(e.diff_code_count,e.data,(0,u.useState)(null==o?void 0:o[0])),H=l()(P,2),A=H[0],R=H[1],L=(0,Z.useParams)();return(0,u.useEffect)((function(){R(null==o?void 0:o[0])}),[]),(0,u.useEffect)((function(){var e;R(null==o||null===(e=o.filter((function(e){return e.language===(null==A?void 0:A.language)})))||void 0===e?void 0:e[0])}),[o]),(0,T.jsxs)(T.Fragment,{children:[(0,T.jsxs)("h2",{children:[" ",(0,T.jsxs)("span",{children:[(0,T.jsx)("span",{children:"最后通关的代码"}),(null==o?void 0:o.length)>1&&(0,T.jsx)(p.ZP.Group,{defaultValue:n,style:{marginLeft:10},onChange:function(e){var n;R(null==o||null===(n=o.filter((function(n){return n.language===e.target.value})))||void 0===n?void 0:n[0])},children:null==o?void 0:o.map((function(e){return(0,T.jsx)(p.ZP,{value:null==e?void 0:e.language,children:null==e?void 0:e.language})}))})]}),(0,b.GJ)()&&"shixunWorkReport"!=r&&(0,T.jsxs)("span",{children:[(0,T.jsxs)("span",{children:["得分 ",null==A?void 0:A.score,"/",null==A?void 0:A.total_score]}),(0,T.jsx)(m.ZP,{style:{margin:"0px 10px"},onClick:function(){var e;if(null!==(e=c.AssistantObject)&&void 0!==e&&null!==(e=e.hack)&&void 0!==e&&e.can_appraise||!(0,b.Rm)()){var n,r=null==A?void 0:A.score;f.Z.confirm({title:"调分",content:(0,T.jsxs)("div",{children:[(0,T.jsxs)("p",{children:["得分:",null==A?void 0:A.score,"/",null==A?void 0:A.total_score]}),(0,T.jsxs)("p",{children:["调分:",(0,T.jsx)(x.Z,{min:0,max:null==A?void 0:A.total_score,defaultValue:null==A?void 0:A.score,onChange:function(e){r=e}})]})]}),okText:"确认",onOk:(n=i()(a()().mark((function e(){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,w.ZP)("/api/courses/".concat(null==L?void 0:L.coursesId,"/homework_commons/update_hack_score"),{method:"put",body:{course_id:null==L?void 0:L.coursesId,hack_user_code_id:null==A?void 0:A.hack_user_id,score:r}});case 2:0===e.sent.status&&(h.ZP.success("调分成功"),t({type:"shixunHomeworks/setActionTabs",payload:{}}),t({type:"shixunHomeworks/getShixunWorkReports",payload:d()({},L)}));case 4:case"end":return e.stop()}}),e)}))),function(){return n.apply(this,arguments)}),cancelText:"取消"})}else h.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能")},type:"primary",children:"调分"}),(0,b.GJ)()&&"shixunWorkReport"!=r&&(0,T.jsx)(m.ZP,{onClick:function(){var e;null!==(e=c.AssistantObject.hack)&&void 0!==e&&e.can_appraise||!(0,b.Rm)()?t({type:"shixunHomeworks/setActionTabs",payload:{key:"更改点评",selectArrs:{myshixun_identifier:r.user_id,type:"1",language:null==A?void 0:A.language,v:s,data:d()({},r)}}}):h.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能")},children:"点评代码"})]})]}),(0,T.jsx)(_.ZP,{height:300,language:null==A?void 0:A.language,value:k.Base64.decode(null==A?void 0:A.code),autoHeight:E,theme:"default",options:I}),((null==A?void 0:A.comment)||(null==A?void 0:A.hidden_comment))&&(0,T.jsxs)("div",{children:[(0,T.jsxs)(v.Z,{align:"middle",style:{borderTop:"1px solid #eee"},children:[(0,T.jsx)(g.Z,{flex:1,children:(0,T.jsx)("h1",{className:y,children:"点评内容"})}),(0,T.jsx)(g.Z,{className:"pr30",children:(0,b.GJ)()&&(0,T.jsxs)(m.ZP,{onClick:i()(a()().mark((function e(){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:f.Z.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",icon:(0,T.jsx)(O.Z,{}),content:"是否确认删除?",onOk:function(){return i()(a()().mark((function e(){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,N.gZ)({comment_id:null==A?void 0:A.comment_id,homeworkId:L.homeworkId,type:"hack"});case 2:0===e.sent.status&&(h.ZP.success("删除成功"),t({type:"shixunHomeworks/getShixunWorkReports",payload:d()({},L)}));case 4:case"end":return e.stop()}}),e)})))()}});case 1:case"end":return e.stop()}}),e)}))),children:[(0,T.jsx)(C.Z,{}),"删除"]})})]}),(0,T.jsx)(j.Z,{style:{margin:0}}),(null==A?void 0:A.comment)&&(0,T.jsxs)("aside",{className:"pl30 pr30 mt20",children:[(0,T.jsx)("span",{className:"c-light-black font12",children:"# 学生和课堂老师可见"}),(0,T.jsx)("br",{}),(0,T.jsx)(S.Z,{value:null==A?void 0:A.comment})]}),(null==A?void 0:A.hidden_comment)&&(0,T.jsxs)("aside",{className:"pl30 pr30 mt20",children:[(0,T.jsx)("span",{className:"c-light-black font12",children:"# 仅课堂老师可见"}),(0,T.jsx)("br",{}),(0,T.jsx)(S.Z,{value:null==A?void 0:A.hidden_comment})]})]})]})}},53182:function(e,n,t){t.r(n),t.d(n,{default:function(){return U}});var r=t(7557),a=t.n(r),s=t(41498),i=t.n(s),o=t(82242),l=t.n(o),c=t(79800),d=t.n(c),u=t(39647),p=t.n(u),m=t(59301),h=t(86129),f=t.n(h),x=t(35699),v=t(43418),g=t(96865),j=t(66104),_=t(95237),y=t(43604),b=t(3113),k=t(28103),w=t(8591),Z=t(61998),S=t(28563),N=t(130),O=t(680),C=t(71371),T=t(97730),I=t(74505),E=t(23756),P={flex_box_center:"flex_box_center___lb6Eo",flex_space_between:"flex_space_between___J8ZnK",flex_box_vertical_center:"flex_box_vertical_center___zweTs",flex_box_center_end:"flex_box_center_end___CvkW9",flex_box_column:"flex_box_column___ODy_E",title:"title___AD3SJ",export:"export___XBLMD",title1_right:"title1_right___raWIo",userPic:"userPic___OK1Fq",userInfo:"userInfo___wKpvE",listItem:"listItem___VH7Ls",rightInfo:"rightInfo___lI2xY",shixunTitle:"shixunTitle___lvDL9",shixunWrp:"shixunWrp___QXKnz",footerBar:"footerBar___zgEXb",footerBarStatic:"footerBarStatic___SB7gT",exitComment:"exitComment___oC_uA",nextComment:"nextComment___fCJ3l",modal:"modal___v_Shp"},H=t(18971),A=t(23634),R=t(24334),L=t(37712),W=(0,x.connect)((function(e){var n=e.shixunHomeworks,t=e.loading,r=e.globalSetting,a=e.classroomList,s=e.user;return{shixunHomeworks:n,globalSetting:r,loading:t.effects,classroomList:a,user:s}}))((function(e){var n=e.shixunHomeworks,t=e.autoHeight,r=e.classroomList,a=e.user,s=e.dispatch,i=n.shixunWorkReport,o=(i.stage_list,i.work_id),l=(0,x.useParams)(),c=((0,I.GJ)(),[{title:"评测次数",dataIndex:"query_index",width:120},{title:"详细结果",dataIndex:"result",render:function(e,n,t){return R.Base64.decode(e)||"- -"}}]);function d(e,n){return(0,A.U2)("student_works/".concat(o,"/rep_passed_content.json"),{path:n,game_id:e})}var u=(0,E.qZ)(5,i.hack);return(0,L.jsx)(m.Fragment,{children:null==u?void 0:u.map((function(e,n){return(0,L.jsx)("div",{children:e.map((function(e,o){var u;return(0,L.jsxs)("aside",{className:"pl30 pr30",children:[(0,L.jsx)("div",{className:"".concat(P.shixunTitle," mt10"),children:(0,L.jsxs)("div",{style:{display:"flex",width:"100%"},children:[(0,L.jsx)("span",{className:"fa fa-code "}),(0,L.jsxs)("strong",{style:{flex:1},className:"c-black",children:["第",5*n+o+1,"题 ",e.name]}),e.is_finish&&(0,L.jsxs)(x.Link,{style:{marginLeft:20},onClick:function(n){n.preventDefault(),window.open(null==e?void 0:e.url),localStorage.setItem("program_homework",[l.coursesId,l.categoryId])},to:"".concat(null==e?void 0:e.url),children:["查看答题详情",">>"]})]})}),(0,L.jsxs)("div",{className:"font16 mt10",children:[!1===e.is_finish&&"本关暂未通过,无通关代码",e.is_finish&&(0,L.jsx)("aside",{className:P.shixunWrp,children:(0,L.jsx)(H.Z,{classroomList:r,user:a,v:e,shixunWorkReport:i,dispatch:s,autoHeight:t,languages:e.languages,language:e.language,game_id:e.id,data:R.Base64.decode(e.code),diff_code_count:e.diff_code_count,onPathChange:d})})]}),(0,L.jsx)("aside",{className:"mt10 font16",children:null!==(u=e.history)&&void 0!==u&&u.length?(0,L.jsx)(Z.Z,{columns:c,pagination:{hideOnSinglePage:!0},dataSource:e.history}):"本关无评测记录"})]},o)}))},n)}))})})),F=t(78241),M=t(73782),z=["shixunHomeworks","dispatch"],B=(0,x.connect)((function(e){return{shixunHomeworks:e.shixunHomeworks}}))((function(e){var n,t,r,s=e.shixunHomeworks,o=e.dispatch,c=(p()(e,z),(0,x.useParams)()),u=(0,m.useState)(!1),h=d()(u,2),f=h[0],g=h[1],j=F.Z.useForm(),_=d()(j,1)[0];(0,m.useEffect)((function(){if("更改点评"===s.actionTabs.key)if("1"===s.actionTabs.selectArrs.type)_.setFieldsValue({comment:s.actionTabs.selectArrs.v.comment,hidden_comment:s.actionTabs.selectArrs.v.hidden_comment});else{var e,n;_.setFieldsValue({comment:null===(e=s.actionTabs.selectArrs)||void 0===e||null===(e=e.data)||void 0===e||null===(e=e.data)||void 0===e?void 0:e.work_comment,hidden_comment:null===(n=s.actionTabs.selectArrs)||void 0===n||null===(n=n.data)||void 0===n||null===(n=n.data)||void 0===n?void 0:n.work_comment_hidden})}}),[s.actionTabs.key]);var y=function(){var e=i()(a()().mark((function e(){var n,t,r,i;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=_.getFieldValue(),i="1"===s.actionTabs.selectArrs.type?"/api/problems/".concat(s.actionTabs.selectArrs.v.identifier,"/hack_comment.json"):"/api/student_works/".concat(c.homeworkId,"/shixun_work_comment.json"),e.next=4,(0,A.ZP)(i,{method:"post",body:{hidden_comment:r.hidden_comment,comment:r.comment,language:null===(n=s.actionTabs.selectArrs)||void 0===n?void 0:n.language,user_id:null===(t=s.actionTabs.selectArrs)||void 0===t||null===(t=t.data)||void 0===t||null===(t=t.data)||void 0===t?void 0:t.user_id}});case 4:0===e.sent.status&&(w.ZP.success("评阅成功"),_.resetFields(),o({type:"shixunHomeworks/setActionTabs",payload:{}}),o({type:"shixunHomeworks/getShixunWorkReports",payload:l()({},c)}));case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,L.jsx)(L.Fragment,{children:(0,L.jsxs)(v.Z,{centered:!0,title:(0,L.jsxs)("span",{children:["1"===(null===(n=s.actionTabs.selectArrs)||void 0===n?void 0:n.type)?"点评代码":"更改点评",(null===(t=s.actionTabs.selectArrs)||void 0===t?void 0:t.language)&&(0,L.jsxs)("span",{style:{marginLeft:10,fontSize:14},children:["使用语言:",null===(r=s.actionTabs.selectArrs)||void 0===r?void 0:r.language]})]}),open:"更改点评"===s.actionTabs.key,okText:"确定",cancelText:"取消",onOk:i()(a()().mark((function e(){var n;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=_.getFieldValue(),"{}"===JSON.stringify(n)||""===n.hidden_comment&&""===n.comment?g(!0):y();case 2:case"end":return e.stop()}}),e)}))),onCancel:function(){o({type:"shixunHomeworks/setActionTabs",payload:{}})},children:[(0,L.jsxs)(F.Z,{form:_,onChange:function(){f&&g(!1)},children:[(0,L.jsx)("p",{children:"学生和课堂老师可见"}),(0,L.jsx)(F.Z.Item,{name:"comment",children:(0,L.jsx)(M.Z.TextArea,{placeholder:"请输入评阅内容",rows:8})}),(0,L.jsx)("p",{children:"仅课堂老师可见"}),(0,L.jsx)(F.Z.Item,{name:"hidden_comment",children:(0,L.jsx)(M.Z.TextArea,{placeholder:"请输入评阅内容",rows:8})})]}),f&&(0,L.jsx)("p",{className:"c-red",children:"评阅内容至少有一个不为空"})]})})})),V=t(36432),$=t(64474),D=t(18123),J=t(65022),X=t.n(J),G=["shixunHomeworks","globalSetting","loading","classroomList","dispatch"],U=(0,x.connect)((function(e){var n=e.shixunHomeworks,t=e.loading,r=e.globalSetting,a=e.classroomList;return{shixunHomeworks:n,globalSetting:r,loading:t.effects,classroomList:a}}))((function(e){var n,t,r,s,o,c,u,h,H,A,R,F,M,z,J,U,q,K,Y,Q,ee,ne,te,re,ae,se,ie,oe,le,ce,de,ue=e.shixunHomeworks,pe=(e.globalSetting,e.loading,e.classroomList),me=e.dispatch,he=(p()(e,G),(0,m.useState)(l()({},(0,x.useParams)()))),fe=d()(he,2),xe=fe[0],ve=fe[1],ge=(0,x.useParams)(),je=(0,x.useLocation)(),_e=(0,m.useState)([]),ye=(d()(_e,0),(0,m.useState)({last:!1})),be=d()(ye,2),ke=(be[0],be[1]),we=(0,m.useState)({last:!1}),Ze=d()(we,2),Se=(Ze[0],Ze[1]),Ne=(0,m.useRef)(),Oe=(0,m.useRef)(),Ce=(0,m.useState)(!1),Te=d()(Ce,2),Ie=Te[0],Ee=Te[1],Pe=(0,m.useState)(!1),He=d()(Pe,2),Ae=He[0],Re=He[1],Le=(0,m.useState)(!1),We=d()(Le,2),Fe=We[0],Me=We[1],ze=ue.shixunWorkReport,Be=(0,m.useState)(new(f())),Ve=d()(Be,2),$e=Ve[0],De=Ve[1],Je=(0,m.useState)([]),Xe=d()(Je,2),Ge=Xe[0],Ue=Xe[1],qe=(0,m.useState)(!1),Ke=d()(qe,2),Ye=Ke[0],Qe=Ke[1],en=(0,m.useState)(!1),nn=d()(en,2),tn=nn[0],rn=nn[1];(0,m.useEffect)((function(){return me({type:"globalSetting/footerToggle",payload:!1}),me({type:"classroomList/getAssistantPermissions",payload:{course_id:xe.coursesId}}),function(){me({type:"globalSetting/footerToggle",payload:!0})}}),[]),(0,m.useEffect)((function(){"导出实训报告"===ue.actionTabs.key&&Ge.length>0&&cn("all")}),[Ge]),(0,m.useEffect)((function(){ve(l()({},ge))}),[je.pathname]);var an=function(){document.body.scrollIntoView()};function sn(){return on.apply(this,arguments)}function on(){return(on=i()(a()().mark((function e(){var n,t,r,s,i,o,c;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=JSON.parse(sessionStorage.all_student_works_params||"{}"),e.next=3,me({type:"shixunHomeworks/getAllStudentWorks",payload:l()(l()({},xe),r)});case 3:s=e.sent,Ue(s.all_student_works),(i=null===(n=s.all_student_works)||void 0===n?void 0:n.map((function(e){return String(e.user_id)})).indexOf(xe.homeworkId))===(null===(t=s.all_student_works)||void 0===t?void 0:t.length)-1?ke({last:!0}):ke(null===(o=s.all_student_works)||void 0===o?void 0:o[i+1]),Se(0===i?{last:!0}:null===(c=s.all_student_works)||void 0===c?void 0:c[i-1]);case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var ln=function(){document.querySelectorAll("canvas").forEach((function(e){(!e.clientWidth||!e.clientHeight)&&e.remove()}))},cn=function(){var e=i()(a()().mark((function e(n){var t,r,s,o,l,c,d,u,p,m,h,f;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(l=function(){return l=i()(a()().mark((function e(){var n;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,me({type:"shixunHomeworks/getShixunWorkReports",payload:{homeworkId:Ge[t].user_id}});case 2:n=e.sent,an(),t++,setTimeout(i()(a()().mark((function e(){var l,c,d,u,p,m,h;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:ln(),c=$e.folder("".concat(null==n?void 0:n.username)),d=document.querySelector("#export-all").children,u=X()(),p=a()().mark((function e(n){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u.set(s).from(d[n]).toContainer().toCanvas().toPdf().get("pdf").then(function(){var e=i()(a()().mark((function e(t){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n<d.length-1)){e.next=3;break}return e.next=3,t.addPage();case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}());case 2:case"end":return e.stop()}}),e)})),m=0;case 6:if(!(m<d.length)){e.next=11;break}return e.delegateYield(p(m),"t0",8);case 8:m++,e.next=6;break;case 11:c.file("".concat(Ge[t-1].student_work_user_name).concat(t,".pdf"),u.output("blob")),h=c.folder("代码文件"),null==n||null===(l=n.shixun_detail)||void 0===l||l.map((function(e,n){var t,r=h.folder("第".concat(n+1,"关-").concat(e.subject,"-").concat(e.id));null==e||null===(t=e.game_codes)||void 0===t||t.map((function(e){r.file("".concat(e.filename,".txt"),null==e?void 0:e.content)}))})),r.update({content:(0,L.jsxs)("div",{children:["当前进度: ",(0,L.jsx)("span",{className:"c-blue",children:t}),"/",null==Ge?void 0:Ge.length,(0,L.jsx)("br",{}),"请勿关闭浏览器窗口"]})}),t==(null==Ge?void 0:Ge.length)?(r.destroy(),dn()):o();case 16:case"end":return e.stop()}}),e)}))),2200);case 6:case"end":return e.stop()}}),e)}))),l.apply(this,arguments)},o=function(){return l.apply(this,arguments)},t=0,r=v.Z.info({width:460,title:(0,L.jsxs)("div",{children:["正在导出实训报告,",(0,L.jsx)("span",{className:"c-red",children:"请勿关闭或操作当前浏览器窗口"})]}),content:(0,L.jsxs)("div",{children:["当前进度: ",(0,L.jsx)("span",{className:"c-blue",children:t+1}),"/","all"!==n?1:null==Ge?void 0:Ge.length,(0,L.jsx)("br",{}),"请勿关闭浏览器窗口"]}),maskClosable:!1,className:P.modal,onOk:function(){}}),s={margin:[0,0],filename:"".concat(ze.username,".pdf"),html2canvas:{useCORS:!0,letterRendering:!0},jsPDF:{unit:"mm",format:"a4",orientation:"landscape"}},!("all"!==n||(null==Ge?void 0:Ge.length)<2)){e.next=27;break}ln(),an(),d=Oe.current.children,u=X()(),p=$e.folder("".concat(null==ze?void 0:ze.username)),m=a()().mark((function e(n){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u.set(s).from(d[n]).toContainer().toCanvas().toPdf().get("pdf").then(function(){var e=i()(a()().mark((function e(t){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n<d.length-1)){e.next=3;break}return e.next=3,t.addPage();case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}());case 2:case"end":return e.stop()}}),e)})),h=0;case 13:if(!(h<d.length)){e.next=18;break}return e.delegateYield(m(h),"t0",15);case 15:h++,e.next=13;break;case 18:return Ee(!1),p.file("".concat(ze.username,".pdf"),u.output("blob"),{base64:!1}),f=p.folder("代码文件"),null==ze||null===(c=ze.shixun_detail)||void 0===c||c.map((function(e,n){var t,r=f.folder("第".concat(n+1,"关-").concat(e.subject,"-").concat(e.id));null==e||null===(t=e.game_codes)||void 0===t||t.map((function(e){r.file("".concat(e.filename,".txt"),null==e?void 0:e.content)}))})),r.destroy(),dn(),e.abrupt("return");case 27:o();case 28:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),dn=function(){$e.generateAsync({type:"blob"}).then((function(e){var n=document.createElement("a");n.href=window.URL.createObjectURL(e),n.download=ze.course_name+".zip",document.body.appendChild(n);var t=document.createEvent("MouseEvents");t.initEvent("click",!1,!1),n.dispatchEvent(t),document.body.removeChild(n),De(new(f()))})),Me(!1)};(0,m.useEffect)((function(){un()}),[xe.homeworkId]);var un=function(){var e=i()(a()().mark((function e(){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Re(!0),e.next=3,me({type:"shixunHomeworks/getShixunWorkReports",payload:l()({},xe)});case 3:Re(!1),(0,I.GJ)()&&sn();case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),pn=[{title:"题号",dataIndex:"name",render:function(e,n,t){return t+1}},{title:"题目名称",dataIndex:"name",ellipsis:!0,width:"30%"},{title:"完成时间",dataIndex:"finish_time",width:"200px",render:function(e,n,t){var r;return(0,L.jsxs)("div",{children:[(0,L.jsx)("p",{children:e||"- -"}),null==n||null===(r=n.subitem)||void 0===r||null===(r=r.map((function(e){return e.finish_time})))||void 0===r?void 0:r.map((function(e){return(0,L.jsx)("p",{children:e||"- -"})}))]})}},{title:"评测次数",dataIndex:"submit_count",render:function(e,n,t){var r;return(0,L.jsxs)("div",{children:[(0,L.jsx)("p",{children:e||"- -"}),null==n||null===(r=n.subitem)||void 0===r||null===(r=r.map((function(e){return e.submit_count})))||void 0===r?void 0:r.map((function(e){return(0,L.jsx)("p",{children:e||"- -"})}))]})}},{title:"运行时间(ms)",dataIndex:"run_time",render:function(e,n,t){var r;return(0,L.jsxs)("div",{children:[(0,L.jsx)("p",{children:e||"- -"}),null==n||null===(r=n.subitem)||void 0===r||null===(r=r.map((function(e){return e.run_time})))||void 0===r?void 0:r.map((function(e){return(0,L.jsx)("p",{children:e||"- -"})}))]})}},{title:"内存(kb)",dataIndex:"memory",render:function(e,n,t){var r;return(0,L.jsxs)("div",{children:[(0,L.jsx)("p",{children:e||"- -"}),null==n||null===(r=n.subitem)||void 0===r||null===(r=r.map((function(e){return e.memory})))||void 0===r?void 0:r.map((function(e){return(0,L.jsx)("p",{children:e||"- -"})}))]})}},{title:"使用语言",dataIndex:"language",render:function(e,n,t){var r;return(0,L.jsxs)("div",{children:[(0,L.jsx)("p",{children:e||"- -"}),null==n||null===(r=n.subitem)||void 0===r||null===(r=r.map((function(e){return e.language})))||void 0===r?void 0:r.map((function(e){return(0,L.jsx)("p",{children:e||"- -"})}))]})}},{title:"得分",dataIndex:"score",render:function(e,n,t){return(0,L.jsx)("div",{children:(0,L.jsx)("p",{children:e||"- -"})})}},{title:"排名",dataIndex:"rank",render:function(e,n,t){var r;return(0,L.jsxs)("div",{children:[(0,L.jsx)("p",{children:e||"- -"}),null==n||null===(r=n.subitem)||void 0===r||null===(r=r.map((function(e){return e.rank})))||void 0===r?void 0:r.map((function(e){return(0,L.jsx)("p",{children:e||"- -"})}))]})}}];return(0,L.jsxs)("section",{className:"bg-fafafa",style:{position:"sticky",top:0},children:[(0,L.jsx)("div",{className:"edu-container mt10",style:{paddingBottom:100},children:(0,L.jsxs)(g.Z,{loading:Ae,active:!0,avatar:{size:40},paragraph:{rows:5},children:[(0,L.jsxs)("div",{className:"edu-container",children:[(null==ze||null===(n=ze.category)||void 0===n?void 0:n.course_id)&&(0,L.jsxs)("section",{className:"animated fadeIn",children:[(0,L.jsx)("aside",{className:"",children:(null==ze?void 0:ze.category)&&(0,L.jsxs)(j.Z,{separator:">",children:[(0,L.jsx)(j.Z.Item,{children:(0,L.jsx)(x.Link,{to:"/classrooms/".concat(null==ze||null===(t=ze.category)||void 0===t?void 0:t.course_id,"/program_homework"),children:null==ze||null===(r=ze.category)||void 0===r?void 0:r.course_name})}),(0,L.jsx)(j.Z.Item,{children:(0,L.jsx)(x.Link,{to:"/classrooms/".concat(null==ze||null===(s=ze.category)||void 0===s?void 0:s.course_id,"/program_homework"),children:ze.category.category_name})}),(0,L.jsx)(j.Z.Item,{children:(0,L.jsx)(x.Link,{to:"/classrooms/".concat(null==ze||null===(o=ze.category)||void 0===o?void 0:o.course_id,"/program_homework/").concat(null==xe?void 0:xe.categoryId,"/detail"),children:"作业详情"})}),(0,L.jsx)(j.Z.Item,{children:null==ze||null===(c=ze.data)||void 0===c?void 0:c.user_name})]})}),(0,L.jsx)("aside",{className:[P.title1,"mt20"].join(" "),children:(0,L.jsx)(_.Z,{align:"middle",children:(0,L.jsxs)(y.Z,{flex:1,children:[(0,L.jsx)(x.Link,{to:"/classrooms/".concat(xe.coursesId,"/program_homework/").concat(null==xe?void 0:xe.categoryId,"/detail"),children:(0,L.jsx)(S.Z,{className:"font16 c-black"})}),(0,L.jsx)("strong",{className:"font20 ml5",children:null==ze||null===(u=ze.category)||void 0===u?void 0:u.homework_name}),(0,L.jsx)(E.VV,{temporary:!0,status:ze.homework_status})]})})})]}),(0,L.jsx)("aside",{className:"mt30 relative"})]}),(0,L.jsx)("aside",{className:"edu-container bg-white",ref:Ne,children:(0,L.jsxs)("div",{id:"export-all",ref:Oe,children:[(0,L.jsxs)("div",{id:"export-all-1",children:[(0,L.jsxs)("div",{className:P.title,children:[(0,L.jsx)("h1",{children:"总体评价"}),(0,L.jsx)("div",{children:(0,I.GJ)()&&(0,L.jsxs)(b.ZP,{className:"mr20",type:"primary",onClick:function(){me({type:"shixunHomeworks/setActionTabs",payload:{key:"更改点评",selectArrs:{myshixun_identifier:ze.user_id,data:l()({},ze)}}})},children:[(0,L.jsx)(N.Z,{}),null!=ze&&null!==(h=ze.data)&&void 0!==h&&h.has_comment?"更改点评":"点评作业"]})})]}),(0,L.jsx)(k.Z,{style:{marginTop:0}}),(0,L.jsxs)(_.Z,{className:"pl30 pr30",children:[(0,L.jsx)(y.Z,{children:(0,L.jsx)("img",{className:P.userPic,src:"".concat(T.Z.IMG_SERVER,"/images/").concat(null==ze||null===(H=ze.data)||void 0===H?void 0:H.image_url),alt:null==ze||null===(A=ze.data)||void 0===A?void 0:A.username})}),(0,L.jsxs)(y.Z,{children:[(0,L.jsx)("span",{className:"font16 ml40",children:null==ze||null===(R=ze.data)||void 0===R?void 0:R.user_name}),(0,L.jsx)(E.UQ,{status:null==ze||null===(F=ze.data)||void 0===F?void 0:F.compelete_status}),(0,L.jsxs)("ul",{className:P.userInfo,children:[(0,L.jsxs)("li",{children:["学号:",(null==ze||null===(M=ze.data)||void 0===M?void 0:M.student_id)||"--"]}),(0,L.jsxs)("li",{children:["分班:",(null==ze||null===(z=ze.data)||void 0===z?void 0:z.course_group)||"--"]}),(0,L.jsx)("br",{}),(0,L.jsxs)("li",{children:["截止前完成刷题:",(0,L.jsx)("span",{className:"c-red",children:null==ze||null===(J=ze.data)||void 0===J?void 0:J.finish_do})]}),(0,L.jsxs)("li",{children:["最新完成刷题:",(0,L.jsx)("span",{className:"c-red",children:(null==ze||null===(U=ze.data)||void 0===U?void 0:U.latest_do)||"-"})]})]})]}),(0,L.jsxs)("ul",{className:[P.listItem,"mt10"].join(" "),children:[(0,L.jsxs)("li",{children:[(0,L.jsx)("strong",{children:"完成时间"}),(0,L.jsx)("div",{className:"c-light-black mt20",children:(null==ze?void 0:ze.data)&&(null==ze||null===(q=ze.data)||void 0===q?void 0:q.finish_time)})]}),(0,L.jsxs)("li",{children:[(0,L.jsxs)("strong",{children:["完成时长",(0,L.jsx)("i",{onClick:function(e){e.stopPropagation(),e.preventDefault(),rn(!0)},style:{marginLeft:4,display:"none",color:"#145DFF",fontSize:16,cursor:"pointer"},className:"iconfont icon-tishixiaowenhao"})]}),(0,L.jsx)("div",{className:"c-light-black mt20",children:null==ze||null===(K=ze.data)||void 0===K?void 0:K.finish_time_long})]}),(0,L.jsxs)("li",{children:[(0,L.jsx)("strong",{children:"评测次数"}),(0,L.jsx)("div",{className:"mt20",children:null==ze||null===(Y=ze.data)||void 0===Y?void 0:Y.submit_count})]}),(0,L.jsxs)("li",{children:[(0,L.jsx)("strong",{children:"通过率"}),(0,L.jsx)("div",{className:"mt20",children:(0,L.jsx)("span",{children:(null==ze||null===(Q=ze.data)||void 0===Q?void 0:Q.pass_rate)||"- -"})})]}),(0,L.jsxs)("li",{children:[(0,L.jsx)("strong",{children:"得分"}),(0,L.jsx)("div",{className:"mt20",children:(0,L.jsx)("span",{className:"c-orange",children:null==ze||null===(ee=ze.data)||void 0===ee?void 0:ee.score})})]}),(0,L.jsxs)("li",{children:[(0,L.jsx)("strong",{children:"练习总排名"}),(0,L.jsx)("div",{className:"mt20",children:(0,L.jsx)("span",{className:"c-orange",children:null==ze||null===(ne=ze.data)||void 0===ne?void 0:ne.total_rank})})]}),(0,L.jsxs)("li",{children:[(0,L.jsx)("strong",{children:"分班排名"}),(0,L.jsx)("div",{className:"mt20",children:(0,L.jsx)("span",{className:"c-orange",children:null==ze||null===(te=ze.data)||void 0===te?void 0:te.class_rank})})]})]})]}),(0,L.jsx)(k.Z,{style:{margin:0}}),((null==ze||null===(re=ze.data)||void 0===re?void 0:re.work_comment_hidden)||(null==ze||null===(ae=ze.data)||void 0===ae?void 0:ae.work_comment))&&(0,L.jsxs)("div",{children:[(0,L.jsxs)(_.Z,{align:"middle",children:[(0,L.jsx)(y.Z,{flex:1,children:(0,L.jsx)("h1",{className:P.title,children:"点评内容"})}),(0,L.jsx)(y.Z,{className:"pr30",children:(0,I.GJ)()&&(0,L.jsxs)(b.ZP,{onClick:i()(a()().mark((function e(){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:v.Z.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",icon:(0,L.jsx)(O.Z,{}),content:"是否确认删除?",onOk:function(){return i()(a()().mark((function e(){var n;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,D.gZ)({comment_id:null==ze||null===(n=ze.data)||void 0===n?void 0:n.comment_id,homeworkId:xe.homeworkId});case 2:0===e.sent.status&&(w.ZP.success("删除成功"),me({type:"shixunHomeworks/getShixunWorkReports",payload:l()({},xe)}));case 4:case"end":return e.stop()}}),e)})))()}});case 1:case"end":return e.stop()}}),e)}))),children:[(0,L.jsx)(C.Z,{}),"删除"]})})]}),(0,L.jsx)(k.Z,{style:{margin:0}}),(null==ze||null===(se=ze.data)||void 0===se?void 0:se.work_comment)&&(0,L.jsxs)("aside",{className:"pl30 pr30 mt20",children:[(0,L.jsx)("span",{className:"c-light-black font12",children:"# 学生和课堂老师可见"}),(0,L.jsx)("br",{}),(0,L.jsx)($.Z,{value:null==ze||null===(ie=ze.data)||void 0===ie?void 0:ie.work_comment})]}),(null==ze||null===(oe=ze.data)||void 0===oe?void 0:oe.work_comment_hidden)&&(0,L.jsxs)("aside",{className:"pl30 pr30 mt20",children:[(0,L.jsx)("span",{className:"c-light-black font12",children:"# 仅课堂老师可见"}),(0,L.jsx)("br",{}),(0,L.jsx)($.Z,{value:null==ze||null===(le=ze.data)||void 0===le?void 0:le.work_comment_hidden})]})]}),(0,L.jsx)("h1",{className:P.title,children:"阶段成绩"}),(0,L.jsx)("aside",{className:"pl30 pr30",children:(0,L.jsx)(Z.Z,{dataSource:null==ze?void 0:ze.hack,pagination:!1,columns:pn})}),(null==ze||null===(ce=ze.data)||void 0===ce?void 0:ce.work_description)&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)("h1",{className:P.title,children:"个人总结"}),(0,L.jsx)("aside",{className:"pl30 pr30",children:(0,L.jsx)($.Z,{value:null==ze||null===(de=ze.data)||void 0===de?void 0:de.work_description})})]}),(0,L.jsx)("h1",{className:P.title,children:"刷题详情"})]}),(0,L.jsx)(W,{autoHeight:Fe})]})}),(0,I.GJ)()&&(0,L.jsx)("aside",{className:"".concat(P.footerBar," ").concat(Ie?P.footerBarStatic:""),children:(0,L.jsx)("aside",{className:"edu-container",children:(0,L.jsxs)(_.Z,{align:"middle",children:[(0,L.jsx)(y.Z,{flex:"1",children:(0,L.jsx)(x.Link,{className:P.exitComment,to:"/classrooms/".concat(xe.coursesId,"/program_homework/").concat(xe.categoryId,"/detail"),children:"返回列表"})}),(0,L.jsx)(y.Z,{flex:"1",className:"tr",children:(0,I.GJ)()&&(0,L.jsx)(b.ZP,{type:"primary",onClick:i()(a()().mark((function e(){var n;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!==(n=pe.AssistantObject.hack)&&void 0!==n&&n.can_appraise||!(0,I.Rm)()){e.next=3;break}return w.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能"),e.abrupt("return");case 3:me({type:"shixunHomeworks/setActionTabs",payload:{key:"更改点评",selectArrs:{myshixun_identifier:ze.user_id,data:l()({},ze)}}});case 4:case"end":return e.stop()}}),e)}))),children:"点评作业"})})]})})})]})}),(0,L.jsx)(B,{}),(0,L.jsx)(V.Z,{}),(0,L.jsxs)(v.Z,{open:Ye,width:860,centered:!0,onCancel:function(){Qe(!1)},title:"计时规则说明",footer:null,children:[(0,L.jsxs)("div",{style:{color:"#333333",fontWeight:400},children:[(0,L.jsx)("span",{style:{fontWeight:500},children:"1、页面停留时长"}),(0,L.jsx)("br",{}),(0,L.jsx)("span",{children:"学生进入关卡的答题页面开始计时,直至学生关卡评测通过,则计时结束;"}),(0,L.jsx)("br",{}),(0,L.jsx)("span",{children:" 学生进入关卡的答题页面开始计时,若学生关闭/退出答题页面,则计时暂停,再次进入答题页面时开始累计计时直至评测通过,则计时结束;"}),(0,L.jsx)("span",{style:{color:"#FA6400",display:"flex",height:34,alignItems:"center"},children:" 可能会造成时长评估与实际做题能力不符的情况 "}),(0,L.jsx)("span",{children:"a、学生进入关卡看完题后,退出答题页面完成代码设计,再复制进平台答题页面进行评测,无法评估学生的学习和思考时间。"})]}),(0,L.jsxs)("div",{style:{color:"#333333",marginTop:20,fontWeight:400},children:[(0,L.jsx)("span",{style:{fontWeight:500},children:"2、关卡总耗时"}),(0,L.jsx)("br",{}),(0,L.jsx)("span",{style:{},children:"学生第一次进入关卡答题页面开始计时,直至该关卡评测通过,则计时结束。 "}),(0,L.jsx)("br",{}),(0,L.jsx)("span",{children:" 另,即使关卡闯关过程中,学生退出/关闭答题页面,也将持续计时,直至该关卡通过。"}),(0,L.jsx)("span",{style:{color:"#FA6400",display:"flex",height:44,paddingTop:10},children:" 可能会造成时长评估与实际做题能力不符的情况 "}),(0,L.jsx)("span",{children:"a、学生从其他同学处看到题目后,完成代码设计,再进入关卡答题页面,将已完成的代码复制至平台进行评测;"}),(0,L.jsx)("br",{}),(0,L.jsx)("span",{children:"b、学生第一次打开关卡后,因为某种原因离开页面,时隔多日才再次进入平台闯关,就会导致学生关卡总耗时过长;"})]}),(0,L.jsxs)("div",{style:{color:"#333333",marginTop:20,fontWeight:400},children:[(0,L.jsx)("span",{style:{fontWeight:500},children:"3、作业通关时长"}),(0,L.jsx)("br",{}),(0,L.jsx)("span",{style:{},children:"从老师发布的实训作业开始时间,开始计时,直至学生实训通关(包括迟交通关),结束计时。如果学生未通关,则该生的闯关耗时为老师设置的实训开始时间至实训截止时间,如果老师开启了补交,则该生的闯关耗时为实训开始时间至实训补交截止时间。"})]}),(0,L.jsxs)("div",{style:{color:"#333333",marginTop:20,fontWeight:400},children:[(0,L.jsx)("span",{style:{fontWeight:500},children:"规则目的"}),(0,L.jsx)("br",{}),(0,L.jsx)("span",{style:{},children:"鼓励学生在实训作业发布的第一时间,立即登录平台完成实训作业的通关。"})]})]}),(0,L.jsx)(v.Z,{open:tn,title:"实训总耗时说明",centered:!0,footer:null,onCancel:function(){rn(!1)},width:600,children:(0,L.jsxs)("div",{style:{fontWeight:400,color:"#333333"},children:[(0,L.jsxs)("div",{children:["1、当计时规则为“",(0,L.jsx)("span",{style:{color:"#145DFF"},children:"页面停留时长"}),"”时,实训总耗时为所有关卡耗时相加之和;"]}),(0,L.jsxs)("div",{style:{margin:"20px 0px"},children:["2、当计时规则为“",(0,L.jsx)("span",{style:{color:"#145DFF"},children:"关卡总耗时"}),"”时,实训总耗时为所有关卡耗时相加之和;"]}),(0,L.jsxs)("div",{children:["3、当计时规则为“",(0,L.jsx)("span",{style:{color:"#145DFF"},children:"作业通关时长"}),"”时,实训总耗时为实训发布时间至实训通关时间,当学生未通关时,实训总耗时为实训发布时间至实训截止时间。"]})]})})]})}))},36432:function(e,n,t){var r=t(7557),a=t.n(r),s=t(82242),i=t.n(s),o=t(41498),l=t.n(o),c=t(39647),d=t.n(c),u=(t(59301),t(43418)),p=t(8591),m=t(23634),h=t(35699),f=t(37712),x=["shixunHomeworks","dispatch"];n.Z=(0,h.connect)((function(e){return{shixunHomeworks:e.shixunHomeworks}}))((function(e){var n=e.shixunHomeworks,t=e.dispatch,r=(d()(e,x),(0,h.useParams)());return(0,f.jsxs)(u.Z,{centered:!0,title:"提示",open:"打回重做"===n.actionTabs.key,okText:"确定",cancelText:"取消",onOk:l()(a()().mark((function e(){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,m.ZP)("/api/myshixuns/".concat(n.actionTabs.selectArrs.myshixun_identifier,"/reset_my_game.json"),{method:"GET",params:{course_id:r.coursesId}});case 2:e.sent.shixun_identifier&&(p.ZP.success("操作成功"),t({type:"shixunHomeworks/setActionTabs",payload:{}}),t({type:"shixunHomeworks/getWorkList",payload:i()({},n.actionTabs.params)}));case 4:case"end":return e.stop()}}),e)}))),onCancel:function(){t({type:"shixunHomeworks/setActionTabs",payload:{}})},children:[(0,f.jsx)("p",{children:"该作业将被打回重做,学生实训记录将被清空!"}),(0,f.jsx)("p",{children:"确定打回?"})]})}))},66104:function(e,n,t){t.d(n,{Z:function(){return T}});var r=t(92310),a=t.n(r),s=t(75440),i=t(47413),o=t(59301),l=t(92343),c=t(36355),d=t(78386),u=t(91857);const p=e=>{let{children:n}=e;const{getPrefixCls:t}=o.useContext(c.E_),r=t("breadcrumb");return o.createElement("li",{className:`${r}-separator`,"aria-hidden":"true"},""===n?n:n||"/")};p.__ANT_BREADCRUMB_SEPARATOR=!0;var m=p,h=function(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)n.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(t[r[a]]=e[r[a]])}return t};function f(e,n,t,r){if(null==t)return null;const{className:s,onClick:l}=n,c=h(n,["className","onClick"]),d=Object.assign(Object.assign({},(0,i.Z)(c,{data:!0,aria:!0})),{onClick:l});return void 0!==r?o.createElement("a",Object.assign({},d,{className:a()(`${e}-link`,s),href:r}),t):o.createElement("span",Object.assign({},d,{className:a()(`${e}-link`,s)}),t)}function x(e,n){return(t,r,a,s,i)=>{if(n)return n(t,r,a,s);const o=function(e,n){if(void 0===e.title||null===e.title)return null;const t=Object.keys(n).join("|");return"object"==typeof e.title?e.title:String(e.title).replace(new RegExp(`:(${t})`,"g"),((e,t)=>n[t]||e))}(t,r);return f(e,t,o,i)}}var v=function(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)n.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(t[r[a]]=e[r[a]])}return t};const g=e=>{const{prefixCls:n,separator:t="/",children:r,menu:a,overlay:s,dropdownProps:i,href:l}=e;const c=(e=>{if(a||s){const t=Object.assign({},i);if(a){const e=a||{},{items:n}=e,r=v(e,["items"]);t.menu=Object.assign(Object.assign({},r),{items:null==n?void 0:n.map(((e,n)=>{var{key:t,title:r,label:a,path:s}=e,i=v(e,["key","title","label","path"]);let c=null!=a?a:r;return s&&(c=o.createElement("a",{href:`${l}${s}`},c)),Object.assign(Object.assign({},i),{key:null!=t?t:n,label:c})}))})}else s&&(t.overlay=s);return o.createElement(u.Z,Object.assign({placement:"bottom"},t),o.createElement("span",{className:`${n}-overlay-link`},e,o.createElement(d.Z,null)))}return e})(r);return null!=c?o.createElement(o.Fragment,null,o.createElement("li",null,c),t&&o.createElement(m,null,t)):null},j=e=>{const{prefixCls:n,children:t,href:r}=e,a=v(e,["prefixCls","children","href"]),{getPrefixCls:s}=o.useContext(c.E_),i=s("breadcrumb",n);return o.createElement(g,Object.assign({},a,{prefixCls:i}),f(i,a,t,r))};j.__ANT_BREADCRUMB_ITEM=!0;var _=j,y=t(17313),b=t(83116),k=t(37613);const w=e=>{const{componentCls:n,iconCls:t}=e;return{[n]:Object.assign(Object.assign({},(0,y.Wf)(e)),{color:e.itemColor,fontSize:e.fontSize,[t]:{fontSize:e.iconFontSize},ol:{display:"flex",flexWrap:"wrap",margin:0,padding:0,listStyle:"none"},a:Object.assign({color:e.linkColor,transition:`color ${e.motionDurationMid}`,padding:`0 ${e.paddingXXS}px`,borderRadius:e.borderRadiusSM,height:e.lineHeight*e.fontSize,display:"inline-block",marginInline:-e.marginXXS,"&:hover":{color:e.linkHoverColor,backgroundColor:e.colorBgTextHover}},(0,y.Qy)(e)),"li:last-child":{color:e.lastItemColor},[`${n}-separator`]:{marginInline:e.separatorMargin,color:e.separatorColor},[`${n}-link`]:{[`\n > ${t} + span,\n > ${t} + a\n `]:{marginInlineStart:e.marginXXS}},[`${n}-overlay-link`]:{borderRadius:e.borderRadiusSM,height:e.lineHeight*e.fontSize,display:"inline-block",padding:`0 ${e.paddingXXS}px`,marginInline:-e.marginXXS,[`> ${t}`]:{marginInlineStart:e.marginXXS,fontSize:e.fontSizeIcon},"&:hover":{color:e.linkHoverColor,backgroundColor:e.colorBgTextHover,a:{color:e.linkHoverColor}},a:{"&:hover":{backgroundColor:"transparent"}}},[`&${e.componentCls}-rtl`]:{direction:"rtl"}})}};var Z=(0,b.Z)("Breadcrumb",(e=>{const n=(0,k.TS)(e,{});return[w(n)]}),(e=>({itemColor:e.colorTextDescription,lastItemColor:e.colorText,iconFontSize:e.fontSize,linkColor:e.colorTextDescription,linkHoverColor:e.colorText,separatorColor:e.colorTextDescription,separatorMargin:e.marginXS}))),S=function(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)n.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(t[r[a]]=e[r[a]])}return t};function N(e){const{breadcrumbName:n,children:t}=e,r=S(e,["breadcrumbName","children"]),a=Object.assign({title:n},r);return t&&(a.menu={items:t.map((e=>{var{breadcrumbName:n}=e,t=S(e,["breadcrumbName"]);return Object.assign(Object.assign({},t),{title:n})}))}),a}var O=function(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)n.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(t[r[a]]=e[r[a]])}return t};const C=e=>{const{prefixCls:n,separator:t="/",style:r,className:d,rootClassName:u,routes:p,items:h,children:f,itemRender:v,params:j={}}=e,_=O(e,["prefixCls","separator","style","className","rootClassName","routes","items","children","itemRender","params"]),{getPrefixCls:y,direction:b,breadcrumb:k}=o.useContext(c.E_);let w;const S=y("breadcrumb",n),[C,T]=Z(S),I=function(e,n){return(0,o.useMemo)((()=>e||(n?n.map(N):null)),[e,n])}(h,p);const E=x(S,v);if(I&&I.length>0){const e=[],n=h||p;w=I.map(((r,a)=>{const{path:s,key:l,type:c,menu:d,overlay:u,onClick:p,className:h,separator:f,dropdownProps:x}=r,v=((e,n)=>{if(void 0===n)return n;let t=(n||"").replace(/^\//,"");return Object.keys(e).forEach((n=>{t=t.replace(`:${n}`,e[n])})),t})(j,s);void 0!==v&&e.push(v);const _=null!=l?l:a;if("separator"===c)return o.createElement(m,{key:_},f);const y={},b=a===I.length-1;d?y.menu=d:u&&(y.overlay=u);let{href:k}=r;return e.length&&void 0!==v&&(k=`#/${e.join("/")}`),o.createElement(g,Object.assign({key:_},y,(0,i.Z)(r,{data:!0,aria:!0}),{className:h,dropdownProps:x,href:k,separator:b?"":t,onClick:p,prefixCls:S}),E(r,j,n,e,k))}))}else if(f){const e=(0,s.Z)(f).length;w=(0,s.Z)(f).map(((n,r)=>{if(!n)return n;const a=r===e-1;return(0,l.Tm)(n,{separator:a?"":t,key:r})}))}const P=a()(S,null==k?void 0:k.className,{[`${S}-rtl`]:"rtl"===b},d,u,T),H=Object.assign(Object.assign({},null==k?void 0:k.style),r);return C(o.createElement("nav",Object.assign({className:P,style:H},_),o.createElement("ol",null,w)))};C.Item=_,C.Separator=m;var T=C}}]); |