|
|
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[37948],{94077:function(e,n,t){t.r(n),t.d(n,{default:function(){return I}});var a=t(82242),s=t.n(a),l=t(7557),r=t.n(l),i=t(41498),o=t.n(i),c=t(79800),d=t.n(c),u=t(39647),p=t.n(u),f=t(59301),x=t(33936),h=t(95237),_=t(8591),g=t(51945),m=t(43418),j=t(67444),y="wrap___UkIuX",v=t(61186),w=t.n(v),k=t(11249),S=t(65850),b=t(53070),Z=t(37712),C=["classroomList","globalSetting","loading","user","dispatch"];w().locale("ZH-cn");var I=(0,x.connect)((function(e){var n=e.classroomList,t=e.loading,a=e.globalSetting,s=e.user;return{classroomList:n,globalSetting:a,loading:t.models.classroomList,user:s}}))((function(e){e.classroomList,e.globalSetting,e.loading,e.user,e.dispatch,p()(e,C);var n,t,a=(0,f.useState)(),l=d()(a,2),i=l[0],c=l[1],u=(0,f.useState)(1),v=d()(u,2),w=v[0],I=v[1],z=(0,f.useState)(!0),N=d()(z,2),L=N[0],F=N[1],W=(0,f.useState)(20),P=d()(W,2),V=P[0],G=(P[1],(0,f.useState)(!1)),E=d()(G,2),B=E[0],D=E[1],q=(0,f.useState)(""),H=d()(q,2),M=H[0],O=H[1],T=(0,f.useState)([]),A=d()(T,2),U=A[0],X=A[1],J=(0,f.useState)(!1),K=d()(J,2),Q=K[0],R=K[1],Y=(0,x.useParams)(),$=(0,f.useState)([]),ee=d()($,2),ne=ee[0],te=ee[1];function ae(){return ae=o()(r()().mark((function e(n){var t,a;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return F(!0),t=n||w,e.next=4,(0,j.ZP)("/api/student_groups.json",{method:"get",params:{page:t,limit:V,keyword:M||""}});case 4:a=e.sent,c(a),F(!1);case 7:case"end":return e.stop()}}),e)}))),ae.apply(this,arguments)}function se(){return le.apply(this,arguments)}function le(){return(le=o()(r()().mark((function e(){var n;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,j.ZP)("/api/group_audit_records.json",{method:"get",params:{page:1,limit:1e4}});case 2:n=e.sent,X(n);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}(0,f.useEffect)((function(){!function(e){ae.apply(this,arguments)}()}),[w,M]);var re=[{title:"序号",dataIndex:"index",align:"left",key:"name",ellipsis:!0,width:50,render:function(e,n,t){return(0,Z.jsx)("span",{children:e})}},{title:"学院",dataIndex:"department_name",align:"left",key:"content",render:function(e){return(0,Z.jsx)("span",{style:{fontWeight:500},children:e})}},{title:"班级名称",dataIndex:"name",align:"left",key:"clazz"},{title:"学生成员",dataIndex:"student_count",align:"left",key:"created_at",render:function(e){return(0,Z.jsx)("span",{className:"c-grey-666",children:e})}},{title:"授课老师",dataIndex:"teacher_names",align:"left",key:"created_at",render:function(e){return(0,Z.jsx)("span",{className:"c-grey-666",children:e})}},{title:"操作",dataIndex:"id",align:"right",key:"remark",width:150,ellipsis:!0,render:function(e,n,t){return(0,Z.jsx)(h.Z,{align:"middle",justify:"end",children:(0,Z.jsx)(x.Link,{to:"/users/".concat(Y.username,"/classmanagement/").concat(e,"?department_name=").concat(n.department_name),children:"查看"})})}}],ie=[{title:"申请内容",dataIndex:"content",align:"left",key:"name",ellipsis:!0,width:200,render:function(e,n,t){return(0,Z.jsx)("span",{children:e})}},{title:"审核状态",dataIndex:"status",align:"left",key:"content",render:function(e){return(0,Z.jsx)("span",{style:{fontWeight:500},children:0===e?"待审核":"已审核"})}},{title:"审核结果",dataIndex:"status",align:"left",key:"clazz",render:function(e){return(0,Z.jsxs)("span",{style:{fontWeight:500},children:[1===e&&"通过",2===e&&"拒绝",e<1&&"- -"]})}},{title:"理由",dataIndex:"reason",align:"left",key:"created_at",render:function(e){return(0,Z.jsx)("span",{className:"c-grey-666",title:e,children:e.legnth<6?e:e.substr(0,6)+"..."||0})}},{title:"操作",dataIndex:"status",align:"right",key:"remark",width:50,ellipsis:!0,render:function(e,n,t){return(0,Z.jsx)(h.Z,{align:"middle",justify:"end",children:e<1?(0,Z.jsx)("a",{style:{color:"#165DFF"},onClick:o()(r()().mark((function e(){var t;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,j.ZP)("/api/group_audit_records/".concat(null==n?void 0:n.id,".json"),{method:"DELETE"});case 2:0===(null==(t=e.sent)?void 0:t.status)&&_.ZP.info("撤销成功"),se();case 5:case"end":return e.stop()}}),e)}))),children:"撤销"}):(0,Z.jsx)("a",{style:{color:"#165DFF"},onClick:function(){R(!0),D(!1),te(n)},children:"查看"})})}}],oe=[{title:"学号",dataIndex:"student_id",align:"left",key:"name",ellipsis:!0,width:200,render:function(e,n,t){return(0,Z.jsx)("span",{children:e||"- -"})}},{title:"姓名",dataIndex:"name",align:"left",key:"content",render:function(e){return(0,Z.jsx)("span",{style:{fontWeight:500},children:e})}},{title:"班级",dataIndex:"group_name",align:"left",key:"clazz",render:function(e){return(0,Z.jsx)("span",{style:{fontWeight:500},children:e||"- -"})}},{title:"院系",dataIndex:"department",align:"left",key:"created_at",render:function(e){return(0,Z.jsx)("span",{className:"c-grey-666",children:e||"- -"})}},{title:"负责教师",dataIndex:"teachers",align:"left",key:"remark",width:150,ellipsis:!0,render:function(e){return(0,Z.jsx)("span",{className:"c-grey-666",children:e||"- -"})}}];return(0,Z.jsxs)("div",{className:y,children:[(0,Z.jsxs)(h.Z,{justify:"space-between",align:"middle",style:{marginBottom:"36px"},className:"mt8",children:[(0,Z.jsxs)("span",{style:{fontSize:"14px"},children:[(0,Z.jsxs)("span",{style:{color:"#5F6368"},children:["共",(0,Z.jsx)("span",{style:{color:"#1869FF"},children:null==i?void 0:i.total_count}),"个班级"]}),(0,Z.jsxs)("span",{onClick:function(){D(!0),se()},style:{marginLeft:30,color:"#5F6368",cursor:"pointer"},children:["我的申请(",null==i?void 0:i.audit_count,")"]})]}),(0,Z.jsx)("span",{style:{display:"flex"},children:(0,Z.jsx)(k.t7,{style:{width:300,marginLeft:20},onChange:function(e){O(e)},placeholder:"请输入分班名称搜索"})})]}),(null==i||null===(n=i.student_groups)||void 0===n?void 0:n.length)<=0&&(0,Z.jsx)(b.Z,{customText:"您还未被分配班级,请联系管理员分配需要管理的班级"}),(null==i||null===(t=i.student_groups)||void 0===t?void 0:t.length)>0&&(0,Z.jsx)(k.Gi,{children:(0,Z.jsx)(g.Z,{columns:re,loading:L,dataSource:null==i?void 0:i.student_groups,pagination:{hideOnSinglePage:!0,pageSize:V,showSizeChanger:!1,current:w,position:["bottomCenter"],onChange:function(e,n){I(e)},total:null==i?void 0:i.total_count}})}),(0,Z.jsx)(m.Z,{title:"我的申请",visible:B,centered:!0,width:722,footer:null,wrapClassName:S.Z.CustomCss,onCancel:function(){return D(!1)},closeIcon:(0,Z.jsx)("i",{className:"iconfont icon-danchuangguanbi "}),children:(0,Z.jsx)("div",{style:{paddingBottom:30},children:(0,Z.jsx)(k.Gi,{children:(0,Z.jsx)(g.Z,{dataSource:null==U?void 0:U.group_audit_records,pagination:!1,columns:ie})})})}),(0,Z.jsx)(m.Z,{title:1===(null==ne?void 0:ne.status)?"同意":"拒绝",visible:Q,width:800,centered:!0,footer:null,wrapClassName:S.Z.CustomCss,onCancel:function(){return R(!1)},children:(0,Z.jsxs)("div",{style:{paddingBottom:20},children:[(0,Z.jsx)("p",{style:{color:"#000000",fontSize:14,fontWeight:500},children:"原班级:"}),(0,Z.jsx)(k.Gi,{children:(0,Z.jsx)(g.Z,{dataSource:[s()(s()({},ne),{},{group_name:null==ne?void 0:ne.old_group_name,department:null==ne?void 0:ne.old_department,teachers:null==ne?void 0:ne.old_teachers})],pagination:!1,columns:oe})}),(0,Z.jsx)("p",{style:{color:"#000000",fontSize:14,fontWeight:500},children:"申请班级:"}),(0,Z.jsx)(k.Gi,{children:(0,Z.jsx)(g.Z,{dataSource:[s()(s()({},ne),{},{group_name:null==ne?void 0:ne.new_group_name,department:null==ne?void 0:ne.new_department,teachers:null==ne?void 0:ne.new_teachers})],pagination:!1,columns:oe})}),1!=(null==ne?void 0:ne.status)&&(0,Z.jsx)("p",{style:{color:"#000000",fontSize:14,fontWeight:500},children:"拒绝理由"}),1!=(null==ne?void 0:ne.status)&&(0,Z.jsx)("p",{children:(null==ne?void 0:ne.reason)||"- -"})]})})]})}))},65850:function(e,n){n.Z={flex_box_center:"flex_box_center___vG4eV",flex_space_between:"flex_space_between___qVVxe",flex_box_vertical_center:"flex_box_vertical_center___P8Z8s",flex_box_center_end:"flex_box_center_end___VMme3",flex_box_column:"flex_box_column___VMHwm",dropdownmenus:"dropdownmenus___oVzoj",popupClassNames:"popupClassNames___OcZq7",selectdown:"selectdown___mmcA8"}}}]); |