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

1 line
67 KiB

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden 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.

(self.webpackChunk=self.webpackChunk||[]).push([[6788,13488],{61481:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var s=n(67711),o=n(59301),r={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M885.2 446.3l-.2-.8-112.2-285.1c-5-16.1-19.9-27.2-36.8-27.2H281.2c-17 0-32.1 11.3-36.9 27.6L139.4 443l-.3.7-.2.8c-1.3 4.9-1.7 9.9-1 14.8-.1 1.6-.2 3.2-.2 4.8V830a60.9 60.9 0 0060.8 60.8h627.2c33.5 0 60.8-27.3 60.9-60.8V464.1c0-1.3 0-2.6-.1-3.7.4-4.9 0-9.6-1.3-14.1zm-295.8-43l-.3 15.7c-.8 44.9-31.8 75.1-77.1 75.1-22.1 0-41.1-7.1-54.8-20.6S436 441.2 435.6 419l-.3-15.7H229.5L309 210h399.2l81.7 193.3H589.4zm-375 76.8h157.3c24.3 57.1 76 90.8 140.4 90.8 33.7 0 65-9.4 90.3-27.2 22.2-15.6 39.5-37.4 50.7-63.6h156.5V814H214.4V480.1z"}}]},name:"inbox",theme:"outlined"},a=n(7657),i=function(e,t){return o.createElement(a.Z,(0,s.Z)({},e,{ref:t,icon:r}))};var c=o.forwardRef(i)},16585:function(e,t,n){"use strict";n.d(t,{Z:function(){return k}});n(7557),n(41498);var s=n(82100),o=n.n(s),r=n(29186),a=n.n(r),i=n(13720),c=n.n(i),l=n(80619),u=n.n(l),d=n(47074),m=n.n(d),p=n(85573),h=n.n(p),f=n(59301),x=n(10249),v="codeBox___WpkVl",g=n(92310),y=n.n(g),_=n(37712),j=function(e){u()(n,e);var t=m()(n);function n(e){var s;return o()(this,n),s=t.call(this,e),h()(c()(s),"canvas",void 0),h()(c()(s),"randomNum",(function(e,t){return Math.floor(Math.random()*(t-e)+e)})),h()(c()(s),"drawPic",(function(){s.randomCode()})),h()(c()(s),"reloadPic",(function(){s.drawPic()})),h()(c()(s),"changeCode",(function(e){console.log(e.target.value,222),s.setState({value:e.target.value,showError:!1})})),h()(c()(s),"onVerify",(function(){var e;return""!==s.state.value.toLowerCase()&&s.state.value.toLowerCase()!==s.state.code.toLowerCase()||""===s.state.value.toLowerCase()?e=!0:s.state.value.toLowerCase()===s.state.code.toLowerCase()&&(e=!1),s.setState({showError:e}),e})),s.canvas=f.createRef(),s.state={value:"",code:"",codeLength:4,fontSizeMin:20,fontSizeMax:22,backgroundColorMin:240,backgroundColorMax:250,colorMin:10,colorMax:20,lineColorMin:40,lineColorMax:180,contentWidth:96,contentHeight:38,showError:!1},s}return a()(n,[{key:"componentDidMount",value:function(){this.drawPic()}},{key:"randomColor",value:function(e,t){var n=this.randomNum(e,t),s=this.randomNum(e,t),o=this.randomNum(e,t);return"rgb(".concat(n,", ").concat(s,", ").concat(o,")")}},{key:"drawText",value:function(e,t,n){e.fillStyle=this.randomColor(this.state.colorMin,this.state.colorMax);var s=this.randomNum(this.state.fontSizeMin,this.state.fontSizeMax);e.font=s+"px SimHei";var o=(this.state.contentWidth-40)/(this.state.code.length-1),r=10;n>0&&(r=10+n*o);var a=this.randomNum(this.state.fontSizeMax,this.state.contentHeight-5);s>40&&(a=40);var i=this.randomNum(-10,10);e.translate(r,a),e.rotate(i*Math.PI/180),e.fillText(t,0,0),e.rotate(-i*Math.PI/180),e.translate(-r,-a)}},{key:"drawLine",value:function(e){for(var t=0;t<1;t++)e.strokeStyle=this.randomColor(this.state.lineColorMin,this.state.lineColorMax),e.beginPath(),e.moveTo(this.randomNum(0,this.state.contentWidth),this.randomNum(0,this.state.contentHeight)),e.lineTo(this.randomNum(0,this.state.contentWidth),this.randomNum(0,this.state.contentHeight)),e.stroke()}},{key:"drawDot",value:function(e){for(var t=0;t<100;t++)e.fillStyle=this.randomColor(0,255),e.beginPath(),e.arc(this.randomNum(0,this.state.contentWidth),this.randomNum(0,this.state.contentHeight),1,0,2*Math.PI),e.fill()}},{key:"randomCode",value:function(){for(var e=this,t="",n=0;n<this.state.codeLength;n++){t+="QWERTYUPLKJHGFDSAZXCVBNMqwertyupkjhgfdsazxcvbnm1234567890"[Math.floor(57*Math.random())]}this.setState({code:t},(function(){var t=e.canvas.current.getContext("2d");t.textBaseline="bottom",t.fillStyle=e.randomColor(e.state.backgroundColorMin,e.state.backgroundColorMax),t.fillRect(0,0,e.state.contentWidth,e.state.contentHeight);for(var n=0;n<e.state.code.length;n++)e.drawText(t,e.state.code[n],n);e.drawLine(t),e.drawDot(t)}))}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.width,s=void 0===n?300:n;return(0,_.jsxs)("div",{className:y()(v,t),style:{width:s},children:[(0,_.jsxs)("aside",{children:[(0,_.jsx)(x.Z,{value:this.state.value,onChange:this.changeCode,placeholder:"请输入图片中的验证码"}),this.state.showError&&(0,_.jsx)("div",{children:this.state.value?"请输入正确的验证码":"请输入验证码"})]}),(0,_.jsxs)("div",{children:[(0,_.jsx)("canvas",{onClick:this.reloadPic,ref:this.canvas,width:"100",height:"30"}),(0,_.jsx)("div",{className:"current",onClick:this.reloadPic,children:"看不清?换一张"})]})]})}}]),n}(f.Component),k=j},51101:function(e,t,n){"use strict";n(59301);var s=n(6848),o=n(37712);t.Z=function(e){var t=e.value,n=e.visible,r=void 0===n||n,a=e.children;return(0,o.jsx)(o.Fragment,{children:r?(0,o.jsx)(s.Z,{placement:"topLeft",title:{"未发布":"作业尚未发布","未开始":"作业已发布,尚未到达开始作业时间","提交中":"作业进行中,所有考生可提交作业","补交中":"作业进行中,所有学生可补交作业","进行中":"作业进行中,部分班级正在作业提交中/补交中","已截止":"到达作业截止时间,作业已结束","已结束":"课堂已结束"}[t],children:(0,o.jsx)("span",{children:a})}):a})}},9181:function(e,t,n){"use strict";n.r(t),n.d(t,{CommonHomeworkContext:function(){return Ue},default:function(){return Ye}});var s=n(7557),o=n.n(s),r=n(41498),a=n.n(r),i=n(82242),c=n.n(i),l=n(79800),u=n.n(l),d=n(59301),m=n(49389),p=n(8591),h=n(58421),f=n(81228),x=n(83287),v=n(7338),g=n(37205),y=n.n(g),_=n(39647),j=n.n(_),k=n(43418),b=n(94171),w=n(16585),C=n(37712),L=["classroomList","dispatch","match","location","user","onCallback"],N=(0,m.connect)((function(e){return{classroomList:e.classroomList,user:e.user}}))((function(e){var t,n,s=e.classroomList,r=e.dispatch,i=(e.match,e.location,e.user),l=e.onCallback,h=(j()(e,L),(0,m.useParams)()),f=(0,d.useState)(!1),g=u()(f,2),_=g[0],N=g[1],S=(0,d.useState)(!1),T=u()(S,2),Z=T[0],P=T[1],I=(0,d.useRef)(null);(0,d.useEffect)((function(){if("删除"===s.actionTabs.key){if((0,v.j5)())return void P(!0);var e={hasNum:0,noHasNum:0};s.actionTabs.selectArrsAll.map((function(t){var n;t.author_login===(null===(n=i.userInfo)||void 0===n?void 0:n.login)?++e.hasNum:++e.noHasNum})),e.noHasNum>0?k.Z.info({title:"权限提示",className:"custom-modal-divider ",icon:null,content:(0,C.jsxs)("div",{children:["当前选中资源中:",(0,C.jsx)("span",{className:"c-blue",children:e.hasNum}),"个由您本人发布,",(0,C.jsx)("span",{className:"c-red",children:e.noHasNum})," ","个由其他老师发布。",(0,C.jsx)("br",{}),"课堂内只能删除本人发布的资源,请取消选中其他老师发布的资源。"]}),onOk:function(){A()}}):P(!0)}else P(!1)}),[s.actionTabs.key]);var A=function(){r({type:"classroomList/setActionTabs",payload:{}})};return(0,C.jsx)(k.Z,{centered:!0,title:"提示",open:Z,okText:"确定",cancelText:"取消",confirmLoading:_,destroyOnClose:!0,onOk:a()(o()().mark((function e(){var t,n;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===(t=I.current)||void 0===t||!t.onVerify()){e.next=2;break}return e.abrupt("return");case 2:return N(!0),e.next=5,(0,b.ZP)("/api/courses/".concat(h.coursesId,"/homework_commons/multi_destroy.json"),{method:"post",body:{homework_ids:y()(s.actionTabs.selectArrs)}});case 5:n=e.sent,N(!1),0===n.status&&((0,x.L9)(["教学课堂","图文作业","删除"]),p.ZP.success("删除成功"),r({type:"classroomList/setActionTabs",payload:{key:"清除选择数据"}}),l&&l(),(0,v.GJ)()?r({type:"classroomList/getClassroomTeacherCommonList",payload:c()(c()({},s.actionTabs.params),{},{type:5})}):r({type:"classroomList/getClassroomCommonList",payload:c()({},s.actionTabs.params)}),r({type:"classroomList/getClassroomLeftMenus",payload:{id:h.coursesId}}));case 8:case"end":return e.stop()}}),e)}))),onCancel:function(){A()},children:null!=s&&null!==(t=s.actionTabs)&&void 0!==t&&t.status&&["未发布"].includes(null==s||null===(n=s.actionTabs)||void 0===n?void 0:n.status)?(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("p",{children:"提交作品将全部被删除,不可恢复"}),(0,C.jsx)("p",{children:"是否确认删除?"})]}):(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("p",{style:{color:"#DD0000"},children:"删除作业则会清除学生所有的答题数据,且数据不可恢复,如确定删除,请输入下方验证码"}),(0,C.jsx)(w.Z,{ref:function(e){return I.current=e}})]})})})),S=n(83574),T=n(24087),Z=(0,m.connect)((function(e){return{classroomList:e.classroomList}}))((function(e){var t=e.classroomList,n=e.dispatch,s=(0,m.useParams)();return(0,C.jsx)(k.Z,{centered:!0,title:"提示",open:"设为公开"===t.actionTabs.key,okText:"确定",cancelText:"取消",onOk:a()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,b.ZP)("/api/courses/".concat(s.coursesId,"/homework_commons/set_public.json"),{method:"post",body:{homework_ids:y()(t.actionTabs.selectArrs)}});case 2:0===e.sent.status&&((0,x.L9)(["教学课堂","图文作业","设为公开"]),p.ZP.success("操作成功"),n({type:"classroomList/setActionTabs",payload:{key:"清除选择数据"}}),(0,v.GJ)()?n({type:"classroomList/getClassroomTeacherCommonList",payload:c()(c()({},t.actionTabs.params),{},{type:5})}):n({type:"classroomList/getClassroomCommonList",payload:c()({},t.actionTabs.params)}));case 4:case"end":return e.stop()}}),e)}))),onCancel:function(){n({type:"classroomList/setActionTabs",payload:{}})},children:(0,C.jsxs)("p",{children:["设为公开后,非课堂成员也可以访问查看",(0,C.jsx)("br",{}),"是否确认设为公开?"]})})})),P=["classroomList","dispatch","onCallback"],I=(0,m.connect)((function(e){return{classroomList:e.classroomList}}))((function(e){var t=e.classroomList,n=e.dispatch,s=e.onCallback,r=(j()(e,P),(0,m.useParams)());return r.id=r.coursesId,(0,C.jsx)(k.Z,{centered:!0,title:"提示",open:"收藏"===t.actionTabs.key,okText:"确定",cancelText:"取消",onOk:a()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,b.ZP)("/api/courses/".concat(r.id,"/homework_commons/add_to_homework_bank.json"),{method:"post",body:{all_check:0,homework_ids:y()(t.actionTabs.selectArrs)}});case 2:0===e.sent.status&&((0,x.L9)(["教学课堂","图文作业","收藏"]),p.ZP.success("收藏成功,请前往【个人主页/课堂资源】查看"),n({type:"classroomList/setActionTabs",payload:{}}),s&&s(),(0,v.GJ)()?n({type:"classroomList/getClassroomTeacherCommonList",payload:c()(c()({},t.actionTabs.params),{},{type:5})}):n({type:"classroomList/getClassroomCommonList",payload:c()({},t.actionTabs.params)}),n({type:"classroomList/setActionTabs",payload:{}}));case 4:case"end":return e.stop()}}),e)}))),onCancel:function(){n({type:"classroomList/setActionTabs",payload:{}})},children:"确认收藏?"})})),A=n(85573),M=n.n(A),E=n(78241),O=n(95237),R=n(43604),H=n(10249),D=(n(61186),(0,m.connect)((function(e){return{classroomList:e.classroomList,loading:e.loading}}))((function(e){var t,n,s=e.classroomList,r=(e.loading,e.dispatch),i=e.onCallback,l=(0,m.useParams)(),d=(0,m.useLocation)(),h=s.actionTabs,f=E.Z.useForm(),x=u()(f,1)[0];return(0,C.jsxs)(k.Z,{centered:!0,title:"新建目录",open:"新建目录"===s.actionTabs.key,okText:"确定",cancelText:"取消",bodyStyle:{minHeight:200},onOk:a()(o()().mark((function e(){var t,n,a,u,h,f,v,g;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=x.getFieldValue(),n="/api/course_modules/".concat(s.detailCommonHomeworksList.main_category_id,"/add_second_category.json"),e.next=4,(0,b.ZP)(n,{method:"post",body:c()({},t)});case 4:0===(a=e.sent).status&&(p.ZP.success("添加成功"),i&&i(),r({type:"classroomList/setActionTabs",payload:{}}),r({type:"classroomList/getClassroomLeftMenus",payload:{id:l.coursesId}}),h=s.actionTabs.selectArrs.type,f=(null==a?void 0:a.category_id)||0,(v=null===(u=d.pathname)||void 0===u?void 0:u.split("/"))[4]=f,v[3]=h||v[3],g=null==v?void 0:v.join("/"),m.history.push(g));case 6:case"end":return e.stop()}}),e)}))),onCancel:function(){r({type:"classroomList/setActionTabs",payload:{}})},children:[(0,C.jsx)("p",{className:"tc",children:(0,C.jsx)("br",{})}),s.courseGroups.course_groups&&(0,C.jsx)(E.Z,{form:x,initialValues:M()({},"name",""),children:(0,C.jsx)(E.Z.Item,{name:"name",children:(0,C.jsxs)(O.Z,{className:"mt30",children:[(0,C.jsx)(R.Z,{children:"目录名称:"}),(0,C.jsx)(R.Z,{flex:"1",children:(0,C.jsx)(H.Z,{defaultValue:(null===(t=h.selectArrs)||void 0===t?void 0:t.category_name)||(null===(n=h.selectArrs)||void 0===n?void 0:n.name)})})]})})})]})}))),z=n(99313),B=n(3113),W=n(24905),G=n(26724),F=n.n(G),J=n(48066),V=n(28103),U=n(81327),Y=n(36133),q={shixunItemWrapper:"shixunItemWrapper___ClCET",checkboxWrapper:"checkboxWrapper___bZ8gF",contentWrapper:"contentWrapper____pt8D",title:"title___tfmFW",desc:"desc___NDuDd",info:"info___mahF7"},K=J.Z.Paragraph,X=function(e,t){var n=e.createShixunParams,s=(0,d.useState)("0"),r=u()(s,2),i=r[0],l=r[1],m=(0,d.useState)("hot"),p=u()(m,2),h=p[0],f=p[1],x=(0,d.useState)([]),v=u()(x,2),g=v[0],y=v[1],_=(0,d.useRef)({page:1,order:"hot",keyword:"",shixun_type:"jupyter",diff:"0",limit:10}),j=function(){var e=a()(o()().mark((function e(t,n){var s;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Y.he)(t);case 2:if((s=e.sent).status){e.next=8;break}if(0!==s.shixuns.length||!n){e.next=7;break}return Z(!1),e.abrupt("return");case 7:y(s.shixuns);case 8:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();(0,d.useImperativeHandle)(t,(function(){return{search:function(e){return j(c()(c()({},_.current),{},{keyword:e}))},changeKeyWord:function(e){return _.current.keyword=e}}})),(0,d.useEffect)((function(){j(_.current)}),[]);var k=(0,d.useState)([]),b=u()(k,2),w=b[0],L=b[1],N=(0,d.useState)(!0),S=u()(N,2),T=S[0],Z=S[1];return(0,C.jsxs)("div",{style:{marginTop:20,maxHeight:200,overflowY:"auto",overflowX:"hidden"},children:[(0,C.jsxs)(O.Z,{justify:"space-between",style:{marginBottom:8},children:[(0,C.jsx)(R.Z,{children:[{name:"全部",id:"0"},{name:"初级",id:"1"},{name:"中级",id:"2"},{name:"中高级",id:"3"},{name:"高级",id:"4"}].map((function(e,t){return(0,C.jsx)(B.ZP,{type:i===e.id?"primary":"default",onClick:function(){l(e.id),_.current.diff=e.id,j(_.current)},children:e.name},t)}))}),(0,C.jsx)(R.Z,{children:[{name:"最热",id:"hot"},{name:"最新",id:"new"}].map((function(e,t){return(0,C.jsx)(B.ZP,{className:"mr20",type:h===e.id?"primary":"default",onClick:function(){f(e.id),_.current.order=e.id,j(_.current)},children:e.name},t)}))})]}),(0,C.jsx)(F(),{initialLoad:!1,pageStart:1,threshold:700,loadMore:function(e){j(c()(c()({},_.current),{},{page:e}),!0)},hasMore:T,useWindow:!1,children:(0,C.jsx)(W.Z.Group,{onChange:function(e){L(e),n.current.shixun_ids=e},value:w,children:g.map((function(e){var t=e||{},n=t.name,s=t.id,o=t.description,r=t.challenge_names,a=t.author_name,i=t.author_school_name,c=t.level,l=t.total_stu_num;return(0,C.jsxs)("div",{className:q.shixunItemWrapper,children:[(0,C.jsxs)(O.Z,{align:"middle",className:q.checkboxWrapper,gutter:14,children:[(0,C.jsx)(W.Z,{value:s}),(0,C.jsx)("div",{className:q.title,children:n})]}),(0,C.jsxs)("div",{className:q.contentWrapper,children:[(0,C.jsx)(K,{ellipsis:{rows:2},className:q.desc,style:{color:"#8e8888"},children:o}),(0,C.jsx)(O.Z,{children:r.map((function(e,t){return(0,C.jsxs)("span",{className:q.mission,children:["第",t+1,"关",e]},t)}))}),(0,C.jsx)(V.Z,{dashed:!0,style:{margin:"8px 0"}}),(0,C.jsx)(O.Z,{className:q.info,children:(0,C.jsxs)(U.Z,{children:[(0,C.jsx)("span",{children:a}),(0,C.jsx)("span",{children:"|"}),(0,C.jsx)("span",{children:i}),(0,C.jsx)("span",{children:"|"}),(0,C.jsxs)("span",{children:["难度系数 ",c]}),(0,C.jsx)("span",{children:"|"}),(0,C.jsxs)("span",{children:["学习人数 ",l]})]})})]})]},s)}))})})]})},Q=(0,d.forwardRef)(X),$={flex_box_center:"flex_box_center___Cx3ju",flex_space_between:"flex_space_between___rc8Mm",flex_box_vertical_center:"flex_box_vertical_center___6BCc9",flex_box_center_end:"flex_box_center_end___sN3Ig",flex_box_column:"flex_box_column___wjzgd",line1:"line1___cHCBY",form:"form___IMCYE"},ee=n(13767),te=n(44933),ne=(z.Z.TabPane,(0,m.connect)((function(e){return{shixunHomeworks:e.shixunHomeworks,loading:e.loading}}))((function(e){var t,n=e.shixunHomeworks,s=(e.loading,e.dispatch),r=e.refreshList,i=(0,m.useParams)(),l=((0,m.useLocation)(),E.Z.useForm()),p=u()(l,1)[0],h=(n.brankList,(0,d.useState)(!1)),f=u()(h,2),g=(f[0],f[1]),_=(0,d.useState)(!0),j=u()(_,2),b=j[0],w=j[1],L=(0,d.useState)(!1),N=u()(L,2),S=N[0],T=N[1],Z=(0,d.useState)("myself"),P=u()(Z,2),I=P[0],A=P[1],D=(0,d.useState)([]),z=u()(D,2),G=z[0],J=z[1],V=(0,d.useState)(),U=u()(V,2),Y=U[0],q=U[1],K=(0,d.useState)({page:0,limit:20,object_type:"normal",search:"",filter:"myself"}),X=u()(K,2),ne=X[0];X[1];(0,d.useEffect)((function(){"题库选用"===n.actionTabs.key&&oe()}),[n.actionTabs.key]);var se=[],oe=function(){var e=a()(o()().mark((function e(){var t,n;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!b){e.next=11;break}return g(!1),++ne.page,e.next=5,s({type:"shixunHomeworks/getBrankList",payload:c()({},ne)});case 5:n=e.sent,G=y()(G.concat(n.object_list)),q(n.is_teacher),(null===(t=n.object_list)||void 0===t?void 0:t.length)<ne.limit?w(!1):w(!0),J(y()(G)),""==n.object_list&&1===ne.page&&g(!0);case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),re=(0,d.useRef)({identifier:i.coursesId,shixun_ids:[],type:"normal",coursesId:i.coursesId}),ae=function(){var e=a()(o()().mark((function e(t){var n;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return T(!0),e.next=3,(0,te.aQ)(t);case 3:n=e.sent,T(!1),n.status||(r(),s({type:"shixunHomeworks/setActionTabs",payload:{}}));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ie=(0,d.useRef)();return(0,C.jsxs)(k.Z,{centered:!0,title:"选用课堂资源",destroyOnClose:!0,open:"题库选用"===n.actionTabs.key,okText:"确定",cancelText:"取消",width:800,bodyStyle:{minHeight:200},okButtonProps:{loading:S},onOk:a()(o()().mark((function e(){var t,r,a;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("jupyter"!==I){e.next=3;break}return ae(re.current),e.abrupt("return");case 3:return T(!0),t=p.getFieldValue(),e.next=7,s({type:"shixunHomeworks/saveBanks",payload:{course_id:i.coursesId,object_type:"normal",category:i.categoryId,bank_id:t.group_ids}});case 7:0===(null==(r=e.sent)?void 0:r.status)&&((0,x.L9)(["教学课堂","图文作业","选用课堂资源"]),s({type:"classroomList/getClassroomLeftMenus",payload:{id:i.coursesId}}),s({type:"shixunHomeworks/setActionTabs",payload:{}}),s({type:"classroomList/setActionTabs",payload:{key:"立即发布",selectArrs:r.object_ids,params:null===(a=n.actionTabs)||void 0===a?void 0:a.params}})),T(!1);case 10:case"end":return e.stop()}}),e)}))),onCancel:function(){s({type:"shixunHomeworks/setActionTabs",payload:{}})},children:[(0,C.jsxs)(O.Z,{children:[(0,C.jsx)(R.Z,{span:12,children:[{name:"我的资源",id:"myself"},{name:"公共资源",id:"public"},{name:"jupyter实训",id:"jupyter"}].map((function(e,t){return(0,C.jsx)(B.ZP,{shape:"round",type:I===e.id?"primary":"default",className:"mr10",onClick:function(){var t=a()(o()().mark((function t(n){return o()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("jupyter"!==e.id){t.next=3;break}return A(e.id),t.abrupt("return");case 3:G=[],b=!0,ne.page=0,ne.search="",ne.filter=e.id,oe(),A(e.id);case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),children:e.name},t)}))}),(0,C.jsx)(R.Z,{span:12,className:"tr",children:(0,C.jsx)(H.Z.Search,{placeholder:"输入标题、适用课程进行搜索",onChange:function(e){var t;"jupyter"===I&&(null===(t=ie.current)||void 0===t||t.changeKeyWord(e.target.value))},onSearch:function(e){var t;"jupyter"!==I?(b=!0,ne.search=e,ne.page=0,G=[],oe()):null===(t=ie.current)||void 0===t||t.search(e)},style:{width:260}})})]}),"myself"===I&&(0,C.jsxs)("p",{className:"tc mt10",children:["选用对象:你在课堂图文作业列表中已",(0,C.jsx)("span",{className:"c-orange",children:"收藏"}),"的图文作业"]}),"public"===I&&(0,C.jsx)("p",{className:"tc mt10",children:"选用对象:题库中已设置成公共属性的所有图文作业"}),"jupyter"===I?(0,C.jsx)(Q,{createShixunParams:re,ref:ie}):(0,C.jsxs)("div",{style:{background:"#F4FAFF",maxHeight:200,overflow:"auto",padding:"20px 10px"},children:[!Y&&"public"===I&&(0,C.jsxs)("div",{style:{display:"flex",flexDirection:"column",paddingTop:"30px",alignItems:"center",justifyContent:"center"},children:[(0,C.jsx)("span",{children:"通过职业认证的教师才能访问公共课程资源库"}),(0,C.jsx)("p",{style:{cursor:"pointer",background:"#ff6800",height:"30px",textAlign:"center",marginTop:"5px",padding:"5px 0px",color:"#fff",width:"80px"},onClick:function(){window.open("/account/certification")},children:"立即认证"})]}),(0,C.jsx)(F(),{initialLoad:!1,pageStart:0,threshold:700,loadMore:function(){w(!1),oe()},hasMore:b,useWindow:!1,children:(0,C.jsxs)(E.Z,{form:p,initialValues:M()({},"group_ids",se),className:$.form,onChange:function(e){var t=p.getFieldValue();se=t},children:[""==G&&(0,C.jsx)(ee.Z,{styles:{margin:"10px auto"}}),(0,C.jsx)(E.Z.Item,{name:"group_ids",children:(0,C.jsx)(W.Z.Group,{style:{width:"100%"},className:"font14",children:null===(t=G)||void 0===t?void 0:t.map((function(e,t){return(0,C.jsxs)(O.Z,{children:[(0,C.jsx)(R.Z,{flex:"2",children:(0,C.jsx)(W.Z,{onChange:function(e){},value:String(e.id),defaultChecked:!0,children:(0,C.jsx)("span",{className:["c-black",$.line1].join(" "),children:e.name})},t)}),(0,C.jsx)(R.Z,{flex:"1",className:"c-black",children:(0,C.jsx)("span",{className:$.line1,children:null==e?void 0:e.course_list_name})}),(0,C.jsx)(R.Z,{flex:"50px",className:"c-black",children:"public"===I&&(0,v.Ny)()||"myself"===I?(0,C.jsx)("span",{className:"c-blue current",onClick:function(){window.open("/users/innov/topics/".concat(e.id,"/personal/normal/edit"))},children:"编辑"}):null==e?void 0:e.username})]},t)}))})})]})})]})]})}))),se=n(76794),oe=n(90269),re=(0,m.connect)((function(e){return{classroomList:e.classroomList,loading:e.loading}}))((function(e){var t=e.classroomList,n=(e.loading,e.dispatch),s=((0,m.useParams)(),E.Z.useForm()),r=u()(s,1)[0];return(0,C.jsx)(k.Z,{centered:!0,title:"补交附件",open:"补交附件"===t.actionTabs.key,bodyStyle:{minHeight:200},onOk:a()(o()().mark((function e(){var s,a,i;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.validateFields();case 2:return a=c()({},r.getFieldValue()),i=t.actionTabs.selectArrs,a.attachment_ids=null===(s=a.attachment_ids)||void 0===s?void 0:s.map((function(e){return e.response.id})),e.next=7,(0,se.mz)(c()(c()({},a),{},{homeworkId:i.work_id}));case 7:0===e.sent.status&&(r.resetFields(),n({type:"classroomList/setActionTabs",payload:{}}));case 9:case"end":return e.stop()}}),e)}))),onCancel:function(){r.resetFields(),n({type:"classroomList/setActionTabs",payload:{}})},children:(0,C.jsxs)(E.Z,{form:r,initialValues:{},children:[(0,C.jsx)(E.Z.Item,{name:"attachment_ids",rules:[{required:!0,message:"请上传附件"}],children:(0,C.jsx)(oe.Z,{})}),(0,C.jsx)(E.Z.Item,{name:"description",children:(0,C.jsx)(H.Z.TextArea,{placeholder:"请在此输入补交附件的原因最大限制100个字符",rows:7})})]})})})),ae=n(20834),ie=n(6848),ce="tabMenuContainer___Sxna3",le="control___ka76r",ue="iconH___GpOCh",de="selectBtn___KJw1e",me=function(e){var t=e.isLoading,n=e.addText,s=e.tabDataSource,o=e.isAdmin,r=e.TooltipTitle,a=e.categoryId,i=(e.dropdownMenu,e.classroomList,e.isShowRightControl),c=e.defaultSelectedKeys,l=e.onTabMenuClick,u=e.onTooltipTitleClick,d=e.onDropdownMenuClick,p=(0,m.useParams)();return(0,C.jsx)("div",{className:ce,children:(0,C.jsxs)(O.Z,{children:[(0,C.jsx)(R.Z,{flex:"1",children:(0,C.jsx)(ae.Z,{mode:"horizontal",selectedKeys:c,children:s.map((function(e){return(0,C.jsxs)(ae.Z.Item,{onClick:function(){return t?{}:l(e)},children:[(0,C.jsx)("span",{className:"c-grey-666 ".concat(o?"mr20":""),children:e.name}),void 0!==e.total&&(0,C.jsx)("span",{className:"c-grey-999",children:e.total||0})]},e.id)}))})}),(0,C.jsxs)(R.Z,{className:"gutter-row iconfont icon-paihang",style:{display:"flex",alignItems:"center",color:"#0152d9",paddingBottom:3},children:[(0,C.jsx)("span",{style:{marginLeft:8,cursor:"pointer"},onClick:function(){m.history.push("/classrooms/".concat(p.coursesId,"/program_homework/ranking"))},children:"排行榜"}),o&&i&&(0,C.jsxs)("div",{className:le,children:[(0,C.jsx)("div",{className:"c-blue font16 current",style:{marginLeft:20,marginRight:20},onClick:u,children:(0,C.jsx)(ie.Z,{title:r,children:(0,C.jsx)("span",{className:"".concat(ue,a?" iconfont icon-zhongmingmingmulu":" iconfont icon-xinjianmulu1")})})}),(0,C.jsxs)("span",{onClick:function(){d("1")},className:de,children:[(0,C.jsx)("span",{children:(0,C.jsx)("i",{className:"iconfont icon-tianjiadaohang"})}),(0,C.jsx)("span",{children:n||"新建"})]})]})]})]})})},pe=n(38854),he="searchSortControllerContainer___tQmMS",fe="btn___ECfiD",xe="btnSort___Y5Oja",ve="tips___fhrLg",ge=function(e){var t=e.isAdmin,n=(e.dataSource,e.batchStatus,e.SortMenuName),s=e.setSortMenuName,o=e.onSearch,r=e.onSort,a=(e.onBatch,t?[{name:"默认排序",type:"position",direction:"desc"},{name:"创建时间升序",type:"created_at",direction:"asc"},{name:"创建时间降序",type:"created_at",direction:"desc"},{name:"更新时间升序",type:"updated_at",direction:"asc"},{name:"更新时间降序",type:"updated_at",direction:"desc"},{name:"作业名称升序",type:"name_pinyin",direction:"asc"},{name:"作业名称降序",type:"name_pinyin",direction:"desc"}]:[{name:"默认排序",type:"position",direction:"desc"},{name:"按发布时间升序",type:"created_at",direction:"asc"},{name:"按发布时间降序",type:"created_at",direction:"desc"},{name:"按截止时间升序",type:"updated_at",direction:"asc"},{name:"按截止时间降序",type:"updated_at",direction:"desc"},{name:"作业名称升序",type:"name_pinyin",direction:"asc"},{name:"作业名称降序",type:"name_pinyin",direction:"desc"}]),i="默认排序"===n;return(0,C.jsxs)("div",{className:he,children:[(0,C.jsx)("div",{children:(0,C.jsx)(pe.Z,{dropdownRender:function(){return(0,C.jsx)(ae.Z,{selectedKeys:[n],children:a.map((function(e){return(0,C.jsx)(ae.Z.Item,{onClick:function(){return s((t=e).name),void r(t);var t},children:e.name},e.name)}))})},children:(0,C.jsx)("div",{children:(0,C.jsxs)("span",{className:"".concat(fe," ").concat(i?xe:""),children:[(0,C.jsx)("i",{className:"iconfont icon-paixu font14 mr5"}),n]})})})}),i&&(0,C.jsx)(ie.Z,{title:"优先按照调整排序结果展示,未设置排序时,按照创建时间降序排列",children:(0,C.jsx)("span",{className:ve,children:(0,C.jsx)("i",{className:"iconfont icon-a-wenhaobeifen2"})})}),(0,C.jsx)(H.Z.Search,{allowClear:!0,placeholder:"请输入名称进行搜索",onSearch:o,style:{width:220,marginLeft:"auto"}})]})},ye="bottomControlContainer___kLlgA",_e="buttonWrap___vOH3N",je="moveCategory___lgwfd",ke=n(84105),be=function(e){var t,n=e.buttonDataSource,s=e.onClick,r=(0,d.useContext)(Ue),i=r.allSelect,c=r.setAllSelect,l=r.setSelectArrs,m=r.dataSource,h=r.selectArrs,f=r.useBatchStatus,x=r.dispatch,g=r.params,_=r.getData,j=r.detailLeftMenus,k=r.main_category_id,w=r.setSelectArrsAll,L=(0,d.useState)(!1),N=u()(L,2),S=N[0],T=N[1],Z=(0,d.useState)(""),P=u()(Z,2),I=P[0],A=P[1];j.course_modules&&(t=j.course_modules.filter((function(e){return"program_homework"===e.type}))[0]);var M=(0,C.jsx)("div",{className:je,onMouseLeave:function(e){return T(!1)},children:(0,C.jsxs)(ae.Z,{onClick:function(){var e=a()(o()().mark((function e(t){var n;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.item,n=t.key,t.keyPath,t.domEvent,""!=h){e.next=4;break}return p.ZP.error("请选择你要操作的任务"),e.abrupt("return",null);case 4:return e.next=6,(0,b.ZP)("/api/courses/".concat(g.id,"/homework_commons/move_to_category.json"),{method:"post",body:{homework_ids:h,new_category_id:n}});case 6:0===e.sent.status&&(p.ZP.success("操作成功"),f(!1),_(),x({type:"classroomList/getClassroomLeftMenus",payload:{id:g.coursesId}}));case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),style:{maxHeight:300,width:240,overflow:"auto"},children:[(0,C.jsx)("li",{className:"ant-menu-item multi-llipsis1e ant-menu-item-only-child",children:(0,C.jsx)(H.Z,{onChange:function(e){A(e.target.value)}})}),t&&t.second_category.filter((function(e){return"未分配目录"!==e.category_name})).map((function(e,t){var n;if(!(""!==I&&e.category_name.indexOf(I)<0))return(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(ae.Z.Item,{className:"multi-llipsis1e",children:e.category_name},e.category_id),null==e||null===(n=e.third_category)||void 0===n?void 0:n.map((function(e){return(0,C.jsx)(ae.Z.Item,{style:{marginLeft:20},className:"multi-llipsis1e",children:e.category_name},e.category_id)}))]})})),(0,C.jsx)("li",{className:"ant-menu-item multi-llipsis1e ant-menu-item-only-child",onClick:function(e){e.preventDefault(),x({type:"classroomList/setActionTabs",payload:{key:"添加目录",params:g,selectArrs:{category_id:k,type:"program_homework"}}})},children:"新建子目录..."})]})});return(0,C.jsxs)("div",{className:ye,children:[(0,C.jsxs)("div",{children:[(0,C.jsx)("div",{children:(0,C.jsxs)(W.Z,{checked:i,onChange:function(e){c(e.target.checked),l(e.target.checked?m.map((function(e){return e.homework_id})):[]),e.target.checked?w(y()(m)):w([])},children:["全选本页(",h.length,""]})}),(0,v.GJ)()&&n.map((function(e){return(0,C.jsx)("div",{children:(0,C.jsx)(B.ZP,{type:"primary",icon:e.icon,className:_e,onClick:function(){return s(e)},children:e.name})},e.key)})),(0,C.jsx)("div",{children:(0,C.jsx)(B.ZP,{type:"primary",onClick:function(){var e={courseId:g.id,container_type:"program_homework"};g.categoryId&&(e.category_id=g.categoryId),x({type:"classroomList/getAllTaskList",payload:e}),x({type:"classroomList/setActionTabs",payload:{key:"调整排序"}})},icon:(0,C.jsx)("i",{className:"iconfont icon-tiaozhengpaixu2"}),className:_e,children:"调整排序"})}),(0,v.GJ)()&&(0,C.jsx)("div",{children:(0,C.jsx)(pe.Z,{open:S,placement:"topLeft",dropdownRender:function(){return M},getPopupContainer:function(e){return e.parentNode},children:(0,C.jsx)("span",{className:"ant-dropdown-link",onMouseEnter:function(e){return T(!0)},children:(0,C.jsx)(B.ZP,{type:"primary",className:_e,style:{position:"relative",zIndex:999},icon:(0,C.jsx)("i",{className:"iconfont icon-yidongmulu"}),children:(0,C.jsxs)("span",{children:["移动到目录 ",(0,C.jsx)(ke.Z,{})]})})})})})]}),(0,C.jsx)("div",{children:(0,C.jsx)(B.ZP,{type:"primary",ghost:!0,onClick:function(){f(!1),l([])},children:"取消操作"})})]})},we=n(1710),Ce={listContainer:"listContainer___vU05G",info:"info___fXyuU",title:"title___fItHS",left:"left___MFkuv",right:"right___JT8Xj",flexBox:"flexBox___n8e_m",detail:"detail___HXdq0",iconV:"iconV___CwPu5",shixunTag:"shixunTag___oYTPp"},Le=n(51101),Ne=function(e){var t,n,s,r,i,l,h,f,g,_,j,k,w=e.dataSource,L=e.params,N=e.classroomList,S=e.manageAllGroup,T=(0,d.useContext)(Ue),Z=(T.batchStatus,T.selectArrs),P=T.setSelectArrs,I=T.selectArrsAll,A=T.setSelectArrsAll,M=T.dispatch,E=(0,m.useParams)(),O=(0,d.useState)(!1),R=u()(O,2),H=R[0],D=R[1],z=(0,d.useState)([]),B=u()(z,2),G=B[0],F=B[1];E=c()(c()(c()({},L),E),{},{category:null===(t=E)||void 0===t?void 0:t.categoryId}),(0,d.useEffect)((function(){F([]),D(!1)}),[]);var J=[{title:"班级",dataIndex:"course_group_name",key:"course_group_name"},{title:"状态",dataIndex:"status",key:"status",width:80,filters:[{text:"未开始",value:"未开始"},{text:"提交中",value:"提交中"},{text:"补交中",value:"补交中"},{text:"已截止",value:"已截止"},{text:"未发布",value:"未发布"}],onFilter:function(e,t){return 0===t.status.indexOf(e)}},{title:"提交情况",dataIndex:"statistics",key:"statistics",width:80,render:function(e){var t,n;return"--"===e?e:(0,C.jsxs)("span",{children:[(0,C.jsx)("span",{children:null==e||null===(t=e.split("/"))||void 0===t?void 0:t[0]})," / ",(0,C.jsx)("span",{children:null==e||null===(n=e.split("/"))||void 0===n?void 0:n[1]})]})}},{title:"发布时间",dataIndex:"publish_time",key:"publish_time",sorter:!0,showSorterTooltip:!1,sortOrder:"publish_time"===E.sort_by?"desc"===E.sort_direction?"descend":"ascend":null},{title:"截止时间",dataIndex:"end_time",key:"end_time",sorter:!0,showSorterTooltip:!1,sortOrder:"end_time"===E.sort_by?"desc"===E.sort_direction?"descend":"ascend":null},{title:"补交时间",dataIndex:"late_time",key:"late_time",sorter:!0,showSorterTooltip:!1,sortOrder:"late_time"===E.sort_by?"desc"===E.sort_direction?"descend":"ascend":null},{title:"分班老师",dataIndex:"teachers",key:"teachers",width:150,ellipsis:{showTitle:!1},render:function(e){return"--"!==e&&e?(0,C.jsx)("span",{title:e,children:e}):"--"}}];function V(){return U.apply(this,arguments)}function U(){return(U=a()(o()().mark((function e(){var t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,b.ZP)("/api/homework_commons/".concat(w.homework_id,"/group_settings_statistics.json"),{method:"get",params:c()({},E)});case 2:t=e.sent,F(t.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return(0,C.jsxs)("div",{className:Ce.listContainer,onClick:function(e){e.stopPropagation(),(0,v.dE)()?(0,x.xg)("/classrooms/".concat(E.coursesId,"/program_homework/").concat(w.homework_id,"/detail?tabs=1")):(0,x.xg)("/classrooms/".concat(E.coursesId,"/program_homework/").concat(w.homework_id,"/detail"))},children:[(0,v.GJ)()&&(0,C.jsx)(W.Z,{onClick:function(e){e.stopPropagation()},style:{margin:"11px 0 0 10px"},checked:Z.includes(w.homework_id),onChange:function(){return e=w.homework_id,void(Z.includes(e)?(P(Z.filter((function(t){return t!==e}))),A(I.filter((function(t){return t.homework_id!==e})))):(P([].concat(y()(Z),[e])),A([].concat(y()(I),[w]))));var e}}),(0,C.jsxs)("div",{className:Ce.info,children:[(0,C.jsxs)("div",{className:Ce.title,children:[(0,C.jsxs)("div",{className:Ce.left,style:(0,v.dE)()?{paddingRight:(null==w?void 0:w.challenge_count)-(null==w?void 0:w.finished_challenge_count)?60:140}:{},children:[(0,v.GJ)()&&(0,C.jsx)(Le.Z,{value:null===(n=w.status)||void 0===n?void 0:n[0],children:(0,C.jsx)(x.VV,{temporary:!0,style:{margin:"0px 10px 0px 0px"},status:w.status})}),(0,v.dE)()&&(0,C.jsx)(x.VV,{temporary:!0,style:{margin:"0px 10px 0px 0px"},status:w.status}),(0,C.jsx)("span",{onClick:function(e){return e.stopPropagation()},children:(0,C.jsx)(m.Link,{target:"_blank",to:"/classrooms/".concat(E.coursesId,"/program_homework/").concat(w.homework_id,"/detail").concat((0,v.dE)()?"?tabs=1":""),children:w.name})})]}),(0,C.jsxs)("div",{className:Ce.right,children:[(0,v.GJ)()&&"未发布"===w.status&&(0,C.jsx)(m.Link,{target:"_blank",to:"/",onClick:function(){var e=a()(o()().mark((function e(t){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.stopPropagation(),t.preventDefault(),M({type:"classroomList/setActionTabs",payload:{key:"立即发布",selectArrs:[null==w?void 0:w.homework_id],selectArrsAll:[w],params:c()({},E),type:2}});case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),children:(0,C.jsxs)("aside",{className:Ce.flexBox,children:[(0,C.jsx)("i",{className:"iconfont icon-yishezhifabushijian1"}),(0,C.jsx)("div",{children:"发布"})]})}),(0,v.dE)()&&(0,C.jsxs)("div",{className:Ce.actionIcon,children:[(null==w?void 0:w.challenge_count)-(null==w?void 0:w.finished_challenge_count)==0&&(0,C.jsx)("i",{className:"iconfont icon-yiwancheng1"}),!(null!==(s=w.status)&&void 0!==s&&s.includes("已截止"))&&(0,C.jsxs)("aside",{onClick:function(){var e=a()(o()().mark((function e(t){var n;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.stopPropagation(),e.next=3,(0,b.ZP)("/api/problems/".concat(null==w?void 0:w.start_identifier,"/start.json"),{method:"get"});case 3:(n=e.sent)&&(window.open("/myproblems/".concat(null==n?void 0:n.identifier,"?type=1")),localStorage.setItem("program_homework",[E.coursesId,w.homework_id]));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),className:Ce.flexBox,style:{marginRight:10},children:[(0,C.jsx)("i",{className:"iconfont icon-kaishixuexi font14"}),(0,C.jsx)("div",{children:"开始学习"})]}),(null===(r=w.status)||void 0===r?void 0:r.includes("已截止"))&&(0,C.jsxs)("aside",{className:Ce.flexBox,style:{marginRight:10},children:[(0,C.jsx)("i",{className:"iconfont icon-chakanzuoye font14"}),(0,C.jsx)("div",{children:"查看作业"})]})]}),(0,v.GJ)()&&(0,C.jsx)(pe.Z,{placement:"bottomCenter",overlayClassName:Ce.dro,dropdownRender:function(){return(0,C.jsxs)(ae.Z,{children:[(0,C.jsx)(ae.Z.Item,{style:{textAlign:"center"},children:(0,C.jsx)(m.Link,{target:"_blank",to:"/",onClick:function(){var e=a()(o()().mark((function e(t){var n;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.stopPropagation(),t.preventDefault(),!(0,v.Rm)()||null!==(n=N.AssistantObject)&&void 0!==n&&null!==(n=n.hack)&&void 0!==n&&n.can_publish){e.next=5;break}return p.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能"),e.abrupt("return");case 5:M({type:"classroomList/setActionTabs",payload:{key:"立即发布",selectArrs:[null==w?void 0:w.homework_id],selectArrsAll:[w],params:c()({},E),type:2,manage_all_group:S}});case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),children:"立即发布"})},1),(0,C.jsx)(ae.Z.Item,{style:{textAlign:"center"},children:(0,C.jsx)(m.Link,{target:"_blank",to:"/",onClick:function(){var e=a()(o()().mark((function e(t){var n;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.stopPropagation(),t.preventDefault(),!(0,v.Rm)()||null!==(n=N.AssistantObject)&&void 0!==n&&null!==(n=n.hack)&&void 0!==n&&n.can_stop){e.next=5;break}return p.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能"),e.abrupt("return");case 5:M({type:"classroomList/setActionTabs",payload:{key:"立即截止",selectArrs:[null==w?void 0:w.homework_id],selectArrsAll:[w],params:c()({},E),type:2}});case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),children:"立即截止"})},2),(0,C.jsx)(ae.Z.Item,{style:{textAlign:"center"},children:(0,C.jsx)(m.Link,{target:"_blank",to:"/",onClick:function(){var e=a()(o()().mark((function e(t){var n,s;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.stopPropagation(),t.preventDefault(),!(0,v.Rm)()||null!==(n=N.AssistantObject)&&void 0!==n&&null!==(n=n.hack)&&void 0!==n&&n.can_delete){e.next=5;break}return p.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能"),e.abrupt("return");case 5:M({type:"classroomList/setActionTabs",payload:{key:"删除",selectArrs:[null==w?void 0:w.homework_id],selectArrsAll:I,params:E,status:null==w||null===(s=w.status)||void 0===s?void 0:s[0]}});case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),children:"立即删除"})},22),(0,C.jsx)(ae.Z.Item,{style:{textAlign:"center"},children:(0,C.jsx)(m.Link,{target:"_blank",onClick:function(e){e.stopPropagation()},to:"/classrooms/".concat(E.coursesId,"/program_homework/").concat(w.homework_id,"/detail?tabs=3"),children:"高级设置"})},6)]})},children:(0,C.jsxs)("aside",{onClick:function(e){return e.stopPropagation()},className:Ce.flexBox,style:{marginRight:6,cursor:"default"},children:[(0,C.jsx)("i",{className:"iconfont icon-gengduo4"}),(0,C.jsx)("div",{children:"更多"})]})})]})]}),(0,C.jsx)("div",{className:Ce.detail,children:(0,v.GJ)()&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("span",{className:"c-grey-333 mr20",children:w.author}),["未开始","进行中","已截止","提交中","补交中","已结束","匿评中","申诉中"].includes(null==w||null===(i=w.status)||void 0===i?void 0:i[0])&&!!w.uncommit_count&&(0,C.jsxs)("span",{className:"c-grey-999 mr10",children:[(0,C.jsx)("span",{className:"mr5",children:"未做题"}),w.uncommit_count,"人"]}),["未开始","进行中","已截止","提交中","补交中","已结束","匿评中","申诉中"].includes(null==w||null===(l=w.status)||void 0===l?void 0:l[0])&&!!w.commit_count&&(0,C.jsxs)("span",{className:"c-grey-999 mr10",children:[(0,C.jsx)("span",{className:"mr5",children:"已做题"}),w.commit_count,"人"]}),["未开始","进行中","已截止","提交中","补交中","已结束","匿评中","申诉中"].includes(null==w||null===(h=w.status)||void 0===h?void 0:h[0])&&!!w.compelete_count&&(0,C.jsxs)("span",{className:"c-grey-999 mr10",children:[(0,C.jsx)("span",{className:"mr5",children:"已完成"}),w.compelete_count,"人"]}),["未开始","进行中","已截止","提交中","补交中","匿评中","申诉中"].includes(null==w||null===(f=w.status)||void 0===f?void 0:f[0])&&(0,C.jsxs)("span",{className:"c-grey-999 mr10",children:[(0,C.jsx)("span",{className:"mr5",children:"发布时间"}),w.publish_time]}),["未开始","进行中","已截止","提交中","补交中","匿评中","申诉中"].includes(null==w||null===(g=w.status)||void 0===g?void 0:g[0])&&(0,C.jsxs)("span",{className:"c-grey-999 mr10",children:[(0,C.jsx)("span",{className:"mr5",children:"截止时间"}),w.end_time]}),["已结束"].includes(null==w||null===(_=w.status)||void 0===_?void 0:_[0])&&(0,C.jsxs)("span",{className:"c-grey-999 mr10",children:[(0,C.jsx)("span",{className:"mr5",children:"结束时间"}),w.status_time]}),!(null==w||!w.late_time)&&"--"!==(null==w?void 0:w.late_time)&&(0,C.jsxs)("span",{className:"c-grey-999",children:[(0,C.jsx)("span",{className:"mr5",children:"补交截止时间"}),null==w?void 0:w.late_time]}),["未开始","进行中","已截止","提交中","补交中","匿评中","申诉中"].includes(null==w||null===(j=w.status)||void 0===j?void 0:j[0])&&(0,C.jsxs)("span",{className:Ce.iconV,onClick:function(){var e=a()(o()().mark((function e(t){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.stopPropagation(),t.preventDefault(),H||V(),D(!H);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),children:[(0,C.jsx)("i",{className:"iconfont icon-".concat(H?"shouqi":"xiala2")})," "]})]})}),(0,C.jsxs)("div",{className:Ce.content,children:[(0,v.dE)()&&(0,C.jsxs)("span",{className:Ce.infoStuIcon,children:[(0,C.jsx)("span",{className:"c-grey-333",children:w.author}),"已截止"===(null==w||null===(k=w.status)||void 0===k?void 0:k[0])&&!(null==w||!w.status_time)&&(0,C.jsxs)("span",{className:"c-grey-999 ml20",children:[(0,C.jsx)("i",{className:"iconfont icon-shengyushijian font12 mr5"})," ",null==w?void 0:w.status_time]}),(0,C.jsxs)("span",{className:"ml20 c-grey-999",children:[(0,C.jsx)("i",{className:"iconfont icon-shijian1 font12 mr5"}),null==w?void 0:w.commit_count,"/",null==w?void 0:w.all_count," ",w.status_time]})]}),(0,v.GJ)()&&"未发布"!==w.status&&H&&G.length>5&&(0,C.jsx)(we.Z,{scroll:{y:240},onRow:function(e){return{onClick:function(e){e.stopPropagation(),e.preventDefault()}}},onHeaderRow:function(e,t){return{onClick:function(e){e.stopPropagation(),e.preventDefault()}}},pagination:!1,dataSource:G,style:{marginTop:14,marginRight:6,cursor:"default"},onChange:function(e,t,n){n.field&&(E.sort_by=n.field),n.order||(E.sort_direction="asc"),"ascend"===n.order&&(E.sort_direction="asc"),"descend"===n.order&&(E.sort_direction="desc"),n.order||(E.sort_direction="asc"),V()},columns:J}),(0,v.GJ)()&&"未发布"!==w.status&&H&&G.length<6&&G.length>0&&(0,C.jsx)(we.Z,{onRow:function(e){return{onClick:function(e){e.stopPropagation(),e.preventDefault()}}},onHeaderRow:function(e,t){return{onClick:function(e){e.stopPropagation(),e.preventDefault()}}},pagination:!1,dataSource:G,style:{marginTop:14,marginRight:6,cursor:"default"},onChange:function(e,t,n){n.field&&(E.sort_by=n.field),n.order||(E.sort_direction="asc"),"ascend"===n.order&&(E.sort_direction="asc"),"descend"===n.order&&(E.sort_direction="desc"),n.order||(E.sort_direction="asc"),V()},columns:J})]})]})]})},Se="bg___KWyBO",Te=n(44589),Ze=n(39180),Pe=n.n(Ze),Ie=n(43428),Ae=(0,Te.W8)((function(e){var t=e.item;return(0,C.jsxs)("li",{children:[(0,C.jsx)("h3",{children:t.task_name}),(0,C.jsxs)("p",{children:[t.user_name,(0,C.jsx)("span",{style:{marginLeft:"20px"},children:t.category})]})]})})),Me=(0,Te.JN)((function(e){var t=e.items;return(0,C.jsx)("ul",{className:"task-list-container",children:t.map((function(e,t){return(0,C.jsx)(Ae,{index:t,item:e},"".concat(e.task_id))}))})})),Ee=function(e){var t=e.data,n=e.callback,s=e.onCancel,o=e.visible,r=void 0!==o&&o,a=(0,d.useState)(t),i=u()(a,2),c=i[0],l=i[1];return(0,d.useEffect)((function(){l(t)}),[JSON.stringify(t)]),(0,C.jsxs)(Ie.Z,{placement:"bottom",height:"100%",closable:!0,onClose:s,style:{zIndex:9999},open:r,rootClassName:"sort-list-panel",children:[(0,C.jsxs)("p",{className:"sort-list-tip",children:[(0,C.jsx)("span",{children:"温馨提示:请在列表中长按鼠标左键,进行拖放排序。完成排序后请点击“保存”"}),(0,C.jsx)(B.ZP,{type:"ghost",onClick:s,style:{marginRight:10},children:"取消"}),(0,C.jsx)(B.ZP,{disabled:0===c.length,type:"primary",onClick:function(){n(c.map((function(e){return e.task_id})))},children:"保存"})]}),(0,C.jsx)(Me,{axis:"xy",helperClass:"dragging-li",items:c,onSortEnd:function(e){var t=e.newIndex,n=e.oldIndex;l(Pe()(c,n,t))}})]})},Oe="otherHomeworkWrap___WlvHv",Re="otherHomeworkContainer___Qfj2O",He="flex___q8ATC",De="search___xedy7",ze="content___VSdQb",Be="listItem___u6wwP",We="info___vvX3a",Ge="title___FtVL7",Fe="describe___g43sA",Je="footer___TNGYY",Ve=function(e){var t=e.courseId,n=e.type,s=e.onCancel,r=(0,m.useParams)(),i=(0,d.useState)({targerData:[],originData:[]}),l=u()(i,2),h=l[0],f=l[1],v=(0,d.useState)([]),g=u()(v,2),_=g[0],j=g[1],k=(0,d.useState)(!1),w=u()(k,2),L=w[0],N=w[1],S=function(){var e=a()(o()().mark((function e(){var s;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return N(!0),e.next=3,(0,b.ZP)("/api/courses/".concat(t,"/homework_commons/impersonal_list.json"),{method:"get",params:{type:n}});case 3:s=e.sent,N(!1),f({targerData:s.homeworks,originData:s.homeworks});case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();(0,d.useEffect)((function(){S()}),[]);var T=function(){var e=a()(o()().mark((function e(){var t,n;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return N(!0),t={homework_common_ids:_},r.categoryId&&(t=c()(c()({},t),{},{category_id:r.categoryId})),e.next=5,(0,b.ZP)("/api/courses/".concat(r.coursesId,"/homework_commons/create_collaborators.json"),{method:"POST",body:t});case 5:(n=e.sent)&&n.homework_ids.length>0&&(p.ZP.success("提交成功"),s()),N(!1);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,C.jsx)("div",{className:"animated fadeInUp fast ".concat(Oe),children:(0,C.jsxs)("div",{className:Re,children:[(0,C.jsx)("div",{className:De,children:(0,C.jsx)(H.Z.Search,{size:"middle",enterButton:"搜索",onSearch:function(e){var t=h.originData.filter((function(t){return t.name.indexOf(e)>-1}));f(c()(c()({},h),{},{targerData:t}))},placeholder:"请输入图文作业名称进行查询"})}),(0,C.jsx)("div",{className:ze,children:h.targerData.map((function(e){return(0,C.jsxs)("div",{className:"".concat(Be," mb10"),children:[(0,C.jsx)(W.Z,{checked:_.includes(e.id),onChange:function(t){return function(e,t){e.target.checked?j([].concat(y()(_),[t])):j(_.filter((function(e){return e!==t})))}(t,e.id)}}),(0,C.jsxs)("div",{className:We,children:[(0,C.jsxs)("div",{className:"".concat(He," mb10"),style:{justifyContent:"space-between"},children:[(0,C.jsx)("div",{className:Ge,children:e.name}),(0,C.jsx)("div",{children:(0,C.jsx)(B.ZP,{type:"primary",ghost:!0,onClick:function(){return(0,x.xg)("/classrooms/".concat(r.coursesId,"/common_homework/").concat(e.id,"/detail"))},children:"查看作业"})})]}),(0,C.jsx)("div",{className:"mb20 font14 c-grey-999 ".concat(Fe),children:e.description}),(0,C.jsxs)("div",{className:"font12",children:[(0,C.jsx)("span",{className:"c-grey-333 mr20",children:e.user.name}),(0,C.jsxs)("span",{className:"c-grey-999",children:["创建时间:",e.created_at]})]})]})]},e.id)}))}),(0,C.jsxs)("div",{className:Je,children:[(0,C.jsx)(B.ZP,{type:"primary",ghost:!0,onClick:s,children:"取消"}),(0,C.jsx)(B.ZP,{type:"primary",disabled:0===_.length||L,onClick:function(){T()},children:"确定"})]})]})})},Ue=(0,d.createContext)({selectArrs:[]}),Ye=(0,m.connect)((function(e){var t=e.classroomList,n=e.loading,s=e.user;return{classroomList:t,globalSetting:e.globalSetting,user:s,loading:n.effects}}))((function(e){var t,n,s=e.classroomList,r=e.loading,i=e.dispatch,l=e.user,g=(0,m.useLocation)(),y=(0,m.useParams)(),_=(0,d.useState)((function(){return c()(c()({},y),{},{id:y.coursesId,limit:20})})),j=u()(_,2),k=j[0],b=j[1],w=(0,m.useSearchParams)(),L=u()(w,1)[0],P=(0,d.useState)([]),A=u()(P,2),M=A[0],E=A[1],O=(0,d.useState)(!1),R=u()(O,2),H=R[0],z=R[1],B=(0,d.useState)(!1),W=u()(B,2),G=W[0],F=W[1],J=(0,d.useState)([]),V=u()(J,2),U=V[0],Y=V[1],q=(0,d.useState)(!1),K=u()(q,2),X=K[0],Q=K[1],$=(0,d.useState)("默认排序"),ee=u()($,2),te=ee[0],se=ee[1],oe=l.userInfo,ae=s.detailCommonHomeworksList,ie=s.detailLeftMenus,ce=s.detailTopBanner,le=s.taskList;k.type=1,k.categoryId?k.category=k.categoryId:delete k.category,(0,d.useEffect)((function(){var e=L.get("tabs");e&&void 0!==e&&((0,v.GJ)()?k.status=e:k.order=e)}),[g.search]),(0,d.useEffect)((function(){"0"===L.get("tabs")&&(k.status="0",k.page=1),k.status=L.get("tabs")}),[L.get("tabs")]),(0,d.useEffect)((function(){b(c()(c()({},k),y))}),[null==y?void 0:y.categoryId]),(0,d.useEffect)((function(){var e,t;if(y.categoryId?(k.categoryId=y.categoryId,k.category=y.categoryId):delete k.category,null!=l&&null!==(e=l.userInfo)&&void 0!==e&&e.login){var n;i({type:"classroomList/getAssistantPermissions",payload:{course_id:k.id}});var s=x.cX.getItem("".concat(null==l||null===(n=l.userInfo)||void 0===n?void 0:n.login).concat((0,v.GJ)()?"Teacher":"Student"),"CommonHomework");s&&(k.sort_by=null==s?void 0:s.type,k.sort_direction=null==s?void 0:s.direction,se(null==s?void 0:s.name));var o=L.get("tabs");o&&void 0!==o&&((0,v.GJ)()?k.status=o:k.order=o),ue({})}else if(null!=l&&null!==(t=l.userInfo)&&void 0!==t&&t.username){var r=L.get("tabs");r&&void 0!==r&&((0,v.GJ)()?k.status=r:k.order=r),ue({})}}),[null==l||null===(t=l.userInfo)||void 0===t?void 0:t.login,null==g?void 0:g.pathname]),(0,d.useEffect)((function(){"清除选择数据"===s.actionTabs.key&&(E([]),Y([])),"目录重命名成功"===s.actionTabs.key&&ue()}),[s.actionTabs.key]),(0,d.useEffect)((function(){E([])}),[ae]),(0,d.useEffect)((function(){F(!1)}),[k.categoryId]),(0,d.useEffect)((function(){ae&&ae.homeworks&&(M.length===ae.homeworks.length&&M.length>0?z(!0):M.length!==ae.homeworks.length&&z(!1))}),[M]);var ue=function(){E([]),Y([]),i({type:"classroomList/getClassroomTeacherCommonList",payload:c()(c()({},k),{},{type:5})})};ie.course_modules&&s.detailLeftMenus.course_modules.filter((function(e){return"common_homework"===e.type}))[0];["删除","立即发布","立即截止","收藏"].filter((function(e){return null!=oe&&oe.main_site?e:"收藏"!==e})).filter((function(e){return!!(0,v.GJ)()||"删除"!==e}));var de=function(){i({type:"shixunHomeworks/setActionTabs",payload:{key:"题库选用",params:k}})},pe=function(){var e=a()(o()().mark((function e(t){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i({type:"classroomList/updateTaskPosition",payload:{category_id:k.categoryId,courseId:k.id,task_ids:t,container_type:"program_homework"}});case 2:ue();case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),he=(0,d.useMemo)((function(){var e=[];return le.length>0&&(e=le.map((function(e){return{user_name:e.user_name,task_name:e.task_name,task_id:e.task_id,category:e.category}}))),e}),[le]);return(0,C.jsx)(Ue.Provider,{value:{params:k,batchStatus:G,selectArrs:M,setSelectArrs:E,allSelect:H,dataSource:ae.homeworks||[],detailLeftMenus:ie,main_category_id:ae.main_category_id||"",selectArrsAll:U,setAllSelect:z,useBatchStatus:F,dispatch:i,getData:ue,setSelectArrsAll:Y},children:(0,C.jsxs)("section",{children:[(0,C.jsxs)("aside",{className:Se,children:[(0,C.jsx)(me,{isLoading:r["classroomList/getClassroomTeacherCommonList"],tabDataSource:(0,v.GJ)()?[{name:"全部",id:0,total:ae.all_count||0},{name:"未发布",id:1,total:ae.unpublished_count||0},{name:"未开始",id:4,total:ae.not_start_count||0},{name:"进行中",id:2,total:ae.in_progress_count||0},{name:"已截止",id:3,total:ae.overed_count||0}]:[{name:"全部",id:0},{name:"提交中",id:2},{name:"补交中",id:10},{name:"已截止",id:3}],classroomList:s,isAdmin:(0,v.GJ)(),TooltipTitle:k.categoryId?"目录重命名":"新建子目录",categoryId:k.categoryId,dropdownMenu:[{name:"新建图文作业",id:"1"},{name:"选用资源",id:"2"}],isShowRightControl:"未分配目录"!==(0,x.Oo)(null==ie?void 0:ie.course_modules,k.categoryId),onTabMenuClick:function(e){void 0!==e.id&&((0,v.GJ)(),k.status=e.id),F(!1),k.page=1,m.history.replace("".concat(g.pathname,"?tabs=").concat(e.id)),ue(k)},defaultSelectedKeys:[L.get("tabs")?L.get("tabs"):"0"],onTooltipTitleClick:function(){i({type:"classroomList/setActionTabs",payload:{key:k.categoryId?"目录重命名":"添加目录",params:k,selectArrs:{category_name:null==ae?void 0:ae.category_name,category_id:(null==ae?void 0:ae.category_id)||(null==ae?void 0:ae.main_category_id)},cb:function(){ue()}}})},onDropdownMenuClick:function(e){var t;!(0,v.Rm)()||null!==(t=s.AssistantObject.hack)&&void 0!==t&&t.can_create?"1"===e?m.history.push("/classrooms/".concat(k.coursesId,"/program_homework/").concat(k.categoryId,"/add")):"2"===e?de():"3"===e&&Q(!0):p.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能")}}),(0,C.jsx)(ge,{dataSource:ae.homeworks||[],isAdmin:(0,v.GJ)(),batchStatus:G,SortMenuName:te,setSortMenuName:se,onSearch:function(e){k.search=e,k.page=1,ue()},onSort:function(e){var t;k.sort_by=e.type,k.sort_direction=e.direction,k.page=1,x.cX.setItem("".concat(null==l||null===(t=l.userInfo)||void 0===t?void 0:t.login).concat((0,v.GJ)()?"Teacher":"Student"),e,"CommonHomework"),ue(k)},onBatch:function(e){return F(e)}})]}),(0,C.jsx)("aside",{className:"minH500 skt-loading relative pb40 mb30",children:!r[(0,v.GJ)()?"classroomList/getClassroomTeacherCommonList":"classroomList/getClassroomCommonList"]&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)("aside",{className:"animated fadeIn",children:[null==ae||null===(n=ae.homeworks)||void 0===n?void 0:n.map((function(e,t){return(0,C.jsx)(Ne,{dataSource:e,params:k,classroomList:s,manageAllGroup:null==ae?void 0:ae.manage_all_group},t)})),!r[(0,v.GJ)()?"classroomList/getClassroomTeacherCommonList":"classroomList/getClassroomCommonList"]&&(0,C.jsx)("aside",{className:"tc mb50 mt30",children:(null==ae?void 0:ae.query_total_count)>10&&(0,C.jsx)(h.Z,{hideOnSinglePage:!0,showSizeChanger:!1,onChange:function(e,t){k.page=e,ue()},defaultPageSize:20,defaultCurrent:1,current:k.page||1,total:(0,v.GJ)()?ae.query_total_count:ae.student_all_count})})]}),M.length>0&&(0,v.GJ)()&&(0,C.jsx)(f.Z,{offsetBottom:0,children:(0,C.jsx)(be,{buttonDataSource:[{key:"publish",name:"批量发布",icon:(0,C.jsx)("i",{className:"iconfont icon-fabu5"})},{key:"deadline",name:"批量截止",icon:(0,C.jsx)("i",{className:"iconfont icon-piliangjiezhi2"})},{key:"delete",name:"批量删除",icon:(0,C.jsx)("i",{className:"iconfont icon-piliangshanchu2"})}].filter((function(e){return!(!(0,v.GJ)()&&!(0,v.Rm)())||"批量删除"!==e.name})).filter((function(e){return!!ce.is_public||"设为公开"!==e.name})),onClick:function(e){var t,n,o;if(0===M.length)return p.ZP.error("请选择你要操作的任务"),!1;var r=e.name,a={key:r,selectArrs:M,selectArrsAll:U,type:["publish","deadline"].includes(e.key)?1:"",params:k};switch(e.key){case"publish":if(r="立即发布",(0,v.Rm)()&&(null===(t=s.AssistantObject)||void 0===t||null===(t=t.hack)||void 0===t||!t.can_publish))return void p.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能");break;case"deadline":if(r="立即截止",(0,v.Rm)()&&(null===(n=s.AssistantObject)||void 0===n||null===(n=n.hack)||void 0===n||!n.can_stop))return void p.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能");break;case"delete":if(r="删除",(0,v.Rm)()&&(null===(o=s.AssistantObject)||void 0===o||null===(o=o.hack)||void 0===o||!o.can_delete))return void p.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能");break;case"collection":r="收藏"}i({type:"classroomList/setActionTabs",payload:c()(c()({},a),{},{key:r})})}})})]})}),(0,C.jsx)(N,{onCallback:function(){return F(!1)}}),(0,C.jsx)(S.Z,{onCallback:function(){return F(!1)},courseEndTime:null==ae?void 0:ae.course_end_time}),(0,C.jsx)(T.Z,{courseEndTime:null==ae?void 0:ae.course_end_time,courseId:y.coursesId,visible:"立即截止"===s.actionTabs.key,isBatch:2!==s.actionTabs.type,homeworkIds:s.actionTabs.selectArrs,successCallback:function(){F(!1),ue()}}),(0,C.jsx)(Z,{}),(0,C.jsx)(I,{onCallback:function(){return F(!1)}}),(0,C.jsx)(D,{onCallback:function(){return F(!1)}}),(0,C.jsx)(ne,{refreshList:ue}),(0,C.jsx)(re,{}),(0,C.jsx)(Ee,{visible:"调整排序"===s.actionTabs.key,callback:pe,data:he,onCancel:function(){i({type:"classroomList/setActionTabs",payload:{key:""}})}}),X&&(0,C.jsx)(Ve,{courseId:k.coursesId,type:"1",onCancel:function(){return Q(!1)}})]})})}))},27666:function(e,t,n){"use strict";var s=n(15142),o=n(16089);t.Z=function(e){let t;const n=n=>()=>{t=null,e.apply(void 0,(0,s.Z)(n))},r=function(){if(null==t){for(var e=arguments.length,s=new Array(e),r=0;r<e;r++)s[r]=arguments[r];t=(0,o.Z)(n(s))}};return r.cancel=()=>{o.Z.cancel(t),t=null},r}},81228:function(e,t,n){"use strict";n.d(t,{Z:function(){return C}});var s=n(42573),o=n(58698),r=n(74700),a=n(73300),i=n(59301),c=n(92310),l=n.n(c),u=n(29301),d=n(2738),m=n(27666),p=n(36355),h=n(83116),f=n(37613);const x=e=>{const{componentCls:t}=e;return{[t]:{position:"fixed",zIndex:e.zIndexPopup}}};var v=(0,h.Z)("Affix",(e=>{const t=(0,f.TS)(e,{zIndexPopup:e.zIndexBase+10});return[x(t)]}));function g(e){return e!==window?e.getBoundingClientRect():{top:0,bottom:window.innerHeight}}function y(e,t,n){if(void 0!==n&&t.top>e.top-n)return n+t.top}function _(e,t,n){if(void 0!==n&&t.bottom<e.bottom+n){return n+(window.innerHeight-t.bottom)}}const j=["resize","scroll","touchstart","touchmove","touchend","pageshow","load"];function k(){return"undefined"!=typeof window?window:null}var b;!function(e){e[e.None=0]="None",e[e.Prepare=1]="Prepare"}(b||(b={}));let w=function(e){(0,r.Z)(n,e);var t=(0,a.Z)(n);function n(){var e;return(0,s.Z)(this,n),(e=t.apply(this,arguments)).state={status:b.None,lastAffix:!1,prevTarget:null},e.placeholderNodeRef=(0,i.createRef)(),e.fixedNodeRef=(0,i.createRef)(),e.addListeners=()=>{const t=e.getTargetFunc(),n=null==t?void 0:t(),{prevTarget:s}=e.state;s!==n&&(j.forEach((t=>{null==s||s.removeEventListener(t,e.lazyUpdatePosition),null==n||n.addEventListener(t,e.lazyUpdatePosition)})),e.updatePosition(),e.setState({prevTarget:n}))},e.removeListeners=()=>{e.timer&&(clearTimeout(e.timer),e.timer=null);const{prevTarget:t}=e.state,n=e.getTargetFunc(),s=null==n?void 0:n();j.forEach((n=>{null==s||s.removeEventListener(n,e.lazyUpdatePosition),null==t||t.removeEventListener(n,e.lazyUpdatePosition)})),e.updatePosition.cancel(),e.lazyUpdatePosition.cancel()},e.getOffsetTop=()=>{const{offsetBottom:t,offsetTop:n}=e.props;return void 0===t&&void 0===n?0:n},e.getOffsetBottom=()=>e.props.offsetBottom,e.measure=()=>{const{status:t,lastAffix:n}=e.state,{onChange:s}=e.props,o=e.getTargetFunc();if(t!==b.Prepare||!e.fixedNodeRef.current||!e.placeholderNodeRef.current||!o)return;const r=e.getOffsetTop(),a=e.getOffsetBottom(),i=o();if(i){const t={status:b.None},o=g(e.placeholderNodeRef.current);if(0===o.top&&0===o.left&&0===o.width&&0===o.height)return;const c=g(i),l=y(o,c,r),u=_(o,c,a);void 0!==l?(t.affixStyle={position:"fixed",top:l,width:o.width,height:o.height},t.placeholderStyle={width:o.width,height:o.height}):void 0!==u&&(t.affixStyle={position:"fixed",bottom:u,width:o.width,height:o.height},t.placeholderStyle={width:o.width,height:o.height}),t.lastAffix=!!t.affixStyle,s&&n!==t.lastAffix&&s(t.lastAffix),e.setState(t)}},e.prepareMeasure=()=>{e.setState({status:b.Prepare,affixStyle:void 0,placeholderStyle:void 0})},e.updatePosition=(0,m.Z)((()=>{e.prepareMeasure()})),e.lazyUpdatePosition=(0,m.Z)((()=>{const t=e.getTargetFunc(),{affixStyle:n}=e.state;if(t&&n){const s=e.getOffsetTop(),o=e.getOffsetBottom(),r=t();if(r&&e.placeholderNodeRef.current){const t=g(r),a=g(e.placeholderNodeRef.current),i=y(a,t,s),c=_(a,t,o);if(void 0!==i&&n.top===i||void 0!==c&&n.bottom===c)return}}e.prepareMeasure()})),e}return(0,o.Z)(n,[{key:"getTargetFunc",value:function(){const{getTargetContainer:e}=this.context,{target:t}=this.props;return void 0!==t?t:null!=e?e:k}},{key:"componentDidMount",value:function(){this.timer=setTimeout(this.addListeners)}},{key:"componentDidUpdate",value:function(e){this.addListeners(),e.offsetTop===this.props.offsetTop&&e.offsetBottom===this.props.offsetBottom||this.updatePosition(),this.measure()}},{key:"componentWillUnmount",value:function(){this.removeListeners()}},{key:"render",value:function(){const{affixStyle:e,placeholderStyle:t}=this.state,{affixPrefixCls:n,rootClassName:s,children:o}=this.props,r=l()(e&&s,{[n]:!!e});let a=(0,d.Z)(this.props,["prefixCls","offsetTop","offsetBottom","target","onChange","affixPrefixCls","rootClassName"]);return i.createElement(u.Z,{onResize:this.updatePosition},i.createElement("div",Object.assign({},a,{ref:this.placeholderNodeRef}),e&&i.createElement("div",{style:t,"aria-hidden":"true"}),i.createElement("div",{className:r,ref:this.fixedNodeRef,style:e},i.createElement(u.Z,{onResize:this.updatePosition},o))))}}]),n}(i.Component);w.contextType=p.E_;var C=(0,i.forwardRef)(((e,t)=>{const{prefixCls:n,rootClassName:s}=e,{getPrefixCls:o}=(0,i.useContext)(p.E_),r=o("affix",n),[a,c]=v(r),u=Object.assign(Object.assign({},e),{affixPrefixCls:r,rootClassName:l()(s,c)});return a(i.createElement(w,Object.assign({},u,{ref:t})))}))},51581:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var s=t[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}return function(t,n,s){return n&&e(t.prototype,n),s&&e(t,s),t}}(),o=n(59301),r=i(o),a=i(n(12708));function i(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.scrollListener=n.scrollListener.bind(n),n.eventListenerOptions=n.eventListenerOptions.bind(n),n.mousewheelListener=n.mousewheelListener.bind(n),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),s(t,[{key:"componentDidMount",value:function(){this.pageLoaded=this.props.pageStart,this.options=this.eventListenerOptions(),this.attachScrollListener()}},{key:"componentDidUpdate",value:function(){if(this.props.isReverse&&this.loadMore){var e=this.getParentElement(this.scrollComponent);e.scrollTop=e.scrollHeight-this.beforeScrollHeight+this.beforeScrollTop,this.loadMore=!1}this.attachScrollListener()}},{key:"componentWillUnmount",value:function(){this.detachScrollListener(),this.detachMousewheelListener()}},{key:"isPassiveSupported",value:function(){var e=!1,t={get passive(){e=!0}};try{document.addEventListener("test",null,t),document.removeEventListener("test",null,t)}catch(e){}return e}},{key:"eventListenerOptions",value:function(){var e=this.props.useCapture;return this.isPassiveSupported()&&(e={useCapture:this.props.useCapture,passive:!0}),e}},{key:"setDefaultLoader",value:function(e){this.defaultLoader=e}},{key:"detachMousewheelListener",value:function(){var e=window;!1===this.props.useWindow&&(e=this.scrollComponent.parentNode),e.removeEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture)}},{key:"detachScrollListener",value:function(){var e=window;!1===this.props.useWindow&&(e=this.getParentElement(this.scrollComponent)),e.removeEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),e.removeEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture)}},{key:"getParentElement",value:function(e){var t=this.props.getScrollParent&&this.props.getScrollParent();return null!=t?t:e&&e.parentNode}},{key:"filterProps",value:function(e){return e}},{key:"attachScrollListener",value:function(){var e=this.getParentElement(this.scrollComponent);if(this.props.hasMore&&e){var t=window;!1===this.props.useWindow&&(t=e),t.addEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture),t.addEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),t.addEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture),this.props.initialLoad&&this.scrollListener()}}},{key:"mousewheelListener",value:function(e){1!==e.deltaY||this.isPassiveSupported()||e.preventDefault()}},{key:"scrollListener",value:function(){var e=this.scrollComponent,t=window,n=this.getParentElement(e),s=void 0;if(this.props.useWindow){var o=document.documentElement||document.body.parentNode||document.body,r=void 0!==t.pageYOffset?t.pageYOffset:o.scrollTop;s=this.props.isReverse?r:this.calculateOffset(e,r)}else s=this.props.isReverse?n.scrollTop:e.scrollHeight-n.scrollTop-n.clientHeight;s<Number(this.props.threshold)&&e&&null!==e.offsetParent&&(this.detachScrollListener(),this.beforeScrollHeight=n.scrollHeight,this.beforeScrollTop=n.scrollTop,"function"==typeof this.props.loadMore&&(this.props.loadMore(this.pageLoaded+=1),this.loadMore=!0))}},{key:"calculateOffset",value:function(e,t){return e?this.calculateTopPosition(e)+(e.offsetHeight-t-window.innerHeight):0}},{key:"calculateTopPosition",value:function(e){return e?e.offsetTop+this.calculateTopPosition(e.offsetParent):0}},{key:"render",value:function(){var e=this,t=this.filterProps(this.props),n=t.children,s=t.element,o=t.hasMore,a=(t.initialLoad,t.isReverse),i=t.loader,c=(t.loadMore,t.pageStart,t.ref),l=(t.threshold,t.useCapture,t.useWindow,t.getScrollParent,function(e,t){var n={};for(var s in e)t.indexOf(s)>=0||Object.prototype.hasOwnProperty.call(e,s)&&(n[s]=e[s]);return n}(t,["children","element","hasMore","initialLoad","isReverse","loader","loadMore","pageStart","ref","threshold","useCapture","useWindow","getScrollParent"]));l.ref=function(t){e.scrollComponent=t,c&&c(t)};var u=[n];return o&&(i?a?u.unshift(i):u.push(i):this.defaultLoader&&(a?u.unshift(this.defaultLoader):u.push(this.defaultLoader))),r.default.createElement(s,l,u)}}]),t}(o.Component);c.propTypes={children:a.default.node.isRequired,element:a.default.node,hasMore:a.default.bool,initialLoad:a.default.bool,isReverse:a.default.bool,loader:a.default.node,loadMore:a.default.func.isRequired,pageStart:a.default.number,ref:a.default.func,getScrollParent:a.default.func,threshold:a.default.number,useCapture:a.default.bool,useWindow:a.default.bool},c.defaultProps={element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null},t.default=c,e.exports=t.default},26724:function(e,t,n){e.exports=n(51581)}}]);