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

1 line
27 KiB

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[45992],{12594:function(e,n,t){var i=t(82242),s=t.n(i),r=(t(59301),t(93314)),a=t(3113),c=t(37712);n.Z=function(e){var n=e.img,t=e.buttonProps,i=void 0===t?{}:t,l=e.styles,o=void 0===l?{}:l,d=e.customText,u=e.ButtonText,p=e.ButtonClick,f=e.Buttonclass,h=e.ButtonTwo,x=e.imgStyles,v=e.loading,m=void 0!==v&&v;return(0,c.jsxs)("section",{className:"tc animated fadeIn",style:s()(s()({},{color:"#999",margin:"100px auto",visibility:m?"hidden":"visible"}),o),children:[(0,c.jsx)("img",{src:n||r,style:s()(s()({},x),{},{pointerEvents:"none",userSelect:"none"})}),(0,c.jsx)("p",{className:"mt20 font14",children:d||"暂时还没有相关数据哦!"}),u&&(0,c.jsx)(a.ZP,s()(s()({className:f,onClick:p},i),{},{children:u})),h&&h]})}},31953:function(e,n,t){t.d(n,{Z:function(){return b}});var i=t(82242),s=t.n(i),r=t(7557),a=t.n(r),c=t(41498),l=t.n(c),o=t(79800),d=t.n(o),u=t(59301),p={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},f=t(3113),h=t(22441),x=t(60544),v=t(6848),m=t(26790),_=t(25434),g=t(12594),j=t(98571),w=t(27658),y=t(37712),b=function(e){var n,t,i,r,c,o,b=e.editOffice,Z=void 0===b?"view":b,N=e.data,k=(e.theme,e.type),I=e.filename,E=e.monacoEditor,q=e.className,A=e.style,S=e.close,P=e.onClose,R=e.hasMask,T=e.disabledDownload,C=e.onImgDimensions,O=e.showNodata,L=e.recordInfo,V=(0,u.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),z=d()(V,2),D=(z[0],z[1],(0,u.useState)("")),M=d()(D,2),F=(M[0],M[1]),B=(0,u.useState)(),W=d()(B,2),H=W[0],J=W[1],U="build"===window.ENV?"/react/build":"",$=location.host.startsWith("localhost")?j.Z.PROXY_SERVER:j.Z.API_SERVER,X=(0,u.useRef)();null!==(n=N)&&void 0!==n&&n.startsWith("/api")&&"txt"!==k&&(N=j.Z.API_SERVER+N);I&&E&&(E.filename=I),(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]&&F(n[1])}))}),[]),(0,u.useEffect)((function(){var e;"office"===k&&(N.indexOf("bigfilescdn.")>-1||N.indexOf("bigfiles1")>-1?J({url:N,fileType:(e=N,e.substring(e.lastIndexOf("/")+1).split(".").pop()),model:N.indexOf("model=edit")?"edit":"view"}):Y())}),[k,N]);var Y=function(){var e=l()(a()().mark((function e(){var n,t,i;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("data:",N),n=N,N.startsWith("http")||(n=location.origin+n),t=new URL(n).pathname.split("/").pop(),e.next=6,(0,_.gJ)({attachment_id:t});case 6:(i=e.sent).url=$+i.url,J(i);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),G=function(){N.startsWith("http")||N.startsWith("blob:")?Q():(0,m.Sv)(I||"educoder",N,I)},Q=function(){L&&(0,w.fc)({id:null==L?void 0:L.id,watch_type:1,course_id:null==L?void 0:L.course_id}),(0,m.Nd)(I||"educoder",decodeURIComponent(N))};return(0,y.jsxs)("div",{style:s()({},A||{}),className:"".concat(R&&p.bgBlack," ").concat(k?p.wrp:"hide"),children:[S&&(0,y.jsxs)("div",{className:p.close,ref:X,children:[!!C&&(0,y.jsx)(v.Z,{title:"点击对图片进行批注",getPopupContainer:function(){return X.current},children:(0,y.jsx)("span",{onClick:function(){P(),C()},children:(0,y.jsx)("i",{className:"icon-yulanpizhu"})})}),!T&&(0,y.jsx)(v.Z,{title:"点击下载此文件",getPopupContainer:function(){return X.current},children:(0,y.jsx)("span",{onClick:Q,children:(0,y.jsx)("i",{className:"icon-quxiaozhiding"})})}),(0,y.jsx)(v.Z,{title:"关闭",getPopupContainer:function(){return X.current},children:(0,y.jsx)("span",{className:"",onClick:P,children:(0,y.jsx)("i",{className:"icon-guanbi1"})})})]}),(0,y.jsx)("div",{className:"".concat(p[q]," ").concat(q," ").concat(p.monaco," ").concat("txt"===k?"show":"hide"),children:"txt"===k&&(0,y.jsx)(y.Fragment,{children:(0,y.jsx)(x.ZP,s()({},E))})}),"audio"===k&&(0,y.jsx)("audio",{src:"".concat((null===(t=N)||void 0===t?void 0:t.indexOf("http://"))>-1||(null===(i=N)||void 0===i?void 0:i.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(N),autoPlay:!0}),"video"===k&&(0,y.jsx)(y.Fragment,{children:(null===(r=N)||void 0===r?void 0:r.indexOf("http"))>-1?(0,y.jsx)("video",{controls:!0,src:"".concat(N),autoPlay:!0}):(0,y.jsx)("video",{controls:!0,src:"data:video/mp4;base64,".concat(N),autoPlay:!0})}),"office"===k&&H&&(0,y.jsx)("iframe",{src:"".concat(U,"/office.html?key=").concat(H.key,"&url=").concat(btoa(H.url),"&callbackUrl=").concat($+H.callbackUrl,"&fileType=").concat(H.fileType,"&title=").concat(H.title,"&model=").concat(Z,"&officeServer=").concat(j.Z.ONLYOFFICE,"&disabledDownload=").concat(!!T)}),"html"===k&&(0,y.jsx)("iframe",{src:N+"&disposition=inline"}),"pdf"===k&&(0,y.jsx)("iframe",{src:"".concat(U,"/js/pdfview/index.html?filename=").concat(I||"educoder.pdf","&url=").concat(encodeURIComponent(N),"&disabledDownload=").concat(!!T)}),"image"===k&&(0,y.jsx)("img",{src:"".concat((null===(c=N)||void 0===c?void 0:c.indexOf("http://"))>-1||(null===(o=N)||void 0===o?void 0:o.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(N)}),("other"===k||"download"===k)&&(0,y.jsx)(y.Fragment,{children:O?(0,y.jsx)(g.Z,{customText:"当前文件不支持预览,可点击下载查看",ButtonTwo:(0,y.jsx)(f.ZP,{icon:(0,y.jsx)("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:G,disabled:T,children:"下载"})}):(0,y.jsxs)(f.ZP,{type:"primary",size:"middle",onClick:G,disabled:T,children:[(0,y.jsx)(h.Z,{}),"点击下载"]})})]})}},92919:function(e,n,t){t.d(n,{z:function(){return y}});var i=t(82242),s=t.n(i),r=t(37205),a=t.n(r),c=t(91232),l=t.n(c),o=t(79800),d=t.n(o),u=t(59301),p=(t(52210),t(42763)),f=(t(64018),t(40309)),h=t(98571),x=t(26790),v=t(15342),m=t(1012),_=t(31953),g=t(37712),j="@▁@",w=/<pre[^>]*>/g;var y=function(e,n){e=e||"";var t=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return n?e.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(t,(function(e,n,t,i,s,r,a){var c=n||i||r,l=t||s||a||"?";return h.Z.API_SERVER+"/api/attachments/"+c+l+"&t="+(0,x.Jn)(c,Date.now())+(e.indexOf(")")>-1?")":"&")})).replaceAll('src="(','src="').replaceAll("src='(",'src="'):e=e.replace(/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,(function(e,n,t,i,s,r,a){var c=n||i||r,l=t||s||a||"?";return h.Z.API_SERVER+"/attachments/download/"+c+l+"&t="+(0,x.Jn)(c,Date.now())+(e.indexOf(")")>-1?")":"&")})).replace(t,(function(e,n,t,i,s,r,a){var c=n||i||r,l=t||s||a||"?";return h.Z.API_SERVER+"/api/attachments/"+c+l+"&t="+(0,x.Jn)(c,Date.now())+(e.indexOf(")")>-1?")":"&")})).replace(/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,(function(e,n,t,i,s){var r=n||i,a=t||s||"";return'"'+h.Z.API_SERVER+"/api/attachments/"+r+a+r+a+"&t="+(0,x.Jn)(r,Date.now())})).replace(/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,(function(e,n,t,i,s){var r=n||i,a=t||s||"";return"("+h.Z.API_SERVER+"/files/uploads/"+r+a+r+a+"&t="+(0,x.Jn)(r,Date.now())})).replaceAll('src="(','src="').replaceAll("src='(",'src="').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")};n.Z=function(e){var n=e.value,t=void 0===n?"":n,i=e.className,r=e.showTextOnly,c=e.showLines,o=e.style,x=void 0===o?{}:o,y=e.stylesPrev,b=void 0===y?{}:y,Z=e.highlightKeywords,N=e.showProgramFill,k=(e.isProgramFill,e.disabledFill),I=void 0!==k&&k,E=e.programFillValue,q=e.onFillChange,A=void 0===q?function(e){}:q,S=e.onFillBlur,P=void 0===S?function(){}:S,R=e.onFillFocus,T=void 0===R?function(){}:R,C=String(t),O=(0,u.useState)(""),L=d()(O,2),V=L[0],z=L[1],D=(0,u.useState)("office"),M=d()(D,2),F=M[0],B=M[1],W=(0,u.useState)([]),H=d()(W,2),J=H[0],U=H[1],$=(0,u.useRef)("a"+(0,m.Z)()),X={};var Y=function(e){return e.replace(/<style.*?>([\s\S]+?)<\/style>/gim,(function(e,n){var t=n.replace(/(\n|\r)/g,"").split("}"),i=[];return t.map((function(e){""!=e&&i.push(".".concat($.current," ").concat(e))})),"<style>".concat(i.join("}"),"</style>")}))},G=(0,u.useMemo)((function(){try{C=C.replace(/\(\/attachments\/download\//g,"("+h.Z.API_SERVER+"/attachments/download/").replace(/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,"("+h.Z.API_SERVER+"/api/attachments/").replace(/\"\/api\/attachments\/|\"\/attachments\/download\//g,'"'+h.Z.API_SERVER+"/api/attachments/").replace(/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,'"'+h.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(N){var e=-1;return C=C.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,(function(n,t,i){var s;return function(e,n,t){var i=document.createElement(e===j?"input":"textarea");i.style.width="100%",i.style.height=e===j?"40px":"151px",i.rows=5,i.spellcheck=!1,i.name="edu-program-fill",i.placeholder="请输入",i.dataset.id=n;var s=Object.keys(X).length;return X[s]=i,'<span class="edu-program-fill-wrap '.concat(e===j?"":"show",'" style="width:').concat(e===j?"400px":"100%",'" title=').concat(t||"","><span>").concat(i.outerHTML,'<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>')}(n,++e,null==E||null===(s=E[e])||void 0===s?void 0:s.value.replaceAll("<","&lt;").replaceAll(">","&gt;"))})),'<pre style="background:#fff;padding:4px">'.concat(Y(C||""),"</pre>")}var n=Y(C);n=(0,p.ZP)(n);var t=(0,p.ez)();C.match(/\[TOC\]/)&&(n=n.replace("<p>[TOC]</p>",(0,p.Qv)()),(0,p.Iy)()),n=n.replace(/(__special_katext_id_\d+__)/g,(function(e,n){var i=t[n],s=i.type,r=i.expression;return(0,v.renderToString)(function(e){var n=document.createElement("div");return n.innerHTML=e,0===n.childNodes.length?"":n.childNodes[0].nodeValue}(r)||"",{displayMode:"block"===s,throwOnError:!1,output:"html"})})),n=n.replace(/▁/g,"▁▁▁▁▁"),(0,p.AL)();var i=document.createElement("div");return i.innerHTML=n,r?i.innerText:Z?(ne(i,Z.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),i.innerHTML):(setTimeout((function(){return se()}),500),i.innerHTML)}),[C,Z]);(0,u.useEffect)((function(){te.current&&te.current.querySelectorAll(["input","textarea"]).forEach((function(e){e.oninput=Q,e.onblur=K,e.onfocus=ee}))}),[J]),(0,u.useEffect)((function(){if(null!=E&&E.length)try{var e,n=te.current.querySelectorAll(".edu-program-fill-score"),t=te.current.querySelectorAll('[name="edu-program-fill"]'),i=l()(t.entries());try{for(i.s();!(e=i.n()).done;){var s,r,a,c=d()(e.value,2),o=c[0],u=c[1];u.value=(null==E||null===(s=E[o])||void 0===s?void 0:s.value)||"","warning"===(null==E||null===(r=E[o])||void 0===r?void 0:r.type)?u.className="program-fill-warning":"success"===(null==E||null===(a=E[o])||void 0===a?void 0:a.type)?u.className="program-fill-success":u.className=""}}catch(e){i.e(e)}finally{i.f()}var p,f=l()(n.entries());try{for(f.s();!(p=f.n()).done;){var h,x,v=d()(p.value,2),m=v[0];v[1].innerHTML=null!=E&&null!==(h=E[m])&&void 0!==h&&h.score?"".concat(null==E||null===(x=E[m])||void 0===x?void 0:x.score,"分"):""}}catch(e){f.e(e)}finally{f.f()}U(E)}catch(e){console.log(e,"error")}}),[E]);var Q=function(e){J[e.target.dataset.id]=J[e.target.dataset.id]||{},J[e.target.dataset.id].value=e.target.value,U(a()(J)),A(J,e.target.dataset.id)},K=function(e){J[e.target.dataset.id]=J[e.target.dataset.id]||{},J[e.target.dataset.id].value=e.target.value,U(a()(J)),P(J,e.target.dataset.id)},ee=function(e){J[e.target.dataset.id]=J[e.target.dataset.id]||{},J[e.target.dataset.id].value=e.target.value,U(a()(J)),T(J,e.target.dataset.id)};function ne(e,n){return e.childNodes.forEach((function(e){if(e.childNodes.length>0)ne(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 i=document.createElement("span");i.innerHTML=e.textContent.replace(new RegExp(n,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),e.replaceWith(i)}}))}var te=(0,u.useRef)();function ie(e){var n=e.target;if("A"===n.tagName.toUpperCase()){var t=n.getAttribute("href");if(t.indexOf("office")>-1)e.preventDefault(),z(t),B("office");else if(t.indexOf("application/pdf")>-1)e.preventDefault(),z(t),B("pdf");else if(t.indexOf("text/html")>-1)e.preventDefault(),z(t),B("html");else if(t.startsWith("#")){e.preventDefault();var i=document.getElementById(t.replace("#",""));i&&i.scrollIntoView(!0)}}}p.jb.WebkitLineClamp=c,c&&(x=s()(s()({},x),p.jb));var se=function(){var e,n=null===(e=te.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(f.ZP.isSupported()){var n=new f.ZP;n.loadSource(e.src),n.attachMedia(e)}}))};return(0,u.useEffect)((function(){if(te.current&&G&&G.match(w)&&window.PR.prettyPrint(),te.current)return te.current.addEventListener("click",ie),function(){var e;null===(e=te.current)||void 0===e||e.removeEventListener("click",ie),(0,p.AL)(),(0,p.Iy)()}}),[G,te.current,ie]),(0,u.useEffect)((function(){var e,n=function(e){e.preventDefault(),e.clipboardData.setData("text",window.getSelection().toString())};return null===(e=te.current)||void 0===e||e.addEventListener("copy",n),function(){var e;null===(e=te.current)||void 0===e||e.removeEventListener("copy",n)}}),[te.current]),(0,g.jsxs)(g.Fragment,{children:[r&&(0,g.jsx)("div",{ref:te,children:G}),!r&&(0,g.jsx)("div",{ref:te,style:s()({},x),className:"".concat(i||""," ").concat(I?"disabled-fill":""," markdown-body ").concat($.current),dangerouslySetInnerHTML:{__html:G}}),(0,g.jsx)(_.Z,{close:!0,data:V,type:null!=V&&V.length?F:"",style:s()({},b),onClose:function(){return z("")}})]})}},64672:function(e,n,t){t.r(n),t.d(n,{default:function(){return T}});var i=t(7557),s=t.n(i),r=t(41498),a=t.n(r),c=t(82242),l=t.n(c),o=t(79800),d=t.n(o),u=t(39647),p=t.n(u),f=t(59301),h=t(59822),x=t(8591),v=t(94001),m=t(3113),_=t(66104),g=t(95237),j=t(43604),w=t(28103),y=t(79817),b=t(5112),Z=t(92832),N=t(40362),k=t(25434),I=t(92919),E=t(37712),q=function(e){var n=e.data,t=(0,f.useState)(!1),i=d()(t,2),s=i[0],r=i[1];return(0,E.jsx)("section",{children:function(){var e;switch(n.question_type){case 3:return(0,E.jsxs)("aside",{children:[(0,E.jsx)("span",{style:{cursor:"pointer"},className:"font12 c-blue",onClick:function(){r(!s)},children:s?"隐藏参考答案":"查看参考答案"}),s&&(0,E.jsx)("div",{children:null==n||null===(e=n.standard_answer)||void 0===e?void 0:e.map((function(e,n){var t;return(0,E.jsxs)(g.Z,{className:"mt10",children:[(0,E.jsx)(j.Z,{flex:"50px",children:(0,E.jsxs)("span",{className:"mt10",children:["填空",e.choice_id]})}),(0,E.jsx)(j.Z,{flex:1,children:null==e||null===(t=e.answer_text)||void 0===t?void 0:t.map((function(e,n){return(0,E.jsx)("div",{style:{border:"1px solid #eee",padding:"15px 10px 0 10px"},children:e})}))})]})}))})]});case 4:return(0,E.jsxs)("aside",{children:[(0,E.jsx)("span",{style:{cursor:"pointer"},className:"font12 c-blue",onClick:function(){r(!s)},children:s?"隐藏参考答案":"查看参考答案"}),s&&(0,E.jsx)("div",{children:(0,E.jsx)(I.Z,{value:n.standard_answer.join(" ")})})]})}}()})},A={flex_box_center:"flex_box_center___rZhUX",flex_space_between:"flex_space_between___WSWPP",flex_box_vertical_center:"flex_box_vertical_center___Fl2CQ",flex_box_center_end:"flex_box_center_end___zIA_L",flex_box_column:"flex_box_column___wpPM2",bg:"bg___PTvAX",title:"title___NRpL_",questionIcons:"questionIcons___qftEo",green:"green___DII_f",orange:"orange___nqaHJ",greenTip:"greenTip___NQ5fc",redTip:"redTip___BYmiY",orangeTip:"orangeTip___wlzcb",cuttOff:"cuttOff___Y19D3"},S=t(26790),P=["exercise","globalSetting","loading","user","dispatch"],R=["单选题","多选题","判断题","填空题","简答题","实训题"],T=(0,h.connect)((function(e){var n=e.exercise,t=e.loading,i=e.user;return{exercise:n,globalSetting:e.globalSetting,user:i,loading:t.effects}}))((function(e){var n,t,i,r,c,o,u,T,C,O,L,V,z,D,M,F,B,W,H=e.exercise,J=(e.globalSetting,e.loading,e.user),U=e.dispatch,$=(p()(e,P),(0,h.useParams)()),X=J.userInfo,Y=H.reviewGroupExercise,G=(0,f.useState)({}),Q=d()(G,2),K=Q[0],ee=Q[1],ne=(0,f.useState)(!1),te=d()(ne,2),ie=te[0],se=te[1],re=(0,f.useRef)();console.log(K);var ae=function(){var e;console.log($,222);var n=localStorage["".concat(null==J||null===(e=J.userInfo)||void 0===e?void 0:e.login,"-").concat($.coursesId,"-").concat($.exerciseId,"-filter")];return n=n?JSON.parse(n):{},"[object Object]"!==Object.prototype.toString.call(n)?{}:n};(0,f.useEffect)((function(){var e;null!=J&&null!==(e=J.userInfo)&&void 0!==e&&e.login&&ce()}),[null==J||null===(n=J.userInfo)||void 0===n?void 0:n.login]);var ce=function(){var e=ae();U({type:"exercise/getReviewGroupExercise",payload:l()({exerciseId:$.exerciseId},e)})},le=function(){var e=a()(s()().mark((function e(n){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=ae(),e.next=3,(0,k.LP)(l()({cover_all:!0,id:n.question_id,max_score:K[n.q_position].max,min_score:K[n.q_position].min,comment:K.comment},t));case 3:0===e.sent.status&&(delete K[n.q_position],ce(),x.ZP.success("批量调分成功"));case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),oe=function(e){var n,t,i;if(e.question_type>1)return K[e.q_position]?(0,E.jsxs)("div",{className:"mr10 ml10 inline-block",children:["在以下区间中为学生随机赋分:",(0,E.jsx)(v.Z,{placeholder:"最低",defaultValue:e.user_score,max:e.question_score,min:0,onChange:function(n){K[e.q_position].min=String(n),ee(l()({},K))}}),(0,E.jsx)("div",{className:A.cuttOff}),(0,E.jsx)(v.Z,{placeholder:"最高",defaultValue:e.user_score,max:e.question_score,min:(null===(n=K[e.q_position])||void 0===n?void 0:n.min)||0,onChange:function(n){K[e.q_position].max=String(n),ee(l()({},K))}}),"分",(0,E.jsx)(m.ZP,{className:"ml5",type:"primary",disabled:!(null!==(t=K[e.q_position])&&void 0!==t&&t.min&&null!==(i=K[e.q_position])&&void 0!==i&&i.max),onClick:function(){return le(e)},children:"确认"})]}):(0,E.jsx)("span",{style:{cursor:"pointer"},onClick:function(){K[e.q_position]={},ee(l()({},K))},className:"c-blue mr10 ml10",children:"调分"})};return(0,E.jsxs)("section",{className:"edu-container",ref:re,children:[(0,E.jsxs)("section",{className:"animated fadeIn",children:[(0,E.jsx)("aside",{className:"mt10",children:X&&(0,E.jsxs)(_.Z,{separator:">",children:[(0,E.jsx)(_.Z.Item,{children:(0,E.jsx)(h.Link,{to:"".concat(X.first_category_url),children:null==X||null===(t=X.course)||void 0===t?void 0:t.course_name})}),(0,E.jsx)(_.Z.Item,{children:(0,E.jsx)(h.Link,{to:"/classrooms/".concat($.coursesId,"/exercise"),children:"试卷列表"})}),(0,E.jsx)(_.Z.Item,{children:(0,E.jsx)(h.Link,{to:"/classrooms/".concat($.coursesId,"/exercise/").concat($.exerciseId,"/detail"),children:"试卷详情"})}),(0,E.jsx)(_.Z.Item,{children:null==Y||null===(i=Y.exercise_answer_user)||void 0===i?void 0:i.user_name})]})}),(0,E.jsx)("aside",{className:[A.title,"mt20"].join(" "),children:(0,E.jsxs)(g.Z,{style:{width:"100%"},children:[(0,E.jsxs)(j.Z,{flex:"1",children:[(0,E.jsx)(h.Link,{to:"/classrooms/".concat($.coursesId,"/exercise/").concat($.exerciseId,"/detail"),children:(0,E.jsx)(N.Z,{className:"font16 c-black"})}),(0,E.jsx)("strong",{className:"font20 ml5",children:null==Y||null===(r=Y.exercise)||void 0===r?void 0:r.exercise_name}),(0,E.jsx)(S.VV,{status:[S.ju[null===(c=Y.exercise)||void 0===c?void 0:c.exercise_status]]})]}),(0,E.jsx)(j.Z,{})]})})]}),(0,E.jsxs)("section",{className:[A.bg,"pt30","pl30","pr30","pb30","mt20"].join(" "),children:[(0,E.jsx)(g.Z,{gutter:[30,0],children:(0,E.jsx)(j.Z,{className:"bold c-black",children:(0,E.jsxs)("aside",{children:[(0,E.jsxs)("span",{children:["考试时长 ",-1===(null===(o=Y.exercise)||void 0===o?void 0:o.time)?"未限时":null===(u=Y.exercise)||void 0===u?void 0:u.time]}),(0,E.jsxs)("span",{className:"ml20",children:["满分 ",null===(T=Y.exercise_scores)||void 0===T||null===(T=T.exercise_types)||void 0===T?void 0:T.q_scores,"分"]})]})})}),(0,E.jsx)(w.Z,{}),(0,E.jsx)(g.Z,{gutter:[30,0],children:(0,E.jsxs)(j.Z,{flex:"1",children:[(0,E.jsx)("span",{className:"c-light-black",children:"您正在对以下学生进行批量评阅:"}),(0,E.jsx)("span",{children:null===(C=Y.exercise_answer_user)||void 0===C?void 0:C.user_name})]})}),(0,E.jsxs)(g.Z,{gutter:[30,0],children:[(0,E.jsx)(j.Z,{span:24,className:"mt10",children:null==Y||null===(O=Y.exercise_users)||void 0===O?void 0:O.map((function(e,n){if(n<100)return(0,E.jsx)("strong",{className:"mr10",children:e.user_name},n)}))}),(0,E.jsx)(j.Z,{span:24,className:"tr",children:(null==Y||null===(L=Y.exercise_users)||void 0===L?void 0:L.length)>100&&(0,E.jsxs)("span",{children:["......等",null==Y||null===(V=Y.exercise_users)||void 0===V?void 0:V.length,"人"]})})]}),(0,E.jsx)(w.Z,{}),(null==Y||null===(z=Y.exercise_questions)||void 0===z?void 0:z.some((function(e){return 4!==e.question_type})))&&(0,E.jsxs)("aside",{children:[(0,E.jsxs)(g.Z,{gutter:[10,10],children:[(0,E.jsxs)(j.Z,{flex:"1",children:[(0,E.jsxs)("aside",{children:[(0,E.jsx)("strong",{className:"font14",children:"客观题"}),(0,E.jsx)("span",{className:A.greenTip,children:"正确"}),(0,E.jsx)("span",{className:A.redTip,children:"错误"}),(0,E.jsx)("span",{className:A.redTip,children:"部分得分"})]}),(0,E.jsx)("aside",{className:[A.questionIcons,"mt10"].join(" "),children:(0,E.jsx)(y.Z,{affix:!1,onChange:function(){return se(!0)},children:null==Y||null===(D=Y.exercise_questions)||void 0===D?void 0:D.map((function(e,n){if(4!==e.question_type)return(0,E.jsx)(y.Z.Link,{href:"#questionID-".concat(e.q_position),title:e.q_position})}))})})]}),(0,E.jsxs)(j.Z,{children:["总分 ",(0,E.jsx)("span",{className:"c-red bold",children:null===(M=Y.exercise_scores)||void 0===M||null===(M=M.exercise_types)||void 0===M?void 0:M.q_scores})," 分"]})]}),(0,E.jsxs)("p",{className:"c-blue tr",onClick:function(){return se(!ie)},children:[ie?"收起答题详情":"展开查看答题详情",(0,E.jsx)("span",{className:"iconfont icon-play-square-fill3x ml5"})]}),(0,E.jsx)(w.Z,{})]}),(0,E.jsxs)(g.Z,{gutter:[10,10],children:[(0,E.jsxs)(j.Z,{flex:"1",children:[(0,E.jsxs)("aside",{children:[(0,E.jsx)("strong",{className:"font14",children:"主观题"}),(0,E.jsx)("span",{className:A.greenTip,children:"已评"}),(0,E.jsx)("span",{className:A.redTip,children:"未评"})]}),(0,E.jsx)("aside",{className:[A.questionIcons,"mt10"].join(" "),children:(0,E.jsx)(y.Z,{affix:!1,children:null==Y||null===(F=Y.exercise_questions)||void 0===F?void 0:F.map((function(e,n){if(4===e.question_type)return(0,E.jsx)(y.Z.Link,{href:"#questionID-".concat(e.q_position),title:e.q_position,children:" "})}))})})]}),(0,E.jsxs)(j.Z,{children:["总分 ",(0,E.jsx)("span",{className:"c-red bold",children:null===(B=Y.exercise_scores)||void 0===B||null===(B=B.exercise_types)||void 0===B?void 0:B.q_mains_scores})," 分"]})]}),null===(W=Y.exercise_questions)||void 0===W?void 0:W.map((function(e,n){var t;return(0,E.jsxs)("aside",{id:"questionID-".concat(e.q_position),className:"".concat(ie||4===e.question_type?"":"hide"),children:[(0,E.jsxs)(g.Z,{children:[(0,E.jsxs)(j.Z,{flex:"1",children:[(0,E.jsxs)("span",{className:"c-blue font14",children:[e.q_position,". ",R[e.question_type]]}),(0,E.jsxs)("span",{className:"c-light-black ml5",children:["(",e.question_score,")"]})]}),(0,E.jsxs)(j.Z,{children:[e.standard_answer_show&&(0,E.jsxs)("span",{children:["正确答案:",e.standard_answer_show]}),oe(e),e.user_score&&(0,E.jsxs)("span",{children:["得分",(0,E.jsx)("span",{className:"c-red",children:e.user_score}),"分"]}),!e.user_score&&(0,E.jsx)("span",{className:"c-red",children:"未评"})]})]}),(0,E.jsx)("div",{children:(0,E.jsx)(I.Z,{value:e.question_title})}),(0,E.jsx)("div",{children:null===(t=e.question_choices)||void 0===t?void 0:t.map((function(n,t){return(0,E.jsx)("div",{children:(0,E.jsx)(b.ZP,{checked:e.user_answer.includes(n.choice_id),children:n.choice_text})})}))}),(0,E.jsx)(q,{data:e}),K[e.q_position]?(0,E.jsx)(Z.Z.TextArea,{onChange:function(e){K.comment=String(e.target.value),ee(l()({},K))},placeholder:"请输入评语最大限制100个字符",maxLength:100}):null,(0,E.jsx)(w.Z,{})]})}))]})]})}))},42763:function(e,n,t){t.d(n,{AL:function(){return y},Iy:function(){return p},Qv:function(){return x},ez:function(){return w},jb:function(){return f}});var i=t(79800),s=t.n(i),r=t(32834),a=t.n(r),c=t(11690);var l=[],o=["<ul>"],d=new(a().Renderer),u=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function p(){l.length=0,o=["<ul>"]}var f={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function h(e,n,t,i){if(n>=e.length||e[n].level<=t)return n;var s=e[n];i.push("<li><a href='#"+s.anchor+"'>"+s.text+"</a>");var r=[];return n=h(e,++n,s.level,r),r.length>0&&(i.push("<ul>"),r.forEach((function(e){i.push(e)})),i.push("</ul>")),i.push("</li>"),n=h(e,n,t,i)}function x(){return h(l,0,0,o),o.push("</ul>"),o.join("")}var v={heading:function(e){var n=u.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],i=function(e,n){var t=e.match(/^(\s+)(?:```)/);if(null===t)return n;var i=t[1];return n.split("\n").map((function(e){var n=e.match(/^\s+/);return null===n?e:s()(n,1)[0].length>=i.length?e.slice(i.length):e})).join("\n")}(t,n[3]||""),r=n[2]?n[2].trim():n[2];if(["latex","katex","math"].indexOf(r)>=0){var a=g(),c=i;i=a,j[a]={type:"block",expression:c}}return{type:"code",raw:t,lang:r,text:i}}}},m=/(?:\${2})([^\n`]+?)(?:\${2})/gi,_=0,g=function(){return"__special_katext_id_".concat(_++,"__")},j={};function w(){return j}function y(){_=0,j={}}function b(e){return e=e.replace(m,(function(e,n){var t=g();return j[t]={type:"inline",expression:n},t}))}var Z=d.listitem;d.listitem=function(e){return Z(b(e))};var N=d.paragraph;d.paragraph=function(e){return N(b(e))};var k=d.tablecell;d.tablecell=function(e,n){return k(b(e),n)},d.code=function(e,n,t){var i=(n||"").match(/\S*/)[0];return i?["latex","katex","math"].indexOf(i)>=0?"<p class='editormd-tex'>".concat(e,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(n,'">').concat(t?e:(0,c.escape)(e,!0),"</code></pre>\n"):'<pre class="prettyprint linenums"><code>'+(t?e:(0,c.escape)(e,!0))+"</code></pre>"},d.heading=function(e,n,t){var i=this.options.headerPrefix+t.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return l.push({anchor:i,level:n,text:e}),"<h"+n+' id="'+i+'">'+e+"</h"+n+">"},a().setOptions({silent:!0,gfm:!0,pedantic:!1}),a().use({tokenizer:v,renderer:d}),n.ZP=a()}}]);