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

1 line
34 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

(self.webpackChunk=self.webpackChunk||[]).push([[53247],{17064:function(e,n,t){"use strict";var r=t(79800),o=t.n(r),s=t(59301),l=t(25750),i=(t(48136),t(97618)),a=t(43418),c=t(37712),u=(0,s.forwardRef)((function(e,n){var t=e.callback,r=e.width,u=e.onChange,d=e.disabled,_=e.readOnly,p=e.type,m=void 0===p?"":p,f=e.value,v=void 0===f?"":f,h=e.style,x=void 0===h?{}:h,b=(0,s.useRef)(),g=(0,s.useRef)(),y=(0,s.useState)(0),j=o()(y,2),w=j[0],N=j[1],S=(0,s.useState)(0),C=o()(S,2),k=C[0],O=C[1],A=(0,s.useState)(!1),Z=o()(A,2),E=Z[0],T=Z[1],B=function(){var e=document.createElement("div");e.innerHTML=b.current.getValue();var n=e.innerText;return t&&t(n),n};(0,s.useImperativeHandle)(n,(function(){return{getData:B}}));var P=function(e,n,t,r){var o=document.body.clientHeight,s=document.body.clientWidth;return!(e<20&&t>e||e>s-20&&t<e||n<20&&r>n||n>o-20&&r<n)||(document.body.onmousemove=null,document.body.onmouseup=null,!1)};(0,s.useEffect)((function(){E&&setTimeout((function(){var e=document.getElementsByClassName("markdown-popup-form")[0],n=window.innerWidth/2-e.offsetWidth/2,t=window.innerHeight/2-e.offsetHeight/2;N(n),O(t)}),0)}),[E]);return(0,c.jsxs)("div",{style:x,children:[(0,c.jsx)("div",{style:{width:r||"100%",position:"relative"},className:"".concat(l.Z.mathFillWrap," ").concat(d||_?"cursorDefault":""),onClick:function(){d||_||T(!0)},children:(0,c.jsx)("math-field",{disabled:d,locale:"zh_cn",class:"".concat(l.Z.mathField," ").concat(m),readOnly:_,placeholder:"请输入公式",ref:b,style:{width:"100%",fontSize:v?18:14},value:v||""})}),(0,c.jsx)(a.Z,{maskClosable:!1,centered:!0,width:860,style:{position:"absolute",left:w,top:k},title:(0,c.jsx)("div",{style:{cursor:"move"},onMouseDown:function(e){e.preventDefault();var n=e.clientX-w,t=e.clientY-k;document.body.onmousemove=function(e){var r=e.clientX-n,o=e.clientY-t,s=document.getElementsByClassName("markdown-popup-form")[0],l=window.innerWidth-s.offsetWidth,i=window.innerHeight-s.offsetHeight;r=Math.max(0,Math.min(r,l)),o=Math.max(0,Math.min(o,i)),P(e.clientX,e.clientY,n,t)&&(N(r),O(o))},document.body.onmouseup=function(){document.body.onmousemove=null}},children:"输入公式"}),open:E,onOk:function(){var e=g.current.getData();b.current.setValue(e),u(e),T(!1)},onCancel:function(){T(!1)},destroyOnClose:!0,className:"markdown-popup-form",children:(0,c.jsx)(i.Z,{value:v,ref:g,onChange:u,showSaveButton:!1})})]})}));n.Z=u},81842:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return M}});var r=t(7557),o=t.n(r),s=t(41498),l=t.n(s),i=t(37205),a=t.n(i),c=t(82242),u=t.n(c),d=t(79800),_=t.n(d),p=t(59301),m=t(51876),f=t(92832),v=t(8591),h=t(95237),x=t(43604),b=t(5112),g=t(28103),y=t(61998),j=t(66104),w=t(3113),N=t(38854),S=t(43418),C={bg:"bg___vBzoO",wrap:"wrap___rrSkg",programTitle:"programTitle___kPWjL",btnWrapper:"btnWrapper___F_tyj",btn:"btn___ToWSe",titleForExport:"titleForExport___lhBnq",flexRow:"flexRow___cvXQo",flexColumn:"flexColumn___cTDFf",flexJustifyBetween:"flexJustifyBetween___vy_7r",relative:"relative____B_F8",questionNumber:"questionNumber___V4g28",score:"score___dNKpj",selectTopicButton:"selectTopicButton___NO9DO",line:"line___j553x",dragTip:"dragTip___AaESI",typeActive:"typeActive___dLHVW",mouseTypeActive:"mouseTypeActive___N_Yv8",typeName:"typeName___bdcw3",typeNumber:"typeNumber___B6Fic",typeAction:"typeAction___O3dpz",setScore:"setScore___GA5cK",delete:"delete___O2OvN",modal:"modal___0ENtb",table:"table___ZRr4b",glassSeal:"glassSeal___C7Vpa",export_type_modal:"export_type_modal___ldAtg",export_type_modal_con:"export_type_modal_con___Y9iST",type_item:"type_item___cWirW",img_warp:"img_warp___G7xtB",img_warp_active:"img_warp_active___rw33a"},k=t(39804),O=t(46855),A=t(75895),Z=t(12957),E=t(47670),T=t(27627),B=t(91810),P=t(82011),F=t(24334),I=t(9580),D=t(17064),R=t(37712),q=f.Z.TextArea,H=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],M=(0,m.connect)((function(e){var n=e.paperlibrary,t=e.user,r=e.loading,o=e.globalSetting,s=e.newExercisePaper;return{paperlibrary:n,user:t,globalSetting:o,loading:r.effects,newExercisePaper:s}}))((function(e){var n,r,s,i,c,d,f,M,z,$,W,X=e.newExercisePaper,L=e.isExportBlank,U=void 0!==L&&L,V=e.paperlibrary,J=e.user,Y=(e.globalSetting,e.loading,e.dispatch),K=((0,m.useLocation)(),(0,m.useParams)()),G=(0,m.useSearchParams)(),Q=_()(G,1)[0],ee=(0,p.useState)(),ne=_()(ee,2),te=ne[0],re=ne[1],oe=(0,p.useRef)(),se=(0,p.useState)(),le=_()(se,2),ie=le[0],ae=le[1],ce=(0,p.useState)(),ue=_()(ce,2),de=ue[0],_e=ue[1],pe=(0,p.useState)([]),me=_()(pe,2),fe=me[0],ve=me[1],he=(0,p.useState)(!1),xe=_()(he,2),be=xe[0],ge=xe[1],ye=(0,p.useState)(""),je=_()(ye,2),we=je[0],Ne=je[1],Se=(0,p.useState)(!1),Ce=_()(Se,2),ke=Ce[0],Oe=Ce[1],Ae=(0,p.useState)(!1),Ze=_()(Ae,2),Ee=Ze[0],Te=Ze[1];(0,p.useEffect)((function(){return Y({type:"globalSetting/footerToggle",payload:!1}),function(){Y({type:"globalSetting/footerToggle",payload:!0})}}),[]),(0,p.useEffect)((function(){oe.current=null==K?void 0:K.id,re(Q.get("defaultActiveKey")),Ie(),Pe(),Be()}),[]),(0,p.useEffect)((function(){var e;if(null!==(e=X.exerciseExportHeadData)&&void 0!==e&&e.title){var n=X.exerciseExportHeadData;ae(u()({},n||{}));var t,r,o=(n||{}).table;(null!=o&&o.total_singles_scores||null!=o&&o.total_doubles_scores||null!=o&&o.total_nulls_scores||null!=o&&o.total_judges_scores||null!=o&&o.total_pros_scores||null!=o&&o.total_shixuns_scores||null!=o&&o.total_mains_scores||null!=o&&o.total_combination_scores||null!=o&&o.total_bpros_scores)&&(t=Number(null==o?void 0:o.total_singles_scores)+Number(null==o?void 0:o.total_doubles_scores)+Number(null==o?void 0:o.total_nulls_scores)+Number(null==o?void 0:o.total_judges_scores)+Number(null==o?void 0:o.total_pros_scores)+Number(null==o?void 0:o.total_shixuns_scores)+Number(null==o?void 0:o.total_mains_scores)+Number(null==o?void 0:o.total_combination_scores)+Number(null==o?void 0:o.total_bpros_scores)),(null!=o&&o.singles_scores||null!=o&&o.doubles_scores||null!=o&&o.nulls_scores||null!=o&&o.judges_scores||null!=o&&o.pros_scores||null!=o&&o.bpros_scores||null!=o&&o.shixuns_scores||null!=o&&o.mains_scores||null!=o&&o.combination_scores)&&(r=Number(null==o?void 0:o.singles_scores)+Number(null==o?void 0:o.doubles_scores)+Number(null==o?void 0:o.nulls_scores)+Number(null==o?void 0:o.judges_scores)+Number(null==o?void 0:o.pros_scores)+Number(null==o?void 0:o.bpros_scores)+Number(null==o?void 0:o.shixuns_scores)+Number(null==o?void 0:o.mains_scores)+Number(null==o?void 0:o.combination_scores));var s=[{key:"1",name:"应得分",singles_score:null==o?void 0:o.total_singles_scores,doubles_score:null==o?void 0:o.total_doubles_scores,nulls_score:null==o?void 0:o.total_nulls_scores,judges_score:null==o?void 0:o.total_judges_scores,pros_score:null==o?void 0:o.total_pros_scores,bpros_score:null==o?void 0:o.total_bpros_scores,shixuns_score:null==o?void 0:o.total_shixuns_scores,mains_score:null==o?void 0:o.total_mains_scores,combinations_score:null==o?void 0:o.total_combination_scores,total_score:t},{key:"2",name:"实得分",singles_score:null==o?void 0:o.singles_scores,doubles_score:null==o?void 0:o.doubles_scores,nulls_score:null==o?void 0:o.nulls_scores,judges_score:null==o?void 0:o.judges_scores,pros_score:null==o?void 0:o.pros_scores,bpros_score:null==o?void 0:o.bpros_scores,shixuns_score:null==o?void 0:o.shixuns_scores,mains_score:null==o?void 0:o.mains_scores,combinations_score:null==o?void 0:o.combination_scores,total_score:r},{key:"3",name:"评卷人"}],l=[{key:"1",name:"应得分",singles_score:null==o?void 0:o.total_singles_scores,doubles_score:null==o?void 0:o.total_doubles_scores,nulls_score:null==o?void 0:o.total_nulls_scores,judges_score:null==o?void 0:o.total_judges_scores,pros_score:null==o?void 0:o.total_pros_scores,bpros_score:null==o?void 0:o.total_bpros_scores,shixuns_score:null==o?void 0:o.total_shixuns_scores,mains_score:null==o?void 0:o.total_mains_scores,combinations_score:null==o?void 0:o.combination_scores,total_score:t},{key:"2",name:"实得分"},{key:"3",name:"评卷人"}];_e(a()(U?l:s))}}),[X.exerciseExportHeadData]);var Be=function(){var e=l()(o()().mark((function e(){var n,t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,A.cV)({id:K.id});case 2:return 0==(t=e.sent).status&&ve(t.data),e.next=6,Pe();case 6:Q.get("exportPDF")&&null!==(n=V.paperData)&&void 0!==n&&n.questionList&&(v.ZP.info("正在导出空白试卷pdf"),(0,O.F)(De.current.children,"导出试卷"));case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Pe=function(){var e=l()(o()().mark((function e(){var n,t,r,s,l,i;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,A.Dq)(K.id);case 2:n=e.sent,ae(n||{}),(null!=(t=(n||{}).table)&&t.total_singles_scores||null!=t&&t.total_doubles_scores||null!=t&&t.total_nulls_scores||null!=t&&t.total_judges_scores||null!=t&&t.total_pros_scores||null!=t&&t.total_shixuns_scores||null!=t&&t.total_mains_scores||null!=t&&t.total_combination_scores||null!=t&&t.total_bpros_scores)&&(r=Number(null==t?void 0:t.total_singles_scores)+Number(null==t?void 0:t.total_doubles_scores)+Number(null==t?void 0:t.total_nulls_scores)+Number(null==t?void 0:t.total_judges_scores)+Number(null==t?void 0:t.total_pros_scores)+Number(null==t?void 0:t.total_shixuns_scores)+Number(null==t?void 0:t.total_mains_scores)+Number(null==t?void 0:t.total_combination_scores)+Number(null==t?void 0:t.total_bpros_scores)),(null!=t&&t.singles_scores||null!=t&&t.doubles_scores||null!=t&&t.nulls_scores||null!=t&&t.judges_scores||null!=t&&t.pros_scores||null!=t&&t.bpros_scores||null!=t&&t.shixuns_scores||null!=t&&t.mains_scores||null!=t&&t.combinations_score)&&(s=Number(null==t?void 0:t.singles_scores)+Number(null==t?void 0:t.doubles_scores)+Number(null==t?void 0:t.nulls_scores)+Number(null==t?void 0:t.judges_scores)+Number(null==t?void 0:t.pros_scores)+Number(null==t?void 0:t.bpros_scores)+Number(null==t?void 0:t.shixuns_scores)+Number(null==t?void 0:t.mains_scores)+Number(null==t?void 0:t.combinations_score)),l=[{key:"1",name:"应得分",singles_score:null==t?void 0:t.total_singles_scores,doubles_score:null==t?void 0:t.total_doubles_scores,nulls_score:null==t?void 0:t.total_nulls_scores,judges_score:null==t?void 0:t.total_judges_scores,pros_score:null==t?void 0:t.total_pros_scores,bpros_score:null==t?void 0:t.total_bpros_scores,shixuns_score:null==t?void 0:t.total_shixuns_scores,combinations_score:null==t?void 0:t.total_combination_scores,mains_score:null==t?void 0:t.total_mains_scores,total_score:r},{key:"2",name:"实得分",singles_score:null==t?void 0:t.singles_scores,doubles_score:null==t?void 0:t.doubles_scores,nulls_score:null==t?void 0:t.nulls_scores,judges_score:null==t?void 0:t.judges_scores,pros_score:null==t?void 0:t.pros_scores,bpros_score:null==t?void 0:t.bpros_scores,shixuns_score:null==t?void 0:t.shixuns_scores,mains_score:null==t?void 0:t.mains_scores,combinations_score:null==t?void 0:t.combination_scores,total_score:s},{key:"3",name:"评卷人"}],i=[{key:"1",name:"应得分"},{key:"2",name:"实得分"},{key:"3",name:"评卷人"}],_e(U?i:l);case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Fe=[{width:"9%",title:"题型",align:"center",dataIndex:"name",render:function(e){return(0,R.jsx)("a",{children:e})}},{width:"9%",title:(null===(n=fe.find((function(e){return e.value==Z.f[0].nameType})))||void 0===n?void 0:n.name)||Z.f[0].name,align:"center",dataIndex:"singles_score",render:function(e){return(0,R.jsx)("a",{children:"0.0"===e?0:e})}},{width:"9%",title:(null===(r=fe.find((function(e){return e.value==Z.f[1].nameType})))||void 0===r?void 0:r.name)||Z.f[1].name,align:"center",dataIndex:"doubles_score",render:function(e){return(0,R.jsx)("a",{children:"0.0"===e?0:e})}},{width:"9%",title:(null===(s=fe.find((function(e){return e.value==Z.f[3].nameType})))||void 0===s?void 0:s.name)||Z.f[3].name,align:"center",dataIndex:"nulls_score",render:function(e){return(0,R.jsx)("a",{children:"0.0"===e?0:e})}},{width:"9%",title:(null===(i=fe.find((function(e){return e.value==Z.f[2].nameType})))||void 0===i?void 0:i.name)||Z.f[2].name,align:"center",dataIndex:"judges_score",render:function(e){return(0,R.jsx)("a",{children:"0.0"===e?0:e})}},{width:"9%",title:(null===(c=fe.find((function(e){return e.value==Z.f[6].nameType})))||void 0===c?void 0:c.name)||Z.f[6].name,align:"center",dataIndex:"pros_score",render:function(e){return(0,R.jsx)("a",{children:"0.0"===e?0:e})}},{width:"9%",title:(null===(d=fe.find((function(e){return e.value==Z.f[5].nameType})))||void 0===d?void 0:d.name)||Z.f[5].name,align:"center",dataIndex:"shixuns_score",render:function(e){return(0,R.jsx)("a",{children:"0.0"===e?0:e})}},{width:"9%",title:(null===(f=fe.find((function(e){return e.value==Z.f[4].nameType})))||void 0===f?void 0:f.name)||Z.f[4].name,align:"center",dataIndex:"mains_score",render:function(e){return(0,R.jsx)("a",{children:"0.0"===e?0:e})}},{width:"9%",title:(null===(M=fe.find((function(e){return e.value==Z.f[7].nameType})))||void 0===M?void 0:M.name)||Z.f[7].name,align:"center",dataIndex:"combinations_score",render:function(e){return(0,R.jsx)("a",{children:"0.0"===e?0:e})}},{width:"10%",title:(null===(z=fe.find((function(e){return e.value==Z.f[8].nameType})))||void 0===z?void 0:z.name)||Z.f[8].name,align:"center",dataIndex:"bpros_score",render:function(e){return(0,R.jsx)("a",{children:"0.0"===e?0:e})}},{width:"9%",title:"总分",align:"center",dataIndex:"total_score",render:function(e){return(0,R.jsx)("a",{children:"0.0"===e?0:e?parseFloat(e).toFixed(1):""})}}],Ie=function(e){Y({type:"paperlibrary/getPaperData",payload:u()({id:oe.current},e)})},De=(0,p.useRef)(),Re=(0,p.useState)(!0),qe=_()(Re,2),He=qe[0],Me=qe[1],ze=function(){var e=l()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Me(!1),Ne(""),ge(!0);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),$e=function(){var e=l()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Me(!0),Ne(""),ge(!0);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),We=function(){var e=l()(o()().mark((function e(){var n,t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Oe(!0),e.next=3,(0,B.Mb)({categoryId:oe.current});case 3:n=e.sent,Oe(!1),null!=n&&n.exercise_id&&(0,T.xg)("/classrooms/coursesId/exercise/".concat(n.exercise_id,"/").concat(null===(t=J.userInfo)||void 0===t?void 0:t.login,"/initate_answer"));case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Xe=function e(n,t,r){var o,s,l,i,a,c,u,d,_,p,m,f;return(0,R.jsxs)(R.Fragment,{children:[!r&&(0,R.jsxs)("div",{style:{display:"flex"},className:C.programTitle,children:[(0,R.jsxs)("span",{style:{flexShrink:0},className:"font18",children:[t+1,"."]}),(0,R.jsx)(P.Z,{style:{maxWidth:1100,overflow:"auto"},value:n.name||(null==n?void 0:n.shixun_name)}),(0,R.jsxs)("span",{style:{flexShrink:0},className:"font16",children:["",7===(null==n?void 0:n.question_type)?"共".concat(null==n?void 0:n.sub_count,"小题"):""," ",n.score,"分)"]})]}),8===(null==n?void 0:n.question_type)&&(0,R.jsx)(P.Z,{showProgramFill:!0,disabledFill:!0,value:F.Base64.decode((null==n||null===(o=n.program_attr)||void 0===o?void 0:o.code)||"")}),n.question_type===I.c.Single&&(0,R.jsx)(R.Fragment,{children:null===(s=n.choices)||void 0===s?void 0:s.map((function(e,n){return(0,R.jsx)(h.Z,{children:(0,R.jsx)(x.Z,{flex:"1",children:(0,R.jsxs)("div",{style:{display:"flex"},children:[(0,R.jsx)("div",{style:{lineHeight:"24px",flexShrink:0},children:H[n]}),(0,R.jsx)(P.Z,{value:e.choice_text||""})]})})},n)}))}),n.question_type===I.c.Multiple&&(0,R.jsx)(R.Fragment,{children:null===(l=n.choices)||void 0===l?void 0:l.map((function(e,n){return(0,R.jsx)(h.Z,{children:(0,R.jsx)(x.Z,{flex:"1",children:(0,R.jsxs)("div",{style:{display:"flex"},children:[(0,R.jsx)("div",{style:{lineHeight:"24px",flexShrink:0},children:H[n]}),(0,R.jsx)(P.Z,{value:e.choice_text||""})]})})},n)}))}),n.question_type===I.c.Judge&&(0,R.jsx)("div",{className:C.flexRow,children:null===(i=n.choices)||void 0===i?void 0:i.map((function(e,n){return(0,R.jsxs)(h.Z,{children:[(0,R.jsx)(x.Z,{flex:"25px",children:(0,R.jsx)("div",{style:{width:25,overflow:"hidden"},children:(0,R.jsx)(b.ZP,{disabled:!0,style:{width:25,marginLeft:1===n&&10}})})}),(0,R.jsx)(x.Z,{flex:"1",style:{marginLeft:1===n&&10},children:e.choice_text})]},n)}))}),n.question_type===I.c.Combine&&(0,R.jsx)(R.Fragment,{children:null===(a=n.sub_questions)||void 0===a?void 0:a.map((function(n,r){return(0,R.jsxs)("div",{style:{marginLeft:10},children:[(0,R.jsxs)("div",{style:{display:"flex"},className:C.programTitle,children:[(0,R.jsxs)("span",{style:{flexShrink:0},className:"font18",children:[t+1,".",r+1]}),(0,R.jsx)(P.Z,{value:n.name||(null==n?void 0:n.shixun_name)}),(0,R.jsxs)("span",{style:{flexShrink:0},className:"font16",children:["",n.score,"分)"]})]}),e(n,r,!0)]})}))}),He&&(0,R.jsxs)("div",{style:{marginTop:10},children:[(null==n?void 0:n.question_type)<3&&(null==n?void 0:n.standard_answer_show)&&(0,R.jsxs)("span",{className:"font16 ",children:["正确答案:",null==n?void 0:n.standard_answer_show]}),!(null==n||null===(c=n.standard_answer)||void 0===c||!c.length)&&He&&3===(null==n?void 0:n.question_type)&&(0,R.jsx)("div",{children:null==n||null===(u=n.standard_answer)||void 0===u?void 0:u.map((function(e,n){return(0,R.jsxs)("div",{children:[(0,R.jsxs)("span",{children:["参考答案:(填空",n+1,":"]}),(0,R.jsx)("div",{children:1===(null==e?void 0:e.model)?(0,R.jsx)(q,{autoSize:!0,disabled:!0,value:null==e?void 0:e.answer_text[0]}):(0,R.jsx)(D.Z,{value:null==e?void 0:e.answer_text[0],disabled:!0})})]})}))}),!(null==n||null===(d=n.standard_answer)||void 0===d||!d.length)&&He&&8===(null==n?void 0:n.question_type)&&(0,R.jsx)("div",{children:null==n||null===(_=n.standard_answer)||void 0===_?void 0:_.map((function(e,n){return(0,R.jsxs)("div",{children:[(0,R.jsxs)("span",{children:["参考答案:(填空",n+1,":"]}),(0,R.jsx)("div",{children:(0,R.jsx)(q,{autoSize:!0,disabled:!0,value:(null==e?void 0:e.answer_text)||""})})]})}))}),!(null==n||null===(p=n.answer_texts)||void 0===p||!p.length)&&4===(null==n?void 0:n.question_type)&&(0,R.jsxs)("div",{children:[(0,R.jsx)("p",{className:"mt10 mb0",children:"参考答案:"}),(0,R.jsx)("div",{style:{border:"1px solid #eee",background:"#f5f5f5",borderRadius:4,padding:5},children:(0,R.jsx)(P.Z,{value:null==n||null===(m=n.answer_texts)||void 0===m?void 0:m[0]})})]}),6===(null==n?void 0:n.question_type)&&(0,R.jsxs)("div",{children:[(0,R.jsxs)("p",{className:"mt10 mb0",children:["参考答案:",!(null!=n&&n.answer_text)&&"暂无"]}),(null==n?void 0:n.answer_text)&&(0,R.jsx)("div",{style:{border:"1px solid #eee",background:"#f5f5f5",borderRadius:4,padding:5},children:(0,R.jsx)(P.Z,{value:null==n?void 0:n.answer_text})})]}),(null==n?void 0:n.question_type)<=4&&((null==n?void 0:n.standard_answer_show)||(null==n||null===(f=n.standard_answer)||void 0===f?void 0:f.length)>0)&&(0,R.jsxs)(h.Z,{style:{marginTop:14},children:[(0,R.jsx)("span",{className:"font16 ",children:"解析:"}),(0,R.jsx)(P.Z,{className:C.renderHtml,value:(null==n?void 0:n.analysis)||"暂无解析"})]})]}),!r&&(0,R.jsx)(g.Z,{})]})},Le=(0,p.useCallback)((function(){var e;return(0,R.jsxs)("div",{children:[(0,R.jsx)("div",{className:C.titleForExport,children:null===(e=V.paperData)||void 0===e||null===(e=e.exam)||void 0===e?void 0:e.name}),(0,R.jsxs)("div",{style:{textAlign:"center",fontSize:"15px"},children:["共:【",null==ie?void 0:ie.large_counts,"大题】【",null==ie?void 0:ie.total_count,"小题】【 满分",null==ie?void 0:ie.score,"分】 考试时间:【",(null==ie?void 0:ie.time)>-1?"".concat(null==ie?void 0:ie.time,"分钟"):"不限","】"]}),!(null==ie||!ie.exercise_description)&&(0,R.jsxs)("pre",{style:{fontSize:14,marginBottom:30,marginTop:20,textAlign:"left",color:"#3A3A3A"},children:[(0,R.jsx)("b",{children:"试卷须知:"}),null==ie?void 0:ie.exercise_description]}),(0,R.jsx)(y.Z,{style:{margin:"20px auto"},className:C.table,columns:Fe,dataSource:a()(de||[]),bordered:!0,pagination:!1})]})}),[V.paperData]);return(0,R.jsxs)("section",{className:C.bg,children:[(0,R.jsxs)(h.Z,{className:"mt30",justify:"space-between",children:[(0,R.jsxs)(j.Z,{separator:">",children:[(0,R.jsx)(j.Z.Item,{href:"/paperlibrary",children:"试卷库"}),(0,R.jsx)(j.Z.Item,{href:"/paperlibrary?defaultActiveKey=".concat(te),children:"1"===te?"公开":"2"===te?"团队共享":"我创建的"}),(0,R.jsx)(j.Z.Item,{children:"试卷详情"})]}),(0,R.jsxs)("div",{className:C.btnWrapper,children:[(0,R.jsx)(w.ZP,{onClick:function(){Y({type:"paperlibrary/setActionTabs",payload:{key:"Paperlibrary-SendToClass",params:{id:oe.current}}})},className:C.btn,icon:(0,R.jsx)("i",{className:"iconfont icon-fasongtongzhi font14"}),children:"发送至课堂"}),(0,R.jsx)(w.ZP,{onClick:function(){return m.history.push("/paperlibrary/add/".concat(oe.current,"?type=2"))},className:C.btn,icon:(0,R.jsx)("i",{className:"iconfont icon-bianji10 font14"}),children:"编辑试卷"}),(0,R.jsx)(w.ZP,{loading:ke,onClick:We,className:C.btn,icon:(0,R.jsx)("i",{className:"iconfont icon-monikaoshi2 font14"}),children:"模拟考试"}),(0,R.jsx)(N.Z,{menu:{items:[{key:"1",label:(0,R.jsx)("div",{onClick:$e,children:"导出空白试卷+答案"})},{key:"2",label:(0,R.jsx)("div",{onClick:ze,children:"导出空白试卷"})}]},children:(0,R.jsx)(w.ZP,{type:"primary",icon:(0,R.jsx)("i",{className:"iconfont icon-daochu1 font14"}),children:"导出"})})]})]}),(0,R.jsxs)("div",{className:"".concat(C.wrap," pt20 pb20"),ref:De,id:"paperDomRef",children:[!(null!==($=V.paperData)&&void 0!==$&&null!==($=$.questionList)&&void 0!==$&&$.length)&&Le(),null===(W=V.paperData)||void 0===W||null===(W=W.questionList)||void 0===W?void 0:W.map((function(e,n){var t;return(0,R.jsx)(R.Fragment,{children:null===(t=e.questions)||void 0===t?void 0:t.map((function(t,r){var o=Math.floor(r/10);return r%10==0?(0,R.jsxs)("div",{className:"abc",children:[0===n&&0===r&&Le(),0===r&&(0,R.jsxs)("div",{children:[(0,R.jsxs)("span",{className:"font16 c-light-primary",children:[e.number,"、",e.name]}),(0,R.jsxs)("span",{className:"c-grey-999",children:["(共",e.questions_count,"题,",7===(null==e?void 0:e.question_type)?"包含".concat(null==e?void 0:e.sub_count,"小题;"):"","共",e.questions_score,"分)"]})]}),e.questions.slice(r,r+10).map((function(e,n){return(0,R.jsx)("div",{children:Xe(e,r+n)},e.id)}))]},"group-".concat(o)):null}))})}))]}),(0,R.jsx)(k.Z,{}),(0,R.jsx)(S.Z,{width:450,title:"请选择需要导出的格式",open:be,onCancel:function(){Ee?v.ZP.info("导出中请勿关闭窗口"):ge(!1)},okButtonProps:{loading:Ee},onOk:l()(o()().mark((function e(){var n;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Te(!0),""!=we){e.next=7;break}return Te(!1),v.ZP.info("请选择一种导出格式"),e.abrupt("return");case 7:if("pdf"!=we){e.next=12;break}return e.next=10,(0,O.F)(De.current.children,null===(n=V.paperData)||void 0===n||null===(n=n.exam)||void 0===n?void 0:n.name);case 10:e.next=13;break;case 12:"word"==we&&(0,E.ON)({id:oe.current,middle_export:1,export_type:He?1:0});case 13:Te(!1),ge(!1);case 15:case"end":return e.stop()}}),e)}))),children:(0,R.jsx)("div",{className:C.export_type_modal,children:(0,R.jsxs)("div",{className:C.export_type_modal_con,children:[(0,R.jsxs)("div",{className:C.type_item,children:[(0,R.jsx)("div",{className:"".concat(C.img_warp," ").concat("pdf"==we?C.img_warp_active:""),onClick:function(){return Ne("pdf")},children:(0,R.jsx)("img",{src:t(45614),width:70,height:70})}),"pdf格式"]}),(0,R.jsxs)("div",{className:C.type_item,children:[(0,R.jsx)("div",{className:"".concat(C.img_warp," ").concat("word"==we?C.img_warp_active:""),onClick:function(){return Ne("word")},children:(0,R.jsx)("img",{src:t(38347),width:70,height:70})}),"word格式"]})]})})})]})}))},9580:function(e,n,t){"use strict";t.d(n,{c:function(){return r}});var r=function(e){return e[e.Single=0]="Single",e[e.Multiple=1]="Multiple",e[e.Judge=2]="Judge",e[e.Fill=3]="Fill",e[e.Subjective=4]="Subjective",e[e.Shixun=5]="Shixun",e[e.Program=6]="Program",e[e.Combine=7]="Combine",e}({})},66104:function(e,n,t){"use strict";t.d(n,{Z:function(){return Z}});var r=t(92310),o=t.n(r),s=t(75440),l=t(47413),i=t(59301),a=t(92343),c=t(36355),u=t(78386),d=t(91857);const _=e=>{let{children:n}=e;const{getPrefixCls:t}=i.useContext(c.E_),r=t("breadcrumb");return i.createElement("li",{className:`${r}-separator`,"aria-hidden":"true"},""===n?n:n||"/")};_.__ANT_BREADCRUMB_SEPARATOR=!0;var p=_,m=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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(t[r[o]]=e[r[o]])}return t};function f(e,n,t,r){if(null==t)return null;const{className:s,onClick:a}=n,c=m(n,["className","onClick"]),u=Object.assign(Object.assign({},(0,l.Z)(c,{data:!0,aria:!0})),{onClick:a});return void 0!==r?i.createElement("a",Object.assign({},u,{className:o()(`${e}-link`,s),href:r}),t):i.createElement("span",Object.assign({},u,{className:o()(`${e}-link`,s)}),t)}function v(e,n){return(t,r,o,s,l)=>{if(n)return n(t,r,o,s);const i=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,i,l)}}var 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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(t[r[o]]=e[r[o]])}return t};const x=e=>{const{prefixCls:n,separator:t="/",children:r,menu:o,overlay:s,dropdownProps:l,href:a}=e;const c=(e=>{if(o||s){const t=Object.assign({},l);if(o){const e=o||{},{items:n}=e,r=h(e,["items"]);t.menu=Object.assign(Object.assign({},r),{items:null==n?void 0:n.map(((e,n)=>{var{key:t,title:r,label:o,path:s}=e,l=h(e,["key","title","label","path"]);let c=null!=o?o:r;return s&&(c=i.createElement("a",{href:`${a}${s}`},c)),Object.assign(Object.assign({},l),{key:null!=t?t:n,label:c})}))})}else s&&(t.overlay=s);return i.createElement(d.Z,Object.assign({placement:"bottom"},t),i.createElement("span",{className:`${n}-overlay-link`},e,i.createElement(u.Z,null)))}return e})(r);return null!=c?i.createElement(i.Fragment,null,i.createElement("li",null,c),t&&i.createElement(p,null,t)):null},b=e=>{const{prefixCls:n,children:t,href:r}=e,o=h(e,["prefixCls","children","href"]),{getPrefixCls:s}=i.useContext(c.E_),l=s("breadcrumb",n);return i.createElement(x,Object.assign({},o,{prefixCls:l}),f(l,o,t,r))};b.__ANT_BREADCRUMB_ITEM=!0;var g=b,y=t(17313),j=t(83116),w=t(37613);const N=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 S=(0,j.Z)("Breadcrumb",(e=>{const n=(0,w.TS)(e,{});return[N(n)]}),(e=>({itemColor:e.colorTextDescription,lastItemColor:e.colorText,iconFontSize:e.fontSize,linkColor:e.colorTextDescription,linkHoverColor:e.colorText,separatorColor:e.colorTextDescription,separatorMargin:e.marginXS}))),C=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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(t[r[o]]=e[r[o]])}return t};function k(e){const{breadcrumbName:n,children:t}=e,r=C(e,["breadcrumbName","children"]),o=Object.assign({title:n},r);return t&&(o.menu={items:t.map((e=>{var{breadcrumbName:n}=e,t=C(e,["breadcrumbName"]);return Object.assign(Object.assign({},t),{title:n})}))}),o}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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(t[r[o]]=e[r[o]])}return t};const A=e=>{const{prefixCls:n,separator:t="/",style:r,className:u,rootClassName:d,routes:_,items:m,children:f,itemRender:h,params:b={}}=e,g=O(e,["prefixCls","separator","style","className","rootClassName","routes","items","children","itemRender","params"]),{getPrefixCls:y,direction:j,breadcrumb:w}=i.useContext(c.E_);let N;const C=y("breadcrumb",n),[A,Z]=S(C),E=function(e,n){return(0,i.useMemo)((()=>e||(n?n.map(k):null)),[e,n])}(m,_);const T=v(C,h);if(E&&E.length>0){const e=[],n=m||_;N=E.map(((r,o)=>{const{path:s,key:a,type:c,menu:u,overlay:d,onClick:_,className:m,separator:f,dropdownProps:v}=r,h=((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})(b,s);void 0!==h&&e.push(h);const g=null!=a?a:o;if("separator"===c)return i.createElement(p,{key:g},f);const y={},j=o===E.length-1;u?y.menu=u:d&&(y.overlay=d);let{href:w}=r;return e.length&&void 0!==h&&(w=`#/${e.join("/")}`),i.createElement(x,Object.assign({key:g},y,(0,l.Z)(r,{data:!0,aria:!0}),{className:m,dropdownProps:v,href:w,separator:j?"":t,onClick:_,prefixCls:C}),T(r,b,n,e,w))}))}else if(f){const e=(0,s.Z)(f).length;N=(0,s.Z)(f).map(((n,r)=>{if(!n)return n;const o=r===e-1;return(0,a.Tm)(n,{separator:o?"":t,key:r})}))}const B=o()(C,null==w?void 0:w.className,{[`${C}-rtl`]:"rtl"===j},u,d,Z),P=Object.assign(Object.assign({},null==w?void 0:w.style),r);return A(i.createElement("nav",Object.assign({className:B,style:P},g),i.createElement("ol",null,N)))};A.Item=g,A.Separator=p;var Z=A},24334:function(e,n,t){var r,o;o="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==t.g?t.g:this,e.exports=function(t){"use strict";var o,s=(t=t||{}).Base64,l="2.6.4",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=function(e){for(var n={},t=0,r=e.length;t<r;t++)n[e.charAt(t)]=t;return n}(i),c=String.fromCharCode,u=function(e){if(e.length<2)return(n=e.charCodeAt(0))<128?e:n<2048?c(192|n>>>6)+c(128|63&n):c(224|n>>>12&15)+c(128|n>>>6&63)+c(128|63&n);var n=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return c(240|n>>>18&7)+c(128|n>>>12&63)+c(128|n>>>6&63)+c(128|63&n)},d=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,_=function(e){return e.replace(d,u)},p=function(e){var n=[0,2,1][e.length%3],t=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0);return[i.charAt(t>>>18),i.charAt(t>>>12&63),n>=2?"=":i.charAt(t>>>6&63),n>=1?"=":i.charAt(63&t)].join("")},m=t.btoa&&"function"==typeof t.btoa?function(e){return t.btoa(e)}:function(e){if(e.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return e.replace(/[\s\S]{1,3}/g,p)},f=function(e){return m(_(String(e)))},v=function(e){return e.replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"})).replace(/=/g,"")},h=function(e,n){return n?v(f(e)):f(e)},x=function(e){return h(e,!0)};t.Uint8Array&&(o=function(e,n){for(var t="",r=0,o=e.length;r<o;r+=3){var s=e[r],l=e[r+1],a=e[r+2],c=s<<16|l<<8|a;t+=i.charAt(c>>>18)+i.charAt(c>>>12&63)+(void 0!==l?i.charAt(c>>>6&63):"=")+(void 0!==a?i.charAt(63&c):"=")}return n?v(t):t});var b,g=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,y=function(e){switch(e.length){case 4:var n=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return c(55296+(n>>>10))+c(56320+(1023&n));case 3:return c((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return c((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},j=function(e){return e.replace(g,y)},w=function(e){var n=e.length,t=n%4,r=(n>0?a[e.charAt(0)]<<18:0)|(n>1?a[e.charAt(1)]<<12:0)|(n>2?a[e.charAt(2)]<<6:0)|(n>3?a[e.charAt(3)]:0),o=[c(r>>>16),c(r>>>8&255),c(255&r)];return o.length-=[0,0,2,1][t],o.join("")},N=t.atob&&"function"==typeof t.atob?function(e){return t.atob(e)}:function(e){return e.replace(/\S{1,4}/g,w)},S=function(e){return N(String(e).replace(/[^A-Za-z0-9\+\/]/g,""))},C=function(e){return j(N(e))},k=function(e){return String(e).replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})).replace(/[^A-Za-z0-9\+\/]/g,"")},O=function(e){return C(k(e))};t.Uint8Array&&(b=function(e){return Uint8Array.from(S(k(e)),(function(e){return e.charCodeAt(0)}))});var A=function(){var e=t.Base64;return t.Base64=s,e};if(t.Base64={VERSION:l,atob:S,btoa:m,fromBase64:O,toBase64:h,utob:_,encode:h,encodeURI:x,btou:j,decode:O,noConflict:A,fromUint8Array:o,toUint8Array:b},"function"==typeof Object.defineProperty){var Z=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}};t.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",Z((function(){return O(this)}))),Object.defineProperty(String.prototype,"toBase64",Z((function(e){return h(this,e)}))),Object.defineProperty(String.prototype,"toBase64URI",Z((function(){return h(this,!0)})))}}return t.Meteor&&(Base64=t.Base64),e.exports?e.exports.Base64=t.Base64:void 0===(r=function(){return t.Base64}.apply(n,[]))||(e.exports=r),{Base64:t.Base64}}(o)}}]);