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
30 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],{65041:function(e,n,s){"use strict";s.d(n,{Z:function(){return a}});var t=s(1565),o=s(59301),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"},l=s(68475),i=function(e,n){return o.createElement(l.Z,(0,t.Z)({},e,{ref:n,icon:r}))};var a=o.forwardRef(i)},58499:function(e,n,s){"use strict";s.d(n,{Z:function(){return f}});var t=s(82242),o=s.n(t),r=s(7557),l=s.n(r),i=s(41498),a=s.n(i),c=s(79800),u=s.n(c),d=s(39647),_=s.n(d),v=s(3113),m=s(59301),p=s(37712),h=["children"],f=function(e){var n=e.children,s=_()(e,h),t=(0,m.useState)(!1),r=u()(t,2),i=r[0],c=r[1];return(0,p.jsx)(v.ZP,o()(o()({},s),{},{loading:i,onClick:function(){var e=a()(l()().mark((function e(n){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,c(!0),e.next=4,s.onClick(n);case 4:c(!1),e.next=11;break;case 7:e.prev=7,e.t0=e.catch(0),console.error(e.t0),c(!1);case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(n){return e.apply(this,arguments)}}(),children:n}))}},92463:function(e,n,s){"use strict";s.d(n,{Z:function(){return w}});var t=s(79800),o=s.n(t),r=s(59301),l=s(5112),i=s(42783),a="flexRow____Sm4b",c="flexColumn___mQNZs",u="action___QUVEn",d="setScore___yZ0Yb",_="delete___e4taL",v="content___jR4Y6",m="titleWrap___zsXYY",p="titleHtml___FALbj",h="answerWrap___uPjYq",f="answer___pfiPk",x="answerText___K3TNr",b=s(24334),j=s(30347),g=s(37712),y=["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"],N=[{type:"single",name:"单选题"},{type:"multiple",name:"多选题"},{type:"judgement",name:"判断题"},{type:"completion",name:"填空题"},{type:"subjective",name:"简答题"}],w=function(e){var n,s,t=e.index,w=e.typeName,k=e.type,C=e.data,A=void 0===C?{}:C,Z=e.inMouseId,S=e.isshow,B=e.onSetScore,F=void 0===B?function(){}:B,T=e.onDelete,E=void 0===T?function(){}:T,P=e.onMouseEnter,I=void 0===P?function(){}:P,D=e.showAnswer,O=void 0!==D&&D,R=(0,r.useState)(!1),M=o()(R,2),H=M[0],W=M[1],L=function(){var e;return(0,g.jsxs)("div",{className:h,children:[null==A||null===(e=A.choices)||void 0===e?void 0:e.map((function(e,n){return(0,g.jsxs)("div",{className:"".concat(a," mt15"),children:[(0,g.jsx)("div",{style:{lineHeight:"24px",flexShrink:0},children:y[n]}),(0,g.jsx)("div",{className:"".concat(f," ml5"),children:(0,g.jsx)(i.Z,{value:null==e?void 0:e.choice_text})})]},n)})),O&&(0,g.jsxs)("div",{className:"mt10 ".concat(x),children:["参考答案:",null==A?void 0:A.standard_answer_show]})]})},z=function(){var e;return(0,g.jsxs)("div",{className:h,children:[(0,g.jsx)("div",{className:"".concat(a," mt15"),children:null==A||null===(e=A.choices)||void 0===e?void 0:e.map((function(e,n){return(0,g.jsx)(l.ZP,{disabled:!0,children:null==e?void 0:e.choice_text},n)}))}),O&&(0,g.jsxs)("div",{className:"mt10 ".concat(x),children:["参考答案:",null==A?void 0:A.standard_answer_show]})]})},U=function(){var e;return(0,g.jsxs)("div",{className:h,children:[(0,g.jsx)("div",{className:"".concat(a," mt15"),children:(0,g.jsx)(i.Z,{value:null==A||null===(e=A.program_attr)||void 0===e?void 0:e.description})}),O&&(0,g.jsxs)("div",{className:"mt15",children:[(0,g.jsxs)("div",{className:x,children:["参考答案:",!(null!=A&&A.answer_text)&&"暂无"]}),(0,g.jsx)(i.Z,{value:(null==A?void 0:A.answer_text)||""})]})]})},q=function(){var e;return(0,g.jsx)("div",{className:h,children:O&&(0,g.jsx)("div",{className:"".concat(c," mt15"),children:null==A||null===(e=A.standard_answer)||void 0===e?void 0:e.map((function(e,n){return(0,g.jsx)("div",{children:1===(null==e?void 0:e.model)?(0,g.jsx)(i.Z,{value:"参考答案(填空".concat(e.position,"").concat(e.answer_text.join("、")),className:x},n):(0,g.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",marginBottom:5},children:["参考答案(填空 ",e.position,"",(0,g.jsx)(j.Z,{disabled:!0,width:"180px",value:e.answer_text.join("、")})]})})}))})})},V=function(){var e;return(0,g.jsx)("div",{className:h,children:O&&(0,g.jsxs)("div",{className:"mt15",children:[(0,g.jsx)("div",{className:x,children:"参考答案:"}),(0,g.jsx)(i.Z,{value:null==A||null===(e=A.answer_texts)||void 0===e?void 0:e[0],className:x})]})})},Y=function(){var e,n;return(0,g.jsxs)("div",{className:h,style:{marginTop:10},children:[(0,g.jsx)(i.Z,{showProgramFill:!0,disabledFill:!0,value:b.Base64.decode(null==A||null===(e=A.program_attr)||void 0===e?void 0:e.code)}),O&&(0,g.jsx)("div",{className:"".concat(c," mt15"),children:null==A||null===(n=A.standard_answer)||void 0===n?void 0:n.map((function(e,n){return(0,g.jsx)(i.Z,{value:"参考答案(填空".concat(e.position,"").concat(e.answer_text)},n)}))})]})},G=function(){var e;return(0,g.jsxs)("div",{className:h,children:[(0,g.jsx)("div",{className:"mt10",children:"阶段成绩"}),null==A||null===(e=A.shixun)||void 0===e?void 0:e.map((function(e,n){var s,t;return(0,g.jsxs)("div",{children:[(0,g.jsxs)("div",{className:"mt10 font14",children:["第",n+1,"关 ",null==e?void 0:e.challenge_name," ",e.challenge_score,"分)"]},n),O&&(0,g.jsxs)("div",{children:[(0,g.jsxs)("div",{className:x,children:["参考答案:",0===(null===(s=e.challenge_answers)||void 0===s?void 0:s.length)?"暂无":""]}),null===(t=e.challenge_answers)||void 0===t?void 0:t.map((function(e,n){return(0,g.jsxs)("div",{className:"mt15",children:[(0,g.jsxs)("div",{children:["级别",n+1,"",e.name]}),(0,g.jsx)(i.Z,{value:(null==e?void 0:e.contents)||"",className:x})]})}))]})]})}))]})},K=function(){var e;return(0,g.jsx)("div",{className:h,style:{display:H&&"none"},children:null==A||null===(e=A.sub_questions)||void 0===e?void 0:e.map((function(e,n){var s,o,u,d,_,v='<span style="margin-right: 10px">'.concat(t+1,".").concat(n+1,"</span><span>").concat(null===(s=N.find((function(n){return n.type==e.item_type})))||void 0===s?void 0:s.name,'</span><span class="c-grey-999">').concat(e.score,"分)</span>");return(0,g.jsxs)(r.Fragment,{children:[(0,g.jsx)("div",{className:m,style:{marginTop:16},children:(0,g.jsx)(i.Z,{className:p,value:v+e.name})}),("single"==e.item_type||"multiple"==e.item_type)&&(0,g.jsxs)(g.Fragment,{children:[null==e||null===(o=e.choices)||void 0===o?void 0:o.map((function(e,n){return(0,g.jsxs)("div",{className:"".concat(a," mt15"),children:[(0,g.jsx)("div",{style:{lineHeight:"24px",flexShrink:0},children:y[n]}),(0,g.jsx)("div",{className:"".concat(f," ml5"),children:(0,g.jsx)(i.Z,{value:null==e?void 0:e.choice_text})})]},n)})),O&&(0,g.jsxs)("div",{className:"mt10 ".concat(x),children:["参考答案:",null==e?void 0:e.standard_answer_show]})]}),"judgement"==e.item_type&&(0,g.jsxs)("div",{className:h,children:[(0,g.jsx)("div",{className:"".concat(a," mt15"),children:null==e||null===(u=e.choices)||void 0===u?void 0:u.map((function(e,n){return(0,g.jsx)(l.ZP,{disabled:!0,children:null==e?void 0:e.choice_text},n)}))}),O&&(0,g.jsxs)("div",{className:"mt10 ".concat(x),children:["参考答案:",null==e?void 0:e.standard_answer_show]})]}),"completion"==e.item_type&&(0,g.jsx)("div",{className:h,children:O&&(0,g.jsx)("div",{className:"".concat(c," mt15"),children:null==e||null===(d=e.standard_answer)||void 0===d?void 0:d.map((function(e,n){return(0,g.jsx)("div",{children:1===(null==e?void 0:e.model)?(0,g.jsx)(i.Z,{value:"参考答案(填空".concat(e.position,"").concat(e.answer_text.join("、")),className:x},n):(0,g.jsxs)("span",{children:["参考答案(填空$",e.position,"",(0,g.jsx)(j.Z,{value:e.answer_text.join("、")})]})})}))})}),"subjective"==e.item_type&&(0,g.jsx)("div",{className:h,children:O&&(0,g.jsxs)("div",{className:"mt15",children:[(0,g.jsx)("div",{className:x,children:"参考答案:"}),(0,g.jsx)(i.Z,{value:null==e||null===(_=e.answer_texts)||void 0===_?void 0:_[0],className:x})]})})]},null==e?void 0:e.id)}))})},X=function(e,n){var s;return'<span style="margin-right: -10px">'.concat(n+1,'、</span><span class="c-grey-999">').concat("combination"===(null==e?void 0:e.item_type)?"共".concat(null==e||null===(s=e.sub_questions)||void 0===s?void 0:s.length,"小题,"):"").concat(e.score,"分)</span> ")};return(0,g.jsxs)("div",{onMouseEnter:function(){return I(A.id)},children:[Z===A.id&&(0,g.jsxs)("div",{className:u,children:[(0,g.jsx)("div",{className:d,onClick:function(){return F(A.id,w,null==A?void 0:A.shixun,A.score,A)},children:"设置得分"}),(0,g.jsx)("div",{className:_,onClick:function(){return E(A.id)},children:"删除"})]}),(0,g.jsxs)("div",{className:v,children:[(0,g.jsxs)("div",{className:m,style:{justifyContent:"space-between"},children:["bprogram"===(null==A?void 0:A.item_type)?(0,g.jsx)(i.Z,{className:p,value:X(A,t)+(null==A||null===(n=A.program_attr)||void 0===n?void 0:n.description)}):(0,g.jsx)(i.Z,{className:p,value:X(A,t)+("combination"===(null==A?void 0:A.item_type)?"(题干)":"")+(A.name||(null==A?void 0:A.shixun_name))}),"combination"===(null==A?void 0:A.item_type)&&!S&&(0,g.jsx)("span",{onClick:function(e){W(!H)},style:{textAlign:"end",flexShrink:0,cursor:"pointer"},children:H?"展开":"收起"})]}),(s={SINGLE:L,MULTIPLE:L,JUDGMENT:z,PROGRAM:U,COMPLETION:q,SUBJECTIVE:V,PRACTICAL:G,COMBINATION:K,BPROGRAM:Y},s[k]?s[k]():null)]})]})}},58271:function(e,n,s){"use strict";s.d(n,{t:function(){return _}});var t=s(82242),o=s.n(t),r=(s(59301),s(3113)),l="buttonFixed___vyq30",i="button___hxmYv",a="buttonWrap___uK8dl",c=s(92310),u=s.n(c),d=s(37712),_=function(e){var n=e.cancelText,s=void 0===n?"取消":n,t=e.okText,c=void 0===t?"确定":t,_=e.loading,v=void 0!==_&&_,m=e.hasOkBtn,p=void 0===m||m,h=e.hasCancelBtn,f=void 0===h||h,x=e.okButtonProps,b=void 0===x?{}:x,j=e.onCancel,g=void 0===j?function(){}:j,y=e.onOk,N=void 0===y?function(){}:y,w=e.className,k=void 0===w?"":w;return(0,d.jsx)("div",{className:u()(l,k),children:(0,d.jsxs)("div",{className:a,children:[f&&(0,d.jsx)(r.ZP,{size:"middle",className:"".concat(i," mr20"),onClick:g,children:s}),p&&(0,d.jsx)(r.ZP,o()(o()({size:"middle",type:"primary",className:"".concat(i," mr20"),loading:v,onClick:N},b),{},{children:c}))]})})}},30347:function(e,n,s){"use strict";var t=s(79800),o=s.n(t),r=s(59301),l=s(44499),i=(s(48136),s(33773)),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,m=void 0===v?"":v,p=e.value,h=void 0===p?"":p,f=e.style,x=void 0===f?{}:f,b=(0,r.useRef)(),j=(0,r.useRef)(),g=(0,r.useState)(0),y=o()(g,2),N=y[0],w=y[1],k=(0,r.useState)(0),C=o()(k,2),A=C[0],Z=C[1],S=(0,r.useState)(!1),B=o()(S,2),F=B[0],T=B[1],E=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:E}}));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(){F&&setTimeout((function(){var e=document.getElementsByClassName("ant-modal")[0],n=window.innerWidth/2-e.offsetWidth/2,s=window.innerHeight/2-e.offsetHeight/2;w(n),Z(s)}),0)}),[F]);return(0,c.jsxs)("div",{style:x,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(m),readOnly:_,placeholder:"请输入公式",ref:b,style:{width:"100%",fontSize:h?18:14},value:h||""})}),(0,c.jsx)(a.Z,{maskClosable:!1,centered:!0,width:860,style:{position:"absolute",left:N,top:A},title:(0,c.jsx)("div",{style:{cursor:"move"},onMouseDown:function(e){e.preventDefault();var n=e.clientX-N,s=e.clientY-A;document.body.onmousemove=function(e){var t=e.clientX-n,o=e.clientY-s,r=document.getElementsByClassName("ant-modal")[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)&&(w(t),Z(o))},document.body.onmouseup=function(){document.body.onmousemove=null}},children:"输入公式"}),open:F,onOk:function(){var e=j.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:h,ref:j,onChange:u,showSaveButton:!1})})]})}));n.Z=u},22236:function(e,n,s){"use strict";s.r(n),s.d(n,{default:function(){return U}});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),m=s(7880),p=s(8591),h=s(95237),f=s(66104),x=s(14491),b=s(43418),j=s(65041),g=s(92463),y=s(58271),N="bg___vBzoO",w="wrap___rrSkg",k="btnWrapper___F_tyj",C="titleForExport___lhBnq",A="relative____B_F8",Z="typeActive___dLHVW",S="typeName___bdcw3",B="typeNumber___B6Fic",F="table___ZRr4b",T="export_type_modal___ldAtg",E="export_type_modal_con___Y9iST",P="type_item___cWirW",I="img_warp___G7xtB",D="img_warp_active___rw33a",O=s(50296),R=s(26606),M=s(58499),H=s(7201),W=s(7540),L=s(84717),z=s(37712),U=(0,m.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,U,q,V,Y,G,K=e.newExercisePaper,X=e.isExportBlank,J=void 0!==X&&X,Q=e.paperlibrary,$=(e.user,e.globalSetting,e.loading,e.dispatch),ee=((0,m.useLocation)(),(0,m.useParams)()),ne=(0,m.useSearchParams)(),se=_()(ne,1)[0],te=(0,v.useState)(),oe=_()(te,2),re=oe[0],le=oe[1],ie=(0,v.useRef)(),ae=(0,v.useState)(),ce=_()(ae,2),ue=ce[0],de=ce[1],_e=(0,v.useState)(),ve=_()(_e,2),me=ve[0],pe=ve[1],he=(0,v.useState)([]),fe=_()(he,2),xe=fe[0],be=fe[1],je=(0,v.useState)(!1),ge=_()(je,2),ye=ge[0],Ne=ge[1],we=(0,v.useState)(""),ke=_()(we,2),Ce=ke[0],Ae=ke[1];(0,v.useEffect)((function(){return $({type:"globalSetting/footerToggle",payload:!1}),function(){$({type:"globalSetting/footerToggle",payload:!0})}}),[]),(0,v.useEffect)((function(){ie.current=null==ee?void 0:ee.id,le(se.get("defaultActiveKey")),Fe(),Se(),Ze()}),[]),console.log("---",Q),(0,v.useEffect)((function(){var e;if(null!==(e=K.exerciseExportHeadData)&&void 0!==e&&e.title){var n=K.exerciseExportHeadData;de(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:"评卷人"}];pe(a()(J?l:r))}}),[K.exerciseExportHeadData]);var Ze=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,H.cV)({id:ee.id});case 2:return 0==(s=e.sent).status&&be(s.data),e.next=6,Se();case 6:se.get("exportPDF")&&null!==(n=Q.paperData)&&void 0!==n&&n.questionList&&(p.ZP.info("正在导出空白试卷pdf"),(0,R.F)(Te.current.children,"导出试卷"));case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Se=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,H.Dq)(ee.id);case 2:n=e.sent,console.log(n,"res-----------------"),de(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:"评卷人"}],pe(J?i:l);case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Be=[{width:"9%",title:"题型",align:"center",dataIndex:"name",render:function(e){return(0,z.jsx)("a",{children:e})}},{width:"9%",title:(null===(n=xe.find((function(e){return e.value==W.f[0].nameType})))||void 0===n?void 0:n.name)||W.f[0].name,align:"center",dataIndex:"singles_score",render:function(e){return(0,z.jsx)("a",{children:"0.0"===e?0:e})}},{width:"9%",title:(null===(t=xe.find((function(e){return e.value==W.f[1].nameType})))||void 0===t?void 0:t.name)||W.f[1].name,align:"center",dataIndex:"doubles_score",render:function(e){return(0,z.jsx)("a",{children:"0.0"===e?0:e})}},{width:"9%",title:(null===(r=xe.find((function(e){return e.value==W.f[3].nameType})))||void 0===r?void 0:r.name)||W.f[3].name,align:"center",dataIndex:"nulls_score",render:function(e){return(0,z.jsx)("a",{children:"0.0"===e?0:e})}},{width:"9%",title:(null===(i=xe.find((function(e){return e.value==W.f[2].nameType})))||void 0===i?void 0:i.name)||W.f[2].name,align:"center",dataIndex:"judges_score",render:function(e){return(0,z.jsx)("a",{children:"0.0"===e?0:e})}},{width:"9%",title:(null===(c=xe.find((function(e){return e.value==W.f[6].nameType})))||void 0===c?void 0:c.name)||W.f[6].name,align:"center",dataIndex:"pros_score",render:function(e){return(0,z.jsx)("a",{children:"0.0"===e?0:e})}},{width:"9%",title:(null===(d=xe.find((function(e){return e.value==W.f[5].nameType})))||void 0===d?void 0:d.name)||W.f[5].name,align:"center",dataIndex:"shixuns_score",render:function(e){return(0,z.jsx)("a",{children:"0.0"===e?0:e})}},{width:"9%",title:(null===(U=xe.find((function(e){return e.value==W.f[4].nameType})))||void 0===U?void 0:U.name)||W.f[4].name,align:"center",dataIndex:"mains_score",render:function(e){return(0,z.jsx)("a",{children:"0.0"===e?0:e})}},{width:"9%",title:(null===(q=xe.find((function(e){return e.value==W.f[7].nameType})))||void 0===q?void 0:q.name)||W.f[7].name,align:"center",dataIndex:"combinations_score",render:function(e){return(0,z.jsx)("a",{children:"0.0"===e?0:e})}},{width:"10%",title:(null===(V=xe.find((function(e){return e.value==W.f[8].nameType})))||void 0===V?void 0:V.name)||W.f[8].name,align:"center",dataIndex:"bpros_score",render:function(e){return(0,z.jsx)("a",{children:"0.0"===e?0:e})}},{width:"9%",title:"总分",align:"center",dataIndex:"total_score",render:function(e){return(0,z.jsx)("a",{children:"0.0"===e?0:e?parseFloat(e).toFixed(1):""})}}],Fe=function(e){$({type:"paperlibrary/getPaperData",payload:u()({id:ie.current},e)})},Te=(0,v.useRef)(),Ee=(0,v.useState)(!1),Pe=_()(Ee,2),Ie=Pe[0],De=Pe[1],Oe=function(){var e=l()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:De(!1),Ae(""),Ne(!0);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Re=function(){var e=l()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:De(!0),Ae(""),Ne(!0);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,z.jsxs)("section",{className:N,children:[(0,z.jsxs)(h.Z,{className:"mt30",justify:"space-between",children:[(0,z.jsxs)(f.Z,{separator:">",children:[(0,z.jsx)(f.Z.Item,{href:"/paperlibrary",children:"试卷库"}),(0,z.jsx)(f.Z.Item,{href:"/paperlibrary?defaultActiveKey=".concat(re),children:"1"===re?"公开":"2"===re?"团队共享":"我创建的"}),(0,z.jsx)(f.Z.Item,{children:"试卷详情"})]}),(0,z.jsxs)("div",{className:k,children:[(0,z.jsx)(M.Z,{style:{borderRadius:"16px"},type:"primary",icon:(0,z.jsx)(j.Z,{}),onClick:Re,children:"导出空白试卷+答案"}),(0,z.jsx)(M.Z,{style:{borderRadius:"16px"},type:"primary",className:"ml10",icon:(0,z.jsx)(j.Z,{}),onClick:Oe,children:"导出空白试卷"})]})]}),(0,z.jsx)("div",{className:w,ref:Te,children:(0,z.jsxs)("div",{className:"pt20 pb20",children:[(0,z.jsx)("div",{className:C,children:null===(Y=Q.paperData)||void 0===Y||null===(Y=Y.exam)||void 0===Y?void 0:Y.name}),(0,z.jsx)("div",{style:{fontSize:"15px",marginBottom:"12px",textAlign:"left"},children:null==ue?void 0:ue.exercise_description}),(0,z.jsxs)("div",{style:{textAlign:"center",fontSize:"15px"},children:["共:【",null==ue?void 0:ue.large_counts,"大题】【",null==ue?void 0:ue.total_count,"小题】【 满分",null==ue?void 0:ue.score,"分】 考试时间:【",(null==ue?void 0:ue.time)>-1?"".concat(null==ue?void 0:ue.time,"分钟"):"不限","】"]}),(0,z.jsx)(x.Z,{style:{margin:"20px auto"},className:F,columns:Be,dataSource:a()(me||[]),bordered:!0,pagination:!1}),null===(G=Q.paperData)||void 0===G||null===(G=G.questionList)||void 0===G?void 0:G.map((function(e,n){var s;return(0,z.jsxs)("div",{className:"".concat(A," mt20 mb20"),children:[(0,z.jsxs)("div",{className:Z,children:[(0,z.jsxs)("span",{className:S,children:[e.number,"、",e.name]}),(0,z.jsxs)("span",{className:B,children:["(共",e.questions_count,"题;共",e.questions_score,"分)"]})]}),(0,z.jsx)("div",{className:"mt20",children:null===(s=e.questions)||void 0===s?void 0:s.map((function(n,s){return(0,z.jsx)("div",{children:(0,z.jsx)("div",{children:(0,z.jsx)(g.Z,{index:s,typeName:e.name,type:e.type,data:n,showAnswer:Ie,isshow:!1})})},n.id)}))})]},n)}))]})}),(0,z.jsx)(y.t,{okText:"发送课堂",onCancel:function(){return m.history.push("/paperlibrary?defaultActiveKey=".concat(re))},onOk:function(){$({type:"paperlibrary/setActionTabs",payload:{key:"Paperlibrary-SendToClass",params:{id:ie.current}}})}}),(0,z.jsx)(O.Z,{}),(0,z.jsx)(b.Z,{width:450,title:"请选择需要导出的格式",open:ye,onCancel:function(){return Ne(!1)},onOk:l()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(""!=Ce){e.next=5;break}return p.ZP.info("请选择一种导出格式"),e.abrupt("return");case 5:if("pdf"!=Ce){e.next=10;break}return e.next=8,(0,R.F)(Te.current.children,"导出试卷");case 8:e.next=11;break;case 10:"word"==Ce&&(0,L.ON)({id:ie.current,middle_export:1,export_type:Ie?1:0});case 11:Ne(!1);case 12:case"end":return e.stop()}}),e)}))),children:(0,z.jsx)("div",{className:T,children:(0,z.jsxs)("div",{className:E,children:[(0,z.jsxs)("div",{className:P,children:[(0,z.jsx)("div",{className:"".concat(I," ").concat("pdf"==Ce?D:""),onClick:function(){return Ae("pdf")},children:(0,z.jsx)("img",{src:s(45614),width:70,height:70})}),"pdf格式"]}),(0,z.jsxs)("div",{className:P,children:[(0,z.jsx)("div",{className:"".concat(I," ").concat("word"==Ce?D:""),onClick:function(){return Ae("word")},children:(0,z.jsx)("img",{src:s(38347),width:70,height:70})}),"word格式"]})]})})})]})}))},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("")},m=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)},p=function(e){return m(_(String(e)))},h=function(e){return e.replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"})).replace(/=/g,"")},f=function(e,n){return n?h(p(e)):p(e)},x=function(e){return f(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?h(s):s});var b,j=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,g=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))}},y=function(e){return e.replace(j,g)},N=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("")},w=s.atob&&"function"==typeof s.atob?function(e){return s.atob(e)}:function(e){return e.replace(/\S{1,4}/g,N)},k=function(e){return w(String(e).replace(/[^A-Za-z0-9\+\/]/g,""))},C=function(e){return y(w(e))},A=function(e){return String(e).replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})).replace(/[^A-Za-z0-9\+\/]/g,"")},Z=function(e){return C(A(e))};s.Uint8Array&&(b=function(e){return Uint8Array.from(k(A(e)),(function(e){return e.charCodeAt(0)}))});var S=function(){var e=s.Base64;return s.Base64=r,e};if(s.Base64={VERSION:l,atob:k,btoa:m,fromBase64:Z,toBase64:f,utob:_,encode:f,encodeURI:x,btou:y,decode:Z,noConflict:S,fromUint8Array:o,toUint8Array:b},"function"==typeof Object.defineProperty){var B=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}};s.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",B((function(){return Z(this)}))),Object.defineProperty(String.prototype,"toBase64",B((function(e){return f(this,e)}))),Object.defineProperty(String.prototype,"toBase64URI",B((function(){return f(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)}}]);