|
|
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[83935],{95565:function(e,n,t){t.d(n,{Z:function(){return k}});t(7557),t(41498);var s=t(82100),a=t.n(s),o=t(29186),i=t.n(o),r=t(13720),c=t.n(r),l=t(80619),d=t.n(l),u=t(47074),m=t.n(u),p=t(85573),h=t.n(p),x=t(59301),g=t(73782),f="codeBox___WpkVl",y=t(92310),_=t.n(y),j=t(37712),v=function(e){d()(t,e);var n=m()(t);function t(e){var s;return a()(this,t),s=n.call(this,e),h()(c()(s),"canvas",void 0),h()(c()(s),"randomNum",(function(e,n){return Math.floor(Math.random()*(n-e)+e)})),h()(c()(s),"drawPic",(function(){s.randomCode()})),h()(c()(s),"reloadPic",(function(){s.drawPic()})),h()(c()(s),"changeCode",(function(e){console.log(e.target.value,222),s.setState({value:e.target.value,showError:!1})})),h()(c()(s),"onVerify",(function(){var e;return""!==s.state.value.toLowerCase()&&s.state.value.toLowerCase()!==s.state.code.toLowerCase()||""===s.state.value.toLowerCase()?e=!0:s.state.value.toLowerCase()===s.state.code.toLowerCase()&&(e=!1),s.setState({showError:e}),e})),s.canvas=x.createRef(),s.state={value:"",code:"",codeLength:4,fontSizeMin:20,fontSizeMax:22,backgroundColorMin:240,backgroundColorMax:250,colorMin:10,colorMax:20,lineColorMin:40,lineColorMax:180,contentWidth:96,contentHeight:38,showError:!1},s}return i()(t,[{key:"componentDidMount",value:function(){this.drawPic()}},{key:"randomColor",value:function(e,n){var t=this.randomNum(e,n),s=this.randomNum(e,n),a=this.randomNum(e,n);return"rgb(".concat(t,", ").concat(s,", ").concat(a,")")}},{key:"drawText",value:function(e,n,t){e.fillStyle=this.randomColor(this.state.colorMin,this.state.colorMax);var s=this.randomNum(this.state.fontSizeMin,this.state.fontSizeMax);e.font=s+"px SimHei";var a=(this.state.contentWidth-40)/(this.state.code.length-1),o=10;t>0&&(o=10+t*a);var i=this.randomNum(this.state.fontSizeMax,this.state.contentHeight-5);s>40&&(i=40);var r=this.randomNum(-10,10);e.translate(o,i),e.rotate(r*Math.PI/180),e.fillText(n,0,0),e.rotate(-r*Math.PI/180),e.translate(-o,-i)}},{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="",t=0;t<this.state.codeLength;t++){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 t=0;t<e.state.code.length;t++)e.drawText(n,e.state.code[t],t);e.drawLine(n),e.drawDot(n)}))}},{key:"render",value:function(){var e=this.props,n=e.className,t=e.width,s=void 0===t?300:t;return(0,j.jsxs)("div",{className:_()(f,n),style:{width:s},children:[(0,j.jsxs)("aside",{children:[(0,j.jsx)(g.Z,{value:this.state.value,onChange:this.changeCode,placeholder:"请输入图片中的验证码"}),this.state.showError&&(0,j.jsx)("div",{children:this.state.value?"请输入正确的验证码":"请输入验证码"})]}),(0,j.jsxs)("div",{children:[(0,j.jsx)("canvas",{onClick:this.reloadPic,ref:this.canvas,width:"100",height:"30"}),(0,j.jsx)("div",{className:"current",onClick:this.reloadPic,children:"看不清?换一张"})]})]})}}]),t}(x.Component),k=v},18718:function(e,n,t){t(59301);var s=t(6848),a=t(37712);n.Z=function(e){var n=e.value,t=e.visible,o=void 0===t||t,i=e.children;return(0,a.jsx)(a.Fragment,{children:o?(0,a.jsx)(s.Z,{placement:"topLeft",title:{"未发布":"作业尚未发布","未开始":"作业已发布,尚未到达开始作业时间","提交中":"作业进行中,所有考生可提交作业","补交中":"作业进行中,所有学生可补交作业","进行中":"作业进行中,部分班级正在作业提交中/补交中","已截止":"到达作业截止时间,作业已结束","已结束":"课堂已结束"}[n],children:(0,a.jsx)("span",{children:i})}):i})}},84736:function(e,n,t){t.d(n,{Z:function(){return m}});t(59301);var s=t(38854),a=t(20834),o=t(6848),i=t(73782),r="searchSortControllerContainer___AAq4n",c="btn___bMc0x",l="btnSort___vBpNG",d="tips___egWVQ",u=t(37712),m=function(e){var n=e.isAdmin,t=(e.dataSource,e.batchStatus,e.SortMenuName),m=e.setSortMenuName,p=e.onSearch,h=e.onSort,x=(e.onBatch,n?[{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"}]),g="默认排序"===t;return(0,u.jsxs)("div",{className:r,children:[(0,u.jsx)("div",{children:(0,u.jsx)(s.Z,{dropdownRender:function(){return(0,u.jsx)(a.Z,{selectedKeys:[t],children:x.map((function(e){return(0,u.jsx)(a.Z.Item,{onClick:function(){return m((n=e).name),void h(n);var n},children:e.name},e.name)}))})},children:(0,u.jsx)("div",{children:(0,u.jsxs)("span",{className:"".concat(c," ").concat(g?l:""),children:[(0,u.jsx)("i",{className:"iconfont icon-paixu font14 mr5"}),t]})})})}),g&&(0,u.jsx)(o.Z,{title:"优先按照调整排序结果展示,未设置排序时,按照创建时间降序排列",children:(0,u.jsx)("span",{className:d,children:(0,u.jsx)("i",{className:"iconfont icon-a-wenhaobeifen2"})})}),(0,u.jsx)(i.Z.Search,{allowClear:!0,placeholder:"请输入名称进行搜索",onSearch:p,style:{width:220,marginLeft:"auto"}})]})}},12961:function(e,n,t){t.d(n,{Z:function(){return h}});var s=t(79800),a=t.n(s),o=t(59301),i=t(44589),r=t(39180),c=t.n(r),l=t(43428),d=t(3113),u=t(37712),m=(0,i.W8)((function(e){var n=e.item;return(0,u.jsxs)("li",{children:[(0,u.jsx)("h3",{children:n.task_name}),(0,u.jsxs)("p",{children:[n.user_name,(0,u.jsx)("span",{style:{marginLeft:"20px"},children:n.category})]})]})})),p=(0,i.JN)((function(e){var n=e.items;return(0,u.jsx)("ul",{className:"task-list-container",children:n.map((function(e,n){return(0,u.jsx)(m,{index:n,item:e},"".concat(e.task_id))}))})})),h=function(e){var n=e.data,t=e.callback,s=e.onCancel,i=e.visible,r=void 0!==i&&i,m=(0,o.useState)(n),h=a()(m,2),x=h[0],g=h[1];return(0,o.useEffect)((function(){g(n)}),[JSON.stringify(n)]),(0,u.jsxs)(l.Z,{placement:"bottom",height:"100%",closable:!0,onClose:s,style:{zIndex:9999},open:r,rootClassName:"sort-list-panel",children:[(0,u.jsxs)("p",{className:"sort-list-tip",children:[(0,u.jsx)("span",{children:"温馨提示:请在列表中长按鼠标左键,进行拖放排序。完成排序后请点击“保存”"}),(0,u.jsx)(d.ZP,{type:"ghost",onClick:s,style:{marginRight:10},children:"取消"}),(0,u.jsx)(d.ZP,{disabled:0===x.length,type:"primary",onClick:function(){t(x.map((function(e){return e.task_id})))},children:"保存"})]}),(0,u.jsx)(p,{axis:"xy",helperClass:"dragging-li",items:x,onSortEnd:function(e){var n=e.newIndex,t=e.oldIndex;g(c()(x,t,n))}})]})}},66788:function(e,n,t){t.d(n,{Z:function(){return x}});t(59301);var s=t(20834),a=t(95237),o=t(43604),i=t(6848),r=t(38854),c="tabMenuContainer___xbZhu",l="control___tg7XY",d="iconH___CDXCm",u="selectBtn___Da4jv",m=t(65363),p=t(38296),h=t(37712),x=(0,m.connect)((function(e){return{classroomList:e.classroomList}}))((function(e){var n,t=e.isLoading,m=e.addText,x=e.tabDataSource,g=e.isAdmin,f=e.TooltipTitle,y=e.categoryId,_=e.dropdownMenu,j=e.isShowRightControl,v=e.defaultSelectedKeys,k=e.classroomList,b=e.onTabMenuClick,w=e.onTooltipTitleClick,C=e.onDropdownMenuClick,N=e.onsetClick;return(0,h.jsx)("div",{className:c,children:(0,h.jsxs)(a.Z,{children:[(0,h.jsx)(o.Z,{flex:"1",children:(0,h.jsx)(s.Z,{mode:"horizontal",selectedKeys:v,children:x.map((function(e){return(0,h.jsxs)(s.Z.Item,{onClick:function(){return t?{}:b(e)},children:[(0,h.jsx)("span",{className:"c-grey-666 ".concat(g?"mr20":""),children:e.name}),void 0!==e.total&&(0,h.jsx)("span",{className:"c-grey-999",children:e.total||0})]},e.id)}))})}),g&&j&&(0,h.jsxs)(o.Z,{className:"mr20 gutter-row",style:{display:"flex",alignItems:"center",color:"#0152d9",paddingBottom:3},children:[!(0,p.Rm)()||null!==(n=k.AssistantObject.normal)&&void 0!==n&&n.can_create?(0,h.jsx)("span",{className:"c-grey-666",style:{marginLeft:8,cursor:"pointer",marginTop:"3px"},onClick:N,children:(0,h.jsx)("i",{className:"iconfont icon-shezhi6 font16 mr5"})}):"",(0,h.jsxs)("div",{className:l,children:[(0,h.jsx)("div",{className:"c-blue font16 ml20 current",style:{marginTop:2},onClick:w,children:(0,h.jsx)(i.Z,{title:f,children:(0,h.jsx)("span",{className:"".concat(d,y?" iconfont icon-zhongmingmingmulu":" iconfont icon-xinjianmulu1")})})}),(0,h.jsx)(r.Z,{className:"ml10",dropdownRender:function(){return(0,h.jsx)(s.Z,{onClick:function(e){var n=e.key;C(n)},children:_.map((function(e){return(0,h.jsx)(s.Z.Item,{children:e.name},e.id)}))})},children:(0,h.jsxs)("span",{className:u,children:[(0,h.jsx)("span",{children:(0,h.jsx)("i",{className:"iconfont icon-tianjiadaohang"})}),(0,h.jsx)("span",{children:m||"新建作业"})]})})]})]})]})})}))},18421:function(e,n,t){t.r(n),t.d(n,{GroupHomeworkContext:function(){return Ne},default:function(){return Se}});var s=t(7557),a=t.n(s),o=t(41498),i=t.n(o),r=t(82242),c=t.n(r),l=t(79800),d=t.n(l),u=t(59301),m=t(65363),p=t(8591),h=t(96865),x=t(27092),g=t(81228),f=t(43418),y=t(95237),_=t(43604),j=t(78673),v=t(5112),k=t(60324),b=t(94001),w=t(39248),C=t(38296),N=t(27627),S=t(37205),Z=t.n(S),L=t(79311),T=t(95565),I=t(37712),A=(0,m.connect)((function(e){return{classroomList:e.classroomList,user:e.user}}))((function(e){var n,t,s=e.classroomList,o=e.dispatch,r=e.user,l=e.onCallback,h=(0,m.useParams)(),x=(0,u.useState)(!1),g=d()(x,2),y=g[0],_=g[1],j=(0,u.useState)(!1),v=d()(j,2),k=v[0],b=v[1],w=(0,u.useRef)(null);(0,u.useEffect)((function(){if("删除"===s.actionTabs.key){if((0,C.j5)())return void b(!0);var e={hasNum:0,noHasNum:0};s.actionTabs.selectArrsAll.map((function(n){var t;n.author_login===(null===(t=r.userInfo)||void 0===t?void 0:t.login)?++e.hasNum:++e.noHasNum})),e.noHasNum>0?f.Z.info({title:"权限提示",className:"custom-modal-divider ",icon:null,content:(0,I.jsxs)("div",{children:["当前选中资源中:",(0,I.jsx)("span",{className:"c-blue",children:e.hasNum}),"个由您本人发布,",(0,I.jsx)("span",{className:"c-red",children:e.noHasNum})," ","个由其他老师发布。",(0,I.jsx)("br",{}),"课堂内只能删除本人发布的资源,请取消选中其他老师发布的资源。"]}),onOk:function(){S()}}):b(!0)}else b(!1)}),[s.actionTabs.key]);var S=function(){o({type:"classroomList/setActionTabs",payload:{}})};return(0,I.jsx)(f.Z,{centered:!0,title:"提示",open:k,okText:"确定",cancelText:"取消",confirmLoading:y,destroyOnClose:!0,onOk:i()(a()().mark((function e(){var n,t;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===(n=w.current)||void 0===n||!n.onVerify()){e.next=2;break}return e.abrupt("return");case 2:return _(!0),e.next=5,(0,L.ZP)("/api/courses/".concat(h.coursesId,"/homework_commons/multi_destroy.json"),{method:"post",body:{homework_ids:Z()(s.actionTabs.selectArrs)}});case 5:t=e.sent,_(!1),0===t.status&&((0,N.L9)(["教学课堂","分组作业","删除"]),p.ZP.success("删除成功"),o({type:"classroomList/setActionTabs",payload:{key:"清除选择数据"}}),l&&l(),(0,C.GJ)()?o({type:"classroomList/getClassroomTeacherCommonList",payload:c()(c()({},s.actionTabs.params),{},{type:3})}):o({type:"classroomList/getClassroomCommonList",payload:c()({},s.actionTabs.params)}));case 8:case"end":return e.stop()}}),e)}))),onCancel:function(){o({type:"classroomList/setActionTabs",payload:{}})},children:null!=s&&null!==(n=s.actionTabs)&&void 0!==n&&n.status&&["未发布"].includes(null==s||null===(t=s.actionTabs)||void 0===t?void 0:t.status)?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)("p",{children:"提交作品将全部被删除,不可恢复"}),(0,I.jsx)("p",{children:"是否确认删除?"})]}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)("p",{style:{color:"#DD0000"},children:"删除作业则会清除学生所有的答题数据,且数据不可恢复,如确定删除,请输入下方验证码"}),(0,I.jsx)(T.Z,{ref:function(e){return w.current=e}})]})})})),P=t(85573),M=t.n(P),$=t(39647),H=t.n($),E=t(78241),D=t(57930),O=t(24905),G=t(61186),R=t.n(G),z=t(40300),J=t(24413),B=t(28448),Y=["classroomList","dispatch","courseEndTime"],F=(0,m.connect)((function(e){return{classroomList:e.classroomList}}))((function(e){var n=e.classroomList,t=e.dispatch,s=e.courseEndTime,o=H()(e,Y),r=(0,m.useParams)(),l=E.Z.useForm(),h=d()(l,1)[0],x=(0,u.useState)(1),g=d()(x,2),j=g[0],k=g[1],b=(0,u.useState)([]),w=d()(b,2),S=w[0],T=w[1],A=(0,u.useState)(0),P=d()(A,2),$=(P[0],P[1]),G=(0,u.useState)(2e3),F=d()(G,2),W=(F[0],F[1],(0,u.useState)(!0)),V=d()(W,2),X=(V[0],V[1]),K=(0,u.useState)(!1),q=d()(K,2),Q=q[0],U=(q[1],(0,u.useState)(!1)),ee=d()(U,2),ne=ee[0],te=(ee[1],(0,u.useState)([])),se=d()(te,2),ae=se[0],oe=se[1],ie=(0,u.useState)(!0),re=d()(ie,2),ce=re[0],le=re[1];(0,u.useEffect)((function(){if("立即发布"===n.actionTabs.key&&(de(),pe(),2===n.actionTabs.type)){var e=n.actionTabs.selectArrsAll[0];le(e.unified_setting)}}),[n.actionTabs]),(0,u.useEffect)((function(){if(Q){if(ne)return;t({type:"classroomList/setActionTabs",payload:{}}),(0,C.GJ)()?t({type:"classroomList/getClassroomTeacherCommonList",payload:c()(c()({},n.actionTabs.params),{},{type:3})}):t({type:"classroomList/getClassroomCommonList",payload:c()({},n.actionTabs.params)})}}),[Q]);var de=function(){var e=i()(a()().mark((function e(t){var s;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return X(!0),e.next=3,(0,J.c_)(c()(c()({},r),{},{page:t||j,limit:2e4,homework_id:1===n.actionTabs.type?"":n.actionTabs.selectArrs[0]}));case 3:null==(s=e.sent)||s.course_groups.map((function(e,n){e.key=e.id,e.title=e.name,e.disabled=e.is_published})),s&&(T(Z()(null==s?void 0:s.course_groups)),$(null==s?void 0:s.course_groups_count),X(!1),t||h.setFieldsValue(M()(M()({},"publish_time",R()(R()(new Date).add(0,"days").format("YYYY-MM-DD HH:mm"))),"end_time",R()(R()(new Date((0,N.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)}}(),ue=function(){(0,C.GJ)()?n.actionTabs.detail?(t({type:"shixunHomeworks/setActionTabs",payload:{}}),t({type:"shixunHomeworks/getWorkList",payload:c()({},r)}),t({type:"shixunHomeworks/getWorkSetting",payload:c()({},r)})):t({type:"classroomList/getClassroomTeacherCommonList",payload:c()(c()({},n.actionTabs.params),{},{type:3})}):t({type:"classroomList/getClassroomCommonList",payload:c()({},n.actionTabs.params)})},me=function(){var e=i()(a()().mark((function e(){var s,i,l,d;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(0,C.Rm)()||null!=n&&null!==(s=n.AssistantObject)&&void 0!==s&&null!==(s=s.group)&&void 0!==s&&s.can_publish){e.next=4;break}return p.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能"),fe(!1),e.abrupt("return");case 4:if(!((l=c()({},h.getFieldsValue())).end_time<=l.publish_time)){e.next=9;break}return p.ZP.info("截止时间不能大于或等于发布时间"),fe(!1),e.abrupt("return");case 9:if(!((null==ae?void 0:ae.length)<=0&&!ce&&S.length>0)){e.next=13;break}return p.ZP.info("发布班级不能为空"),fe(!1),e.abrupt("return");case 13:return d={homework_ids:Z()(n.actionTabs.selectArrs),group_ids:ae.length>0?ae.map((function(e){return e.id})):null===(i=n.detailCommonHomeworksList)||void 0===i?void 0:i.course_groups,end_time:R()(l.end_time).format("YYYY-MM-DD HH:mm"),publish_time:R()(l.publish_time).format("YYYY-MM-DD HH:mm"),unified_setting:!ae.length},fe(!0),e.next=17,(0,L.ZP)("/api/courses/".concat(r.coursesId,"/homework_commons/publish_with_homework_list_position.json"),{method:"post",body:c()({},d)});case 17:0===e.sent.status?(fe(!1),(0,N.L9)(["教学课堂","分组作业","立即发布"]),p.ZP.success("发布成功"),t({type:"classroomList/setActionTabs",payload:{key:"清除选择数据"}}),o.onCallback&&o.onCallback(),ue(),"0"===localStorage.getItem("Noviceguide")||t({type:"shixunHomeworks/setActionTabs",payload:{key:"底部弹窗",type:13,text:(0,I.jsx)("div",{children:"最后,咱们给教学课堂添加一名学生~点击“添加学生”,在弹窗页面中输入并搜索学生姓名,点击“确定”就可以为您的课堂添加第一位学生啦~"})}})):fe(!1);case 19:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),pe=function(){k(1),T([]),oe([])},he=(n.detailCommonHomeworksList,(0,u.useState)(!1)),xe=d()(he,2),ge=xe[0],fe=xe[1];return(0,I.jsxs)(f.Z,{width:600,confirmLoading:ge,centered:!0,title:"发布作业",open:"立即发布"===n.actionTabs.key,okText:"发布作业",cancelText:"暂不发布",onOk:me,onCancel:function(){pe(),ue(),t({type:"classroomList/setActionTabs",payload:{}})},children:[(0,I.jsxs)("p",{className:"tc",children:["学生将立即收到作业",(0,I.jsx)("br",{}),'本操作只对"未发布"的作业有效']}),S&&(0,I.jsxs)(E.Z,{form:h,children:[(0,I.jsxs)("div",{style:{paddingLeft:0},children:[(0,I.jsxs)(y.Z,{className:"mt30",align:"middle",children:[(0,I.jsx)(_.Z,{children:(0,I.jsx)(E.Z.Item,{name:"publish_time",label:"发布时间",children:(0,I.jsx)(D.default,{style:{width:170,marginRight:"25px"},disabledDate:function(e){return(0,B.Q8)(e,s)},disabledTime:function(e){return(0,B.d0)(e)},placeholder:"请选择发布时间",showTime:{format:"HH:mm",defaultValue:R()((0,N.U6)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",allowClear:!1})})}),(0,I.jsx)(_.Z,{className:"ml20",children:(0,I.jsx)(E.Z.Item,{name:"end_time",label:"截止时间",children:(0,I.jsx)(D.default,{style:{width:170},placeholder:"请选择结束时间",showTime:{format:"HH:mm",defaultValue:R()((0,N.U6)(),"HH:mm")},disabledDate:function(e){return(0,B.Q8)(e,s,h.getFieldValue("publish_time"))},disabledTime:function(e){return(0,B.d0)(e,h.getFieldValue("publish_time"))},format:"YYYY-MM-DD HH:mm",allowClear:!1})})})]}),2===n.actionTabs.type&&(0,I.jsxs)(y.Z,{style:{marginBottom:"10px"},children:[(0,I.jsx)("span",{className:"mr5",children:"发布设置:"}),(0,I.jsxs)(v.ZP.Group,{value:ce,onChange:function(e){le(e.target.value),oe([])},children:[(0,I.jsx)(v.ZP,{value:!0,disabled:!n.actionTabs.manage_all_group,children:"统一发布"}),(0,I.jsx)(v.ZP,{className:"ml20",disabled:S.length<=0,value:!1,children:"分班发布"})]})]}),S.length<=0&&2===n.actionTabs.type&&(0,I.jsx)("span",{style:{marginLeft:"65px",color:"rgba(0, 0, 0, 0.25)"},children:'课堂无分班,仅支持选择“统一发布"'})]}),(1===n.actionTabs.type||!ce)&&S.length>0&&(0,I.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:"10px"},children:[(0,I.jsx)("span",{style:{flex:1},children:(0,I.jsx)(O.Z,{checked:ae.length===S.length,onChange:function(e){ae.length===S.length?oe([]):oe(S.filter((function(e){return!e.is_published})))},children:"全选"})}),(0,I.jsx)("span",{style:{width:16}}),(0,I.jsxs)("span",{style:{flex:1},children:["已选择",ae.length||0,"个分班"]})]}),(1===n.actionTabs.type||!ce)&&S.length>0&&(0,I.jsx)(z.Z,{data:S,selectedRowKeys:ae,setSelectedRowKeys:oe})]})]})})),W=t(62145),V=(0,m.connect)((function(e){return{classroomList:e.classroomList}}))((function(e){var n=e.classroomList,t=e.dispatch,s=(0,m.useParams)();return s.id=s.coursesId,(0,I.jsx)(f.Z,{centered:!0,title:"提示",open:"设为公开"===n.actionTabs.key,okText:"确定",cancelText:"取消",onOk:i()(a()().mark((function e(){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,L.ZP)("/api/courses/".concat(s.id,"/homework_commons/set_public.json"),{method:"post",body:{homework_ids:Z()(n.actionTabs.selectArrs)}});case 2:0===e.sent.status&&((0,N.L9)(["教学课堂","分组作业","设为公开"]),p.ZP.success("操作成功"),t({type:"classroomList/setActionTabs",payload:{}}),t({type:"classroomList/getClassroomCommonHomeworksList",payload:c()({},n.actionTabs.params)}));case 4:case"end":return e.stop()}}),e)}))),onCancel:function(){t({type:"classroomList/setActionTabs",payload:{}})},children:(0,I.jsxs)("p",{children:["设为公开后,非课堂成员也可以访问查看",(0,I.jsx)("br",{}),"是否确认设为公开?"]})})})),X=["classroomList","dispatch","onCallback"],K=(0,m.connect)((function(e){return{classroomList:e.classroomList}}))((function(e){var n=e.classroomList,t=e.dispatch,s=e.onCallback,o=(H()(e,X),(0,m.useParams)());return o.id=o.coursesId,(0,I.jsx)(f.Z,{centered:!0,title:"提示",open:"收藏"===n.actionTabs.key,okText:"确定",cancelText:"取消",onOk:i()(a()().mark((function e(){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,L.ZP)("/api/courses/".concat(o.id,"/homework_commons/add_to_homework_bank.json"),{method:"post",body:{all_check:0,homework_ids:Z()(n.actionTabs.selectArrs)}});case 2:0===e.sent.status&&((0,N.L9)(["教学课堂","分组作业","收藏"]),p.ZP.success("收藏成功,请前往【个人主页/课堂资源】查看"),s&&s(),(0,C.GJ)()?t({type:"classroomList/getClassroomTeacherCommonList",payload:c()(c()({},n.actionTabs.params),{},{type:3})}):t({type:"classroomList/getClassroomCommonList",payload:c()({},n.actionTabs.params)}),t({type:"classroomList/setActionTabs",payload:{}}));case 4:case"end":return e.stop()}}),e)}))),onCancel:function(){t({type:"classroomList/setActionTabs",payload:{}})},children:"确认收藏?"})})),q=t(99313),Q=t(3113),U=t(73782),ee=t(26724),ne=t.n(ee),te={flex_box_center:"flex_box_center___ABrmR",flex_space_between:"flex_space_between___vTOmX",flex_box_vertical_center:"flex_box_vertical_center___txnfs",flex_box_center_end:"flex_box_center_end___fhlTP",flex_box_column:"flex_box_column___NGqFB",line1:"line1___kzLLz",form:"form___JNFp_"},se=t(13261),ae=t(55342),oe=(q.Z.TabPane,(0,m.connect)((function(e){return{shixunHomeworks:e.shixunHomeworks,loading:e.loading,classroomList:e.classroomList}}))((function(e){var n,t=e.shixunHomeworks,s=e.classroomList,o=(e.loading,e.dispatch),r=(0,m.useParams)(),l=((0,m.useLocation)(),E.Z.useForm()),p=d()(l,1)[0],h=(t.brankList,(0,u.useState)(!1)),x=d()(h,2),g=x[0],j=x[1],v=(0,u.useState)(!0),k=d()(v,2),b=k[0],w=k[1],S=(0,u.useState)("myself"),L=d()(S,2),T=L[0],A=L[1],P=(0,u.useState)([]),$=d()(P,2),H=$[0],D=$[1],G=(0,u.useState)(),R=d()(G,2),z=R[0],J=R[1],B=(0,u.useState)({page:0,limit:20,object_type:"group",search:"",filter:"myself"}),Y=d()(B,2),F=Y[0];Y[1];(0,u.useEffect)((function(){"题库选用"===t.actionTabs.key&&V()}),[t.actionTabs.key]);var W=[],V=function(){var e=i()(a()().mark((function e(){var n,t;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!b){e.next=11;break}return j(!1),++F.page,e.next=5,o({type:"shixunHomeworks/getBrankList",payload:c()({},F)});case 5:t=e.sent,H=Z()(H.concat(t.object_list)),J(t.is_teacher),(null===(n=t.object_list)||void 0===n?void 0:n.length)<F.limit?w(!1):w(!0),D(Z()(H)),""==t.object_list&&1===F.page&&j(!0);case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),X=s.detailCommonHomeworksList;return(0,I.jsxs)(f.Z,{centered:!0,title:"选用课堂资源",open:"题库选用"===t.actionTabs.key,okText:"确定",cancelText:"取消",width:800,bodyStyle:{minHeight:200},onOk:i()(a()().mark((function e(){var n,i,l,d;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=p.getFieldValue(),e.next=3,o({type:"shixunHomeworks/saveBanks",payload:{category:(null==s||null===(n=s.detailCommonHomeworksList)||void 0===n?void 0:n.category_id)||(null==s||null===(i=s.detailCommonHomeworksList)||void 0===i?void 0:i.main_category_id),course_id:r.coursesId,object_type:"group",bank_id:l.group_ids}});case 3:0===(null==(d=e.sent)?void 0:d.status)&&((0,N.L9)(["教学课堂","分组作业","选用课堂资源"]),(0,C.GJ)()?o({type:"classroomList/getClassroomTeacherCommonList",payload:c()({},t.actionTabs.params)}):o({type:"classroomList/getClassroomCommonList",payload:c()({},t.actionTabs.params)}),o({type:"shixunHomeworks/setActionTabs",payload:{}}),o({type:"classroomList/setActionTabs",payload:{key:"立即发布",type:1,selectArrs:d.object_ids,params:c()({},t.actionTabs.params),manage_all_group:null==X?void 0:X.manage_all_group}}),o({type:"classroomList/getClassroomLeftMenus",payload:{id:r.coursesId}}));case 5:case"end":return e.stop()}}),e)}))),onCancel:function(){o({type:"shixunHomeworks/setActionTabs",payload:{}})},children:[(0,I.jsxs)(y.Z,{children:[(0,I.jsx)(_.Z,{span:12,children:[{name:"我的资源",id:"myself"},{name:"公共资源",id:"public"}].map((function(e,n){return(0,I.jsx)(Q.ZP,{shape:"round",type:T===e.id?"primary":"default",className:"mr10",onClick:function(){var n=i()(a()().mark((function n(t){return a()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:H=[],b=!0,F.page=0,F.search="",F.filter=e.id,V(),A(e.id);case 7:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}(),children:e.name},n)}))}),(0,I.jsx)(_.Z,{span:12,className:"tr",children:(0,I.jsx)(U.Z.Search,{placeholder:"输入标题、适用课程进行搜索",onSearch:function(e){b=!0,F.search=e,F.page=0,H=[],e&&(0,ae.tk)({name:e,copywriting:e,position:"HomeworkCommon"}),V()},style:{width:260}})})]}),"myself"===T&&(0,I.jsxs)("p",{className:"tc mt10",children:["选用对象:你在课堂分组作业中已",(0,I.jsx)("span",{className:"c-orange",children:"收藏"}),"的分组作业"]}),"public"===T&&(0,I.jsx)("p",{className:"tc mt10",children:"选用对象:题库中已设置成公共属性的所有分组作业"}),(0,I.jsxs)("div",{style:{background:"#F4FAFF",maxHeight:200,overflow:"auto",padding:"20px 10px"},children:[!z&&"public"===T&&(0,I.jsxs)("div",{style:{display:"flex",flexDirection:"column",paddingTop:"30px",alignItems:"center",justifyContent:"center"},children:[(0,I.jsx)("span",{children:"通过职业认证的教师才能访问课堂公共资源库"}),(0,I.jsx)("p",{style:{cursor:"pointer",background:"#ff6800",height:"30px",textAlign:"center",marginTop:"5px",padding:"5px 0px",color:"#fff",width:"80px"},onClick:function(){window.open("/account/certification")},children:"立即认证"})]}),(0,I.jsxs)(ne(),{initialLoad:!1,pageStart:0,threshold:700,loadMore:function(){w(!1),V()},hasMore:b,useWindow:!1,children:[g&&(0,I.jsx)(se.Z,{styles:{margin:"0px auto"}}),(0,I.jsx)(E.Z,{form:p,initialValues:M()({},"group_ids",W),className:te.form,onChange:function(e){var n=p.getFieldValue();W=n},children:(0,I.jsx)(E.Z.Item,{name:"group_ids",children:(0,I.jsx)(O.Z.Group,{style:{width:"100%",flexDirection:"column"},className:"font14",children:null===(n=H)||void 0===n?void 0:n.map((function(e,n){return(0,I.jsxs)(y.Z,{children:[(0,I.jsx)(_.Z,{flex:"2",children:(0,I.jsx)(O.Z,{onChange:function(e){},value:String(e.id),defaultChecked:!0,children:(0,I.jsx)("span",{className:["c-black",te.line1].join(" "),children:e.name})},n)}),(0,I.jsx)(_.Z,{flex:"1",className:"c-black",children:(0,I.jsx)("span",{className:te.line1,children:null==e?void 0:e.course_list_name})}),(0,I.jsx)(_.Z,{flex:"50px",className:"c-black",children:"public"===T&&(0,C.Ny)()||"myself"===T?(0,I.jsx)("span",{className:"c-blue current",onClick:function(){window.open("/users/innov/topics/".concat(e.id,"/personal/group/edit"))},children:"编辑"}):null==e?void 0:e.username})]},n)}))})})})]})]})]})}))),ie=t(51157),re=t(43378),ce=t(4366),le=t(15309),de=(0,m.connect)((function(e){return{classroomList:e.classroomList}}))((function(e){var n=e.styles,t=void 0===n?{}:n,s=e.onSelect,a=e.params,o=e.classroomList,i=(0,u.useState)(!1),r=d()(i,2),l=r[0],h=r[1],x=(0,u.useState)(""),g=d()(x,2),y=g[0],_=g[1];(0,u.useEffect)((function(){h(!1),_("")}),[]);return(0,I.jsxs)("section",{className:"tc animated fadeIn",style:c()(c()({},{color:"#999",margin:"200px auto"}),t),children:[(0,I.jsx)("img",{src:ce.z3}),(0,I.jsx)("p",{className:"mt20 font14",children:"该分组无分组作业,可以下方按钮或右上方“新建作业”按钮创建作业"}),(0,I.jsxs)("div",{style:{marginTop:"30px"},children:[(0,I.jsx)(Q.ZP,{onClick:function(){return h(!0)},type:"primary",style:{width:"128px",height:"40px",marginRight:"20px",borderRadius:"4px"},children:"新建作业"}),(0,I.jsx)(Q.ZP,{onClick:function(){(0,N.xg)("".concat(le.Z.API_SERVER,"/pdf/教学课堂操作手册简单版-V4.0.pdf"))},type:"primary",style:{width:"128px",height:"40px",marginLeft:"20px",borderRadius:"4px"},children:"新建作业指引"})]}),l&&(0,I.jsx)(f.Z,{open:!0,centered:!0,title:"新建作业",onCancel:function(){return h(!1)},onOk:function(){var e;!(0,C.Rm)()||null!=o&&null!==(e=o.AssistantObject)&&void 0!==e&&null!==(e=e.group)&&void 0!==e&&e.can_create?("1"===y&&m.history.push("/classrooms/".concat(a.coursesId,"/group_homework/").concat(a.categoryId||0,"/add")),"2"===y&&(s(),h(!1),_(""))):p.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能")},children:(0,I.jsxs)("div",{children:[(0,I.jsx)("div",{children:(0,I.jsx)(v.ZP,{value:"1",style:{marginTop:"15px"},checked:"1"===y,onClick:function(){return _("1")},children:"新建分组作业"})}),(0,I.jsx)("div",{children:(0,I.jsx)(v.ZP,{value:"2",style:{marginTop:"15px"},checked:"2"===y,onClick:function(){return _("2")},children:"选用资源"})})]})})]})})),ue="bg___WElBH",me=t(66788),pe=t(38854),he=t(20834),xe=t(61998),ge={listContainer:"listContainer___x25sx",info:"info___pPoXs",title:"title___hyvJ4",left:"left___PcXqY",right:"right___Gm2iB",flexBox:"flexBox____dxaA",detail:"detail___Bps1Y",iconV:"iconV___AsCHz"},fe=t(18718),ye=function(e){var n,t,s,o=e.dataSource,r=e.params,l=e.manageAllGroup,p=(0,u.useContext)(Ne),h=(p.batchStatus,p.selectArrs),x=p.setSelectArrs,g=p.selectArrsAll,f=p.setSelectArrsAll,y=p.dispatch,_=(0,m.useParams)(),j=(0,u.useState)(!1),v=d()(j,2),k=v[0],b=v[1],w=(0,u.useState)([]),S=d()(w,2),T=S[0],A=S[1];_=c()(c()(c()({},r),_),{},{category:null===(n=_)||void 0===n?void 0:n.categoryId}),(0,u.useEffect)((function(){A([]),b(!1)}),[]);var P=[{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:"未发布"},{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,t;return"--"===e?e:(0,I.jsxs)("span",{children:[(0,I.jsx)("span",{children:null==e||null===(n=e.split("/"))||void 0===n?void 0:n[0]})," / ",(0,I.jsx)("span",{children:null==e||null===(t=e.split("/"))||void 0===t?void 0:t[1]})]})}},{title:"发布时间",dataIndex:"publish_time",key:"publish_time",sorter:!0,showSorterTooltip:!1,sortOrder:"publish_time"===_.sort_by?"desc"===_.sort_direction?"descend":"ascend":null},{title:"截止时间",dataIndex:"end_time",key:"end_time",sorter:!0,showSorterTooltip:!1,sortOrder:"end_time"===_.sort_by?"desc"===_.sort_direction?"descend":"ascend":null},{title:"补交时间",dataIndex:"late_time",key:"late_time",sorter:!0,showSorterTooltip:!1,sortOrder:"late_time"===_.sort_by?"desc"===_.sort_direction?"descend":"ascend":null},{title:"分班老师",dataIndex:"teachers",key:"teachers",width:150,ellipsis:{showTitle:!1},render:function(e){return"--"!==e&&e?(0,I.jsx)("span",{title:e,children:e}):"--"}}];function M(){return $.apply(this,arguments)}function $(){return($=i()(a()().mark((function e(){var n;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,L.ZP)("/api/homework_commons/".concat(o.homework_id,"/group_settings_statistics.json"),{method:"get",params:c()({},_)});case 2:n=e.sent,A(n.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return(0,I.jsxs)("div",{className:ge.listContainer,onClick:function(e){e.stopPropagation(),(0,N.xg)("/classrooms/".concat(_.coursesId,"/group_homework/").concat(o.homework_id,"/detail"))},children:[(0,C.GJ)()&&(0,I.jsx)(O.Z,{onClick:function(e){e.stopPropagation()},style:{margin:"11px 0 0 10px"},checked:h.includes(o.homework_id),onChange:function(){return e=o.homework_id,void(h.includes(e)?(x(h.filter((function(n){return n!==e}))),f(g.filter((function(n){return n.homework_id!==e})))):(x([].concat(Z()(h),[e])),f([].concat(Z()(g),[o]))));var e}}),(0,I.jsxs)("div",{className:ge.info,children:[(0,I.jsxs)("div",{className:ge.title,children:[(0,I.jsxs)("div",{className:ge.left,style:(0,C.dE)()?{paddingRight:(null==o?void 0:o.challenge_count)-(null==o?void 0:o.finished_challenge_count)?60:140}:{},children:[(0,C.GJ)()&&(0,I.jsx)(fe.Z,{value:o.status,children:(0,I.jsx)(N.VV,{temporary:!0,style:{margin:"0px 10px 0px 0px"},status:[o.status]})}),(0,C.dE)()&&(0,I.jsx)(N.VV,{temporary:!0,style:{margin:"0px 10px 0px 0px"},status:o.status}),(0,I.jsx)("span",{onClick:function(e){return e.stopPropagation()},children:(0,I.jsx)(m.Link,{target:"_blank",to:"/classrooms/".concat(_.coursesId,"/group_homework/").concat(o.homework_id,"/detail").concat((0,C.dE)()?"?tabs=1":""),children:o.name})})]}),(0,I.jsxs)("div",{className:ge.right,children:[(0,C.GJ)()&&"未发布"===o.status&&(0,I.jsx)(m.Link,{target:"_blank",to:"/",onClick:function(){var e=i()(a()().mark((function e(n){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n.stopPropagation(),n.preventDefault(),y({type:"classroomList/setActionTabs",payload:{key:"立即发布",selectArrs:[null==o?void 0:o.homework_id],selectArrsAll:[o],params:c()({},_),type:2,manage_all_group:l}});case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:(0,I.jsxs)("aside",{className:ge.flexBox,children:[(0,I.jsx)("i",{className:"iconfont icon-yishezhifabushijian1"}),(0,I.jsx)("div",{children:"发布"})]})}),(0,C.dE)()&&(0,I.jsxs)("div",{className:ge.actionIcon,children:[(null==o?void 0:o.challenge_count)-(null==o?void 0:o.finished_challenge_count)==0&&(0,I.jsx)("i",{className:"iconfont icon-yiwancheng1"}),!(null!==(t=o.status)&&void 0!==t&&t.includes("已截止"))&&(0,I.jsxs)("aside",{onClick:function(){var e=i()(a()().mark((function e(n){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n.stopPropagation(),(0,N.xg)("/classrooms/".concat(_.coursesId,"/group_homework/").concat(o.homework_id,"/detail").concat((0,C.dE)()?"?tabs=1":""));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),className:ge.flexBox,style:{marginRight:10},children:[(0,I.jsx)("i",{className:"iconfont icon-kaishixuexi font14"}),(0,I.jsx)("div",{children:"开始学习"})]}),(null===(s=o.status)||void 0===s?void 0:s.includes("已截止"))&&(0,I.jsxs)("aside",{className:ge.flexBox,style:{marginRight:10},children:[(0,I.jsx)("i",{className:"iconfont icon-chakanzuoye font14"}),(0,I.jsx)("div",{children:"查看作品"})]})]}),(0,C.GJ)()&&(0,I.jsx)(pe.Z,{placement:"bottomCenter",overlayClassName:ge.dro,dropdownRender:function(){return(0,I.jsxs)(he.Z,{children:[(0,I.jsx)(he.Z.Item,{style:{textAlign:"center"},children:(0,I.jsx)(m.Link,{target:"_blank",to:"/",onClick:function(){var e=i()(a()().mark((function e(n){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n.stopPropagation(),n.preventDefault(),y({type:"classroomList/setActionTabs",payload:{key:"立即发布",selectArrs:[null==o?void 0:o.homework_id],selectArrsAll:[o],params:c()({},_),type:2,manage_all_group:l}});case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:"立即发布"})},1),(0,I.jsx)(he.Z.Item,{style:{textAlign:"center"},children:(0,I.jsx)(m.Link,{target:"_blank",to:"/",onClick:function(){var e=i()(a()().mark((function e(n){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n.stopPropagation(),n.preventDefault(),y({type:"classroomList/setActionTabs",payload:{key:"立即截止",selectArrs:[null==o?void 0:o.homework_id],selectArrsAll:[o],params:c()({},_),type:2}});case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:"立即截止"})},2),(0,I.jsx)(he.Z.Item,{style:{textAlign:"center"},children:(0,I.jsx)(m.Link,{target:"_blank",to:"/",onClick:function(){var e=i()(a()().mark((function e(n){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n.stopPropagation(),n.preventDefault(),y({type:"classroomList/setActionTabs",payload:{key:"删除",selectArrs:[null==o?void 0:o.homework_id],selectArrsAll:g,params:_,status:null==o?void 0:o.status}});case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:"立即删除"})},22),(0,I.jsx)(he.Z.Item,{style:{textAlign:"center"},children:(0,I.jsx)(m.Link,{target:"_blank",onClick:function(e){e.stopPropagation()},to:"/classrooms/".concat(_.coursesId,"/group_homework/").concat(o.homework_id,"/detail?tabs=3"),children:"高级设置"})},6)]})},children:(0,I.jsxs)("aside",{onClick:function(e){return e.stopPropagation()},className:ge.flexBox,style:{marginRight:6,cursor:"default"},children:[(0,I.jsx)("i",{className:"iconfont icon-gengduo4"}),(0,I.jsx)("div",{children:"更多"})]})})]})]}),(0,I.jsx)("div",{className:ge.detail,children:(0,C.GJ)()&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)("span",{className:"c-grey-333 mr20",children:o.author}),["未开始","进行中","已截止","提交中","补交中","已结束","匿评中","申诉中"].includes(o.status)&&!!o.uncommit_count&&(0,I.jsxs)("span",{className:"c-grey-999 mr10",children:[(0,I.jsx)("span",{className:"mr5",children:"未做题"}),o.uncommit_count,"人"]}),["未开始","进行中","已截止","提交中","补交中","已结束","匿评中","申诉中"].includes(o.status)&&!!o.commit_count&&(0,I.jsxs)("span",{className:"c-grey-999 mr10",children:[(0,I.jsx)("span",{className:"mr5",children:"已做题"}),o.commit_count,"人"]}),["未开始","进行中","已截止","提交中","补交中","已结束","匿评中","申诉中"].includes(o.status)&&!!o.compelete_count&&(0,I.jsxs)("span",{className:"c-grey-999 mr10",children:[(0,I.jsx)("span",{className:"mr5",children:"已完成"}),o.compelete_count,"人"]}),["未开始","进行中","已截止","提交中","补交中","匿评中","申诉中"].includes(o.status)&&(0,I.jsxs)("span",{className:"c-grey-999 mr10",children:[(0,I.jsx)("span",{className:"mr5",children:"发布时间"}),o.publish_time]}),["未开始","进行中","已截止","提交中","补交中","匿评中","申诉中"].includes(o.status)&&(0,I.jsxs)("span",{className:"c-grey-999 mr10",children:[(0,I.jsx)("span",{className:"mr5",children:"截止时间"}),o.end_time]}),["已结束"].includes(o.status)&&(0,I.jsxs)("span",{className:"c-grey-999 mr10",children:[(0,I.jsx)("span",{className:"mr5",children:"结束时间"}),o.status_time]}),!(null==o||!o.late_time)&&"--"!==(null==o?void 0:o.late_time)&&(0,I.jsxs)("span",{className:"c-grey-999",children:[(0,I.jsx)("span",{className:"mr5",children:"补交截止时间"}),null==o?void 0:o.late_time]}),["未开始","进行中","已截止","提交中","补交中","已结束","匿评中","申诉中"].includes(o.status)&&(0,I.jsxs)("span",{className:ge.iconV,onClick:function(){var e=i()(a()().mark((function e(n){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n.stopPropagation(),n.preventDefault(),k||M(),b(!k);case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:[(0,I.jsx)("i",{className:"iconfont icon-".concat(k?"shouqi":"xiala2")})," "]})]})}),(0,I.jsxs)("div",{className:ge.content,children:[(0,C.dE)()&&(0,I.jsxs)("span",{className:ge.infoStuIcon,children:[(0,I.jsx)("span",{className:"c-grey-333",children:o.author}),"已截止"===o.status&&!(null==o||!o.status_time)&&(0,I.jsxs)("span",{className:"c-grey-999 ml20",children:[(0,I.jsx)("i",{className:"iconfont icon-shengyushijian font12 mr5"})," ",null==o?void 0:o.status_time]}),(0,I.jsxs)("span",{className:"ml20 c-grey-999",children:[(0,I.jsx)("i",{className:"iconfont icon-shijian1 font12 mr5"}),null==o?void 0:o.publish_time," 至 ",null==o?void 0:o.end_time," "]}),!(null==o||!o.late_time)&&"--"!==(null==o?void 0:o.late_time)&&(0,I.jsxs)("span",{className:"c-grey-999 ml20",children:[(0,I.jsx)("span",{className:"mr5",children:"补交截止时间:"}),null==o?void 0:o.late_time]})]}),(0,C.GJ)()&&"未发布"!==o.status&&k&&T.length>5&&(0,I.jsx)(xe.Z,{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:T,style:{marginTop:14,marginRight:6,cursor:"default"},onChange:function(e,n,t){t.field&&(_.sort_by=t.field),t.order||(_.sort_direction="asc"),"ascend"===t.order&&(_.sort_direction="asc"),"descend"===t.order&&(_.sort_direction="desc"),t.order||(_.sort_direction="asc"),M()},columns:P}),(0,C.GJ)()&&"未发布"!==o.status&&k&&T.length<6&&T.length>0&&(0,I.jsx)(xe.Z,{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:T,style:{marginTop:14,marginRight:6,cursor:"default"},onChange:function(e,n,t){t.field&&(_.sort_by=t.field),t.order||(_.sort_direction="asc"),"ascend"===t.order&&(_.sort_direction="asc"),"descend"===t.order&&(_.sort_direction="desc"),t.order||(_.sort_direction="asc"),M()},columns:P})]})]})]})},_e="bottomControlContainer___yUX9N",je="buttonWrap___A3uZF",ve="moveCategory___pCGhW",ke=t(78386),be=function(e){var n,t=e.buttonDataSource,s=e.onClick,o=(0,u.useContext)(Ne),r=o.allSelect,c=o.setAllSelect,l=o.setSelectArrs,m=o.dataSource,h=o.selectArrs,x=o.useBatchStatus,g=o.dispatch,f=o.params,y=o.getData,_=o.detailLeftMenus,j=o.main_category_id,v=o.setSelectArrsAll,k=(0,u.useState)(!1),b=d()(k,2),w=b[0],N=b[1],S=(0,u.useState)(""),T=d()(S,2),A=T[0],P=T[1];_.course_modules&&(n=_.course_modules.filter((function(e){return"group_homework"===e.type}))[0]);var M=(0,I.jsx)("div",{className:ve,onMouseLeave:function(e){return N(!1)},children:(0,I.jsxs)(he.Z,{onClick:function(){var e=i()(a()().mark((function e(n){var t;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.item,t=n.key,n.keyPath,n.domEvent,""!=h){e.next=4;break}return p.ZP.error("请选择你要操作的任务"),e.abrupt("return",null);case 4:return e.next=6,(0,L.ZP)("/api/courses/".concat(f.id,"/homework_commons/move_to_category.json"),{method:"post",body:{homework_ids:h,new_category_id:t}});case 6:0===e.sent.status&&(p.ZP.success("操作成功"),x(!1),y(),g({type:"classroomList/getClassroomLeftMenus",payload:{id:f.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,I.jsx)("li",{className:"ant-menu-item multi-llipsis1e ant-menu-item-only-child",children:(0,I.jsx)(U.Z,{onChange:function(e){P(e.target.value)}})}),n&&n.second_category.filter((function(e){return"未分配目录"!==e.category_name})).map((function(e,n){var t;if(!(""!==A&&e.category_name.indexOf(A)<0))return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(he.Z.Item,{className:"multi-llipsis1e",children:e.category_name},e.category_id),null==e||null===(t=e.third_category)||void 0===t?void 0:t.map((function(e){return(0,I.jsx)(he.Z.Item,{style:{marginLeft:20},className:"multi-llipsis1e",children:e.category_name},e.category_id)}))]})})),(0,I.jsx)("li",{className:"ant-menu-item multi-llipsis1e ant-menu-item-only-child",onClick:function(e){e.preventDefault(),g({type:"classroomList/setActionTabs",payload:{key:"添加目录",params:f,selectArrs:{category_id:j,type:"group_homework"}}})},children:"新建子目录..."})]})});return(0,I.jsxs)("div",{className:_e,children:[(0,I.jsxs)("div",{children:[(0,I.jsx)("div",{children:(0,I.jsxs)(O.Z,{checked:r,onChange:function(e){c(e.target.checked),l(e.target.checked?m.map((function(e){return e.homework_id})):[]),e.target.checked?v(Z()(m)):v([])},children:["全选本页(",h.length,")"]})}),(0,C.GJ)()&&t.map((function(e){return(0,I.jsx)("div",{children:(0,I.jsx)(Q.ZP,{type:"primary",icon:e.icon,className:je,onClick:function(){return s(e)},children:e.name})},e.key)})),(0,I.jsx)("div",{children:(0,I.jsx)(Q.ZP,{type:"primary",onClick:function(){var e={courseId:f.id,container_type:"group_homework"};f.categoryId&&(e.category_id=f.categoryId),g({type:"classroomList/getAllTaskList",payload:e}),g({type:"classroomList/setActionTabs",payload:{key:"调整排序"}})},icon:(0,I.jsx)("i",{className:"iconfont icon-tiaozhengpaixu2"}),className:je,children:"调整排序"})}),(0,C.GJ)()&&(0,I.jsx)("div",{children:(0,I.jsx)(pe.Z,{open:w,placement:"topLeft",dropdownRender:function(){return M},getPopupContainer:function(e){return e.parentNode},children:(0,I.jsx)("span",{className:"ant-dropdown-link",onMouseEnter:function(e){return N(!0)},children:(0,I.jsx)(Q.ZP,{type:"primary",className:je,icon:(0,I.jsx)("i",{className:"iconfont icon-yidongmulu"}),children:(0,I.jsxs)("span",{children:["移动到目录 ",(0,I.jsx)(ke.Z,{})]})})})})}),(0,C.GJ)()&&(0,I.jsx)("div",{children:(0,I.jsx)(Q.ZP,{type:"primary",onClick:function(){return s({key:"collection",name:"收藏",icon:(0,I.jsx)("i",{className:"iconfont icon-shoucang1"})})},icon:(0,I.jsx)("i",{className:"iconfont icon-shoucang1"}),className:je,children:"收藏"})})]}),(0,I.jsx)("div",{children:(0,I.jsx)(Q.ZP,{type:"primary",ghost:!0,onClick:function(){l([]),x(!1)},children:"取消操作"})})]})},we=t(84736),Ce=t(12961),Ne=(0,u.createContext)({selectArrs:[]}),Se=(0,m.connect)((function(e){var n=e.user,t=e.classroomList,s=e.loading;return{user:n,classroomList:t,globalSetting:e.globalSetting,loading:s.effects}}))((function(e){var n,t,s=e.user,o=e.classroomList,r=e.loading,l=e.dispatch,S=(0,m.useParams)(),Z=(0,m.useSearchParams)(),T=d()(Z,1)[0],P=(0,u.useState)((function(){return c()(c()({},S),{},{id:S.coursesId,limit:20})})),M=d()(P,2),$=M[0],H=M[1],E=(0,u.useState)(!1),D=d()(E,2),O=D[0],G=D[1],R=(0,u.useState)({ta_mode:1,final_mode:!1,st_proportion:0,ta_proportion:30,te_proportion:70,gr_proportion:0,is_repeat_minus:!1,is_group_grade:!1,repeat_setting_score:"",repeat_limit:""}),z=d()(R,2),J=z[0],B=z[1],Y=(0,u.useState)([]),X=d()(Y,2),q=X[0],Q=X[1],U=(0,u.useState)(!1),ee=d()(U,2),ne=ee[0],te=ee[1],ae=(0,u.useState)(!1),ce=d()(ae,2),le=ce[0],pe=ce[1],he=(0,u.useState)([]),xe=d()(he,2),ge=xe[0],fe=xe[1],_e=(0,u.useState)(!1),je=d()(_e,2),ve=(je[0],je[1],(0,u.useState)("默认排序")),ke=d()(ve,2),Se=ke[0],Ze=ke[1],Le=(0,m.useLocation)(),Te=o.detailCommonHomeworksList,Ie=o.detailLeftMenus,Ae=o.detailTopBanner,Pe=o.taskList;T.get("tabs")&&parseInt(T.get("tabs"));$.type=3,$.categoryId?$.category=$.categoryId:delete $.category,(0,u.useEffect)((function(){H(c()(c()({},$),S))}),[null==S?void 0:S.categoryId]),(0,u.useEffect)((function(){"0"===T.get("tabs")&&($.status="0",$.page=1)}),[T.get("tabs")]),(0,u.useEffect)((function(){var e=T.get("tabs");e&&void 0!==e&&((0,C.GJ)()?$.status=e:$.order=e)}),[T.toString()]),(0,u.useEffect)((function(){l({type:"classroomList/getAssistantPermissions",payload:{course_id:$.id}})}),[]),(0,u.useEffect)((function(){var e,n,t=T.get("tabs");if(null!=s&&null!==(e=s.userInfo)&&void 0!==e&&e.login){var a,o=N.cX.getItem("".concat(null==s||null===(a=s.userInfo)||void 0===a?void 0:a.login).concat((0,C.GJ)()?"Teacher":"Student"),"GroupHomework");o&&($.sort_by=null==o?void 0:o.type,$.sort_direction=null==o?void 0:o.direction,Ze(null==o?void 0:o.name));var i=void 0===S.categoryId?{}:{categoryId:S.categoryId,category:S.categoryId};t&&void 0!==t&&((0,C.GJ)()?$.status=t:$.order=t),Me(i)}else if(null!=s&&null!==(n=s.userInfo)&&void 0!==n&&n.username){var r=void 0===S.categoryId?{}:{categoryId:S.categoryId,category:S.categoryId};t&&void 0!==t&&((0,C.GJ)()?$.status=t:$.order=t),Me(r)}}),[null==s||null===(n=s.userInfo)||void 0===n?void 0:n.login,null==Le?void 0:Le.pathname]),(0,u.useEffect)((function(){"目录重命名成功"===o.actionTabs.key&&Me(),"目录重命名成功"===o.actionTabs.key&&Me()}),[o.actionTabs.key]),(0,u.useEffect)((function(){Q([])}),[Te]),(0,u.useEffect)((function(){pe(!1)}),[$.categoryId]),(0,u.useEffect)((function(){Te&&Te.homeworks&&(q.length===Te.homeworks.length&&q.length>0?te(!0):q.length!==Te.homeworks.length&&te(!1))}),[q]);var Me=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Q([]),fe([]),(0,C.GJ)()?l({type:"classroomList/getClassroomTeacherCommonList",payload:c()(c()(c()({},$),e),{},{type:3})}):l({type:"classroomList/getClassroomCommonList",payload:c()(c()({},$),e)})},$e=function(){var e=i()(a()().mark((function e(){var n,t;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,L.ZP)("/api/courses/".concat($.coursesId,"/homework_commons/get_default_score_setting.json"),{method:"get",params:{homework_type:3}});case 2:null!=(n=e.sent)&&n.data&&(t=n.data.score_settings,Object.keys(t).map((function(e){e.indexOf("proportion")>-1&&(t[e]=(100*t[e]).toFixed(0))})),console.log(t),B(c()({},t)));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();(0,u.useEffect)((function(){Q([])}),[Te]);var He=function(){l({type:"shixunHomeworks/setActionTabs",payload:{key:"题库选用",params:$}})},Ee=function(){var e=i()(a()().mark((function e(n){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l({type:"classroomList/updateTaskPosition",payload:{category_id:$.categoryId,courseId:$.id,task_ids:n,container_type:"group_homework"}});case 2:Me();case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),De=(0,u.useMemo)((function(){var e=[];return Pe.length>0&&(e=Pe.map((function(e){return{user_name:e.user_name,task_name:e.task_name,task_id:e.task_id,category:e.category}}))),e}),[Pe]);return(0,I.jsx)(Ne.Provider,{value:{params:$,batchStatus:le,selectArrs:q,setSelectArrs:Q,allSelect:ne,dataSource:Te.homeworks||[],detailLeftMenus:Ie,main_category_id:Te.main_category_id||"",selectArrsAll:ge,setAllSelect:te,useBatchStatus:pe,dispatch:l,getData:Me,setSelectArrsAll:fe},children:(0,I.jsxs)("section",{children:[(0,I.jsxs)("aside",{className:ue,children:[(0,I.jsx)(me.Z,{isLoading:r[(0,C.GJ)()?"classroomList/getClassroomTeacherCommonList":"classroomList/getClassroomCommonList"],tabDataSource:(0,C.GJ)()?[{name:"全部",id:0,total:Te.all_count||0},{name:"未发布",id:1,total:Te.unpublished_count||0},{name:"未开始",id:4,total:Te.not_start_count||0},{name:"进行中",id:2,total:Te.in_progress_count||0},{name:"已截止",id:3,total:Te.overed_count||0}]:[{name:"全部",id:0},{name:"提交中",id:1},{name:"补交中",id:2},{name:"匿评中",id:3},{name:"申诉中",id:4},{name:"已截止",id:5}],isAdmin:(0,C.GJ)(),TooltipTitle:$.categoryId?"目录重命名":"新建子目录",categoryId:$.categoryId,dropdownMenu:[{name:"新建分组作业",id:"1"},{name:"选用资源",id:"2"}],isShowRightControl:"未分配目录"!==(0,N.Oo)(null==Ie?void 0:Ie.course_modules,$.categoryId),onsetClick:function(){$e(),G(!0)},onTabMenuClick:function(e){void 0!==e.id&&((0,C.GJ)()?$.status=e.id:$.order=e.id),pe(!1),$.page=1,m.history.replace("".concat(Le.pathname,"?tabs=").concat(e.id)),Me($)},defaultSelectedKeys:[T.get("tabs")?T.get("tabs"):"0"],onTooltipTitleClick:function(){l({type:"classroomList/setActionTabs",payload:{key:$.categoryId?"目录重命名":"添加目录",params:$,selectArrs:{category_name:null==Te?void 0:Te.category_name,category_id:(null==Te?void 0:Te.category_id)||(null==Te?void 0:Te.main_category_id)},cb:function(){Me()}}})},onDropdownMenuClick:function(e){var n;!(0,C.Rm)()||null!==(n=o.AssistantObject.group)&&void 0!==n&&n.can_create?"1"===e?m.history.push("/classrooms/".concat($.coursesId,"/group_homework/").concat($.categoryId,"/add")):"2"===e&&He():p.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能")}}),(0,I.jsx)(we.Z,{dataSource:Te.homeworks||[],isAdmin:(0,C.GJ)(),batchStatus:le,SortMenuName:Se,setSortMenuName:Ze,onSearch:function(e){$.search=e,$.page=1,Me()},onSort:function(e){var n;$.sort_by=e.type,$.sort_direction=e.direction,$.page=1,N.cX.setItem("".concat(null==s||null===(n=s.userInfo)||void 0===n?void 0:n.login).concat((0,C.GJ)()?"Teacher":"Student"),e,"GroupHomework"),Me($)},onBatch:function(e){return pe(e)}})]}),(0,I.jsxs)(h.Z,{loading:r["classroomList/getClassroomCommonHomeworksList"],active:!0,avatar:{size:40},paragraph:{rows:5},className:"mt30",children:[0===(null==Te?void 0:Te.all_count)&&(0,C.GJ)()?!r[(0,C.GJ)()?"classroomList/getClassroomTeacherCommonList":"classroomList/getClassroomCommonList"]&&(0,I.jsx)(de,{params:$,dispatch:l,onSelect:He}):(null==Te?void 0:Te.homeworks)&&0===Te.homeworks.length&&!r[(0,C.GJ)()?"classroomList/getClassroomTeacherCommonList":"classroomList/getClassroomCommonList"]&&(0,I.jsx)(se.Z,{}),(0,I.jsx)("aside",{className:"minH500 skt-loading relative pb40 mb30",children:!r[(0,C.GJ)()?"classroomList/getClassroomTeacherCommonList":"classroomList/getClassroomCommonList"]&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)("aside",{className:"animated fadeIn",children:[null==Te||null===(t=Te.homeworks)||void 0===t?void 0:t.map((function(e,n){return(0,I.jsx)(ye,{dataSource:e,params:$,manageAllGroup:null==Te?void 0:Te.manage_all_group},n)})),(0,I.jsx)("aside",{className:"tc mb50 mt30",children:(null==Te?void 0:Te.query_total_count)>10&&(0,I.jsx)(x.Z,{showSizeChanger:!0,onChange:function(e,n){$.page=e,$.limit=n,Me()},defaultCurrent:1,current:$.page||1,pageSize:$.limit||20,total:Te.query_total_count})})]}),q.length>0&&(0,C.GJ)()&&(0,I.jsx)(g.Z,{offsetBottom:0,children:(0,I.jsx)(be,{buttonDataSource:[{key:"publish",name:"批量发布",icon:(0,I.jsx)("i",{className:"iconfont icon-fabu5"})},{key:"deadline",name:"批量截止",icon:(0,I.jsx)("i",{className:"iconfont icon-piliangjiezhi2"})},{key:"delete",name:"批量删除",icon:(0,I.jsx)("i",{className:"iconfont icon-piliangshanchu2"})},{key:"public",name:"设为公开",icon:(0,I.jsx)("i",{className:"iconfont icon-sheweigongkai2"})}].filter((function(e){return!(!(0,C.GJ)()&&!(0,C.Rm)())||"批量删除"!==e.name})).filter((function(e){return!!Ae.is_public||"设为公开"!==e.name})),onClick:function(e){var n,t;if(0===q.length)return p.ZP.error("请选择你要操作的任务"),!1;var s=e.name,a={key:s,selectArrs:q,selectArrsAll:ge,type:["publish","deadline"].includes(e.key)?1:"",params:$};switch(e.key){case"publish":if((0,C.Rm)()&&(null==o||null===(n=o.AssistantObject)||void 0===n||null===(n=n.group)||void 0===n||!n.can_publish))return void p.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能");s="立即发布";break;case"deadline":if((0,C.Rm)()&&(null==o||null===(t=o.AssistantObject)||void 0===t||null===(t=t.group)||void 0===t||!t.can_stop))return void p.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能");s="立即截止";break;case"delete":s="删除";break;case"collection":s="收藏"}l({type:"classroomList/setActionTabs",payload:c()(c()({},a),{},{key:s})})}})})]})})]}),(0,I.jsx)(A,{onCallback:function(){return pe(!1)}}),(0,I.jsx)(F,{onCallback:function(){return pe(!1)},courseEndTime:null==Te?void 0:Te.course_end_time}),(0,I.jsx)(W.Z,{courseEndTime:null==Te?void 0:Te.course_end_time,courseId:S.coursesId,visible:"立即截止"===o.actionTabs.key,isBatch:2!==o.actionTabs.type,homeworkIds:o.actionTabs.selectArrs,successCallback:function(){pe(!1),Me()}}),(0,I.jsx)(V,{}),(0,I.jsx)(oe,{}),(0,I.jsx)(K,{onCallback:function(){return pe(!1)}}),(0,I.jsx)(ie.Z,{}),(0,I.jsx)(re.Z,{}),(0,I.jsx)(Ce.Z,{visible:"调整排序"===o.actionTabs.key,callback:Ee,data:De,onCancel:function(){l({type:"classroomList/setActionTabs",payload:{key:""}})}}),(0,I.jsx)(f.Z,{open:O,title:"默认评分设置",centered:!0,onCancel:function(){G(!1)},onOk:i()(a()().mark((function e(){var n;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=JSON.parse(JSON.stringify(J)),Object.keys(n).map((function(e){e.indexOf("proportion")>-1&&(n[e]=n[e]/100)})),e.next=4,(0,L.ZP)("/api/courses/".concat($.coursesId,"/homework_commons/set_default_score_setting.json"),{method:"post",body:{homework_type:3,score_settings:n}});case 4:0===e.sent.status&&(p.ZP.success("设置成功"),G(!1));case 6:case"end":return e.stop()}}),e)}))),width:800,children:(0,I.jsxs)("div",{children:[(0,I.jsx)(y.Z,{children:(0,I.jsx)(_.Z,{span:24,children:(0,I.jsx)(y.Z,{align:"middle",children:(0,I.jsx)(_.Z,{span:24,children:(0,I.jsx)("div",{className:"mt15",children:"该默认规则将被应用于你后续新建的分组作业,且不会影响你已创建的作业以及其他老师新建作业的评分规则。"})})})})}),(0,I.jsxs)(y.Z,{align:"middle",className:"mt25",children:[(0,I.jsx)(_.Z,{children:(0,I.jsx)("strong",{children:"组长评分"})}),(0,I.jsxs)(y.Z,{className:"ml10",children:[(0,I.jsx)(_.Z,{children:(0,I.jsx)(j.Z,{checked:J.is_group_grade,onChange:function(e){J.is_group_grade=e,B(c()({},J))}})}),(0,I.jsx)(_.Z,{className:"c-grey-c ml10",children:"(选中,则组长首次提交作业时需要对组员进行评分)"})]})]}),(0,I.jsxs)(y.Z,{className:"mt25",children:[(0,I.jsx)(_.Z,{children:(0,I.jsx)("strong",{children:"助教评分"})}),(0,I.jsx)(_.Z,{span:24,className:"pl30 mt10"})]}),(0,I.jsx)(y.Z,{children:(0,I.jsxs)(v.ZP.Group,{value:null==J?void 0:J.ta_mode,onChange:function(e){J.ta_mode=e.target.value,B(c()({},J))},children:[(0,I.jsxs)(v.ZP,{value:1,style:{marginTop:15},children:[(0,I.jsx)("strong",{children:"普通模式"}),(0,I.jsx)("span",{className:"c-grey-c",children:"(选中,则取各助教最终评分的平均分)"})]}),(0,I.jsx)("br",{}),(0,I.jsxs)(v.ZP,{value:0,style:{marginTop:15},children:[(0,I.jsx)("strong",{children:"复审模式"}),(0,I.jsx)("span",{className:"c-grey-c",children:"(选中,则只取最新的助教评分)"})]})]})}),(0,I.jsxs)(y.Z,{className:"mt25",children:[(0,I.jsx)(_.Z,{children:(0,I.jsx)("strong",{children:"最终成绩组成"})}),(0,I.jsx)(_.Z,{span:24,className:"pl30 mt10"})]}),(0,I.jsxs)(y.Z,{children:[(0,I.jsxs)(v.ZP.Group,{value:J.final_mode,onChange:function(e){J.final_mode=e.target.value,B(c()({},J))},children:[(0,I.jsxs)(v.ZP,{value:!1,style:{marginTop:15},children:[(0,I.jsx)("strong",{children:"多项评分配比"}),(0,I.jsxs)("span",{className:"c-grey-c",children:["(选中,则按照比例计算最终成绩)",(0,I.jsx)(k.Z,{overlayClassName:"edu-popover",placement:"bottomLeft",content:(0,I.jsxs)("span",{className:"font14",children:["计算说明:",(0,I.jsx)("br",{}),"教师评分 * 其百分比 + 助教评分 * 其百分比 + 组长评分 * 其百分比 + 学生匿评平均分 * 其百分比 - ( ",(0,I.jsx)("br",{}),"迟交扣分 + 缺评扣分 * 缺评数 + 违规匿评扣分 * 违规匿评数 )",(0,I.jsx)("br",{}),(0,I.jsx)("br",{}),"注意",(0,I.jsx)("br",{}),"非零百分比的评分选项,若评分记录为空,则其百分比将自动平摊到其它非零",(0,I.jsx)("br",{}),"评分选项上。",(0,I.jsx)("br",{}),"例:教师评分40% + 助教评分35% + 学生匿评25%,学生A没有教师评分记",(0,I.jsx)("br",{}),"录,则其最终成绩按照助教评分55% + 学生匿评45%进行计算"]}),trigger:"click",children:(0,I.jsx)("span",{className:"mt10 ml10 current font14",children:(0,I.jsx)(w.Z,{})})})]})]}),(0,I.jsxs)(y.Z,{align:"middle",className:"mt25 pl30 font14",children:[(0,I.jsx)(_.Z,{children:"教师评分:"}),(0,I.jsxs)(_.Z,{className:"ml5",children:[(0,I.jsx)(b.Z,{min:0,max:100,value:J.te_proportion,onChange:function(e){J.te_proportion=e,B(Object.assign({},J))}}),(0,I.jsx)("span",{className:"ml10",children:"%"})]})]}),(0,I.jsxs)(y.Z,{align:"middle",className:"mt25 pl30 font14",children:[(0,I.jsx)(_.Z,{children:"助教评分:"}),(0,I.jsxs)(_.Z,{className:"ml5",children:[(0,I.jsx)(b.Z,{min:0,max:100,value:J.ta_proportion,onChange:function(e){J.ta_proportion=e,B(Object.assign({},J))}}),(0,I.jsx)("span",{className:"ml10",children:"%"})]})]}),J.is_group_grade&&(0,I.jsxs)(y.Z,{align:"middle",className:"mt25 pl30 font14",children:[(0,I.jsx)(_.Z,{children:"组长评分:"}),(0,I.jsxs)(_.Z,{className:"ml5",children:[(0,I.jsx)(b.Z,{min:0,max:100,value:J.gr_proportion,onChange:function(e){J.gr_proportion=e,B(Object.assign({},J))}}),(0,I.jsx)("span",{className:"ml10",children:"%"})]})]}),(0,I.jsxs)(y.Z,{align:"middle",className:"mt25 pl30 font14",children:[(0,I.jsx)(_.Z,{children:"学生匿评:"}),(0,I.jsxs)(_.Z,{className:"ml5",children:[(0,I.jsx)(b.Z,{min:0,max:100,value:J.st_proportion,onChange:function(e){J.st_proportion=e,B(Object.assign({},J))}}),(0,I.jsx)("span",{className:"ml10",children:"%"})]})]}),(0,I.jsx)("br",{}),(0,I.jsxs)(v.ZP,{value:!0,style:{marginTop:15},children:[(0,I.jsx)("strong",{children:"单项评分优先"}),(0,I.jsxs)("span",{className:"c-grey-c",children:["(选中,则按照优先顺序计算最终成绩)",(0,I.jsx)(k.Z,{overlayClassName:"edu-popover",placement:"bottomLeft",content:(0,I.jsxs)("span",{className:"font14",children:["计算说明:",(0,I.jsx)("br",{}),"优先顺序排前的非零评分 * 100% - ",(0,I.jsx)("br",{}),"( 迟交扣分 + 缺评扣分 * 缺评数 + 违规匿评扣分 * 违规匿评数 )",(0,I.jsx)("br",{}),"例:有教师评分则教师评分100%,否则教辅评分100%,依次类推"]}),trigger:"click",children:(0,I.jsx)("span",{className:"mt10 ml10 current font14",children:(0,I.jsx)(w.Z,{})})})]})]}),(0,I.jsx)(y.Z,{children:(0,I.jsx)(_.Z,{span:24,className:"ml20",children:(0,I.jsx)("div",{style:{color:"#ccc"},children:"(教师评分 → 助教评分 → 组长评分 → 学生匿评评分)"})})})]}),(0,I.jsx)("br",{})]})]})})]})})}))},78673:function(e,n,t){t.d(n,{Z:function(){return A}});var s=t(42141),a=t(92310),o=t.n(a),i=t(19973),r=t(51060),c=t(8295),l=t(62615),d=t(59301),u=t(71366),m=t(20287),p=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],h=d.forwardRef((function(e,n){var t,s=e.prefixCls,a=void 0===s?"rc-switch":s,h=e.className,x=e.checked,g=e.defaultChecked,f=e.disabled,y=e.loadingIcon,_=e.checkedChildren,j=e.unCheckedChildren,v=e.onClick,k=e.onChange,b=e.onKeyDown,w=(0,l.Z)(e,p),C=(0,u.Z)(!1,{value:x,defaultValue:g}),N=(0,c.Z)(C,2),S=N[0],Z=N[1];function L(e,n){var t=S;return f||(Z(t=e),null==k||k(t,n)),t}var T=o()(a,h,(t={},(0,r.Z)(t,"".concat(a,"-checked"),S),(0,r.Z)(t,"".concat(a,"-disabled"),f),t));return d.createElement("button",(0,i.Z)({},w,{type:"button",role:"switch","aria-checked":S,disabled:f,className:T,ref:n,onKeyDown:function(e){e.which===m.Z.LEFT?L(!1,e):e.which===m.Z.RIGHT&&L(!0,e),null==b||b(e)},onClick:function(e){var n=L(!S,e);null==v||v(n,e)}}),y,d.createElement("span",{className:"".concat(a,"-inner")},d.createElement("span",{className:"".concat(a,"-inner-checked")},_),d.createElement("span",{className:"".concat(a,"-inner-unchecked")},j)))}));h.displayName="Switch";var x=h,g=t(14088),f=t(36355),y=t(1684),_=t(19716),j=t(64993),v=t(17313),k=t(83116),b=t(37613);const w=e=>{const{componentCls:n,trackHeightSM:t,trackPadding:s,trackMinWidthSM:a,innerMinMarginSM:o,innerMaxMarginSM:i,handleSizeSM:r}=e,c=`${n}-inner`;return{[n]:{[`&${n}-small`]:{minWidth:a,height:t,lineHeight:`${t}px`,[`${n}-inner`]:{paddingInlineStart:i,paddingInlineEnd:o,[`${c}-checked`]:{marginInlineStart:`calc(-100% + ${r+2*s}px - ${2*i}px)`,marginInlineEnd:`calc(100% - ${r+2*s}px + ${2*i}px)`},[`${c}-unchecked`]:{marginTop:-t,marginInlineStart:0,marginInlineEnd:0}},[`${n}-handle`]:{width:r,height:r},[`${n}-loading-icon`]:{top:(r-e.switchLoadingIconSize)/2,fontSize:e.switchLoadingIconSize},[`&${n}-checked`]:{[`${n}-inner`]:{paddingInlineStart:o,paddingInlineEnd:i,[`${c}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${c}-unchecked`]:{marginInlineStart:`calc(100% - ${r+2*s}px + ${2*i}px)`,marginInlineEnd:`calc(-100% + ${r+2*s}px - ${2*i}px)`}},[`${n}-handle`]:{insetInlineStart:`calc(100% - ${r+s}px)`}},[`&:not(${n}-disabled):active`]:{[`&:not(${n}-checked) ${c}`]:{[`${c}-unchecked`]:{marginInlineStart:e.marginXXS/2,marginInlineEnd:-e.marginXXS/2}},[`&${n}-checked ${c}`]:{[`${c}-checked`]:{marginInlineStart:-e.marginXXS/2,marginInlineEnd:e.marginXXS/2}}}}}}},C=e=>{const{componentCls:n,handleSize:t}=e;return{[n]:{[`${n}-loading-icon${e.iconCls}`]:{position:"relative",top:(t-e.fontSize)/2,color:e.switchLoadingIconColor,verticalAlign:"top"},[`&${n}-checked ${n}-loading-icon`]:{color:e.switchColor}}}},N=e=>{const{componentCls:n,motion:t,trackPadding:s,handleBg:a,handleShadow:o,handleSize:i}=e,r=`${n}-handle`;return{[n]:{[r]:{position:"absolute",top:s,insetInlineStart:s,width:i,height:i,transition:`all ${e.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:a,borderRadius:i/2,boxShadow:o,transition:`all ${e.switchDuration} ease-in-out`,content:'""'}},[`&${n}-checked ${r}`]:{insetInlineStart:`calc(100% - ${i+s}px)`},[`&:not(${n}-disabled):active`]:t?{[`${r}::before`]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},[`&${n}-checked ${r}::before`]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}:{}}}},S=e=>{const{componentCls:n,trackHeight:t,trackPadding:s,innerMinMargin:a,innerMaxMargin:o,handleSize:i}=e,r=`${n}-inner`;return{[n]:{[r]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:o,paddingInlineEnd:a,transition:`padding-inline-start ${e.switchDuration} ease-in-out, padding-inline-end ${e.switchDuration} ease-in-out`,[`${r}-checked, ${r}-unchecked`]:{display:"block",color:e.colorTextLightSolid,fontSize:e.fontSizeSM,transition:`margin-inline-start ${e.switchDuration} ease-in-out, margin-inline-end ${e.switchDuration} ease-in-out`,pointerEvents:"none"},[`${r}-checked`]:{marginInlineStart:`calc(-100% + ${i+2*s}px - ${2*o}px)`,marginInlineEnd:`calc(100% - ${i+2*s}px + ${2*o}px)`},[`${r}-unchecked`]:{marginTop:-t,marginInlineStart:0,marginInlineEnd:0}},[`&${n}-checked ${r}`]:{paddingInlineStart:a,paddingInlineEnd:o,[`${r}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${r}-unchecked`]:{marginInlineStart:`calc(100% - ${i+2*s}px + ${2*o}px)`,marginInlineEnd:`calc(-100% + ${i+2*s}px - ${2*o}px)`}},[`&:not(${n}-disabled):active`]:{[`&:not(${n}-checked) ${r}`]:{[`${r}-unchecked`]:{marginInlineStart:2*s,marginInlineEnd:2*-s}},[`&${n}-checked ${r}`]:{[`${r}-checked`]:{marginInlineStart:2*-s,marginInlineEnd:2*s}}}}}},Z=e=>{const{componentCls:n,trackHeight:t,trackMinWidth:s}=e;return{[n]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,v.Wf)(e)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:s,height:t,lineHeight:`${t}px`,verticalAlign:"middle",background:e.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${e.motionDurationMid}`,userSelect:"none",[`&:hover:not(${n}-disabled)`]:{background:e.colorTextTertiary}}),(0,v.Qy)(e)),{[`&${n}-checked`]:{background:e.switchColor,[`&:hover:not(${n}-disabled)`]:{background:e.colorPrimaryHover}},[`&${n}-loading, &${n}-disabled`]:{cursor:"not-allowed",opacity:e.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${n}-rtl`]:{direction:"rtl"}})}};var L=(0,k.Z)("Switch",(e=>{const n=(0,b.TS)(e,{switchDuration:e.motionDurationMid,switchColor:e.colorPrimary,switchDisabledOpacity:e.opacityLoading,switchLoadingIconSize:.75*e.fontSizeIcon,switchLoadingIconColor:`rgba(0, 0, 0, ${e.opacityLoading})`,switchHandleActiveInset:"-30%"});return[Z(n),S(n),N(n),C(n),w(n)]}),(e=>{const{fontSize:n,lineHeight:t,controlHeight:s,colorWhite:a}=e,o=n*t,i=s/2,r=o-4,c=i-4;return{trackHeight:o,trackHeightSM:i,trackMinWidth:2*r+8,trackMinWidthSM:2*c+4,trackPadding:2,handleBg:a,handleSize:r,handleSizeSM:c,handleShadow:`0 2px 4px 0 ${new j.C("#00230b").setAlpha(.2).toRgbString()}`,innerMinMargin:r/2,innerMaxMargin:r+2+4,innerMinMarginSM:c/2,innerMaxMarginSM:c+2+4}})),T=function(e,n){var t={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&n.indexOf(s)<0&&(t[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(s=Object.getOwnPropertySymbols(e);a<s.length;a++)n.indexOf(s[a])<0&&Object.prototype.propertyIsEnumerable.call(e,s[a])&&(t[s[a]]=e[s[a]])}return t};const I=d.forwardRef(((e,n)=>{const{prefixCls:t,size:a,disabled:i,loading:r,className:c,rootClassName:l,style:u}=e,m=T(e,["prefixCls","size","disabled","loading","className","rootClassName","style"]),{getPrefixCls:p,direction:h,switch:j}=d.useContext(f.E_),v=d.useContext(y.Z),k=(null!=i?i:v)||r,b=p("switch",t),w=d.createElement("div",{className:`${b}-handle`},r&&d.createElement(s.Z,{className:`${b}-loading-icon`})),[C,N]=L(b),S=(0,_.Z)(a),Z=o()(null==j?void 0:j.className,{[`${b}-small`]:"small"===S,[`${b}-loading`]:r,[`${b}-rtl`]:"rtl"===h},c,l,N),I=Object.assign(Object.assign({},null==j?void 0:j.style),u);return C(d.createElement(g.Z,{component:"Switch"},d.createElement(x,Object.assign({},m,{prefixCls:b,className:Z,style:I,disabled:k,ref:n,loadingIcon:w}))))}));I.__ANT_SWITCH=!0;var A=I}}]); |