|
|
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7852],{26227:function(e,n,s){s.d(n,{Z:function(){return l}});var t=s(54476),i=s(59301),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},o=s(7657),r=function(e,n){return i.createElement(o.Z,(0,t.Z)({},e,{ref:n,icon:a}))};var l=i.forwardRef(r)},87169:function(e,n,s){s.d(n,{Z:function(){return l}});var t=s(54476),i=s(59301),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"},o=s(7657),r=function(e,n){return i.createElement(o.Z,(0,t.Z)({},e,{ref:n,icon:a}))};var l=i.forwardRef(r)},16585:function(e,n,s){s.d(n,{Z:function(){return b}});s(7557),s(41498);var t=s(82100),i=s.n(t),a=s(29186),o=s.n(a),r=s(13720),l=s.n(r),c=s(80619),d=s.n(c),u=s(47074),m=s.n(u),h=s(85573),p=s.n(h),x=s(59301),f=s(10249),_="codeBox___WpkVl",g=s(92310),y=s.n(g),v=s(37712),j=function(e){d()(s,e);var n=m()(s);function s(e){var t;return i()(this,s),t=n.call(this,e),p()(l()(t),"canvas",void 0),p()(l()(t),"randomNum",(function(e,n){return Math.floor(Math.random()*(n-e)+e)})),p()(l()(t),"drawPic",(function(){t.randomCode()})),p()(l()(t),"reloadPic",(function(){t.drawPic()})),p()(l()(t),"changeCode",(function(e){console.log(e.target.value,222),t.setState({value:e.target.value,showError:!1})})),p()(l()(t),"onVerify",(function(){var e;return""!==t.state.value.toLowerCase()&&t.state.value.toLowerCase()!==t.state.code.toLowerCase()||""===t.state.value.toLowerCase()?e=!0:t.state.value.toLowerCase()===t.state.code.toLowerCase()&&(e=!1),t.setState({showError:e}),e})),t.canvas=x.createRef(),t.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},t}return o()(s,[{key:"componentDidMount",value:function(){this.drawPic()}},{key:"randomColor",value:function(e,n){var s=this.randomNum(e,n),t=this.randomNum(e,n),i=this.randomNum(e,n);return"rgb(".concat(s,", ").concat(t,", ").concat(i,")")}},{key:"drawText",value:function(e,n,s){e.fillStyle=this.randomColor(this.state.colorMin,this.state.colorMax);var t=this.randomNum(this.state.fontSizeMin,this.state.fontSizeMax);e.font=t+"px SimHei";var i=(this.state.contentWidth-40)/(this.state.code.length-1),a=10;s>0&&(a=10+s*i);var o=this.randomNum(this.state.fontSizeMax,this.state.contentHeight-5);t>40&&(o=40);var r=this.randomNum(-10,10);e.translate(a,o),e.rotate(r*Math.PI/180),e.fillText(n,0,0),e.rotate(-r*Math.PI/180),e.translate(-a,-o)}},{key:"drawLine",value:function(e){for(var n=0;n<1;n++)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 n=0;n<100;n++)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,n="",s=0;s<this.state.codeLength;s++){n+="QWERTYUPLKJHGFDSAZXCVBNMqwertyupkjhgfdsazxcvbnm1234567890"[Math.floor(57*Math.random())]}this.setState({code:n},(function(){var n=e.canvas.current.getContext("2d");n.textBaseline="bottom",n.fillStyle=e.randomColor(e.state.backgroundColorMin,e.state.backgroundColorMax),n.fillRect(0,0,e.state.contentWidth,e.state.contentHeight);for(var s=0;s<e.state.code.length;s++)e.drawText(n,e.state.code[s],s);e.drawLine(n),e.drawDot(n)}))}},{key:"render",value:function(){var e=this.props,n=e.className,s=e.width,t=void 0===s?300:s;return(0,v.jsxs)("div",{className:y()(_,n),style:{width:t},children:[(0,v.jsxs)("aside",{children:[(0,v.jsx)(f.Z,{value:this.state.value,onChange:this.changeCode,placeholder:"请输入图片中的验证码"}),this.state.showError&&(0,v.jsx)("div",{children:this.state.value?"请输入正确的验证码":"请输入验证码"})]}),(0,v.jsxs)("div",{children:[(0,v.jsx)("canvas",{onClick:this.reloadPic,ref:this.canvas,width:"100",height:"30"}),(0,v.jsx)("div",{className:"current",onClick:this.reloadPic,children:"看不清?换一张"})]})]})}}]),s}(x.Component),b=j},24087:function(e,n,s){s.d(n,{Z:function(){return Z}});var t=s(7557),i=s.n(t),a=s(41498),o=s.n(a),r=s(79800),l=s.n(r),c=s(59301),d=s(78241),u=s(8591),m=s(43418),h=s(5083),p=s(10249),x=s(1710),f=s(95237),_=s(43604),g=s(56656),y=s.n(g),v=s(83287),j=s(49389),b={tips:"tips___e8J4O",homeworkType:"homeworkType___ZjN2X",antdTable:"antdTable___amDdp",modalWrapper:"modalWrapper___XPojI"},k=s(44933),w=s(36931),N=s(37712),Z=(0,j.connect)((function(e){return{shixunHomeworks:e.shixunHomeworks,classroomList:e.classroomList}}))((function(e){var n=e.dispatch,s=e.courseEndTime,t=(e.classroomList,e.successCallback),a=void 0===t?function(){}:t,r=e.visible,g=e.homeworkIds,j=e.courseId,Z=e.isBatch,L=(e.shixunHomeworks,d.Z.useForm()),C=l()(L,1)[0],T=(0,c.useState)(!1),S=l()(T,2),I=S[0],A=S[1],P=(0,c.useState)(!1),M=l()(P,2),H=M[0],R=M[1],z=(0,c.useState)(!1),O=l()(z,2),E=O[0],F=O[1],G=(0,c.useState)([]),D=l()(G,2),V=D[0],B=D[1],J=(0,c.useState)([]),Y=l()(J,2),W=Y[0],Q=Y[1],K=(0,c.useState)([]),X=l()(K,2),U=X[0],q=X[1],$=(0,c.useState)([]),ee=l()($,2),ne=ee[0],se=ee[1],te=(0,c.useState)([]),ie=l()(te,2),ae=ie[0],oe=ie[1],re=(0,c.useState)([]),le=l()(re,2),ce=le[0],de=le[1],ue=(0,c.useState)([]),me=l()(ue,2),he=me[0],pe=me[1],xe=(0,c.useState)([]),fe=l()(xe,2),_e=fe[0],ge=fe[1],ye=(0,c.useState)([]),ve=l()(ye,2),je=ve[0],be=ve[1];(0,c.useEffect)((function(){r?ke():Ne()}),[r]);var ke=function(){var e=o()(i()().mark((function e(){var n;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return A(!0),e.next=3,(0,k.oR)(g[0],{course_id:j});case 3:n=e.sent,F(n.no_group),Z?(pe(n.all_course_groups),ge(n.all_course_groups)):(se(n.late_course_groups),oe(n.late_course_groups),B(n.submit_course_groups),Q(n.submit_course_groups)),A(!1),C.setFieldsValue({end_time:y()()});case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),we=function(){var e=o()(i()().mark((function e(){var s,t,o;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s=C.getFieldsValue(),t=y()(s.end_time).format("YYYY-MM-DD HH:mm"),!(Z?0===je.length:0===U.length&&0===ce.length)||E){e.next=6;break}return u.ZP.warning("请选择需要操作的班级"),e.abrupt("return");case 6:return R(!0),e.next=9,(0,k.Mc)(j,{no_group:E,homework_ids:g,group_ids:Z?je:U,end_time:t,late_group_ids:Z?je:ce});case 9:o=e.sent,R(!1),0===o.status&&(Ne(),u.ZP.success("操作成功"),a(),n({type:"classroomList/setActionTabs",payload:{key:"清除选择数据"}}));case 12:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Ne=function(){q([]),de([]),Q([]),oe([])};return(0,N.jsxs)(m.Z,{centered:!0,title:"立即截止",className:b.modalWrapper,width:Z||E?520:760,open:r,confirmLoading:H,destroyOnClose:!0,okText:"截止",cancelText:"取消",onOk:function(){return we()},onCancel:function(){Ne(),n({type:"classroomList/setActionTabs",payload:{}})},children:[(0,N.jsxs)("div",{className:b.tips,children:[(0,N.jsx)("div",{children:"1、截止后学生不能再提交作业。"}),(0,N.jsx)("div",{children:"2、本操作只对“提交中”、“补交中”的作业有效。"})]}),(0,N.jsx)(d.Z,{form:C,layout:"vertical",children:(0,N.jsx)(d.Z.Item,{name:"end_time",label:"截止时间",children:(0,N.jsx)(h.default,{style:{width:"100%"},disabledDate:function(e){return(0,w.Q8)(e,s)},disabledTime:function(e){return(0,w.d0)(e)},placeholder:"请选择结束时间",showTime:{format:"HH:mm",defaultValue:y()((0,v.U6)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",allowClear:!1})})}),!E&&(0,N.jsx)(N.Fragment,{children:Z?(0,N.jsxs)("div",{children:[(0,N.jsx)(p.Z,{placeholder:"搜索班级",onChange:function(e){ge(he.filter((function(n){return n.name.indexOf(e.target.value)>-1})))}}),(0,N.jsx)(x.Z,{style:{marginTop:"10px",height:"300px",overflow:"auto"},className:b.antdTable,rowSelection:{type:"checkbox",onChange:function(e){be(e)}},rowKey:"id",pagination:!1,dataSource:_e,loading:I,columns:[{title:"班级",dataIndex:"name"}]})]}):(0,N.jsxs)(f.Z,{gutter:24,children:[(0,N.jsxs)(_.Z,{span:14,children:[(0,N.jsx)("div",{className:b.homeworkType,children:"作业截止"}),(0,N.jsx)(p.Z,{placeholder:"搜索班级",onChange:function(e){Q(V.filter((function(n){return n.name.indexOf(e.target.value)>-1})))}}),(0,N.jsx)("div",{className:b.tableWrapper,children:(0,N.jsx)(x.Z,{style:{marginTop:"10px",height:"260px",overflow:"auto"},className:b.antdTable,rowSelection:{type:"checkbox",onChange:function(e){q(e)}},rowKey:"id",pagination:!1,dataSource:W,loading:I,columns:[{title:"班级",dataIndex:"name",ellipsis:!0},{title:"发布时间",dataIndex:"publish_time"},{title:"截止时间",dataIndex:"end_time"}]})})]}),(0,N.jsxs)(_.Z,{flex:10,style:{maxWidth:"280px"},children:[(0,N.jsx)("div",{className:b.homeworkType,children:"补交截止"}),(0,N.jsx)(p.Z,{placeholder:"搜索班级",onChange:function(e){oe(ne.filter((function(n){return n.name.indexOf(e.target.value)>-1})))}}),(0,N.jsx)("div",{className:b.tableWrapper,children:(0,N.jsx)(x.Z,{style:{marginTop:"10px",height:"260px",overflow:"auto",maxWidth:"280px"},className:b.antdTable,rowSelection:{type:"checkbox",onChange:function(e){de(e)}},rowKey:"id",pagination:!1,loading:I,dataSource:ae,columns:[{title:"班级",dataIndex:"name",ellipsis:!0,width:120},{title:"截止时间",dataIndex:"late_time"}]})})]})]})})]})}))},4050:function(e,n,s){s.d(n,{Z:function(){return m}});var t=s(79800),i=s.n(t),a=s(78241),o=s(10249),r=s(3113),l=s(59301),c={search:"search___JA0r9",btn:"btn___GGtZC"},d=s(89392),u=s(37712),m=function(e){var n=e.value,s=e.onChange,t=a.Z.useForm(),m=i()(t,1)[0];(0,l.useEffect)((function(){n&&m.setFieldsValue(n)}),n);var h=(0,l.useRef)((0,d.throttle)((function(e){return s(e)}),2e3,{leading:!0,trailing:!1},1500)).current;return(0,u.jsx)("div",{className:c.search,children:(0,u.jsxs)(a.Z,{className:c.formWrap,colon:!1,form:m,size:"large",layout:"inline",onFinish:h,children:[(0,u.jsx)(a.Z.Item,{label:"实训信息",name:"keyword",initialValue:"",children:(0,u.jsx)(o.Z,{style:{width:280,height:40}})}),(0,u.jsx)(a.Z.Item,{label:"学校/单位",name:"schools",initialValue:"",style:{margin:"0 40px"},children:(0,u.jsx)(o.Z,{style:{width:280,height:40}})}),(0,u.jsx)(a.Z.Item,{label:"创建者/合作者",name:"creator",initialValue:"",children:(0,u.jsx)(o.Z,{style:{width:200,height:40}})}),(0,u.jsx)(r.ZP,{className:c.btn,type:"primary",htmlType:"submit",children:"搜索"})]})})}},72834:function(e,n,s){s.d(n,{Z:function(){return H},P:function(){return P}});var t=s(37205),i=s.n(t),a=s(39647),o=s.n(a),r=s(7557),l=s.n(r),c=s(82242),d=s.n(c),u=s(41498),m=s.n(u),h=s(79800),p=s.n(h),x=s(59301),f=s(78241),_=s(43418),g=s(5112),y=s(10249),v=s(1710),j="brief___LOzpE",b="contentTitle___xkdcN",k="content___Vtri0",w="antdTable___s8T2N",N="tableCell___kN9Fw",Z="antdModal___WVBk3",L="orangeColor___ryB2u",C=s(36133),T=s(37712),S=["isImportMultipleCourse"],I=function(e){var n=e.studentNames,s=e.total;return s>3?(0,T.jsxs)(T.Fragment,{children:["课堂内有",(0,T.jsx)("span",{className:L,children:null==n?void 0:n.join("、")}),"等",(0,T.jsx)("span",{className:L,children:s}),"名学生"]}):(0,T.jsxs)(T.Fragment,{children:["课堂内有",(0,T.jsx)("span",{className:L,children:null==n?void 0:n.join("、")}),["","一","两","三"][s],"名学生"]})},A=function(e){var n=e.onCancel,s=e.onOk,t=e.visible,i=(e.inPaper,e.renderData),a=(e.type,e.isMultipleCourse),o=void 0!==a&&a,r=f.Z.useForm(),c=p()(r,1)[0],u=(0,x.useState)(1),h=p()(u,2),y=h[0],v=h[1],j=(0,x.useState)(!1),b=p()(j,2),w=b[0],N=b[1],C=(0,x.useMemo)((function(){return 1===(null==i?void 0:i.total_num)&&1===(null==i?void 0:i.can_copy_num)}),[i]),S=(0,x.useMemo)((function(){var e;return null==i||null===(e=i.course_data_list)||void 0===e?void 0:e.filter((function(e){return e.is_show}))}),[i]);return(0,T.jsx)(T.Fragment,{children:C?(0,T.jsxs)(_.Z,{centered:!0,closable:!0,open:t,destroyOnClose:!0,title:"提示",className:Z,width:682,confirmLoading:w,onCancel:n,onOk:m()(l()().mark((function e(){var n,t,a;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return N(!0),n=y,o&&(a=d()({},c.getFieldsValue()),n=null==i||null===(t=i.course_data_list)||void 0===t?void 0:t.map((function(e){return void 0!==a[e.id]?d()(d()({},e),{},{is_copy:a[e.id]}):e}))),e.next=5,s(n);case 5:N(!1);case 6:case"end":return e.stop()}}),e)}))),children:[(0,T.jsx)("div",{className:k,style:{marginBottom:20},children:o?"检测到以下课堂已在教学课堂中使用,请问是否复制成新的实训发送至教学课堂中?":(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(I,{studentNames:null==i?void 0:i.student_names,total:null==i?void 0:i.student_count}),"学习过该实践项目。该项目支持复制,请选择是否将该项目复制为新项目发送至课堂中?"]})}),o?(0,T.jsx)(f.Z,{form:c,preserve:!1,children:null==S?void 0:S.map((function(e){return(0,T.jsxs)(x.Fragment,{children:[(0,T.jsx)("h3",{className:"ml15 mb5",children:e.name}),(0,T.jsx)(f.Z.Item,{name:e.id,initialValue:1,children:(0,T.jsxs)(g.ZP.Group,{className:k,children:[(0,T.jsx)(g.ZP,{value:1,style:{color:"#464f66"},children:"复制实训"}),(0,T.jsx)(g.ZP,{value:0,style:{color:"#464f66"},children:"不复制实训"})]})})]},e.id)}))}):(0,T.jsxs)(g.ZP.Group,{value:y,onChange:function(e){return v(e.target.value)},className:k,style:{marginBottom:30},children:[(0,T.jsx)(g.ZP,{value:1,style:{color:"#464f66"},children:"复制"}),(0,T.jsx)(g.ZP,{value:0,style:{color:"#464f66"},children:"不复制"})]}),(0,T.jsxs)("div",{children:[(0,T.jsx)("div",{className:k,style:{marginBottom:10},children:"* 说明:"}),(0,T.jsx)("div",{className:k,style:{marginBottom:20},children:"1、复制:系统将复制并创建一个新的项目发送到课堂中使用(不会复制学生的挑战记录),新的项目支持进行编辑并与原项目信息互不影响。"}),(0,T.jsx)("div",{className:"".concat(k," ").concat(L),children:"2、不复制:当前项目会被直接发送到课堂中使用,挑战过该项目的学生再次进入项目开启挑战时,会清空之前的挑战记录。"})]})]}):(0,T.jsx)(_.Z,{centered:!0,closable:!0,destroyOnClose:!0,open:t,confirmLoading:w,title:"提示",width:682,onCancel:n,onOk:m()(l()().mark((function e(){var n,t,a;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return N(!0),n=0,o&&(a=d()({},c.getFieldsValue()),n=null==i||null===(t=i.course_data_list)||void 0===t?void 0:t.map((function(e){return void 0!==a[e.id]?d()(d()({},e),{},{is_use:a[e.id]}):e}))),e.next=5,s(n);case 5:N(!1);case 6:case"end":return e.stop()}}),e)}))),children:(0,T.jsxs)("div",{className:k,children:[(0,T.jsx)(I,{studentNames:null==i?void 0:i.student_names,total:null==i?void 0:i.student_count}),"学习过该实践项目。",o?(0,T.jsxs)(f.Z,{form:c,preserve:!1,children:[(0,T.jsx)("h3",{children:"当前实训不可复制,已经检测到以下课堂存在该实训,同一实训在课堂中重复使用时,会导致成绩互相影响,请确认是否继续使用"}),null==S?void 0:S.map((function(e){return(0,T.jsxs)(x.Fragment,{children:[(0,T.jsx)("h3",{className:"ml15 mb5",children:e.name}),(0,T.jsx)(f.Z.Item,{name:e.id,initialValue:1,children:(0,T.jsxs)(g.ZP.Group,{className:k,children:[(0,T.jsx)(g.ZP,{value:1,style:{color:"#464f66"},children:"继续使用"}),(0,T.jsx)(g.ZP,{value:0,style:{color:"#464f66"},children:"不使用"})]})})]},e.id)}))]}):(0,T.jsxs)("div",{children:["该项目不支持复制,若确认继续发送,",(0,T.jsx)("span",{className:L,children:"当前项目会被直接发送到课堂中使用,挑战过该项目的学生再次进入项目开启挑战时,会清空之前的挑战记录。"}),"(如果不想清空学生之前的挑战记录,建议参照该实践项目的内容自行创建一个新的项目,或者尝试联系项目创建人开放本项目的复制权限)。"]})]})})})},P=function(){var e=(0,x.useState)(!1),n=p()(e,2),s=n[0],t=n[1],i=(0,x.useState)(),a=p()(i,2),r=a[0],c=a[1],d=function(){var e=m()(l()().mark((function e(n){var s,i,a,r,d;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=n.isImportMultipleCourse,i=void 0!==s&&s,a=o()(n,S),e.next=3,(0,C.Tr)(a);case 3:if(!("status"in(r=e.sent))){e.next=6;break}return e.abrupt("return",!1);case 6:if(!i){e.next=13;break}if(!(null==r||null===(d=r.course_data_list)||void 0===d?void 0:d.some((function(e){return e.is_show})))){e.next=12;break}return c(r),t(!0),e.abrupt("return",!0);case 12:return e.abrupt("return",r.course_data_list||[]);case 13:if(0!==r.student_count){e.next=15;break}return e.abrupt("return",!1);case 15:return c(r),t(!0),e.abrupt("return",!0);case 18:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();return[s,function(){return t(!1)},r,d]},M=function(e){var n=f.Z.useForm(),s=p()(n,1)[0],t=(0,x.useState)(!1),a=p()(t,2),o=a[0],r=a[1],c=e.onCancel,d=e.onOk,u=e.visible,h=e.inPaper,k=void 0!==h&&h,C=e.renderData,S=e.type,A=e.isMultipleCourse,P=void 0!==A&&A,M=e.position,H=(0,x.useMemo)((function(){return k?[{title:"实践项目名称",dataIndex:"name",width:424,align:"center",ellipsis:!0,className:N,render:function(e,n){return(0,T.jsx)("a",{href:"/shixuns/".concat(n.identifier,"/challenges"),target:"_blank",children:e})}},{title:"是否复制",dataIndex:"is_copy",align:"center",render:function(e,n){return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(f.Z.Item,{name:["".concat("subject"===S?n.stage_shixun_id:n.shixun_course_id||n.id),"is_copy"],initialValue:1,children:(0,T.jsxs)(g.ZP.Group,{children:[(0,T.jsx)(g.ZP,{value:1,children:"是"}),(0,T.jsx)(g.ZP,{value:0,children:"否"})]})}),(0,T.jsx)(f.Z.Item,{name:["".concat("subject"===S?null==n?void 0:n.stage_shixun_id:n.shixun_course_id||n.id),"is_use"],hidden:!0,initialValue:1,children:(0,T.jsx)(y.Z,{type:"hidden"})})]})}}]:[{title:"实践项目名称",dataIndex:"name",width:424,align:"center",ellipsis:!0,className:N,render:function(e,n){return(0,T.jsx)("a",{href:"/shixuns/".concat(n.identifier,"/challenges"),target:"_blank",children:e})}},{title:"是否使用",dataIndex:"is_use",align:"center",render:function(e,n){return(0,T.jsx)(f.Z.Item,{name:["".concat("subject"===S?n.stage_shixun_id:n.shixun_course_id||n.id),"is_use"],initialValue:1,children:(0,T.jsxs)(g.ZP.Group,{children:[(0,T.jsx)(g.ZP,{value:1,children:"是"}),(0,T.jsx)(g.ZP,{value:0,children:"否"})]})})}},{title:"是否复制",dataIndex:"is_copy",align:"center",render:function(e,n){return(0,T.jsx)(f.Z.Item,{name:["".concat("subject"===S?n.stage_shixun_id:n.shixun_course_id||n.id),"is_copy"],initialValue:1,children:(0,T.jsxs)(g.ZP.Group,{children:[(0,T.jsx)(g.ZP,{value:1,children:"是"}),(0,T.jsx)(g.ZP,{value:0,children:"否"})]})})}}]}),[k]),R=(0,x.useMemo)((function(){return k?[{title:"实践项目名称",dataIndex:"name",width:424,className:N,align:"center",ellipsis:!0,render:function(e,n){return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)("a",{href:"/shixuns/".concat(n.identifier,"/challenges"),target:"_blank",children:e}),(0,T.jsx)(f.Z.Item,{name:["".concat("subject"===S?null==n?void 0:n.stage_shixun_id:n.shixun_course_id||n.id),"is_copy"],hidden:!0,initialValue:0,children:(0,T.jsx)(y.Z,{type:"hidden"})}),(0,T.jsx)(f.Z.Item,{name:["".concat("subject"===S?null==n?void 0:n.stage_shixun_id:n.shixun_course_id||n.id),"is_use"],hidden:!0,initialValue:1,children:(0,T.jsx)(y.Z,{type:"hidden"})})]})}}]:[{title:"实践项目名称",dataIndex:"name",width:424,className:N,ellipsis:!0,align:"center",render:function(e,n){return(0,T.jsx)("a",{href:"/shixuns/".concat(n.identifier,"/challenges"),target:"_blank",children:e})}},{title:"是否使用",dataIndex:"is_use",align:"center",render:function(e,n){return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(f.Z.Item,{name:["".concat("subject"===S?null==n?void 0:n.stage_shixun_id:n.shixun_course_id||n.id),"is_use"],initialValue:0,children:(0,T.jsxs)(g.ZP.Group,{children:[(0,T.jsx)(g.ZP,{value:1,children:"是"}),(0,T.jsx)(g.ZP,{value:0,children:"否"})]})}),(0,T.jsx)(f.Z.Item,{name:["".concat("subject"===S?null==n?void 0:n.stage_shixun_id:n.shixun_course_id||n.id),"is_copy"],hidden:!0,initialValue:0,children:(0,T.jsx)(y.Z,{type:"hidden"})})]})}}]}),[k]);if(P){var z={title:"课堂名称",ellipsis:!0,dataIndex:"course_name",width:190,align:"center",className:N,render:function(e,n){return(0,T.jsx)("a",{href:"/classrooms/".concat(n.course_id),children:e})}};H=[z].concat(i()(H)),R=[z].concat(i()(R))}var O=(0,x.useMemo)((function(){return function(e){var n=e.used,s=e.copy,t=e.canNotCopy,i=e.studentNames,a=e.studentCount,o=e.inPaper,r=e.is_random,l=void 0!==r&&r,c=e.position,d=(void 0===c?"":c)||(o?"试卷":"课程");return(0,T.jsxs)("span",{children:[(0,T.jsx)(I,{studentNames:i,total:a}),"学习过",d,"中的",(0,T.jsx)("span",{className:L,children:n}),"个项目,",s>0&&t>0?(0,T.jsxs)(T.Fragment,{children:["其中",(0,T.jsx)("span",{className:L,children:s}),"个项目支持复制,",(0,T.jsx)("span",{className:L,children:t}),"个项目不支持复制"]}):s>0&&0===t?(0,T.jsxs)(T.Fragment,{children:["其中",(0,T.jsx)("span",{className:L,children:s}),"个项目支持复制"]}):0===s&&t>0?(0,T.jsxs)(T.Fragment,{children:["其中",(0,T.jsx)("span",{className:L,children:t}),"个项目不支持复制"]}):void 0,"。请选择",l?"":"是否继续使用和","是否复制为新项目发送至课堂中?"]})}({used:null==C?void 0:C.repeat_shixun_num,copy:null==C?void 0:C.can_copy_num,canNotCopy:null==C?void 0:C.no_copy_num,studentNames:null==C?void 0:C.student_names,studentCount:null==C?void 0:C.student_count,is_random:null==C?void 0:C.is_random,inPaper:k,position:M})}),[C,k,M]);return(0,T.jsx)(_.Z,{title:"提示",centered:!0,open:u,confirmLoading:o,onOk:m()(l()().mark((function e(){var n,t;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r(!0),n=s.getFieldsValue(),t=Object.keys(n).map((function(e){return{id:parseInt(e.split("_")[0]),course_id:parseInt(e.split("_")[1]),is_use:n[e].is_use,is_copy:n[e].is_copy}})),e.next=5,d(t);case 5:r(!1);case 6:case"end":return e.stop()}}),e)}))),onCancel:c,width:880,okText:"确认",className:Z,destroyOnClose:!0,children:(0,T.jsxs)(f.Z,{form:s,preserve:!1,children:[(0,T.jsx)("div",{className:j,children:O}),(0,T.jsxs)("div",{style:{marginBottom:30},children:[(0,T.jsx)("div",{style:{marginBottom:20},children:"* 说明"}),(0,T.jsx)("div",{style:{marginBottom:20},children:"1、复制:系统将复制并创建一个新的项目发送到课堂中使用(不会复制学生的挑战记录),新的项目支持进行编辑并与原项目信息互不影响。"}),(0,T.jsx)("div",{className:L,children:"2、不复制:当前项目会被直接发送到课堂中使用,挑战过该项目的学生再次进入项目开启挑战时,会清空之前的挑战记录。"})]}),(null==C?void 0:C.can_copy_num)>0&&(0,T.jsxs)("div",{children:[(0,T.jsx)("div",{className:b,children:"支持复制的项目"}),(0,T.jsx)(v.Z,{columns:H,className:w,dataSource:null==C?void 0:C.can_copy_list,rowKey:"subject"===S?"stage_shixun_id":"id",pagination:!1,scroll:{y:240},bordered:!0})]}),(null==C?void 0:C.no_copy_num)>0&&(0,T.jsxs)("div",{children:[(0,T.jsx)("div",{className:b,children:"不支持复制的项目"}),(0,T.jsx)(v.Z,{columns:R,className:w,dataSource:null==C?void 0:C.no_copy_list,rowKey:"subject"===S?"stage_shixun_id":"id",pagination:!1,scroll:{y:200},bordered:!0})]}),(null==C?void 0:C.no_use_list.length)>0&&(null==C?void 0:C.no_use_list.map((function(e){return(0,T.jsxs)("div",{children:[(0,T.jsx)(f.Z.Item,{name:["".concat("subject"===S?null==e?void 0:e.stage_shixun_id:e.shixun_course_id||e.id),"is_copy"],hidden:!0,initialValue:0,children:(0,T.jsx)(y.Z,{type:"hidden"})}),(0,T.jsx)(f.Z.Item,{name:["".concat("subject"===S?null==e?void 0:e.stage_shixun_id:e.shixun_course_id||e.id),"is_use"],hidden:!0,initialValue:1,children:(0,T.jsx)(y.Z,{type:"hidden"})})]},"subject"===S?e.stage_shixun_id:e.shixun_course_id||e.id)})))]})})},H=function(e){return"multiple"===e.modalType?(0,T.jsx)(M,d()({},e)):(0,T.jsx)(A,d()({},e))}},51101:function(e,n,s){s(59301);var t=s(6848),i=s(37712);n.Z=function(e){var n=e.value,s=e.visible,a=void 0===s||s,o=e.children;return(0,i.jsx)(i.Fragment,{children:a?(0,i.jsx)(t.Z,{placement:"topLeft",title:{"未发布":"作业尚未发布","未开始":"作业已发布,尚未到达开始作业时间","提交中":"作业进行中,所有考生可提交作业","补交中":"作业进行中,所有学生可补交作业","进行中":"作业进行中,部分班级正在作业提交中/补交中","已截止":"到达作业截止时间,作业已结束","已结束":"课堂已结束"}[n],children:(0,i.jsx)("span",{children:o})}):o})}},82221:function(e,n,s){var t=s(7557),i=s.n(t),a=s(85573),o=s.n(a),r=s(37205),l=s.n(r),c=s(82242),d=s.n(c),u=s(41498),m=s.n(u),h=s(79800),p=s.n(h),x=s(59301),f=s(78241),_=s(8591),g=s(43418),y=s(95237),v=s(43604),j=s(5083),b=s(5112),k=s(24905),w=s(56656),N=s.n(w),Z=s(94171),L=s(83287),C=s(49389),T=s(7338),S=s(44933),I=s(54724),A=s(36931),P=s(37712);n.Z=(0,C.connect)((function(e){return{classroomList:e.classroomList}}))((function(e){var n=e.classroomList,s=e.dispatch,t=e.courseEndTime,a=(0,C.useParams)(),r=f.Z.useForm(),c=p()(r,1)[0],u=(0,x.useState)(1),h=p()(u,2),w=h[0],M=h[1],H=(0,x.useState)([]),R=p()(H,2),z=R[0],O=R[1],E=(0,x.useState)(0),F=p()(E,2),G=(F[0],F[1]),D=(0,x.useState)(20),V=p()(D,2),B=(V[0],V[1],(0,x.useState)(!0)),J=p()(B,2),Y=(J[0],J[1]),W=(0,x.useState)([]),Q=p()(W,2),K=Q[0],X=Q[1],U=(0,x.useState)(!0),q=p()(U,2),$=q[0],ee=q[1];a.id=a.coursesId,(0,x.useEffect)((function(){if("立即发布"===n.actionTabs.key&&(te(),ne(),2===n.actionTabs.type)){var e=n.actionTabs.selectArrsAll[0];ee(e.unified_setting)}}),[n.actionTabs]);var ne=function(){var e=m()(i()().mark((function e(s){var t;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Y(!0),e.next=3,(0,S.c_)(d()(d()({},a),{},{page:s||w,limit:2e4,homework_id:1===n.actionTabs.type?"":n.actionTabs.selectArrs[0]}));case 3:null==(t=e.sent)||t.course_groups.map((function(e,n){e.key=e.id,e.title=e.name,e.disabled=e.is_published})),t&&(O(l()(null==t?void 0:t.course_groups)),G(null==t?void 0:t.course_groups_count),Y(!1),s||c.setFieldsValue(o()(o()({},"publish_time",N()(N()(new Date).add(0,"days").format("YYYY-MM-DD HH:mm"))),"end_time",N()(N()(new Date((0,L.qd)("/"))).add(7,"days").format("YYYY-MM-DD HH:mm")))));case 6:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),se=function(){var e=m()(i()().mark((function e(){var t,o,r,u;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(0,T.Rm)()||null!==(t=n.AssistantObject)&&void 0!==t&&null!==(t=t.practice)&&void 0!==t&&t.can_publish){e.next=4;break}return _.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能"),re(!1),e.abrupt("return");case 4:if(!((r=d()({},c.getFieldsValue())).end_time<=r.publish_time)){e.next=9;break}return _.ZP.info("截止时间不能大于或等于发布时间"),re(!1),e.abrupt("return");case 9:if(!((null==K?void 0:K.length)<=0&&!$&&z.length>0)){e.next=13;break}return _.ZP.info("发布班级不能为空"),re(!1),e.abrupt("return");case 13:return u={homework_ids:l()(n.actionTabs.selectArrs),group_ids:K.length>0?K.map((function(e){return e.id})):null===(o=n.detailShixunsList)||void 0===o?void 0:o.course_groups,end_time:N()(r.end_time).format("YYYY-MM-DD HH:mm"),publish_time:N()(r.publish_time).format("YYYY-MM-DD HH:mm"),unified_setting:!K.length},re(!0),e.next=17,(0,Z.ZP)("/api/courses/".concat(a.coursesId,"/homework_commons/publish_with_homework_list_position.json"),{method:"post",body:d()({},u)});case 17:0===e.sent.status?(re(!1),te(),(0,L.L9)(["教学课堂","课程实验","立即发布"]),_.ZP.success("发布成功"),s({type:"classroomList/setActionTabs",payload:{key:"清除选择数据"}}),(0,T.GJ)()?n.actionTabs.detail?(s({type:"shixunHomeworks/setActionTabs",payload:{}}),s({type:"shixunHomeworks/getWorkList",payload:d()({},a)}),s({type:"shixunHomeworks/getWorkSetting",payload:d()({},a)})):s({type:"classroomList/getClassroomTeacherShixunsList",payload:d()(d()({},n.actionTabs.params),{},{type:4})}):s({type:"classroomList/getClassroomShixunsList",payload:d()({},n.actionTabs.params)}),"0"===localStorage.getItem("Noviceguide")||s({type:"shixunHomeworks/setActionTabs",payload:{key:"底部弹窗",type:13,text:(0,P.jsx)("div",{children:"最后,咱们给教学课堂添加一名学生~点击“添加学生”,在弹窗页面中输入并搜索学生姓名,点击“确定”就可以为您的课堂添加第一位学生啦~"})}})):re(!1);case 19:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),te=function(){M(1),O([]),X([])},ie=(n.detailShixunsList,(0,x.useState)(!1)),ae=p()(ie,2),oe=ae[0],re=ae[1];return(0,P.jsxs)(g.Z,{width:600,centered:!0,confirmLoading:oe,title:"发布作业",open:"立即发布"===n.actionTabs.key,okText:"发布作业",cancelText:"暂不发布",onOk:function(){return se()},onCancel:function(){te(),s({type:"classroomList/setActionTabs",payload:{}})},children:[(0,P.jsxs)("p",{className:"tc",children:["学生将立即收到作业",(0,P.jsx)("br",{}),'本操作只对"未发布"的作业有效']}),(0,P.jsxs)(f.Z,{form:c,children:[(0,P.jsxs)("div",{style:{paddingLeft:0},children:[(0,P.jsxs)(y.Z,{className:"mt30",align:"middle",children:[(0,P.jsx)(v.Z,{children:(0,P.jsx)(f.Z.Item,{name:"publish_time",label:"发布时间",children:(0,P.jsx)(j.default,{style:{width:170,marginRight:"25px"},disabledDate:function(e){return(0,A.Q8)(e,t)},disabledTime:function(e){return(0,A.d0)(e)},placeholder:"请选择发布时间",showTime:{format:"HH:mm",defaultValue:N()((0,L.U6)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",allowClear:!1})})}),(0,P.jsx)(v.Z,{className:"ml20",children:(0,P.jsx)(f.Z.Item,{name:"end_time",label:"截止时间:",children:(0,P.jsx)(j.default,{style:{width:170},placeholder:"请选择截止时间",showTime:{format:"HH:mm",defaultValue:N()((0,L.U6)(),"HH:mm")},disabledDate:function(e){return(0,A.Q8)(e,t,c.getFieldValue("publish_time"))},disabledTime:function(e){return(0,A.d0)(e,c.getFieldValue("publish_time"))},format:"YYYY-MM-DD HH:mm",allowClear:!1})})})]}),2===n.actionTabs.type&&(0,P.jsxs)(y.Z,{style:{marginBottom:"10px"},children:[(0,P.jsx)("span",{className:"mr5",children:"发布设置:"}),(0,P.jsxs)(b.ZP.Group,{value:$,onChange:function(e){ee(e.target.value),X([])},children:[(0,P.jsx)(b.ZP,{value:!0,disabled:!n.actionTabs.manage_all_group,children:"统一发布"}),(0,P.jsx)(b.ZP,{className:"ml20",disabled:z.length<=0,value:!1,children:"分班发布"})]})]}),z.length<=0&&2===n.actionTabs.type&&(0,P.jsx)("span",{style:{marginLeft:"65px",color:"rgba(0, 0, 0, 0.25)"},children:'课堂无分班,仅支持选择“统一发布"'})]}),(1===n.actionTabs.type||!$)&&z.length>0&&(0,P.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:"10px"},children:[(0,P.jsx)("span",{style:{flex:1},children:(0,P.jsx)(k.Z,{checked:K.length===z.length,onChange:function(e){K.length===z.length?X([]):X(z)},children:"全选"})}),(0,P.jsx)("span",{style:{width:16}}),(0,P.jsxs)("span",{style:{flex:1},children:["已选择",K.length||0,"个分班"]})]}),(1===n.actionTabs.type||!$)&&z.length>0&&(0,P.jsx)(I.Z,{data:z,selectedRowKeys:K,setSelectedRowKeys:X})]})]})}))},54724:function(e,n,s){s.d(n,{Z:function(){return y}});var t=s(7557),i=s.n(t),a=s(41498),o=s.n(a),r=s(79800),l=s.n(r),c=s(59301),d=s(10249),u=s(24905),m=s(95237),h="leftdiv___aBzsX",p="listClass___bxIEW",x="spantitle___v_Vc4",f="rightdiv___xWu4M",_=s(13767),g=s(37712),y=function(e){var n=e.data,s=(e.value,e.handleChangePage,e.setSelectedRowKeys),t=e.selectedRowKeys,a=(e.onChange,(0,c.useState)([])),r=l()(a,2),y=r[0],v=r[1],j=(0,c.useState)([]),b=l()(j,2),k=b[0],w=b[1],N=(0,c.useState)([]),Z=l()(N,2),L=Z[0],C=Z[1],T=(0,c.useState)(1),S=l()(T,2),I=(S[0],S[1],(0,c.useState)()),A=l()(I,2);A[0],A[1];return(0,c.useEffect)((function(){v(n),w([]),C([])}),[n]),(0,c.useEffect)((function(){s&&(w(t),C(t))}),[t]),(0,g.jsxs)("div",{style:{display:"flex",justifyContent:"space-between"},children:[(0,g.jsxs)("div",{className:h,children:[(0,g.jsx)(d.Z.Search,{size:"middle",onChange:function(){var e=o()(i()().mark((function e(s){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:v(n.filter((function(e){var n;return null==e||null===(n=e.name)||void 0===n?void 0:n.includes(s.target.value)})));case 1:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),placeholder:"可输入班级名称查询"}),0===y.length&&(0,g.jsx)(_.Z,{styles:{margin:"70px auto"},customText:"暂无分班"}),(0,g.jsx)("div",{style:{height:"85%",overflow:"auto",overflowX:"hidden"},children:(0,g.jsx)(u.Z.Group,{value:k.map((function(e){return"".concat(e.id)})),onChange:function(e){s(y.filter((function(n){return e.includes("".concat(n.id))})))},style:{marginTop:"10px",flexDirection:"column"},children:y.map((function(e,n){return(0,g.jsx)(m.Z,{style:{marginTop:"10px",lineHeight:"24px",display:"flex",width:200},children:(0,g.jsx)(u.Z,{style:{display:"flex",height:"24px",alignItems:"center"},disabled:e.is_published,value:"".concat(e.id),children:(0,g.jsxs)("div",{className:p,children:[(0,g.jsx)("span",{className:x,style:{width:e.is_published?"108px":"170px"},children:e.name}),e.is_published&&(0,g.jsx)("span",{style:{width:"52px",height:"24px",background:"#B8B8B8",borderRadius:"13px",color:"white",lineHeight:"24px",textAlign:"center",display:"inline-block"},children:"已发布"})]})})},e.id)}))})})]}),(0,g.jsxs)("div",{className:f,children:[(0,g.jsx)(d.Z.Search,{onChange:function(e){C(k.filter((function(n){return n.name.includes(e.target.value)})))},size:"middle",placeholder:"可输入班级名称查询"}),0===L.length&&(0,g.jsx)(_.Z,{styles:{margin:"70px auto"},customText:"暂未选择分班"}),L.length>0&&(0,g.jsx)("div",{style:{marginTop:"10px",height:"85%",overflow:"hidden",position:"relative"},children:(0,g.jsx)("div",{style:{overflowX:"hidden",overflowY:"scroll",position:"absolute",left:0,top:0,right:-17,bottom:0},children:L.map((function(e,n){return(0,g.jsxs)(m.Z,{justify:"space-between",style:{marginTop:"10px"},children:[(0,g.jsx)("div",{style:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",marginRight:"5px",marginLeft:"5px",width:"75%"},children:e.name}),(0,g.jsx)("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAbVJREFUOE+Nk79rFUEUhb+zE4OFwUD+CyGKKQQbSaMikQQ7C1tBBIsUQaJvl2Fn/cWDpAiIYJsi7YOIaCUWFoKKRhG0sbEzEImFGnev7G6yyXsxeU5159yZb87l3hG9q2WLiBO79FIwXpLp0s6cwITnQCMWrGDM43jdBckZQ0wTMdrong2R2Bxm0/98sZ8ozdcOEm5hjOC41u9Olc9ZQKySclOVkNhljCmCzjeAJM/4FbW5p+8k5tlggTtarfKxLSM6pHq4BTiL0SboaAOIi284jeP1nti+ApMEvdoEvEPMkOpJDZi1IwzwgqDh/wSsYZwk08ca4O0Qua3zW8OV5crmHg6u22EGbQ2nIbx+1IC6rrK+cYJW9gXEVrbxGUEj5bltQGJvgBapHu0LSGwCyEh1vBsQWwd4TNCDPg6uAOcImuoFlL1dJ9WNPg5uYwwRVM3MzhJmKIpjZK6e9bj4jNNpvL4QFx9wuoDXJ1r5IlH0llTtXgcXwa4SolObnYnwKnbFcfEcdJ+gpW6AtzFynuIop/Fn053u4CA5yzjO4FV9tu0Syl2S38WiSWBgD8AfoEPQ7Fb+LwIiyhxWwe2KAAAAAElFTkSuQmCC",style:{cursor:"pointer",height:"16px",marginRight:17},onClick:function(){s(k.filter((function(n){return"".concat(n.id)!="".concat(e.id)})))}})]},e.id)}))})})]})]})}},83535:function(e,n,s){s.r(n),s.d(n,{default:function(){return Oe}});var t=s(37205),i=s.n(t),a=s(7557),o=s.n(a),r=s(41498),l=s.n(r),c=s(82242),d=s.n(c),u=s(79800),m=s.n(u),h=s(39647),p=s.n(h),x=s(59301),f=s(94171),_=s(49389),g=s(20834),y=s(8591),v=s(10249),j=s(95237),b=s(43604),k=s(6848),w=s(38854),N=s(81327),Z=s(61621),L=s(58421),C=s(24905),T=s(43418),S=s(5112),I=s(7338),A=s(84105),P=s(83287),M=s(16585),H=s(37712),R=["classroomList","dispatch","match","location","user"],z=(0,_.connect)((function(e){return{classroomList:e.classroomList,user:e.user}}))((function(e){var n,s,t=e.classroomList,a=e.dispatch,r=(e.match,e.location,e.user),c=(p()(e,R),(0,_.useParams)()),u=(0,x.useState)(!1),h=m()(u,2),g=h[0],v=h[1],j=(0,x.useState)(!1),b=m()(j,2),k=b[0],w=b[1],N=(0,x.useRef)(null);(0,x.useEffect)((function(){if("删除"===t.actionTabs.key){if((0,I.j5)())return void w(!0);var e={hasNum:0,noHasNum:0};t.actionTabs.selectArrsAll.map((function(n){var s;n.author_login===(null===(s=r.userInfo)||void 0===s?void 0:s.login)?++e.hasNum:++e.noHasNum})),e.noHasNum>0?T.Z.info({title:"权限提示",className:"custom-modal-divider ",icon:null,content:(0,H.jsxs)("div",{children:["当前选中资源中:",(0,H.jsx)("span",{className:"c-blue",children:e.hasNum}),"个由您本人发布,",(0,H.jsx)("span",{className:"c-red",children:e.noHasNum})," 个由其他老师发布。",(0,H.jsx)("br",{}),"课堂内只能删除本人发布的资源,请取消选中其他老师发布的资源。"]}),onOk:function(){Z()}}):w(!0)}else w(!1)}),[t.actionTabs.key]);var Z=function(){a({type:"classroomList/setActionTabs",payload:{}})};return(0,H.jsx)(T.Z,{centered:!0,title:"提示",open:k,okText:"确定",cancelText:"取消",destroyOnClose:!0,confirmLoading:g,onOk:l()(o()().mark((function e(){var n,s;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===(n=N.current)||void 0===n||!n.onVerify()){e.next=2;break}return e.abrupt("return");case 2:return v(!0),e.next=5,(0,f.ZP)("/api/courses/".concat(c.coursesId,"/homework_commons/multi_destroy.json"),{method:"post",body:{homework_ids:i()(t.actionTabs.selectArrs)}});case 5:s=e.sent,v(!1),0===s.status&&((0,P.L9)(["教学课堂","课程实验","删除"]),y.ZP.success("删除成功"),a({type:"classroomList/setActionTabs",payload:{key:"清除选择数据"}}),(0,I.GJ)()?a({type:"classroomList/getClassroomTeacherShixunsList",payload:d()(d()({},t.actionTabs.params),{},{type:4})}):a({type:"classroomList/getClassroomShixunsList",payload:d()({},t.actionTabs.params)}),a({type:"classroomList/getClassroomLeftMenus",payload:{id:c.coursesId}}));case 8:case"end":return e.stop()}}),e)}))),onCancel:function(){Z()},children:null!=t&&null!==(n=t.actionTabs)&&void 0!==n&&n.status&&["未发布"].includes(null==t||null===(s=t.actionTabs)||void 0===s?void 0:s.status)?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)("p",{children:"提交作品将全部被删除,不可恢复"}),(0,H.jsx)("p",{children:"是否确认删除?"})]}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)("p",{style:{color:"#DD0000"},children:"删除实训则会清除学生所有的答题数据,且数据不可恢复,如确定删除,请输入下方验证码"}),(0,H.jsx)(M.Z,{ref:function(e){return N.current=e}})]})})})),O=s(82221),E=s(24087),F=(0,_.connect)((function(e){return{classroomList:e.classroomList}}))((function(e){var n=e.classroomList,s=e.dispatch,t=(0,_.useParams)();return(0,H.jsx)(T.Z,{centered:!0,title:"提示",open:"设为公开"===n.actionTabs.key,okText:"确定",cancelText:"取消",onOk:l()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,f.ZP)("/api/courses/".concat(t.coursesId,"/homework_commons/set_public.json"),{method:"post",body:{homework_ids:i()(n.actionTabs.selectArrs)}});case 2:0===e.sent.status&&((0,P.L9)(["教学课堂","课程实验","设为公开"]),y.ZP.success("操作成功"),s({type:"classroomList/setActionTabs",payload:{key:"清除选择数据"}}),(0,I.GJ)()?s({type:"classroomList/getClassroomTeacherShixunsList",payload:d()(d()({},n.actionTabs.params),{},{type:4})}):s({type:"classroomList/getClassroomShixunsList",payload:d()({},n.actionTabs.params)}));case 4:case"end":return e.stop()}}),e)}))),onCancel:function(){s({type:"classroomList/setActionTabs",payload:{}})},children:(0,H.jsxs)("p",{children:["设为公开后,非课堂成员也可以访问查看",(0,H.jsx)("br",{}),"是否确认设为公开?"]})})})),G=s(78241),D=(s(56656),(0,_.connect)((function(e){return{classroomList:e.classroomList,loading:e.loading}}))((function(e){var n,s,t=e.classroomList,i=(e.loading,e.dispatch),a=((0,_.useParams)(),(0,x.useState)(!1)),r=m()(a,2),c=r[0],u=r[1],h=t.actionTabs,p=G.Z.useForm(),g=m()(p,1)[0];return(0,x.useEffect)((function(){var e;"重命名"===t.actionTabs.key&&g.setFieldsValue({name:null===(e=h.selectArrs)||void 0===e?void 0:e.name})}),[t.actionTabs.key]),(0,H.jsx)(T.Z,{centered:!0,title:"重命名",confirmLoading:c,open:"重命名"===t.actionTabs.key,okText:"确定",cancelText:"取消",destroyOnClose:!0,onOk:l()(o()().mark((function e(){var n,s,a,r;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(0,I.Rm)()||null!==(n=t.AssistantObject)&&void 0!==n&&null!==(n=n.practice)&&void 0!==n&&n.can_create){e.next=3;break}return y.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能"),e.abrupt("return");case 3:return s=g.getFieldValue(),u(!0),a="/api/homework_commons/".concat(t.actionTabs.selectArrs.homework_id,"/alter_name.json"),e.next=8,(0,f.ZP)(a,{method:"post",body:d()({},s)});case 8:r=e.sent,u(!1),0===r.status&&(y.ZP.success("修改成功"),i({type:"classroomList/setActionTabs",payload:{}}),(0,I.GJ)()?i({type:"classroomList/getClassroomTeacherShixunsList",payload:d()(d()({},t.actionTabs.params),{},{type:4})}):i({type:"classroomList/getClassroomShixunsList",payload:d()({},t.actionTabs.params)}));case 11:case"end":return e.stop()}}),e)}))),onCancel:function(){u(!1),i({type:"classroomList/setActionTabs",payload:{}})},children:(0,H.jsxs)(G.Z,{form:g,children:[(0,H.jsxs)(j.Z,{className:"mt10 c-grey-999",children:[(0,H.jsx)(b.Z,{children:"本实训初始名称:"}),(0,H.jsx)(b.Z,{flex:"1",children:null===(n=h.selectArrs)||void 0===n?void 0:n.shixun_name})]}),(0,H.jsx)(G.Z.Item,{name:"name",children:(0,H.jsxs)(j.Z,{className:"mt10",align:"middle",children:[(0,H.jsx)(b.Z,{className:"font14",children:"作业名称:"}),(0,H.jsx)(b.Z,{flex:"1",children:(0,H.jsx)(v.Z,{defaultValue:null===(s=h.selectArrs)||void 0===s?void 0:s.name})})]})})]})})}))),V=s(43428),B=s(3113),J=s(71418),Y=s(28103),W=s(13767),Q="drawer___QqugY",K="menu___uKpxi",X="actived___hCeHj",U="actived2___aIAeg",q="subTag___S0zfl",$="listItem___Ulw3D",ee="listItem2___J8GtN",ne="info___gY955",se="title___hyfzM",te="titleLeft___eH38u",ie="search___GnrcF",ae="filter___jwVvV",oe="description___ynLaI",re="menuCourse___HRXxE",le="authorname___qn85G",ce="tooltip-content___A6uPo",de=s(67554),ue=s(4050),me=s(72834),he=s(93298),pe=(v.Z.Search,[{id:"type",name:"来源",children:[{name:"全部",id:"all",type:"type"},{name:"我的",id:"mine",type:"type"}]},{id:"diff",name:"难度",children:[{name:"全部",id:"",type:"diff"},{name:"初级",id:1,type:"diff"},{name:"中级",id:2,type:"diff"},{name:"中高级",id:3,type:"diff"},{name:"高级",id:4,type:"diff"}]}]),xe=(0,_.connect)((function(e){return{classroomList:e.classroomList,shixunsList:e.shixunsList,loading:e.loading.effects}}))((function(e){var n,s,t=e.classroomList,a=(e.loading,e.dispatch),r=e.shixunsList,c=(0,x.useState)(d()({},(0,_.useParams)())),u=m()(c,2),h=u[0],p=(u[1],t.shixunLists),g=t.shixunAiRecommendLists,v=(0,x.useState)([]),w=m()(v,2),N=w[0],Z=w[1],T=(0,x.useState)({}),S=m()(T,2),A=S[0],M=S[1],R=(0,x.useState)([]),z=m()(R,2),O=z[0],E=z[1],F=(0,x.useState)(!1),G=m()(F,2),D=G[0],ee=G[1],ie=[{name:"最新",id:"created_at"},{name:"最热",id:"myshixuns_count"}].filter((function(e){return!!e})),xe=(0,x.useState)({page:1,type:"all",diff:"",status:"published",order:"desc",limit:20,sort:"myshixuns_count",no_jupyter:1,group_id:null}),fe=m()(xe,2),_e=fe[0],ge=fe[1];(0,x.useEffect)((function(){ye()}),[h.coursesId,_e]),(0,x.useEffect)((function(){"选用实践项目"===t.actionTabs.key&&Z([]),a({type:"shixunsList/getMenus",payload:{}})}),[t.actionTabs.key]),(0,x.useEffect)((function(){(null!=p&&p.shixun_list||null!=g&&g.shixun_list)&&M("recommend"===_e.sort?g:p)}),[p,g]);var ye=function(){var e=l()(o()().mark((function e(){var n,s,t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(M([]),ee(!0),n=d()({},_e),"recommend"===_e.sort&&(n.sort="myshixuns_count"),"recommend"!==_e.sort){e.next=9;break}return e.next=7,a({type:"classroomList/getShixunAiRecommendLists",payload:d()(d()({},n),{},{course_id:h.coursesId})});case 7:e.next=12;break;case 9:return s=d()({},n),e.next=12,a({type:"classroomList/getShixunLists",payload:s});case 12:return e.next=14,(0,f.ZP)("/api/users/user_setting_groups.json",{method:"get",params:{type:"Shixun"}});case 14:t=e.sent,E([{id:null,name:"全部"},{id:-1,name:"未加入目录"}].concat(i()((null==t?void 0:t.groups)||[]))),Z([]),ee(!1);case 18:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();if("选用实践课程"!==t.actionTabs.key){var ve=(0,me.P)(),je=m()(ve,4),be=je[0],ke=je[1],we=je[2],Ne=je[3],Ze=function(){var e=l()(o()().mark((function e(n){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a({type:"classroomList/createShixunHomework",payload:{coursesId:h.coursesId,shixuns_info:n.map((function(e){return{shixun_id:e.id,is_copy:e.is_copy,is_use:e.is_use}}))}});case 2:e.sent.status||((0,P.L9)(["教学课堂","课程实验","选用实践项目"]),y.ZP.success("操作成功"),a({type:"classroomList/setActionTabs",payload:{}}),(0,I.GJ)()?a({type:"classroomList/getClassroomTeacherShixunsList",payload:d()(d()({},t.actionTabs.params),{},{type:4})}):a({type:"classroomList/getClassroomShixunsList",payload:d()({},t.actionTabs.params)}),a({type:"classroomList/getClassroomLeftMenus",payload:{id:h.coursesId}}),"0"===localStorage.getItem("Noviceguide")||a({type:"shixunHomeworks/setActionTabs",payload:{key:"底部弹窗",type:12,text:(0,H.jsx)("div",{children:"接下来,咱们给教学课堂添加一个“课程实验”~点击“选用实践项目”,选择一个作业,然后点击“立即发布”就给实践课堂添加了一个课程实验。"})}}));case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),Le=(0,x.useState)(!1),Ce=m()(Le,2),Te=Ce[0],Se=Ce[1];return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(V.Z,{placement:"bottom",height:"100%",closable:!0,open:"选用实践项目"===t.actionTabs.key,rootClassName:Q,onClose:function(){a({type:"classroomList/setActionTabs",payload:{key:""}})},footer:(0,H.jsxs)("div",{className:"tc",style:{height:"64px",display:"flex",alignItems:"center",justifyContent:"center"},children:[(0,H.jsx)(B.ZP,{size:"middle",onClick:function(){a({type:"classroomList/setActionTabs",payload:{}})},style:{marginRight:8,width:"120px",height:"40px",fontSize:"16px",borderRadius:"4px"},children:"取消"}),(0,H.jsx)(B.ZP,{style:{width:"120px",height:"40px",fontSize:"16px",borderRadius:"4px"},size:"middle",onClick:l()(o()().mark((function e(){var n,s,i;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Se(!0),e.next=3,Ne({id:N,type:"shixun",course_id:null===(n=t.detailTopBanner)||void 0===n?void 0:n.course_id});case 3:if(e.sent){e.next=8;break}return i=null==A||null===(s=A.shixun_list)||void 0===s?void 0:s.filter((function(e){return N.includes(e.identifier)})).map((function(e){return{id:e.id,is_copy:0,is_use:1}})),e.next=8,Ze(i);case 8:Se(!1);case 9:case"end":return e.stop()}}),e)}))),type:"primary",loading:Te,children:"确定"})]}),children:[(0,H.jsx)("section",{className:"tc",children:(0,H.jsx)(ue.Z,{onChange:function(e){null!=e&&e.keyword&&(0,he.tk)({name:null==e?void 0:e.keyword,copywriting:null==e?void 0:e.keyword,position:"Shixun"}),ge(d()(d()(d()({},_e),e),{},{page:1}))}})}),(0,H.jsx)("section",{className:"edu-container",children:(0,H.jsx)(J.Z,{spinning:D,children:(0,H.jsxs)("aside",{children:[pe.map((function(e,n){var s;return 0!==n?null:(0,H.jsxs)("ul",{className:K,children:[(0,H.jsx)("li",{children:e.name}),null==e||null===(s=e.children)||void 0===s?void 0:s.map((function(n,s){return(0,H.jsx)("li",{className:_e[e.id]==n.id?X:"",onClick:function(){_e[e.id]=n.id,_e.page=1,ge(d()({},_e))},children:(0,H.jsx)("strong",{children:n.name})})}))]},n)})),(0,H.jsxs)("ul",{className:K,children:[(0,H.jsx)("li",{children:"方向"}),(0,H.jsx)("li",{className:null!=_e&&_e.discipline_id?"":X,onClick:function(){delete _e.tag_level,delete _e.sub_discipline_id,delete _e.discipline_id,_e.page=1,ge(d()({},_e))},children:(0,H.jsx)("strong",{children:"全部"})}),r.menus&&r.menus.map((function(e,n){return(0,H.jsxs)("li",{className:(null==_e?void 0:_e.discipline_id)==e.id?X:"",children:[(0,H.jsx)("strong",{onClick:function(){_e.tag_level=1,_e.discipline_id=e.id,delete _e.sub_discipline_id,_e.page=1,ge(d()({},_e))},children:e.name}),(0,H.jsx)("div",{children:e.sub_repertoires.map((function(n,s){return(0,H.jsxs)("div",{className:"mt5",children:[(0,H.jsx)("div",{className:(null==_e?void 0:_e.sub_discipline_id)==n.id&&2===_e.tag_level?"".concat(U," ").concat(q):q,onClick:function(){_e.tag_level=2,_e.discipline_id=e.id,_e.sub_discipline_id=n.id,ge(d()({},_e))},children:n.name}),(0,H.jsx)("ul",{className:"mt5",children:n.tags&&n.tags.map((function(n,s){return(0,H.jsx)("li",{className:_e.sub_discipline_id==n.id&&3===_e.tag_level?U:"",onClick:function(){_e.tag_level=3,_e.discipline_id=e.id,_e.sub_discipline_id=n.id,ge(d()({},_e))},children:n.name},s)}))})]},s)}))})]},n)}))]}),"mine"===_e.type&&(0,H.jsxs)("ul",{className:K,children:[(0,H.jsx)("li",{children:"目录"}),null==O?void 0:O.map((function(e,n){return(0,H.jsx)("li",{className:_e.group_id==e.id?X:"",onClick:function(){_e.group_id=e.id,_e.page=1,ge(d()({},_e))},children:(0,H.jsx)("strong",{children:e.name})},e.name)}))]}),pe.map((function(e,n){var s;return 1!==n?null:(0,H.jsxs)("ul",{className:K,children:[(0,H.jsx)("li",{children:e.name}),null==e||null===(s=e.children)||void 0===s?void 0:s.map((function(n,s){return(0,H.jsx)("li",{className:_e[e.id]==n.id?X:"",onClick:function(){_e[e.id]=n.id,ge(d()({},_e))},children:(0,H.jsx)("strong",{children:n.name})})}))]},n)})),(0,H.jsxs)(j.Z,{align:"middle",children:[(0,H.jsx)(b.Z,{flex:"1",className:ae,children:ie.map((function(e,n){return(0,H.jsx)(B.ZP,{className:"mr20",type:_e.sort===e.id?"primary":"default",onClick:function(){_e.sort=e.id,ge(d()({},_e))},children:e.name},n)}))}),(0,H.jsx)(b.Z,{className:"c-grey-999",children:(0,H.jsx)("div",{className:re,children:(0,H.jsxs)("ul",{children:[(0,H.jsxs)("li",{children:["已选",(0,H.jsx)("span",{className:"c-blue",children:N.length}),"个实训"]}),(0,H.jsxs)("li",{children:["共",(0,H.jsx)("span",{className:"c-blue",children:A.shixuns_count}),"个课程"]}),(0,H.jsxs)("li",{className:"current",onClick:function(){_e.order="asc"===_e.order?"desc":"asc",ge(d()({},_e))},children:["学习人数",(0,H.jsxs)("p",{className:"edu-sorter current ".concat(_e.order),children:[(0,H.jsx)("span",{className:"iconfont icon-sanjiaoxing-up"}),(0,H.jsx)("span",{className:"iconfont icon-sanjiaoxing-down"})]})]})]})})})]}),0===(null==A||null===(n=A.shixun_list)||void 0===n?void 0:n.length)&&(0,H.jsx)(W.Z,{}),(0,H.jsx)(C.Z.Group,{style:{display:"block"},value:N,onChange:function(e){Z(e)},children:null==A||null===(s=A.shixun_list)||void 0===s?void 0:s.map((function(e,n){return(0,H.jsxs)("div",{className:$,style:{cursor:"auto"},children:[(0,H.jsx)(C.Z,{value:null==e?void 0:e.identifier,style:{marginTop:"3px"},disabled:null==e?void 0:e.need_authorize}),(0,H.jsxs)("div",{className:ne,children:[(0,H.jsx)("div",{className:se,children:(0,H.jsxs)("div",{className:te,children:[(0,H.jsx)(_.Link,{to:"/shixuns/".concat(e.identifier,"/challenges"),target:"_blank",children:(0,H.jsx)("strong",{className:"font16",dangerouslySetInnerHTML:{__html:e.title}})}),(null==e?void 0:e.need_authorize)&&(0,H.jsx)("span",{onClick:function(){(0,de.rX)(!1)},style:{marginRight:"auto"},className:"tag-style bg-pink current ml10",children:"需授权"}),(0,I.Ny)()&&1===(null==e?void 0:e.mark_status)&&(0,H.jsx)(k.Z,{zIndex:1e4,title:null==e?void 0:e.mark_content,children:(0,H.jsx)("span",{style:{marginRight:"auto",background:"#2FA34F"},className:"tag-style current ml10",children:"正常"})}),(0,I.Ny)()&&2===(null==e?void 0:e.mark_status)&&(0,H.jsx)(k.Z,{zIndex:1e4,title:null==e?void 0:e.mark_content,children:(0,H.jsx)("span",{style:{marginRight:"auto",background:"#FF8C29"},className:"tag-style current ml10",children:"需完善"})}),(0,I.Ny)()&&3===(null==e?void 0:e.mark_status)&&(0,H.jsx)(k.Z,{zIndex:1e4,title:null==e?void 0:e.mark_content,children:(0,H.jsx)("span",{style:{marginRight:"auto",background:"#E53333"},className:"tag-style current ml10",children:"无法使用"})}),(0,H.jsx)(B.ZP,{ghost:!0,href:"/shixuns/".concat(e.identifier,"/challenges"),type:"primary",target:"_blank",style:{borderRadius:"50px"},children:"体验实训"})]})}),(0,H.jsx)("div",{className:"flex-wrp mt10 font14 c-light-black",children:(0,H.jsx)("span",{className:oe,dangerouslySetInnerHTML:{__html:e.description}})}),(0,H.jsx)("div",{className:" mt15",children:e.challenge_names.map((function(e,n){return(0,H.jsxs)("span",{className:"mr30",children:["第",n+1,"关 ",e," "]},n)}))}),(0,H.jsx)(Y.Z,{dashed:!0}),(0,H.jsxs)("div",{className:"c-light-black mt20",style:{display:"flex",justifyContent:"space-between"},children:[(0,H.jsxs)("div",{children:[(0,H.jsx)(k.Z,{overlayClassName:ce,title:(0,H.jsx)("div",{children:(0,H.jsx)("span",{dangerouslySetInnerHTML:{__html:null==e?void 0:e.member_user_names}})}),children:(0,H.jsx)("span",{className:le,dangerouslySetInnerHTML:{__html:null==e?void 0:e.member_user_names}})}),e.author_school_name&&(0,H.jsx)(x.Fragment,{children:(0,H.jsx)("span",{dangerouslySetInnerHTML:{__html:e.author_school_name}})})]}),(0,H.jsxs)("div",{children:[(0,H.jsxs)("span",{className:"mr30",children:["难度系数 ",e.level]}),(0,H.jsxs)("span",{children:["学习人数 ",e.study_count]})]})]})]})]},null==e?void 0:e.identifier)}))})]})})}),(0,H.jsx)("div",{className:"tc mt20",children:(0,H.jsx)(L.Z,{defaultCurrent:1,hideOnSinglePage:!0,defaultPageSize:20,showSizeChanger:!1,current:_e.page||1,showQuickJumper:!0,total:null==A?void 0:A.shixuns_count,onChange:function(e){_e.page=e,ge(d()({},_e))}})})]},"bottom"),(0,H.jsx)(me.Z,{visible:be,onCancel:ke,renderData:we,inPaper:!1,onOk:Ze,modalType:"multiple",type:"shixun",position:"选中实训"})]})}})),fe=v.Z.Search,_e=(0,_.connect)((function(e){return{classroomList:e.classroomList,shixunsList:e.shixunsList,loading:e.loading.effects}}))((function(e){var n,s,t=e.classroomList,a=(e.loading,e.dispatch),r=(0,x.useState)(d()({},(0,_.useParams)())),c=m()(r,2),u=c[0],h=(c[1],t.actionTabs),p=t.shixunLists,f=(0,x.useState)([]),g=m()(f,2),v=g[0],j=g[1],b=(0,x.useState)(!1),w=m()(b,2),N=w[0],Z=w[1],T=(0,x.useState)({page:1,limit:20,search:null}),S=m()(T,2),A=S[0],P=S[1];(0,x.useEffect)((function(){M()}),[u.coursesId,A]),(0,x.useEffect)((function(){"从课堂实验添加"===t.actionTabs.key&&j([])}),[t.actionTabs.key]);var M=function(){var e=l()(o()().mark((function e(){var n,s;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=d()(d()({},A),{},{course_id:null==h||null===(n=h.params)||void 0===n?void 0:n.course_id}),e.next=3,a({type:"classroomList/getExperimentLists",payload:s});case 3:Z(!1);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();if("选用实践课程"!==t.actionTabs.key)return(0,H.jsxs)(V.Z,{placement:"bottom",height:"100%",closable:!0,style:{zIndex:9999},open:"从课堂实验添加"===t.actionTabs.key,rootClassName:Q,onClose:function(){a({type:"classroomList/setActionTabs",payload:{key:""}})},footer:(0,H.jsxs)("div",{className:"tc",style:{height:"64px",display:"flex",alignItems:"center",justifyContent:"center"},children:[(0,H.jsx)(B.ZP,{size:"middle",onClick:function(){a({type:"classroomList/setActionTabs",payload:{key:""}})},style:{marginRight:8,width:"120px",height:"40px",fontSize:"16px",borderRadius:"4px"},children:"取消"}),(0,H.jsx)(B.ZP,{style:{width:"120px",height:"40px",fontSize:"16px",borderRadius:"4px"},size:"middle",onClick:l()(o()().mark((function e(){var n;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a({type:"classroomList/createExperiment",payload:{homework_common_ids:i()(v),category_id:u.categoryId,course_id:null==h||null===(n=h.params)||void 0===n?void 0:n.course_id}});case 2:e.sent.status||(y.ZP.success("操作成功"),a({type:"classroomList/setActionTabs",payload:{}}),(0,I.GJ)()?a({type:"classroomList/getClassroomTeacherShixunsList",payload:d()(d()({},t.actionTabs.params),{},{type:4})}):a({type:"classroomList/getClassroomShixunsList",payload:d()({},t.actionTabs.params)}),a({type:"classroomList/getClassroomLeftMenus",payload:{id:u.coursesId}}),"0"===localStorage.getItem("Noviceguide")||a({type:"shixunHomeworks/setActionTabs",payload:{key:"底部弹窗",type:12,text:(0,H.jsx)("div",{children:"接下来,咱们给教学课堂添加一个“课程实验”~点击“选用实践项目”,选择一个作业,然后点击“立即发布”就给实践课堂添加了一个课程实验。"})}}));case 4:case"end":return e.stop()}}),e)}))),type:"primary",children:"确定"})]}),children:[(0,H.jsx)("section",{className:"tc",children:(0,H.jsx)(fe,{placeholder:"请输入课堂实验名称进行查询",enterButton:"搜索",size:"middle",className:ie,onSearch:function(e){A.search=e,P(d()({},A))}})}),(0,H.jsx)("section",{className:"edu-container",children:(0,H.jsx)(J.Z,{spinning:N,children:(0,H.jsxs)("aside",{children:[0===(null==p||null===(n=p.homeworks)||void 0===n?void 0:n.length)&&(0,H.jsx)(W.Z,{}),null==p||null===(s=p.homeworks)||void 0===s?void 0:s.map((function(e,n){var s,t,i;return(0,H.jsxs)("div",{className:$,style:{cursor:"auto"},children:[(0,H.jsx)(C.Z,{checked:v.includes(e.id),value:e.id,style:{marginTop:"3px"},disabled:null==e?void 0:e.need_authorize,onChange:function(n){v.indexOf(e.id);v.indexOf(e.id)>-1?j(v.filter((function(n){return n!==e.id}))):j(v.concat(e.id))}}),(0,H.jsxs)("div",{className:ne,children:[(0,H.jsx)("div",{className:se,children:(0,H.jsxs)("div",{className:te,children:[(0,H.jsx)(_.Link,{to:"/shixuns/".concat(e.identifier,"/challenges"),target:"_blank",children:(0,H.jsx)("strong",{className:"font16",dangerouslySetInnerHTML:{__html:null==e?void 0:e.name}})}),(null==e?void 0:e.need_authorize)&&(0,H.jsx)("span",{onClick:function(){(0,de.rX)(!1)},style:{marginRight:"auto"},className:"tag-style bg-pink current ml10",children:"需授权"}),(0,I.Ny)()&&1===(null==e?void 0:e.mark_status)&&(0,H.jsx)(k.Z,{title:null==e?void 0:e.mark_content,children:(0,H.jsx)("span",{style:{marginRight:"auto",background:"#2FA34F"},className:"tag-style current ml10",children:"正常"})}),(0,I.Ny)()&&2===(null==e?void 0:e.mark_status)&&(0,H.jsx)(k.Z,{title:null==e?void 0:e.mark_content,children:(0,H.jsx)("span",{style:{marginRight:"auto",background:"#FF8C29"},className:"tag-style current ml10",children:"需完善"})}),(0,I.Ny)()&&3===(null==e?void 0:e.mark_status)&&(0,H.jsx)(k.Z,{title:null==e?void 0:e.mark_content,children:(0,H.jsx)("span",{style:{marginRight:"auto",background:"#E53333"},className:"tag-style current ml10",children:"无法使用"})}),(0,H.jsx)(B.ZP,{ghost:!0,href:"/shixuns/".concat(e.shixun_identifier,"/challenges"),type:"primary",target:"_blank",style:{borderRadius:"50px"},children:"查看实验"})]})}),(0,H.jsx)("div",{className:"flex-wrp mt10 font14 c-light-black",children:(0,H.jsx)("span",{className:oe,dangerouslySetInnerHTML:{__html:null==e?void 0:e.description}})}),(0,H.jsx)("div",{className:" mt15",children:null==e||null===(s=e.challenges)||void 0===s?void 0:s.map((function(e,n){return(0,H.jsxs)("span",{className:"mr30",children:["第",n+1,"关 ",null==e?void 0:e.subject," "]},n)}))}),(0,H.jsx)(Y.Z,{dashed:!0}),(0,H.jsxs)("div",{className:"c-light-black mt20",children:[(null==e||null===(t=e.user)||void 0===t?void 0:t.name)&&(0,H.jsxs)(x.Fragment,{children:[(0,H.jsx)("span",{children:null==e||null===(i=e.user)||void 0===i?void 0:i.name}),(0,H.jsx)("span",{className:"ml15 mr15",children:"|"})]}),(0,H.jsx)("span",{children:"创建时间: "}),(0,H.jsx)("span",{children:null==e?void 0:e.created_at})]})]})]},n)}))]})})}),(0,H.jsx)("div",{className:"tc mt20",children:(0,H.jsx)(L.Z,{defaultCurrent:1,hideOnSinglePage:!0,defaultPageSize:20,showSizeChanger:!1,current:A.page||1,showQuickJumper:!0,total:null==p?void 0:p.total_count,onChange:function(e){A.page=e,P(d()({},A))}})})]},"bottom")})),ge=(v.Z.Search,(0,_.connect)((function(e){return{classroomList:e.classroomList,shixunsList:e.shixunsList,loading:e.loading.effects}}))((function(e){var n,s,t=e.classroomList,a=e.loading,r=e.dispatch,c=(e.shixunsList,(0,x.useState)(d()({},(0,_.useParams)()))),u=m()(c,2),h=u[0],p=(u[1],(0,_.useLocation)(),t.actionTabs,G.Z.useForm()),f=(m()(p,1)[0],t.shixunAiRecommendLists),g=(0,x.useState)([]),v=m()(g,2),j=v[0],b=v[1],k=(0,x.useState)({page:1,course_id:h.coursesId,limit:20,no_jupyter:1}),w=m()(k,2),N=w[0],Z=w[1];return(0,x.useEffect)((function(){}),[h.coursesId,N]),(0,x.useEffect)((function(){"智能推荐"===t.actionTabs.key&&(b([]),r({type:"classroomList/getShixunAiRecommendLists",payload:d()({},N)}))}),[t.actionTabs.key]),"智能推荐"!==t.actionTabs.key?null:(0,H.jsxs)(T.Z,{title:"智能推荐",placement:"bottom",centered:!0,height:"60%",width:1e3,closable:!0,style:{zIndex:9999},okText:"确定",cancelText:"取消",open:"智能推荐"===t.actionTabs.key,onCancel:function(){r({type:"classroomList/setActionTabs",payload:{key:""}})},onOk:l()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r({type:"classroomList/createShixunHomework",payload:d()({shixun_ids:i()(j),category_id:h.categoryId},h)});case 2:e.sent.status||((0,P.L9)(["教学课堂","课程实验","智能推荐选用"]),sessionStorage.aiRecommentHide=!0,y.ZP.success("操作成功"),r({type:"classroomList/setActionTabs",payload:{}}),r({type:"classroomList/getClassroomShixunsList",payload:d()({},t.actionTabs.params)}),r({type:"classroomList/getClassroomLeftMenus",payload:{id:h.coursesId}}));case 4:case"end":return e.stop()}}),e)}))),children:[(0,H.jsx)("section",{className:"",style:{maxHeight:500,minHeight:150,overflow:"auto"},children:(0,H.jsx)(J.Z,{spinning:a["classroomList/getShixunAiRecommendLists"],children:(0,H.jsxs)("aside",{style:{minHeight:150},children:[0===(null==f||null===(n=f.shixun_list)||void 0===n?void 0:n.length)&&(0,H.jsx)(W.Z,{}),null==f||null===(s=f.shixun_list)||void 0===s?void 0:s.map((function(e,n){var s,t;return(0,H.jsxs)("div",{className:ee,style:{cursor:"auto"},children:[(0,H.jsx)(C.Z,{checked:j.includes(e.id),value:e.id,style:{marginTop:"3px"},disabled:null==e?void 0:e.need_authorize,onChange:function(n){j.indexOf(e.id);j.indexOf(e.id)>-1?b(j.filter((function(n){return n!==e.id}))):b(j.concat(e.id))}}),(0,H.jsxs)("div",{className:ne,children:[(0,H.jsx)("div",{className:se,children:(0,H.jsxs)("div",{className:te,children:[(0,H.jsx)(_.Link,{to:"/shixuns/".concat(e.identifier,"/challenges"),target:"_blank",children:(0,H.jsx)("strong",{className:"font16",dangerouslySetInnerHTML:{__html:e.title}})}),(null==e?void 0:e.need_authorize)&&(0,H.jsx)("span",{onClick:function(){(0,de.rX)(!1)},style:{marginRight:"auto"},className:"tag-style bg-pink current ml10",children:"需授权"}),(0,H.jsx)(B.ZP,{ghost:!0,href:"/shixuns/".concat(e.identifier,"/challenges"),type:"primary",target:"_blank",style:{borderRadius:"50px"},children:"体验实训"})]})}),(0,H.jsx)("div",{className:"flex-wrp mt10 font14 c-light-black",children:(0,H.jsx)("span",{className:oe,dangerouslySetInnerHTML:{__html:e.description}})}),(0,H.jsx)("div",{className:" mt10",children:e.challenge_names.map((function(e,n){return(0,H.jsxs)("span",{className:"mr30",children:["第",n+1,"关 ",e," "]},n)}))}),(0,H.jsxs)("div",{className:"c-light-black mt10",children:[null!=e&&null!==(s=e.content)&&void 0!==s&&s.author_name?(0,H.jsx)("span",{dangerouslySetInnerHTML:{__html:null==e||null===(t=e.content)||void 0===t||null===(t=t.author_name)||void 0===t?void 0:t[0]}}):(0,H.jsx)("span",{children:e.author_name}),(0,H.jsx)("span",{className:"ml15 mr15",children:"|"}),e.author_school_name&&(0,H.jsxs)(x.Fragment,{children:[(0,H.jsx)("span",{children:e.author_school_name}),(0,H.jsx)("span",{className:"ml15 mr15",children:"|"})]}),(0,H.jsxs)("span",{children:["难度系数 ",e.level]}),(0,H.jsx)("span",{className:"ml15 mr15",children:"|"}),(0,H.jsx)("span",{children:"学习人数 "}),(0,H.jsx)("span",{children:e.study_count})]}),(0,H.jsx)(Y.Z,{dashed:!0})]})]},n)}))]})})}),(0,H.jsx)("div",{className:"tc mt20 hide",children:(0,H.jsx)(L.Z,{defaultCurrent:1,hideOnSinglePage:!0,defaultPageSize:20,showSizeChanger:!1,current:N.page||1,showQuickJumper:!0,total:null==f?void 0:f.shixuns_count,onChange:function(e){N.page=e,Z(d()({},N))}})})]},"bottom")}))),ye=v.Z.Search,ve=(0,_.connect)((function(e){return{classroomList:e.classroomList,loading:e.loading.effects}}))((function(e){var n,s,t=e.classroomList,i=e.loading,a=e.dispatch,r=(0,x.useState)(d()({},(0,_.useParams)())),c=m()(r,2),u=c[0],h=(c[1],(0,_.useLocation)(),t.actionTabs,G.Z.useForm()),p=(m()(h,1)[0],t.coursesLists),f=(0,x.useState)([]),g=m()(f,2),v=g[0],j=g[1],b=(0,x.useState)({page:1,type:"all",order:"desc",limit:20,sort:"myshixuns_count"}),w=m()(b,2),N=w[0],Z=w[1];(0,x.useEffect)((function(){"选用实践课程"===t.actionTabs.key&&(a({type:"classroomList/getCoursesLists",payload:d()({},N)}),j([]))}),[t.actionTabs.key,u.categoryId,N]);var C=(0,me.P)(),T=m()(C,4),A=T[0],M=T[1],R=T[2],z=T[3],O=function(){var e=l()(o()().mark((function e(n){var s;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a({type:"classroomList/createCoursesHomework",payload:{coursesId:u.coursesId,subjects_info:[{subject_id:null===(s=v[0])||void 0===s?void 0:s.id,stage_shixuns:n.map((function(e){return{stage_shixun_id:e.id,is_use:e.is_use,is_copy:e.is_copy}}))}]}});case 2:e.sent.status||((0,P.L9)(["教学课堂","课程实验","选用实践课程"]),y.ZP.success("操作成功"),a({type:"classroomList/setActionTabs",payload:{}}),(0,I.GJ)()?a({type:"classroomList/getClassroomTeacherShixunsList",payload:d()(d()({},t.actionTabs.params),{},{type:4})}):a({type:"classroomList/getClassroomShixunsList",payload:d()({},t.actionTabs.params)}),a({type:"classroomList/getClassroomLeftMenus",payload:{id:u.coursesId}}));case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();return"选用实践课程"!==t.actionTabs.key?null:(0,H.jsxs)(V.Z,{placement:"bottom",height:"100%",closable:!0,onClose:function(){a({type:"classroomList/setActionTabs",payload:{key:""}})},open:"选用实践课程"===t.actionTabs.key,rootClassName:Q,footer:(0,H.jsxs)("div",{className:"tc",style:{height:"64px",display:"flex",alignItems:"center",justifyContent:"center"},children:[(0,H.jsx)(B.ZP,{size:"middle",onClick:function(){a({type:"classroomList/setActionTabs",payload:{key:""}})},style:{marginRight:8,width:"120px",height:"40px",fontSize:"16px",borderRadius:"4px"},children:"取消"}),(0,H.jsx)(B.ZP,{style:{width:"120px",height:"40px",fontSize:"16px",borderRadius:"4px"},size:"middle",loading:i["classroomList/createCoursesHomework"],onClick:l()(o()().mark((function e(){var n,s;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==(null==v?void 0:v.length)){e.next=3;break}return y.ZP.error("请选择一个实践课程"),e.abrupt("return",!1);case 3:return e.next=5,z({id:null===(n=v[0])||void 0===n?void 0:n.identifier,type:"subject",stage_item_id:[],sync_catelog:1,course_id:null===(s=t.detailTopBanner)||void 0===s?void 0:s.course_id});case 5:e.sent||O([]);case 7:case"end":return e.stop()}}),e)}))),type:"primary",children:"确定"})]}),children:[(0,H.jsx)("section",{className:"tc",children:(0,H.jsx)(ye,{placeholder:"课程名称/课程标识/合作者",enterButton:"搜索",size:"middle",className:ie,onSearch:function(e){N.keyword=e,e&&(0,he.tk)({name:e,copywriting:e,position:"Subject"}),Z(d()({},N))}})}),(0,H.jsx)("section",{className:"edu-container",children:(0,H.jsx)(J.Z,{spinning:i["classroomList/getCoursesLists"],children:(0,H.jsxs)("aside",{children:[(0,H.jsx)("div",{className:re,children:(0,H.jsxs)("ul",{children:[(0,H.jsxs)("li",{children:["已选",(0,H.jsx)("span",{className:"c-blue",children:v.length}),"课程"]}),(0,H.jsxs)("li",{children:["共",(0,H.jsx)("span",{className:"c-blue",children:p.subjects_count}),"个课程"]}),(0,H.jsxs)("li",{className:"current",onClick:function(){N.order="asc"===N.order?"desc":"asc",N.sort="shixuns_count",Z(d()({},N))},children:["实训数",(0,H.jsxs)("p",{className:"edu-sorter current ".concat("shixuns_count"===N.sort&&N.order),children:[(0,H.jsx)("span",{className:"iconfont icon-sanjiaoxing-up"}),(0,H.jsx)("span",{className:"iconfont icon-sanjiaoxing-down"})]})]}),(0,H.jsxs)("li",{className:"current",onClick:function(){N.order="asc"===N.order?"desc":"asc",N.sort="myshixuns_count",Z(d()({},N))},children:["学习人数",(0,H.jsxs)("p",{className:"edu-sorter current ".concat("myshixuns_count"===N.sort&&N.order),children:[(0,H.jsx)("span",{className:"iconfont icon-sanjiaoxing-up"}),(0,H.jsx)("span",{className:"iconfont icon-sanjiaoxing-down"})]})]}),(0,H.jsx)("li",{className:"".concat("all"===N.type&&"c-blue"," current"),onClick:function(){N.type="all",Z(d()({},N))},children:"全部课程"}),(0,H.jsx)("li",{className:"".concat("mine"===N.type&&"c-blue"," current"),onClick:function(){N.type="mine",Z(d()({},N))},children:"我的课程"})]})}),0===(null==p||null===(n=p.subject_list)||void 0===n?void 0:n.length)&&(0,H.jsx)(W.Z,{}),null==p||null===(s=p.subject_list)||void 0===s?void 0:s.map((function(e,n){var s,t,i,a,o,r;return(0,H.jsxs)("div",{className:$,style:{cursor:"auto"},children:[(0,H.jsx)(S.ZP,{checked:v.map((function(e){return e.id})).includes(e.id),value:e.id,style:{marginTop:"1px"},disabled:null==e?void 0:e.need_authorize,onChange:function(n){j([{id:e.id,identifier:e.identifier}])}}),(0,H.jsxs)("div",{className:ne,children:[(0,H.jsx)("div",{className:se,children:(0,H.jsxs)("div",{className:te,children:[(0,H.jsx)(_.Link,{to:"/paths/".concat(e.id),target:"_blank",children:(0,H.jsx)("strong",{className:"font16",dangerouslySetInnerHTML:{__html:e.title}})}),(null==e?void 0:e.need_authorize)&&(0,H.jsx)("span",{onClick:function(){(0,de.rX)(!1,"该课程中包含实训需授权后才可使用。 您可以在QQ服务群向管理员申请,获得继续操作的权限。")},style:{marginRight:"auto"},className:"tag-style bg-pink current ml10",children:"需授权"}),(0,H.jsx)(B.ZP,{ghost:!0,href:"/paths/".concat(e.id),type:"primary",target:"_blank",style:{borderRadius:"50px"},children:"体验课程"})]})}),(0,H.jsx)("div",{className:"flex-wrp mt10 font14 c-light-black",children:(0,H.jsx)("span",{className:oe,dangerouslySetInnerHTML:{__html:e.description}})}),(0,H.jsx)(Y.Z,{dashed:!0}),(0,H.jsxs)("div",{className:"c-light-black mt20",style:{display:"flex",justifyContent:"space-between"},children:[(0,H.jsxs)("div",{children:[null!=e&&null!==(s=e.content)&&void 0!==s&&s.member_user_names?(0,H.jsx)(k.Z,{overlayClassName:ce,title:(0,H.jsx)("div",{children:(0,H.jsx)("span",{dangerouslySetInnerHTML:{__html:null==e||null===(t=e.content)||void 0===t?void 0:t.member_user_names}})}),children:(0,H.jsx)("span",{className:le,dangerouslySetInnerHTML:{__html:null==e||null===(i=e.content)||void 0===i?void 0:i.member_user_names}})}):(null==e?void 0:e.member_user_names)&&(0,H.jsx)(k.Z,{title:(0,H.jsx)("div",{children:(0,H.jsx)("span",{children:e.member_user_names})}),children:(0,H.jsx)("span",{className:le,children:e.member_user_names})}),null!=e&&null!==(a=e.content)&&void 0!==a&&a.author_school_name?(0,H.jsx)(k.Z,{overlayClassName:ce,title:(0,H.jsx)("div",{children:(0,H.jsx)("span",{dangerouslySetInnerHTML:{__html:null==e||null===(o=e.content)||void 0===o?void 0:o.author_school_name}})}),children:(0,H.jsx)("span",{className:le,dangerouslySetInnerHTML:{__html:null==e||null===(r=e.content)||void 0===r?void 0:r.author_school_name}})}):(null==e?void 0:e.author_school_name)&&(0,H.jsx)(k.Z,{title:(0,H.jsx)("div",{children:(0,H.jsx)("span",{children:e.author_school_name})}),children:(0,H.jsx)("span",{className:le,children:e.author_school_name})})]}),(0,H.jsxs)("div",{children:[(0,H.jsxs)("span",{className:"mr30",children:["章节 ",e.stage_count]}),(0,H.jsxs)("span",{className:"mr30",children:["实训 ",e.shixuns_count]}),(0,H.jsxs)("span",{children:["学习人数 ",e.myshixuns_count]})]})]})]})]},e.id)}))]})})}),(0,H.jsx)("div",{className:"tc mt20",children:(0,H.jsx)(L.Z,{defaultCurrent:1,hideOnSinglePage:!0,defaultPageSize:20,current:N.page||1,showQuickJumper:!0,total:null==p?void 0:p.subjects_count,onChange:function(e){N.page=e,a({type:"classroomList/getCoursesLists",payload:d()({},N)})}})}),(0,H.jsx)(me.Z,{visible:A,inPaper:!1,onOk:O,onCancel:M,renderData:R,modalType:"multiple",type:"subject"})]},"bottom")})),je=s(92866),be=s(91689),ke=function(e){var n=e.styles,s=void 0===n?{}:n,t=e.params,i=e.setisshowmodal;return(0,H.jsxs)("section",{className:"tc animated fadeIn",style:d()(d()({},{color:"#999",margin:"200px auto"}),s),children:[(0,H.jsx)("img",{src:je.z3}),(0,H.jsx)("p",{className:"mt20 font14",children:"该".concat(t.category?"分组":"课程","无课程实验,可以下方按钮或右上方“选用实验”按钮创建作业")}),(0,H.jsxs)("div",{style:{marginTop:"30px"},children:[(0,H.jsx)(B.ZP,{onClick:function(){i(!0)},type:"primary",style:{width:"128px",height:"40px",borderRadius:"4px",marginRight:"20px"},children:"选用实验"}),(0,H.jsx)(B.ZP,{onClick:function(){(0,P.xg)("".concat(be.Z.API_SERVER,"/pdf/教学课堂操作手册简单版-V4.0.pdf"))},type:"primary",style:{width:"128px",height:"40px",borderRadius:"4px"},children:"新建作业指引"})]})]})},we={flex_box_center:"flex_box_center___i0kQ7",flex_space_between:"flex_space_between___st8Nm",flex_box_vertical_center:"flex_box_vertical_center___cGman",flex_box_center_end:"flex_box_center_end___xCqb1",flex_box_column:"flex_box_column___90t8q",bg:"bg___yvvvB",containerDesc:"containerDesc___McNkA",tablestyle:"tablestyle____NWqR",listItem:"listItem___Kb3j3",info:"info___QEKlY",title:"title___IjCCo",titleLeft:"titleLeft___iZ9Qh",titleRight:"titleRight___QK1TN",moveCategory:"moveCategory___ydIP9",name:"name___CCaOX",categoryName:"categoryName___cyGX3",schedule:"schedule___Dx5uk",fnSign:"fnSign___oPdpV",spanSize:"spanSize___LVOA3",classromediv:"classromediv___LNulU",glow:"glow___KEPta",action:"action___WEeMi",btn:"btn___anrwi",btnSort:"btnSort___iBwPq",tips:"tips___ezxph",fixedBottom:"fixedBottom___RTnOi",left:"left___aDYtw",right:"right___txYei",acitons:"acitons___iwBUY",actionBtns:"actionBtns___wvnKM",cancel:"cancel___VgzVn",selectBtn:"selectBtn___mMh11",infoIcon:"infoIcon___fxDKp",infoStuIcon:"infoStuIcon___eoBo6",flexBox:"flexBox____AlDk",iconH:"iconH___Hmjwy",iconV:"iconV___VhZ00",actionIcon:"actionIcon___MWxMa",dro:"dro___bzbDZ",progressInfo:"progressInfo___bQbcf"},Ne=s(44589),Ze=s(39180),Le=s.n(Ze),Ce=(0,Ne.W8)((function(e){var n=e.item;return(0,H.jsxs)("li",{children:[(0,H.jsx)("h3",{children:n.task_name}),(0,H.jsxs)("p",{children:[n.user_name,(0,H.jsx)("span",{style:{marginLeft:"20px"},children:n.category})]})]})})),Te=(0,Ne.JN)((function(e){var n=e.items;return(0,H.jsx)("ul",{className:"task-list-container",children:n.map((function(e,n){return(0,H.jsx)(Ce,{index:n,item:e},"".concat(e.task_id))}))})})),Se=function(e){var n=e.data,s=e.callback,t=e.onCancel,i=e.visible,a=void 0!==i&&i,o=(0,x.useState)(n),r=m()(o,2),l=r[0],c=r[1];return(0,x.useEffect)((function(){c(n)}),[JSON.stringify(n)]),(0,H.jsxs)(V.Z,{placement:"bottom",height:"100%",closable:!0,onClose:t,style:{zIndex:9999},open:a,rootClassName:"sort-list-panel",children:[(0,H.jsxs)("p",{className:"sort-list-tip",children:[(0,H.jsx)("span",{children:"温馨提示:请在列表中长按鼠标左键,进行拖放排序。完成排序后请点击“保存”"}),(0,H.jsx)(B.ZP,{type:"ghost",onClick:t,style:{marginRight:10},children:"取消"}),(0,H.jsx)(B.ZP,{disabled:0===l.length,type:"primary",onClick:function(){s(l.map((function(e){return e.task_id})))},children:"保存"})]}),(0,H.jsx)(Te,{axis:"xy",helperClass:"dragging-li",items:l,onSortEnd:function(e){var n=e.newIndex,s=e.oldIndex;c(Le()(l,s,n))}})]})},Ie=s(1710),Ae=s(76794),Pe=s(51101),Me=s(94280),He=s(26256),Re=function(e){var n,s,t,i=e.v,a=e.k,r=(e.match,e.selectArrs),c=e.setSelectArrs,u=e.setSelectArrsAll,h=e.selectArrsAll,p=(e.classroomList,e.dispatch),v=e.selectshow,j=e.batchState,b=e.manageAllGroup,N=(0,_.useParams)(),Z=(0,x.useState)([]),L=m()(Z,2),S=L[0],A=L[1],M=(0,x.useState)(!1),R=m()(M,2),z=R[0],O=R[1],E=(0,x.useState)(!1),F=m()(E,2),G=F[0],D=F[1],V=(0,x.useState)(!0),B=m()(V,2),J=B[0],Y=B[1];function W(){return Q.apply(this,arguments)}function Q(){return(Q=l()(o()().mark((function e(){var n;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,f.ZP)("/api/homework_commons/".concat(i.homework_id,"/group_settings_statistics.json"),{method:"get",params:d()({},N)});case 2:n=e.sent,A(n.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}(0,x.useEffect)((function(){var e;A([]),O(!1),new Date(null==i?void 0:i.student_passed_time).getTime()>new Date(null==i?void 0:i.end_time_s).getTime()&&null!=i&&null!==(e=i.status)&&void 0!==e&&e.includes("已截止")&&(null==i?void 0:i.challenge_count)-(null==i?void 0:i.finished_challenge_count)==0?(D(!1),Y(!1)):((null==i?void 0:i.challenge_count)-(null==i?void 0:i.finished_challenge_count)==0&&new Date(null==i?void 0:i.student_passed_time).getTime()<new Date(null==i?void 0:i.end_time_s).getTime()||(null==i?void 0:i.challenge_count)-(null==i?void 0:i.finished_challenge_count)==0&&new Date(null==i?void 0:i.student_passed_time).getTime()<new Date(null==i?void 0:i.late_time).getTime())&&(D(!0),Y(!1))}),[v]);var K=[{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,n){return 0===n.status.indexOf(e)}},{title:"提交情况",dataIndex:"statistics",key:"statistics",width:80,render:function(e){var n,s;return"--"===e?e:(0,H.jsxs)("span",{children:[(0,H.jsx)("span",{children:null==e||null===(n=e.split("/"))||void 0===n?void 0:n[0]})," / ",(0,H.jsx)("span",{children:null==e||null===(s=e.split("/"))||void 0===s?void 0:s[1]})]})}},{title:"截止时间",dataIndex:"end_time",key:"end_time",sorter:!0,showSorterTooltip:!1,sortOrder:"end_time"===N.order_by?"desc"===N.sort_direction?"descend":"ascend":null},{title:"补交时间",dataIndex:"late_time",key:"late_time",sorter:!0,showSorterTooltip:!1,sortOrder:"late_time"===N.order_by?"desc"===N.sort_direction?"descend":"ascend":null},{title:"分班老师",dataIndex:"teachers",key:"teachers",width:150,ellipsis:{showTitle:!1},render:function(e){return"--"!==e&&e?(0,H.jsx)("span",{title:e,children:e}):"--"}}];return(0,H.jsxs)("div",{className:we.listItem,onClick:function(e){e.stopPropagation(),null!=i&&i.is_enter_shixun&&(0,P.xg)("/classrooms/".concat(N.coursesId,"/shixun_homework/").concat(i.homework_id,"/detail?tabs=0"))},children:[(0,I.GJ)()&&j&&(0,H.jsx)(C.Z,{style:{marginTop:11,marginLeft:10},checked:r.includes(i.homework_id),value:i.homework_id,onClick:function(e){e.stopPropagation()},onChange:function(e){r.indexOf(i.homework_id);r.indexOf(i.homework_id)>-1?(c(r.filter((function(e){return e!==i.homework_id}))),u(h.filter((function(e){return e.homework_id!==i.homework_id})))):(u(h.concat(i)),c(r.concat(i.homework_id)))}}),(0,H.jsxs)("div",{className:we.info,children:[(0,H.jsxs)("div",{className:we.title,children:[(0,H.jsxs)("div",{className:we.titleLeft,style:(0,I.dE)()?{paddingRight:(null==i?void 0:i.challenge_count)-(null==i?void 0:i.finished_challenge_count)?60:140}:{},children:[(0,I.GJ)()&&(0,H.jsx)(Pe.Z,{value:i.status,children:(0,H.jsx)(P.VV,{temporary:!0,style:{margin:"0px 10px 0px 0px"},status:[i.status]})}),(0,I.dE)()&&(0,H.jsx)(P.VV,{temporary:!0,style:{margin:"0px 10px 0px 0px"},status:i.status}),(0,H.jsx)("span",{className:we.name,children:i.name}),!(null===(n=i.schools)||void 0===n||!n.length)&&(0,H.jsx)(k.Z,{title:"该课程实验面向指定单位开放",children:(0,H.jsx)("i",{className:"iconfont icon-zhidinggongkai1 ml10 mr10 c-orange"})})]}),(0,H.jsxs)("div",{className:we.titleRight,children:[(0,I.GJ)()&&0===(null==i?void 0:i.status.indexOf("未发布"))&&(0,H.jsx)(_.Link,{target:"_blank",to:"/",onClick:function(){var e=l()(o()().mark((function e(n){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n.stopPropagation(),n.preventDefault(),p({type:"classroomList/setActionTabs",payload:{key:"立即发布",selectArrs:[null==i?void 0:i.homework_id],selectArrsAll:[i],params:N,type:2,manage_all_group:b}});case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:(0,H.jsxs)("aside",{className:we.flexBox,children:[(0,H.jsx)("i",{className:"iconfont icon-yishezhifabushijian1"}),(0,H.jsx)("div",{children:"发布"})]})}),(0,I.dE)()&&(0,H.jsxs)("div",{className:we.actionIcon,children:[G?(0,H.jsx)("i",{className:"iconfont icon-yiwancheng1"}):J?"":(0,H.jsx)("i",{className:"iconfont icon-jiezhihoutongguan"}),!(null!==(s=i.status)&&void 0!==s&&s.includes("已截止"))&&(0,H.jsxs)("aside",{onClick:function(){var e=l()(o()().mark((function e(n){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.stopPropagation(),(0,de.tJ)(p,!0)){e.next=3;break}return e.abrupt("return");case 3:if(!i.can_view_details){e.next=6;break}return(0,P.xg)("/shixuns/".concat(i.shixun_identifier,"/challenges")),e.abrupt("return");case 6:i.redo?T.Z.info({width:530,title:"提示",centered:!0,okText:"确定",content:(0,H.jsx)("div",{className:"tc font16",children:"您之前已经挑战过该实训,需要重新挑战"}),onOk:function(){var e=l()(o()().mark((function e(){var n;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Me.$Q)({id:i.myshixun_identifier,url:i.url});case 2:(n=e.sent)&&(0,He.Z)({is_jupyter:!1,is_jupyter_lab:!1,shixunId:n.shixun_identifier,homework_common_id:i.homework_id,courseId:N.coursesId});case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()}):(0,He.Z)({is_jupyter:!1,is_jupyter_lab:!1,shixunId:i.shixun_identifier,homework_common_id:i.homework_id,courseId:N.coursesId});case 7:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),className:we.flexBox,style:{marginRight:10},children:[(0,H.jsx)("i",{className:"iconfont icon-kaishixuexi font14"}),(0,H.jsx)("div",{children:"开始学习"})]}),(null===(t=i.status)||void 0===t?void 0:t.includes("已截止"))&&(0,H.jsxs)("aside",{onClick:function(){var e=l()(o()().mark((function e(n){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n.stopPropagation(),n.preventDefault(),(0,P.xg)("/classrooms/".concat(N.coursesId,"/shixun_homework/").concat(i.homework_id,"/").concat(i.student_work_id,"/comment"));case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),className:we.flexBox,style:{marginRight:10},children:[(0,H.jsx)("i",{className:"iconfont icon-chakanzuoye font14"}),(0,H.jsx)("div",{children:"查看作品"})]})]}),(0,I.GJ)()&&(0,H.jsx)(w.Z,{placement:"bottomCenter",overlayClassName:we.dro,dropdownRender:function(){return(0,H.jsxs)(g.Z,{children:[(0,H.jsx)(g.Z.Item,{style:{textAlign:"center"},children:(0,H.jsx)("a",{onClick:function(){var e=l()(o()().mark((function e(n){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n.stopPropagation(),n.preventDefault(),p({type:"classroomList/setActionTabs",payload:{key:"立即发布",selectArrs:[null==i?void 0:i.homework_id],selectArrsAll:[i],params:N,type:2}});case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:"立即发布"})},1),(0,H.jsx)(g.Z.Item,{style:{textAlign:"center"},children:(0,H.jsx)("a",{onClick:function(){var e=l()(o()().mark((function e(n){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n.stopPropagation(),n.preventDefault(),p({type:"classroomList/setActionTabs",payload:{key:"立即截止",selectArrs:[null==i?void 0:i.homework_id],selectArrsAll:[i],params:N,type:2}});case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:"立即截止"})},2),(0,H.jsx)(g.Z.Item,{style:{textAlign:"center"},children:(0,H.jsx)(_.Link,{target:"_blank",to:"/",onClick:function(){var e=l()(o()().mark((function e(n){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n.stopPropagation(),n.preventDefault(),p({type:"classroomList/setActionTabs",payload:{key:"删除",selectArrs:[null==i?void 0:i.homework_id],selectArrsAll:h,params:N,status:null==i?void 0:i.status}});case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:"立即删除"})},22),(null==i?void 0:i.status.indexOf("未发布"))<0&&(0,H.jsx)(g.Z.Item,{style:{textAlign:"center"},children:(0,H.jsx)(_.Link,{target:"_blank",to:"/",onClick:function(){var e=l()(o()().mark((function e(n){var s;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.stopPropagation(),n.preventDefault(),p({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"成绩计算中,请稍候..."}}),e.next=5,(0,Ae.Vs)({categoryId:i.homework_id});case 5:s=e.sent,p({type:"globalSetting/setGlobalLoading",payload:{show:!1,text:""}}),0===(null==s?void 0:s.status)&&y.ZP.success(null==s?void 0:s.message);case 8:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:"更新成绩"})},3),(0,H.jsx)(g.Z.Item,{style:{textAlign:"center"},children:(0,H.jsx)("a",{onClick:function(e){e.stopPropagation(),e.preventDefault(),p({type:"classroomList/setActionTabs",payload:{key:"重命名",selectArrs:i,params:N}})},children:"重新命名"})},5),(0,H.jsx)(g.Z.Item,{style:{textAlign:"center"},children:(0,H.jsx)(_.Link,{target:"_blank",onClick:function(e){e.stopPropagation()},to:"/classrooms/".concat(N.coursesId,"/shixun_homework/").concat(i.homework_id,"/detail?tabs=3"),children:"高级设置"})},6)]})},children:(0,H.jsxs)("aside",{onClick:function(e){return e.stopPropagation()},className:we.flexBox,style:{marginRight:6,cursor:"default"},children:[(0,H.jsx)("i",{className:"iconfont icon-gengduo4"}),(0,H.jsx)("div",{children:"更多"})]})})]})]}),(0,I.GJ)()&&(0,H.jsxs)("p",{className:we.infoIcon,children:[(0,H.jsx)("span",{className:"c-grey-333 mr20",children:i.author}),["未开始","进行中","已截止","提交中","补交中"].includes(i.status)&&!!i.uncommit_count&&(0,H.jsxs)("span",{className:"c-grey-999 mr10",children:[(0,H.jsx)("span",{className:"mr5",children:"未做题"}),i.uncommit_count,"人"]}),["未开始","进行中","已截止","提交中","补交中","已结束"].includes(i.status)&&!!i.commit_count&&(0,H.jsxs)("span",{className:"c-grey-999 mr10",children:[(0,H.jsx)("span",{className:"mr5",children:"已做题"}),i.commit_count,"人"]}),["未开始","进行中","已截止","提交中","补交中","已结束"].includes(i.status)&&!!i.compelete_count&&(0,H.jsxs)("span",{className:"c-grey-999 mr10",children:[(0,H.jsx)("span",{className:"mr5",children:"已完成"}),i.compelete_count,"人"]}),["未开始"].includes(i.status)&&(0,H.jsxs)("span",{className:"c-grey-999 mr10",children:[(0,H.jsx)("span",{className:"mr5",children:"开始时间"}),i.publish_time]}),["未开始","进行中","已截止","提交中","补交中"].includes(i.status)&&(0,H.jsxs)("span",{className:"c-grey-999 mr10",children:[(0,H.jsx)("span",{className:"mr5",children:"截止时间"}),i.end_time]}),["已结束"].includes(i.status)&&(0,H.jsxs)("span",{className:"c-grey-999 mr10",children:[(0,H.jsx)("span",{className:"mr5",children:"结束时间"}),i.status_time]}),!(null==i||!i.late_time)&&"--"!==(null==i?void 0:i.late_time)&&(0,H.jsxs)("span",{className:"c-grey-999",children:[(0,H.jsx)("span",{className:"mr5",children:"补交截止时间"}),null==i?void 0:i.late_time]}),["未开始","进行中","已截止","提交中","补交中","已结束"].includes(i.status)&&(0,H.jsxs)("span",{className:we.iconV,onClick:function(){var e=l()(o()().mark((function e(n){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n.stopPropagation(),n.preventDefault(),z||W(),O(!z);case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:[(0,H.jsx)("i",{className:"iconfont icon-".concat(z?"shouqi":"xiala2")})," "]})]}),(0,I.dE)()&&(0,H.jsxs)("span",{className:we.infoStuIcon,children:[(0,H.jsx)("span",{className:"c-grey-333",children:i.author}),(0,H.jsxs)("span",{className:"c-grey-999 ml20",children:[(0,H.jsx)("i",{className:"iconfont icon-wanchengjindu font12 mr5"}),(0,H.jsxs)("span",{children:[(0,H.jsx)("span",{className:"c-light-primary",children:null==i?void 0:i.finished_challenge_count}),"/",null==i?void 0:i.challenge_count]})]}),i.status.includes("已截止")&&!(null==i||!i.status_time)&&(0,H.jsxs)("span",{className:"c-grey-999 ml20",children:[(0,H.jsx)("i",{className:"iconfont icon-shengyushijian font12 mr5"})," ",null==i?void 0:i.status_time]}),(0,H.jsxs)("span",{className:"ml20 c-grey-999",children:[(0,H.jsx)("i",{className:"iconfont icon-shijian1 font12 mr5"}),null==i?void 0:i.publish_time," 至 ",null==i?void 0:i.end_time," "]}),!(null==i||!i.late_time)&&"--"!==(null==i?void 0:i.late_time)&&(0,H.jsxs)("span",{className:"c-grey-999 ml20",children:[(0,H.jsx)("span",{className:"mr5",children:"补交截止时间:"}),null==i?void 0:i.late_time]})]}),(0,I.GJ)()&&!i.status.includes("未发布")&&z&&S.length>5&&(0,H.jsx)(Ie.Z,{rowKey:"shixun_identifier",scroll:{y:240},onRow:function(e){return{onClick:function(e){e.stopPropagation(),e.preventDefault()}}},onHeaderRow:function(e,n){return{onClick:function(e){e.stopPropagation(),e.preventDefault()}}},pagination:!1,dataSource:S,style:{marginTop:14,marginRight:6,cursor:"default"},onChange:function(e,n,s){s.field&&(N.order_by=s.field),s.order||(N.sort_direction="asc"),"ascend"===s.order&&(N.sort_direction="asc"),"descend"===s.order&&(N.sort_direction="desc"),s.order||(N.sort_direction="asc"),W()},columns:K}),(0,I.GJ)()&&!i.status.includes("未发布")&&z&&S.length<6&&S.length>0&&(0,H.jsx)(Ie.Z,{rowKey:"shixun_identifier",onRow:function(e){return{onClick:function(e){e.stopPropagation(),e.preventDefault()}}},onHeaderRow:function(e,n){return{onClick:function(e){e.stopPropagation(),e.preventDefault()}}},pagination:!1,dataSource:S,style:{marginTop:14,marginRight:6,cursor:"default"},onChange:function(e,n,s){s.field&&(N.order_by=s.field),s.order||(N.sort_direction="asc"),"ascend"===s.order&&(N.sort_direction="asc"),"descend"===s.order&&(N.sort_direction="desc"),s.order||(N.sort_direction="asc"),W()},columns:K})]})]},a)},ze=["classroomList","globalSetting","shixunHomeworks","user","loading","dispatch","match"],Oe=(0,_.connect)((function(e){var n=e.classroomList,s=e.loading,t=e.globalSetting,i=e.shixunHomeworks,a=e.user;return{classroomList:n,globalSetting:t,loading:s.effects,shixunHomeworks:i,user:a}}))((function(e){var n,s,t,a=e.classroomList,r=(e.globalSetting,e.shixunHomeworks,e.user),c=e.loading,u=e.dispatch,h=e.match,M=(p()(e,ze),(0,_.useLocation)()),R=(0,_.useParams)(),G=(0,_.useSearchParams)(),V=m()(G,1)[0],B=R.categoryId,J=(0,x.useState)([]),Y=m()(J,2),Q=Y[0],K=Y[1],X=(0,x.useState)([]),U=m()(X,2),q=U[0],$=U[1],ee=a.detailShixunsList,ne=a.detailLeftMenus,se=a.detailTopBanner,te=a.taskList,ie=(0,x.useState)(""),ae=m()(ie,2),oe=ae[0],re=ae[1],le=(0,x.useState)(!1),ce=m()(le,2),de=ce[0],ue=ce[1],me=(0,x.useState)({limit:20,status:Number(V.get("tabs"))?String(parseInt(V.get("tabs"))):"0"}),he=m()(me,2),pe=he[0],fe=he[1],ye=(0,x.useState)("默认排序"),je=m()(ye,2),be=je[0],Ne=je[1],Ze=(0,x.useState)(!1),Le=m()(Ze,2),Ce=Le[0],Te=Le[1],Ie=(0,x.useState)(!1),Ae=m()(Ie,2),Pe=(Ae[0],Ae[1]),Me=(0,x.useState)("fixed"),He=m()(Me,2),Oe=He[0],Ee=He[1],Fe=(0,x.useState)(document.getElementById("footer")),Ge=m()(Fe,1)[0],De=(0,x.useState)(1),Ve=m()(De,2),Be=Ve[0],Je=Ve[1],Ye=(0,x.useState)(!1),We=m()(Ye,2),Qe=We[0];We[1];pe.id=R.coursesId,pe.type=4,R.categoryId?pe.category=R.categoryId:delete pe.category,(0,x.useEffect)((function(){"清除选择数据"===a.actionTabs.key&&(K([]),$([])),"目录重命名成功"===a.actionTabs.key&&Xe()}),[a.actionTabs.key]),(0,x.useEffect)((function(){"0"===V.get("tabs")&&(pe.status="0",pe.page=1,fe(d()({},pe)))}),[V.get("tabs")]),(0,x.useEffect)((function(){var e,n;if(null!=r&&null!==(e=r.userInfo)&&void 0!==e&&e.login){var s,t=P.cX.getItem("".concat(null==r||null===(s=r.userInfo)||void 0===s?void 0:s.login).concat((0,I.GJ)()?"Teacher":"Student"),"ShixunHomeworks");t&&(pe.sort_by=null==t?void 0:t.type,pe.sort_direction=null==t?void 0:t.direction,Ne(null==t?void 0:t.name)),Xe()}else null!=r&&null!==(n=r.userInfo)&&void 0!==n&&n.username&&Xe()}),[null==r||null===(n=r.userInfo)||void 0===n?void 0:n.login,null==M?void 0:M.pathname]),(0,x.useEffect)((function(){window.addEventListener("scroll",Ke)}),[]);var Ke=function(){document.scrollingElement.scrollTop+window.innerHeight+(null==Ge?void 0:Ge.clientHeight)+150>document.body.clientHeight?Ee("absolute"):Ee("fixed")},Xe=function(){K([]),$([]),fe(d()({},pe)),u({type:"classroomList/getAssistantPermissions",payload:{course_id:pe.id}}),(0,I.GJ)()?u({type:"classroomList/getClassroomTeacherShixunsList",payload:d()(d()({},pe),{},{type:4})}):u({type:"classroomList/getClassroomShixunsList",payload:d()(d()({},pe),{},{order:pe.status})})};function Ue(){return(Ue=l()(o()().mark((function e(n){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u({type:"classroomList/updateTaskPosition",payload:{category_id:B,courseId:pe.id,task_ids:n,container_type:"shixun_homework"}});case 2:Xe();case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var qe=(0,x.useMemo)((function(){var e=[];return te.length>0&&(e=te.map((function(e){return{user_name:e.user_name,task_name:e.task_name,task_id:e.task_id,category:e.category}}))),e}),[te]),$e=(0,I.GJ)()?[{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"}];ne.course_modules&&(t=a.detailLeftMenus.course_modules.filter((function(e){return"shixun_homework"===e.type}))[0]);var en=(0,H.jsx)("div",{className:we.moveCategory,onMouseLeave:function(e){return ue(!1)},children:(0,H.jsxs)(g.Z,{onClick:function(){var e=l()(o()().mark((function e(n){var s;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.item,s=n.key,n.keyPath,n.domEvent,""!=Q){e.next=4;break}return y.ZP.error("请选择你要操作的任务"),e.abrupt("return",null);case 4:return e.next=6,(0,f.ZP)("/api/courses/".concat(pe.id,"/homework_commons/move_to_category.json"),{method:"post",body:{homework_ids:Q,new_category_id:s}});case 6:0===e.sent.status&&(y.ZP.success("操作成功"),Xe(),Pe(!1),u({type:"classroomList/getClassroomLeftMenus",payload:{id:R.coursesId}}));case 8:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),style:{maxHeight:300,width:240,overflow:"auto"},children:[(0,H.jsx)("li",{className:"ant-menu-item multi-llipsis1e ant-menu-item-only-child",children:(0,H.jsx)(v.Z,{onChange:function(e){re(e.target.value)}})}),t&&t.second_category.filter((function(e){return"未分配目录"!==e.category_name})).map((function(e,n){var s;if(!(""!==oe&&e.category_name.indexOf(oe)<0))return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(g.Z.Item,{className:"multi-llipsis1e",children:e.category_name},e.category_id),null==e||null===(s=e.third_category)||void 0===s?void 0:s.map((function(e){return(0,H.jsx)(g.Z.Item,{style:{marginLeft:20},className:"multi-llipsis1e",children:e.category_name},e.category_id)}))]})})),(0,H.jsx)("li",{className:"ant-menu-item multi-llipsis1e ant-menu-item-only-child",onClick:function(e){e.preventDefault(),u({type:"classroomList/setActionTabs",payload:{key:"添加目录",params:pe,selectArrs:{category_id:null==ee?void 0:ee.main_category_id,type:"shixun_homework"}}})},children:"新建子目录..."})]})}),nn=[{name:"批量发布",icon:(0,H.jsx)("i",{className:"iconfont icon-fabu5"})},{name:"批量截止",icon:(0,H.jsx)("i",{className:"iconfont icon-piliangjiezhi2"})},{name:"批量删除",icon:(0,H.jsx)("i",{className:"iconfont icon-piliangshanchu2"})},{name:"设为公开",icon:(0,H.jsx)("i",{className:"iconfont icon-sheweigongkai2"})}].filter((function(e){return!(!(0,I.GJ)()&&!(0,I.Rm)())||"批量删除"!==e.name})).filter((function(e){return!!se.is_public||"设为公开"!==e.name})),sn="默认排序"===be,tn=(0,x.useMemo)((function(){var e=!(0,I.GJ)()&&!(0,I.Jd)(),n=null==se?void 0:se.excellent;return e&&n}),[r,a]),an=(0,x.useMemo)((function(){return(null==ee?void 0:ee.min_finished_game)>0}),[a]),on=(0,x.useMemo)((function(){var e=(null==ee?void 0:ee.min_finished_game)-(null==ee?void 0:ee.finished_challenge_count);return e>0?e:0}),[a]);return(0,H.jsxs)("section",{children:[(0,H.jsx)("aside",{className:we.bg,children:(0,H.jsxs)(j.Z,{align:"middle",children:[(0,H.jsx)(b.Z,{flex:"1",children:!!ee.main_category_id&&(0,H.jsxs)(g.Z,{mode:"horizontal",onSelect:function(e){var n=e.key;pe.status=n,pe.page=1,_.history.replace("".concat(M.pathname,"?tabs=").concat(n)),Xe()},selectedKeys:[pe.status],children:[!(0,I.GJ)()&&[{name:"全部",id:0},{name:"提交中",id:1},{name:"补交中",id:2},{name:"已截止",id:5}].map((function(e,n){return(0,H.jsx)(g.Z.Item,{children:e.name},null==e?void 0:e.id)})),(0,I.GJ)()&&[{name:"全部",id:0},{name:"未发布",id:1},{name:"未开始",id:4},{name:"进行中",id:2},{name:"已截止",id:3}].map((function(e,n){return(0,H.jsxs)(g.Z.Item,{children:[(0,H.jsx)("span",{className:"c-grey-666 mr20",children:e.name}),0===n&&(0,I.GJ)()&&(0,H.jsx)("span",{className:"c-grey-999",children:null==ee?void 0:ee.all_count}),1===n&&(0,I.GJ)()&&(0,H.jsx)("span",{className:"c-grey-999",children:null==ee?void 0:ee.unpublished_count}),2===n&&(0,I.GJ)()&&(0,H.jsx)("span",{className:"c-grey-999",children:null==ee?void 0:ee.not_start_count}),3===n&&(0,I.GJ)()&&(0,H.jsx)("span",{className:"c-grey-999",children:null==ee?void 0:ee.in_progress_count}),4===n&&(0,I.GJ)()&&(0,H.jsx)("span",{className:"c-grey-999",children:null==ee?void 0:ee.overed_count})]},null==e?void 0:e.id)}))]})}),(0,H.jsx)(b.Z,{className:"mr20 gutter-row",children:(0,H.jsx)("div",{className:we.containerTitle,children:(0,I.GJ)()&&"未分配目录"!==(0,P.Oo)(null==ne?void 0:ne.course_modules,B)&&(0,H.jsxs)("div",{style:{display:"flex",alignItems:"center",marginBottom:6},children:[(0,H.jsx)("span",{className:"c-blue font16 ml20 current",style:{marginTop:2},onClick:function(e){u({type:"classroomList/setActionTabs",payload:{key:R.categoryId?"目录重命名":"添加目录",params:pe,selectArrs:{category_name:null==ee?void 0:ee.category_name,category_id:(null==ee?void 0:ee.category_id)||(null==ee?void 0:ee.main_category_id),type:"shixun_homework"},cb:function(){Xe()}}})},children:(0,H.jsx)(k.Z,{title:R.categoryId?"目录重命名":"新建子目录",children:(0,H.jsx)("span",{className:R.categoryId?"".concat(we.iconH," iconfont icon-zhongmingmingmulu"):"".concat(we.iconH," iconfont icon-xinjianmulu1")})})}),(0,H.jsx)(w.Z,{className:"ml10",dropdownRender:function(){return(0,H.jsxs)(g.Z,{children:[(0,H.jsx)(g.Z.Item,{onClick:function(){var e;!(0,I.Rm)()||null!==(e=a.AssistantObject)&&void 0!==e&&null!==(e=e.practice)&&void 0!==e&&e.can_create?u({type:"classroomList/setActionTabs",payload:{key:"选用实践项目",params:pe}}):y.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能")},children:"从实践项目添加"},1),(0,H.jsx)(g.Z.Item,{onClick:function(){var e;!(0,I.Rm)()||null!==(e=a.AssistantObject)&&void 0!==e&&null!==(e=e.practice)&&void 0!==e&&e.can_create?u({type:"classroomList/setActionTabs",payload:{key:"选用实践课程",params:pe}}):y.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能")},children:"从实践课程添加"},2)]})},children:(0,H.jsxs)("span",{className:we.selectBtn,children:[(0,H.jsx)("span",{children:(0,H.jsx)("i",{className:"iconfont icon-tianjiadaohang"})}),(0,H.jsx)("span",{children:"选用实验"})]})})]})})})]})}),(0,H.jsxs)("div",{className:we.action,children:[(0,H.jsx)("div",{children:(0,H.jsx)(w.Z,{dropdownRender:function(){return(0,H.jsx)(g.Z,{selectedKeys:[be],children:null==$e?void 0:$e.map((function(e,n){return(0,H.jsx)(g.Z.Item,{onClick:function(){var n;pe.sort_by=e.type,pe.sort_direction=e.direction,pe.page=1,Ne(e.name),P.cX.setItem("".concat(null==r||null===(n=r.userInfo)||void 0===n?void 0:n.login).concat((0,I.GJ)()?"Teacher":"Student"),e,"ShixunHomeworks"),(0,I.GJ)()?u({type:"classroomList/getClassroomTeacherShixunsList",payload:d()(d()({},pe),{},{type:4})}):u({type:"classroomList/getClassroomShixunsList",payload:d()({},pe)})},children:e.name},e.name)}))})},children:(0,H.jsxs)("span",{className:"".concat(we.btn," ").concat(sn?we.btnSort:""),onMouseEnter:function(e){return ue(!1)},children:[(0,H.jsx)("i",{className:"iconfont icon-paixu font14 mr5"}),be]})})}),sn&&(0,H.jsx)(k.Z,{title:"优先按照调整排序结果展示,未设置排序时,按照创建时间降序排列",children:(0,H.jsx)("span",{className:we.tips,children:(0,H.jsx)("i",{className:"iconfont icon-a-wenhaobeifen2"})})}),(0,H.jsx)(v.Z.Search,{allowClear:!0,placeholder:"请输入实验名称",onSearch:function(e){pe.search=e,pe.page=1,Xe()},style:{width:220,marginLeft:"auto"}})]}),tn&&(0,H.jsxs)(j.Z,{justify:"space-between",className:we.progressInfo,children:[(0,H.jsx)(b.Z,{children:(0,H.jsxs)(N.Z,{size:"middle",children:[(0,H.jsxs)("span",{children:["实训作业进度:",null==ee?void 0:ee.finished_task_count,"/",null==ee?void 0:ee.shixun_total_count]}),(0,H.jsxs)("span",{children:["任务关卡进度:",null==ee?void 0:ee.finished_challenge_count,"/",null==ee?void 0:ee.challenge_count]})]})}),an&&(0,H.jsxs)(b.Z,{children:["通过",null==ee?void 0:ee.min_finished_game,"关获得满分,距离MOOC实训作业满分还差",on,"关"]})]}),(0,H.jsxs)("aside",{className:"minH500 skt-loading relative pb40 mb30",children:[(0,H.jsxs)(Z.Z,{loading:c[(0,I.GJ)()?"classroomList/getClassroomTeacherShixunsList":"classroomList/getClassroomShixunsList"],active:!0,paragraph:{rows:5},className:"mt30",children:[0===(null==ee?void 0:ee.all_count)&&(0,I.GJ)()?(0,H.jsx)(ke,{params:pe,setisshowmodal:Te,dispatch:u}):0===(null==ee?void 0:ee.task_count)&&(0,H.jsx)(W.Z,{}),(0,H.jsxs)("aside",{className:"animated fadeIn",children:[ee.homeworks&&ee.homeworks.map((function(e,n){return(0,H.jsx)(Re,{batchState:!0,v:e,k:n,match:h,selectArrs:Q,setSelectArrs:K,setSelectArrsAll:$,selectArrsAll:q,classroomList:a,dispatch:u,params:pe,selectshow:Qe,manageAllGroup:ee.manage_all_group},e.homework_id)})),ee.query_total_count>0&&(0,H.jsx)("aside",{className:"tc mb50 mt30",children:(0,H.jsx)(L.Z,{showSizeChanger:!0,current:pe.page||1,pageSize:pe.limit||20,onChange:function(e,n){pe.page=e,pe.limit=n,Xe()},total:ee.query_total_count})})]})]}),(0,H.jsxs)("div",{className:we.fixedBottom,style:{bottom:Q.length?0:-60,position:Q.length?Oe:"fixed",left:"fixed"===Oe?"50%":"317px"},children:[(0,H.jsx)("div",{className:we.left}),(0,H.jsx)("div",{className:we.right,children:(0,I.GJ)()&&(null==ee?void 0:ee.all_count)>0&&(0,H.jsxs)("aside",{className:[we.acitons].join(" "),children:[(0,H.jsx)("div",{style:{width:130},children:(0,I.GJ)()&&(0,H.jsx)(C.Z,{checked:(null===(s=ee.homeworks)||void 0===s?void 0:s.length)===(null==Q?void 0:Q.length),onChange:function(e){e.target.checked?(K(ee.homeworks.map((function(e){return e.homework_id}))),$(i()(ee.homeworks))):(K([]),$([]))},children:(0,H.jsxs)("span",{className:"fo",children:["全选本页",(0,H.jsxs)("span",{style:{marginLeft:5},children:["(",Q.length,")"]})," "]})})}),(0,H.jsxs)("div",{className:we.actionBtns,children:[(0,I.GJ)()&&nn.map((function(e,n){return(0,H.jsxs)("p",{onClick:function(){var n;"批量发布"!==e.name&&"批量截止"!==e.name||!(0,I.Rm)()||null!==(n=a.AssistantObject)&&void 0!==n&&null!==(n=n.practice)&&void 0!==n&&n.can_publish?""==Q?y.ZP.error("请选择你要操作的任务"):u({type:"classroomList/setActionTabs",payload:{key:"批量发布"===e.name?"立即发布":"批量截止"===e.name?"立即截止":"批量删除"===e.name?"删除":e.name,selectArrs:Q,selectArrsAll:q,type:"批量发布"===e.name||"批量截止"===e.name?1:"",params:pe}}):y.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能")},children:[null==e?void 0:e.icon,(0,H.jsx)("span",{children:e.name})]},n)})),(0,H.jsxs)("p",{onClick:function(){var e={courseId:pe.id,container_type:"shixun_homework"};B&&(e.category_id=B),u({type:"classroomList/getAllTaskList",payload:e}),u({type:"classroomList/setActionTabs",payload:{key:"调整排序"}})},children:[(0,H.jsx)("i",{className:"iconfont icon-tiaozhengpaixu2"}),(0,H.jsx)("span",{children:"调整排序"})]}),(0,I.GJ)()&&(0,H.jsx)("p",{children:(0,H.jsx)(w.Z,{open:de,placement:"topLeft",dropdownRender:function(){return en},getPopupContainer:function(e){return null==e?void 0:e.parentNode},children:(0,H.jsxs)("span",{className:"ant-dropdown-link",style:{position:"relative",zIndex:1003},onMouseEnter:function(e){return ue(!0)},children:[(0,H.jsx)("i",{className:"iconfont icon-yidongmulu"})," 移动到目录",(0,H.jsx)(A.Z,{})]})})}),(0,H.jsx)("div",{className:we.cancel,onClick:function(){K&&K([]),Pe(!1)},children:"取消操作"})]})]})})]})]}),"选用实践课程"===a.actionTabs.key?(0,H.jsx)(ve,{}):null,"选用实践项目"===a.actionTabs.key?(0,H.jsx)(xe,{}):null,"从课堂实验添加"===a.actionTabs.key?(0,H.jsx)(_e,{}):null,(0,H.jsx)(D,{}),(0,H.jsx)(z,{}),(0,H.jsx)(O.Z,{courseEndTime:null==ee?void 0:ee.course_end_time}),(0,H.jsx)(E.Z,{visible:"立即截止"===a.actionTabs.key,courseEndTime:null==ee?void 0:ee.course_end_time,courseId:R.coursesId,homeworkIds:a.actionTabs.selectArrs,isBatch:2!==a.actionTabs.type,successCallback:function(){(0,I.GJ)()?u({type:"classroomList/getClassroomTeacherShixunsList",payload:d()(d()({},a.actionTabs.params),{},{type:4})}):u({type:"classroomList/getClassroomShixunsList",payload:d()({},a.actionTabs.params)})}}),(0,H.jsx)(F,{}),(0,H.jsx)(ge,{}),(0,H.jsx)(Se,{visible:"调整排序"===a.actionTabs.key,callback:function(e){return Ue.apply(this,arguments)},data:qe,onCancel:function(){u({type:"classroomList/setActionTabs",payload:{key:""}})}}),(0,H.jsx)(T.Z,{title:"选用实验",open:Ce,centered:!0,onCancel:function(){return Te(!1)},onOk:function(){var e;!(0,I.Rm)()||null!==(e=a.AssistantObject.practice)&&void 0!==e&&e.can_create?(u(1===Be?{type:"classroomList/setActionTabs",payload:{key:"选用实践项目",params:pe}}:{type:"classroomList/setActionTabs",payload:{key:"选用实践课程",params:pe}}),Te(!1)):y.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能")},children:(0,H.jsx)("div",{children:(0,H.jsxs)(S.ZP.Group,{onChange:function(e){Je(e.target.value)},value:Be,children:[(0,H.jsx)(S.ZP,{style:{marginTop:"15px"},value:1,children:"从实践项目添加(可选择多个实践项目加入作业)"}),(0,H.jsx)(S.ZP,{style:{marginTop:"15px"},value:2,children:"从实践课程添加(将实践课程中全部的实践项目都加入作业)"})]})})})]})}))},26256:function(e,n,s){var t=s(7557),i=s.n(t),a=s(41498),o=s.n(a),r=s(36133),l=s(43418),c=s(8591),d=s(83287),u=(s(59301),s(37712)),m=function(){var e=o()(i()().mark((function e(n){var s,t,a,o,l,c,u;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s=n.is_jupyter,t=n.is_jupyter_lab,a=n.shixunId,o=n.homework_common_id,l=n.courseId,!s&&!t){e.next=7;break}return e.next=4,(0,r.BK)({id:a});case 4:return null!=(c=e.sent)&&c.identifier&&(0,d.xg)("/tasks/".concat(c.identifier,"/jupyter?homework_common_id=").concat(o)),e.abrupt("return");case 7:return e.next=9,(0,r.Ir)({id:a,homework_common_id:o});case 9:if(null==(u=e.sent)||!u.game_identifier){e.next=13;break}return(0,d.xg)("/tasks/".concat(l,"/").concat(o,"/").concat(u.game_identifier)),e.abrupt("return");case 13:2===(null==u?void 0:u.status)?h(null==u?void 0:u.message,o,l):3===(null==u?void 0:u.status)?p(null==u?void 0:u.message):-3==(null==u?void 0:u.status)&&(0,d.eF)();case 14:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),h=function e(n,s,t){var a,m;n=null!==(a=n)&&void 0!==a&&a.includes(".json")?n:"".concat(n,".json"),l.Z.confirm({centered:!0,title:"提示",okText:"确定",cancelText:"取消",content:(0,u.jsx)("div",{className:"tc font16",children:" 实训已经更新了,正在为您重置!"}),onOk:(m=o()(i()().mark((function a(){var o,l;return i()().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,(0,r.$Q)({url:n});case 2:if(o=i.sent){i.next=5;break}return i.abrupt("return");case 5:return c.ZP.success("重置成功,正在进入实践项目!"),i.next=8,(0,r.Ir)({id:o.shixun_identifier,homework_common_id:s});case 8:if(null==(l=i.sent)||!l.game_identifier){i.next=12;break}return(0,d.xg)("/tasks/".concat(t,"/").concat(s,"/").concat(l.game_identifier)),i.abrupt("return");case 12:2===(null==l?void 0:l.status)?e(null==l?void 0:l.message,s,t):3===(null==l?void 0:l.status)&&p(null==l?void 0:l.message);case 13:case"end":return i.stop()}}),a)}))),function(){return m.apply(this,arguments)})})},p=function(e){l.Z.confirm({centered:!0,title:"提示",okText:"确定",cancelText:"取消",content:(0,u.jsxs)("div",{className:"tc font16",children:[" 目前该实践项目尚在内测中,将于",e,"之后开放,谢谢!"]})})};n.Z=m}}]); |