|
|
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[37948],{57732:function(e,n,t){var s=t(26801),a=t.n(s),l=(t(59301),t(93314)),i=t(3113),r=t(37712);n.Z=function(e){var n=e.img,t=e.buttonProps,s=void 0===t?{}:t,o=e.styles,c=void 0===o?{}:o,d=e.customText,u=e.ButtonText,p=e.ButtonClick,x=e.Buttonclass,f=e.ButtonTwo,m=e.imgStyles,h=e.loading,g=void 0!==h&&h;return(0,r.jsxs)("section",{className:"tc animated fadeIn",style:a()(a()({},{color:"#999",margin:"100px auto",visibility:g?"hidden":"visible"}),c),children:[(0,r.jsx)("img",{src:n||l,style:a()({},m)}),(0,r.jsx)("p",{className:"mt20 font14",children:d||"暂时还没有相关数据哦!"}),u&&(0,r.jsx)(i.ZP,a()(a()({className:x,onClick:p},s),{},{children:u})),f&&f]})}},16669:function(e,n,t){t.r(n),t.d(n,{default:function(){return I}});var s=t(26801),a=t.n(s),l=t(10574),i=t.n(l),r=t(39343),o=t.n(r),c=t(11006),d=t.n(c),u=t(27161),p=t.n(u),x=t(59301),f=t(22211),m=t(95237),h=t(8591),g=t(72315),_=t(43418),j=t(15830),y="wrap___UkIuX",v=t(9498),k=t.n(v),w=t(23878),b=t(29268),S=t(57732),Z=t(37712),C=["classroomList","globalSetting","loading","user","dispatch"];k().locale("ZH-cn");var I=(0,f.connect)((function(e){var n=e.classroomList,t=e.loading,s=e.globalSetting,a=e.user;return{classroomList:n,globalSetting:s,loading:t.models.classroomList,user:a}}))((function(e){e.classroomList,e.globalSetting,e.loading,e.user,e.dispatch,p()(e,C);var n,t,s=(0,x.useState)(),l=d()(s,2),r=l[0],c=l[1],u=(0,x.useState)(1),v=d()(u,2),k=v[0],I=v[1],N=(0,x.useState)(!0),z=d()(N,2),L=z[0],P=z[1],F=(0,x.useState)(20),W=d()(F,2),B=W[0],V=(W[1],(0,x.useState)(!1)),G=d()(V,2),T=G[0],E=G[1],D=(0,x.useState)(""),q=d()(D,2),H=q[0],M=q[1],O=(0,x.useState)([]),A=d()(O,2),U=A[0],X=A[1],J=(0,x.useState)(!1),K=d()(J,2),Q=K[0],R=K[1],Y=(0,f.useParams)(),$=(0,x.useState)([]),ee=d()($,2),ne=ee[0],te=ee[1];function se(){return se=o()(i()().mark((function e(n){var t,s;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return P(!0),t=n||k,e.next=4,(0,j.ZP)("/api/student_groups.json",{method:"get",params:{page:t,limit:B,keyword:H||""}});case 4:s=e.sent,c(s),P(!1);case 7:case"end":return e.stop()}}),e)}))),se.apply(this,arguments)}function ae(){return le.apply(this,arguments)}function le(){return(le=o()(i()().mark((function e(){var n;return i()().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,x.useEffect)((function(){!function(e){se.apply(this,arguments)}()}),[k,H]);var ie=[{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)(m.Z,{align:"middle",justify:"end",children:(0,Z.jsx)(f.Link,{to:"/users/".concat(Y.username,"/classmanagement/").concat(e,"?department_name=").concat(n.department_name),children:"查看"})})}}],re=[{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)(m.Z,{align:"middle",justify:"end",children:e<1?(0,Z.jsx)("a",{style:{color:"#165DFF"},onClick:o()(i()().mark((function e(){var t;return i()().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)&&h.ZP.info("撤销成功"),ae();case 5:case"end":return e.stop()}}),e)}))),children:"撤销"}):(0,Z.jsx)("a",{style:{color:"#165DFF"},onClick:function(){R(!0),E(!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)(m.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==r?void 0:r.total_count}),"个班级"]}),(0,Z.jsxs)("span",{onClick:function(){E(!0),ae()},style:{marginLeft:30,color:"#5F6368",cursor:"pointer"},children:["我的申请(",null==r?void 0:r.audit_count,")"]})]}),(0,Z.jsx)("span",{style:{display:"flex"},children:(0,Z.jsx)(w.t7,{style:{width:300,marginLeft:20},onChange:function(e){M(e)},placeholder:"请输入分班名称搜索"})})]}),(null==r||null===(n=r.student_groups)||void 0===n?void 0:n.length)<=0&&(0,Z.jsx)(S.Z,{customText:"您还未被分配班级,请联系管理员分配需要管理的班级"}),(null==r||null===(t=r.student_groups)||void 0===t?void 0:t.length)>0&&(0,Z.jsx)(w.Gi,{children:(0,Z.jsx)(g.Z,{columns:ie,loading:L,dataSource:null==r?void 0:r.student_groups,pagination:{hideOnSinglePage:!0,pageSize:B,showSizeChanger:!1,current:k,position:["bottomCenter"],onChange:function(e,n){I(e)},total:null==r?void 0:r.total_count}})}),(0,Z.jsx)(_.Z,{title:"我的申请",visible:T,centered:!0,width:722,footer:null,wrapClassName:b.Z.CustomCss,onCancel:function(){return E(!1)},closeIcon:(0,Z.jsx)("i",{className:"iconfont icon-danchuangguanbi "}),children:(0,Z.jsx)("div",{style:{paddingBottom:30},children:(0,Z.jsx)(w.Gi,{children:(0,Z.jsx)(g.Z,{dataSource:null==U?void 0:U.group_audit_records,pagination:!1,columns:re})})})}),(0,Z.jsx)(_.Z,{title:1===(null==ne?void 0:ne.status)?"同意":"拒绝",visible:Q,width:800,centered:!0,footer:null,wrapClassName:b.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)(w.Gi,{children:(0,Z.jsx)(g.Z,{dataSource:[a()(a()({},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)(w.Gi,{children:(0,Z.jsx)(g.Z,{dataSource:[a()(a()({},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)||"- -"})]})})]})}))},29268: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"}}}]); |