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
27 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],{65147:function(e,n,s){"use strict";var t=s(79800),o=s.n(t),r=s(59301),l=s(84997),i=(s(48136),s(3610)),a=s(43418),c=s(37712),u=(0,r.forwardRef)((function(e,n){var s=e.callback,t=e.width,u=e.onChange,d=e.disabled,_=e.readOnly,v=e.type,p=void 0===v?"":v,m=e.value,f=void 0===m?"":m,x=e.style,h=void 0===x?{}:x,b=(0,r.useRef)(),g=(0,r.useRef)(),y=(0,r.useState)(0),j=o()(y,2),w=j[0],N=j[1],S=(0,r.useState)(0),k=o()(S,2),A=k[0],C=k[1],Z=(0,r.useState)(!1),F=o()(Z,2),B=F[0],T=F[1],D=function(){var e=document.createElement("div");e.innerHTML=b.current.getValue();var n=e.innerText;return s&&s(n),n};(0,r.useImperativeHandle)(n,(function(){return{getData:D}}));var P=function(e,n,s,t){var o=document.body.clientHeight,r=document.body.clientWidth;return!(e<20&&s>e||e>r-20&&s<e||n<20&&t>n||n>o-20&&t<n)||(document.body.onmousemove=null,document.body.onmouseup=null,!1)};(0,r.useEffect)((function(){B&&setTimeout((function(){var e=document.getElementsByClassName("markdown-popup-form")[0],n=window.innerWidth/2-e.offsetWidth/2,s=window.innerHeight/2-e.offsetHeight/2;N(n),C(s)}),0)}),[B]);return(0,c.jsxs)("div",{style:h,children:[(0,c.jsx)("div",{style:{width:t||"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(p),readOnly:_,placeholder:"请输入公式",ref:b,style:{width:"100%",fontSize:f?18:14},value:f||""})}),(0,c.jsx)(a.Z,{maskClosable:!1,centered:!0,width:860,style:{position:"absolute",left:w,top:A},title:(0,c.jsx)("div",{style:{cursor:"move"},onMouseDown:function(e){e.preventDefault();var n=e.clientX-w,s=e.clientY-A;document.body.onmousemove=function(e){var t=e.clientX-n,o=e.clientY-s,r=document.getElementsByClassName("markdown-popup-form")[0],l=window.innerWidth-r.offsetWidth,i=window.innerHeight-r.offsetHeight;t=Math.max(0,Math.min(t,l)),o=Math.max(0,Math.min(o,i)),P(e.clientX,e.clientY,n,s)&&(N(t),C(o))},document.body.onmouseup=function(){document.body.onmousemove=null}},children:"输入公式"}),open:B,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:f,ref:g,onChange:u,showSaveButton:!1})})]})}));n.Z=u},10801:function(e,n,s){"use strict";s.r(n),s.d(n,{default:function(){return H}});var t=s(7557),o=s.n(t),r=s(41498),l=s.n(r),i=s(37205),a=s.n(i),c=s(82242),u=s.n(c),d=s(79800),_=s.n(d),v=s(59301),p=s(64613),m=s(92832),f=s(8591),x=s(95237),h=s(43604),b=s(5112),g=s(28103),y=s(51945),j=s(66104),w=s(3113),N=s(38854),S=s(43418),k={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"},A=s(20424),C=s(48781),Z=s(71715),F=s(11529),B=s(64630),T=s(80348),D=s(51811),P=s(84454),q=s(24334),E=s(91066),I=s(65147),O=s(37712),R=m.Z.TextArea,W=["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"],H=(0,p.connect)((function(e){var n=e.paperlibrary,s=e.user,t=e.loading,o=e.globalSetting,r=e.newExercisePaper;return{paperlibrary:n,user:s,globalSetting:o,loading:t.effects,newExercisePaper:r}}))((function(e){var n,t,r,i,c,d,m,H,M,z,L,U=e.newExercisePaper,V=e.isExportBlank,J=void 0!==V&&V,Y=e.paperlibrary,K=e.user,X=(e.globalSetting,e.loading,e.dispatch),G=((0,p.useLocation)(),(0,p.useParams)()),Q=(0,p.useSearchParams)(),$=_()(Q,1)[0],ee=(0,v.useState)(),ne=_()(ee,2),se=ne[0],te=ne[1],oe=(0,v.useRef)(),re=(0,v.useState)(),le=_()(re,2),ie=le[0],ae=le[1],ce=(0,v.useState)(),ue=_()(ce,2),de=ue[0],_e=ue[1],ve=(0,v.useState)([]),pe=_()(ve,2),me=pe[0],fe=pe[1],xe=(0,v.useState)(!1),he=_()(xe,2),be=he[0],ge=he[1],ye=(0,v.useState)(""),je=_()(ye,2),we=je[0],Ne=je[1],Se=(0,v.useState)(!1),ke=_()(Se,2),Ae=ke[0],Ce=ke[1],Ze=(0,v.useState)(!1),Fe=_()(Ze,2),Be=Fe[0],Te=Fe[1];(0,v.useEffect)((function(){return X({type:"globalSetting/footerToggle",payload:!1}),function(){X({type:"globalSetting/footerToggle",payload:!0})}}),[]),(0,v.useEffect)((function(){oe.current=null==G?void 0:G.id,te($.get("defaultActiveKey")),Ee(),Pe(),De()}),[]),(0,v.useEffect)((function(){var e;if(null!==(e=U.exerciseExportHeadData)&&void 0!==e&&e.title){var n=U.exerciseExportHeadData;ae(u()({},n||{}));var s,t,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)&&(s=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)&&(t=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 r=[{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:s},{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:t},{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:s},{key:"2",name:"实得分"},{key:"3",name:"评卷人"}];_e(a()(J?l:r))}}),[U.exerciseExportHeadData]);var De=function(){var e=l()(o()().mark((function e(){var n,s;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Z.cV)({id:G.id});case 2:return 0==(s=e.sent).status&&fe(s.data),e.next=6,Pe();case 6:$.get("exportPDF")&&null!==(n=Y.paperData)&&void 0!==n&&n.questionList&&(f.ZP.info("正在导出空白试卷pdf"),(0,C.F)(Ie.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,s,t,r,l,i;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Z.Dq)(G.id);case 2:n=e.sent,ae(n||{}),(null!=(s=(n||{}).table)&&s.total_singles_scores||null!=s&&s.total_doubles_scores||null!=s&&s.total_nulls_scores||null!=s&&s.total_judges_scores||null!=s&&s.total_pros_scores||null!=s&&s.total_shixuns_scores||null!=s&&s.total_mains_scores||null!=s&&s.total_combination_scores||null!=s&&s.total_bpros_scores)&&(t=Number(null==s?void 0:s.total_singles_scores)+Number(null==s?void 0:s.total_doubles_scores)+Number(null==s?void 0:s.total_nulls_scores)+Number(null==s?void 0:s.total_judges_scores)+Number(null==s?void 0:s.total_pros_scores)+Number(null==s?void 0:s.total_shixuns_scores)+Number(null==s?void 0:s.total_mains_scores)+Number(null==s?void 0:s.total_combination_scores)+Number(null==s?void 0:s.total_bpros_scores)),(null!=s&&s.singles_scores||null!=s&&s.doubles_scores||null!=s&&s.nulls_scores||null!=s&&s.judges_scores||null!=s&&s.pros_scores||null!=s&&s.bpros_scores||null!=s&&s.shixuns_scores||null!=s&&s.mains_scores||null!=s&&s.combinations_score)&&(r=Number(null==s?void 0:s.singles_scores)+Number(null==s?void 0:s.doubles_scores)+Number(null==s?void 0:s.nulls_scores)+Number(null==s?void 0:s.judges_scores)+Number(null==s?void 0:s.pros_scores)+Number(null==s?void 0:s.bpros_scores)+Number(null==s?void 0:s.shixuns_scores)+Number(null==s?void 0:s.mains_scores)+Number(null==s?void 0:s.combinations_score)),l=[{key:"1",name:"应得分",singles_score:null==s?void 0:s.total_singles_scores,doubles_score:null==s?void 0:s.total_doubles_scores,nulls_score:null==s?void 0:s.total_nulls_scores,judges_score:null==s?void 0:s.total_judges_scores,pros_score:null==s?void 0:s.total_pros_scores,bpros_score:null==s?void 0:s.total_bpros_scores,shixuns_score:null==s?void 0:s.total_shixuns_scores,combinations_score:null==s?void 0:s.total_combination_scores,mains_score:null==s?void 0:s.total_mains_scores,total_score:t},{key:"2",name:"实得分",singles_score:null==s?void 0:s.singles_scores,doubles_score:null==s?void 0:s.doubles_scores,nulls_score:null==s?void 0:s.nulls_scores,judges_score:null==s?void 0:s.judges_scores,pros_score:null==s?void 0:s.pros_scores,bpros_score:null==s?void 0:s.bpros_scores,shixuns_score:null==s?void 0:s.shixuns_scores,mains_score:null==s?void 0:s.mains_scores,combinations_score:null==s?void 0:s.combination_scores,total_score:r},{key:"3",name:"评卷人"}],i=[{key:"1",name:"应得分"},{key:"2",name:"实得分"},{key:"3",name:"评卷人"}],_e(J?i:l);case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),qe=[{width:"9%",title:"题型",align:"center",dataIndex:"name",render:function(e){return(0,O.jsx)("a",{children:e})}},{width:"9%",title:(null===(n=me.find((function(e){return e.value==F.f[0].nameType})))||void 0===n?void 0:n.name)||F.f[0].name,align:"center",dataIndex:"singles_score",render:function(e){return(0,O.jsx)("a",{children:"0.0"===e?0:e})}},{width:"9%",title:(null===(t=me.find((function(e){return e.value==F.f[1].nameType})))||void 0===t?void 0:t.name)||F.f[1].name,align:"center",dataIndex:"doubles_score",render:function(e){return(0,O.jsx)("a",{children:"0.0"===e?0:e})}},{width:"9%",title:(null===(r=me.find((function(e){return e.value==F.f[3].nameType})))||void 0===r?void 0:r.name)||F.f[3].name,align:"center",dataIndex:"nulls_score",render:function(e){return(0,O.jsx)("a",{children:"0.0"===e?0:e})}},{width:"9%",title:(null===(i=me.find((function(e){return e.value==F.f[2].nameType})))||void 0===i?void 0:i.name)||F.f[2].name,align:"center",dataIndex:"judges_score",render:function(e){return(0,O.jsx)("a",{children:"0.0"===e?0:e})}},{width:"9%",title:(null===(c=me.find((function(e){return e.value==F.f[6].nameType})))||void 0===c?void 0:c.name)||F.f[6].name,align:"center",dataIndex:"pros_score",render:function(e){return(0,O.jsx)("a",{children:"0.0"===e?0:e})}},{width:"9%",title:(null===(d=me.find((function(e){return e.value==F.f[5].nameType})))||void 0===d?void 0:d.name)||F.f[5].name,align:"center",dataIndex:"shixuns_score",render:function(e){return(0,O.jsx)("a",{children:"0.0"===e?0:e})}},{width:"9%",title:(null===(m=me.find((function(e){return e.value==F.f[4].nameType})))||void 0===m?void 0:m.name)||F.f[4].name,align:"center",dataIndex:"mains_score",render:function(e){return(0,O.jsx)("a",{children:"0.0"===e?0:e})}},{width:"9%",title:(null===(H=me.find((function(e){return e.value==F.f[7].nameType})))||void 0===H?void 0:H.name)||F.f[7].name,align:"center",dataIndex:"combinations_score",render:function(e){return(0,O.jsx)("a",{children:"0.0"===e?0:e})}},{width:"10%",title:(null===(M=me.find((function(e){return e.value==F.f[8].nameType})))||void 0===M?void 0:M.name)||F.f[8].name,align:"center",dataIndex:"bpros_score",render:function(e){return(0,O.jsx)("a",{children:"0.0"===e?0:e})}},{width:"9%",title:"总分",align:"center",dataIndex:"total_score",render:function(e){return(0,O.jsx)("a",{children:"0.0"===e?0:e?parseFloat(e).toFixed(1):""})}}],Ee=function(e){X({type:"paperlibrary/getPaperData",payload:u()({id:oe.current},e)})},Ie=(0,v.useRef)(),Oe=(0,v.useState)(!0),Re=_()(Oe,2),We=Re[0],He=Re[1],Me=function(){var e=l()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:He(!1),Ne(""),ge(!0);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ze=function(){var e=l()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:He(!0),Ne(""),ge(!0);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Le=function(){var e=l()(o()().mark((function e(){var n,s;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Ce(!0),e.next=3,(0,D.Mb)({categoryId:oe.current});case 3:n=e.sent,Ce(!1),null!=n&&n.exercise_id&&(0,T.xg)("/classrooms/coursesId/exercise/".concat(n.exercise_id,"/").concat(null===(s=K.userInfo)||void 0===s?void 0:s.login,"/initate_answer"));case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Ue=function e(n,s,t){var o,r,l,i,a,c,u,d,_,v,p,m;return(0,O.jsxs)(O.Fragment,{children:[!t&&(0,O.jsxs)("div",{style:{display:"flex"},className:k.programTitle,children:[(0,O.jsxs)("span",{style:{flexShrink:0},className:"font18",children:[s+1,"."]}),(0,O.jsx)(P.Z,{style:{maxWidth:1100,overflow:"auto"},value:n.name||(null==n?void 0:n.shixun_name)}),(0,O.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,O.jsx)(P.Z,{showProgramFill:!0,disabledFill:!0,value:q.Base64.decode((null==n||null===(o=n.program_attr)||void 0===o?void 0:o.code)||"")}),n.question_type===E.c.Single&&(0,O.jsx)(O.Fragment,{children:null===(r=n.choices)||void 0===r?void 0:r.map((function(e,n){return(0,O.jsx)(x.Z,{children:(0,O.jsx)(h.Z,{flex:"1",children:(0,O.jsxs)("div",{style:{display:"flex"},children:[(0,O.jsx)("div",{style:{lineHeight:"24px",flexShrink:0},children:W[n]}),(0,O.jsx)(P.Z,{value:e.choice_text||""})]})})},n)}))}),n.question_type===E.c.Multiple&&(0,O.jsx)(O.Fragment,{children:null===(l=n.choices)||void 0===l?void 0:l.map((function(e,n){return(0,O.jsx)(x.Z,{children:(0,O.jsx)(h.Z,{flex:"1",children:(0,O.jsxs)("div",{style:{display:"flex"},children:[(0,O.jsx)("div",{style:{lineHeight:"24px",flexShrink:0},children:W[n]}),(0,O.jsx)(P.Z,{value:e.choice_text||""})]})})},n)}))}),n.question_type===E.c.Judge&&(0,O.jsx)("div",{className:k.flexRow,children:null===(i=n.choices)||void 0===i?void 0:i.map((function(e,n){return(0,O.jsxs)(x.Z,{children:[(0,O.jsx)(h.Z,{flex:"25px",children:(0,O.jsx)("div",{style:{width:25,overflow:"hidden"},children:(0,O.jsx)(b.ZP,{disabled:!0,style:{width:25,marginLeft:1===n&&10}})})}),(0,O.jsx)(h.Z,{flex:"1",style:{marginLeft:1===n&&10},children:e.choice_text})]},n)}))}),n.question_type===E.c.Combine&&(0,O.jsx)(O.Fragment,{children:null===(a=n.sub_questions)||void 0===a?void 0:a.map((function(n,t){return(0,O.jsxs)("div",{style:{marginLeft:10},children:[(0,O.jsxs)("div",{style:{display:"flex"},className:k.programTitle,children:[(0,O.jsxs)("span",{style:{flexShrink:0},className:"font18",children:[s+1,".",t+1]}),(0,O.jsx)(P.Z,{value:n.name||(null==n?void 0:n.shixun_name)}),(0,O.jsxs)("span",{style:{flexShrink:0},className:"font16",children:["",n.score,"分)"]})]}),e(n,t,!0)]})}))}),We&&(0,O.jsxs)("div",{style:{marginTop:10},children:[(null==n?void 0:n.question_type)<3&&(null==n?void 0:n.standard_answer_show)&&(0,O.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)&&We&&3===(null==n?void 0:n.question_type)&&(0,O.jsx)("div",{children:null==n||null===(u=n.standard_answer)||void 0===u?void 0:u.map((function(e,n){return(0,O.jsxs)("div",{children:[(0,O.jsxs)("span",{children:["参考答案:(填空",n+1,":"]}),(0,O.jsx)("div",{children:1===(null==e?void 0:e.model)?(0,O.jsx)(R,{autoSize:!0,disabled:!0,value:null==e?void 0:e.answer_text[0]}):(0,O.jsx)(I.Z,{value:null==e?void 0:e.answer_text[0],disabled:!0})})]})}))}),!(null==n||null===(d=n.standard_answer)||void 0===d||!d.length)&&We&&8===(null==n?void 0:n.question_type)&&(0,O.jsx)("div",{children:null==n||null===(_=n.standard_answer)||void 0===_?void 0:_.map((function(e,n){return(0,O.jsxs)("div",{children:[(0,O.jsxs)("span",{children:["参考答案:(填空",n+1,":"]}),(0,O.jsx)("div",{children:(0,O.jsx)(R,{autoSize:!0,disabled:!0,value:(null==e?void 0:e.answer_text)||""})})]})}))}),!(null==n||null===(v=n.answer_texts)||void 0===v||!v.length)&&4===(null==n?void 0:n.question_type)&&(0,O.jsxs)("div",{children:[(0,O.jsx)("p",{className:"mt10 mb0",children:"参考答案:"}),(0,O.jsx)("div",{style:{border:"1px solid #eee",background:"#f5f5f5",borderRadius:4,padding:5},children:(0,O.jsx)(P.Z,{value:null==n||null===(p=n.answer_texts)||void 0===p?void 0:p[0]})})]}),6===(null==n?void 0:n.question_type)&&(0,O.jsxs)("div",{children:[(0,O.jsxs)("p",{className:"mt10 mb0",children:["参考答案:",!(null!=n&&n.answer_text)&&"暂无"]}),(null==n?void 0:n.answer_text)&&(0,O.jsx)("div",{style:{border:"1px solid #eee",background:"#f5f5f5",borderRadius:4,padding:5},children:(0,O.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===(m=n.standard_answer)||void 0===m?void 0:m.length)>0)&&(0,O.jsxs)(x.Z,{style:{marginTop:14},children:[(0,O.jsx)("span",{className:"font16 ",children:"解析:"}),(0,O.jsx)(P.Z,{className:k.renderHtml,value:(null==n?void 0:n.analysis)||"暂无解析"})]})]}),!t&&(0,O.jsx)(g.Z,{})]})},Ve=(0,v.useCallback)((function(){var e;return(0,O.jsxs)("div",{children:[(0,O.jsx)("div",{className:k.titleForExport,children:null===(e=Y.paperData)||void 0===e||null===(e=e.exam)||void 0===e?void 0:e.name}),(0,O.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,O.jsxs)("pre",{style:{fontSize:14,marginBottom:30,marginTop:20,textAlign:"left",color:"#3A3A3A"},children:[(0,O.jsx)("b",{children:"试卷须知:"}),null==ie?void 0:ie.exercise_description]}),(0,O.jsx)(y.Z,{style:{margin:"20px auto"},className:k.table,columns:qe,dataSource:a()(de||[]),bordered:!0,pagination:!1})]})}),[Y.paperData]);return(0,O.jsxs)("section",{className:k.bg,children:[(0,O.jsxs)(x.Z,{className:"mt30",justify:"space-between",children:[(0,O.jsxs)(j.Z,{separator:">",children:[(0,O.jsx)(j.Z.Item,{href:"/paperlibrary",children:"试卷库"}),(0,O.jsx)(j.Z.Item,{href:"/paperlibrary?defaultActiveKey=".concat(se),children:"1"===se?"公开":"2"===se?"团队共享":"我创建的"}),(0,O.jsx)(j.Z.Item,{children:"试卷详情"})]}),(0,O.jsxs)("div",{className:k.btnWrapper,children:[(0,O.jsx)(w.ZP,{onClick:function(){X({type:"paperlibrary/setActionTabs",payload:{key:"Paperlibrary-SendToClass",params:{id:oe.current}}})},className:k.btn,icon:(0,O.jsx)("i",{className:"iconfont icon-fasongtongzhi font14"}),children:"发送至课堂"}),(0,O.jsx)(w.ZP,{onClick:function(){return p.history.push("/paperlibrary/add/".concat(oe.current,"?type=2"))},className:k.btn,icon:(0,O.jsx)("i",{className:"iconfont icon-bianji10 font14"}),children:"编辑试卷"}),(0,O.jsx)(w.ZP,{loading:Ae,onClick:Le,className:k.btn,icon:(0,O.jsx)("i",{className:"iconfont icon-monikaoshi2 font14"}),children:"模拟考试"}),(0,O.jsx)(N.Z,{menu:{items:[{key:"1",label:(0,O.jsx)("div",{onClick:ze,children:"导出空白试卷+答案"})},{key:"2",label:(0,O.jsx)("div",{onClick:Me,children:"导出空白试卷"})}]},children:(0,O.jsx)(w.ZP,{type:"primary",icon:(0,O.jsx)("i",{className:"iconfont icon-daochu1 font14"}),children:"导出"})})]})]}),(0,O.jsxs)("div",{className:"".concat(k.wrap," pt20 pb20"),ref:Ie,id:"paperDomRef",children:[!(null!==(z=Y.paperData)&&void 0!==z&&null!==(z=z.questionList)&&void 0!==z&&z.length)&&Ve(),null===(L=Y.paperData)||void 0===L||null===(L=L.questionList)||void 0===L?void 0:L.map((function(e,n){var s;return(0,O.jsx)(O.Fragment,{children:null===(s=e.questions)||void 0===s?void 0:s.map((function(s,t){var o=Math.floor(t/10);return t%10==0?(0,O.jsxs)("div",{className:"abc",children:[0===n&&0===t&&Ve(),0===t&&(0,O.jsxs)("div",{children:[(0,O.jsxs)("span",{className:"font16 c-light-primary",children:[e.number,"、",e.name]}),(0,O.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(t,t+10).map((function(e,n){return(0,O.jsx)("div",{children:Ue(e,t+n)},e.id)}))]},"group-".concat(o)):null}))})}))]}),(0,O.jsx)(A.Z,{}),(0,O.jsx)(S.Z,{width:450,title:"请选择需要导出的格式",open:be,onCancel:function(){Be?f.ZP.info("导出中请勿关闭窗口"):ge(!1)},okButtonProps:{loading:Be},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),f.ZP.info("请选择一种导出格式"),e.abrupt("return");case 7:if("pdf"!=we){e.next=12;break}return e.next=10,(0,C.F)(Ie.current.children,null===(n=Y.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,B.ON)({id:oe.current,middle_export:1,export_type:We?1:0});case 13:Te(!1),ge(!1);case 15:case"end":return e.stop()}}),e)}))),children:(0,O.jsx)("div",{className:k.export_type_modal,children:(0,O.jsxs)("div",{className:k.export_type_modal_con,children:[(0,O.jsxs)("div",{className:k.type_item,children:[(0,O.jsx)("div",{className:"".concat(k.img_warp," ").concat("pdf"==we?k.img_warp_active:""),onClick:function(){return Ne("pdf")},children:(0,O.jsx)("img",{src:s(45614),width:70,height:70})}),"pdf格式"]}),(0,O.jsxs)("div",{className:k.type_item,children:[(0,O.jsx)("div",{className:"".concat(k.img_warp," ").concat("word"==we?k.img_warp_active:""),onClick:function(){return Ne("word")},children:(0,O.jsx)("img",{src:s(38347),width:70,height:70})}),"word格式"]})]})})})]})}))},91066:function(e,n,s){"use strict";s.d(n,{c:function(){return t}});var t=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}({})},24334:function(e,n,s){var t,o;o="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==s.g?s.g:this,e.exports=function(s){"use strict";var o,r=(s=s||{}).Base64,l="2.6.4",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=function(e){for(var n={},s=0,t=e.length;s<t;s++)n[e.charAt(s)]=s;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)},v=function(e){var n=[0,2,1][e.length%3],s=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0);return[i.charAt(s>>>18),i.charAt(s>>>12&63),n>=2?"=":i.charAt(s>>>6&63),n>=1?"=":i.charAt(63&s)].join("")},p=s.btoa&&"function"==typeof s.btoa?function(e){return s.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,v)},m=function(e){return p(_(String(e)))},f=function(e){return e.replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"})).replace(/=/g,"")},x=function(e,n){return n?f(m(e)):m(e)},h=function(e){return x(e,!0)};s.Uint8Array&&(o=function(e,n){for(var s="",t=0,o=e.length;t<o;t+=3){var r=e[t],l=e[t+1],a=e[t+2],c=r<<16|l<<8|a;s+=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?f(s):s});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,s=n%4,t=(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(t>>>16),c(t>>>8&255),c(255&t)];return o.length-=[0,0,2,1][s],o.join("")},N=s.atob&&"function"==typeof s.atob?function(e){return s.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,""))},k=function(e){return j(N(e))},A=function(e){return String(e).replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})).replace(/[^A-Za-z0-9\+\/]/g,"")},C=function(e){return k(A(e))};s.Uint8Array&&(b=function(e){return Uint8Array.from(S(A(e)),(function(e){return e.charCodeAt(0)}))});var Z=function(){var e=s.Base64;return s.Base64=r,e};if(s.Base64={VERSION:l,atob:S,btoa:p,fromBase64:C,toBase64:x,utob:_,encode:x,encodeURI:h,btou:j,decode:C,noConflict:Z,fromUint8Array:o,toUint8Array:b},"function"==typeof Object.defineProperty){var F=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}};s.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",F((function(){return C(this)}))),Object.defineProperty(String.prototype,"toBase64",F((function(e){return x(this,e)}))),Object.defineProperty(String.prototype,"toBase64URI",F((function(){return x(this,!0)})))}}return s.Meteor&&(Base64=s.Base64),e.exports?e.exports.Base64=s.Base64:void 0===(t=function(){return s.Base64}.apply(n,[]))||(e.exports=t),{Base64:s.Base64}}(o)}}]);