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.
2 lines
56 KiB
2 lines
56 KiB
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7043],{97903:function(Ue,me,v){v.d(me,{Z:function(){return ae}});var e=v(59301),S=v(98135),Ee=v(12563),pe=v(8591),le={flex:"flex___eLcnP",flex1:"flex1___yUTT7",color666:"color666___TiUhG",error:"error___gTTtv",deleteIcon:"deleteIcon___mnZW1",addIcon:"addIcon___JC5NS"},q=v(22415);const{TextArea:ie}=S.default;class oe extends e.Component{constructor(j){super(j),this.state={inputVisible:!1,EditInputIndex:-1}}render(){let{index:j,onAnswerChange:se,addChildAnswer:L,exerciseIsPublish:ge,answers:h,activeOptionErrorIndex:y,flex:b="0 0 1000px"}=this.props;console.log("----",h);let{inputVisible:G,EditInputIndex:X}=this.state;return e.createElement("div",{className:le.flex},e.createElement("div",{className:`${le.color666} mb5 mt6`,style:{flex:"0 0 90px"}},"\u7B54\u6848(\u586B\u7A7A",j+1,"):"),e.createElement("div",{style:{border:"1px solid #f6f6f6",flex:1,padding:10}},h==null?void 0:h.map((O,$)=>e.createElement(e.Fragment,null,X!==$?(O==null?void 0:O.length)>0?e.createElement(Ee.default,{className:"edit-tag",key:O,closable:!0,onClose:r=>{r.preventDefault(),(h==null?void 0:h.length)===1&&$===0?this.props.deleteChildAnswermain(j,$):this.props.deleteChildAnswer(j,$)}},e.createElement("span",{onDoubleClick:r=>{this.setState({EditInputIndex:$}),r.preventDefault()}},O)):e.createElement(S.default,{defaultValue:O,style:{width:78,marginRight:8,height:24,verticalAlign:"top"},onBlur:r=>{if(r.target.value.replaceAll(" ","").length<=0){pe.ZP.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7EAF\u7A7A\u683C");return}se(j,$,r.target.value),this.setState({EditInputIndex:-1,inputVisible:!1})}}):e.createElement(S.default,{defaultValue:O,style:{width:78,marginRight:8,height:24,verticalAlign:"top"},onBlur:r=>{if(r.target.value.replaceAll(" ","").length<=0){pe.ZP.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7EAF\u7A7A\u683C");return}se(j,$,r.target.value),this.setState({EditInputIndex:-1,inputVisible:!1})}}))),!G&&e.createElement(Ee.default,{className:"site-tag-plus",onClick:()=>{L(j),this.setState({inputVisible:!0})}},e.createElement(q.Z,null)," \u65B0\u589E\u7B54\u6848")))}}var ae=oe},73661:function(Ue,me,v){v.d(me,{Z:function(){return ge}});var e=v(59301),S=v(94646),Ee=Object.defineProperty,pe=Object.defineProperties,le=Object.getOwnPropertyDescriptors,q=Object.getOwnPropertySymbols,ie=Object.prototype.hasOwnProperty,oe=Object.prototype.propertyIsEnumerable,ae=(h,y,b)=>y in h?Ee(h,y,{enumerable:!0,configurable:!0,writable:!0,value:b}):h[y]=b,te=(h,y)=>{for(var b in y||(y={}))ie.call(y,b)&&ae(h,b,y[b]);if(q)for(var b of q(y))oe.call(y,b)&&ae(h,b,y[b]);return h},j=(h,y)=>pe(h,le(y)),se=(h,y,b)=>(ae(h,typeof y!="symbol"?y+"":y,b),b);const L="\u2581";class ge extends e.Component{constructor(){super(...arguments),se(this,"getChCountBeforeCursor",(y,b)=>{const G=b.line;let X=0;for(let $=0;$<G;$++)X+=y.getLine($).split(L).length-1;const O=y.getLine(G).substring(0,b.ch);return X+=O.split(L).length-1,X}),se(this,"onCMBeforeChange",(y,b)=>{const G=y.getRange(b.from,b.to);let X=0;if(b.text.forEach(O=>{X+=O.split(L).length-1}),G&&G.indexOf(L)!=-1){const O=G.split(L).length-1,$=this.getChCountBeforeCursor(y,b.from);console.log(`\u5220\u9664${O}\u4E2A\uFF0C \u4E4B\u524D\u6709${$}\u4E2A\uFF0C\u65B0\u589E${X}\u4E2A`),this.props.deleteEmptyDisabled?b.cancel():this.props.onPlaceholderChange&&this.props.onPlaceholderChange($,O,X)}else if(X){const O=this.getChCountBeforeCursor(y,b.from);console.log(`\u65B0\u589E${X}\u4E2A\uFF0C\u4E4B\u524D\u6709${O}\u4E2A`),this.props.onPlaceholderChange&&this.props.onPlaceholderChange(O,0,X)}})}render(){return e.createElement(S.Z,j(te({},this.props),{onCMBeforeChange:this.onCMBeforeChange}))}}},72453:function(Ue,me,v){v.r(me),v.d(me,{default:function(){return qn}});var e=v(59301),S=v(63144),Ee=v(20834),pe=v(44e3),le=v(78241),q=v(8591),ie=v(28103),oe=v(66104),ae=v(95237),te=v(43604),j=v(6848),se=v(98135),L=v(3113),ge=v(57703),h=v(24096),y=v(43418),b=v(24905),G=v(26220),X=v(21797),O=v(94646),$=v(31272),r={flex_box_center:"flex_box_center___T9vjl",flex_space_between:"flex_space_between___zZP1J",flex_box_vertical_center:"flex_box_vertical_center___vbIhw",flex_box_center_end:"flex_box_center_end___SjRau",flex_box_column:"flex_box_column___Ic_zi",wrap:"wrap___GtXAk",modal:"modal___mDuC3",titleWrap:"titleWrap___EzCZh",required:"required___KgfdI",title:"title___TMgfc",colorGray:"colorGray___xNVTs",choiceWrap:"choiceWrap___Rv9ug",answer:"answer___hVpls",activeAnswer:"activeAnswer___oJoq9",deleteIcon:"deleteIcon___bkn4b",addIcon:"addIcon___S2pDY",editorWrap:"editorWrap___BOx_r",htmlWrap:"htmlWrap___ERVlQ",radio:"radio___lrt5b",color333:"color333___pz3OT",color999:"color999___jtQ7e",questionType:"questionType___qUnUb",questionChoices:"questionChoices___n36qp"},Jt=Object.defineProperty,xe=Object.getOwnPropertySymbols,Ke=Object.prototype.hasOwnProperty,ze=Object.prototype.propertyIsEnumerable,Ge=(n,l,t)=>l in n?Jt(n,l,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[l]=t,ke=(n,l)=>{for(var t in l||(l={}))Ke.call(l,t)&&Ge(n,t,l[t]);if(xe)for(var t of xe(l))ze.call(l,t)&&Ge(n,t,l[t]);return n},Qt=(n,l)=>{var t={};for(var a in n)Ke.call(n,a)&&l.indexOf(a)<0&&(t[a]=n[a]);if(n!=null&&xe)for(var a of xe(n))l.indexOf(a)<0&&ze.call(n,a)&&(t[a]=n[a]);return t},qe=(n,l,t)=>new Promise((a,x)=>{var I=u=>{try{s(t.next(u))}catch(c){x(c)}},m=u=>{try{s(t.throw(u))}catch(c){x(c)}},s=u=>u.done?a(u.value):Promise.resolve(u.value).then(I,m);s((t=t.apply(n,l)).next())});const Ze=["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"],Ut=(n,l)=>{var t=n,{problemset:a,globalSetting:x,loading:I,dispatch:m,onRef:s=()=>{},editData:u}=t,c=Qt(t,["problemset","globalSetting","loading","dispatch","onRef","editData"]);const[E,A]=(0,e.useState)([]),[D,R]=(0,e.useState)(),[o,P]=(0,e.useState)([]),[w,k]=(0,e.useState)(""),[V,J]=(0,e.useState)(5),[H,M]=(0,e.useState)(!1),Q=(0,S.useParams)();(0,e.useEffect)(()=>{A(["","","",""])},[]),(0,e.useEffect)(()=>{if(!(u!=null&&u.question_choices)){M(!0);return}k(u==null?void 0:u.question_title),J(parseInt(u==null?void 0:u.question_score)),A(u==null?void 0:u.question_choices.map(i=>i.choice_text));const p=[];u==null||u.standard_answer.map((i,F)=>{p.push(i-1)}),P(p)},[u]),(0,e.useImperativeHandle)(l,()=>({onSave:W,isEdit:H}));const W=()=>qe(void 0,null,function*(){if(!w)return q.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u76EE"),!1;const p=E.findIndex(f=>!f);if(p>-1)return q.ZP.info(`\u8BF7\u5148\u8F93\u5165 ${Ze[p]} \u9009\u9879\u7684\u5185\u5BB9`),!1;if(!o.length)return q.ZP.info("\u8BF7\u8BBE\u7F6E\u672C\u9898\u7684\u6B63\u786E\u7B54\u6848\uFF0C\u70B9\u51FB\u9009\u9879A/B...\u5373\u53EF\u5B8C\u6210\u8BBE\u7F6E"),!1;if(o.length<1)return q.ZP.info("\u8BF7\u9009\u62E9\u7B54\u6848"),!1;const i=E.map((f,ue)=>({choice_text:f,is_answer:o.includes(ue)?ue+1:0}));let F;u.question_id?F=yield m({type:"exercise/editExerciseQuestion",payload:{id:u.question_id,question_title:w,question_type:1,question_score:"5.0",question_choices:i.map(f=>f.choice_text),standard_answers:i.filter(f=>f.is_answer).map(f=>f.is_answer)}}):F=yield m({type:"exercise/addExerciseQuestion",payload:{categoryId:Q.categoryId,question_title:w,question_type:1,question_score:"5.0",question_choices:i.map(f=>f.choice_text),standard_answers:i.filter(f=>f.is_answer).map(f=>f.is_answer)}}),F.status===0&&(q.ZP.success("\u4FDD\u5B58\u6210\u529F"),M(!1),m({type:"exercise/editExercise",payload:ke({},Q)}))}),g=[{name:"\u5220\u9664",icon:"iconfont c-light-black ml30 icon-shanchu",id:"del"},{name:"\u4E0A\u79FB",icon:"iconfont c-green ml30 icon-shangyi_Hover",id:"up"},{name:"\u4E0B\u79FB",icon:"iconfont c-green ml30 icon-xiayi_moren",id:"down"},{name:"\u7F16\u8F91",icon:"iconfont c-green ml30 icon-bianjishijuan3x",id:"edit"}],C=p=>qe(void 0,null,function*(){switch(p.id){case"del":let i;y.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u95EE\u9898\u5417\uFF1F",onOk(){return qe(this,null,function*(){yield(0,X.Fl)({id:u.question_id}),m({type:"exercise/editExercise",payload:ke({},Q)})})}});break;case"up":case"down":yield m({type:"exercise/exeriseMoveUpDown",payload:{id:u.question_id,opr:p.id}}),m({type:"exercise/editExercise",payload:ke({},Q)});break;case"edit":M(!0);break}}),d=()=>{var p;return e.createElement("aside",null,e.createElement("div",{className:r.questionType},e.createElement("div",null,e.createElement("span",{className:"font16 c-blue"},u.key,"\u3001\u591A\u9009\u9898"),"\uFF08",u.question_score,"\u5206\uFF09"),!u.hideAction&&g.map(function(i,F){return i.id==="up"&&u.key===1||i.id==="down"&&u.key===u.len?null:e.createElement(j.Z,{key:F,placement:"bottom",title:i.name},e.createElement("span",{onClick:()=>C(i),className:i.icon}))})),e.createElement("div",{className:"mt5"},e.createElement($.Z,{value:u.question_title})),e.createElement("div",{className:r.questionChoices},(p=u==null?void 0:u.question_choices)==null?void 0:p.map(function(i,F){return e.createElement(ae.Z,null,e.createElement(te.Z,null,e.createElement(b.default,{key:F,checked:u.standard_answer.includes(F+1),disabled:!0},Ze[F],".")),e.createElement(te.Z,{flex:"1"},e.createElement("span",{className:"c-black font14"},e.createElement($.Z,{value:i.choice_text}))))})))},z=()=>e.createElement("aside",null,e.createElement("div",{className:r.questionType},e.createElement("div",null,e.createElement("span",{className:"font16 c-blue"},"\u9009\u62E9\u9898"),"\uFF08\u5BA2\u89C2\u9898\uFF0C\u7531\u7CFB\u7EDF\u81EA\u52A8\u8BC4\u5206\uFF0C\u8BF7\u8BBE\u7F6E\u6807\u51C6\u7B54\u6848\uFF09")),e.createElement("p",{className:r.titleWrap},e.createElement("span",{className:r.required},"*"),e.createElement("span",{className:r.title},"\u9898\u5E72\uFF1A")),e.createElement(O.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:w,onChange:p=>k(p)}),E.map((p,i)=>e.createElement("div",{className:r.choiceWrap,key:i},e.createElement(j.Z,{title:"\u70B9\u51FB\u8BBE\u7F6E\u4E3A\u6807\u51C6\u7B54\u6848",placement:"left"},e.createElement("div",{className:`${r.answer} ${o.includes(i)?r.activeAnswer:""}`,onClick:()=>{o.includes(i)?P(o.filter(F=>F!==i)):P([...o,i])}},Ze[i])),e.createElement("div",{className:r.editorWrap},D===i?e.createElement(O.Z,{id:`single-question-option-${i}`,watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",defaultValue:p,onChange:F=>{E[i]=F,A(E)}}):e.createElement("div",{className:r.htmlWrap,onClick:()=>R(i)},e.createElement($.Z,{value:p}))),i>1&&e.createElement(j.Z,{title:"\u5220\u9664"},e.createElement("i",{className:`${r.deleteIcon} iconfont icon-htmal5icon19`,onClick:()=>A(E.filter((F,f)=>f!==i))})),i<7&&i===E.length-1&&e.createElement(j.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},e.createElement("i",{className:`${r.addIcon} iconfont icon-roundaddfill ml6`,onClick:()=>A([...E,""])})))),e.createElement("p",{className:"c-orange"},"\u6E29\u99A8\u63D0\u793A\uFF1A\u70B9\u51FB\u9009\u9879\u8F93\u5165\u6846\u53EF\u8BBE\u7F6E\u7B54\u6848\uFF1B\u9009\u4E2D\u7684\u9009\u9879\u5373\u4E3A\u6B63\u786E\u7B54\u6848\uFF0C\u9009\u62E9\u591A\u4E2A\u7B54\u6848\u5373\u4E3A\u591A\u9009\u9898"),e.createElement("p",{className:""},"\u5206\u503C\uFF1A",e.createElement(G.Z,{value:V,max:1e4,min:-1,onChange:p=>{J(p)}})," \u5206"),e.createElement("aside",{className:"tr"},u.question_id&&e.createElement(L.ZP,{type:"default",onClick:()=>M(!1)},"\u53D6\u6D88"),e.createElement(L.ZP,{className:"ml20",type:"primary",onClick:()=>W()},"\u4FDD\u5B58")));return e.createElement("section",{className:r.wrap},!H&&d(),H&&z())};var Kt=(0,S.connect)(({problemset:n,loading:l,globalSetting:t})=>({problemset:n,globalSetting:t,loading:l.effects}),null,null,{forwardRef:!0})((0,e.forwardRef)(Ut)),_e=v(5112),zt=Object.defineProperty,Ae=Object.getOwnPropertySymbols,Ye=Object.prototype.hasOwnProperty,Xe=Object.prototype.propertyIsEnumerable,et=(n,l,t)=>l in n?zt(n,l,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[l]=t,Oe=(n,l)=>{for(var t in l||(l={}))Ye.call(l,t)&&et(n,t,l[t]);if(Ae)for(var t of Ae(l))Xe.call(l,t)&&et(n,t,l[t]);return n},Gt=(n,l)=>{var t={};for(var a in n)Ye.call(n,a)&&l.indexOf(a)<0&&(t[a]=n[a]);if(n!=null&&Ae)for(var a of Ae(n))l.indexOf(a)<0&&Xe.call(n,a)&&(t[a]=n[a]);return t},Ie=(n,l,t)=>new Promise((a,x)=>{var I=u=>{try{s(t.next(u))}catch(c){x(c)}},m=u=>{try{s(t.throw(u))}catch(c){x(c)}},s=u=>u.done?a(u.value):Promise.resolve(u.value).then(I,m);s((t=t.apply(n,l)).next())});const Te=["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"],Yt=(n,l)=>{var t=n,{problemset:a,globalSetting:x,loading:I,dispatch:m,onRef:s=()=>{},editData:u}=t,c=Gt(t,["problemset","globalSetting","loading","dispatch","onRef","editData"]);const[E,A]=(0,e.useState)([]),[D,R]=(0,e.useState)(),[o,P]=(0,e.useState)([]),[w,k]=(0,e.useState)(""),[V,J]=(0,e.useState)(0),[H,M]=(0,e.useState)(!1),Q=(0,S.useParams)();(0,e.useEffect)(()=>{A(["","","",""])},[]),(0,e.useEffect)(()=>{if(!(u!=null&&u.question_choices)){M(!0);return}k(u==null?void 0:u.question_title),J(parseInt(u==null?void 0:u.question_score)),A(u==null?void 0:u.question_choices.map(i=>i.choice_text));const p=[];u==null||u.standard_answer.map((i,F)=>{p.push(i-1)}),P(p)},[u]),(0,e.useImperativeHandle)(l,()=>({onSave:W,isEdit:H}));const W=()=>Ie(void 0,null,function*(){if(!w)return q.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u76EE"),!1;const p=E.findIndex(f=>!f);if(p>-1)return q.ZP.info(`\u8BF7\u5148\u8F93\u5165 ${Te[p]} \u9009\u9879\u7684\u5185\u5BB9`),!1;if(!o.length)return q.ZP.info("\u8BF7\u8BBE\u7F6E\u672C\u9898\u7684\u6B63\u786E\u7B54\u6848\uFF0C\u70B9\u51FB\u9009\u9879A/B...\u5373\u53EF\u5B8C\u6210\u8BBE\u7F6E"),!1;if(o.length<1)return q.ZP.info("\u8BF7\u9009\u62E9\u7B54\u6848"),!1;const i=E.map((f,ue)=>({choice_text:f,is_answer:o.includes(ue)?ue+1:0}));let F;u.question_id?F=yield(0,h.Kc)({id:u.question_id,question_title:w,question_type:1,question_score:V,question_choices:i.map(f=>f.choice_text),standard_answers:i.filter(f=>f.is_answer).map(f=>f.is_answer)}):F=yield(0,h.iV)({exercise_bank_id:Q.topicId,question_title:w,question_type:1,question_score:"5.0",question_choices:i.map(f=>f.choice_text),standard_answers:i.filter(f=>f.is_answer).map(f=>f.is_answer)}),F.status===0&&(q.ZP.success("\u4FDD\u5B58\u6210\u529F"),M(!1)),yield m({type:"polls/getExerciseBanks",payload:Oe({},Q)})}),g=[{name:"\u5220\u9664",icon:"iconfont c-light-black ml30 icon-shanchu",id:"del"},{name:"\u4E0A\u79FB",icon:"iconfont c-green ml30 icon-shangyi_Hover",id:"up"},{name:"\u4E0B\u79FB",icon:"iconfont c-green ml30 icon-xiayi_moren",id:"down"},{name:"\u7F16\u8F91",icon:"iconfont c-green ml30 icon-bianjishijuan3x",id:"edit"}],C=p=>Ie(void 0,null,function*(){switch(p.id){case"del":let i;y.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u95EE\u9898\u5417\uFF1F",onOk(){return Ie(this,null,function*(){yield(0,h.x$)({pollsId:u.question_id}),m({type:"polls/getExerciseBanks",payload:Oe({},Q)})})}});break;case"up":case"down":yield(0,h.W)({exerciseId:u==null?void 0:u.question_id,opr:p.id}),m({type:"polls/getExerciseBanks",payload:Oe({},Q)});break;case"edit":M(!0);break}}),d=()=>{var p;return e.createElement("aside",null,e.createElement("div",{className:r.questionType},e.createElement("div",null,e.createElement("span",{className:"font16 c-blue"},u.key,"\u3001\u5355\u9009\u9898"),"\uFF08",u.question_score,"\u5206\uFF09"),!u.hideAction&&g.map(function(i,F){return i.id==="up"&&u.key===1||i.id==="down"&&u.key===u.len?null:e.createElement(j.Z,{key:F,placement:"bottom",title:i.name},e.createElement("span",{onClick:()=>C(i),className:i.icon}))})),e.createElement("div",{className:"mt5"},e.createElement($.Z,{value:u.question_title})),e.createElement("div",{className:r.questionChoices},(p=u==null?void 0:u.question_choices)==null?void 0:p.map(function(i,F){return e.createElement(ae.Z,null,e.createElement(te.Z,null,e.createElement(_e.ZP,{key:F,checked:u.standard_answer.includes(F+1),disabled:!0},Te[F],".")),e.createElement(te.Z,{flex:"1"},e.createElement("span",{className:"c-black font14"},e.createElement($.Z,{value:i.choice_text}))))})))},z=()=>e.createElement("aside",null,e.createElement("div",{className:r.questionType},e.createElement("div",null,e.createElement("span",{className:"font16 c-blue"},"\u9009\u62E9\u9898"),"\uFF08\u5BA2\u89C2\u9898\uFF0C\u7531\u7CFB\u7EDF\u81EA\u52A8\u8BC4\u5206\uFF0C\u8BF7\u8BBE\u7F6E\u6807\u51C6\u7B54\u6848\uFF09")),e.createElement("p",{className:r.titleWrap},e.createElement("span",{className:r.required},"*"),e.createElement("span",{className:r.title},"\u9898\u5E72\uFF1A")),e.createElement(O.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:w,onChange:p=>k(p)}),E.map((p,i)=>e.createElement("div",{className:r.choiceWrap,key:i},e.createElement(j.Z,{title:"\u70B9\u51FB\u8BBE\u7F6E\u4E3A\u6807\u51C6\u7B54\u6848",placement:"left"},e.createElement("div",{className:`${r.answer} ${o.includes(i)?r.activeAnswer:""}`,onClick:()=>{o.includes(i)?P(o.filter(F=>F!==i)):P([...o,i])}},Te[i])),e.createElement("div",{className:r.editorWrap},D===i?e.createElement(O.Z,{id:`single-question-option-${i}`,watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",defaultValue:p,onChange:F=>{E[i]=F,A(E)}}):e.createElement("div",{className:r.htmlWrap,onClick:()=>R(i)},e.createElement($.Z,{value:p}))),i>1&&e.createElement(j.Z,{title:"\u5220\u9664"},e.createElement("i",{className:`${r.deleteIcon} iconfont icon-htmal5icon19`,onClick:()=>A(E.filter((F,f)=>f!==i))})),i<7&&i===E.length-1&&e.createElement(j.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},e.createElement("i",{className:`${r.addIcon} iconfont icon-roundaddfill ml6`,onClick:()=>A([...E,""])})))),e.createElement("p",{className:"c-orange"},"\u6E29\u99A8\u63D0\u793A\uFF1A\u70B9\u51FB\u9009\u9879\u8F93\u5165\u6846\u53EF\u8BBE\u7F6E\u7B54\u6848\uFF1B\u9009\u4E2D\u7684\u9009\u9879\u5373\u4E3A\u6B63\u786E\u7B54\u6848\uFF0C\u9009\u62E9\u591A\u4E2A\u7B54\u6848\u5373\u4E3A\u591A\u9009\u9898"),e.createElement("p",{className:""},"\u5206\u503C\uFF1A",e.createElement(G.Z,{value:V,max:1e4,min:-1,onChange:p=>{J(p)}})," \u5206"),e.createElement("aside",{className:"tr"},u.question_id&&e.createElement(L.ZP,{type:"default",onClick:()=>M(!1)},"\u53D6\u6D88"),e.createElement(L.ZP,{className:"ml20",type:"primary",onClick:()=>W()},"\u4FDD\u5B58")));return e.createElement("section",{className:r.wrap},!H&&d(),H&&z())};var Xt=(0,S.connect)(({problemset:n,loading:l,globalSetting:t})=>({problemset:n,globalSetting:t,loading:l.effects}),null,null,{forwardRef:!0})((0,e.forwardRef)(Yt)),en=Object.defineProperty,Ce=Object.getOwnPropertySymbols,tt=Object.prototype.hasOwnProperty,nt=Object.prototype.propertyIsEnumerable,ut=(n,l,t)=>l in n?en(n,l,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[l]=t,je=(n,l)=>{for(var t in l||(l={}))tt.call(l,t)&&ut(n,t,l[t]);if(Ce)for(var t of Ce(l))nt.call(l,t)&&ut(n,t,l[t]);return n},tn=(n,l)=>{var t={};for(var a in n)tt.call(n,a)&&l.indexOf(a)<0&&(t[a]=n[a]);if(n!=null&&Ce)for(var a of Ce(n))l.indexOf(a)<0&&nt.call(n,a)&&(t[a]=n[a]);return t},Le=(n,l,t)=>new Promise((a,x)=>{var I=u=>{try{s(t.next(u))}catch(c){x(c)}},m=u=>{try{s(t.throw(u))}catch(c){x(c)}},s=u=>u.done?a(u.value):Promise.resolve(u.value).then(I,m);s((t=t.apply(n,l)).next())});const nn=["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"],un=(n,l)=>{var t=n,{problemset:a,globalSetting:x,loading:I,dispatch:m,onRef:s=()=>{},editData:u}=t,c=tn(t,["problemset","globalSetting","loading","dispatch","onRef","editData"]);const[E,A]=(0,e.useState)(),[D,R]=(0,e.useState)(""),[o,P]=(0,e.useState)(!1),[w,k]=(0,e.useState)(5),V=(0,S.useParams)();(0,e.useEffect)(()=>{if(!(u!=null&&u.question_choices)){P(!0);return}R(u==null?void 0:u.question_title),k(u==null?void 0:u.question_score),A(u.standard_answer[0]+"")},[u]),(0,e.useImperativeHandle)(l,()=>({onSave:J,isEdit:o}));const J=()=>Le(void 0,null,function*(){if(!D)return q.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;if(!E)return q.ZP.info("\u8BF7\u5148\u70B9\u51FB\u9009\u62E9\u672C\u9009\u62E9\u9898\u7684\u6B63\u786E\u9009\u9879"),!1;const g=[{choice_text:"\u6B63\u786E",is_answer:E==="1"?1:0},{choice_text:"\u9519\u8BEF",is_answer:E==="2"?2:0}];let C;return u.question_id?C=yield(0,h.Kc)({id:u.question_id,question_title:D,question_type:2,question_score:w,question_choices:g.map(d=>d.choice_text),standard_answers:g.filter(d=>d.is_answer).map(d=>d.is_answer)}):C=yield(0,h.iV)({exercise_bank_id:V.topicId,question_title:D,question_type:2,question_score:w,question_choices:g.map(d=>d.choice_text),standard_answers:g.filter(d=>d.is_answer).map(d=>d.is_answer)}),C.status===0&&(q.ZP.success("\u4FDD\u5B58\u6210\u529F"),P(!1)),m({type:"polls/getExerciseBanks",payload:je({},V)}),{name:D,choices:g}}),H=[{name:"\u5220\u9664",icon:"iconfont c-light-black ml30 icon-shanchu",id:"del"},{name:"\u4E0A\u79FB",icon:"iconfont c-green ml30 icon-shangyi_Hover",id:"up"},{name:"\u4E0B\u79FB",icon:"iconfont c-green ml30 icon-xiayi_moren",id:"down"},{name:"\u7F16\u8F91",icon:"iconfont c-green ml30 icon-bianjishijuan3x",id:"edit"}],M=g=>Le(void 0,null,function*(){switch(g.id){case"del":let C;y.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u95EE\u9898\u5417\uFF1F",onOk(){return Le(this,null,function*(){yield(0,h.x$)({pollsId:u.question_id}),m({type:"polls/getExerciseBanks",payload:je({},V)})})}});break;case"up":case"down":yield(0,h.W)({exerciseId:u==null?void 0:u.question_id,opr:g.id}),m({type:"polls/getExerciseBanks",payload:je({},V)});break;case"edit":P(!0);break}}),Q=()=>{var g;return e.createElement("aside",null,e.createElement("div",{className:r.questionType},e.createElement("div",null,e.createElement("span",{className:"font16 c-blue"},u.key,"\u3001\u5224\u65AD\u9898"),"\uFF08",u.question_score,"\u5206\uFF09"),!u.hideAction&&H.map(function(C,d){return C.id==="up"&&u.key===1||C.id==="down"&&u.key===u.len?null:e.createElement(j.Z,{key:d,placement:"bottom",title:C.name},e.createElement("span",{onClick:()=>M(C),className:C.icon}))})),e.createElement("div",{className:"mt5"},u.question_title),e.createElement("div",{className:r.questionChoices},(g=u==null?void 0:u.question_choices)==null?void 0:g.map(function(C,d){return e.createElement(_e.ZP,{key:d,checked:u.standard_answer.includes(d+1),disabled:!0},nn[d],". ",e.createElement("span",{className:"c-black font14"},C.choice_text))})))},W=()=>e.createElement("aside",null,e.createElement("div",null,e.createElement("span",{className:"font16 c-blue"},"\u5224\u65AD\u9898"),"\uFF08\u5BA2\u89C2\u9898\uFF0C\u7531\u7CFB\u7EDF\u81EA\u52A8\u8BC4\u5206\uFF0C\u8BF7\u8BBE\u7F6E\u6807\u51C6\u7B54\u6848\uFF09"),e.createElement("p",{className:r.titleWrap},e.createElement("span",{className:r.required},"*"),e.createElement("span",{className:r.title},"\u9898\u5E72\uFF1A")),e.createElement(O.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:D,onChange:g=>R(g)}),e.createElement("p",{className:r.titleWrap},e.createElement("span",{className:r.required},"*"),e.createElement("span",{className:r.title},"\u7B54\u6848\u9009\u9879\uFF1A",e.createElement("span",{className:r.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),e.createElement(_e.ZP.Group,{buttonStyle:"solid",value:E,onChange:g=>A(g.target.value)},e.createElement(_e.ZP.Button,{value:"1",className:`${r.radio} mr40`},"\u6B63\u786E"),e.createElement(_e.ZP.Button,{value:"2",className:r.radio},"\u9519\u8BEF")),e.createElement("p",{className:"c-orange"},"\u6E29\u99A8\u63D0\u793A\uFF1A\u70B9\u51FB\u9009\u9879\uFF0C\u53EF\u4EE5\u76F4\u63A5\u8BBE\u7F6E\u6807\u51C6\u7B54\u6848"),e.createElement("p",{className:""},"\u5206\u503C\uFF1A",e.createElement(G.Z,{value:w,max:1e4,min:-1,onChange:g=>{k(g)}})," \u5206"),e.createElement("aside",{className:"tr"},u.question_id&&e.createElement(L.ZP,{type:"default",onClick:()=>P(!1)},"\u53D6\u6D88"),e.createElement(L.ZP,{className:"ml20",type:"primary",onClick:()=>J()},"\u4FDD\u5B58")));return e.createElement("section",{className:r.wrap},!o&&Q(),o&&W())};var ln=(0,S.connect)(({problemset:n,loading:l,globalSetting:t})=>({problemset:n,globalSetting:t,loading:l.effects}),null,null,{forwardRef:!0})((0,e.forwardRef)(un)),an=v(73661),sn=v(97903),lt=v(15826),rn=Object.defineProperty,we=Object.getOwnPropertySymbols,at=Object.prototype.hasOwnProperty,st=Object.prototype.propertyIsEnumerable,it=(n,l,t)=>l in n?rn(n,l,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[l]=t,Re=(n,l)=>{for(var t in l||(l={}))at.call(l,t)&&it(n,t,l[t]);if(we)for(var t of we(l))st.call(l,t)&&it(n,t,l[t]);return n},on=(n,l)=>{var t={};for(var a in n)at.call(n,a)&&l.indexOf(a)<0&&(t[a]=n[a]);if(n!=null&&we)for(var a of we(n))l.indexOf(a)<0&&st.call(n,a)&&(t[a]=n[a]);return t},Ve=(n,l,t)=>new Promise((a,x)=>{var I=u=>{try{s(t.next(u))}catch(c){x(c)}},m=u=>{try{s(t.throw(u))}catch(c){x(c)}},s=u=>u.done?a(u.value):Promise.resolve(u.value).then(I,m);s((t=t.apply(n,l)).next())});const jn=null,cn=(n,l)=>{var t=n,{problemset:a,globalSetting:x,loading:I,dispatch:m,editData:s}=t,u=on(t,["problemset","globalSetting","loading","dispatch","editData"]);const[c,E]=(0,e.useState)(""),[A,D]=(0,e.useState)(""),[R,o]=(0,e.useState)([]),[P,w]=(0,e.useState)(""),[k,V]=(0,e.useState)(),[J,H]=(0,e.useState)(!1),[M,Q]=(0,e.useState)(5),[W,g]=(0,e.useState)(!1),C=(0,S.useParams)();(0,e.useEffect)(()=>{if(!(s!=null&&s.question_title)){g(!0);return}E(s==null?void 0:s.question_title),V(s==null?void 0:s.is_ordered),Q(s==null?void 0:s.question_score);const _=s==null?void 0:s.standard_answer.map(B=>B.answer_text);o(_)},[a.editData]),(0,e.useEffect)(()=>{H(!1)},[W]),(0,e.useImperativeHandle)(l,()=>({onSave:d,isEdit:W}));const d=()=>Ve(void 0,null,function*(){let _=[],B=!1;if(R.forEach((Y,ee)=>{_.push({choice_id:ee+1,answer_text:[]}),Y.forEach((ce,De)=>{_[ee].answer_text.push(ce),(!ce||!(0,lt.eR)(ce,1e4))&&(w(`${ee}-${De}`),q.ZP.info(ce?"\u7B54\u6848\u4E0D\u80FD\u8D85\u8FC710000\u5B57\u7B26":"\u7B54\u6848\uFF1A\u4E0D\u80FD\u4E3A\u7A7A"),B=!0)})}),B)return!1;let T;return s.question_id?T=yield(0,h.Kc)({id:s.question_id,question_title:c,question_type:3,question_score:M,is_ordered:k,standard_answers:_}):T=yield(0,h.iV)({exercise_bank_id:C.topicId,question_title:c,question_type:3,question_score:M,is_ordered:k,standard_answers:_}),T.status===0&&(q.ZP.success("\u4FDD\u5B58\u6210\u529F"),g(!1)),m({type:"polls/getExerciseBanks",payload:Re({},C)}),{name:c,analysis:A,standard_answers:_,is_ordered:k}}),z=(_,B,T)=>{const Y=R.slice();if(B&&Y.splice(_,B),T&&J)for(let ee=0;ee<T;ee++)Y.splice(_+ee,0,[""]);H(!0),o(Y)},p=(_,B,T)=>{w("");let Y=R.slice();Y[_][B]=T,o(Y)},i=_=>{let B=R.slice();B[_]=[...B[_],""],o(B)},F=(_,B)=>{let T=R.slice();if(!T[_][B]){T[_]=T[_].filter((Y,ee)=>ee!==B),o(T);return}y.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u53C2\u8003\u7B54\u6848\u5417\uFF1F",className:r.modal,onOk:()=>{T[_]=T[_].filter((Y,ee)=>ee!==B),o(T)}})},f=_=>{y.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u53C2\u8003\u7B54\u6848\u5417\uFF1F",className:r.modal,onOk:()=>{let B=R.slice();B=R.filter((T,Y)=>_!==Y),o(B)}})},ue=()=>e.createElement("aside",null,e.createElement("div",{className:r.questionType},e.createElement("div",null,e.createElement("span",{className:"font16 c-blue"},"\u586B\u7A7A\u9898"),"\uFF08\u5BA2\u89C2\u9898\uFF0C\u7531\u7CFB\u7EDF\u81EA\u52A8\u8BC4\u5206\uFF0C\u5141\u8BB8\u624B\u52A8\u8C03\u5206\uFF0C\u8BF7\u8BBE\u7F6E\u6807\u51C6\u7B54\u6848 \uFF1B\u652F\u6301\u6700\u591A5\u4E2A\u7A7A\uFF0C\u6BCF\u7A7A\u5F97\u5206\u6309\u7167\u672C\u9898\u7684\u603B\u5206\u5E73\u5747\u8BA1\u7B97\uFF09")),e.createElement("div",null,e.createElement(an.Z,{id:"completion-question-tittle",placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE",height:155,defaultValue:c,onChange:_=>E(_),showNullButton:!0,onPlaceholderChange:z})),e.createElement("div",{className:"mt20"},R.map((_,B)=>e.createElement(sn.Z,{key:B,answers:_,index:B,is_md:!0,activeOptionErrorIndex:P,onAnswerChange:p,addChildAnswer:i,deleteChildAnswer:F,deleteChildAnswermain:f}))),e.createElement("div",{className:"mt20"},R.length>1&&e.createElement("span",null,e.createElement(b.default,{checked:k,onChange:_=>V(_.target.checked),className:`${r.color333} font14`},"\u591A\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u6709\u987A\u5E8F\u8981\u6C42"),e.createElement("span",{className:`${r.color999} font12`},"\uFF08\u9009\u4E2D\uFF0C\u6BCF\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u987A\u5E8F\u5FC5\u987B\u4E0E\u53C2\u8003\u7B54\u6848\u4E00\u81F4\uFF09"))),e.createElement("p",{className:""},"\u5206\u503C\uFF1A",e.createElement(G.Z,{value:M,max:1e4,min:-1,onChange:_=>{Q(_)}})," \u5206"),e.createElement("aside",{className:"tr"},s.question_id&&e.createElement(L.ZP,{type:"default",onClick:()=>g(!1)},"\u53D6\u6D88"),e.createElement(L.ZP,{className:"ml20",type:"primary",onClick:()=>d()},"\u4FDD\u5B58"))),K=[{name:"\u5220\u9664",icon:"iconfont c-light-black ml30 icon-shanchu",id:"del"},{name:"\u4E0A\u79FB",icon:"iconfont c-green ml30 icon-shangyi_Hover",id:"up"},{name:"\u4E0B\u79FB",icon:"iconfont c-green ml30 icon-xiayi_moren",id:"down"},{name:"\u7F16\u8F91",icon:"iconfont c-green ml30 icon-bianjishijuan3x",id:"edit"}],Z=_=>Ve(void 0,null,function*(){switch(_.id){case"del":let B;y.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u95EE\u9898\u5417\uFF1F",onOk(){return Ve(this,null,function*(){yield(0,h.x$)({pollsId:s.question_id}),m({type:"polls/getExerciseBanks",payload:Re({},C)})})}});break;case"up":case"down":yield(0,h.W)({exerciseId:s==null?void 0:s.question_id,opr:_.id}),m({type:"polls/getExerciseBanks",payload:Re({},C)});break;case"edit":g(!0);break}}),U=()=>{var _;return e.createElement("aside",null,e.createElement("div",{className:r.questionType},e.createElement("div",null,e.createElement("span",{className:"font16 c-blue"},s.key,"\u3001\u586B\u7A7A\u9898"),"\uFF08",s.question_score,"\u5206\uFF09"),!s.hideAction&&K.map(function(B,T){return B.id==="up"&&s.key===1||B.id==="down"&&s.key===s.len?null:e.createElement(j.Z,{key:T,placement:"bottom",title:B.name},e.createElement("span",{onClick:()=>Z(B),className:B.icon}))})),e.createElement("div",{className:"mt5"},s.question_title),e.createElement("div",{className:r.questionChoices},(_=s==null?void 0:s.standard_answer)==null?void 0:_.map(function(B,T){return e.createElement(ae.Z,null,e.createElement(te.Z,null,"\u7B54\u6848\uFF08\u586B\u7A7A",B.choice_id,"\uFF09\uFF1A"),e.createElement(te.Z,{flex:"1"},e.createElement(se.default,{key:T,checked:s.standard_answer.includes(T),disabled:!0,value:B.answer_text})))})))};return e.createElement("section",{className:r.wrap},!W&&U(),W&&ue())};var dn=(0,S.connect)(({problemset:n,loading:l,globalSetting:t})=>({problemset:n,globalSetting:t,loading:l.effects}),null,null,{forwardRef:!0})((0,e.forwardRef)(cn)),mn=Object.defineProperty,Ne=Object.getOwnPropertySymbols,rt=Object.prototype.hasOwnProperty,ot=Object.prototype.propertyIsEnumerable,ct=(n,l,t)=>l in n?mn(n,l,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[l]=t,We=(n,l)=>{for(var t in l||(l={}))rt.call(l,t)&&ct(n,t,l[t]);if(Ne)for(var t of Ne(l))ot.call(l,t)&&ct(n,t,l[t]);return n},En=(n,l)=>{var t={};for(var a in n)rt.call(n,a)&&l.indexOf(a)<0&&(t[a]=n[a]);if(n!=null&&Ne)for(var a of Ne(n))l.indexOf(a)<0&&ot.call(n,a)&&(t[a]=n[a]);return t},$e=(n,l,t)=>new Promise((a,x)=>{var I=u=>{try{s(t.next(u))}catch(c){x(c)}},m=u=>{try{s(t.throw(u))}catch(c){x(c)}},s=u=>u.done?a(u.value):Promise.resolve(u.value).then(I,m);s((t=t.apply(n,l)).next())});const Ln=null,pn=(n,l)=>{var t=n,{problemset:a,globalSetting:x,loading:I,dispatch:m,onRef:s=()=>{},editData:u}=t,c=En(t,["problemset","globalSetting","loading","dispatch","onRef","editData"]);const[E,A]=(0,e.useState)(""),[D,R]=(0,e.useState)(""),[o,P]=(0,e.useState)(""),[w,k]=(0,e.useState)(5),[V,J]=(0,e.useState)(!1),H=(0,S.useParams)();(0,e.useEffect)(()=>{var d;if(!(u!=null&&u.question_title)){J(!0);return}A(u==null?void 0:u.question_title),P((d=u==null?void 0:u.standard_answer)==null?void 0:d[0]),k(u==null?void 0:u.question_score)},[a.editData]),(0,e.useImperativeHandle)(l,()=>({onSave:M,isEdit:V}));const M=()=>$e(void 0,null,function*(){if(!E)return q.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;let d;return u.question_id?d=yield(0,h.Kc)({id:u.question_id,question_title:E,question_type:4,question_score:w,standard_answers:[o]}):d=yield(0,h.iV)({exercise_bank_id:H.topicId,question_title:E,question_type:4,question_score:w,standard_answers:[o]}),d.status===0&&(q.ZP.success("\u4FDD\u5B58\u6210\u529F"),J(!1),m({type:"polls/getExerciseBanks",payload:We({},H)})),{name:E,answer_texts:[o],analysis:D}}),Q=()=>e.createElement("aside",null,e.createElement("div",{className:r.questionType},e.createElement("div",null,e.createElement("span",{className:"font16 c-blue"},"\u7B80\u7B54\u9898"),"\uFF08\u4E3B\u89C2\u9898\uFF0C\u672A\u4F5C\u7B54\u7684\u60C5\u51B5\u4E0B\u81EA\u52A8\u8BC4\u4E3A\u96F6\u5206\uFF09")),e.createElement(O.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:E,onChange:d=>A(d)}),e.createElement("p",{className:r.titleWrap},e.createElement("span",{className:r.title},"\u53C2\u8003\u7B54\u6848\uFF1A")),e.createElement(O.Z,{id:"single-question-reference-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u53C2\u8003\u7B54\u6848",defaultValue:o,onChange:d=>P(d)}),e.createElement("p",{className:""},"\u5206\u503C\uFF1A",e.createElement(G.Z,{value:w,max:1e4,min:-1,onChange:d=>{k(d)}})," \u5206"),e.createElement("aside",{className:"tr"},u.question_id&&e.createElement(L.ZP,{type:"default",onClick:()=>J(!1)},"\u53D6\u6D88"),e.createElement(L.ZP,{className:"ml20",type:"primary",onClick:()=>M()},"\u4FDD\u5B58"))),W=[{name:"\u5220\u9664",icon:"iconfont c-light-black ml30 icon-shanchu",id:"del"},{name:"\u4E0A\u79FB",icon:"iconfont c-green ml30 icon-shangyi_Hover",id:"up"},{name:"\u4E0B\u79FB",icon:"iconfont c-green ml30 icon-xiayi_moren",id:"down"},{name:"\u7F16\u8F91",icon:"iconfont c-green ml30 icon-bianjishijuan3x",id:"edit"}],g=d=>$e(void 0,null,function*(){switch(d.id){case"del":let z;y.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u95EE\u9898\u5417\uFF1F",onOk(){return $e(this,null,function*(){yield(0,h.x$)({pollsId:u.question_id}),m({type:"polls/getExerciseBanks",payload:We({},H)})})}});break;case"up":case"down":yield(0,h.W)({exerciseId:u==null?void 0:u.question_id,opr:d.id}),m({type:"polls/getExerciseBanks",payload:We({},H)});break;case"edit":J(!0);break}}),C=()=>e.createElement("aside",null,e.createElement("div",{className:r.questionType},e.createElement("div",null,e.createElement("span",{className:"font16 c-blue"},u.key,"\u3001\u7B80\u7B54\u9898"),"\uFF08",u.question_score,"\u5206\uFF09"),!u.hideAction&&W.map(function(d,z){return d.id==="up"&&u.key===1||d.id==="down"&&u.key===u.len?null:e.createElement(j.Z,{key:z,placement:"bottom",title:d.name},e.createElement("span",{onClick:()=>g(d),className:d.icon}))})),e.createElement("div",{className:"mt5"},u.question_title),e.createElement("div",{className:r.questionChoices},e.createElement("p",null,e.createElement("strong",null,"\u53C2\u8003\u7B54\u6848\uFF1A")),e.createElement($.Z,{value:o})));return e.createElement("section",{className:r.wrap},!V&&C(),V&&Q())};var fn=(0,S.connect)(({problemset:n,loading:l,globalSetting:t})=>({problemset:n,globalSetting:t,loading:l.effects}),null,null,{forwardRef:!0})((0,e.forwardRef)(pn)),_n=Object.defineProperty,be=Object.getOwnPropertySymbols,dt=Object.prototype.hasOwnProperty,mt=Object.prototype.propertyIsEnumerable,Et=(n,l,t)=>l in n?_n(n,l,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[l]=t,He=(n,l)=>{for(var t in l||(l={}))dt.call(l,t)&&Et(n,t,l[t]);if(be)for(var t of be(l))mt.call(l,t)&&Et(n,t,l[t]);return n},vn=(n,l)=>{var t={};for(var a in n)dt.call(n,a)&&l.indexOf(a)<0&&(t[a]=n[a]);if(n!=null&&be)for(var a of be(n))l.indexOf(a)<0&&mt.call(n,a)&&(t[a]=n[a]);return t},Me=(n,l,t)=>new Promise((a,x)=>{var I=u=>{try{s(t.next(u))}catch(c){x(c)}},m=u=>{try{s(t.throw(u))}catch(c){x(c)}},s=u=>u.done?a(u.value):Promise.resolve(u.value).then(I,m);s((t=t.apply(n,l)).next())});const Rn=null,hn=(n,l)=>{var t=n,{problemset:a,globalSetting:x,loading:I,dispatch:m,editData:s}=t,u=vn(t,["problemset","globalSetting","loading","dispatch","editData"]);const[c,E]=(0,e.useState)(""),[A,D]=(0,e.useState)(""),[R,o]=(0,e.useState)(""),[P,w]=(0,e.useState)([]),[k,V]=(0,e.useState)(""),[J,H]=(0,e.useState)(),[M,Q]=(0,e.useState)(!1),[W,g]=(0,e.useState)([]),[C,d]=(0,e.useState)(!1),z=(0,S.useParams)();(0,e.useEffect)(()=>{var K;s.edit&&d(!0),E(s.shixun_name),D(s.question_title);const Z=[];(K=s.shixun)==null||K.map(U=>{Z.push(U.challenge_score)}),g(Z)},[s]),(0,e.useEffect)(()=>{Q(!1)},[C]),(0,e.useImperativeHandle)(l,()=>({onSave:p,isEdit:C}));const p=()=>Me(void 0,null,function*(){let K=[];if(!1)return!1;let U;return s.question_id?U=yield(0,h.Kc)({id:s.question_id,question_title:A,shixun_name:c,shixun_id:s.shixun_id,question_type:5,question_scores:W}):U=yield(0,h.iV)({exercise_bank_id:z.topicId,question_title:A,shixun_name:c,shixun_id:s.shixun_id,question_type:5,question_scores:W}),U.status===0&&(q.ZP.success("\u4FDD\u5B58\u6210\u529F"),d(!1)),yield m({type:"polls/getExerciseBanks",payload:He({},z)}),{name:A,analysis:R,standard_answers:K,is_ordered:J}}),i=()=>{var K;return e.createElement("aside",null,e.createElement("div",{className:r.questionType},e.createElement("div",null,e.createElement("span",{className:"font16 c-blue"},"\u5B9E\u8BAD\u9898"),"\uFF08\u5BA2\u89C2\u9898\uFF0C\u7531\u7CFB\u7EDF\u81EA\u52A8\u8BC4\u5206\uFF0C\u5141\u8BB8\u624B\u52A8\u8C03\u5206\uFF09")),e.createElement("div",{className:"mt10"},e.createElement(se.default,{defaultValue:c,onChange:Z=>{E(Z.target.value)}})),e.createElement("div",{className:"mt10"},e.createElement(O.Z,{id:"single-question-option-0",height:155,placeholder:"\u8BF7\u8F93\u5165\u5B9E\u8BAD\u9898\u5B8C\u6210\u8981\u6C42",defaultValue:A,onChange:Z=>{D(Z)}})),e.createElement("div",{className:"mt20"},(K=s.shixun)==null?void 0:K.map((Z,U)=>e.createElement(ae.Z,{gutter:[20,20]},e.createElement(te.Z,{flex:"1"},U+1,".",Z.challenge_name),e.createElement(te.Z,null,e.createElement(G.Z,{defaultValue:W[U],onChange:_=>{W[U]=_,g(W),console.log("srore:L",W[U])}}))))),e.createElement("div",{className:"mt20"},P.length>1&&e.createElement("span",null,e.createElement(b.default,{checked:J,onChange:Z=>H(Z.target.checked),className:`${r.color333} font14`},"\u591A\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u6709\u987A\u5E8F\u8981\u6C42"),e.createElement("span",{className:`${r.color999} font12`},"\uFF08\u9009\u4E2D\uFF0C\u6BCF\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u987A\u5E8F\u5FC5\u987B\u4E0E\u53C2\u8003\u7B54\u6848\u4E00\u81F4\uFF09"))),e.createElement("aside",{className:"tr"},!(s!=null&&s.edit)&&e.createElement(L.ZP,{type:"default",onClick:()=>d(!1)},"\u53D6\u6D88"),e.createElement(L.ZP,{className:"ml20",type:"primary",onClick:()=>p()},"\u4FDD\u5B58")))},F=[{name:"\u5220\u9664",icon:"iconfont c-light-black ml30 icon-shanchu",id:"del"},{name:"\u4E0A\u79FB",icon:"iconfont c-green ml30 icon-shangyi_Hover",id:"up"},{name:"\u4E0B\u79FB",icon:"iconfont c-green ml30 icon-xiayi_moren",id:"down"},{name:"\u7F16\u8F91",icon:"iconfont c-green ml30 icon-bianjishijuan3x",id:"edit"}],f=K=>Me(void 0,null,function*(){switch(K.id){case"del":let Z;y.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u95EE\u9898\u5417\uFF1F",onOk(){return Me(this,null,function*(){yield(0,h.x$)({pollsId:s.question_id}),m({type:"polls/getExerciseBanks",payload:He({},z)})})}});break;case"up":case"down":yield(0,h.W)({exerciseId:s==null?void 0:s.question_id,opr:K.id}),m({type:"polls/getExerciseBanks",payload:He({},z)});break;case"edit":d(!0);break}}),ue=()=>{var K;return e.createElement("aside",null,e.createElement("div",{className:r.questionType},e.createElement("div",null,e.createElement("span",{className:"font16 c-blue"},s.key,"\u3001\u5B9E\u8BAD\u9898"),"\uFF08",s.question_score,"\u5206\uFF09"),e.createElement("div",{className:"tr"},e.createElement(S.Link,{target:"_blank",to:`/shixuns/${s.shixun_identifier}/challenges`},"\u5B9E\u8BAD\u8BE6\u60C5"),!s.hideAction&&F.map(function(Z,U){return Z.id==="up"&&s.key===1||Z.id==="down"&&s.key===s.len?null:e.createElement(j.Z,{key:U,placement:"bottom",title:Z.name},e.createElement("span",{onClick:()=>f(Z),className:Z.icon}))}))),e.createElement("div",{className:"font16"},s.shixun_name),e.createElement("div",{className:"mt30"}),(K=s.shixun)==null?void 0:K.map(function(Z,U){return e.createElement("div",{key:U},"\u7B2C",U+1,"\u5173 ",e.createElement("span",{className:"ml10"},Z.challenge_name)," ",e.createElement("span",{className:"ml10"},Z.challenge_score))}))};return e.createElement("section",{className:r.wrap},!C&&ue(),C&&i())};var Fn=(0,S.connect)(({problemset:n,loading:l,globalSetting:t})=>({problemset:n,globalSetting:t,loading:l.effects}),null,null,{forwardRef:!0})((0,e.forwardRef)(hn)),Bn=v(43428),yn=v(53864),re={flex_box_center:"flex_box_center___hUmFx",flex_space_between:"flex_space_between___ZQWRF",flex_box_vertical_center:"flex_box_vertical_center___NvFWH",flex_box_center_end:"flex_box_center_end___VzfH9",flex_box_column:"flex_box_column___jzLHY",wrp:"wrp___tA5YW",drawer:"drawer___aMsAr",menu:"menu___EdF6h",actived:"actived___rUgO6",actived2:"actived2___ENpPA",listItem:"listItem___Ixzli",info:"info___KHkuz",title:"title___pDJPn",titleLeft:"titleLeft___UBBKz",titleRight:"titleRight___WrCz9",search:"search___AEwRm",description:"description___CYPQc",menuCourse:"menuCourse___gwZ0E"},gn=Object.defineProperty,pt=Object.getOwnPropertySymbols,xn=Object.prototype.hasOwnProperty,An=Object.prototype.propertyIsEnumerable,ft=(n,l,t)=>l in n?gn(n,l,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[l]=t,ve=(n,l)=>{for(var t in l||(l={}))xn.call(l,t)&&ft(n,t,l[t]);if(pt)for(var t of pt(l))An.call(l,t)&&ft(n,t,l[t]);return n},Cn=(n,l,t)=>new Promise((a,x)=>{var I=u=>{try{s(t.next(u))}catch(c){x(c)}},m=u=>{try{s(t.throw(u))}catch(c){x(c)}},s=u=>u.done?a(u.value):Promise.resolve(u.value).then(I,m);s((t=t.apply(n,l)).next())});const{Search:wn}=se.default,Nn=[{id:"type",name:"\u7B5B\u9009",children:[{name:"\u5168\u90E8\u5B9E\u8BAD",id:"all",type:"type"},{name:"\u6211\u7684\u5B9E\u8BAD",id:"mine",type:"type"}]},{id:"diff",name:"\u96BE\u5EA6",children:[{name:"\u5168\u90E8",id:"",type:"diff"},{name:"\u521D\u7EA7",id:1,type:"diff"},{name:"\u4E2D\u7EA7",id:2,type:"diff"},{name:"\u4E2D\u9AD8\u7EA7",id:3,type:"diff"},{name:"\u9AD8\u7EA7",id:4,type:"diff"}]}],bn=({classroomList:n,loading:l,dispatch:t,callback:a})=>{var x;const I=(0,S.useParams)(),m=(0,S.useLocation)(),{actionTabs:s}=n,[u]=le.default.useForm(),{shixunLists:c}=n,[E,A]=(0,e.useState)([]),[D,R]=(0,e.useState)({page:1,type:"all",diff:"",status:"published",order:"desc",limit:20,sort:"publish_time",no_jupyter:1});return(0,e.useEffect)(()=>{t({type:"classroomList/getShixunLists",payload:ve({},D)})},[I.categoryId]),(0,e.useEffect)(()=>{A([])},[n.actionTabs.key]),n.actionTabs.key!=="\u9009\u7528\u5B9E\u8DF5\u9879\u76EE"?null:e.createElement(Bn.Z,{title:"\u9009\u7528\u5B9E\u8DF5\u9879\u76EE",placement:"bottom",height:"100%",closable:!1,open:n.actionTabs.key==="\u9009\u7528\u5B9E\u8DF5\u9879\u76EE",key:"bottom",rootClassName:re.drawer,footer:e.createElement("div",{className:"tc"},e.createElement(L.ZP,{size:"middle",onClick:()=>{t({type:"classroomList/setActionTabs",payload:{key:""}})},style:{marginRight:8}},"\u53D6\u6D88"),e.createElement(L.ZP,{size:"middle",onClick:()=>Cn(void 0,null,function*(){var o;E.length>1?q.ZP.error("\u53EA\u80FD\u9009\u62E9\u4E00\u4E2A\u5B9E\u8DF5\u9879\u76EE"):E.length===0?q.ZP.error("\u8BF7\u9009\u62E9\u5B9E\u8DF5\u9879\u76EE"):(a&&a((o=c==null?void 0:c.shixun_list)==null?void 0:o.filter(P=>P.id===E[0])[0]),t({type:"classroomList/setActionTabs",payload:{key:""}}))}),type:"primary"},"\u786E\u5B9A"))},e.createElement("section",{className:"tc"},e.createElement(wn,{placeholder:"\u5B9E\u8BAD\u4FE1\u606F/\u9662\u6821\u540D\u79F0/\u521B\u5EFA\u8005",enterButton:"\u641C\u7D22",size:"middle",className:re.search,onSearch:o=>{D.keyword=o,t({type:"classroomList/getShixunLists",payload:ve({},D)})}})),e.createElement("section",{className:"edu-container"},Nn.map(function(o,P){var w;return e.createElement("ul",{className:re.menu,key:P},e.createElement("li",null,o.name),(w=o==null?void 0:o.children)==null?void 0:w.map(function(k,V){return e.createElement("li",{key:V,className:D[o.id]==k.id?re.actived:"",onClick:()=>{D[o.id]=k.id,R(ve({},D)),t({type:"classroomList/getShixunLists",payload:ve({},D)})}},e.createElement("strong",null,k.name))}))}),(x=c==null?void 0:c.shixun_list)==null?void 0:x.map(function(o,P){return e.createElement("div",{className:re.listItem,key:P},e.createElement(b.default,{checked:E.includes(o.id),value:o.id,onChange:w=>{let k=E.indexOf(o.id);E.indexOf(o.id)>-1?A(E.filter(V=>V!==o.id)):A(E.concat(o.id))}}),e.createElement("div",{className:re.info},e.createElement("div",{className:re.title},e.createElement("div",{className:re.titleLeft},e.createElement("strong",{className:"font16",dangerouslySetInnerHTML:{__html:o.title}}))),e.createElement("div",{className:"flex-wrp mt10 font14 c-light-black"},e.createElement("span",{className:re.description,dangerouslySetInnerHTML:{__html:o.description}})),e.createElement("div",{className:" mt15"},o.challenge_names.map(function(w,k){return e.createElement("span",{key:k,className:"mr30"},"\u7B2C",k+1,"\u5173 ",w," ")})),e.createElement(ie.Z,{dashed:!0}),e.createElement("div",{className:"c-light-black mt20"},e.createElement("span",null,o.author_name),e.createElement("span",{className:"ml15 mr15"},"|"),e.createElement("span",null,o.author_school_name),e.createElement("span",{className:"ml15 mr15"},"|"),e.createElement("span",null,"\u96BE\u5EA6\u7CFB\u6570:",o.level),e.createElement("span",{className:"ml15 mr15"},"|"),e.createElement("span",null,"\u5B66\u4E60\u4EBA\u6570:"),e.createElement("span",null,o.study_count))))}),e.createElement("p",null)),e.createElement("div",{className:"tc"},e.createElement(yn.Z,{defaultCurrent:1,hideOnSinglePage:!0,defaultPageSize:20,showQuickJumper:!0,total:c==null?void 0:c.shixuns_count,onChange:o=>{D.page=o,A([]),t({type:"classroomList/getShixunLists",payload:ve({},D)})}})))};var Sn=(0,S.connect)(({classroomList:n,loading:l})=>({classroomList:n,loading:l}))(bn),he={flex_box_center:"flex_box_center___SQWFF",flex_space_between:"flex_space_between___CnFKV",flex_box_vertical_center:"flex_box_vertical_center___pIPP9",flex_box_center_end:"flex_box_center_end___wiYA8",flex_box_column:"flex_box_column___elCPc",bg:"bg___EaPuT",containerTitle:"containerTitle___ixpkx",containerDesc:"containerDesc___r2R0u",listItem:"listItem___jvD98",info:"info___dCwGz",title:"title___UW6TT",titleLeft:"titleLeft___MquHc",titleRight:"titleRight___aWhE3",acitons:"acitons___yle7y"},Dn=Object.defineProperty,Se=Object.getOwnPropertySymbols,_t=Object.prototype.hasOwnProperty,vt=Object.prototype.propertyIsEnumerable,ht=(n,l,t)=>l in n?Dn(n,l,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[l]=t,Je=(n,l)=>{for(var t in l||(l={}))_t.call(l,t)&&ht(n,t,l[t]);if(Se)for(var t of Se(l))vt.call(l,t)&&ht(n,t,l[t]);return n},Pn=(n,l)=>{var t={};for(var a in n)_t.call(n,a)&&l.indexOf(a)<0&&(t[a]=n[a]);if(n!=null&&Se)for(var a of Se(n))l.indexOf(a)<0&&vt.call(n,a)&&(t[a]=n[a]);return t},Ft=(n,l,t)=>new Promise((a,x)=>{var I=u=>{try{s(t.next(u))}catch(c){x(c)}},m=u=>{try{s(t.throw(u))}catch(c){x(c)}},s=u=>u.done?a(u.value):Promise.resolve(u.value).then(I,m);s((t=t.apply(n,l)).next())});const{SubMenu:Vn}=Ee.default,{Content:Wn,Sider:$n}=pe.default,kn=n=>{var l=n,{polls:t,globalSetting:a,loading:x,user:I,dispatch:m}=l,s=Pn(l,["polls","globalSetting","loading","user","dispatch"]),u,c,E,A,D,R,o,P,w,k,V,J,H,M,Q,W,g,C,d,z,p,i,F,f,ue,K,Z,U,_,B,T,Y,ee,ce,De,Bt,yt,gt,xt,At,Ct,wt,Nt,bt,St,Dt,Pt,kt,qt,Zt,Ot,It,Tt,jt,Lt,Rt;const Fe=(0,S.useParams)(),Hn=(0,S.useLocation)(),{userInfo:Be}=I,[Pe]=le.default.useForm(),[de,Qe]=(0,e.useState)([]),[Vt,Wt]=(0,e.useState)(!1),Zn=[{name:"\u9009\u62E9\u9898",id:0},{name:"\u5224\u65AD\u9898",id:2},{name:"\u586B\u7A7A\u9898",id:3},{name:"\u7B80\u7B54\u9898",id:4},{name:"\u5B9E\u8BAD\u9898",id:5}],ye=(0,e.useRef)();(0,e.useEffect)(()=>{var N,ne,fe,$t,Ht,Mt;(N=t.exerciseBanks)!=null&&N.exercise_questions&&(Qe([...(ne=t.exerciseBanks)==null?void 0:ne.exercise_questions]),Pe.setFieldsValue({exercise_name:($t=(fe=t.exerciseBanks)==null?void 0:fe.exercise)==null?void 0:$t.exercise_name,exercise_description:(Mt=(Ht=t.exerciseBanks)==null?void 0:Ht.exercise)==null?void 0:Mt.exercise_description}))},[t.exerciseBanks]),(0,e.useEffect)(()=>{m({type:"polls/getExerciseBanks",payload:Je({},Fe)})},[Fe.categoryId]);const On=()=>Ft(void 0,null,function*(){var N,ne;yield Pe.validateFields();const fe=Pe.getFieldValue();fe.is_md=!0,fe.topicId=(ne=(N=t.exerciseBanks)==null?void 0:N.exercise)==null?void 0:ne.id,Wt(!1),yield(0,h.hO)(Je({},fe)),m({type:"polls/getExerciseBanks",payload:Je({},Fe)})}),In=N=>Ft(void 0,null,function*(){const ne=yield ye==null?void 0:ye.current;if(ne!=null&&ne.isEdit){q.ZP.error("\u4E0D\u80FD\u540C\u65F6\u7F16\u8F91\u4E24\u9898");return}N===5?m({type:"classroomList/setActionTabs",payload:{key:"\u9009\u7528\u5B9E\u8DF5\u9879\u76EE"}}):Qe([...de,{question_type:N}])}),Tn=function(){return de==null?void 0:de.map(function(N,ne){if(N.key=ne+1,N.len=de.length,N.question_type===0)return e.createElement("aside",null,e.createElement(Xt,{ref:ye,editData:N}),e.createElement(ie.Z,null));if(N.question_type===1)return e.createElement("aside",null,e.createElement(Kt,{ref:ye,editData:N}),e.createElement(ie.Z,null));if(N.question_type===2)return e.createElement("aside",null,e.createElement(ln,{ref:ye,editData:N}),e.createElement(ie.Z,null));if(N.question_type===3)return e.createElement("aside",null,e.createElement(dn,{editData:N}),e.createElement(ie.Z,null));if(N.question_type===4)return e.createElement("aside",null,e.createElement(fn,{editData:N}),e.createElement(ie.Z,null));if(N.question_type===5)return e.createElement("aside",null,e.createElement(Fn,{editData:N}),e.createElement(ie.Z,null))})};return e.createElement("section",{className:"edu-container"},e.createElement("section",{className:"animated fadeIn"},e.createElement("aside",{className:"mt10"},Be&&e.createElement(oe.Z,{separator:">"},e.createElement(oe.Z.Item,null,e.createElement(S.Link,{to:`/users/${Be.login}/topics/personal`},"\u6211\u7684\u9898\u5E93")),e.createElement(oe.Z.Item,null,e.createElement(S.Link,{to:`/users/${Be==null?void 0:Be.login}/topics/${Fe.topicId}/${Fe.topictype}/exercise/detail`},"\u8BE6\u60C5")),e.createElement(oe.Z.Item,null,"\u7F16\u8F91"))),e.createElement("aside",{className:[he.title,"mt20"].join(" ")},e.createElement(ae.Z,{style:{width:"100%"},align:"middle"},e.createElement(te.Z,{flex:"1"},e.createElement("strong",{className:"font20 ml5"},"\u7F16\u8F91\u8BD5\u5377"),e.createElement(lt.VV,{status:[(c=(u=t.exerciseBanks)==null?void 0:u.exercise)!=null&&c.is_public?"\u516C\u5F00":"\u79C1\u6709"]})),e.createElement(te.Z,null,e.createElement(S.Link,{className:"font16 c-light-black",to:`/users/${Be.login}/topics/personal`},"\u8FD4\u56DE"))))),e.createElement("section",{className:[he.bg,"pt30","pl30","pr30","pb30","mt20"].join(" ")},!Vt&&e.createElement("aside",null,e.createElement("div",{className:he.containerDesc},e.createElement("div",null,(A=(E=t.exerciseBanks)==null?void 0:E.exercise)==null?void 0:A.exercise_name),e.createElement("div",null,e.createElement(j.Z,{title:"\u7F16\u8F91"},e.createElement("span",{onClick:()=>Wt(!0),className:"iconfont c-green ml30 icon-bianjishijuan3x"})))),e.createElement("div",{className:"c-light-black"},(R=(D=t.exerciseBanks)==null?void 0:D.exercise)==null?void 0:R.exercise_description)),Vt&&e.createElement(le.default,{layout:"vertical",form:Pe},e.createElement(le.default.Item,{name:"exercise_name",label:"\u8BD5\u5377\u6807\u9898\uFF1A",rules:[{required:!0,message:"\u8BF7\u586B\u5199\u8BD5\u5377\u6807\u9898"}]},e.createElement(se.default,{maxLength:60,placeholder:"\u8BD5\u5377\u6807\u9898\uFF0C\u6700\u5927\u9650\u523660\u4E2A\u5B57\u7B26"})),e.createElement(le.default.Item,{label:"\u8BD5\u5377\u987B\u77E5\uFF1A",name:"exercise_description"},e.createElement(se.default.TextArea,{rows:6,placeholder:"\u8BF7\u5728\u6B64\u8F93\u5165\u672C\u6B21\u8BD5\u5377\u7B54\u9898\u7684\u76F8\u5173\u8BF4\u660E\uFF0C\u6700\u5927\u9650\u5236100\u4E2A\u5B57\u7B26"})),e.createElement(le.default.Item,{className:"tr"},e.createElement(L.ZP,{type:"primary",onClick:()=>{On()}},"\u4FDD\u5B58")))),e.createElement("p",{className:"mt10",style:{display:"flex"}},e.createElement("span",{className:"fl",style:{flex:"1"}},!!((P=(o=t.exerciseBanks)==null?void 0:o.exercise_types)!=null&&P.q_singles)&&e.createElement("span",{className:"ml20"},"\u5355\u9009\u9898",(k=(w=t.exerciseBanks)==null?void 0:w.exercise_types)==null?void 0:k.q_singles,"\u9898\uFF0C\u5171",(J=(V=t.exerciseBanks)==null?void 0:V.exercise_types)==null?void 0:J.q_singles_scores,"\u5206"),!!((M=(H=t.exerciseBanks)==null?void 0:H.exercise_types)!=null&&M.q_doubles)&&e.createElement("span",{className:"ml20"},"\u591A\u9009\u9898",(W=(Q=t.exerciseBanks)==null?void 0:Q.exercise_types)==null?void 0:W.q_doubles,"\u9898\uFF0C\u5171",(C=(g=t.exerciseBanks)==null?void 0:g.exercise_types)==null?void 0:C.q_doubles_scores,"\u5206"),!!((z=(d=t.exerciseBanks)==null?void 0:d.exercise_types)!=null&&z.q_judges)&&e.createElement("span",{className:"ml20"},"\u5224\u65AD\u9898",(i=(p=t.exerciseBanks)==null?void 0:p.exercise_types)==null?void 0:i.q_judges,"\u9898\uFF0C\u5171",(f=(F=t.exerciseBanks)==null?void 0:F.exercise_types)==null?void 0:f.q_judges_scores,"\u5206"),!!((K=(ue=t.exerciseBanks)==null?void 0:ue.exercise_types)!=null&&K.q_nulls)&&e.createElement("span",{className:"ml20"},"\u586B\u7A7A\u9898",(U=(Z=t.exerciseBanks)==null?void 0:Z.exercise_types)==null?void 0:U.q_nulls,"\u9898\uFF0C\u5171",(B=(_=t.exerciseBanks)==null?void 0:_.exercise_types)==null?void 0:B.q_nulls_scores,"\u5206"),!!((Y=(T=t.exerciseBanks)==null?void 0:T.exercise_types)!=null&&Y.q_mains)&&e.createElement("span",{className:"ml20"},"\u7B80\u7B54\u9898",(ce=(ee=t.exerciseBanks)==null?void 0:ee.exercise_types)==null?void 0:ce.q_mains,"\u9898\uFF0C\u5171",(Bt=(De=t.exerciseBanks)==null?void 0:De.exercise_types)==null?void 0:Bt.q_mains_scores,"\u5206"),!!((gt=(yt=t.exerciseBanks)==null?void 0:yt.exercise_types)!=null&>.q_shixuns)&&e.createElement("span",{className:"ml20"},"\u5B9E\u8BAD\u9898",(At=(xt=t.exerciseBanks)==null?void 0:xt.exercise_types)==null?void 0:At.q_shixuns,"\u9898\uFF0C\u5171",(wt=(Ct=t.exerciseBanks)==null?void 0:Ct.exercise_types)==null?void 0:wt.q_shixuns_scores,"\u5206"),!!((bt=(Nt=t.exerciseBanks)==null?void 0:Nt.exercise_types)!=null&&bt.q_pros)&&e.createElement("span",{className:"ml20"},"\u7F16\u7A0B\u9898",(Dt=(St=t.exerciseBanks)==null?void 0:St.exercise_types)==null?void 0:Dt.q_pros,"\u9898\uFF0C\u5171",(kt=(Pt=t.exerciseBanks)==null?void 0:Pt.exercise_types)==null?void 0:kt.q_pros_scores,"\u5206")),e.createElement("span",{className:"fr"},!!((Zt=(qt=t.exerciseBanks)==null?void 0:qt.exercise_types)!=null&&Zt.q_counts)&&e.createElement("span",null,"\u5408\u8BA1 ",e.createElement("span",{className:"color-blue"},(It=(Ot=t.exerciseBanks)==null?void 0:Ot.exercise_types)==null?void 0:It.q_counts)," \u9898\uFF0C \u5171 ",e.createElement("span",{className:`${((jt=(Tt=t.exerciseBanks)==null?void 0:Tt.exercise_types)==null?void 0:jt.q_scores)>100?"color-red font-bd":"color-orange"}`},(Rt=(Lt=t.exerciseBanks)==null?void 0:Lt.exercise_types)==null?void 0:Rt.q_scores)," \u5206"))),de!=""&&e.createElement("section",{className:[he.bg,"pt30","pl20","pr20","pb20","mt20"].join(" ")},Tn()),e.createElement("section",{style:{display:"flex"},className:[he.bg,"pt30","pl30","pr30","pb30","mt20"].join(" ")},e.createElement("div",{style:{flex:"1"}},Zn.map(function(N,ne){return e.createElement(L.ZP,{className:"mr20",type:"primary",onClick:()=>In(N.id)},e.createElement(ge.Z,{className:"mr5"}),N.name)}))),e.createElement(Sn,{callback:N=>{de.push({shixun:N.challenge_names.map(ne=>({challenge_name:ne,challenge_score:5})),shixun_name:N.title,shixun_id:N.id,question_type:5,edit:!0}),Qe([...de])}}))};var qn=(0,S.connect)(({polls:n,loading:l,user:t,globalSetting:a})=>({polls:n,globalSetting:a,user:t,loading:l.effects}))(kn)}}]);
|