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

1 line
8.9 KiB

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[31962],{87169:function(e,n,t){t.d(n,{Z:function(){return o}});var a=t(67711),s=t(59301),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"},i=t(7657),c=function(e,n){return s.createElement(i.Z,(0,a.Z)({},e,{ref:n,icon:r}))};var o=s.forwardRef(c)},62772:function(e,n,t){t.d(n,{Z:function(){return o}});var a=t(67711),s=t(59301),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},i=t(7657),c=function(e,n){return s.createElement(i.Z,(0,a.Z)({},e,{ref:n,icon:r}))};var o=s.forwardRef(c)},37087:function(e,n,t){t.r(n);var a=t(7557),s=t.n(a),r=t(82242),i=t.n(r),c=t(41498),o=t.n(c),l=t(79800),u=t.n(l),d=t(59301),p=t(49389),f=t(24905),_=t(78241),h=t(3113),x=t(1710),m=t(43418),v=t(8591),g=t(58421),j=t(57809),y=t(62772),b=t(87169),Z=t(94171),k=t(91007),w=t(32637),z=t(37712);f.Z.Group;n.default=(0,p.connect)((function(e){var n=e.classroomList,t=e.loading,a=e.globalSetting,s=e.user;return{classroomList:n,globalSetting:a,loading:t.effects,user:s}}))((function(e){e.classroomList,e.loading;var n,t,a,r,c,l,f=e.user,P=(e.dispatch,(0,d.useState)([])),C=u()(P,2),q=C[0],I=C[1],S=(0,d.useState)({zydatas:[],jbdatas:[],kcdatas:[],page:1,per_page:20}),O=u()(S,2),E=O[0],A=O[1],F=(0,p.useParams)(),L=(0,d.useState)(!1),M=u()(L,2),N=M[0],V=M[1],R=(0,d.useState)(!1),T=u()(R,2),B=T[0],G=T[1],D=_.Z.useForm(),H=u()(D,1)[0],Q=(0,d.useState)(!1),Y=u()(Q,2),J=Y[0],K=Y[1];function U(){return W.apply(this,arguments)}function W(){return(W=o()(s()().mark((function e(){var n;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Z.ZP)("/api/courses/ecs_courses.json",{method:"get",params:{id:null==F?void 0:F.coursesId}});case 2:n=e.sent,I(n);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function X(){return(X=o()(s()().mark((function e(){var n,t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Z.ZP)("/api/schools/".concat(null==f||null===(n=f.userInfo)||void 0===n||null===(n=n.course)||void 0===n?void 0:n.course_school_id,"/ec_majors/get_major_list.json"),{method:"get"});case 2:t=e.sent,E.zydatas=null==t?void 0:t.data,A(i()({},E));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function $(){return($=o()(s()().mark((function e(n){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Z.ZP)("/api/ec_major_schools/".concat(n,"/ec_years/get_year_list.json"),{method:"get"});case 2:t=e.sent,E.jbdatas=null==t?void 0:t.data,A(i()({},E));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ee(){return(ee=o()(s()().mark((function e(n){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Z.ZP)("/api/ec_years/".concat(n,"/ec_courses/get_courses.json"),{method:"get"});case 2:t=e.sent,E.kcdatas=null==t?void 0:t.data,A(i()({},E));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return(0,d.useEffect)((function(){U()}),[]),(0,z.jsxs)("div",{className:k.Z.content,children:[(0,z.jsxs)("div",{className:k.Z.header,children:[(0,z.jsx)("span",{className:k.Z.span,children:"关联工程认证课程"}),(0,z.jsx)(h.ZP,{type:"primary",onClick:function(){E.zydatas=[],E.jbdatas=[],E.kcdatas=[],H.setFieldsValue({zy:"",jb:"",ec_course_id:""}),A(i()({},E)),null!=q&&q.have_data?V(!0):K(!0),function(){X.apply(this,arguments)}()},icon:(0,z.jsx)(y.Z,{}),children:"添加关联"})]}),(0,z.jsx)(x.Z,{dataSource:q.data,pagination:!1,columns:[{title:"序号",dataIndex:"filename",key:"filename",render:function(e,n,t){return E.per_page*(E.page-1)+t+1}},{title:"认证专业",dataIndex:"pro_name",ellipsis:!0,width:"30%",key:"pro_name"},{title:"认证届别",dataIndex:"year",ellipsis:!0,width:"10%",key:"year"},{title:"关联课程",dataIndex:"course_name",ellipsis:!0,width:"30%",key:"course_name"},{title:"操作",dataIndex:"id",ellipsis:!0,width:"20%",key:"id",render:function(e,n){return(0,z.jsxs)("div",{children:[(0,z.jsx)("a",{href:"/classrooms/".concat(null==F?void 0:F.coursesId,"/engineering/datail?kc=").concat(null==n?void 0:n.ec_course_id),style:{marginRight:20},children:"查看详情"}),(0,z.jsx)("a",{onClick:function(){var n;m.Z.confirm({title:"提示",content:"你确定要取消关联吗",okText:"确认",cancelText:"取消",onOk:(n=o()(s()().mark((function n(){return s()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,Z.ZP)("/api/courses/delete_ecs_course.json",{method:"DELETE",body:{ec_course_id:e}});case 2:0===n.sent.status&&(v.ZP.info("取消成功"),U());case 4:case"end":return n.stop()}}),n)}))),function(){return n.apply(this,arguments)})})},children:"取消关联"})]})}}]}),(0,z.jsx)(g.Z,{style:{textAlign:"center",marginTop:20},current:E.page,showSizeChanger:!1,total:null==q?void 0:q.count,pageSize:20,hideOnSinglePage:!0,onChange:function(e){E.page=e,A(i()({},E)),U()}}),(0,z.jsxs)(m.Z,{title:"关联工程认证课程",centered:!0,width:566,open:J,footer:null,onCancel:function(){K(!1)},children:[(0,z.jsx)("p",{children:"教学课堂所属单位未开设工程认证课程,无法进行关联操作!"}),(0,z.jsx)("p",{children:"解决办法:"}),(0,z.jsx)("p",{children:"1.需要该单位的认证工作团队人员,先在工程认证模块添加培养方案以及课程; "}),(0,z.jsx)("p",{children:"2.联系平台教研助理,协助解决。"}),(0,z.jsx)("div",{style:{textAlign:"center"},children:(0,z.jsx)("img",{style:{width:192},src:w})}),(0,z.jsxs)("div",{style:{textAlign:"end"},children:[(0,z.jsx)(h.ZP,{type:"primary",onClick:function(){K(!1)},children:"知道了"})," "]})]}),(0,z.jsxs)(m.Z,{title:"关联工程认证课程",open:N,centered:!0,onOk:function(){H.submit()},okButtonProps:{loading:B},onCancel:function(){V(!1)},children:[(0,z.jsxs)("p",{style:{color:"#FA6400",fontSize:"14px"},children:[(0,z.jsx)(b.Z,{})," 教学课堂所属单位开设了工程认证课程,才能进行添加关联操作!"]}),(0,z.jsxs)(_.Z,{labelCol:{span:4},wrapperCol:{span:20},form:H,onValuesChange:function(e){console.log("----",e),e.zy&&function(e){$.apply(this,arguments)}(e.zy),e.jb&&function(e){ee.apply(this,arguments)}(e.jb)},onFinish:function(){var e=o()(s()().mark((function e(n){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return G(!0),e.next=3,(0,Z.ZP)("/api/courses/create_ecs_course.json",{method:"post",body:{id:null==F?void 0:F.coursesId,ec_course_id:n.ec_course_id}});case 3:t=e.sent,G(!1),0===t.status&&(v.ZP.info("关联成功"),U(),H.setFieldsValue({zy:"",jb:"",ec_course_id:""}),V(!1));case 6:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:[(0,z.jsx)(_.Z.Item,{label:"认证专业",name:"zy",rules:[{required:!0,message:"请选择认证专业"}],children:(0,z.jsx)(j.default,{disabled:(null===(n=E.zydatas)||void 0===n?void 0:n.length)<=0,placeholder:"请选择认证专业",children:null==E||null===(t=E.zydatas)||void 0===t?void 0:t.map((function(e,n){return(0,z.jsx)(j.default.Option,{value:null==e?void 0:e.ec_major_school_id,children:null==e?void 0:e.name},n)}))})}),(0,z.jsx)(_.Z.Item,{label:"认证届别",name:"jb",rules:[{required:!0,message:"请选择认证届别"}],children:(0,z.jsx)(j.default,{disabled:(null===(a=E.jbdatas)||void 0===a?void 0:a.length)<=0,placeholder:"请选择认证届别",children:null==E||null===(r=E.jbdatas)||void 0===r?void 0:r.map((function(e,n){return(0,z.jsx)(j.default.Option,{value:null==e?void 0:e.ec_year_id,children:null==e?void 0:e.year},n)}))})}),(0,z.jsx)(_.Z.Item,{label:"关联课程",name:"ec_course_id",rules:[{required:!0,message:"请选择关联课程"}],children:(0,z.jsx)(j.default,{disabled:(null===(c=E.kcdatas)||void 0===c?void 0:c.length)<=0,placeholder:"请选择关联课程",children:null==E||null===(l=E.kcdatas)||void 0===l?void 0:l.map((function(e,n){return(0,z.jsx)(j.default.Option,{value:null==e?void 0:e.id,children:null==e?void 0:e.name},n)}))})})]})]})]})}))},91007:function(e,n){n.Z={flex_box_center:"flex_box_center___auROP",flex_space_between:"flex_space_between___zffiE",flex_box_vertical_center:"flex_box_vertical_center___wyNpY",flex_box_center_end:"flex_box_center_end___m_Isr",flex_box_column:"flex_box_column___b27kO",content:"content___QuZGt",header:"header___Lgq9g",span:"span___aqN0x",title:"title___fcmlM",textone:"textone___AoPbl"}},32637:function(e,n,t){e.exports=t.p+"static/AssistantCode3.a8740efb.jpeg"}}]);