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

2 lines
26 KiB

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3247],{46106:function(oe,H,c){c.d(H,{Z:function(){return d}});var m=c(59301),A=c(5112),p=c(53815),a={flexRow:"flexRow____Sm4b",flexColumn:"flexColumn___mQNZs",action:"action___QUVEn",setScore:"setScore___yZ0Yb",delete:"delete___e4taL",content:"content___jR4Y6",titleWrap:"titleWrap___zsXYY",titleNumber:"titleNumber___p60vi",score:"score___DbCHw",titleHtml:"titleHtml___FALbj",answerWrap:"answerWrap___uPjYq",answer:"answer___pfiPk",answerText:"answerText___K3TNr"},S=c(24334),N=c(10710),l=c(59301);const M=["A\uFF0E","B\uFF0E","C\uFF0E","D\uFF0E","E\uFF0E","F\uFF0E","G\uFF0E","H\uFF0E","I\uFF0E","J\uFF0E","K\uFF0E","L\uFF0E","M\uFF0E","N\uFF0E","O\uFF0E","P\uFF0E","Q\uFF0E","R\uFF0E","S\uFF0E","T\uFF0E","U\uFF0E","V\uFF0E","W\uFF0E","X\uFF0E","Y\uFF0E","Z\uFF0E"],z=[{type:"single",name:"\u5355\u9009\u9898"},{type:"multiple",name:"\u591A\u9009\u9898"},{type:"judgement",name:"\u5224\u65AD\u9898"},{type:"completion",name:"\u586B\u7A7A\u9898"},{type:"subjective",name:"\u7B80\u7B54\u9898"}];var d=({index:b,typeName:T,type:E,data:n={},inMouseId:x,isshow:o,onSetScore:D=()=>{},onDelete:R=()=>{},onMouseEnter:G=()=>{},showAnswer:h=!1})=>{var K;const[Z,j]=(0,m.useState)(!1),X=()=>{var r;return l.createElement("div",{className:a.answerWrap},(r=n==null?void 0:n.choices)==null?void 0:r.map((u,v)=>l.createElement("div",{className:`${a.flexRow} mt15`,key:v},l.createElement("div",{style:{lineHeight:"24px",flexShrink:0}},M[v]),l.createElement("div",{className:`${a.answer} ml5`},l.createElement(p.Z,{value:u==null?void 0:u.choice_text})))),h&&l.createElement("div",{className:`mt10 ${a.answerText}`},"\u53C2\u8003\u7B54\u6848\uFF1A",n==null?void 0:n.standard_answer_show))},Q=()=>{var r;return l.createElement("div",{className:a.answerWrap},l.createElement("div",{className:`${a.flexRow} mt15`},(r=n==null?void 0:n.choices)==null?void 0:r.map((u,v)=>l.createElement(A.ZP,{disabled:!0,key:v},u==null?void 0:u.choice_text))),h&&l.createElement("div",{className:`mt10 ${a.answerText}`},"\u53C2\u8003\u7B54\u6848\uFF1A",n==null?void 0:n.standard_answer_show))},F=()=>{var r;return l.createElement("div",{className:a.answerWrap},l.createElement("div",{className:`${a.flexRow} mt15`},l.createElement(p.Z,{value:(r=n==null?void 0:n.program_attr)==null?void 0:r.description})),h&&l.createElement("div",{className:"mt15"},l.createElement("div",{className:a.answerText},"\u53C2\u8003\u7B54\u6848\uFF1A",!(n!=null&&n.answer_text)&&"\u6682\u65E0"),l.createElement(p.Z,{value:(n==null?void 0:n.answer_text)||""})))},_=()=>{var r;return l.createElement("div",{className:a.answerWrap},h&&l.createElement("div",{className:`${a.flexColumn} mt15`},(r=n==null?void 0:n.standard_answer)==null?void 0:r.map((u,v)=>l.createElement("div",null,(u==null?void 0:u.model)===1?l.createElement(p.Z,{key:v,value:`\u53C2\u8003\u7B54\u6848\uFF08\u586B\u7A7A${u.position}\uFF09\uFF1A${u.answer_text.join("\u3001")}`,className:a.answerText}):l.createElement("span",{style:{display:"inline-flex",alignItems:"center",marginBottom:5}},"\u53C2\u8003\u7B54\u6848\uFF08\u586B\u7A7A ",u.position,"\uFF09\uFF1A",l.createElement(N.Z,{disabled:!0,width:"180px",value:u.answer_text.join("\u3001")}))))))},i=()=>{var r;return l.createElement("div",{className:a.answerWrap},h&&l.createElement("div",{className:"mt15"},l.createElement("div",{className:a.answerText},"\u53C2\u8003\u7B54\u6848\uFF1A"),l.createElement(p.Z,{value:(r=n==null?void 0:n.answer_texts)==null?void 0:r[0],className:a.answerText})))},y=()=>{var r,u;return l.createElement("div",{className:a.answerWrap,style:{marginTop:10}},l.createElement(p.Z,{showProgramFill:!0,disabledFill:!0,value:S.Base64.decode((r=n==null?void 0:n.program_attr)==null?void 0:r.code)}),h&&l.createElement("div",{className:`${a.flexColumn} mt15`},(u=n==null?void 0:n.standard_answer)==null?void 0:u.map((v,$)=>l.createElement(p.Z,{key:$,value:`\u53C2\u8003\u7B54\u6848\uFF08\u586B\u7A7A${v.position}\uFF09\uFF1A${v.answer_text}`}))))},w=()=>{var r;return l.createElement("div",{className:a.answerWrap},l.createElement("div",{className:"mt10"},"\u9636\u6BB5\u6210\u7EE9"),(r=n==null?void 0:n.shixun)==null?void 0:r.map((u,v)=>{var $,U;return l.createElement("div",null,l.createElement("div",{className:"mt10 font14",key:v},"\u7B2C",v+1,"\u5173 ",u==null?void 0:u.challenge_name," \uFF08",u.challenge_score,"\u5206\uFF09"),h&&l.createElement("div",null,l.createElement("div",{className:a.answerText},"\u53C2\u8003\u7B54\u6848\uFF1A",(($=u.challenge_answers)==null?void 0:$.length)===0?"\u6682\u65E0":""),(U=u.challenge_answers)==null?void 0:U.map((I,V)=>l.createElement("div",{className:"mt15"},l.createElement("div",null,"\u7EA7\u522B",V+1,"\uFF1A",I.name),l.createElement(p.Z,{value:(I==null?void 0:I.contents)||"",className:a.answerText})))))}))},W=()=>{var r;return l.createElement("div",{className:a.answerWrap,style:{display:Z&&"none"}},(r=n==null?void 0:n.sub_questions)==null?void 0:r.map((u,v)=>{var $,U,I,V,q;const te=`<span style="margin-right: 10px">${b+1}.${v+1}</span><span>\uFF08${($=z.find(g=>g.type==u.item_type))==null?void 0:$.name}\uFF09</span><span class="c-grey-999">\uFF08${u.score}\u5206\uFF09</span>`;return l.createElement(m.Fragment,{key:u==null?void 0:u.id},l.createElement("div",{className:a.titleWrap,style:{marginTop:16}},l.createElement(p.Z,{className:a.titleHtml,value:te+u.name})),(u.item_type=="single"||u.item_type=="multiple")&&l.createElement(l.Fragment,null,(U=u==null?void 0:u.choices)==null?void 0:U.map((g,L)=>l.createElement("div",{className:`${a.flexRow} mt15`,key:L},l.createElement("div",{style:{lineHeight:"24px",flexShrink:0}},M[L]),l.createElement("div",{className:`${a.answer} ml5`},l.createElement(p.Z,{value:g==null?void 0:g.choice_text})))),h&&l.createElement("div",{className:`mt10 ${a.answerText}`},"\u53C2\u8003\u7B54\u6848\uFF1A",u==null?void 0:u.standard_answer_show)),u.item_type=="judgement"&&l.createElement("div",{className:a.answerWrap},l.createElement("div",{className:`${a.flexRow} mt15`},(I=u==null?void 0:u.choices)==null?void 0:I.map((g,L)=>l.createElement(A.ZP,{disabled:!0,key:L},g==null?void 0:g.choice_text))),h&&l.createElement("div",{className:`mt10 ${a.answerText}`},"\u53C2\u8003\u7B54\u6848\uFF1A",u==null?void 0:u.standard_answer_show)),u.item_type=="completion"&&l.createElement("div",{className:a.answerWrap},h&&l.createElement("div",{className:`${a.flexColumn} mt15`},(V=u==null?void 0:u.standard_answer)==null?void 0:V.map((g,L)=>l.createElement("div",null,(g==null?void 0:g.model)===1?l.createElement(p.Z,{key:L,value:`\u53C2\u8003\u7B54\u6848\uFF08\u586B\u7A7A${g.position}\uFF09\uFF1A${g.answer_text.join("\u3001")}`,className:a.answerText}):l.createElement("span",null,"\u53C2\u8003\u7B54\u6848\uFF08\u586B\u7A7A$",g.position,"\uFF09\uFF1A",l.createElement(N.Z,{value:g.answer_text.join("\u3001")})))))),u.item_type=="subjective"&&l.createElement("div",{className:a.answerWrap},h&&l.createElement("div",{className:"mt15"},l.createElement("div",{className:a.answerText},"\u53C2\u8003\u7B54\u6848\uFF1A"),l.createElement(p.Z,{value:(q=u==null?void 0:u.answer_texts)==null?void 0:q[0],className:a.answerText}))))}))},C=()=>{const r={SINGLE:X,MULTIPLE:X,JUDGMENT:Q,PROGRAM:F,COMPLETION:_,SUBJECTIVE:i,PRACTICAL:w,COMBINATION:W,BPROGRAM:y};return r[E]?r[E]():null},B=(r,u)=>{var v;return`<span style="margin-right: -10px">${u+1}\u3001</span><span class="c-grey-999">\uFF08${(r==null?void 0:r.item_type)==="combination"?`\u5171${(v=r==null?void 0:r.sub_questions)==null?void 0:v.length}\u5C0F\u9898\uFF0C`:""}${r.score}\u5206\uFF09</span> `};return l.createElement("div",{onMouseEnter:()=>G(n.id)},x===n.id&&l.createElement("div",{className:a.action},l.createElement("div",{className:a.setScore,onClick:()=>D(n.id,T,n==null?void 0:n.shixun,n.score,n)},"\u8BBE\u7F6E\u5F97\u5206"),l.createElement("div",{className:a.delete,onClick:()=>R(n.id)},"\u5220\u9664")),l.createElement("div",{className:a.content},l.createElement("div",{className:a.titleWrap,style:{justifyContent:"space-between"}},(n==null?void 0:n.item_type)==="bprogram"?l.createElement(p.Z,{className:a.titleHtml,value:B(n,b)+((K=n==null?void 0:n.program_attr)==null?void 0:K.description)}):l.createElement(p.Z,{className:a.titleHtml,value:B(n,b)+((n==null?void 0:n.item_type)==="combination"?"\uFF08\u9898\u5E72\uFF09":"")+(n.name||(n==null?void 0:n.shixun_name))}),(n==null?void 0:n.item_type)==="combination"&&!o&&l.createElement("span",{onClick:r=>{j(!Z)},style:{textAlign:"end",flexShrink:0,cursor:"pointer"}},Z?"\u5C55\u5F00":"\u6536\u8D77")),C()))}},10710:function(oe,H,c){var m=c(59301),A=c(88637),p=c(48136),a=c(96328),S=c(43418),N=c(59301);const l=(0,m.forwardRef)(({callback:M,width:z,onChange:f,disabled:d,readOnly:b,type:T="",value:E="",style:n={}},x)=>{const o=(0,m.useRef)(),D=(0,m.useRef)(),[R,G]=(0,m.useState)(0),[h,K]=(0,m.useState)(0),[Z,j]=(0,m.useState)(!1),X=()=>{var i=document.createElement("div");i.innerHTML=o.current.getValue();var y=i.innerText;return M&&M(y),y};(0,m.useImperativeHandle)(x,()=>({getData:X}));const Q=i=>{i.preventDefault();const y=i.clientX-R,w=i.clientY-h;document.body.onmousemove=W=>{let C=W.clientX-y,B=W.clientY-w;const r=document.getElementsByClassName("markdown-popup-form")[0],u=window.innerWidth-r.offsetWidth,v=window.innerHeight-r.offsetHeight;C=Math.max(0,Math.min(C,u)),B=Math.max(0,Math.min(B,v)),F(W.clientX,W.clientY,y,w)&&(G(C),K(B))},document.body.onmouseup=function(){document.body.onmousemove=null}},F=(i,y,w,W)=>{const C=document.body.clientHeight,B=document.body.clientWidth;return i<20&&w>i||i>B-20&&w<i||y<20&&W>y||y>C-20&&W<y?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};(0,m.useEffect)(()=>{Z&&setTimeout(()=>{const i=document.getElementsByClassName("markdown-popup-form")[0],y=window.innerWidth/2-i.offsetWidth/2,w=window.innerHeight/2-i.offsetHeight/2;G(y),K(w)},0)},[Z]);const _=()=>{d||b||j(!0)};return N.createElement("div",{style:n},N.createElement("div",{style:{width:z||"100%",position:"relative"},className:`${A.Z.mathFillWrap} ${d||b?"cursorDefault":""}`,onClick:()=>_()},N.createElement("math-field",{disabled:d,locale:"zh_cn",class:`${A.Z.mathField} ${T}`,readOnly:b,placeholder:"\u8BF7\u8F93\u5165\u516C\u5F0F",ref:o,style:{width:"100%",fontSize:E?18:14},value:E||""})),N.createElement(S.default,{maskClosable:!1,centered:!0,width:860,style:{position:"absolute",left:R,top:h},title:N.createElement("div",{style:{cursor:"move"},onMouseDown:Q},"\u8F93\u5165\u516C\u5F0F"),open:Z,onOk:()=>{const i=D.current.getData();o.current.setValue(i),f(i),j(!1)},onCancel:()=>{j(!1)},destroyOnClose:!0,className:"markdown-popup-form"},N.createElement(a.Z,{value:E,ref:D,onChange:f,showSaveButton:!1})))});H.Z=l},91533:function(oe,H,c){c.d(H,{B:function(){return z},F:function(){return M}});var m=c(44425),A=c.n(m),p=c(86129),a=c.n(p),S=(f,d,b)=>new Promise((T,E)=>{var n=D=>{try{o(b.next(D))}catch(R){E(R)}},x=D=>{try{o(b.throw(D))}catch(R){E(R)}},o=D=>D.done?T(D.value):Promise.resolve(D.value).then(n,x);o((b=b.apply(f,d)).next())});const N=()=>{document.body.scrollIntoView()},l=()=>{document.querySelectorAll("canvas").forEach(f=>{(!f.clientWidth||!f.clientHeight)&&f.remove()})},M=(f,d)=>S(void 0,null,function*(){N(),l();const b={margin:[0,1,0,0],html2canvas:{letterRendering:!0,useCORS:!0,allowTaint:!1,width:810},jsPDF:{unit:"in",format:"letter",orientation:"portrait"}};let T=A()();for(let n=0;n<f.length;n++)yield T.set(b).from(f[n]).toContainer().toCanvas().toPdf().get("pdf").then(x=>S(void 0,null,function*(){n<f.length-1&&(yield x.addPage())}));const E=new(a());E.file(`${d}.pdf`,T.output("blob"),{base64:!1}),E.generateAsync({type:"blob"}).then(function(n){const x=document.createElement("a");x.href=window.URL.createObjectURL(n),x.download=`${d}.zip`,document.body.appendChild(x);const o=new MouseEvent("click");x.dispatchEvent(o),document.body.removeChild(x)})}),z=(f,d)=>S(void 0,null,function*(){N(),l();const b={margin:[0,0],html2canvas:{useCORS:!0,letterRendering:!0},jsPDF:{unit:"mm",format:"a4",orientation:"landscape"}};let T=A()();for(let E=0;E<f.length;E++)yield T.set(b).from(f[E]).toContainer().toCanvas().toPdf().get("pdf").then(n=>S(void 0,null,function*(){E<f.length-1&&(yield n.addPage())}));T.save(`${d}.pdf`)})},90620:function(oe,H,c){c.r(H),c.d(H,{default:function(){return Q}});var m=c(59301),A=c(29540),p=c(8591),a=c(95237),S=c(66104),N=c(3113),l=c(38854),M=c(14491),z=c(43418),f=c(46106),d={bg:"bg___vBzoO",wrap:"wrap___rrSkg",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"},b=c(30857),T=c(91533),E=c(11213),n=c(50693),x=c(12057),o=c(59301),D=Object.defineProperty,R=Object.getOwnPropertySymbols,G=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable,K=(F,_,i)=>_ in F?D(F,_,{enumerable:!0,configurable:!0,writable:!0,value:i}):F[_]=i,Z=(F,_)=>{for(var i in _||(_={}))G.call(_,i)&&K(F,i,_[i]);if(R)for(var i of R(_))h.call(_,i)&&K(F,i,_[i]);return F},j=(F,_,i)=>new Promise((y,w)=>{var W=r=>{try{B(i.next(r))}catch(u){w(u)}},C=r=>{try{B(i.throw(r))}catch(u){w(u)}},B=r=>r.done?y(r.value):Promise.resolve(r.value).then(W,C);B((i=i.apply(F,_)).next())});const X=({newExercisePaper:F,isExportBlank:_=!1,paperlibrary:i,user:y,globalSetting:w,loading:W,dispatch:C})=>{var B,r,u,v,$,U,I,V,q,te,g,L,re;const Be=(0,A.useLocation)(),le=(0,A.useParams)(),[ie]=(0,A.useSearchParams)(),[ue,fe]=(0,m.useState)(),J=(0,m.useRef)(),[P,ce]=(0,m.useState)(),[Fe,de]=(0,m.useState)(),[k,ye]=(0,m.useState)([]),[be,ne]=(0,m.useState)(!1),[ee,se]=(0,m.useState)("");(0,m.useEffect)(()=>(C({type:"globalSetting/footerToggle",payload:!1}),()=>{C({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,m.useEffect)(()=>{J.current=le==null?void 0:le.id,fe(ie.get("defaultActiveKey")),_e(),me(),ge()},[]),console.log("---",i),(0,m.useEffect)(()=>{var s;if((s=F.exerciseExportHeadData)!=null&&s.title){const t=F.exerciseExportHeadData;ce(Z({},t||{}));const{table:e}=t||{};let O,Y;(e!=null&&e.total_singles_scores||e!=null&&e.total_doubles_scores||e!=null&&e.total_nulls_scores||e!=null&&e.total_judges_scores||e!=null&&e.total_pros_scores||e!=null&&e.total_shixuns_scores||e!=null&&e.total_mains_scores||e!=null&&e.total_combination_scores||e!=null&&e.total_bpros_scores)&&(O=Number(e==null?void 0:e.total_singles_scores)+Number(e==null?void 0:e.total_doubles_scores)+Number(e==null?void 0:e.total_nulls_scores)+Number(e==null?void 0:e.total_judges_scores)+Number(e==null?void 0:e.total_pros_scores)+Number(e==null?void 0:e.total_shixuns_scores)+Number(e==null?void 0:e.total_mains_scores)+Number(e==null?void 0:e.total_combination_scores)+Number(e==null?void 0:e.total_bpros_scores)),(e!=null&&e.singles_scores||e!=null&&e.doubles_scores||e!=null&&e.nulls_scores||e!=null&&e.judges_scores||e!=null&&e.pros_scores||e!=null&&e.bpros_scores||e!=null&&e.shixuns_scores||e!=null&&e.mains_scores||e!=null&&e.combination_scores)&&(Y=Number(e==null?void 0:e.singles_scores)+Number(e==null?void 0:e.doubles_scores)+Number(e==null?void 0:e.nulls_scores)+Number(e==null?void 0:e.judges_scores)+Number(e==null?void 0:e.pros_scores)+Number(e==null?void 0:e.bpros_scores)+Number(e==null?void 0:e.shixuns_scores)+Number(e==null?void 0:e.mains_scores)+Number(e==null?void 0:e.combination_scores));const Ee=[{key:"1",name:"\u5E94\u5F97\u5206",singles_score:e==null?void 0:e.total_singles_scores,doubles_score:e==null?void 0:e.total_doubles_scores,nulls_score:e==null?void 0:e.total_nulls_scores,judges_score:e==null?void 0:e.total_judges_scores,pros_score:e==null?void 0:e.total_pros_scores,bpros_score:e==null?void 0:e.total_bpros_scores,shixuns_score:e==null?void 0:e.total_shixuns_scores,mains_score:e==null?void 0:e.total_mains_scores,combinations_score:e==null?void 0:e.total_combination_scores,total_score:O},{key:"2",name:"\u5B9E\u5F97\u5206",singles_score:e==null?void 0:e.singles_scores,doubles_score:e==null?void 0:e.doubles_scores,nulls_score:e==null?void 0:e.nulls_scores,judges_score:e==null?void 0:e.judges_scores,pros_score:e==null?void 0:e.pros_scores,bpros_score:e==null?void 0:e.bpros_scores,shixuns_score:e==null?void 0:e.shixuns_scores,mains_score:e==null?void 0:e.mains_scores,combinations_score:e==null?void 0:e.combination_scores,total_score:Y},{key:"3",name:"\u8BC4\u5377\u4EBA"}],Ce=[{key:"1",name:"\u5E94\u5F97\u5206",singles_score:e==null?void 0:e.total_singles_scores,doubles_score:e==null?void 0:e.total_doubles_scores,nulls_score:e==null?void 0:e.total_nulls_scores,judges_score:e==null?void 0:e.total_judges_scores,pros_score:e==null?void 0:e.total_pros_scores,bpros_score:e==null?void 0:e.total_bpros_scores,shixuns_score:e==null?void 0:e.total_shixuns_scores,mains_score:e==null?void 0:e.total_mains_scores,combinations_score:e==null?void 0:e.combination_scores,total_score:O},{key:"2",name:"\u5B9E\u5F97\u5206"},{key:"3",name:"\u8BC4\u5377\u4EBA"}];de([..._?Ce:Ee])}},[F.exerciseExportHeadData]);const ge=()=>j(void 0,null,function*(){var s;const t=yield(0,E.cV)({id:le.id});t.status==0&&ye(t.data),yield me(),ie.get("exportPDF")&&((s=i.paperData)!=null&&s.questionList)&&(p.ZP.info("\u6B63\u5728\u5BFC\u51FA\u7A7A\u767D\u8BD5\u5377pdf"),(0,T.F)(ae.current.children,"\u5BFC\u51FA\u8BD5\u5377"))}),me=()=>j(void 0,null,function*(){const s=yield(0,E.Dq)(le.id);console.log(s,"res-----------------"),ce(s||{});const{table:t}=s||{};let e,O;(t!=null&&t.total_singles_scores||t!=null&&t.total_doubles_scores||t!=null&&t.total_nulls_scores||t!=null&&t.total_judges_scores||t!=null&&t.total_pros_scores||t!=null&&t.total_shixuns_scores||t!=null&&t.total_mains_scores||t!=null&&t.total_combination_scores||t!=null&&t.total_bpros_scores)&&(e=Number(t==null?void 0:t.total_singles_scores)+Number(t==null?void 0:t.total_doubles_scores)+Number(t==null?void 0:t.total_nulls_scores)+Number(t==null?void 0:t.total_judges_scores)+Number(t==null?void 0:t.total_pros_scores)+Number(t==null?void 0:t.total_shixuns_scores)+Number(t==null?void 0:t.total_mains_scores)+Number(t==null?void 0:t.total_combination_scores)+Number(t==null?void 0:t.total_bpros_scores)),(t!=null&&t.singles_scores||t!=null&&t.doubles_scores||t!=null&&t.nulls_scores||t!=null&&t.judges_scores||t!=null&&t.pros_scores||t!=null&&t.bpros_scores||t!=null&&t.shixuns_scores||t!=null&&t.mains_scores||t!=null&&t.combinations_score)&&(O=Number(t==null?void 0:t.singles_scores)+Number(t==null?void 0:t.doubles_scores)+Number(t==null?void 0:t.nulls_scores)+Number(t==null?void 0:t.judges_scores)+Number(t==null?void 0:t.pros_scores)+Number(t==null?void 0:t.bpros_scores)+Number(t==null?void 0:t.shixuns_scores)+Number(t==null?void 0:t.mains_scores)+Number(t==null?void 0:t.combinations_score));const Y=[{key:"1",name:"\u5E94\u5F97\u5206",singles_score:t==null?void 0:t.total_singles_scores,doubles_score:t==null?void 0:t.total_doubles_scores,nulls_score:t==null?void 0:t.total_nulls_scores,judges_score:t==null?void 0:t.total_judges_scores,pros_score:t==null?void 0:t.total_pros_scores,bpros_score:t==null?void 0:t.total_bpros_scores,shixuns_score:t==null?void 0:t.total_shixuns_scores,combinations_score:t==null?void 0:t.total_combination_scores,mains_score:t==null?void 0:t.total_mains_scores,total_score:e},{key:"2",name:"\u5B9E\u5F97\u5206",singles_score:t==null?void 0:t.singles_scores,doubles_score:t==null?void 0:t.doubles_scores,nulls_score:t==null?void 0:t.nulls_scores,judges_score:t==null?void 0:t.judges_scores,pros_score:t==null?void 0:t.pros_scores,bpros_score:t==null?void 0:t.bpros_scores,shixuns_score:t==null?void 0:t.shixuns_scores,mains_score:t==null?void 0:t.mains_scores,combinations_score:t==null?void 0:t.combination_scores,total_score:O},{key:"3",name:"\u8BC4\u5377\u4EBA"}];de(_?[{key:"1",name:"\u5E94\u5F97\u5206"},{key:"2",name:"\u5B9E\u5F97\u5206"},{key:"3",name:"\u8BC4\u5377\u4EBA"}]:Y)}),Ne=[{width:"9%",title:"\u9898\u578B",align:"center",dataIndex:"name",render:s=>o.createElement("a",null,s)},{width:"9%",title:((B=k.find(s=>s.value==n.f[0].nameType))==null?void 0:B.name)||n.f[0].name,align:"center",dataIndex:"singles_score",render:s=>o.createElement("a",null,s==="0.0"?0:s)},{width:"9%",title:((r=k.find(s=>s.value==n.f[1].nameType))==null?void 0:r.name)||n.f[1].name,align:"center",dataIndex:"doubles_score",render:s=>o.createElement("a",null,s==="0.0"?0:s)},{width:"9%",title:((u=k.find(s=>s.value==n.f[3].nameType))==null?void 0:u.name)||n.f[3].name,align:"center",dataIndex:"nulls_score",render:s=>o.createElement("a",null,s==="0.0"?0:s)},{width:"9%",title:((v=k.find(s=>s.value==n.f[2].nameType))==null?void 0:v.name)||n.f[2].name,align:"center",dataIndex:"judges_score",render:s=>o.createElement("a",null,s==="0.0"?0:s)},{width:"9%",title:(($=k.find(s=>s.value==n.f[6].nameType))==null?void 0:$.name)||n.f[6].name,align:"center",dataIndex:"pros_score",render:s=>o.createElement("a",null,s==="0.0"?0:s)},{width:"9%",title:((U=k.find(s=>s.value==n.f[5].nameType))==null?void 0:U.name)||n.f[5].name,align:"center",dataIndex:"shixuns_score",render:s=>o.createElement("a",null,s==="0.0"?0:s)},{width:"9%",title:((I=k.find(s=>s.value==n.f[4].nameType))==null?void 0:I.name)||n.f[4].name,align:"center",dataIndex:"mains_score",render:s=>o.createElement("a",null,s==="0.0"?0:s)},{width:"9%",title:((V=k.find(s=>s.value==n.f[7].nameType))==null?void 0:V.name)||n.f[7].name,align:"center",dataIndex:"combinations_score",render:s=>o.createElement("a",null,s==="0.0"?0:s)},{width:"10%",title:((q=k.find(s=>s.value==n.f[8].nameType))==null?void 0:q.name)||n.f[8].name,align:"center",dataIndex:"bpros_score",render:s=>o.createElement("a",null,s==="0.0"?0:s)},{width:"9%",title:"\u603B\u5206",align:"center",dataIndex:"total_score",render:s=>o.createElement("a",null,s==="0.0"?0:s?parseFloat(s).toFixed(1):"")}],_e=s=>{C({type:"paperlibrary/getPaperData",payload:Z({id:J.current},s)})},Ae=(s,t)=>j(void 0,null,function*(){if(!s.destination||!s.source)return;const e=t.questions[s.source.index].id,O=s.destination.index+1;(yield C({type:"paperlibrary/adjustPosition",payload:{id:J.current,itemId:e,position:O}})).status!==-1&&_e()}),he=()=>{C({type:"paperlibrary/setActionTabs",payload:{key:"Paperlibrary-SendToClass",params:{id:J.current}}})},ae=(0,m.useRef)(),[ve,pe]=(0,m.useState)(!1),xe=()=>j(void 0,null,function*(){pe(!1),se(""),ne(!0)}),we=()=>j(void 0,null,function*(){pe(!0),se(""),ne(!0)});return o.createElement("section",{className:d.bg},o.createElement(a.Z,{className:"mt30",justify:"space-between"},o.createElement(S.Z,{separator:">"},o.createElement(S.Z.Item,{href:"/paperlibrary"},"\u8BD5\u5377\u5E93"),o.createElement(S.Z.Item,{href:`/paperlibrary?defaultActiveKey=${ue}`},ue==="1"?"\u516C\u5F00":ue==="2"?"\u56E2\u961F\u5171\u4EAB":"\u6211\u521B\u5EFA\u7684"),o.createElement(S.Z.Item,null,"\u8BD5\u5377\u8BE6\u60C5")),o.createElement("div",{className:d.btnWrapper},o.createElement(N.ZP,{onClick:he,className:d.btn,icon:o.createElement("i",{className:"iconfont icon-fasongtongzhi font14"})},"\u53D1\u9001\u81F3\u8BFE\u5802"),o.createElement(N.ZP,{onClick:()=>A.history.push(`/paperlibrary/add/${J.current}?type=2`),className:d.btn,icon:o.createElement("i",{className:"iconfont icon-bianji10 font14"})},"\u7F16\u8F91\u8BD5\u5377"),o.createElement(l.Z,{menu:{items:[{key:"1",label:o.createElement("div",{onClick:we},"\u5BFC\u51FA\u7A7A\u767D\u8BD5\u5377+\u7B54\u6848")},{key:"2",label:o.createElement("div",{onClick:xe},"\u5BFC\u51FA\u7A7A\u767D\u8BD5\u5377")}]}},o.createElement(N.ZP,{type:"primary",icon:o.createElement("i",{className:"iconfont icon-daochu1 font14"})},"\u5BFC\u51FA")))),o.createElement("div",{className:d.wrap,ref:ae},o.createElement("div",{className:"pt20 pb20"},o.createElement("div",{className:d.titleForExport},(g=(te=i.paperData)==null?void 0:te.exam)==null?void 0:g.name),o.createElement("div",{style:{textAlign:"center",fontSize:"15px"}},"\u5171:\u3010",P==null?void 0:P.large_counts,"\u5927\u9898\u3011\u3010",P==null?void 0:P.total_count,"\u5C0F\u9898\u3011\u3010 \u6EE1\u5206",P==null?void 0:P.score,"\u5206\u3011 \u8003\u8BD5\u65F6\u95F4\uFF1A\u3010",(P==null?void 0:P.time)>-1?`${P==null?void 0:P.time}\u5206\u949F`:"\u4E0D\u9650","\u3011"),!!(P!=null&&P.exercise_description)&&o.createElement("pre",{style:{fontSize:14,marginBottom:30,marginTop:20,textAlign:"left",color:"#3A3A3A"}},o.createElement("b",null,"\u8BD5\u5377\u987B\u77E5\uFF1A"),P==null?void 0:P.exercise_description),o.createElement(M.default,{style:{margin:"20px auto"},className:d.table,columns:Ne,dataSource:[...Fe||[]],bordered:!0,pagination:!1}),(re=(L=i.paperData)==null?void 0:L.questionList)==null?void 0:re.map((s,t)=>{var e;return o.createElement("div",{className:`${d.relative} mt20 mb20`,key:t},o.createElement("div",{className:d.typeActive},o.createElement("span",{className:d.typeName},s.number,"\u3001",s.name),o.createElement("span",{className:d.typeNumber},"\uFF08\u5171",s.questions_count,"\u9898\uFF1B\u5171",s.questions_score,"\u5206\uFF09")),o.createElement("div",{className:"mt20"},(e=s.questions)==null?void 0:e.map((O,Y)=>o.createElement("div",{key:O.id},o.createElement("div",null,o.createElement(f.Z,{index:Y,typeName:s.name,type:s.type,data:O,showAnswer:ve,isshow:!1}))))))}))),o.createElement(b.Z,null),o.createElement(z.default,{width:450,title:"\u8BF7\u9009\u62E9\u9700\u8981\u5BFC\u51FA\u7684\u683C\u5F0F",open:be,onCancel:()=>ne(!1),onOk:()=>j(void 0,null,function*(){if(ee==""){p.ZP.info("\u8BF7\u9009\u62E9\u4E00\u79CD\u5BFC\u51FA\u683C\u5F0F");return}else ee=="pdf"?yield(0,T.F)(ae.current.children,"\u5BFC\u51FA\u8BD5\u5377"):ee=="word"&&(0,x.ON)({id:J.current,middle_export:1,export_type:ve?1:0});ne(!1)})},o.createElement("div",{className:d.export_type_modal},o.createElement("div",{className:d.export_type_modal_con},o.createElement("div",{className:d.type_item},o.createElement("div",{className:`${d.img_warp} ${ee=="pdf"?d.img_warp_active:""}`,onClick:()=>se("pdf")},o.createElement("img",{src:c(45614),width:70,height:70})),"pdf\u683C\u5F0F"),o.createElement("div",{className:d.type_item},o.createElement("div",{className:`${d.img_warp} ${ee=="word"?d.img_warp_active:""}`,onClick:()=>se("word")},o.createElement("img",{src:c(38347),width:70,height:70})),"word\u683C\u5F0F")))))};var Q=(0,A.connect)(({paperlibrary:F,user:_,loading:i,globalSetting:y,newExercisePaper:w})=>({paperlibrary:F,user:_,globalSetting:y,loading:i.effects,newExercisePaper:w}))(X)}}]);