(window.webpackJsonp=window.webpackJsonp||[]).push([[51],{"0yVv":function(R,d,e){"use strict";e.r(d);var K=e("WmNS"),f=e.n(K),Z=e("miYZ"),F=e("tsqr"),y=e("k1fw"),j=e("9og8"),X=e("+L6B"),h=e("2/Rp"),w=e("7Kak"),u=e("9yH6"),k=e("giR+"),N=e("fyUT"),q=e("5NDa"),M=e("5rEg"),ee=e("6UJt"),S=e("DFOY"),_e=e("14J3"),z=e("BMrR"),ae=e("jCWc"),B=e("kPKH"),te=e("sPJy"),m=e("bE4q"),se=e("y8nQ"),t=e("Vl3Y"),v=e("tJVT"),J=e("PpiC"),b=e("q1tI"),_=e.n(b),g=e("Ty5D"),I=e("55Ip"),c=e("9kvl"),H=e("Hkc5"),P=e.n(H),V=function(a){var o,L=a.classroomList,x=a.globalSetting,p=a.problemset,le=a.loading,$=a.user,A=a.dispatch,oe=Object(J.a)(a,["classroomList","globalSetting","problemset","loading","user","dispatch"]),r=Object(g.m)(),re=Object(g.l)(),E=$.userInfo,Y=t.a.useForm(),G=Object(v.a)(Y,1),D=G[0];return Object(b.useEffect)(function(){A({type:"problemset/getEditDisciplines",payload:{source:"question"}})},[]),_.a.createElement("section",{className:"edu-container"},_.a.createElement("section",{className:"animated fadeIn"},_.a.createElement("aside",{className:"mt10"},E&&_.a.createElement(m.a,{separator:">"},_.a.createElement(m.a.Item,null,_.a.createElement(I.Link,{to:"/classrooms/".concat(r.coursesId,"/exercise")},E==null||((o=E.course)===null||o===void 0)?void 0:o.course_name)),_.a.createElement(m.a.Item,null,_.a.createElement(I.Link,{to:"/classrooms/".concat(r.coursesId,"/exercise")},"\u8BD5\u5377\u5217\u8868")),_.a.createElement(m.a.Item,null,"\u65B0\u5EFA\u8BD5\u5377"))),_.a.createElement("aside",{className:[P.a.title,"mt20"].join(" ")},_.a.createElement(z.a,{style:{width:"100%"}},_.a.createElement(B.a,{flex:"1"},_.a.createElement("strong",{className:"font20 ml5"},"\u65B0\u5EFA\u8BD5\u5377")),_.a.createElement(B.a,null)))),_.a.createElement("section",{className:[P.a.bg,"pt30","pl30","pr30","pb30","mt20"].join(" ")},_.a.createElement(t.a,{layout:"vertical",form:D,className:P.a.formWrap},_.a.createElement(t.a.Item,{label:"\u65B9\u5411&\u8BFE\u7A0B\uFF1A",name:"courseid",labelCol:{span:5},wrapperCol:{span:5},rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u8BFE\u7A0B"}]},_.a.createElement(S.a,{placeholder:"\u8BF7\u9009\u62E9...",options:p.courseOptions})),_.a.createElement(t.a.Item,{name:"exercise_name",label:"\u8BD5\u5377\u540D\u79F0",rules:[{required:!0,message:"\u8BF7\u586B\u5199\u8BD5\u5377\u6807\u9898"}]},_.a.createElement(M.a,{maxLength:60,placeholder:"\u8BD5\u5377\u6807\u9898\uFF0C\u6700\u5927\u9650\u523660\u4E2A\u5B57\u7B26"})),_.a.createElement(t.a.Item,{name:"time",label:"\u8003\u8BD5\u65F6\u957F",style:{width:"300px"}},_.a.createElement("div",{style:{display:"flex"}},_.a.createElement(N.a,{min:1,max:9999,maxLength:60,placeholder:"\u8BF7\u586B\u5199\u8003\u8BD5\u65F6\u957F"}),_.a.createElement("span",{style:{marginLeft:"10px",width:"40px",lineHeight:"32px"}},"\u5206\u949F"))),_.a.createElement(t.a.Item,{label:"\u96BE\u5EA6\uFF1A",name:"difficulty",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u96BE\u5EA6"}]},_.a.createElement(u.a.Group,null,_.a.createElement(u.a.Button,{value:1},"\u7B80\u5355"),_.a.createElement(u.a.Button,{value:2},"\u9002\u4E2D"),_.a.createElement(u.a.Button,{value:3},"\u56F0\u96BE"))),_.a.createElement(t.a.Item,{label:"\u8BD5\u5377\u987B\u77E5\uFF1A",name:"exercise_description"},_.a.createElement(M.a.TextArea,{rows:6,maxLength:300,placeholder:"\u8BF7\u5728\u6B64\u8F93\u5165\u672C\u6B21\u8BD5\u5377\u7B54\u9898\u7684\u76F8\u5173\u8BF4\u660E\uFF0C\u6700\u5927\u9650\u5236300\u4E2A\u5B57\u7B26"})))),_.a.createElement("div",{className:["mt20","pb20","pt20"].join(" ")},_.a.createElement(h.a,{style:{marginRight:"5px"},onClick:function(){c.c.push("/classrooms/".concat(r.coursesId,"/exercise"))}},"\u53D6\u6D88"),_.a.createElement(h.a,{onClick:Object(j.a)(f.a.mark(function C(){var n,W,U,Q,T,i,O;return f.a.wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,D.validateFields();case 2:return n=D.getFieldValue(),W=n.courseid,U=Object(v.a)(W,2),Q=U[0],T=U[1],n.sub_discipline_id=T,n.is_md=!0,l.next=9,A({type:"exercise/addExercise",payload:Object(y.a)(Object(y.a)({},n),r)});case 9:i=l.sent,i.status===0?c.c.push("/classrooms/".concat(r.coursesId,"/exercise/").concat((O=i.data)===null||O===void 0?void 0:O.exercise_id,"/edit")):F.b.error(i.message);case 11:case"end":return l.stop()}},C)})),type:"primary",style:{marginLeft:"5px"}},"\u786E\u5B9A")))};d.default=Object(c.a)(function(s){var a=s.classroomList,o=s.loading,L=s.user,x=s.problemset,p=s.globalSetting;return{classroomList:a,globalSetting:p,problemset:x,user:L,loading:o.effects}})(V)},Hkc5:function(R,d,e){R.exports={flex_box_center:"flex_box_center___3KwMu",flex_space_between:"flex_space_between___1akH8",flex_box_vertical_center:"flex_box_vertical_center___7Jz-q",flex_box_center_end:"flex_box_center_end___3NYWv",flex_box_column:"flex_box_column___2ztEc",bg:"bg___1FDUF",title:"title___SV-0k",titleLeft:"titleLeft___2739d",titleRight:"titleRight___3sqsq",formWrap:"formWrap___1_b9c"}}}]);
