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
26 KiB

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[45992],{52943: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,m=e.loading,v=void 0!==m&&m;return(0,c.jsxs)("section",{className:"tc animated fadeIn",style:s()(s()({},{color:"#999",margin:"100px auto",visibility:v?"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]})}},19936:function(e,n,t){t.d(n,{Z:function(){return y}});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(74516),x=t(72620),m=t(6848),v=t(11298),_=t(56370),g=t(52943),j=t(22107),w=t(12712),b=t(37712),y=function(e){var n,t,i,r,c,o,y=e.editOffice,Z=void 0===y?"view":y,N=e.data,k=(e.theme,e.type),I=e.filename,q=e.monacoEditor,E=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),B=(M[0],M[1]),F=(0,u.useState)(),W=d()(F,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&&(q.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]&&B(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,v.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,v.Nd)(I||"educoder",decodeURIComponent(N))};return(0,b.jsxs)("div",{style:s()({},A||{}),className:"".concat(R&&p.bgBlack," ").concat(k?p.wrp:"hide"),children:[S&&(0,b.jsxs)("div",{className:p.close,ref:X,children:[!!C&&(0,b.jsx)(m.Z,{title:"点击对图片进行批注",getPopupContainer:function(){return X.current},children:(0,b.jsx)("span",{onClick:function(){P(),C()},children:(0,b.jsx)("i",{className:"icon-yulanpizhu"})})}),!T&&(0,b.jsx)(m.Z,{title:"点击下载此文件",getPopupContainer:function(){return X.current},children:(0,b.jsx)("span",{onClick:Q,children:(0,b.jsx)("i",{className:"icon-quxiaozhiding"})})}),(0,b.jsx)(m.Z,{title:"关闭",getPopupContainer:function(){return X.current},children:(0,b.jsx)("span",{className:"",onClick:P,children:(0,b.jsx)("i",{className:"icon-guanbi1"})})})]}),(0,b.jsx)("div",{className:"".concat(p[E]," ").concat(E," ").concat(p.monaco," ").concat("txt"===k?"show":"hide"),children:"txt"===k&&(0,b.jsx)(b.Fragment,{children:(0,b.jsx)(x.ZP,s()({},q))})}),"audio"===k&&(0,b.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,b.jsx)(b.Fragment,{children:(null===(r=N)||void 0===r?void 0:r.indexOf("http"))>-1?(0,b.jsx)("video",{controls:!0,src:"".concat(N),autoPlay:!0}):(0,b.jsx)("video",{controls:!0,src:"data:video/mp4;base64,".concat(N),autoPlay:!0})}),"office"===k&&H&&(0,b.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,b.jsx)("iframe",{src:N+"&disposition=inline"}),"pdf"===k&&(0,b.jsx)("iframe",{src:"".concat(U,"/js/pdfview/index.html?url=").concat(encodeURIComponent(N),"&disabledDownload=").concat(!!T)}),"image"===k&&(0,b.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,b.jsx)(b.Fragment,{children:O?(0,b.jsx)(g.Z,{customText:"当前文件不支持预览,可点击下载查看",ButtonTwo:(0,b.jsx)(f.ZP,{icon:(0,b.jsx)("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:G,disabled:T,children:"下载"})}):(0,b.jsxs)(f.ZP,{type:"primary",size:"middle",onClick:G,disabled:T,children:[(0,b.jsx)(h.Z,{}),"点击下载"]})})]})}},28388:function(e,n,t){t.d(n,{z:function(){return b}});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(75384),t(46418)),f=(t(64018),t(77373)),h=t(22107),x=t(11298),m=t(15342),v=t(1012),_=t(19936),g=t(37712),j="@▁@",w=/<pre[^>]*>/g;var b=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,b=e.stylesPrev,y=void 0===b?{}:b,Z=e.highlightKeywords,N=e.showProgramFill,k=(e.isProgramFill,e.disabledFill),I=void 0!==k&&k,q=e.programFillValue,E=e.onFillChange,A=void 0===E?function(e){}:E,S=e.onFillBlur,P=void 0===S?function(){}:S,R=String(t),T=(0,u.useState)(""),C=d()(T,2),O=C[0],L=C[1],V=(0,u.useState)("office"),z=d()(V,2),D=z[0],M=z[1],B=(0,u.useState)([]),F=d()(B,2),W=F[0],H=F[1],J=(0,u.useRef)("a"+(0,v.Z)()),U={};var $=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(J.current," ").concat(e))})),"<style>".concat(i.join("}"),"</style>")}))},X=(0,u.useMemo)((function(){try{R=R.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 R=R.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(U).length;return U[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==q||null===(s=q[e])||void 0===s?void 0:s.value.replaceAll("<","&lt;").replaceAll(">","&gt;"))})),'<pre style="background:#fff;padding:4px">'.concat($(R||""),"</pre>")}var n=$(R);n=(0,p.ZP)(n);var t=(0,p.ez)();R.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,m.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?(Q(i,Z.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),i.innerHTML):(setTimeout((function(){return ne()}),500),i.innerHTML)}),[R,Z]);(0,u.useEffect)((function(){K.current&&K.current.querySelectorAll(["input","textarea"]).forEach((function(e){e.oninput=Y,e.onblur=G}))}),[W]),(0,u.useEffect)((function(){if(null!=q&&q.length)try{var e,n=K.current.querySelectorAll(".edu-program-fill-score"),t=K.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==q||null===(s=q[o])||void 0===s?void 0:s.value)||"","warning"===(null==q||null===(r=q[o])||void 0===r?void 0:r.type)?u.className="program-fill-warning":"success"===(null==q||null===(a=q[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,m=d()(p.value,2),v=m[0];m[1].innerHTML=null!=q&&null!==(h=q[v])&&void 0!==h&&h.score?"".concat(null==q||null===(x=q[v])||void 0===x?void 0:x.score,"分"):""}}catch(e){f.e(e)}finally{f.f()}H(q)}catch(e){console.log(e,"error")}}),[q]);var Y=function(e){W[e.target.dataset.id]=W[e.target.dataset.id]||{},W[e.target.dataset.id].value=e.target.value,H(a()(W)),A(W,e.target.dataset.id)},G=function(e){W[e.target.dataset.id]=W[e.target.dataset.id]||{},W[e.target.dataset.id].value=e.target.value,H(a()(W)),P(W,e.target.dataset.id)};function Q(e,n){return e.childNodes.forEach((function(e){if(e.childNodes.length>0)Q(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 K=(0,u.useRef)();function ee(e){var n=e.target;if("A"===n.tagName.toUpperCase()){var t=n.getAttribute("href");if(t.indexOf("office")>-1)e.preventDefault(),L(t),M("office");else if(t.indexOf("application/pdf")>-1)e.preventDefault(),L(t),M("pdf");else if(t.indexOf("text/html")>-1)e.preventDefault(),L(t),M("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 ne=function(){var e,n=null===(e=K.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(K.current&&X&&X.match(w)&&window.PR.prettyPrint(),K.current)return K.current.addEventListener("click",ee),function(){var e;null===(e=K.current)||void 0===e||e.removeEventListener("click",ee),(0,p.AL)(),(0,p.Iy)()}}),[X,K.current,ee]),(0,g.jsxs)(g.Fragment,{children:[r&&(0,g.jsx)("div",{ref:K,children:X}),!r&&(0,g.jsx)("div",{ref:K,style:s()({},x),className:"".concat(i||""," ").concat(I?"disabled-fill":""," markdown-body ").concat(J.current),dangerouslySetInnerHTML:{__html:X}}),(0,g.jsx)(_.Z,{close:!0,data:O,type:null!=O&&O.length?D:"",style:s()({},y),onClose:function(){return L("")}})]})}},81633: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(75102),x=t(8591),m=t(94001),v=t(3113),_=t(66104),g=t(95237),j=t(43604),w=t(28103),b=t(79817),y=t(5112),Z=t(98135),N=t(22596),k=t(56370),I=t(28388),q=t(37712),E=function(e){var n=e.data,t=(0,f.useState)(!1),i=d()(t,2),s=i[0],r=i[1];return(0,q.jsx)("section",{children:function(){var e;switch(n.question_type){case 3:return(0,q.jsxs)("aside",{children:[(0,q.jsx)("span",{style:{cursor:"pointer"},className:"font12 c-blue",onClick:function(){r(!s)},children:s?"隐藏参考答案":"查看参考答案"}),s&&(0,q.jsx)("div",{children:null==n||null===(e=n.standard_answer)||void 0===e?void 0:e.map((function(e,n){var t;return(0,q.jsxs)(g.Z,{className:"mt10",children:[(0,q.jsx)(j.Z,{flex:"50px",children:(0,q.jsxs)("span",{className:"mt10",children:["填空",e.choice_id]})}),(0,q.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,q.jsx)("div",{style:{border:"1px solid #eee",padding:"15px 10px 0 10px"},children:e})}))})]})}))})]});case 4:return(0,q.jsxs)("aside",{children:[(0,q.jsx)("span",{style:{cursor:"pointer"},className:"font12 c-blue",onClick:function(){r(!s)},children:s?"隐藏参考答案":"查看参考答案"}),s&&(0,q.jsx)("div",{children:(0,q.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(11298),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,B,F,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,q.jsxs)("div",{className:"mr10 ml10 inline-block",children:["在以下区间中为学生随机赋分:",(0,q.jsx)(m.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,q.jsx)("div",{className:A.cuttOff}),(0,q.jsx)(m.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,q.jsx)(v.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,q.jsx)("span",{style:{cursor:"pointer"},onClick:function(){K[e.q_position]={},ee(l()({},K))},className:"c-blue mr10 ml10",children:"调分"})};return(0,q.jsxs)("section",{className:"edu-container",ref:re,children:[(0,q.jsxs)("section",{className:"animated fadeIn",children:[(0,q.jsx)("aside",{className:"mt10",children:X&&(0,q.jsxs)(_.Z,{separator:">",children:[(0,q.jsx)(_.Z.Item,{children:(0,q.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,q.jsx)(_.Z.Item,{children:(0,q.jsx)(h.Link,{to:"/classrooms/".concat($.coursesId,"/exercise"),children:"试卷列表"})}),(0,q.jsx)(_.Z.Item,{children:(0,q.jsx)(h.Link,{to:"/classrooms/".concat($.coursesId,"/exercise/").concat($.exerciseId,"/detail"),children:"试卷详情"})}),(0,q.jsx)(_.Z.Item,{children:null==Y||null===(i=Y.exercise_answer_user)||void 0===i?void 0:i.user_name})]})}),(0,q.jsx)("aside",{className:[A.title,"mt20"].join(" "),children:(0,q.jsxs)(g.Z,{style:{width:"100%"},children:[(0,q.jsxs)(j.Z,{flex:"1",children:[(0,q.jsx)(h.Link,{to:"/classrooms/".concat($.coursesId,"/exercise/").concat($.exerciseId,"/detail"),children:(0,q.jsx)(N.Z,{className:"font16 c-black"})}),(0,q.jsx)("strong",{className:"font20 ml5",children:null==Y||null===(r=Y.exercise)||void 0===r?void 0:r.exercise_name}),(0,q.jsx)(S.VV,{status:[S.ju[null===(c=Y.exercise)||void 0===c?void 0:c.exercise_status]]})]}),(0,q.jsx)(j.Z,{})]})})]}),(0,q.jsxs)("section",{className:[A.bg,"pt30","pl30","pr30","pb30","mt20"].join(" "),children:[(0,q.jsx)(g.Z,{gutter:[30,0],children:(0,q.jsx)(j.Z,{className:"bold c-black",children:(0,q.jsxs)("aside",{children:[(0,q.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,q.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,q.jsx)(w.Z,{}),(0,q.jsx)(g.Z,{gutter:[30,0],children:(0,q.jsxs)(j.Z,{flex:"1",children:[(0,q.jsx)("span",{className:"c-light-black",children:"您正在对以下学生进行批量评阅:"}),(0,q.jsx)("span",{children:null===(C=Y.exercise_answer_user)||void 0===C?void 0:C.user_name})]})}),(0,q.jsxs)(g.Z,{gutter:[30,0],children:[(0,q.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,q.jsx)("strong",{className:"mr10",children:e.user_name},n)}))}),(0,q.jsx)(j.Z,{span:24,className:"tr",children:(null==Y||null===(L=Y.exercise_users)||void 0===L?void 0:L.length)>100&&(0,q.jsxs)("span",{children:["......等",null==Y||null===(V=Y.exercise_users)||void 0===V?void 0:V.length,"人"]})})]}),(0,q.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,q.jsxs)("aside",{children:[(0,q.jsxs)(g.Z,{gutter:[10,10],children:[(0,q.jsxs)(j.Z,{flex:"1",children:[(0,q.jsxs)("aside",{children:[(0,q.jsx)("strong",{className:"font14",children:"客观题"}),(0,q.jsx)("span",{className:A.greenTip,children:"正确"}),(0,q.jsx)("span",{className:A.redTip,children:"错误"}),(0,q.jsx)("span",{className:A.redTip,children:"部分得分"})]}),(0,q.jsx)("aside",{className:[A.questionIcons,"mt10"].join(" "),children:(0,q.jsx)(b.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,q.jsx)(b.Z.Link,{href:"#questionID-".concat(e.q_position),title:e.q_position})}))})})]}),(0,q.jsxs)(j.Z,{children:["总分 ",(0,q.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,q.jsxs)("p",{className:"c-blue tr",onClick:function(){return se(!ie)},children:[ie?"收起答题详情":"展开查看答题详情",(0,q.jsx)("span",{className:"iconfont icon-play-square-fill3x ml5"})]}),(0,q.jsx)(w.Z,{})]}),(0,q.jsxs)(g.Z,{gutter:[10,10],children:[(0,q.jsxs)(j.Z,{flex:"1",children:[(0,q.jsxs)("aside",{children:[(0,q.jsx)("strong",{className:"font14",children:"主观题"}),(0,q.jsx)("span",{className:A.greenTip,children:"已评"}),(0,q.jsx)("span",{className:A.redTip,children:"未评"})]}),(0,q.jsx)("aside",{className:[A.questionIcons,"mt10"].join(" "),children:(0,q.jsx)(b.Z,{affix:!1,children:null==Y||null===(B=Y.exercise_questions)||void 0===B?void 0:B.map((function(e,n){if(4===e.question_type)return(0,q.jsx)(b.Z.Link,{href:"#questionID-".concat(e.q_position),title:e.q_position,children:" "})}))})})]}),(0,q.jsxs)(j.Z,{children:["总分 ",(0,q.jsx)("span",{className:"c-red bold",children:null===(F=Y.exercise_scores)||void 0===F||null===(F=F.exercise_types)||void 0===F?void 0:F.q_mains_scores})," 分"]})]}),null===(W=Y.exercise_questions)||void 0===W?void 0:W.map((function(e,n){var t;return(0,q.jsxs)("aside",{id:"questionID-".concat(e.q_position),className:"".concat(ie||4===e.question_type?"":"hide"),children:[(0,q.jsxs)(g.Z,{children:[(0,q.jsxs)(j.Z,{flex:"1",children:[(0,q.jsxs)("span",{className:"c-blue font14",children:[e.q_position,". ",R[e.question_type]]}),(0,q.jsxs)("span",{className:"c-light-black ml5",children:["(",e.question_score,")"]})]}),(0,q.jsxs)(j.Z,{children:[e.standard_answer_show&&(0,q.jsxs)("span",{children:["正确答案:",e.standard_answer_show]}),oe(e),e.user_score&&(0,q.jsxs)("span",{children:["得分",(0,q.jsx)("span",{className:"c-red",children:e.user_score}),"分"]}),!e.user_score&&(0,q.jsx)("span",{className:"c-red",children:"未评"})]})]}),(0,q.jsx)("div",{children:(0,q.jsx)(I.Z,{value:e.question_title})}),(0,q.jsx)("div",{children:null===(t=e.question_choices)||void 0===t?void 0:t.map((function(n,t){return(0,q.jsx)("div",{children:(0,q.jsx)(y.ZP,{checked:e.user_answer.includes(n.choice_id),children:n.choice_text})})}))}),(0,q.jsx)(E,{data:e}),K[e.q_position]?(0,q.jsx)(Z.Z.TextArea,{onChange:function(e){K.comment=String(e.target.value),ee(l()({},K))},placeholder:"请输入评语最大限制100个字符",maxLength:100}):null,(0,q.jsx)(w.Z,{})]})}))]})]})}))},46418:function(e,n,t){t.d(n,{AL:function(){return b},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 m={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}}}},v=/(?:\${2})([^\n`]+?)(?:\${2})/gi,_=0,g=function(){return"__special_katext_id_".concat(_++,"__")},j={};function w(){return j}function b(){_=0,j={}}function y(e){return e=e.replace(v,(function(e,n){var t=g();return j[t]={type:"inline",expression:n},t}))}var Z=d.listitem;d.listitem=function(e){return Z(y(e))};var N=d.paragraph;d.paragraph=function(e){return N(y(e))};var k=d.tablecell;d.tablecell=function(e,n){return k(y(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:m,renderer:d}),n.ZP=a()}}]);