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

1 line
43 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([[48077],{6075:function(e,n,t){var r=t(79800),s=t.n(r),o=t(59301),i=t(32007),a=t(21256),c=t(89260),l=t(37712);n.Z=function(e){var n=e.children,t=e.active,r=(0,i.useParams)(),u=(0,o.useState)(t||1),d=s()(u,2),p=(d[0],d[1]);return(0,l.jsx)("section",{style:{backgroundColor:"#fff",padding:"20px 30px"},children:(0,l.jsx)(a.YG,{value:t,onChange:function(e){p(e)},tabBarExtraContent:n,dataSource:[{id:1,name:"教师列表",link:"/classrooms/".concat(r.coursesId,"/teachers")},{id:2,name:"学生列表",link:"/classrooms/".concat(r.coursesId,"/students")},{id:4,name:"分班列表",link:"/classrooms/".concat(r.coursesId,"/course_group")},(0,c.Rb)()&&{id:3,name:"助教权限",link:"/classrooms/".concat(r.coursesId,"/assistant")}]})})}},50883:function(e,n,t){var r=t(82242),s=t.n(r),o=(t(59301),t(93314)),i=t(3113),a=t(37712);n.Z=function(e){var n=e.img,t=e.buttonProps,r=void 0===t?{}:t,c=e.styles,l=void 0===c?{}:c,u=e.customText,d=e.ButtonText,p=e.ButtonClick,f=e.Buttonclass,m=e.ButtonTwo,h=e.imgStyles,x=e.loading,v=void 0!==x&&x;return(0,a.jsxs)("section",{className:"tc animated fadeIn",style:s()(s()({},{color:"#999",margin:"100px auto",visibility:v?"hidden":"visible"}),l),children:[(0,a.jsx)("img",{src:n||o,style:s()(s()({},h),{},{pointerEvents:"none",userSelect:"none"})}),(0,a.jsx)("p",{className:"mt20 font14",children:u||"暂时还没有相关数据哦!"}),d&&(0,a.jsx)(i.ZP,s()(s()({className:f,onClick:p},r),{},{children:d})),m&&m]})}},58674:function(e,n,t){t.d(n,{Z:function(){return c}});var r=t(79800),s=t.n(r),o=t(59301),i="virtual___Cl1Fa",a=t(37712),c=function(e){var n=e.list,t=e.itemHeight,r=e.mapList,c=e.scrollHeight,l=void 0===c?300:c,u=(0,o.useState)(0),d=s()(u,2),p=d[0],f=d[1],m=(0,o.useState)(0),h=s()(m,2),x=h[0],v=h[1],g=(0,o.useRef)(null),_=(0,o.useRef)(null),j=(0,o.useMemo)((function(){return t*n.length}),[n.length]);(0,o.useEffect)((function(){g.current&&v(Math.ceil(g.current.clientHeight/t))}),[null==n?void 0:n.length]);var y=n.slice(p,p+x);return n.length*t<=l?(0,a.jsx)(o.Fragment,{children:null==n?void 0:n.map((function(e,n){return(0,a.jsx)(o.Fragment,{children:r(e)},n)}))}):(0,a.jsx)("div",{className:i,style:{height:l},onScroll:function(){var e=g.current.scrollTop,n=Math.floor(e/t);f(n),_.current.style.transform="translate3d(0, ".concat(n*t,"px, 0)")},ref:g,children:(0,a.jsx)("div",{style:{height:j+"px"},children:(0,a.jsx)("div",{className:"content",ref:_,children:null==y?void 0:y.map((function(e,n){return(0,a.jsx)(o.Fragment,{children:r(e)},n)}))})})})}},59015:function(e,n,t){t.d(n,{Z:function(){return l}});var r=t(79800),s=t.n(r),o=t(59301),i=t(53200),a=t(29502),c=t(37712),l=function(){var e=(0,o.useState)(""),n=s()(e,2),t=n[0],r=n[1],l=(0,o.useState)(0),u=s()(l,2),d=(u[0],u[1]),p=(0,o.useState)(),f=s()(p,2),m=(f[0],f[1]),h=(0,o.useState)(),x=s()(h,2),v=(x[0],x[1]),g=(0,o.useState)(!1),_=s()(g,2),j=(_[0],_[1],(0,o.useRef)(""));function y(e){27==e.keyCode&&j.current&&b()}function b(){document.body.style.overflow="auto",m(void 0),v(void 0),d(0),r("")}(0,o.useEffect)((function(){return i.Z.subscribe("preview-image",(function(e){r(e),console.log(S.current),document.body.style.overflow="hidden"}))}),[]),(0,o.useEffect)((function(){return document.addEventListener("keydown",y),function(){document.removeEventListener("keydown",y)}}),[]),(0,o.useEffect)((function(){j.current=t}),[t]);(0,o.useRef)();var k=(0,o.useRef)(),S=(0,o.useRef)();return(0,c.jsx)(o.Fragment,{children:t?(0,c.jsx)("div",{children:(0,c.jsx)("div",{className:"preview-wrp-group",ref:k,children:(0,c.jsx)(a.Z,{className:"image-preview",src:t,style:{display:"none"},preview:{visible:!0,src:t,movable:!1,onVisibleChange:function(e){r("")}},alt:"预览大图"})})}):null})}},73798:function(e,n,t){var r=t(85573),s=t.n(r),o=t(7557),i=t.n(o),a=t(82242),c=t.n(a),l=t(41498),u=t.n(l),d=t(79800),p=t.n(d),f=(t(59301),t(98228)),m=t(78241),h=t(43418),x=t(8591),v=t(92832),g=t(85750),_=t(32007),j=t(37712);f.Z.TreeNode;n.Z=(0,_.connect)((function(e){return{classroomList:e.classroomList,loading:e.loading}}))((function(e){var n=e.classroomList,t=(e.loading,e.dispatch),r=(0,_.useParams)();r.id=r.coursesId;var o=n.detailLeftMenus,a=(n.actionTabs,o.course_modules&&o.course_modules.filter((function(e){return"video"===e.type})),m.Z.useForm()),l=p()(a,1)[0];return(0,j.jsx)(h.Z,{centered:!0,title:"新建分班",open:"新建分班"===n.actionTabs.key,okText:"确定",cancelText:"取消",bodyStyle:{minHeight:130},onOk:u()(i()().mark((function e(){var n;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=c(),e.t1={},e.next=5,l.validateFields();case 5:return e.t2=e.sent,n=(0,e.t0)(e.t1,e.t2),e.next=9,(0,g.ZP)("/api/courses/".concat(r.id,"/course_groups.json"),{method:"post",body:c()({},n)});case 9:0===e.sent.status&&(x.ZP.success("添加成功"),l.resetFields(),t({type:"classroomList/setActionTabs",payload:{}}),t({type:"classroomList/getAllCourseGroup",payload:{coursesId:r.coursesId,limit:2e3}}),t({type:"classroomList/getClassroomLeftMenus",payload:{id:r.coursesId}}));case 11:case"end":return e.stop()}}),e)}))),onCancel:function(){l.resetFields(),t({type:"classroomList/setActionTabs",payload:{}})},children:(0,j.jsx)(m.Z,{form:l,initialValues:s()(s()({},"name",""),"link",""),children:(0,j.jsx)(m.Z.Item,{label:"分班名称",name:"name",rules:[{required:!0,message:"请输入!"}],children:(0,j.jsx)(v.Z,{maxLength:60})})})})}))},34555:function(e,n,t){t.r(n),t.d(n,{default:function(){return je}});var r=t(7557),s=t.n(r),o=t(41498),i=t.n(o),a=t(82242),c=t.n(a),l=t(79800),u=t.n(l),d=t(59301),p=t(32007),f=t(20834),m=t(38854),h=t(2555),x=t(89260),v=t(95237),g=t(43604),_=t(57809),j=t(71418),y=t(27582),b={flex_box_center:"flex_box_center___vLVuS",flex_space_between:"flex_space_between___iMfB0",flex_box_vertical_center:"flex_box_vertical_center___dYLcz",flex_box_center_end:"flex_box_center_end___hAdh1",flex_box_column:"flex_box_column___HgIbr",bg:"bg___fg0pK",header:"header___JSZ2c",menu:"menu___YsZdG",desc:"desc___rXiKH",otherLink:"otherLink___INV4V",card:"card___z8I5q",listTabWrapper:"listTabWrapper___GUJxo",operationBtn:"operationBtn___fudrU",reject:"reject___oB66Y",approve:"approve___zZZ7P",rejectBtn:"rejectBtn___SCjUa",approveBtn:"approveBtn___XtDaP",duplicateStudentModal:"duplicateStudentModal___Q1TtD",warningText:"warningText___YA0e9",customTagTypeWrap:"customTagTypeWrap___TC3sR",checkbox:"checkbox___EWCrb",delete:"delete___TxnvA"},k=t(37205),S=t.n(k),Z=t(24905),w=t(43418),C=t(51945),T=t(8591),I=t(86859),N=t(81228),L=t(3113),P=t(50883),R=t(37712),F=function(e){return e[e.approve=1]="approve",e[e.reject=2]="reject",e}(F||{}),E=(0,p.connect)((function(e){return{classroomList:e.classroomList}}))((function(e){var n,t=e.params,r=e.data,o=e.batch,a=e.loading,c=e.reload,l=e.resetBatchStatus,u=e.selectedKey,d=e.setSelectedKey,f=e.dispatch,m=(0,p.useParams)().coursesId,h=[{title:"序号",dataIndex:"name",width:70,align:"center",render:function(e,n,r){return o.length>0?(0,R.jsx)(Z.Z,{onChange:function(e){u.includes(e.target.value)?d(S()(u.filter((function(n){return n!=e.target.value})))):(u.push(e.target.value),d(S()(u)))},value:null==n?void 0:n.application_id,checked:u.includes(null==n?void 0:n.application_id),children:t.limit*(t.page-1)+r+1}):t.limit*(t.page-1)+r+1}},{title:"姓名",width:110,align:"center",dataIndex:"name",render:function(e,n){return(0,R.jsx)(p.Link,{target:"_blank",to:"/users/".concat(null==n?void 0:n.login,"/classrooms"),children:e})}},{title:"学校/单位",width:140,align:"center",dataIndex:"school_name",render:function(e){return(0,R.jsx)("span",{className:"c-black",children:e||"--"})}},{title:"学号",width:110,align:"center",dataIndex:"student_id",sortDirections:["descend","ascend"],sorter:function(e,n){return e.id-n.id},render:function(e){return(0,R.jsx)("span",{className:"c-black",children:e||"--"})}},{title:"手机号",width:100,align:"center",dataIndex:"phone",render:function(e){return(0,R.jsx)("span",{className:"c-black",children:e||"--"})}},{title:"邮箱",width:120,align:"center",dataIndex:"mail",render:function(e){return(0,R.jsx)("span",{className:"c-black",children:e||"--"})}},{title:"分班",width:100,align:"center",dataIndex:"course_group_name",sortDirections:["descend","ascend"],sorter:function(e,n){return e.id-n.id},render:function(e){return e||"--"}},{title:"操作",align:"center",dataIndex:"name",render:function(e,n){var t=n.application_id;return(0,R.jsxs)("div",{children:[(0,R.jsx)("span",{className:"".concat(b.operationBtn," ").concat(b.reject),onClick:function(){return x([t],F.reject)},children:"拒绝"}),(0,R.jsx)("span",{className:"".concat(b.operationBtn," ").concat(b.approve),onClick:function(){return x([t],F.approve)},children:"同意"})]})}}],x=function(){var e=i()(s()().mark((function e(n,t){var o,a;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t!==F.approve){e.next=7;break}return e.next=3,(0,y.r_)(m,{application_ids:n});case 3:0===(o=e.sent).status&&((null===(a=o.data)||void 0===a?void 0:a.length)>0?w.Z.confirm({icon:null,width:700,centered:!0,className:b.duplicateStudentModal,okText:"同意加入",cancelText:"取消",content:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)("div",{style:{marginBottom:4},children:"检测到课堂中已存在的学生,点击“同意加入”则课堂将会存在两个相同的学生"}),(0,R.jsx)("div",{className:b.warningText,style:{marginBottom:4},children:"*建议在“已审批”中将已存在的学生移除,再加入新账号"}),(0,R.jsx)(C.Z,{columns:[{title:"姓名",dataIndex:"name"},{title:"学校/单位",dataIndex:"school_name"},{title:"学号",dataIndex:"student_id"},{title:"班级",dataIndex:"course_group"}],dataSource:o.data,pagination:!1,scroll:{y:540},rowKey:"student_id"})]}),onOk:function(){var e=i()(s()().mark((function e(){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,y.fd)(m,{application_ids:n,approval:F.approve});case 2:0===e.sent.status&&(T.ZP.success("操作成功"),n.length>=r.application_list.length?c({page:1}):c(),f({type:"classroomList/getClassroomTopBanner",payload:{id:m}}),d([]));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()}):w.Z.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"是否确认同意TA的加入",onOk:function(){var e=i()(s()().mark((function e(){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,y.fd)(m,{application_ids:n,approval:F.approve});case 2:0===e.sent.status&&(T.ZP.success("操作成功"),n.length>=r.application_list.length?c({page:1}):c(),f({type:"classroomList/getClassroomTopBanner",payload:{id:m}}),d([]));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()})),e.next=8;break;case 7:t===F.reject&&w.Z.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"是否确认拒绝TA的加入",onOk:function(){var e=i()(s()().mark((function e(){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,y.fd)(m,{application_ids:n,approval:F.reject});case 2:0===e.sent.status&&(T.ZP.success("操作成功"),n.length>=r.application_list.length?c({page:1}):c(),f({type:"classroomList/getClassroomTopBanner",payload:{id:m}}),d([]));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()});case 8:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}();return 0===(null==r?void 0:r.apply_size)?(0,R.jsx)(P.Z,{}):(0,R.jsxs)("div",{className:"bg-white pl30 pr30 pt20 pb20",children:[(0,R.jsx)(C.Z,{pagination:!1,loading:a,columns:h,dataSource:null==r?void 0:r.application_list,rowKey:"application_id"}),(null==r?void 0:r.apply_size)>0&&(0,R.jsx)("div",{className:"tc mt30",children:(0,R.jsx)(I.Z,{showSizeChanger:!0,onChange:function(e,n){c({page:e,limit:n})},current:t.page,pageSize:t.limit,total:r.apply_size})}),o&&(0,R.jsx)(N.Z,{offsetBottom:0,children:(0,R.jsxs)("div",{style:{height:62,background:"#fff",paddingLeft:"39px",width:"100%",boxShadow:"0px -4px 11px 0px rgba(218, 218, 218, 0.5)",display:"flex",alignItems:"center"},children:["applicant"===o&&(0,R.jsxs)("div",{style:{flex:1},children:[(0,R.jsxs)(Z.Z,{checked:(null==u?void 0:u.length)===(null==r||null===(n=r.application_list)||void 0===n?void 0:n.length),onClick:function(){var e;(null==u?void 0:u.length)<(null==r||null===(e=r.application_list)||void 0===e?void 0:e.length)?d(S()(null==r?void 0:r.application_list.map((function(e){return e.application_id})))):d([])},children:["全选本页/",(0,R.jsxs)("span",{children:["已选 ",null==u?void 0:u.length,""]})]}),(0,R.jsx)(L.ZP,{danger:!0,className:b.rejectBtn,onClick:function(){x(u,F.reject)},children:"拒绝"}),(0,R.jsx)(L.ZP,{type:"primary",className:b.approveBtn,onClick:function(){x(u,F.approve)},children:"同意"})]}),(0,R.jsxs)(L.ZP,{style:{marginRight:30,fontSize:"12px",display:"inline-flex",alignItems:"center",color:"#333333"},onClick:function(){l()},children:[(0,R.jsx)("i",{className:"iconfont icon-piliangcaozuo font12 mr5"}),"取消操作"]})]})})]})})),B=t(60324),O=t(14478),A=t(85750),D=t(46952),G=t(80836),M=t(59015),z="listWrap___dJFQD",K="menu___D9PvJ",H="list___PWHRI",V="pad___wEnox",W=t(58674),U=t(92832),J=t(64165),X=(0,p.connect)((function(e){return{classroomList:e.classroomList,loading:e.loading,dispatch:e.dispatch}}))((function(e){var n,t=e.onClick,r=e.placeholder,o=void 0===r?"搜索":r,a=e.reversal,c=void 0!==a&&a,l=e.width,f=void 0===l?142:l,h=e.isParentNode,x=void 0!==h&&h,v=e.dispatch,g=e.loading,_=e.classroomList,j=(0,p.useParams)().coursesId,y=(0,d.useState)(""),b=u()(y,2),k=b[0],Z=b[1],w=(0,d.useState)([]),C=u()(w,2),T=C[0],I=C[1],N=(0,d.useState)(!1),P=u()(N,2),F=P[0],E=P[1],B=(0,d.useRef)(null),O=(0,d.useRef)(!1),A=(0,d.useRef)(!0),D=(0,d.useState)([]),G=u()(D,2),M=G[0],X=G[1],Q=function(){var e=i()(s()().mark((function e(){var n;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(!A.current||g.effects["classroomList/getAllCourseGroup"]||null!==(n=_.allCourseGroups)&&void 0!==n&&null!==(n=n.course_groups)&&void 0!==n&&n.length)){e.next=2;break}return e.abrupt("return");case 2:return A.current=!1,e.next=5,v({type:"classroomList/getAllCourseGroup",payload:{coursesId:j,limit:2e3}});case 5:e.sent;case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();(0,d.useEffect)((function(){var e,n,t;null!==(e=_.allCourseGroups)&&void 0!==e&&e.course_groups&&(X([{id:"0",name:"未分班"}].concat(S()((null===(n=_.allCourseGroups)||void 0===n?void 0:n.course_groups)||[]))),I([{id:"0",name:"未分班"}].concat(S()((null===(t=_.allCourseGroups)||void 0===t?void 0:t.course_groups)||[]))))}),[null===(n=_.allCourseGroups)||void 0===n?void 0:n.course_groups]);return(0,R.jsxs)("span",{className:V,onMouseEnter:function(){return Q()},onMouseLeave:function(){O.current||E(!1)},children:[g.effects["classroomList/getAllCourseGroup"]&&(0,R.jsx)(L.ZP,{type:"link",style:{color:"#165DFF"},loading:g.effects["classroomList/getAllCourseGroup"]&&!A.current,children:"移动分班"}),!g.effects["classroomList/getAllCourseGroup"]&&(0,R.jsx)(m.Z,{open:F,dropdownRender:function(){return(0,R.jsxs)("div",{className:z,style:{flexDirection:c?"column-reverse":"column",width:f},children:[(0,R.jsx)(U.Z,{value:k,ref:B,placeholder:o,onBlur:function(){O.current=!1,setTimeout((function(){E(!1)}),300)},onChange:function(e){var n=e.target.value,t=M.filter((function(e){return e.name.includes(n)}));Z(n),I(t)},onFocus:function(){O.current=!0}}),(0,R.jsx)("div",{className:K,children:T.length?(0,R.jsx)(W.Z,{list:T,itemHeight:32,scrollHeight:300,mapList:function(e){return(0,R.jsx)("div",{className:H,onClick:function(){t(e.id),E(!1)},children:(0,R.jsx)("span",{title:e.name,children:e.name})},e.id)}}):(0,R.jsx)(J.Z,{image:J.Z.PRESENTED_IMAGE_SIMPLE})})]})},destroyPopupOnHide:!0,placement:c?"topLeft":"bottomLeft",getPopupContainer:function(e){return x?e.parentNode:document.body},autoAdjustOverflow:!1,children:(0,R.jsx)("span",{onMouseEnter:function(){F||(E(!0),Z(""))},children:(0,R.jsx)(L.ZP,{type:"link",style:{color:"#165DFF"},children:"移动分班"})})})]})})),Q=t(53200),Y=t(20817),q=t(39647),$=t.n(q),ee=t(5112),ne="scoremodal___XlvDn",te="wrap___RKBLe",re="wrap_title___Xmo5Q",se="radioWrap___eAsgX",oe="radio___Za18i",ie="colorFF0000___Jo92W",ae="pagination___jFbQD",ce="search___Xkeep",le="searchIcon___MwoJ1",ue=["classroomList","shixunsDetail","dispatch","user"],de=(0,p.connect)((function(e){return{classroomList:e.classroomList,shixunsDetail:e.shixunsDetail,user:e.user}}))((function(e){var n,t,r=e.classroomList,o=e.shixunsDetail,a=e.dispatch,l=e.user,f=($()(e,ue),r.detailTopBanner),m=(0,p.useParams)(),h=(0,d.useState)(0),x=u()(h,2),v=x[0],g=x[1],_=(0,d.useState)([]),j=u()(_,2),y=j[0],b=j[1],k=(0,d.useState)(""),S=u()(k,2),Z=S[0],C=S[1],N=(0,d.useState)(),L=u()(N,2),P=L[0],F=L[1],E=(0,d.useState)(!1),B=u()(E,2),O=B[0],D=B[1],G=(0,d.useState)({page:1,per_page:10}),M=u()(G,2),z=M[0],K=M[1];(0,d.useEffect)((function(){C(""),l.userInfo.login&&"Stage-SendModal"===o.actionTabs.key&&H()}),[o.actionTabs.key]),(0,d.useEffect)((function(){l.userInfo.login&&"Stage-SendModal"===o.actionTabs.key&&H()}),[null==z?void 0:z.page]);var H=function(){var e=i()(s()().mark((function e(){var n;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,A.ZP)("/api/users/".concat(l.userInfo.login,"/courses.json"),{method:"get",params:c()(c()({},z),{},{category:"manage",status:"processing",search:encodeURI(Z),username:l.userInfo.login,no_limit_per_page:1})});case 2:n=e.sent,g((null==n?void 0:n.count)||0),b((null==n?void 0:n.courses)||[]);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),V=function(){var e=i()(s()().mark((function e(){var n,t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(P){e.next=3;break}return D(!0),e.abrupt("return");case 3:return e.next=5,(0,A.ZP)("/api/courses/".concat(null==m?void 0:m.course_id,"/course_members/batch_send_member.json"),{method:"post",body:{user_ids:null===(n=o.actionTabs.params)||void 0===n?void 0:n.ids,receive_course_id:P}});case 5:0==(null==(t=e.sent)?void 0:t.status)&&(T.ZP.success("发送成功"),C(""),F(null),D(!1),a({type:"shixunsDetail/setActionTabs",payload:{}}));case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,R.jsx)(R.Fragment,{children:(0,R.jsx)(w.Z,{title:"发送".concat(null===(n=o.actionTabs.params)||void 0===n?void 0:n.title),open:"Stage-SendModal"===o.actionTabs.key,centered:!0,className:ne,onCancel:function(){C(""),F(null),D(!1),a({type:"shixunsDetail/setActionTabs",payload:{}})},onOk:V,children:(0,R.jsxs)("div",{className:te,children:[(0,R.jsxs)("div",{className:re,children:["选择的","".concat(null===(t=o.actionTabs.params)||void 0===t?void 0:t.title),"将会发送到指定课堂"]}),(0,R.jsx)("div",{className:"mb10",children:(0,R.jsx)(U.Z.Search,{className:ce,placeholder:"输入课堂名称的关键字进行搜索",value:Z,onChange:function(e){return C(e.target.value)},suffix:(0,R.jsx)("i",{className:"iconfont icon-sousuo9 font14 ".concat(le),onClick:function(){C(Z),K({page:1,per_page:10})}}),onSearch:function(e){C(e),K({page:1,per_page:10})}})}),(0,R.jsx)("div",{className:se,children:(0,R.jsx)(ee.ZP.Group,{value:P,onChange:function(e){F(e.target.value),D(!1)},children:y.map((function(e,n){return(0,R.jsx)(ee.ZP,{disabled:e.id===(null==f?void 0:f.course_id),className:oe,value:e.id,children:(0,R.jsx)("span",{title:e.name,children:e.name})},n)}))})}),O&&(0,R.jsx)("div",{className:ie,children:"请选择你要发送的课堂"}),v>10&&(0,R.jsx)("div",{className:ae,children:(0,R.jsx)(I.Z,{size:"small",className:"mb20",showQuickJumper:!0,showSizeChanger:!1,defaultCurrent:1,current:null==z?void 0:z.page,pageSize:10,total:v,onChange:function(e){K({page:e,per_page:10})}})})]})})})})),pe=(0,p.connect)((function(e){return{teachers:e.teachers,user:e.user,classroomList:e.classroomList}}))((function(e){var n,t,r,o=e.teachers,a=e.user,l=e.classroomList,m=e.dispatch,h=e.params,_=e.loading,j=e.batch,k=e.getData,F=e.resetBatchStatus,E=e.selectedKey,z=e.setSelectedKey,K=(0,p.useParams)().coursesId,H=o.allCourseGroups,V=o.studentsList,W=l.detailTopBanner,U=(0,d.useState)([]),J=u()(U,2),q=J[0],$=J[1],ee=(0,d.useState)({}),ne=u()(ee,2),te=ne[0],re=ne[1],se=(0,d.useState)(!1),oe=u()(se,2),ie=oe[0],ae=oe[1],ce=function(){var e=i()(s()().mark((function e(){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(ie){e.next=5;break}return e.next=3,m({type:"classroomList/getAllCourseGroup",payload:{coursesId:K,limit:2e3}});case 3:e.sent,ae(!0);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),le=function(e){var n,t,r;return!!(0,x.Ny)()||!(null===(n=a.userInfo)||void 0===n||!n.professional_certification||(null===(t=a.userInfo)||void 0===t?void 0:t.school_name)!==(null==e?void 0:e.school_name))&&("未分班"===e.course_group_name?(0,x.d8)():((0,x.d8)()||(0,x.IR)())&&(null===(r=l.allCourseGroups)||void 0===r||null===(r=r.course_groups)||void 0===r?void 0:r.some((function(n){return n.name===e.course_group_name}))))},ue=function(){var e=i()(s()().mark((function e(n,t,r){var o,i;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r&&E.length<=0)){e.next=3;break}return T.ZP.info("请选择学生"),e.abrupt("return");case 3:return e.next=5,(0,A.ZP)("/api/courses/".concat(K,"/transfer_to_course_group.json"),{method:"post",body:{students:r?E.map((function(e){return{course_member_id:e}})):[{course_member_id:t.course_member_id}],course_group_id:n}});case 5:0===e.sent.status&&(T.ZP.success("操作成功"),E.length>=(null==V||null===(o=V.students)||void 0===o?void 0:o.length)||1===(null==V||null===(i=V.students)||void 0===i?void 0:i.length)?k({page:1}):k(),z([]));case 7:case"end":return e.stop()}}),e)})));return function(n,t,r){return e.apply(this,arguments)}}(),pe=function(e){q.indexOf(e)>-1?q.splice(q.indexOf(e),1):q.push(e),null!=q&&q.includes("ASSISTANT_PROFESSOR")&&null!=q&&q.includes("PROFESSOR")&&("PROFESSOR"===e&&q.splice(q.indexOf("ASSISTANT_PROFESSOR"),1),"ASSISTANT_PROFESSOR"===e&&q.splice(q.indexOf("PROFESSOR"),1)),$(S()(q))},fe=[{title:"序号",dataIndex:"name",width:50,fixed:"left",ellipsis:!0,render:function(e,n,t){return j?(0,R.jsx)(Z.Z,{onChange:function(e){E.includes(e.target.value)?z(S()(E.filter((function(n){return n!=e.target.value})))):(E.push(e.target.value),z(S()(E)))},value:null==n?void 0:n.course_member_id,checked:E.includes(null==n?void 0:n.course_member_id),children:h.limit*(h.page-1)+t+1}):(0,R.jsx)("span",{style:{color:"#232B40"},children:h.limit*(h.page-1)+t+1})}},{title:"姓名",width:110,ellipsis:!0,fixed:"left",dataIndex:"name",render:function(e,n){return(0,R.jsx)(p.Link,{target:"_blank",to:"/users/".concat(null==n?void 0:n.login,"/classrooms"),children:e})}},{title:"学号",width:100,fixed:"left",ellipsis:!0,dataIndex:"student_id",sortOrder:te.student_id,sortDirections:["descend","ascend"],sorter:function(e,n){return e.id-n.id},render:function(e){return(0,R.jsx)("span",{style:{color:"#232B40"},children:e||"--"})}},{title:"分班",width:100,fixed:"left",ellipsis:!0,dataIndex:"course_group_name",sortOrder:te.course_group_name,sortDirections:["descend","ascend"],sorter:function(e,n){return e.id-n.id},render:function(e){return(0,R.jsx)("span",{style:{color:"#232B40"},children:e||"--"})}},!(null!=W&&W.is_public)&&{title:"手机号",width:100,ellipsis:!0,dataIndex:"user_phone",render:function(e,n){return(0,R.jsx)("span",{style:{color:"#232B40"},children:e||"--"})}},!(null!=W&&W.is_public)&&{title:"邮箱",width:100,ellipsis:!0,dataIndex:"user_mail",render:function(e,n){return(0,R.jsx)("span",{style:{color:"#232B40"},children:e||"--"})}},(null==W?void 0:W.is_public)&&{title:"学校/单位",width:120,ellipsis:!0,dataIndex:"school_name",render:function(e,n){return(0,R.jsx)("span",{style:{color:"#333333"},children:e||"--"})}},!(0,x.dE)()&&{title:"证件照",width:80,dataIndex:"face_image",render:function(e){return e?(0,R.jsx)("img",{style:{width:33,height:46,display:!e&&"none"},src:Y.Z.API_SERVER+e,onClick:function(){Q.Z.publish("preview-image",Y.Z.API_SERVER+e)}}):(0,R.jsx)("span",{style:{color:"#232B40"},children:"--"})}},(0,x.Gg)()&&{title:"操作",align:"right",fixed:"right",dataIndex:"name",render:function(e,n){var t,r,o;return(0,R.jsxs)("div",{children:[(0,R.jsx)(B.Z,{autoAdjustOverflow:!1,overlayClassName:b.btnmenu,placement:"bottomLeft",content:(0,R.jsxs)(f.Z,{children:[(0,R.jsx)(f.Z.Item,{children:(0,R.jsx)(O.Z,{icon:(0,R.jsx)("span",{}),onOpenChange:function(){$(S()(n.member_roles))},onConfirm:i()(s()().mark((function e(){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,y.mw)({coursesId:K,roles:q,user_id:n.user_id});case 2:0===e.sent.status&&(T.ZP.success("修改成功"),1>=(null==V||null===(t=V.students)||void 0===t?void 0:t.length)?k({page:1}):k());case 4:case"end":return e.stop()}}),e)}))),title:(0,R.jsx)("div",{children:(0,R.jsxs)(Z.Z.Group,{value:q,defaultValue:n.member_roles,children:[(null==n||null===(t=n.member_roles)||void 0===t?void 0:t.includes("CREATOR"))&&(0,R.jsx)(Z.Z,{disabled:!0,onClick:function(){return pe("CREATOR")},checked:!0,value:"CREATOR",children:"管理员"}),!(null!=n&&null!==(r=n.member_roles)&&void 0!==r&&r.includes("CREATOR"))&&(0,R.jsx)(Z.Z,{onClick:function(){return pe("PROFESSOR")},value:"PROFESSOR",children:"老师"}),(0,R.jsx)(Z.Z,{disabled:!(null==n||null===(o=n.member_roles)||void 0===o||!o.includes("CREATOR")),onClick:function(){return pe("ASSISTANT_PROFESSOR")},value:"ASSISTANT_PROFESSOR",children:"助教"}),(0,R.jsx)(Z.Z,{onClick:function(){return pe("STUDENT")},value:"STUDENT",children:"学生"})]})}),children:(0,R.jsx)("a",{children:"修改角色"})})}),le(n)&&(0,R.jsx)(f.Z.Item,{children:(0,R.jsx)("a",{onClick:function(){var e;w.Z.confirm({centered:!0,icon:null,width:515,okText:"确定",cancelText:"取消",title:"提示",content:(0,R.jsxs)("div",{children:[(0,R.jsxs)("div",{style:{marginBottom:"10px"},children:["重置密码后,初始密码将设置为:",(0,R.jsx)("span",{style:{color:"#DF8323"},children:"12345678"})]}),(0,R.jsx)("div",{children:"并且该学生将会收到密码重置的消息通知,请提醒学生尽快修改密码!"})]}),onOk:(e=i()(s()().mark((function e(){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,A.ZP)("/api/courses/".concat(K,"/reset_student_password.json"),{method:"post",body:{user_id:n.user_id}});case 2:0===e.sent.status&&T.ZP.success("操作成功");case 4:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})},children:"重置密码"})}),(0,R.jsx)(f.Z.Item,{children:(0,R.jsx)("a",{onClick:function(){m({type:"shixunsDetail/setActionTabs",payload:{key:"Stage-SendModal",params:{ids:[null==n?void 0:n.course_member_id],title:"学生"}}})},children:"发送至课堂"})})]}),children:(0,R.jsxs)("span",{style:{color:"#165DFF",cursor:"pointer"},onMouseEnter:function(){return ce()},children:["更多",(0,R.jsx)("i",{className:"iconfont icon-sanjiaoxing-down font14 ",style:{marginLeft:"4px"}})]})}),(0,R.jsx)(X,{onClick:function(e){return ue(e,n,!1)}}),(0,R.jsx)("span",{className:"".concat(b.delete," current"),style:{color:"#165DFF"},onClick:function(){var e;w.Z.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"是否确认删除",onOk:(e=i()(s()().mark((function e(){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,y.l3)({coursesId:K,students:[{course_member_id:n.course_member_id}]});case 2:0===e.sent.status&&(T.ZP.success("删除成功"),1>=(null==V||null===(t=V.students)||void 0===t?void 0:t.length)?k({page:1}):k(),m({type:"classroomList/getClassroomTopBanner",payload:{id:K}}));case 4:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})},children:"删除"})]})}}].filter((function(e){return!!e}));return(0,R.jsxs)("section",{children:[(0,R.jsxs)("div",{children:[0===V.students_count&&(0,R.jsx)(P.Z,{}),(0,R.jsxs)("div",{className:"".concat(!(null==V||null===(n=V.students)||void 0===n||!n.length)&&"bg-white"," pl30 pr30"),children:[(0,x.Gg)()&&E.length>0&&(0,R.jsxs)(v.Z,{justify:"space-between",className:b.checkbox,children:[(0,R.jsx)(g.Z,{children:(0,R.jsxs)("span",{className:"font14",children:["已选 ",(0,R.jsx)("span",{style:{color:"#165DFF"},children:E.length})," 个"]})}),(0,R.jsxs)("div",{style:{marginLeft:"auto",cursor:"pointer",color:"#E30000"},onClick:function(){var e;(null==E?void 0:E.length)<=0?T.ZP.info("请选择学生"):w.Z.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"是否确认删除",content:"选中学生将全部被删除,不可恢复,是否继续删除",onOk:(e=i()(s()().mark((function e(){var n;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,y.l3)({coursesId:K,students:E.map((function(e){return{course_member_id:e}}))});case 2:0===e.sent.status&&(T.ZP.success("删除成功"),E.length>=(null==V||null===(n=V.students)||void 0===n?void 0:n.length)?k({page:1}):k(),m({type:"classroomList/getClassroomTopBanner",payload:{id:K}}),m({type:"classroomList/getClassroomTopBanner",payload:{id:K}}),z([]));case 4:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})},children:[(0,R.jsx)("i",{className:"iconfont icon-qingchu font14",style:{color:"#F65160",marginRight:"6px"}}),(0,R.jsx)("span",{children:"批量删除"})]}),(0,R.jsxs)("div",{style:{cursor:"pointer",color:"#E30000",marginLeft:"20px"},onClick:function(){(null==E?void 0:E.length)<=0?T.ZP.info("请选择学生"):m({type:"shixunsDetail/setActionTabs",payload:{key:"Stage-SendModal",params:{ids:E,title:"学生"}}})},children:[(0,R.jsx)("i",{className:"iconfont icon-fasong2 font14",style:{color:"#165DFF",marginRight:"6px"}}),(0,R.jsx)("span",{style:{color:"#165DFF"},children:"发送到其他课堂"})]}),(0,R.jsx)(g.Z,{children:(0,R.jsx)(X,{onClick:function(e){return ue(e,{},!0)},dataSource:[{id:"0",name:"未分班"}].concat(S()((null==H?void 0:H.course_groups)||[])),reversal:!0,isParentNode:!0,children:(0,R.jsxs)("span",{className:"font14 current",style:{color:"#3061d0",marginLeft:"20px",display:"inline-block"},children:["移动到",(0,R.jsx)(D.Z,{className:"ml5"})]})})})]}),!(null==V||null===(t=V.students)||void 0===t||!t.length)&&(0,R.jsx)(C.Z,{onChange:function(e,n,t){var r={},s={};t.column?(void 0===t.order?(r[t.field]="descend",s.sort="desc"):(s.sort=t.order.replace("end",""),r[t.field]=t.order),s.order=2,"student_id"==t.column.dataIndex&&(s.order=1)):(r={},s.sort="",s.order=""),re(c()({},r)),k(s)},scroll:!(0,x.Gg)()||null!=W&&W.is_public?null:{x:880},columns:fe,dataSource:null==V?void 0:V.students,pagination:!1,rowKey:"course_member_id",loading:_,rowSelection:(0,x.Gg)()&&{type:"checkbox",selectedRowKeys:E,onChange:function(e,n){z(e)}}})]}),(null==V?void 0:V.students_count)>0&&(0,R.jsx)("aside",{className:"tc mb50 mt30",children:(0,R.jsx)(I.Z,{showSizeChanger:!0,onChange:function(e,n){k({page:e,limit:n}),z([])},current:h.page,pageSize:h.limit,total:null==V?void 0:V.students_count})})]}),(0,R.jsx)(M.Z,{}),j&&(0,R.jsx)(N.Z,{offsetBottom:0,children:(0,R.jsxs)("div",{style:{height:62,background:"#fff",paddingLeft:"39px",width:"100%",boxShadow:"0px -4px 11px 0px rgba(218, 218, 218, 0.5)",display:"flex",alignItems:"center"},children:["member"===j&&(0,R.jsxs)("div",{style:{flex:1},children:[(0,R.jsxs)(Z.Z,{checked:(null==E?void 0:E.length)===(null==V||null===(r=V.students)||void 0===r?void 0:r.length),onClick:function(){var e;(null==E?void 0:E.length)<(null==V||null===(e=V.students)||void 0===e?void 0:e.length)?z(S()(null==V?void 0:V.students.map((function(e){return e.course_member_id})))):z([])},children:["全选本页/",(0,R.jsxs)("span",{children:["已选 ",null==E?void 0:E.length,""]})]}),(0,R.jsx)(X,{onClick:function(e){return ue(e,{},!0)},dataSource:[{id:"0",name:"未分班"}].concat(S()((null==H?void 0:H.course_groups)||[])),reversal:!0,isParentNode:!0,children:(0,R.jsxs)(L.ZP,{style:{margin:"0px 15px",fontSize:"12px",color:"#145DFF",display:"inline-flex",alignItems:"center"},children:["批量移动 ",(0,R.jsx)(G.Z,{style:{color:"#464F66"}})]})}),(0,R.jsxs)(L.ZP,{style:{fontSize:"12px",color:"#145DFF"},onClick:function(){var e;(null==E?void 0:E.length)<=0?T.ZP.info("请选择学生"):w.Z.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"选中学生将全部被删除,不可恢复,是否继续删除",onOk:(e=i()(s()().mark((function e(){var n;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,y.l3)({coursesId:K,students:E.map((function(e){return{course_member_id:e}}))});case 2:0===e.sent.status&&(T.ZP.success("删除成功"),E.length>=(null==V||null===(n=V.students)||void 0===n?void 0:n.length)?k({page:1}):k(),m({type:"classroomList/getClassroomTopBanner",payload:{id:K}}),m({type:"classroomList/getClassroomTopBanner",payload:{id:K}}),z([]));case 4:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})},children:[(0,R.jsx)("i",{style:{color:"#F65160",display:"inline-flex",alignItems:"center"},className:"iconfont icon-piliangshanchu2 font14 mr5"}),"批量删除"]})]}),(0,R.jsxs)(L.ZP,{style:{marginRight:30,fontSize:"12px",display:"inline-flex",alignItems:"center",color:"#333333"},onClick:function(){F()},children:[(0,R.jsx)("i",{className:"iconfont icon-piliangcaozuo font12 mr5"}),"取消操作"]})]})}),(0,R.jsx)(de,{})]})})),fe=t(92208),me=t(66621),he=t(21256),xe=(0,p.connect)((function(e){return{teachers:e.teachers,user:e.user,classroomList:e.classroomList}}))((function(e){var n=e.teachers,t=e.dispatch,r=e.user,o=e.classroomList,a=(0,p.useParams)().coursesId,l=(0,me.oP)().tab,f=void 0===l?"member":l,m=(n.allCourseGroups,n.studentsList),h=o.detailTopBanner,k=(0,d.useState)(""),S=u()(k,2),Z=S[0],w=S[1],C=(0,d.useState)([]),T=u()(C,2),I=T[0],N=T[1],L=(0,d.useState)([]),P=u()(L,2),F=P[0],B=P[1],O=(0,d.useState)(!1),A=u()(O,2),D=A[0],G=A[1],M=(0,d.useRef)(!0),z=(0,d.useState)([]),K=u()(z,2),H=K[0],V=K[1];(0,d.useEffect)((function(){var e;r.userInfo.username&&q({page:1,limit:10,course_group_id:(0,x.dE)()?null===(e=r.userInfo)||void 0===e||null===(e=e.course)||void 0===e?void 0:e.course_group_id:""})}),[r.userInfo.username]);var W=function(){var e=i()(s()().mark((function e(n){var r;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t({type:"teachers/getStudentsList",payload:c()({coursesId:a},n)});case 2:return r=e.sent,e.abrupt("return",r);case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),U=function(){var e=i()(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,y.iU)(a,n);case 2:return t=e.sent,e.abrupt("return",t);case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),J=(0,fe.U)(W,{page:1,limit:20}),X=u()(J,4),Q=X[0],Y=X[1],q=X[2],$=(X[3],(0,fe.U)(U,{page:1,limit:20})),ee=u()($,4),ne=ee[0],te=ee[1],re=ee[2],se=ee[3],oe=(0,d.useState)(f),ie=u()(oe,2),ae=ie[0],ce=ie[1],le=(0,d.useState)({course_group_id:"",search:""}),ue=u()(le,2),de=ue[0],xe=ue[1],ve=function(){N([]),B([]),w("")},ge=function(){var e=i()(s()().mark((function e(){var n;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(M.current){e.next=2;break}return e.abrupt("return");case 2:return G(!0),e.next=5,(0,y.xV)({coursesId:a,limit:2e3});case 5:null!=(n=e.sent)&&n.course_groups&&(V((null==n?void 0:n.course_groups)||[]),M.current=!1),G(!1);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,R.jsxs)("section",{children:[(0,R.jsx)("aside",{className:"bg-white pl30 pr30 pb20",children:(0,R.jsxs)(v.Z,{align:"middle",justify:"space-between",children:[!(0,x.Gg)()||null!=h&&h.excellent?(0,R.jsx)(g.Z,{children:(0,R.jsxs)("span",{style:{height:"60px",padding:"15px"},children:["共",(0,R.jsx)("label",{className:"ml3 mr3",style:{color:"#165DFF"},children:(null==m?void 0:m.students_count)||0}),"个学生"]})}):(0,R.jsx)(g.Z,{className:b.customTagTypeWrap,children:(0,R.jsx)(he.qp,{title:"类型",value:ae,onChange:function(e){ce(e),ve(),"member"===e?q(de):re(de)},dataSource:[{name:"已审批 ".concat((null==m?void 0:m.students_count)||0),id:"member"},{name:"待审批 ".concat((null==m?void 0:m.apply_size)||0),id:"applicant"}],titleWidth:28,style:{flex:1}})}),(0,R.jsx)(g.Z,{children:(0,R.jsxs)(v.Z,{align:"middle",justify:"space-evenly",children:[!(0,x.dE)()&&(0,R.jsx)(g.Z,{className:"mr20",children:(0,R.jsxs)(_.default,{size:"middle",value:""===de.course_group_id?"全部":de.course_group_id,onChange:function(){var e=i()(s()().mark((function e(n){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("member"!==ae){e.next=5;break}return e.next=3,q({page:1,course_group_id:"全部"===n?"":n});case 3:e.next=7;break;case 5:return e.next=7,re({page:1,course_group_id:"全部"===n?"":n});case 7:ve(),xe((function(e){return c()(c()({},e),{},{course_group_id:"全部"===n?"":n})}));case 9:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),style:{width:200,marginRight:10},onDropdownVisibleChange:ge,dropdownRender:function(e){return(0,R.jsx)(j.Z,{spinning:D,children:e})},getPopupContainer:function(e){return e.parentNode},children:[(0,R.jsx)(_.default.Option,{value:"全部",children:"全部分班"}),(0,R.jsx)(_.default.Option,{value:"0",children:"未分班"}),null==H?void 0:H.map((function(e){return(0,R.jsx)(_.default.Option,{value:null==e?void 0:e.id,children:null==e?void 0:e.name},null==e?void 0:e.id)}))]})}),(0,R.jsx)(g.Z,{children:(0,R.jsx)(he.t7,{style:{width:220},placeholder:"请输入姓名/学号搜索",value:de.search,onChange:function(e){xe((function(n){return c()(c()({},n),{},{search:e})})),"member"===ae?q({search:e,page:1}):re({search:e,page:1})}})})]})})]})}),"member"===ae&&(0,R.jsx)(pe,{params:Q,getData:q,loading:Y,batch:Z,resetBatchStatus:ve,selectedKey:I,setSelectedKey:N}),"applicant"===ae&&(0,R.jsx)(E,{params:ne,data:se,loading:te,batch:Z,resetBatchStatus:ve,reload:re,selectedKey:F,setSelectedKey:B})]})})),ve=t(64946),ge=t(6075),_e=t(73798),je=(0,p.connect)((function(e){var n=e.teachers,t=e.loading;return{teachers:n,globalSetting:e.globalSetting,classroomList:e.classroomList,loading:t.effects}}))((function(e){e.teachers,e.globalSetting,e.classroomList,e.loading;var n=e.dispatch,t=(e.match,(0,d.useState)("0")),r=u()(t,2),o=(r[0],r[1],(0,p.useParams)()),a=(f.Z,f.Z.Item,f.Z.Item,f.Z.Item,[{name:"学生",url:""},{name:"课堂信息",url:"/api/courses/".concat(o.coursesId,"/export_couser_info.xlsx&export=true")}]),l=(0,R.jsxs)(f.Z,{style:{maxHeight:400,width:240,overflow:"auto"},children:[a.map((function(e,n){return(0,R.jsx)(f.Z.Item,{onClick:function(n){v(e.name)},children:(0,R.jsx)("span",{children:e.name})},e.url)})),(0,R.jsx)(f.Z.Item,{children:(0,R.jsx)(p.Link,{to:"/classrooms/".concat(o.coursesId,"/exportlist/course_member_act_score,course_total_score"),children:"历史导出"})},"3")]}),v=function(){var e=i()(s()().mark((function e(n){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=n,e.next="学生"===e.t0?3:"课堂信息"===e.t0?5:7;break;case 3:return(0,h.eV)(c()({},o)),e.abrupt("break",7);case 5:return(0,h.Zn)(c()({},o)),e.abrupt("break",7);case 7:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();return(0,R.jsxs)("section",{children:[(0,R.jsxs)(ge.Z,{active:2,children:[(0,x.eB)()&&(0,R.jsx)(m.Z,{dropdownRender:function(){return l},children:(0,R.jsxs)(he.op,{className:"mr20",children:["导出",(0,R.jsx)(D.Z,{className:"ml5"})]})}),(0,x.aN)()&&(0,R.jsx)(he.op,{style:{background:"#3061D0",color:"#fff",fontSize:"12px"},className:"mr20",onClick:function(){n({type:"teachers/setActionTabs",payload:{key:"更换管理员"}})},children:"更换管理员"}),(0,x.GJ)()&&(0,R.jsx)(he.op,{style:{background:"#3061D0",color:"#fff",fontSize:"12px"},onClick:function(){n({type:"classroomList/setActionTabs",payload:{key:"新建分班",params:o}})},children:"新建分班"})]}),(0,R.jsx)(xe,{}),(0,R.jsx)(_e.Z,{}),(0,R.jsx)(ve.Z,{})]})}))},64946:function(e,n,t){var r=t(7557),s=t.n(r),o=t(37205),i=t.n(o),a=t(82242),c=t.n(a),l=t(41498),u=t.n(l),d=t(79800),p=t.n(d),f=t(59301),m=t(78241),h=t(43418),x=t(8591),v=t(71418),g=t(5112),_=t(27582),j=t(26724),y=t.n(j),b=t(32007),k=t(37712);n.Z=(0,b.connect)((function(e){return{teachers:e.teachers,loading:e.loading}}))((function(e){var n=e.teachers,t=(e.loading,e.dispatch),r=(0,b.useParams)(),o=(0,f.useState)([]),a=p()(o,2),l=a[0],d=a[1],j=(0,f.useState)(!1),S=p()(j,2),Z=S[0],w=S[1],C=(0,f.useState)(!0),T=p()(C,2),I=T[0],N=T[1];r.id=r.coursesId,r.course_id=r.coursesId,r.limit=20;var L=(0,f.useRef)(0),P=function(){var e=u()(s()().mark((function e(){var n;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return w(!0),L.current++,e.next=4,(0,_.gp)(c()(c()({},r),{},{page:L.current}));case 4:null!=(n=e.sent)&&n.teacher_list&&(d([].concat(i()(l),i()(n.teacher_list))),n.teacher_list.length!==r.limit&&N(!1)),w(!1);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();(0,f.useEffect)((function(){"更换管理员"===n.actionTabs.key&&(L.current=0,N(!0),d([]),P())}),[n.actionTabs.key]);var R=m.Z.useForm(),F=p()(R,1)[0];return(0,k.jsxs)(h.Z,{centered:!0,title:"更换管理员",open:"更换管理员"===n.actionTabs.key,okText:"确定",cancelText:"取消",bodyStyle:{minHeight:200},onOk:u()(s()().mark((function e(){var n,o;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=F.getFieldValue()).course_member_id){e.next=9;break}return o=n.course_member_id.split(","),e.next=5,(0,_.rM)(c()(c()({},r),{},{user_id:o[1],course_member_id:o[0]}));case 5:0===e.sent.status&&(d([]),x.ZP.success("修改成功"),t({type:"user/getUserInfo",payload:c()({},r)}),t({type:"teachers/getList",payload:c()({},r)}),t({type:"classroomList/getClassroomTopBanner",payload:{id:r.coursesId}}),t({type:"teachers/setActionTabs",payload:{}})),e.next=10;break;case 9:x.ZP.error("请选择管理员");case 10:case"end":return e.stop()}}),e)}))),onCancel:function(){d([]),t({type:"teachers/setActionTabs",payload:{}})},children:[(0,k.jsxs)("p",{className:"tc",children:["选择的成员将会成为新的管理员",(0,k.jsx)("br",{}),"您将不再拥有管理员的权限,但您仍是教师团队的一员"]}),(0,k.jsx)(m.Z,{form:F,children:(0,k.jsx)("div",{style:{background:"#F4FAFF",padding:20},children:(0,k.jsx)("div",{style:{maxHeight:200,overflow:"auto"},children:(0,k.jsx)(y(),{initialLoad:!1,pageStart:0,loadMore:function(){return P()},hasMore:!Z&&I,useWindow:!1,children:(0,k.jsx)(v.Z,{spinning:Z,children:(0,k.jsx)(m.Z.Item,{name:"course_member_id",style:{marginBottom:0},children:(0,k.jsx)(g.ZP.Group,{children:null==l?void 0:l.map((function(e,n){return(0,k.jsx)("div",{children:(0,k.jsx)(g.ZP,{value:e.course_member_id+","+e.user_id,children:e.name})})}))})})})})})})})]})}))},92208:function(e,n,t){t.d(n,{U:function(){return p}});var r=t(7557),s=t.n(r),o=t(82242),i=t.n(o),a=t(41498),c=t.n(a),l=t(79800),u=t.n(l),d=t(59301);function p(e,n){var t=(0,d.useState)(n),r=u()(t,2),o=r[0],a=r[1],l=(0,d.useState)(!1),p=u()(l,2),f=p[0],m=p[1],h=(0,d.useState)(),x=u()(h,2),v=x[0],g=x[1],_=function(){var t=c()(s()().mark((function t(r){var c,l,u,d=arguments;return s()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return c=d.length>1&&void 0!==d[1]&&d[1],l=c?n:i()(i()({},o),r),m(!0),a(l),t.next=6,e(l);case 6:return u=t.sent,m(!1),g(u),t.abrupt("return",u);case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return[o,f,_,v]}}}]);