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.7 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([[1482],{35158:function(e,t,n){n.r(t),n.d(t,{default:function(){return S}});var i=n(10574),l=n.n(i),r=n(26801),s=n.n(r),a=n(39343),c=n.n(a),o=n(11006),d=n.n(o),u=n(27161),p=n.n(u),_=n(59301),x=n(22387),h=n(22211),m=n(20834),f=n(44e3),j=n(78241),g=n(8591),v=n(66104),b=n(95237),Z=n(43604),y=n(57809),I=n(1056),w=n(28103),k=n(19842),z=n(3113),L=n(3567),N={flex_box_center:"flex_box_center___oUI48",flex_space_between:"flex_space_between___ygvRP",flex_box_vertical_center:"flex_box_vertical_center___eHXbG",flex_box_center_end:"flex_box_center_end___VqFf6",flex_box_column:"flex_box_column___VdaxG",bg:"bg___AuzLD",title:"title___ig1Ym",titleLeft:"titleLeft___HQ0Kv",titleRight:"titleRight___gvlMr",btns:"btns___vjaR0"},F=n(37712),O=["graduation","globalSetting","loading","user","dispatch"],S=(m.Z.SubMenu,f.Z.Content,f.Z.Sider,(0,h.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,r,a,o,u,m,f=e.graduation,S=(e.globalSetting,e.loading,e.user),V=e.dispatch,P=(p()(e,O),(0,h.useParams)()),q=((0,h.useLocation)(),S.userInfo),C=j.Z.useForm(),D=d()(C,1)[0],R=f.editTopicData,T=function(){var e=c()(l()().mark((function e(){var t,n,i;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=D.getFieldsValue(),(n=s()({},t)).city&&(n.province=n.city[0],n.city=n.city[1]),e.next=5,V({type:"graduation/editTopic",payload:{categoryId:P.categoryId,coursesId:P.coursesId,attachment_ids:[],graduation_topic:n}});case 5:(i=e.sent).status?g.ZP.error(i.message):h.history.push("/classrooms/".concat(P.coursesId,"/graduation_topics/").concat(R.left_banner_id));case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,_.useEffect)((function(){function e(){return(e=c()(l()().mark((function e(){var t,n;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,V({type:"graduation/editTopicDefaultData",payload:s()({},P)});case 2:t=e.sent,(n=s()({},t.selected_data)).city=[n.province,n.city],D.setFieldsValue(n);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}!function(){e.apply(this,arguments)}()}),[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:q&&(0,F.jsxs)(v.Z,{separator:">",children:[(0,F.jsx)(v.Z.Item,{children:(0,F.jsx)(h.Link,{to:"".concat(q.first_category_url),children:null==q||null===(t=q.course)||void 0===t?void 0:t.course_name})}),(0,F.jsx)(v.Z.Item,{children:(0,F.jsx)(h.Link,{to:"/classrooms/".concat(P.coursesId,"/graduation_topics/").concat(R.left_banner_id),children:"毕设选题"})}),(0,F.jsx)(v.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)(Z.Z,{flex:"1",children:(0,F.jsx)("strong",{className:"font20 ml5",children:"编辑毕设选题"})}),(0,F.jsx)(Z.Z,{children:(0,F.jsx)(h.Link,{className:"font16 c-light-black",to:"/classrooms/".concat(P.coursesId,"/graduation_topics/").concat(R.left_banner_id),children:"返回"})})]})})]}),(0,F.jsx)("section",{className:[N.bg,"pt30","pl30","pr30","pb30","mt20"].join(" "),children:(0,F.jsxs)(j.Z,{layout:"vertical",form:D,scrollToFirstError:!0,initialValues:null==R?void 0:R.selected_data,onFinish:function(){var e=c()(l()().mark((function e(t){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:T();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.default,{size:"middle",placeholder:"请选择指导老师",style:{width:200},children:null===(n=R.teacher_list)||void 0===n?void 0:n.map((function(e,t){return(0,F.jsx)(y.default.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)(x.Z,{watch:!0,defaultValue:null===(i=R.selected_data)||void 0===i?void 0:i.description,placeholder:"请简要说明选题内容最大限制5000个字符"})}),(0,F.jsxs)(b.Z,{gutter:[20,0],children:[(0,F.jsx)(Z.Z,{flex:"1",children:(0,F.jsx)(j.Z.Item,{name:"topic_type",children:(0,F.jsx)(y.default,{size:"middle",placeholder:"请选择选题类型",children:null===(r=R.topic_type)||void 0===r?void 0:r.map((function(e,t){return(0,F.jsx)(y.default.Option,{value:e.id,children:e.name},t)}))})})}),(0,F.jsx)(Z.Z,{flex:"1",children:(0,F.jsx)(j.Z.Item,{name:"topic_source",children:(0,F.jsx)(y.default,{size:"middle",placeholder:"请选择选题来源",children:null===(a=R.topic_source)||void 0===a?void 0:a.map((function(e,t){return(0,F.jsx)(y.default.Option,{value:e.id,children:e.name},t)}))})})}),(0,F.jsx)(Z.Z,{flex:"1",children:(0,F.jsx)(j.Z.Item,{name:"topic_property_first",children:(0,F.jsx)(y.default,{size:"middle",placeholder:"请选择选题性质1",children:null===(o=R.topic_property_first)||void 0===o?void 0:o.map((function(e,t){return(0,F.jsx)(y.default.Option,{value:e.id,children:e.name},t)}))})})}),(0,F.jsx)(Z.Z,{flex:"1",children:(0,F.jsx)(j.Z.Item,{name:"topic_property_second",children:(0,F.jsx)(y.default,{size:"middle",placeholder:"请选择选题性质2",children:null===(u=R.topic_property_second)||void 0===u?void 0:u.map((function(e,t){return(0,F.jsx)(y.default.Option,{value:e.id,children:e.name},t)}))})})}),(0,F.jsx)(Z.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.default,{size:"middle",placeholder:"请选择重复情况",style:{width:200},children:null===(m=R.topic_repeat)||void 0===m?void 0:m.map((function(e,t){return(0,F.jsx)(y.default.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(){D.submit()},children:"保存"}),(0,F.jsx)(h.Link,{to:"/classrooms/".concat(P.coursesId,"/graduation_topics/").concat(P.categoryId),children:"取消"})]})]})})))}}]);