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

5 lines
56 KiB

(window.webpackJsonp=window.webpackJsonp||[]).push([[147,4,12],{"9Bee":function(Oe,Re,s){"use strict";var Qe=s("k1fw"),ue=s("q1tI"),Ke=s.n(ue),rt=s("vg9a"),_t=s("tJVT"),it=s("DlQD"),Xe=s.n(it),Ie=s("rUJ1");function ft(M,B){var H=M.match(/^(\s+)(?:```)/);if(H===null)return B;var J=H[1];return B.split(`
`).map(function(se){var de=se.match(/^\s+/);if(de===null)return se;var ye=Object(_t.a)(de,1),Ue=ye[0];return Ue.length>=J.length?se.slice(J.length):se}).join(`
`)}var Ae=[],Ge=["<ul>"],ee=new Xe.a.Renderer,qe=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function ge(){Ae.length=0,Ge=["<ul>"]}var ot={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function fe(M,B,H,J){if(B>=M.length||M[B].level<=H)return B;var se=M[B];J.push("<li><a href='#"+se.anchor+"'>"+se.text+"</a>"),B++;var de=[];return B=fe(M,B,se.level,de),de.length>0&&(J.push("<ul>"),de.forEach(function(ye){J.push(ye)}),J.push("</ul>")),J.push("</li>"),B=fe(M,B,H,J),B}function ze(){return fe(Ae,0,0,Ge),Ge.push("</ul>"),Ge.join("")}var j={heading:function(B){var H=qe.exec(B);if(H)return{type:"heading",raw:H[0],depth:H[1].length,text:H[2]}},fences:function(B){var H=this.rules.block.fences.exec(B);if(H){var J=H[0],se=ft(J,H[3]||""),de=H[2]?H[2].trim():H[2];if(["latex","katex","math"].indexOf(de)>=0){var ye=xe(),Ue=se;se=ye,Le[ye]={type:"block",expression:Ue}}return{type:"code",raw:J,lang:de,text:se}}}},Ce=/(?:\${2})([^\n`]+?)(?:\${2})/gi,De=0,xe=function(){return"__special_katext_id_".concat(De++,"__")},Le={};function mt(){return Le}function Ve(){De=0,Le={}}function me(M){return M=M.replace(Ce,function(B,H){var J=xe();return Le[J]={type:"inline",expression:H},J}),M}var t=ee.listitem;ee.listitem=function(M){return t(me(M))};var pt=ee.paragraph;ee.paragraph=function(M){return pt(me(M))};var ut=ee.tablecell;ee.tablecell=function(M,B){return ut(me(M),B)},ee.code=function(M,B,H){var J=(B||"").match(/\S*/)[0];return J?["latex","katex","math"].indexOf(J)>=0?"<p class='editormd-tex'>".concat(M,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(B,'">').concat(H?M:Object(Ie.escape)(M,!0),`</code></pre>
`):'<pre class="prettyprint linenums"><code>'+(H?M:Object(Ie.escape)(M,!0))+"</code></pre>"},ee.heading=function(M,B,H){var J=this.options.headerPrefix+H.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return Ae.push({anchor:J,level:B,text:M}),"<h"+B+' id="'+J+'">'+M+"</h"+B+">"},Xe.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),Xe.a.use({tokenizer:j,renderer:ee});var Et=Xe.a,ve=s("SJMd"),Ye=s("m3rI"),Ne=s("Oy/b"),Ze=/<pre[^>]*>/g;function vt(M){var B=document.createElement("div");return B.innerHTML=M,B.childNodes.length===0?"":B.childNodes[0].nodeValue}var We=Re.a=function(M){var B=M.value,H=B===void 0?"":B,J=M.className,se=M.showTextOnly,de=M.showLines,ye=M.style,Ue=ye===void 0?{}:ye,Te=String(H),Be=Object(ue.useMemo)(function(){try{var Fe=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Ee=/\"\/api\/attachments\/|\"\/attachments\/download\//g,ke=/\(\s+\/files\/uploads\/|\(\/files\/uploads\//g;Te=Te.replace(Fe,"("+Ye.a.API_SERVER+"/api/attachments/").replace(Ee,'"'+Ye.a.API_SERVER+"/api/attachments/").replace(ke,'"'+Ye.a.API_SERVER+"/files/uploads/")}catch(ht){}var pe=Et(Te);setTimeout(function(){return st()},300);var lt=mt();if(Te.match(/\[TOC\]/)&&(pe=pe.replace("<p>[TOC]</p>",ze()),ge()),pe=pe.replace(/(__special_katext_id_\d+__)/g,function(ht,ct){var tt=lt[ct],nt=tt.type,gt=tt.expression;return Object(Ne.renderToString)(vt(gt)||"",{displayMode:nt==="block",throwOnError:!1,output:"html"})}),pe=pe.replace(/▁/g,"\u2581\u2581\u2581"),Ve(),se){var et=document.createElement("div");return et.innerHTML=pe,et.innerText}return pe},[Te]),je=Object(ue.useRef)();ot.WebkitLineClamp=de,de&&(Ue=Object(Qe.a)(Object(Qe.a)({},Ue),ot));function Se(Fe){var Ee=Fe.target;if(Ee.tagName.toUpperCase()==="A"){var ke=Ee.getAttribute("href");if(ke.startsWith("#")){Fe.preventDefault();var pe=document.getElementById(ke.replace("#",""));pe&&pe.scrollIntoView(!0)}}}var st=function(){};return Object(ue.useEffect)(function(){if(je.current&&Be&&(Be.match(Ze)&&window.PR.prettyPrint()),je.current)return je.current.addEventListener("click",Se),function(){je.current.removeEventListener("click",Se),Ve(),ge()}},[Be,je.current,Se]),Ke.a.createElement(Ke.a.Fragment,null,Ke.a.createElement("div",{ref:je,style:Object(Qe.a)({},Ue),className:"".concat(J||""," markdown-body "),dangerouslySetInnerHTML:{__html:Be}}))}},HwL6:function(Oe,Re,s){Oe.exports={flexRow:"flexRow___2UlMe",flexColumn:"flexColumn___fP6vM",action:"action___2Qc1b",setScore:"setScore___3Iavq",delete:"delete___1Uwr6",content:"content___nT6mK",titleWrap:"titleWrap___1aXoX",titleNumber:"titleNumber___wMh1f",score:"score___228uW",titleHtml:"titleHtml___260Bl",answerWrap:"answerWrap___3JHdZ",answer:"answer___2rlTH"}},IoUt:function(Oe,Re,s){Oe.exports={flex_box_center:"flex_box_center___3N1vU",flex_space_between:"flex_space_between___A7Vod",flex_box_vertical_center:"flex_box_vertical_center___34bDS",flex_box_center_end:"flex_box_center_end___3_uG-",flex_box_column:"flex_box_column___1D2by",wrap:"wrap___3HjzC",contentWrap:"contentWrap___DSAvO",tabsWrap:"tabsWrap___4HtM9",searchWrap:"searchWrap___2Zt2F",searchContent:"searchContent___3NqTR",search:"search___pLAYU",buttonWrap:"buttonWrap___2X_Df",selectBar:"selectBar___3eSji",tableWrap:"tableWrap___wwRLZ",paginationWrap:"paginationWrap___3xt0C",modal:"modal___1KOAK",gap:"gap___2B8M7",checkbox:"checkbox___dUmix",maxHeiTag:"maxHeiTag___1XHFp",buttongroup:"buttongroup___1nTQQ"}},N5Ab:function(Oe,Re,s){Oe.exports={flex_box_center:"flex_box_center___1hJpS",flex_space_between:"flex_space_between___3fslx",flex_box_vertical_center:"flex_box_vertical_center___2KmoI",flex_box_center_end:"flex_box_center_end___1l8U5",flex_box_column:"flex_box_column___9pIkv",formItem:"formItem___1YUoJ"}},XE9d:function(Oe,Re,s){Oe.exports={bg:"bg___10lFD",wrap:"wrap___y_dNi",flexRow:"flexRow___QbtvU",flexColumn:"flexColumn___2KwwI",flexJustifyBetween:"flexJustifyBetween___yN95i",relative:"relative___2Ucs2",questionNumber:"questionNumber___5kXDt",score:"score___3wZIF",selectTopicButton:"selectTopicButton___2DCM-",line:"line___242nB",dragTip:"dragTip___31p8A",typeActive:"typeActive___2DYkd",mouseTypeActive:"mouseTypeActive___1-rRf",typeName:"typeName___1WRRv",typeNumber:"typeNumber___V3KFH",typeAction:"typeAction___cMxhm",setScore:"setScore___1lZrJ",delete:"delete___3jekD",modal:"modal___vDZ3s",modalColumn:"modalColumn___1eUun",shixunModal:"shixunModal___3Ebey",shixunScore:"shixunScore___2pfUK"}},ueiT:function(Oe,Re,s){"use strict";s.r(Re),s.d(Re,"questionType",function(){return He}),s.d(Re,"difficultType",function(){return Rt});var Qe=s("y8nQ"),ue=s("Vl3Y"),Ke=s("IzEo"),rt=s("bx4M"),_t=s("T2oS"),it=s("W9HT"),Xe=s("/zsF"),Ie=s("PArb"),ft=s("sPJy"),Ae=s("bE4q"),Ge=s("+L6B"),ee=s("2/Rp"),qe=s("PpiC"),ge=s("9og8"),ot=s("miYZ"),fe=s("tsqr"),ze=s("jrin"),j=s("k1fw"),Ce=s("fWQN"),De=s("mtLc"),xe=s("yKVA"),Le=s("879j"),mt=s("FJo9"),Ve=s("L41K"),me=s("q1tI"),t=s.n(me),pt=s("qVdP"),ut=s("jsC+"),Et=s("7Kak"),ve=s("9yH6"),Ye=s("giR+"),Ne=s("fyUT"),Ze=s("oBTY"),vt=s("lUTK"),We=s("BvKs"),M=s("5NDa"),B=s("5rEg"),H=s("2BaD"),J=s("55Ip"),se=function(){return t.a.createElement("div",{style:{textAlign:"right",fontSize:12,color:"#ccc",marginTop:95}},"\u5982\u8003\u5BDF\u8303\u56F4\u4E0D\u80FD\u6EE1\u8DB3\u9700\u6C42\uFF0C\u8BF7\u81EA\u884C\u8865\u5145\u8BD5\u9898\u5145\u5B9E\u8003\u5BDF\u8303\u56F4",t.a.createElement(J.Link,{to:"/problemset",target:"_blank",style:{marginLeft:10,color:"#1890FF"}},"\u73B0\u5728\u5C31\u53BB"))},de=se,ye=s("IoUt"),Ue=s.n(ye),Te=s("P/tu"),Be=B.a.TextArea,je=We.a.SubMenu,Se=function(S){return!S||Number.isNaN(Number(S))?"":Math.ceil(S)},st=function(F){Object(xe.a)(v,F);var S=Object(Le.a)(v);function v(){var b;Object(Ce.a)(this,v);for(var a=arguments.length,y=new Array(a),l=0;l<a;l++)y[l]=arguments[l];return b=S.call.apply(S,[this].concat(y)),b.state={titleLen:0,subDisciplinesList:[],allGroupList:[],selectGroupList:[],openKeys:[],visible:null},b.subDisciplinesAdd=function(i){var R=[],h=b.props.form.getFieldValue("subDisciplines")||[],d=h.filter(function(f){return i.id===f.id}).length>0;d?R=h.filter(function(f){return i.id!==f.id}):R=[].concat(Object(Ze.a)(h),[i]),b.props.form.setFieldsValue({subDisciplines:R}),b.setState({subDisciplinesList:R})},b.disciplinesRemove=function(i){var R=b.props.form.getFieldValue("subDisciplines")||[],h=R.filter(function(d){return d.id!==i.id});b.props.form.setFieldsValue({subDisciplines:h}),b.setState({subDisciplinesList:h})},b.handleSourceRadioChange=function(i){b.props.getdisciplines(i.target.value);var R=[];b.props.form.setFieldsValue({subDisciplines:R}),b.setState({subDisciplinesList:R})},b.dealList=function(){for(var i=b.state.subDisciplinesList,R=Object(Ze.a)(i),h=0,d=[],f=0;f<R.length;f++){for(var P="",g=0;g<d.length;g++)if(d[g][0].parent_name==R[f].parent_name){h=1,P=g;break}if(h==1)d[P].push(R[f]),h=0;else if(h==0){var k=new Array;k.push(R[f]),d.push(k)}}return d},b}return Object(De.a)(v,[{key:"render",value:function(){var a=this;if(console.log(this.dealList(),"dealList"),!this.props.form)return"";var y=this.props,l=y.disciplines,i=y.form,R=i.getFieldDecorator,h=i.getFieldValue,d=this.state,f=d.subDisciplinesList,P=d.allGroupList,g=d.selectGroupList,k=d.openKeys,A=d.visible;return t.a.createElement("div",null,t.a.createElement(ue.a.Item,{label:"\u8BD5\u5377\u540D\u79F0:",name:"name",rules:[{required:!0,message:"\u8BD5\u5377\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A"}]},t.a.createElement(B.a,{style:{height:38},placeholder:"\u8BF7\u8F93\u5165\u8BD5\u5377\u6807\u9898\uFF0C\u6700\u591A60\u5B57",suffix:this.state.titleLen+"/60",onChange:function(X){a.setState({titleLen:h("name").length})},maxLength:60})),t.a.createElement("div",{style:{position:"relative"}},t.a.createElement(ue.a.Item,{label:"\u8003\u8BD5\u65F6\u957F:",name:"time",rules:[{required:!0,message:"\u8003\u8BD5\u65F6\u957F\u4E0D\u80FD\u4E3A\u7A7A"}]},t.a.createElement(Ne.a,{min:1,max:9999,placeholder:"\u8BF7\u8F93\u5165\u8BD5\u5377\u8003\u8BD5\u65F6\u957F",style:{width:150}})),t.a.createElement("span",{style:{position:"absolute",top:31,left:159}},"\u5206\u949F")),t.a.createElement(ue.a.Item,{label:"\u96BE\u5EA6",name:"difficulty",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u96BE\u5EA6"}]},t.a.createElement(ve.a.Group,{className:Ue.a.buttongroup,size:"large"},t.a.createElement(ve.a.Button,{style:{width:120,textAlign:"center",borderRadius:50},value:1},"\u7B80\u5355"),t.a.createElement(ve.a.Button,{style:{width:120,textAlign:"center",borderRadius:50},value:2},"\u9002\u4E2D"),t.a.createElement(ve.a.Button,{style:{width:120,textAlign:"center",borderRadius:50},value:3},"\u56F0\u96BE"))),t.a.createElement(ue.a.Item,{label:"\u8003\u8BD5\u987B\u77E5",name:"exam_notes"},t.a.createElement(Be,{rows:4,maxLength:300})),t.a.createElement(ue.a.Item,{label:t.a.createElement("span",null,"\u8BD5\u9898\u6765\u6E90",t.a.createElement("span",{className:"font12 c-grey-999"},"\uFF08\u4E3A\u4FDD\u8BC1\u8003\u5BDF\u51C6\u786E\u6027\uFF0C\u5EFA\u8BAE\u4F7F\u7528\u6211\u521B\u5EFA\u7684\uFF09")),name:"source",style:{width:"100%"},initialValue:1,rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u8BD5\u9898\u6765\u6E90"}]},t.a.createElement(ve.a.Group,{style:{display:"flex",width:368,justifyContent:"space-between"},onChange:function(X){a.handleSourceRadioChange(X)}},t.a.createElement(ve.a,{value:1},"\u4EC5\u6211\u521B\u5EFA\u7684"),t.a.createElement(ve.a,{value:0},"\u516C\u5171\u9898\u5E93+\u6211\u521B\u5EFA\u7684"))),t.a.createElement(ue.a.Item,{label:"\u7EC4\u5377\u65B9\u5F0F",name:"mode",initialValue:1,style:{width:"100%"},rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u7EC4\u5377\u65B9\u5F0F"}]},t.a.createElement(ve.a.Group,{style:{display:"flex",width:700,justifyContent:"space-between"}},t.a.createElement(ve.a,{value:1},"\u56FA\u5B9A\u8BD5\u9898"),t.a.createElement(ve.a,{value:0},"\u968F\u673A\u8BD5\u9898",t.a.createElement("span",{className:"font12 c-grey-999"},"\uFF08\u4E3A\u6BCF\u4F4D\u5B66\u751F\u968F\u673A\u751F\u6210\u4E00\u4EFD\u8003\u5BDF\u8303\u56F4\u548C\u9898\u578B\u76F8\u540C\uFF0C\u4F46\u8BD5\u9898\u4E92\u4E0D\u76F8\u540C\u7684\u8BD5\u5377\uFF09")))),t.a.createElement(ue.a.Item,{label:"\u8003\u67E5\u8303\u56F4\uFF1A",name:"subDisciplines",initialValue:[]},t.a.createElement("div",{style:{display:"inline-flex",flexWrap:"wrap"}},l.map(function(m,X){return t.a.createElement("div",{style:{marginRight:12},onMouseLeave:function(){return a.setState({openKeys:[],visible:null})}},t.a.createElement(ut.a,{key:"disciplines"+m.id,placement:"bottomLeft",visible:X===A,getPopupContainer:function(L){return L.parentNode},overlay:t.a.createElement("div",null,m.sub_disciplines.length>0?t.a.createElement(We.a,{mode:"vertical",multiple:!0,selectedKeys:f==null?void 0:f.map(function(w){return String(w.id)}),subMenuCloseDelay:0,subMenuOpenDelay:0,openKeys:k,getPopupContainer:function(L){return L.parentNode}},m.sub_disciplines.map(function(w){var L;return t.a.createElement(je,{onTitleMouseEnter:function(){a.setState({openKeys:[String(w.id)]})},key:w.id,title:t.a.createElement("span",null,"".concat(w.name,"(").concat(w.item_count,")")),popupClassName:((L=w.tag_disciplines)===null||L===void 0?void 0:L.length)>10?Ue.a.maxHeiTag:""},Array.isArray(w.tag_disciplines)&&!!w.tag_disciplines.length?w.tag_disciplines.map(function(D){return t.a.createElement(We.a.Item,{key:D.id,onClick:function(){a.subDisciplinesAdd(D)}},t.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.a.createElement("span",{style:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},D.name,"(",D.item_count,")"),t.a.createElement("span",null,D.type==="personal"?"\uFF08\u81EA\u7528\uFF09":"")))}):t.a.createElement(We.a.Item,null,"\u6682\u65E0\u6570\u636E"))})):t.a.createElement(rt.a,null,"\u6682\u65E0\u6570\u636E"))},t.a.createElement(ee.a,{onMouseEnter:function(){return a.setState({visible:X,openKeys:[]})},style:{marginTop:6,marginBottom:6}},m.name)))}))),f.length>0?t.a.createElement("div",{style:{minHeight:150,backgroundColor:"#FAFAFA"}},t.a.createElement("div",{style:{paddingLeft:12,paddingTop:12}},"\u5DF2\u9009"),this.dealList().map(function(m,X){var w;return t.a.createElement(t.a.Fragment,{key:X},t.a.createElement("div",{style:{fontSize:14,paddingLeft:10,marginTop:6}},m==null||((w=m[0])===null||w===void 0)?void 0:w.parent_name),t.a.createElement("div",{style:{display:"flex",flexWrap:"wrap"}},m==null?void 0:m.map(function(L){return t.a.createElement("div",{key:"subDisciplinesList"+L.id},t.a.createElement(ee.a,{style:{margin:"12px 6px",backgroundColor:"#F6FFED"},onClick:function(){a.disciplinesRemove(L)}},L.name,t.a.createElement(H.a,null)))})))})):null,t.a.createElement(ue.a.Item,{initialValue:[],label:"\u8BD5\u9898\u6587\u4EF6\u5939:\uFF08\u9009\u4E2D\u9879\u4EC5\u5305\u62EC\u8BE5\u6587\u4EF6\u5939\u4E0B\u7684\u8BD5\u9898\uFF0C\u4E0D\u5305\u62EC\u5B50\u6587\u4EF6\u5939\uFF0C\u4E14\u7CFB\u7EDF\u53D6\u60A8\u9009\u4E2D\u7684\u6587\u4EF6\u5939\u548C\u8003\u67E5\u8303\u56F4\u4E2D\u7684\u8BD5\u9898\u7684\u4EA4\u96C6\u4F5C\u4E3A\u968F\u673A\u5BF9\u8C61\u3002\uFF09",name:"group_ids"},t.a.createElement(Te.a,{multiple:!0,defaultExpandedKeys:[0]})),t.a.createElement(de,null))}}]),v}(t.a.Component),Fe=st,Ee=s("ErOA"),ke=s("N5Ab"),pe=s.n(ke),lt=function(F){Object(xe.a)(v,F);var S=Object(Le.a)(v);function v(){return Object(Ce.a)(this,v),S.apply(this,arguments)}return Object(De.a)(v,[{key:"render",value:function(){var a=this.props.form,y=a.getFieldDecorator,l=a.getFieldsValue,i=a.setFieldsValue,R=this.props.data,h=R.item_type,d=R.items_by_item_type,f=function(m){var X=m.difficult,w=m.count;return t.a.createElement("div",{style:{marginRight:10,lineHeight:"18px"}},t.a.createElement("div",{style:{fontSize:14,textAlign:"left"}},Rt[X]),t.a.createElement("div",{style:{fontSize:12,color:"#999999"}},"(\u5171 ",w," \u9898\u53EF\u9009)"))},P=l(),g=Object.keys(P).filter(function(A){return A.includes("".concat(h,"-"))&&P[A]}),k=0;return g.map(function(A){return k+=P[A],null}),t.a.createElement("div",null,t.a.createElement("div",null,t.a.createElement("span",{className:"font14"},He[h]),Se(k)>0?t.a.createElement("span",{style:{color:"#999999",fontSize:12}},"\uFF08\u5DF2\u9009 ",Se(k)," \u9898\uFF09"):null),d.map(function(A){return t.a.createElement("div",{key:h+A.discipline_id+A.sub_discipline_id},t.a.createElement("div",{style:{fontSize:16,margin:"16px 0px",fontWeight:"500"}},A.discipline_name," / ",A.sub_discipline_name," ",A.tag_discipline_name&&"/".concat(A.tag_discipline_name)),t.a.createElement("div",{className:pe.a.formItem},A.items_by_item_type_and_tag_discipline.map(function(m){return t.a.createElement(ue.a.Item,{label:t.a.createElement(f,{count:m.items_count,difficult:m.difficulty}),extra:t.a.createElement("span",{className:pe.a.questionTip},"\u9898"),name:"count-".concat(h,"-").concat(A.sub_discipline_id,"-").concat(m.difficulty,"-").concat(A.tag_discipline_id),colon:!1,style:{width:"30%"},initialValue:0,key:"".concat(h,"-").concat(A.sub_discipline_id,"-").concat(m.difficulty)},t.a.createElement(Ne.a,{min:0,max:m.items_count,formatter:Se}))})))}))}}]),v}(t.a.Component),et=lt,ht=[{item_type:"MULTIPLE",items_by_item_type:[{sub_discipline_id:12,sub_discipline_name:"Java\u7A0B\u5E8F\u8BBE\u8BA1",discipline_id:7,discipline_name:"\u7A0B\u5E8F\u8BBE\u8BA1\u8BED\u8A00",items_by_item_type_and_sub_discipline:[{difficulty:1,items_count:3}]}]},{item_type:"SINGLE",items_by_item_type:[{sub_discipline_id:12,sub_discipline_name:"Java\u7A0B\u5E8F\u8BBE\u8BA1",discipline_id:7,discipline_name:"\u7A0B\u5E8F\u8BBE\u8BA1\u8BED\u8A00",items_by_item_type_and_sub_discipline:[{difficulty:1,items_count:10}]}]},{item_type:"JUDGMENT",items_by_item_type:[{sub_discipline_id:12,sub_discipline_name:"Java\u7A0B\u5E8F\u8BBE\u8BA1",discipline_id:7,discipline_name:"\u7A0B\u5E8F\u8BBE\u8BA1\u8BED\u8A00",items_by_item_type_and_sub_discipline:[{difficulty:1,items_count:2}]}]},{item_type:"PROGRAM",items_by_item_type:[{sub_discipline_id:13,sub_discipline_name:"\u4FE1\u53F7\u4E0E\u7CFB\u7EDF",discipline_id:8,discipline_name:"\u7535\u5B50\u6280\u672F",items_by_item_type_and_sub_discipline:[{difficulty:1,items_count:1}]},{sub_discipline_id:12,sub_discipline_name:"Java\u7A0B\u5E8F\u8BBE\u8BA1",discipline_id:7,discipline_name:"\u7A0B\u5E8F\u8BBE\u8BA1\u8BED\u8A00",items_by_item_type_and_sub_discipline:[{difficulty:1,items_count:4}]},{sub_discipline_id:26,sub_discipline_name:"Python\u7A0B\u5E8F\u8BBE\u8BA1",discipline_id:7,discipline_name:"\u7A0B\u5E8F\u8BBE\u8BA1\u8BED\u8A00",items_by_item_type_and_sub_discipline:[{difficulty:1,items_count:1}]},{sub_discipline_id:23,sub_discipline_name:"Java\u7A0B\u5E8F\u8BBE\u8BA1",discipline_id:7,discipline_name:"\u7A0B\u5E8F\u8BBE\u8BA1\u8BED\u8A00",items_by_item_type_and_sub_discipline:[{difficulty:1,items_count:1}]}]}],ct=function(F){Object(xe.a)(v,F);var S=Object(Le.a)(v);function v(b){var a;return Object(Ce.a)(this,v),a=S.call(this,b),a.state={},a}return Object(De.a)(v,[{key:"render",value:function(){var a=this.props.form,y=this.props.optinalData;return t.a.createElement("div",null,y.map(function(l,i){return t.a.createElement("div",{key:l.item_type},t.a.createElement(et,{form:a,data:l}),i===y.length-1?null:t.a.createElement(Ie.a,null))}),t.a.createElement(de,null))}}]),v}(t.a.Component),tt=ct,nt=s("0Owb"),gt=s("2qtc"),yt=s("kLXV"),at=s("tJVT"),Lt=s("9kvl"),dt=s("ngQI"),$e=s("9Bee"),Ut=s("HwL6"),ie=s.n(Ut),Pt=["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"],Ot=function(S){var v=S.index,b=S.typeName,a=S.type,y=S.loading,l=S.data,i=l===void 0?{}:l,R=S.inMouseId,h=S.onSetScore,d=h===void 0?function(){}:h,f=S.onBarter,P=f===void 0?function(){}:f,g=S.onMouseEnter,k=g===void 0?function(){}:g,A=function(){var C;return t.a.createElement("div",{className:ie.a.answerWrap},i==null||((C=i.choices)===null||C===void 0)?void 0:C.map(function(G,n){return t.a.createElement("div",{className:"".concat(ie.a.flexRow," mt15"),key:n},t.a.createElement("div",{style:{lineHeight:"24px",flexShrink:0}},Pt[n]),t.a.createElement("div",{className:"".concat(ie.a.answer," ml5")},t.a.createElement($e.a,{value:G==null?void 0:G.choice_text})))}))},m=function(){var C;return t.a.createElement("div",{className:ie.a.answerWrap},t.a.createElement("div",{className:"".concat(ie.a.flexRow," mt15")},i==null||((C=i.choices)===null||C===void 0)?void 0:C.map(function(G,n){return t.a.createElement(ve.a,{disabled:!0,key:n},G==null?void 0:G.choice_text)})))},X=function(){var C;return t.a.createElement("div",{className:ie.a.answerWrap},t.a.createElement("div",{className:"".concat(ie.a.flexRow," mt15")},t.a.createElement($e.a,{value:i==null||((C=i.program_attr)===null||C===void 0)?void 0:C.description})))},w=function(){var C;return t.a.createElement("div",{className:ie.a.answerWrap},t.a.createElement("div",{className:"".concat(ie.a.flexColumn," mt15")},i==null||((C=i.standard_answer)===null||C===void 0)?void 0:C.map(function(G,n){return t.a.createElement($e.a,{key:n,value:"\u7B54\u6848\uFF08\u586B\u7A7A".concat(G.position,"\uFF09\uFF1A").concat(G.answer_text.join("\u3001"))})})))},L=function(){var C;return t.a.createElement("div",{className:ie.a.answerWrap},t.a.createElement("div",{className:"mt15"},t.a.createElement("div",null,"\u7B54\u6848\uFF1A"),t.a.createElement($e.a,{value:i==null||((C=i.answer_texts)===null||C===void 0)?void 0:C[0]})))},D=function(){var C;return t.a.createElement("div",{className:ie.a.answerWrap},t.a.createElement("div",{className:"mt10"},"\u5173\u5361"),i==null||((C=i.shixun)===null||C===void 0)?void 0:C.map(function(G,n){return t.a.createElement("div",{className:"mt10 font14"},n+1,". ",G==null?void 0:G.challenge_name)}))},re=function(){var C={SINGLE:A,MULTIPLE:A,JUDGMENT:m,PROGRAM:X,COMPLETION:w,SUBJECTIVE:L,PRACTICAL:D};return C[a]?C[a]():null},$=function(C,G){var n='<span style="margin-right: -10px">'.concat(G+1,'\u3001</span><span class="c-grey-999">\uFF08').concat(C.score,"\u5206\uFF09</span>");return n};return t.a.createElement("div",{onMouseEnter:function(){return k(i.id)}},R===i.id&&t.a.createElement("div",{className:ie.a.action},t.a.createElement(ee.a,{loading:y,className:ie.a.setScore,onClick:function(){return d(i.id,b,i.score,a)}},"\u8BBE\u7F6E\u5F97\u5206"),t.a.createElement(ee.a,{loading:y,className:ie.a.delete,onClick:function(){return P(i.id)}},"\u6362\u4E00\u9898")),t.a.createElement("div",{className:ie.a.content},t.a.createElement("div",{className:ie.a.titleWrap},t.a.createElement($e.a,{className:ie.a.titleHtml,value:$(i,v)+i.name||(i==null?void 0:i.shixun_name)})),re()))},Dt=Ot,xt=s("XE9d"),oe=s.n(xt),jt=s("LvDl"),Pe=s.n(jt);function be(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */be=function(){return F};var F={},S=Object.prototype,v=S.hasOwnProperty,b=typeof Symbol=="function"?Symbol:{},a=b.iterator||"@@iterator",y=b.asyncIterator||"@@asyncIterator",l=b.toStringTag||"@@toStringTag";function i(n,e,r){return Object.defineProperty(n,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),n[e]}try{i({},"")}catch(n){i=function(r,o,u){return r[o]=u}}function R(n,e,r,o){var u=e&&e.prototype instanceof f?e:f,c=Object.create(u.prototype),O=new z(o||[]);return c._invoke=function(K,Y,E){var _="suspendedStart";return function(p,N){if(_==="executing")throw new Error("Generator is already running");if(_==="completed"){if(p==="throw")throw N;return G()}for(E.method=p,E.arg=N;;){var U=E.delegate;if(U){var V=D(U,E);if(V){if(V===d)continue;return V}}if(E.method==="next")E.sent=E._sent=E.arg;else if(E.method==="throw"){if(_==="suspendedStart")throw _="completed",E.arg;E.dispatchException(E.arg)}else E.method==="return"&&E.abrupt("return",E.arg);_="executing";var I=h(K,Y,E);if(I.type==="normal"){if(_=E.done?"completed":"suspendedYield",I.arg===d)continue;return{value:I.arg,done:E.done}}I.type==="throw"&&(_="completed",E.method="throw",E.arg=I.arg)}}}(n,r,O),c}function h(n,e,r){try{return{type:"normal",arg:n.call(e,r)}}catch(o){return{type:"throw",arg:o}}}F.wrap=R;var d={};function f(){}function P(){}function g(){}var k={};i(k,a,function(){return this});var A=Object.getPrototypeOf,m=A&&A(A(C([])));m&&m!==S&&v.call(m,a)&&(k=m);var X=g.prototype=f.prototype=Object.create(k);function w(n){["next","throw","return"].forEach(function(e){i(n,e,function(r){return this._invoke(e,r)})})}function L(n,e){function r(u,c,O,K){var Y=h(n[u],n,c);if(Y.type!=="throw"){var E=Y.arg,_=E.value;return _&&typeof _=="object"&&v.call(_,"__await")?e.resolve(_.__await).then(function(p){r("next",p,O,K)},function(p){r("throw",p,O,K)}):e.resolve(_).then(function(p){E.value=p,O(E)},function(p){return r("throw",p,O,K)})}K(Y.arg)}var o;this._invoke=function(u,c){function O(){return new e(function(K,Y){r(u,c,K,Y)})}return o=o?o.then(O,O):O()}}function D(n,e){var r=n.iterator[e.method];if(r===void 0){if(e.delegate=null,e.method==="throw"){if(n.iterator.return&&(e.method="return",e.arg=void 0,D(n,e),e.method==="throw"))return d;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var o=h(r,n.iterator,e.arg);if(o.type==="throw")return e.method="throw",e.arg=o.arg,e.delegate=null,d;var u=o.arg;return u?u.done?(e[n.resultName]=u.value,e.next=n.nextLoc,e.method!=="return"&&(e.method="next",e.arg=void 0),e.delegate=null,d):u:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function re(n){var e={tryLoc:n[0]};1 in n&&(e.catchLoc=n[1]),2 in n&&(e.finallyLoc=n[2],e.afterLoc=n[3]),this.tryEntries.push(e)}function $(n){var e=n.completion||{};e.type="normal",delete e.arg,n.completion=e}function z(n){this.tryEntries=[{tryLoc:"root"}],n.forEach(re,this),this.reset(!0)}function C(n){if(n){var e=n[a];if(e)return e.call(n);if(typeof n.next=="function")return n;if(!isNaN(n.length)){var r=-1,o=function u(){for(;++r<n.length;)if(v.call(n,r))return u.value=n[r],u.done=!1,u;return u.value=void 0,u.done=!0,u};return o.next=o}}return{next:G}}function G(){return{value:void 0,done:!0}}return P.prototype=g,i(X,"constructor",g),i(g,"constructor",P),P.displayName=i(g,l,"GeneratorFunction"),F.isGeneratorFunction=function(n){var e=typeof n=="function"&&n.constructor;return!!e&&(e===P||(e.displayName||e.name)==="GeneratorFunction")},F.mark=function(n){return Object.setPrototypeOf?Object.setPrototypeOf(n,g):(n.__proto__=g,i(n,l,"GeneratorFunction")),n.prototype=Object.create(X),n},F.awrap=function(n){return{__await:n}},w(L.prototype),i(L.prototype,y,function(){return this}),F.AsyncIterator=L,F.async=function(n,e,r,o,u){u===void 0&&(u=Promise);var c=new L(R(n,e,r,o),u);return F.isGeneratorFunction(e)?c:c.next().then(function(O){return O.done?O.value:c.next()})},w(X),i(X,l,"Generator"),i(X,a,function(){return this}),i(X,"toString",function(){return"[object Generator]"}),F.keys=function(n){var e=[];for(var r in n)e.push(r);return e.reverse(),function o(){for(;e.length;){var u=e.pop();if(u in n)return o.value=u,o.done=!1,o}return o.done=!0,o}},F.values=C,z.prototype={constructor:z,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach($),!e)for(var r in this)r.charAt(0)==="t"&&v.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if(e.type==="throw")throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(E,_){return O.type="throw",O.arg=e,r.next=E,_&&(r.method="next",r.arg=void 0),!!_}for(var u=this.tryEntries.length-1;u>=0;--u){var c=this.tryEntries[u],O=c.completion;if(c.tryLoc==="root")return o("end");if(c.tryLoc<=this.prev){var K=v.call(c,"catchLoc"),Y=v.call(c,"finallyLoc");if(K&&Y){if(this.prev<c.catchLoc)return o(c.catchLoc,!0);if(this.prev<c.finallyLoc)return o(c.finallyLoc)}else if(K){if(this.prev<c.catchLoc)return o(c.catchLoc,!0)}else{if(!Y)throw new Error("try statement without catch or finally");if(this.prev<c.finallyLoc)return o(c.finallyLoc)}}}},abrupt:function(e,r){for(var o=this.tryEntries.length-1;o>=0;--o){var u=this.tryEntries[o];if(u.tryLoc<=this.prev&&v.call(u,"finallyLoc")&&this.prev<u.finallyLoc){var c=u;break}}c&&(e==="break"||e==="continue")&&c.tryLoc<=r&&r<=c.finallyLoc&&(c=null);var O=c?c.completion:{};return O.type=e,O.arg=r,c?(this.method="next",this.next=c.finallyLoc,d):this.complete(O)},complete:function(e,r){if(e.type==="throw")throw e.arg;return e.type==="break"||e.type==="continue"?this.next=e.arg:e.type==="return"?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):e.type==="normal"&&r&&(this.next=r),d},finish:function(e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.finallyLoc===e)return this.complete(o.completion,o.afterLoc),$(o),d}},catch:function(e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc===e){var u=o.completion;if(u.type==="throw"){var c=u.arg;$(o)}return c}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,o){return this.delegate={iterator:C(e),resultName:r,nextLoc:o},this.method==="next"&&(this.arg=void 0),d}},F}var bt=function(S){var v={\u5355\u9009\u9898:5,\u591A\u9009\u9898:5,\u586B\u7A7A\u9898:2,\u5224\u65AD\u9898:5,\u7B80\u7B54\u9898:10,\u7F16\u7A0B\u9898:10};return v[S]||0},At=function(S,v){var b,a=S.dispatch,y=S.questionPostData,l=y===void 0?{}:y,i=S.questionData,R=i===void 0?{}:i,h=Object(me.useState)({}),d=Object(at.a)(h,2),f=d[0],P=d[1],g=Object(me.useState)(),k=Object(at.a)(g,2),A=k[0],m=k[1],X=Object(me.useState)(!1),w=Object(at.a)(X,2),L=w[0],D=w[1],re=Object(me.useState)(),$=Object(at.a)(re,2),z=$[0],C=$[1],G=Object(me.useRef)(),n=Object(me.useRef)(null);Object(me.useEffect)(function(){P(E(R))},[R]);var e=function(){var _=Object(ge.a)(be().mark(function p(){var N,U,V,I,T,ne,x,ae=arguments;return be().wrap(function(q){for(;;)switch(q.prev=q.next){case 0:return U=ae.length>0&&ae[0]!==void 0?ae[0]:[],V=ae.length>1?ae[1]:void 0,I=l==null||((N=l.contents)===null||N===void 0)?void 0:N.map(function(W){return W.item_type===V?Object(j.a)(Object(j.a)({},W),{},{items_count:U.length>1?W==null?void 0:W.items_count:1}):null}),T=U.length?Pe.a.xor(U,f.ids):[],ne=Object(j.a)(Object(j.a)({},l),{},{item_bank_ids:T}),U.length===1&&(ne.contents=I.filter(function(W){return!!W&&W.difficulty===String(n.current)})),U.length>1&&(ne.contents=I.filter(function(W){return!!W})),fe.b.loading("\u6362\u9898\u4E2D,\u8BF7\u7A0D\u540E...",0),D(!0),q.next=11,Object(Ee.a)("/api/examination_banks/create_question_list.json",{method:"post",body:ne});case 11:if(x=q.sent,!x.exam){q.next=18;break}return fe.b.destroy(),fe.b.success("\u64CD\u4F5C\u6210\u529F"),D(!1),r(E(x),U,V),q.abrupt("return");case 18:fe.b.destroy(),fe.b.success("\u64CD\u4F5C\u5931\u8D25"),D(!1);case 21:case"end":return q.stop()}},p)}));return function(){return _.apply(this,arguments)}}(),r=function(p){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],U=arguments.length>2?arguments[2]:void 0;if(N.length===0){P(p);return}if(N.length===1){var V,I,T=Pe.a.cloneDeep(f),ne=(V=Pe.a.xor(p.ids,T.ids))===null||V===void 0?void 0:V[0],x=(I=Pe.a.xor(p.ids,T.ids))===null||I===void 0?void 0:I[1];console.log(x,ne,N[0],Pe.a.xor(p.ids,T.ids),p.ids,T.ids,444);var ae=null;p==null||p.questionList.forEach(function(te){if(te.type===U){var Q;(Q=te.questions)===null||Q===void 0||Q.forEach(function(he){he.id===ne&&(ae=Object(j.a)({},he))})}});var Z=T==null?void 0:T.questionList.map(function(te){if(te.type===U){var Q,he=0,Je=(Q=te.questions)===null||Q===void 0?void 0:Q.map(function(we){return he=he+(we.id===x?ae.score:we.score),we.id===x?ae:we});return Object(j.a)(Object(j.a)({},te),{},{questions:Je,questions_score:he})}return te}),q=0;Z.forEach(function(te){var Q;(Q=te.questions)===null||Q===void 0||Q.forEach(function(he){q=q+he.score})}),T.questionList=Z,T.all_score=q,P(T);return}if(N.length>1){var W=Pe.a.cloneDeep(f),le=null;p==null||p.questionList.forEach(function(te){te.type===U&&(le=Object(j.a)({},te))});var ce=W==null?void 0:W.questionList.map(function(te){return te.type===U?le:te}),_e=0;ce.forEach(function(te){var Q;(Q=te.questions)===null||Q===void 0||Q.forEach(function(he){_e=_e+he.score})}),W.questionList=ce,W.all_score=_e,P(W);return}},o=function(p,N,U,V){G.current=U||bt(N),yt.a.confirm({centered:!0,title:"\u8BBE\u7F6E\u5206\u6570",content:t.a.createElement("div",{className:""},t.a.createElement("span",null,"\u672C\u9898\u5206\u503C\uFF1A"),t.a.createElement(Ne.a,{min:1,defaultValue:G.current,onChange:function(T){G.current=T}}),t.a.createElement("span",{className:"ml5"},"\u5206/\u9898"),t.a.createElement("br",null),N==="\u586B\u7A7A\u9898"&&t.a.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:function(){var I=Object(ge.a)(be().mark(function ne(){var x,ae,Z;return be().wrap(function(W){for(;;)switch(W.prev=W.next){case 0:x=Pe.a.cloneDeep(f),ae=x==null?void 0:x.questionList.map(function(le){if(le.type===V){var ce,_e=0,te=(ce=le.questions)===null||ce===void 0?void 0:ce.map(function(Q){return _e=_e+(Q.id===p?G.current:Q.score),Q.id===p?Object(j.a)(Object(j.a)({},Q),{},{score:G.current}):Q});return Object(j.a)(Object(j.a)({},le),{},{questions:te,questions_score:_e})}return le}),Z=0,ae.forEach(function(le){var ce;(ce=le.questions)===null||ce===void 0||ce.forEach(function(_e){Z=Z+_e.score})}),x.questionList=ae,x.all_score=Z,P(x);case 7:case"end":return W.stop()}},ne)}));function T(){return I.apply(this,arguments)}return T}()})},u=function(p,N,U){n.current=U,e([p],N)},c=function(p,N){G.current=bt(N),yt.a.confirm({centered:!0,title:"\u6279\u91CF\u8BBE\u7F6E\u5206\u6570",content:t.a.createElement("div",{className:""},t.a.createElement("span",null,N,"\uFF1A"),t.a.createElement(Ne.a,{min:1,defaultValue:G.current,onChange:function(V){G.current=V}}),t.a.createElement("span",{className:"ml5"},"\u5206/\u9898"),t.a.createElement("br",null),N==="\u586B\u7A7A\u9898"&&t.a.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:function(){var U=Object(ge.a)(be().mark(function I(){var T,ne,x;return be().wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:T=Pe.a.cloneDeep(f),ne=T==null?void 0:T.questionList.map(function(q){if(q.type===p){var W,le=G.current*q.questions.length,ce=(W=q.questions)===null||W===void 0?void 0:W.map(function(_e){return Object(j.a)(Object(j.a)({},_e),{},{score:G.current})});return Object(j.a)(Object(j.a)({},q),{},{questions:ce,questions_score:le})}return q}),x=0,ne.forEach(function(q){var W;(W=q.questions)===null||W===void 0||W.forEach(function(le){x=x+le.score})}),T.questionList=ne,T.all_score=x,P(T);case 7:case"end":return Z.stop()}},I)}));function V(){return U.apply(this,arguments)}return V}()})},O=function(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],N=arguments.length>1?arguments[1]:void 0,U=p.map(function(V){return V.id});e(U,N)},K=function(){var _=Object(ge.a)(be().mark(function p(N,U){var V,I,T;return be().wrap(function(x){for(;;)switch(x.prev=x.next){case 0:if(!(!N.destination||!N.source)){x.next=2;break}return x.abrupt("return");case 2:return V=U.questions[N.source.index].id,I=N.destination.index+1,x.next=6,a({type:"problemsetPreview/adjustPosition",payload:{id:V,position:I}});case 6:if(T=x.sent,!(T.status===-1)){x.next=9;break}return x.abrupt("return");case 9:e();case 10:case"end":return x.stop()}},p)}));return function(N,U){return _.apply(this,arguments)}}(),Y=function(){var _=Object(ge.a)(be().mark(function p(){var N,U,V,I,T;return be().wrap(function(x){for(;;)switch(x.prev=x.next){case 0:return U=[],V=[],f==null||((N=f.questionList)===null||N===void 0)||N.forEach(function(ae){var Z;(Z=ae.questions)===null||Z===void 0||Z.forEach(function(q){U.push(q.id),V.push(q.score)})}),I=Object(j.a)(Object(j.a)({},l),{},{item_bank_ids:U,item_bank_scores:V}),x.next=6,Object(Ee.a)("/api/examination_banks/save_question_list.json",{method:"post",body:I});case 6:T=x.sent,T.status===0&&Lt.c.replace("/paperlibrary");case 8:case"end":return x.stop()}},p)}));return function(){return _.apply(this,arguments)}}();Object(me.useImperativeHandle)(v,function(){return{modeSubmit:Y}});var E=function(p){var N={1:"\u4E00",2:"\u4E8C",3:"\u4E09",4:"\u56DB",5:"\u4E94",6:"\u516D",7:"\u4E03"};if(!p)return;var U=p||{},V=U.exam,I=U.single_questions,T=U.multiple_questions,ne=U.judgement_questions,x=U.program_questions,ae=U.completion_questions,Z=U.subjective_questions,q=U.practical_questions,W=[Object(j.a)({type:"SINGLE",name:"\u5355\u9009\u9898"},I),Object(j.a)({type:"MULTIPLE",name:"\u591A\u9009\u9898"},T),Object(j.a)({type:"COMPLETION",name:"\u586B\u7A7A\u9898"},ae),Object(j.a)({type:"JUDGMENT",name:"\u5224\u65AD\u9898"},ne),Object(j.a)({type:"SUBJECTIVE",name:"\u7B80\u7B54\u9898"},Z),Object(j.a)({type:"PROGRAM",name:"\u7F16\u7A0B\u9898"},x),Object(j.a)({type:"PRACTICAL",name:"\u5B9E\u8BAD\u9898"},q)],le=[],ce=0,_e=0,te=W.filter(function(Q){return Q.questions_count>0}).map(function(Q,he){var Je;return(Je=Q.questions)===null||Je===void 0||Je.forEach(function(we){le.push(we.id),ce=ce+we.score,_e=_e+1}),Object(j.a)(Object(j.a)({},Q),{number:N[he+1]})});return{all_questions_count:_e,all_score:ce,questionList:te,ids:le}};return console.log(f,"paperData"),t.a.createElement("section",{className:oe.a.bg},t.a.createElement("div",{className:oe.a.wrap},t.a.createElement("div",{className:"pt20 pb20"},t.a.createElement("div",{className:"".concat(oe.a.flexRow," ").concat(oe.a.flexJustifyBetween)},t.a.createElement("div",null,t.a.createElement("span",{className:oe.a.questionNumber},"\u9898\u6570\uFF1A",f==null?void 0:f.all_questions_count),t.a.createElement("span",{className:oe.a.score},"\u603B\u5206\uFF1A",f==null?void 0:f.all_score)),t.a.createElement(ee.a,{loading:L,className:oe.a.selectTopicButton,onClick:function(){return e()}},"\u91CD\u65B0\u968F\u673A")),t.a.createElement("div",{className:oe.a.line}),f==null||((b=f.questionList)===null||b===void 0)?void 0:b.map(function(_,p){var N=_.type===z;return t.a.createElement("div",{className:"".concat(oe.a.relative," mt20 mb20"),key:p},t.a.createElement("div",{className:"".concat(oe.a.typeActive," ").concat(N?oe.a.mouseTypeActive:""),onMouseEnter:function(){C(_.type),m(null)}},t.a.createElement("span",{className:"".concat(oe.a.typeName," ").concat(N?"ml20":"")},_.number,"\u3001",_.name),t.a.createElement("span",{className:oe.a.typeNumber},"\uFF08\u5171",_.questions_count,"\u9898\uFF1B\u5171",_.questions_score,"\u5206\uFF09")),N&&t.a.createElement("div",{className:"".concat(oe.a.typeAction," ").concat(oe.a.flexRow)},t.a.createElement(ee.a,{loading:L,className:oe.a.setScore,onClick:function(){return c(_.type,_.name)}},"\u6279\u91CF\u8BBE\u7F6E\u5F97\u5206"),t.a.createElement(ee.a,{loading:L,className:oe.a.delete,onClick:function(){return O(_.questions,_.type)}},"\u6362\u4E00\u6279")),t.a.createElement(dt.a,{onDragEnd:function(V){return K(V,_)}},t.a.createElement(dt.c,{droppableId:p.toString()},function(U,V){var I;return t.a.createElement("div",Object(nt.a)({className:"mt20",ref:U.innerRef},U.droppableProps,{onScroll:function(){}}),(I=_.questions)===null||I===void 0?void 0:I.map(function(T,ne){return t.a.createElement(dt.b,{draggableId:T.id.toString(),index:ne,key:T.id,isDragDisabled:!0},function(x){return t.a.createElement("div",Object(nt.a)({ref:x.innerRef},x.draggableProps,x.dragHandleProps),t.a.createElement(Dt,{index:ne,typeName:_.name,loading:L,type:_.type,data:T,inMouseId:A,onSetScore:o,onBarter:function(Z){return u(Z,_.type,T==null?void 0:T.difficulty)},onMouseEnter:function(Z){m(Z),C(null)}}))})}))})))}))))},Ct=Object(me.forwardRef)(At),Nt=function(S){var v=S.title,b=S.score,a=S.totalCount;return t.a.createElement("div",null,v,":",b&&b>0?t.a.createElement("span",{style:{marginLeft:4,color:"#999",fontSize:12}},"(\u5171 ",b," \u5206)"):null)},Tt=function(F){Object(xe.a)(v,F);var S=Object(Le.a)(v);function v(b){var a;return Object(Ce.a)(this,v),a=S.call(this,b),a.state={},a}return Object(De.a)(v,[{key:"render",value:function(){if(!this.props.form)return"";var a=this.props.form,y=a.getFieldDecorator,l=a.getFieldsValue,i=Object.keys(He),R=l(),h=0;return t.a.createElement("div",null,i.map(function(d){var f=Object.keys(R).filter(function(k){return k.includes("".concat(d,"-"))&&R[k]}),P=0,g=0;return f.map(function(k){return P+=R[k],g=P*R["score-".concat(d)],null}),h+=g,f.length>0?t.a.createElement(ue.a.Item,{label:t.a.createElement(Nt,{title:He[d],score:g,totalCount:P}),name:"score-".concat(d),colon:!1,key:He[d],rules:[{required:!0,message:"\u5206\u6570\u4E0D\u80FD\u4E3A\u7A7A"}]},t.a.createElement("div",null,t.a.createElement(Ne.a,{min:1,max:100,placeholder:"\u8BF7\u8F93\u5165\u8BD5\u9898\u5206\u6570\u8BBE\u7F6E",style:{width:150}}),t.a.createElement("span",{style:{marginLeft:8}},"\u5206/\u9898"))):null}),h&&h>0?t.a.createElement("div",{style:{marginTop:16}},"\u5F53\u524D\u672C\u5377\u603B\u5206",t.a.createElement("span",{style:{color:"#1890FF"}}," ",h," "),"\u5206"):null)}}]),v}(t.a.Component),St=Tt;function Me(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Me=function(){return F};var F={},S=Object.prototype,v=S.hasOwnProperty,b=typeof Symbol=="function"?Symbol:{},a=b.iterator||"@@iterator",y=b.asyncIterator||"@@asyncIterator",l=b.toStringTag||"@@toStringTag";function i(n,e,r){return Object.defineProperty(n,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),n[e]}try{i({},"")}catch(n){i=function(r,o,u){return r[o]=u}}function R(n,e,r,o){var u=e&&e.prototype instanceof f?e:f,c=Object.create(u.prototype),O=new z(o||[]);return c._invoke=function(K,Y,E){var _="suspendedStart";return function(p,N){if(_==="executing")throw new Error("Generator is already running");if(_==="completed"){if(p==="throw")throw N;return G()}for(E.method=p,E.arg=N;;){var U=E.delegate;if(U){var V=D(U,E);if(V){if(V===d)continue;return V}}if(E.method==="next")E.sent=E._sent=E.arg;else if(E.method==="throw"){if(_==="suspendedStart")throw _="completed",E.arg;E.dispatchException(E.arg)}else E.method==="return"&&E.abrupt("return",E.arg);_="executing";var I=h(K,Y,E);if(I.type==="normal"){if(_=E.done?"completed":"suspendedYield",I.arg===d)continue;return{value:I.arg,done:E.done}}I.type==="throw"&&(_="completed",E.method="throw",E.arg=I.arg)}}}(n,r,O),c}function h(n,e,r){try{return{type:"normal",arg:n.call(e,r)}}catch(o){return{type:"throw",arg:o}}}F.wrap=R;var d={};function f(){}function P(){}function g(){}var k={};i(k,a,function(){return this});var A=Object.getPrototypeOf,m=A&&A(A(C([])));m&&m!==S&&v.call(m,a)&&(k=m);var X=g.prototype=f.prototype=Object.create(k);function w(n){["next","throw","return"].forEach(function(e){i(n,e,function(r){return this._invoke(e,r)})})}function L(n,e){function r(u,c,O,K){var Y=h(n[u],n,c);if(Y.type!=="throw"){var E=Y.arg,_=E.value;return _&&typeof _=="object"&&v.call(_,"__await")?e.resolve(_.__await).then(function(p){r("next",p,O,K)},function(p){r("throw",p,O,K)}):e.resolve(_).then(function(p){E.value=p,O(E)},function(p){return r("throw",p,O,K)})}K(Y.arg)}var o;this._invoke=function(u,c){function O(){return new e(function(K,Y){r(u,c,K,Y)})}return o=o?o.then(O,O):O()}}function D(n,e){var r=n.iterator[e.method];if(r===void 0){if(e.delegate=null,e.method==="throw"){if(n.iterator.return&&(e.method="return",e.arg=void 0,D(n,e),e.method==="throw"))return d;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var o=h(r,n.iterator,e.arg);if(o.type==="throw")return e.method="throw",e.arg=o.arg,e.delegate=null,d;var u=o.arg;return u?u.done?(e[n.resultName]=u.value,e.next=n.nextLoc,e.method!=="return"&&(e.method="next",e.arg=void 0),e.delegate=null,d):u:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function re(n){var e={tryLoc:n[0]};1 in n&&(e.catchLoc=n[1]),2 in n&&(e.finallyLoc=n[2],e.afterLoc=n[3]),this.tryEntries.push(e)}function $(n){var e=n.completion||{};e.type="normal",delete e.arg,n.completion=e}function z(n){this.tryEntries=[{tryLoc:"root"}],n.forEach(re,this),this.reset(!0)}function C(n){if(n){var e=n[a];if(e)return e.call(n);if(typeof n.next=="function")return n;if(!isNaN(n.length)){var r=-1,o=function u(){for(;++r<n.length;)if(v.call(n,r))return u.value=n[r],u.done=!1,u;return u.value=void 0,u.done=!0,u};return o.next=o}}return{next:G}}function G(){return{value:void 0,done:!0}}return P.prototype=g,i(X,"constructor",g),i(g,"constructor",P),P.displayName=i(g,l,"GeneratorFunction"),F.isGeneratorFunction=function(n){var e=typeof n=="function"&&n.constructor;return!!e&&(e===P||(e.displayName||e.name)==="GeneratorFunction")},F.mark=function(n){return Object.setPrototypeOf?Object.setPrototypeOf(n,g):(n.__proto__=g,i(n,l,"GeneratorFunction")),n.prototype=Object.create(X),n},F.awrap=function(n){return{__await:n}},w(L.prototype),i(L.prototype,y,function(){return this}),F.AsyncIterator=L,F.async=function(n,e,r,o,u){u===void 0&&(u=Promise);var c=new L(R(n,e,r,o),u);return F.isGeneratorFunction(e)?c:c.next().then(function(O){return O.done?O.value:c.next()})},w(X),i(X,l,"Generator"),i(X,a,function(){return this}),i(X,"toString",function(){return"[object Generator]"}),F.keys=function(n){var e=[];for(var r in n)e.push(r);return e.reverse(),function o(){for(;e.length;){var u=e.pop();if(u in n)return o.value=u,o.done=!1,o}return o.done=!0,o}},F.values=C,z.prototype={constructor:z,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach($),!e)for(var r in this)r.charAt(0)==="t"&&v.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if(e.type==="throw")throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(E,_){return O.type="throw",O.arg=e,r.next=E,_&&(r.method="next",r.arg=void 0),!!_}for(var u=this.tryEntries.length-1;u>=0;--u){var c=this.tryEntries[u],O=c.completion;if(c.tryLoc==="root")return o("end");if(c.tryLoc<=this.prev){var K=v.call(c,"catchLoc"),Y=v.call(c,"finallyLoc");if(K&&Y){if(this.prev<c.catchLoc)return o(c.catchLoc,!0);if(this.prev<c.finallyLoc)return o(c.finallyLoc)}else if(K){if(this.prev<c.catchLoc)return o(c.catchLoc,!0)}else{if(!Y)throw new Error("try statement without catch or finally");if(this.prev<c.finallyLoc)return o(c.finallyLoc)}}}},abrupt:function(e,r){for(var o=this.tryEntries.length-1;o>=0;--o){var u=this.tryEntries[o];if(u.tryLoc<=this.prev&&v.call(u,"finallyLoc")&&this.prev<u.finallyLoc){var c=u;break}}c&&(e==="break"||e==="continue")&&c.tryLoc<=r&&r<=c.finallyLoc&&(c=null);var O=c?c.completion:{};return O.type=e,O.arg=r,c?(this.method="next",this.next=c.finallyLoc,d):this.complete(O)},complete:function(e,r){if(e.type==="throw")throw e.arg;return e.type==="break"||e.type==="continue"?this.next=e.arg:e.type==="return"?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):e.type==="normal"&&r&&(this.next=r),d},finish:function(e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.finallyLoc===e)return this.complete(o.completion,o.afterLoc),$(o),d}},catch:function(e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc===e){var u=o.completion;if(u.type==="throw"){var c=u.arg;$(o)}return c}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,o){return this.delegate={iterator:C(e),resultName:r,nextLoc:o},this.method==="next"&&(this.arg=void 0),d}},F}var Ft=Ve.a.Step,He={SINGLE:"\u5355\u9009\u9898",MULTIPLE:"\u591A\u9009\u9898",JUDGMENT:"\u5224\u65AD\u9898",COMPLETION:"\u586B\u7A7A\u9898",SUBJECTIVE:"\u7B80\u7B54\u9898",PRACTICAL:"\u5B9E\u8BAD\u9898",PROGRAM:"\u7F16\u7A0B\u9898"},Rt={1:"\u7B80\u5355",2:"\u9002\u4E2D",3:"\u56F0\u96BE"},Mt=function(F){Object(xe.a)(v,F);var S=Object(Le.a)(v);function v(b){var a;return Object(Ce.a)(this,v),a=S.call(this,b),a.getPaperData=function(){var y=window.location.href.split("/").pop();a.setState({loading:!0}),Object(Ee.a)("/examination_banks/".concat(y,"/edit_random_exam.json")).then(function(l){if(a.setState({loading:!1}),l.status===200){var i=l.data,R=i.contents,h=i.examination_bank,d=i.score_settings,f=i.all_sub_disciplines,P={},g={};R.map(function(m){return P=Object(j.a)(Object(j.a)({},P),{},Object(ze.a)({},"count-".concat(m.item_type,"-").concat(m.sub_discipline_id,"-").concat(m.difficulty,"-").concat(m.tag_discipline_id),m.quanlity)),null}),d.map(function(m){return g=Object(j.a)(Object(j.a)({},g),{},Object(ze.a)({},"score-".concat(m.item_type),m.score)),null});var k=Object(j.a)(Object(j.a)({},h),{},{subDisciplines:f.map(function(m){return{id:m.sub_discipline_id,name:m.sub_discipline_name}}),group_ids:groups});a.state.form.setFieldsValue(k),a.setState({formValue:k}),a.setState({countData:P,scoreData:g});var A=h.source;a.getdisciplines(A)}else fe.b.error("\u83B7\u53D6\u8BD5\u5377\u4FE1\u606F\u9519\u8BEF")})},a.getdisciplines=function(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1,l="/api/disciplines.json";Object(Ee.a)(l,{params:{source:"question",public:y}}).then(function(i){(i==null?void 0:i.disciplines)&&a.setState({disciplines:i.disciplines})}).catch(function(i){console.log(i)})},a.getQuestionNumbers=function(){var y;a.setState({loading:!0});var l=a.state.form.getFieldValue("subDisciplines").map(function(d){return d.id}),i=a.state.form.getFieldValue("source"),R=(y=a.state.disciplines)===null||y===void 0?void 0:y.map(function(d){return d.id}),h={group_ids:a.state.form.getFieldValue("group_ids"),source:i===1?0:2};l.length?h.tag_discipline_ids=l:h.discipline_ids=R,Object(Ee.a)("/api/examination_intelligent_settings/optional_items.json",{method:"post",body:h}).then(function(d){a.setState({loading:!1}),d.contents&&(a.setState({optinalData:d.contents}),a.state.form.setFieldsValue(Object(j.a)({},a.state.countData)))})},a.next=Object(ge.a)(Me().mark(function y(){var l,i,R,h,d,f,P,g,k,A,m,X,w,L,D;return Me().wrap(function($){for(;;)switch($.prev=$.next){case 0:if(l=a.state.current+1,console.log(a.form,a.refs.form.getFieldValue()),!(a.state.current===0)){$.next=14;break}return $.next=5,a.state.form.validateFields(["name","time","difficulty","source"]);case 5:if(i=a.state.form.getFieldsValue(),R=i.subDisciplines,h=R===void 0?[]:R,d=i.group_ids,f=d===void 0?[]:d,!(!h.length&&!f.length)){$.next=10;break}return fe.b.warn("\u5FC5\u987B\u9009\u62E9\u8003\u5BDF\u8303\u56F4\u6216\u8BD5\u9898\u6587\u4EF6\u5939\u7684\u5176\u4E2D\u4E00\u9879\uFF0C\u624D\u80FD\u8FDB\u884C\u4E0B\u4E00\u6B65"),$.abrupt("return");case 10:a.setState({current:l}),a.getQuestionNumbers(),$.next=32;break;case 14:if(!(a.state.current===1&&a.idEdit)){$.next=19;break}a.state.form.setFieldsValue(Object(j.a)({},a.state.scoreData)),a.setState({current:l}),$.next=32;break;case 19:if(!(a.state.current===1)){$.next=32;break}if(P=0,g=a.state.form.getFieldsValue(),k=g.name,A=g.difficulty,m=g.time,X=g.source,w=g.subDisciplines,L=g.mode,D=Object(qe.a)(g,["name","difficulty","time","source","subDisciplines","mode"]),Object.keys(D).forEach(function(z){D[z]>0&&++P}),!(P===0)){$.next=28;break}fe.b.error("\u8BF7\u586B\u5199\u9898\u578B\u6570\u91CF"),$.next=32;break;case 28:if(!L){$.next=31;break}return a.submit(),$.abrupt("return");case 31:a.setState({current:l});case 32:case"end":return $.stop()}},y)})),a.prev=function(){var y=a.state.current-1;a.setState({current:y})},a.submit=Object(ge.a)(Me().mark(function y(){var l,i,R,h,d,f,P,g,k,A,m,X;return Me().wrap(function(L){for(;;)switch(L.prev=L.next){case 0:if(l=a.state.form.getFieldsValue(),i=l.exam_notes,R=l.group_ids,h=l.name,d=l.difficulty,f=l.time,P=l.source,g=l.mode,k=Object(qe.a)(l,["exam_notes","group_ids","name","difficulty","time","source","mode"]),g){L.next=5;break}return L.next=5,a.state.form.validateFields();case 5:console.log("data:===> ",l),console.log("others: ",k),A=[],m=[],Object.keys(k).map(function(D){if(D.includes("count")){var re=D.split("-")[1],$=D.split("-")[2],z=D.split("-")[3],C=D.split("-")[4];l[D]!==0&&m.push({item_type:re,difficulty:z,sub_discipline_id:$,items_count:l[D],tag_discipline_id:C})}else if(D.includes("score")){var G=D.split("-")[1];A.push({item_type:G,score:l[D]})}return null}),X={name:h,difficulty:d,time:f,source:P,score_settings:A,contents:m,exam_notes:i,group_ids:R,sub_discipline_id:0},a.idEdit?a.updatePaper(X):g?a.createModePaper(X):a.createPaper(X);case 12:case"end":return L.stop()}},y)})),a.createPaper=function(y){a.setState({loading:!0}),Object(Ee.a)("/api/examination_banks/create_random_exam.json",{method:"post",body:Object(j.a)({},y)}).then(function(l){a.setState({loading:!1}),l.status===0&&(fe.b.success("\u521B\u5EFA\u6210\u529F"),a.props.history.push("/paperlibrary"))})},a.createModePaper=function(y){a.setState({loading:!0}),Object(Ee.a)("/api/examination_banks/create_question_list.json",{method:"post",body:Object(j.a)({},y)}).then(function(l){a.setState({loading:!1}),l.exam&&a.setState({current:a.state.current+1,questionData:l,questionPostData:y})})},a.updatePaper=function(y){a.setState({loading:!0});var l=window.location.href.split("/").pop();Ee.a.post("/examination_banks/".concat(l,"/update_random_exam.json"),{method:"post",body:Object(j.a)({},y)}).then(function(i){a.setState({loading:!1}),i.status===0&&(fe.b.success("\u7F16\u8F91\u6210\u529F"),a.props.history.push("/paperlibrary"))})},a.confirm=function(y){window.confirm("\u786E\u5B9A\u79BB\u5F00\u6B64\u9875\u9762\u5417?\u6B64\u9875\u6570\u636E\u53EF\u80FD\u4F1A\u4E22\u5931")&&(y?a.props.history.push(y):a.props.history.push("/paperlibrary"))},a.state={current:0,disciplines:[],loading:!1,optinalData:[],countData:{},scoreData:{},formValue:{},questionData:{},questionPostData:{}},a.modeRef=null,a}return Object(De.a)(v,[{key:"componentDidMount",value:function(){this.setState({form:this.refs.form}),window.location.href.includes("/randompaper/edit")?(this.getPaperData(),this.idEdit=!0):this.getdisciplines()}},{key:"componentWillMount",value:function(){window.addEventListener("beforeunload",this.beforeunload)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("beforeunload",this.beforeunload)}},{key:"beforeunload",value:function(a){var y="\u786E\u5B9A\u79BB\u5F00\u6B64\u9875\u9762\u5417?\u6B64\u9875\u6570\u636E\u53EF\u80FD\u4F1A\u4E22\u5931";return(a||window.event).returnValue=y,y}},{key:"render",value:function(){var a,y,l=this,i=this.state,R=i.current,h=i.disciplines,d=i.loading,f=i.questionData,P=i.questionPostData,g=(a=this.state)===null||a===void 0||((y=a.form)===null||y===void 0)?void 0:y.getFieldValue("mode"),k=t.a.createElement(ee.a,{onClick:function(){l.confirm()},style:{marginRight:16}},"\u8FD4\u56DE"),A=t.a.createElement(ee.a,{type:"primary",loading:d,onClick:function(){return l.next()}},"\u4E0B\u4E00\u6B65"),m=t.a.createElement(ee.a,{onClick:function(){return l.prev()},style:{marginRight:16}},"\u4E0A\u4E00\u6B65"),X=t.a.createElement(ee.a,{loading:d,onClick:Object(ge.a)(Me().mark(function L(){return Me().wrap(function(re){for(;;)switch(re.prev=re.next){case 0:if(!g){re.next=7;break}return l.setState({loading:!0}),re.next=4,l.modeRef.modeSubmit();case 4:l.setState({loading:!1}),re.next=8;break;case 7:l.submit();case 8:case"end":return re.stop()}},L)})),type:"primary"},"\u5B8C\u6210\u7EC4\u5377"),w=[{title:"\u57FA\u672C\u4FE1\u606F",content:t.a.createElement(Fe,{formValue:this.state.formValue,disciplines:h,getdisciplines:this.getdisciplines,form:this.state.form})},{title:"\u9898\u578B\u6570\u91CF",content:t.a.createElement(tt,{form:this.state.form,optinalData:this.state.optinalData})},{title:"\u8D4B\u5206\u8BBE\u7F6E",content:g?t.a.createElement(Ct,{ref:function(D){return l.modeRef=D},questionData:Pe.a.cloneDeep(f),questionPostData:Pe.a.cloneDeep(P)}):t.a.createElement(St,{form:this.state.form})}];return t.a.createElement("div",{style:{width:1200,margin:"0px auto"}},t.a.createElement(Ae.a,{separator:">",style:{padding:"12px 0px"}},t.a.createElement(Ae.a.Item,null,t.a.createElement(J.Link,{to:"/paperlibrary",onClick:function(D){D.preventDefault(),l.confirm("/paperlibrary")}},"\u8BD5\u5377\u5E93")),t.a.createElement(Ae.a.Item,null,"\u968F\u673A\u7EC4\u5377")),t.a.createElement(ue.a,{from:this.state.form,onValuesChange:function(){return l.setState({formValue:Object(j.a)({},l.state.form.getFieldsValue())})},ref:"form",name:"basic",layout:"vertical"},t.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.a.createElement("span",{style:{fontSize:20,fontWeight:600}},"\u968F\u673A\u7EC4\u5377")),t.a.createElement(rt.a,{style:{marginTop:12}},t.a.createElement("div",{style:{display:"flex",justifyContent:"center",padding:20}},t.a.createElement(Ve.a,{current:R,style:{width:780}},w.map(function(L){return t.a.createElement(Ft,{key:L.title,title:L.title})}))),t.a.createElement(Ie.a,null),t.a.createElement(it.a,{spinning:this.state.loading},w.map(function(L,D){return t.a.createElement("div",{style:{display:D===R?"block":"none"},key:D,className:"pl20 pr20"},L.content)}))),t.a.createElement("div",{style:{display:"flex",marginBottom:200,marginTop:12,justifyContent:"center"}},t.a.createElement("span",{style:{fontSize:20,fontWeight:600}}),t.a.createElement("span",null,R===0?k:m,R===w.length-1?X:A))))}}]),v}(t.a.Component),wt=Re.default=Mt}}]);