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

2 lines
20 KiB

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1581],{67417:function(Fe,Y,s){s.d(Y,{t:function(){return e}});var t=s(59301),T=s(3113),C={buttonFixed:"buttonFixed___vyq30",button:"button___hxmYv",buttonWrap:"buttonWrap___uK8dl"},Z=s(92310),R=s.n(Z),w=Object.defineProperty,k=Object.getOwnPropertySymbols,p=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable,L=(B,_,y)=>_ in B?w(B,_,{enumerable:!0,configurable:!0,writable:!0,value:y}):B[_]=y,H=(B,_)=>{for(var y in _||(_={}))p.call(_,y)&&L(B,y,_[y]);if(k)for(var y of k(_))a.call(_,y)&&L(B,y,_[y]);return B};const e=({cancelText:B="\u53D6\u6D88",okText:_="\u786E\u5B9A",loading:y=!1,hasOkBtn:X=!0,hasCancelBtn:o=!0,okButtonProps:U={},onCancel:K=()=>{},onOk:j=()=>{},className:I=""})=>t.createElement("div",{className:R()(C.buttonFixed,I)},t.createElement("div",{className:C.buttonWrap},o&&t.createElement(T.ZP,{size:"middle",className:`${C.button} mr20`,onClick:K},B),X&&t.createElement(T.ZP,H({size:"middle",type:"primary",className:`${C.button} mr20`,loading:y,onClick:j},U),_)))},4197:function(Fe,Y,s){var t=s(59301),T=s(72376),C=s(48136),Z=s(10582),R=s(43418),w=s(59301);const k=(0,t.forwardRef)(({callback:p,width:a,onChange:L,disabled:H,readOnly:e,type:B="",value:_="",style:y={}},X)=>{const o=(0,t.useRef)(),U=(0,t.useRef)(),[K,j]=(0,t.useState)(0),[I,le]=(0,t.useState)(0),[Q,q]=(0,t.useState)(!1),z=()=>{var E=document.createElement("div");E.innerHTML=o.current.getValue();var h=E.innerText;return p&&p(h),h};(0,t.useImperativeHandle)(X,()=>({getData:z}));const ue=E=>{E.preventDefault();const h=E.clientX-K,O=E.clientY-I;document.body.onmousemove=g=>{let $=g.clientX-h,V=g.clientY-O;const se=document.getElementsByClassName("markdown-popup-form")[0],r=window.innerWidth-se.offsetWidth,i=window.innerHeight-se.offsetHeight;$=Math.max(0,Math.min($,r)),V=Math.max(0,Math.min(V,i)),ae(g.clientX,g.clientY,h,O)&&(j($),le(V))},document.body.onmouseup=function(){document.body.onmousemove=null}},ae=(E,h,O,g)=>{const $=document.body.clientHeight,V=document.body.clientWidth;return E<20&&O>E||E>V-20&&O<E||h<20&&g>h||h>$-20&&g<h?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};(0,t.useEffect)(()=>{Q&&setTimeout(()=>{const E=document.getElementsByClassName("markdown-popup-form")[0],h=window.innerWidth/2-E.offsetWidth/2,O=window.innerHeight/2-E.offsetHeight/2;j(h),le(O)},0)},[Q]);const re=()=>{H||e||q(!0)};return w.createElement("div",{style:y},w.createElement("div",{style:{width:a||"100%",position:"relative"},className:`${T.Z.mathFillWrap} ${H||e?"cursorDefault":""}`,onClick:()=>re()},w.createElement("math-field",{disabled:H,locale:"zh_cn",class:`${T.Z.mathField} ${B}`,readOnly:e,placeholder:"\u8BF7\u8F93\u5165\u516C\u5F0F",ref:o,style:{width:"100%",fontSize:_?18:14},value:_||""})),w.createElement(R.default,{maskClosable:!1,centered:!0,width:860,style:{position:"absolute",left:K,top:I},title:w.createElement("div",{style:{cursor:"move"},onMouseDown:ue},"\u8F93\u5165\u516C\u5F0F"),open:Q,onOk:()=>{const E=U.current.getData();o.current.setValue(E),L(E),q(!1)},onCancel:()=>{q(!1)},destroyOnClose:!0,className:"markdown-popup-form"},w.createElement(Z.Z,{value:_,ref:U,onChange:L,showSaveButton:!1})))});Y.Z=k},4721:function(Fe,Y,s){s.r(Y),s.d(Y,{default:function(){return se},formatTypeNameToDefaultScore:function(){return $}});var t=s(59301),T=s(71471),C=s(43418),Z=s(25560),R=s(64403),w=s(25301),k=s(98554),p=s(83900),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"},L=s(24334),H=s(4197),e=s(59301);const B=["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"],_=[{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 X=({index:r,typeName:i,type:c,data:l={},inMouseId:ee,isshow:oe,onSetScore:b=()=>{},onDelete:G=()=>{},onMouseEnter:A=()=>{},showAnswer:F=!1})=>{var te;const[J,me]=(0,t.useState)(!1),ne=()=>{var n;return e.createElement("div",{className:a.answerWrap},(n=l==null?void 0:l.choices)==null?void 0:n.map((u,m)=>e.createElement("div",{className:`${a.flexRow} mt15`,key:m},e.createElement("div",{style:{lineHeight:"24px",flexShrink:0}},B[m]),e.createElement("div",{className:`${a.answer} ml5`},e.createElement(p.Z,{value:u==null?void 0:u.choice_text})))),F&&e.createElement("div",{className:`mt10 ${a.answerText}`},"\u53C2\u8003\u7B54\u6848\uFF1A",l==null?void 0:l.standard_answer_show))},de=()=>{var n;return e.createElement("div",{className:a.answerWrap},e.createElement("div",{className:`${a.flexRow} mt15`},(n=l==null?void 0:l.choices)==null?void 0:n.map((u,m)=>e.createElement(k.ZP,{disabled:!0,key:m},u==null?void 0:u.choice_text))),F&&e.createElement("div",{className:`mt10 ${a.answerText}`},"\u53C2\u8003\u7B54\u6848\uFF1A",l==null?void 0:l.standard_answer_show))},ce=()=>{var n;return e.createElement("div",{className:a.answerWrap},e.createElement("div",{className:`${a.flexRow} mt15`},e.createElement(p.Z,{value:(n=l==null?void 0:l.program_attr)==null?void 0:n.description})),F&&e.createElement("div",{className:"mt15"},e.createElement("div",{className:a.answerText},"\u53C2\u8003\u7B54\u6848\uFF1A",!(l!=null&&l.answer_text)&&"\u6682\u65E0"),e.createElement(p.Z,{value:(l==null?void 0:l.answer_text)||""})))},x=()=>{var n;return e.createElement("div",{className:a.answerWrap},F&&e.createElement("div",{className:`${a.flexColumn} mt15`},(n=l==null?void 0:l.standard_answer)==null?void 0:n.map((u,m)=>e.createElement("div",null,(u==null?void 0:u.model)===1?e.createElement(p.Z,{key:m,value:`\u53C2\u8003\u7B54\u6848\uFF08\u586B\u7A7A${u.position}\uFF09\uFF1A${u.answer_text.join("\u3001")}`,className:a.answerText}):e.createElement("span",{style:{display:"inline-flex",alignItems:"center",marginBottom:5}},"\u53C2\u8003\u7B54\u6848\uFF08\u586B\u7A7A ",u.position,"\uFF09\uFF1A",e.createElement(H.Z,{disabled:!0,width:"180px",value:u.answer_text.join("\u3001")}))))))},P=()=>{var n;return e.createElement("div",{className:a.answerWrap},F&&e.createElement("div",{className:"mt15"},e.createElement("div",{className:a.answerText},"\u53C2\u8003\u7B54\u6848\uFF1A"),e.createElement(p.Z,{value:(n=l==null?void 0:l.answer_texts)==null?void 0:n[0],className:a.answerText})))},ve=()=>{var n,u;return e.createElement("div",{className:a.answerWrap,style:{marginTop:10}},e.createElement(p.Z,{showProgramFill:!0,disabledFill:!0,value:L.Base64.decode((n=l==null?void 0:l.program_attr)==null?void 0:n.code)}),F&&e.createElement("div",{className:`${a.flexColumn} mt15`},(u=l==null?void 0:l.standard_answer)==null?void 0:u.map((m,f)=>e.createElement(p.Z,{key:f,value:`\u53C2\u8003\u7B54\u6848\uFF08\u586B\u7A7A${m.position}\uFF09\uFF1A${m.answer_text}`}))))},Ee=()=>{var n;return e.createElement("div",{className:a.answerWrap},e.createElement("div",{className:"mt10"},"\u9636\u6BB5\u6210\u7EE9"),(n=l==null?void 0:l.shixun)==null?void 0:n.map((u,m)=>{var f,M;return e.createElement("div",null,e.createElement("div",{className:"mt10 font14",key:m},"\u7B2C",m+1,"\u5173 ",u==null?void 0:u.challenge_name," \uFF08",u.challenge_score,"\u5206\uFF09"),F&&e.createElement("div",null,e.createElement("div",{className:a.answerText},"\u53C2\u8003\u7B54\u6848\uFF1A",((f=u.challenge_answers)==null?void 0:f.length)===0?"\u6682\u65E0":""),(M=u.challenge_answers)==null?void 0:M.map((D,N)=>e.createElement("div",{className:"mt15"},e.createElement("div",null,"\u7EA7\u522B",N+1,"\uFF1A",D.name),e.createElement(p.Z,{value:(D==null?void 0:D.contents)||"",className:a.answerText})))))}))},pe=()=>{var n;return e.createElement("div",{className:a.answerWrap,style:{display:J&&"none"}},(n=l==null?void 0:l.sub_questions)==null?void 0:n.map((u,m)=>{var f,M,D,N,W;const d=`<span style="margin-right: 10px">${r+1}.${m+1}</span><span>\uFF08${(f=_.find(v=>v.type==u.item_type))==null?void 0:f.name}\uFF09</span><span class="c-grey-999">\uFF08${u.score}\u5206\uFF09</span>`;return e.createElement(t.Fragment,{key:u==null?void 0:u.id},e.createElement("div",{className:a.titleWrap,style:{marginTop:16}},e.createElement(p.Z,{className:a.titleHtml,value:d+u.name})),(u.item_type=="single"||u.item_type=="multiple")&&e.createElement(e.Fragment,null,(M=u==null?void 0:u.choices)==null?void 0:M.map((v,S)=>e.createElement("div",{className:`${a.flexRow} mt15`,key:S},e.createElement("div",{style:{lineHeight:"24px",flexShrink:0}},B[S]),e.createElement("div",{className:`${a.answer} ml5`},e.createElement(p.Z,{value:v==null?void 0:v.choice_text})))),F&&e.createElement("div",{className:`mt10 ${a.answerText}`},"\u53C2\u8003\u7B54\u6848\uFF1A",u==null?void 0:u.standard_answer_show)),u.item_type=="judgement"&&e.createElement("div",{className:a.answerWrap},e.createElement("div",{className:`${a.flexRow} mt15`},(D=u==null?void 0:u.choices)==null?void 0:D.map((v,S)=>e.createElement(k.ZP,{disabled:!0,key:S},v==null?void 0:v.choice_text))),F&&e.createElement("div",{className:`mt10 ${a.answerText}`},"\u53C2\u8003\u7B54\u6848\uFF1A",u==null?void 0:u.standard_answer_show)),u.item_type=="completion"&&e.createElement("div",{className:a.answerWrap},F&&e.createElement("div",{className:`${a.flexColumn} mt15`},(N=u==null?void 0:u.standard_answer)==null?void 0:N.map((v,S)=>e.createElement("div",null,(v==null?void 0:v.model)===1?e.createElement(p.Z,{key:S,value:`\u53C2\u8003\u7B54\u6848\uFF08\u586B\u7A7A${v.position}\uFF09\uFF1A${v.answer_text.join("\u3001")}`,className:a.answerText}):e.createElement("span",null,"\u53C2\u8003\u7B54\u6848\uFF08\u586B\u7A7A$",v.position,"\uFF09\uFF1A",e.createElement(H.Z,{value:v.answer_text.join("\u3001")})))))),u.item_type=="subjective"&&e.createElement("div",{className:a.answerWrap},F&&e.createElement("div",{className:"mt15"},e.createElement("div",{className:a.answerText},"\u53C2\u8003\u7B54\u6848\uFF1A"),e.createElement(p.Z,{value:(W=u==null?void 0:u.answer_texts)==null?void 0:W[0],className:a.answerText}))))}))},_e=()=>{const n={SINGLE:ne,MULTIPLE:ne,JUDGMENT:de,PROGRAM:ce,COMPLETION:x,SUBJECTIVE:P,PRACTICAL:Ee,COMBINATION:pe,BPROGRAM:ve};return n[c]?n[c]():null},ie=(n,u)=>{var m;return`<span style="margin-right: -10px">${u+1}\u3001</span><span class="c-grey-999">\uFF08${(n==null?void 0:n.item_type)==="combination"?`\u5171${(m=n==null?void 0:n.sub_questions)==null?void 0:m.length}\u5C0F\u9898\uFF0C`:""}${n.score}\u5206\uFF09</span> `};return e.createElement("div",{onMouseEnter:()=>A(l.id)},ee===l.id&&e.createElement("div",{className:a.action},e.createElement("div",{className:a.setScore,onClick:()=>b(l.id,i,l==null?void 0:l.shixun,l.score,l)},"\u8BBE\u7F6E\u5F97\u5206"),e.createElement("div",{className:a.delete,onClick:()=>G(l.id)},"\u5220\u9664")),e.createElement("div",{className:a.content},e.createElement("div",{className:a.titleWrap,style:{justifyContent:"space-between"}},(l==null?void 0:l.item_type)==="bprogram"?e.createElement(p.Z,{className:a.titleHtml,value:ie(l,r)+((te=l==null?void 0:l.program_attr)==null?void 0:te.description)}):e.createElement(p.Z,{className:a.titleHtml,value:ie(l,r)+((l==null?void 0:l.item_type)==="combination"?"\uFF08\u9898\u5E72\uFF09":"")+(l.name||(l==null?void 0:l.shixun_name))}),(l==null?void 0:l.item_type)==="combination"&&!oe&&e.createElement("span",{onClick:n=>{me(!J)},style:{textAlign:"end",flexShrink:0,cursor:"pointer"}},J?"\u5C55\u5F00":"\u6536\u8D77")),_e()))},o={bg:"bg___uBTSf",wrap:"wrap___u47s7",flexRow:"flexRow___QK3mq",flexColumn:"flexColumn___IEH4c",flexJustifyBetween:"flexJustifyBetween___VROqY",relative:"relative___iGg_n",questionNumber:"questionNumber___CYWUo",score:"score___pHhZR",selectTopicButton:"selectTopicButton___aNhaw",line:"line___zzL1y",dragTip:"dragTip___eJpug",typeActive:"typeActive___cHbxQ",mouseTypeActive:"mouseTypeActive___THFkb",typeName:"typeName___PsYTO",typeNumber:"typeNumber___IW6t9",typeAction:"typeAction___gdIEg",setScore:"setScore___ftbgZ",delete:"delete___d1fFi",modal:"modal___COzbG",modalColumn:"modalColumn___Z8nDu",shixunModal:"shixunModal___xxSWV",shixunScore:"shixunScore___zrpkw"},U=s(67417),K=s(89392),j=s.n(K),I=s(73170),le=Object.defineProperty,Q=Object.defineProperties,q=Object.getOwnPropertyDescriptors,z=Object.getOwnPropertySymbols,ue=Object.prototype.hasOwnProperty,ae=Object.prototype.propertyIsEnumerable,re=(r,i,c)=>i in r?le(r,i,{enumerable:!0,configurable:!0,writable:!0,value:c}):r[i]=c,E=(r,i)=>{for(var c in i||(i={}))ue.call(i,c)&&re(r,c,i[c]);if(z)for(var c of z(i))ae.call(i,c)&&re(r,c,i[c]);return r},h=(r,i)=>Q(r,q(i)),O=(r,i)=>{var c={};for(var l in r)ue.call(r,l)&&i.indexOf(l)<0&&(c[l]=r[l]);if(r!=null&&z)for(var l of z(r))i.indexOf(l)<0&&ae.call(r,l)&&(c[l]=r[l]);return c},g=(r,i,c)=>new Promise((l,ee)=>{var oe=A=>{try{G(c.next(A))}catch(F){ee(F)}},b=A=>{try{G(c.throw(A))}catch(F){ee(F)}},G=A=>A.done?l(A.value):Promise.resolve(A.value).then(oe,b);G((c=c.apply(r,i)).next())});const $=r=>({\u5355\u9009\u9898:2,\u591A\u9009\u9898:5,\u586B\u7A7A\u9898:2,\u5224\u65AD\u9898:2,\u7B80\u7B54\u9898:10,\u7F16\u7A0B\u9898:10,\u5B9E\u8BAD\u9898:5,\u7EC4\u5408\u9898:10})[r]||0,V=r=>{var i=r,{problemsetPreview:c,user:l,globalSetting:ee,loading:oe,dispatch:b}=i,G=O(i,["problemsetPreview","user","globalSetting","loading","dispatch"]),A,F,te,J;const[me,ne]=(0,t.useState)(),[de,ce]=(0,t.useState)(),x=(0,t.useRef)();console.log(c,"problemsetPreview"),(0,t.useEffect)(()=>(b({type:"globalSetting/footerToggle",payload:!1}),()=>{b({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,t.useEffect)(()=>{P()},[]);const P=()=>{b({type:"problemsetPreview/getPaperData"})},ve=(n,u,m=[],f,M)=>{var D;const N=j().cloneDeep(M),W=j().cloneDeep(m).map(d=>h(E({},d),{challenge_score:d.challenge_score||5}));if(x.current=f||$(u),u==="\u5B9E\u8BAD\u9898")return C.default.confirm({centered:!0,width:530,title:"\u8BBE\u7F6E\u5206\u6570",content:t.createElement("div",{className:o.shixunModal},t.createElement("div",null,"\u5173\u5361\uFF1A"),W==null?void 0:W.map((d,v)=>t.createElement("div",{className:o.shixunScore},v+1,"\u3001",d.challenge_name,t.createElement("div",{style:{minWidth:"130px"}},t.createElement(Z.Z,{defaultValue:d.challenge_score,min:1,onChange:S=>{d.challenge_score=S}}),t.createElement("span",{className:"ml5"},"\u5206/\u9898"))))),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>g(void 0,null,function*(){yield(0,I.Cc)({id:n,challenge_scores:W.map(d=>({challenge_id:d.challenge_id,score:d.challenge_score}))}),x.current=null,P()})});if(u==="\u7EC4\u5408\u9898")return C.default.confirm({centered:!0,width:530,title:"\u8BBE\u7F6E\u5206\u6570",content:t.createElement("div",{className:o.shixunModal,style:{maxHeight:200,overflow:"auto"}},(D=N==null?void 0:N.sub_questions)==null?void 0:D.map((d,v)=>t.createElement("div",{className:o.shixunScore},"\u7B2C",v+1,"\u5C0F\u9898",t.createElement("div",{style:{minWidth:"130px"}},t.createElement(Z.Z,{defaultValue:d.score,min:1,onChange:S=>{d.score=S}}),t.createElement("span",{className:"ml5"},"\u5206"))))),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>g(void 0,null,function*(){var d;yield(0,I.Vl)({id:n,subs:(d=N==null?void 0:N.sub_questions)==null?void 0:d.map(v=>({basket_id:v.basket_id,score:v.score}))}),x.current=null,P()})});C.default.confirm({centered:!0,title:"\u8BBE\u7F6E\u5206\u6570",content:t.createElement("div",{className:""},t.createElement("span",null,"\u672C\u9898\u5206\u503C\uFF1A"),t.createElement(Z.Z,{min:1,defaultValue:x.current,onChange:d=>{x.current=d}}),t.createElement("span",{className:"ml5"},"\u5206/\u9898"),t.createElement("br",null),u==="\u586B\u7A7A\u9898"&&t.createElement("div",{style:{color:"rgb(255, 0, 0)"}},"\u6BCF\u7A7A\u5206\u503C\u6309\u6BCF\u9898\u5206\u503C\u53D6\u5E73\u5747\u5206\u8BA1\u7B97")),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>g(void 0,null,function*(){yield b({type:"problemsetPreview/setScore",payload:{id:n,score:x.current}}),x.current=null,P()})})},Ee=n=>{C.default.confirm({centered:!0,title:"\u63D0\u793A",content:t.createElement("div",{className:o.modal},"\u786E\u8BA4\u5220\u9664\u8BE5\u8BD5\u9898\uFF1F"),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>g(void 0,null,function*(){yield b({type:"problemsetPreview/handleDelete",payload:{id:n}}),P()})})},pe=(n,u)=>{x.current=$(u),C.default.confirm({centered:!0,title:"\u6279\u91CF\u8BBE\u7F6E\u5206\u6570",content:t.createElement("div",{className:""},t.createElement("span",null,u==="\u7EC4\u5408\u9898"?"\u7EC4\u5408\u9898\u4E2D\u7684\u6BCF\u5C0F\u9898":u,"\uFF1A"),t.createElement(Z.Z,{min:1,defaultValue:x.current,onChange:m=>{x.current=m}}),t.createElement("span",{className:"ml5"},"\u5206/\u9898"),t.createElement("br",null),u==="\u586B\u7A7A\u9898"&&t.createElement("div",{style:{color:"rgb(255, 0, 0)"}},"\u6BCF\u7A7A\u5206\u503C\u6309\u6BCF\u9898\u5206\u503C\u53D6\u5E73\u5747\u5206\u8BA1\u7B97")),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>g(void 0,null,function*(){yield b({type:"problemsetPreview/batchSetScore",payload:{item_type:n,score:x.current}}),x.current=null,P()})})},_e=n=>{C.default.confirm({centered:!0,title:"\u63D0\u793A",content:t.createElement("div",{className:o.modalColumn},t.createElement("p",null,"\u5220\u9664\u5927\u9898\uFF0C\u5C06\u5220\u9664\u8BE5\u5927\u9898\u4E0B\u6240\u6709\u5C0F\u9898"),t.createElement("p",null,"\u786E\u8BA4\u5220\u9664\u8BE5\u5927\u9898\uFF1F")),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>g(void 0,null,function*(){yield b({type:"problemsetPreview/batchDelete",payload:{item_type:n}}),P()})})},ie=(n,u)=>g(void 0,null,function*(){if(!n.destination||!n.source)return;const m=u.questions[n.source.index].id,f=n.destination.index+1;(yield b({type:"problemsetPreview/adjustPosition",payload:{id:m,position:f}})).status!==-1&&P()});return t.createElement("section",{className:o.bg},t.createElement(R.Z,{className:"mt30",separator:">"},t.createElement(R.Z.Item,null,"\u8BD5\u9898\u5E93"),t.createElement(R.Z.Item,{href:"/problemset"},"\u4EBA\u5DE5\u7EC4\u5377"),t.createElement(R.Z.Item,null,"\u8BD5\u5377\u9884\u89C8")),t.createElement("div",{className:o.wrap},t.createElement("div",{className:"pt20 pb20"},t.createElement("div",{className:`${o.flexRow} ${o.flexJustifyBetween}`},t.createElement("div",null,t.createElement("span",{className:o.questionNumber},"\u9898\u6570\uFF1A",(A=c.paperData)==null?void 0:A.all_questions_count),t.createElement("span",{className:o.score},"\u603B\u5206\uFF1A",(F=c.paperData)==null?void 0:F.all_score)),t.createElement("div",{className:o.selectTopicButton,onClick:()=>T.history.push("/problemset/preview_select")},"\u7EE7\u7EED\u9009\u9898")),t.createElement("div",{className:o.line}),t.createElement("div",{className:o.dragTip},"\u5C0F\u9898\u4E4B\u95F4\u53EF\u4EE5\u62D6\u52A8\u6392\u5E8F"),(J=(te=c.paperData)==null?void 0:te.questionList)==null?void 0:J.map((n,u)=>{const m=n.type===de;return console.log(n,"paperItem"),t.createElement("div",{className:`${o.relative} mt20 mb20`,key:u},t.createElement("div",{className:`${o.typeActive} ${m?o.mouseTypeActive:""}`,onMouseEnter:()=>{ce(n.type),ne(null)}},t.createElement("span",{className:`${o.typeName} ${m?"ml20":""}`},n.number,"\u3001",n.name),t.createElement("span",{className:o.typeNumber},"\uFF08\u5171",n.questions_count,"\u9898\uFF0C",(n==null?void 0:n.type)==="COMBINATION"?`\u5305\u542B${n==null?void 0:n.sub_questions_count}\u5C0F\u9898\uFF0C`:"","\u5171",n.questions_score,"\u5206\uFF09")),m&&t.createElement("div",{className:`${o.typeAction} ${o.flexRow}`},n.type!=="PRACTICAL"&&t.createElement("div",{className:o.setScore,onClick:()=>pe(n.type,n.name)},"\u6279\u91CF\u8BBE\u7F6E\u5F97\u5206"),t.createElement("div",{className:o.delete,onClick:()=>_e(n.type)},"\u5220\u9664")),t.createElement(w.Z5,{onDragEnd:f=>ie(f,n)},t.createElement(w.bK,{droppableId:u.toString()},(f,M)=>{var D;return t.createElement("div",h(E({className:"mt20",ref:f.innerRef},f.droppableProps),{onScroll:()=>{}}),(D=n.questions)==null?void 0:D.map((N,W)=>t.createElement(w._l,{draggableId:N.id.toString(),index:W,key:N.id},d=>t.createElement("div",E(E({ref:d.innerRef},d.draggableProps),d.dragHandleProps),t.createElement(X,{index:W,typeName:n.name,type:n.type,data:N,inMouseId:me,onSetScore:ve,onDelete:Ee,onMouseEnter:v=>{ne(v),ce(null)}})))))})))}))),t.createElement(U.t,{okText:"\u4FDD\u5B58\u8BD5\u5377",onCancel:()=>T.history.replace("/problemset"),onOk:()=>T.history.push("/problemset/preview_new")}))};var se=(0,T.connect)(({problemsetPreview:r,user:i,loading:c,globalSetting:l})=>({problemsetPreview:r,user:i,globalSetting:l,loading:c.effects}))(V)}}]);