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
4.2 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([[74795],{69185:function(e,s,t){t.r(s),t.d(s,{default:function(){return N}});var n=t(17061),r=t.n(n),a=t(42122),c=t.n(a),i=t(17156),l=t.n(i),o=t(27424),d=t.n(o),u=t(67294),_=t(55373),x=t(88275),h=t(91773),m=t(2453),f=t(85673),p=t(71230),j=t(15746),g=t(96101),b=t(11486),Z=t(96074),I=t(71577),v={flex_box_center:"flex_box_center___xV7b6",flex_space_between:"flex_space_between___VKhsb",flex_box_vertical_center:"flex_box_vertical_center___ZeNry",flex_box_center_end:"flex_box_center_end___j462S",flex_box_column:"flex_box_column___zDUss",bg:"bg___I9Ce6",title:"title___N0IDa",titleLeft:"titleLeft___v14y3",titleRight:"titleRight___QkPDR",btns:"btns___QGvIi"},k=t(34282),y=t(64768),w=t(85893),N=(0,x.connect)((function(e){var s=e.graduation,t=e.loading,n=e.user;return{graduation:s,globalSetting:e.globalSetting,user:n,loading:t.effects}}))((function(e){var s,t=e.graduation,n=(e.globalSetting,e.loading,e.user),a=e.dispatch,i=(0,x.useParams)(),o=((0,x.useLocation)(),n.userInfo),N=h.Z.useForm(),L=d()(N,1)[0],D=(t.addTopicData,function(){var e=l()(r()().mark((function e(){var s,t,n,a;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=L.getFieldsValue(),null!=(t=c()({},s))&&t.attachment_ids&&(t.attachment_ids=null===(n=t.attachment_ids)||void 0===n?void 0:n.map((function(e){return e.id||e.response.id}))),e.next=5,(0,k.Sv)(c()({coursesId:i.coursesId,attachment_ids:[]},t));case 5:(a=e.sent).status?m.ZP.error(a.message):x.history.push("/classrooms/".concat(i.coursesId,"/graduation_tasks/").concat(i.categoryId));case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}());return(0,u.useEffect)((function(){a({type:"graduation/addTopicDefaultData",payload:c()({},i)})}),[i.coursesId]),(0,w.jsxs)("section",{className:"edu-container",children:[(0,w.jsxs)("section",{className:"animated fadeIn",children:[(0,w.jsx)("aside",{className:"mt10",children:o&&(0,w.jsxs)(f.Z,{separator:">",children:[(0,w.jsx)(f.Z.Item,{children:(0,w.jsx)(x.Link,{to:"".concat(o.first_category_url),children:null==o||null===(s=o.course)||void 0===s?void 0:s.course_name})}),(0,w.jsx)(f.Z.Item,{children:(0,w.jsx)(x.Link,{to:"/classrooms/".concat(i.coursesId,"/graduation_tasks/").concat(i.categoryId),children:"毕设任务"})}),(0,w.jsx)(f.Z.Item,{children:"新建"})]})}),(0,w.jsx)("aside",{className:[v.title,"mt20"].join(" "),children:(0,w.jsxs)(p.Z,{style:{width:"100%"},children:[(0,w.jsx)(j.Z,{flex:"1",children:(0,w.jsx)("strong",{className:"font20 ml5",children:"新建毕设任务"})}),(0,w.jsx)(j.Z,{children:(0,w.jsx)(x.Link,{className:"font16 c-light-black",to:"/classrooms/".concat(i.coursesId,"/exercise"),children:"返回"})})]})})]}),(0,w.jsx)("section",{className:[v.bg,"pt30","pl30","pr30","pb30","mt20"].join(" "),children:(0,w.jsxs)(h.Z,{layout:"vertical",form:L,scrollToFirstError:!0,onFinish:function(){var e=l()(r()().mark((function e(s){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:D();case 1:case"end":return e.stop()}}),e)})));return function(s){return e.apply(this,arguments)}}(),children:[(0,w.jsx)(h.Z.Item,{name:"task_type",label:"类型:",rules:[{required:!0,message:"请选择任务类型"}],children:(0,w.jsxs)(g.Z,{size:"middle",placeholder:"请选择任务类型",style:{width:200},children:[(0,w.jsx)(g.Z.Option,{value:1,children:"普通"}),(0,w.jsx)(g.Z.Option,{value:2,children:"分组"})]})}),(0,w.jsx)(h.Z.Item,{name:"name",label:"选题名称:",rules:[{required:!0,message:"请输入任务标题"}],children:(0,w.jsx)(b.Z,{maxLength:60,size:"middle",suffix:"0/60",placeholder:"任务标题最大限制60个字符"})}),(0,w.jsx)(Z.Z,{}),(0,w.jsx)(h.Z.Item,{label:"内容",name:"description",rules:[{required:!0,message:"请输入内容"}],children:(0,w.jsx)(_.Z,{watch:!0,placeholder:"请任务内容说明最大限制5000个字符"})}),(0,w.jsx)(p.Z,{children:(0,w.jsx)(j.Z,{children:(0,w.jsx)(h.Z.Item,{name:"attachment_ids",children:(0,w.jsx)(y.Z,{})})})})]})}),(0,w.jsxs)("aside",{className:v.btns,children:[(0,w.jsx)(I.ZP,{type:"primary",onClick:function(){L.submit()},children:"保存"}),(0,w.jsx)(x.Link,{to:"/classrooms/".concat(i.coursesId,"/graduation_tasks/").concat(i.categoryId),children:"取消"})]})]})}))}}]);