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

1 line
6.1 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3317],{40199:function(e,t,n){n.r(t),n.d(t,{default:function(){return S}});var i=n(17061),r=n.n(i),s=n(42122),l=n.n(s),c=n(17156),a=n.n(c),o=n(27424),d=n.n(o),u=n(70215),x=n.n(u),p=n(67294),h=n(55373),_=n(88275),m=n(68508),f=n(97183),j=n(91773),Z=n(2453),g=n(85673),b=n(71230),v=n(15746),y=n(96101),I=n(11486),w=n(96074),k=n(40068),z=n(71577),L=n(12325),N={flex_box_center:"flex_box_center___JefHi",flex_space_between:"flex_space_between___N1h0l",flex_box_vertical_center:"flex_box_vertical_center___Mtb4t",flex_box_center_end:"flex_box_center_end___F6G6K",flex_box_column:"flex_box_column___JldFX",bg:"bg___Hgook",title:"title____XaYs",titleLeft:"titleLeft___xe0PB",titleRight:"titleRight___wML5g",btns:"btns___l22_n"},F=n(85893),O=["graduation","globalSetting","loading","user","dispatch"],S=(m.Z.SubMenu,f.Z.Content,f.Z.Sider,(0,_.connect)((function(e){var t=e.graduation,n=e.loading,i=e.user;return{graduation:t,globalSetting:e.globalSetting,user:i,loading:n.effects}}))((function(e){var t,n,i,s,c,o,u,m=e.graduation,f=(e.globalSetting,e.loading,e.user),S=e.dispatch,P=(x()(e,O),(0,_.useParams)()),C=((0,_.useLocation)(),f.userInfo),T=j.Z.useForm(),q=d()(T,1)[0],D=m.addTopicData,M=function(){var e=a()(r()().mark((function e(){var t,n,i;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=q.getFieldsValue(),(n=l()({},t)).city&&(n.province=n.city[0],n.city=n.city[1]),e.next=5,S({type:"graduation/addTopic",payload:{coursesId:P.coursesId,attachment_ids:[],graduation_topic:n}});case 5:(i=e.sent).status?Z.ZP.error(i.message):_.history.push("/classrooms/".concat(P.coursesId,"/graduation_topics/").concat(P.categoryId));case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,p.useEffect)((function(){S({type:"graduation/addTopicDefaultData",payload:l()({},P)})}),[P.coursesId]),(0,F.jsxs)("section",{className:"edu-container",children:[(0,F.jsxs)("section",{className:"animated fadeIn",children:[(0,F.jsx)("aside",{className:"mt10",children:C&&(0,F.jsxs)(g.Z,{separator:">",children:[(0,F.jsx)(g.Z.Item,{children:(0,F.jsx)(_.Link,{to:"".concat(C.first_category_url),children:null==C||null===(t=C.course)||void 0===t?void 0:t.course_name})}),(0,F.jsx)(g.Z.Item,{children:(0,F.jsx)(_.Link,{to:"/classrooms/".concat(P.coursesId,"/graduation_topics/").concat(P.categoryId),children:"毕设选题"})}),(0,F.jsx)(g.Z.Item,{children:"新建"})]})}),(0,F.jsx)("aside",{className:[N.title,"mt20"].join(" "),children:(0,F.jsxs)(b.Z,{style:{width:"100%"},children:[(0,F.jsx)(v.Z,{flex:"1",children:(0,F.jsx)("strong",{className:"font20 ml5",children:"新建毕设选题"})}),(0,F.jsx)(v.Z,{children:(0,F.jsx)(_.Link,{className:"font16 c-light-black",to:"/classrooms/".concat(P.coursesId,"/exercise"),children:"返回"})})]})})]}),(0,F.jsx)("section",{className:[N.bg,"pt30","pl30","pr30","pb30","mt20"].join(" "),children:(0,F.jsxs)(j.Z,{layout:"vertical",form:q,scrollToFirstError:!0,onFinish:function(){var e=a()(r()().mark((function e(t){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:M();case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),children:[(0,F.jsx)(j.Z.Item,{name:"tea_id",label:"指导老师:",rules:[{required:!0,message:"请选择指导老师"}],children:(0,F.jsx)(y.Z,{size:"middle",placeholder:"请选择指导老师",style:{width:200},children:null===(n=D.teacher_list)||void 0===n?void 0:n.map((function(e,t){return(0,F.jsx)(y.Z.Option,{value:e.id,children:e.name},t)}))})}),(0,F.jsx)(j.Z.Item,{name:"name",label:"选题名称:",rules:[{required:!0,message:"请填写试卷标题"}],children:(0,F.jsx)(I.Z,{maxLength:60,size:"middle",placeholder:"试卷标题最大限制60个字符"})}),(0,F.jsx)(w.Z,{}),(0,F.jsx)(j.Z.Item,{label:"选题简介",name:"description",rules:[{required:!0,message:"请输入内容"}],children:(0,F.jsx)(h.Z,{watch:!0,placeholder:"请简要说明选题内容最大限制5000个字符"})}),(0,F.jsxs)(b.Z,{gutter:[20,0],children:[(0,F.jsx)(v.Z,{flex:"1",children:(0,F.jsx)(j.Z.Item,{name:"topic_type",children:(0,F.jsx)(y.Z,{size:"middle",placeholder:"请选择选题类型",children:null===(i=D.topic_type)||void 0===i?void 0:i.map((function(e,t){return(0,F.jsx)(y.Z.Option,{value:e.id,children:e.name},t)}))})})}),(0,F.jsx)(v.Z,{flex:"1",children:(0,F.jsx)(j.Z.Item,{name:"topic_source",children:(0,F.jsx)(y.Z,{size:"middle",placeholder:"请选择选题来源",children:null===(s=D.topic_source)||void 0===s?void 0:s.map((function(e,t){return(0,F.jsx)(y.Z.Option,{value:e.id,children:e.name},t)}))})})}),(0,F.jsx)(v.Z,{flex:"1",children:(0,F.jsx)(j.Z.Item,{name:"topic_property_first",children:(0,F.jsx)(y.Z,{size:"middle",placeholder:"请选择选题性质1",children:null===(c=D.topic_property_first)||void 0===c?void 0:c.map((function(e,t){return(0,F.jsx)(y.Z.Option,{value:e.id,children:e.name},t)}))})})}),(0,F.jsx)(v.Z,{flex:"1",children:(0,F.jsx)(j.Z.Item,{name:"topic_property_second",children:(0,F.jsx)(y.Z,{size:"middle",placeholder:"请选择选题性质2",children:null===(o=D.topic_property_second)||void 0===o?void 0:o.map((function(e,t){return(0,F.jsx)(y.Z.Option,{value:e.id,children:e.name},t)}))})})}),(0,F.jsx)(v.Z,{flex:"150px"})]}),(0,F.jsx)(w.Z,{}),(0,F.jsx)(j.Z.Item,{name:"source_unit",label:"选题来源单位:",children:(0,F.jsx)(I.Z,{width:"200",size:"middle",style:{width:200},placeholder:"请填写来源单位"})}),(0,F.jsx)(j.Z.Item,{name:"topic_repeat",label:"选题重复情况:",children:(0,F.jsx)(y.Z,{size:"middle",placeholder:"请选择重复情况",style:{width:200},children:null===(u=D.topic_repeat)||void 0===u?void 0:u.map((function(e,t){return(0,F.jsx)(y.Z.Option,{value:e.id,children:e.name},t)}))})}),(0,F.jsx)(j.Z.Item,{name:"city",label:"调研或实习地点:",children:(0,F.jsx)(k.Z,{size:"middle",style:{width:200},options:L.P,placeholder:"请选择所在地"})})]})}),(0,F.jsxs)("aside",{className:N.btns,children:[(0,F.jsx)(z.ZP,{type:"primary",onClick:function(){q.submit()},children:"保存"}),(0,F.jsx)(_.Link,{to:"/classrooms/".concat(P.coursesId,"/graduation_topics/").concat(P.categoryId),children:"取消"})]})]})})))}}]);