You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/72671.9e1da14e.async.js

1 line
34 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[72671],{27184:function(e,n,t){t.d(n,{Z:function(){return N}});var i=t(7557),s=t.n(i),a=t(41498),l=t.n(a),r=t(79800),c=t.n(r),o=t(59301),u=t(78241),d=t(8591),m=t(43418),h=t(57930),p=t(92832),f=t(61998),x=t(95237),v=t(43604),j=t(61186),g=t.n(j),_=t(23756),b=t(3858),w={tips:"tips___e8J4O",homeworkType:"homeworkType___ZjN2X",antdTable:"antdTable___amDdp",modalWrapper:"modalWrapper___XPojI"},Z=t(92596),y=t(97618),k=t(37712),N=(0,b.connect)((function(e){return{shixunHomeworks:e.shixunHomeworks,classroomList:e.classroomList}}))((function(e){var n=e.dispatch,t=e.courseEndTime,i=(e.classroomList,e.successCallback),a=void 0===i?function(){}:i,r=e.visible,j=e.homeworkIds,b=e.courseId,N=e.isBatch,C=(e.shixunHomeworks,u.Z.useForm()),A=c()(C,1)[0],S=(0,o.useState)(!1),T=c()(S,2),H=T[0],E=T[1],I=(0,o.useState)(!1),O=c()(I,2),Y=O[0],D=O[1],L=(0,o.useState)(!1),M=c()(L,2),R=M[0],F=M[1],P=(0,o.useState)([]),W=c()(P,2),B=W[0],Q=W[1],U=(0,o.useState)([]),z=c()(U,2),K=z[0],V=z[1],J=(0,o.useState)([]),G=c()(J,2),X=G[0],q=G[1],$=(0,o.useState)([]),ee=c()($,2),ne=ee[0],te=ee[1],ie=(0,o.useState)([]),se=c()(ie,2),ae=se[0],le=se[1],re=(0,o.useState)([]),ce=c()(re,2),oe=ce[0],ue=ce[1],de=(0,o.useState)([]),me=c()(de,2),he=me[0],pe=me[1],fe=(0,o.useState)([]),xe=c()(fe,2),ve=xe[0],je=xe[1],ge=(0,o.useState)([]),_e=c()(ge,2),be=_e[0],we=_e[1];(0,o.useEffect)((function(){r?Ze():ke()}),[r]);var Ze=function(){var e=l()(s()().mark((function e(){var n;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return E(!0),e.next=3,(0,Z.oR)(j[0],{course_id:b});case 3:n=e.sent,F(n.no_group),N?(pe(n.all_course_groups),je(n.all_course_groups)):(te(n.late_course_groups),le(n.late_course_groups),Q(n.submit_course_groups),V(n.submit_course_groups)),E(!1),A.setFieldsValue({end_time:g()()});case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ye=function(){var e=l()(s()().mark((function e(){var t,i,l;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=A.getFieldsValue(),i=g()(t.end_time).format("YYYY-MM-DD HH:mm"),!(N?0===be.length:0===X.length&&0===oe.length)||R){e.next=6;break}return d.ZP.warning("请选择需要操作的班级"),e.abrupt("return");case 6:return D(!0),e.next=9,(0,Z.Mc)(b,{no_group:R,homework_ids:j,group_ids:N?be:X,end_time:i,late_group_ids:N?be:oe});case 9:l=e.sent,D(!1),0===l.status&&(ke(),d.ZP.success("操作成功"),a(),n({type:"classroomList/setActionTabs",payload:{key:"清除选择数据"}}));case 12:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ke=function(){q([]),ue([]),V([]),le([])};return(0,k.jsxs)(m.Z,{centered:!0,title:"立即截止",className:w.modalWrapper,width:N||R?520:760,open:r,confirmLoading:Y,destroyOnClose:!0,okText:"截止",cancelText:"取消",onOk:function(){return ye()},onCancel:function(){ke(),n({type:"classroomList/setActionTabs",payload:{}})},children:[(0,k.jsxs)("div",{className:w.tips,children:[(0,k.jsx)("div",{children:"1、截止后学生不能再提交作业。"}),(0,k.jsx)("div",{children:"2、本操作只对“提交中”、“补交中”的作业有效。"})]}),(0,k.jsx)(u.Z,{form:A,layout:"vertical",children:(0,k.jsx)(u.Z.Item,{name:"end_time",label:"截止时间",children:(0,k.jsx)(h.default,{style:{width:"100%"},disabledDate:function(e){return(0,y.Q8)(e,t)},disabledTime:function(e){return(0,y.d0)(e)},placeholder:"请选择结束时间",showTime:{format:"HH:mm",defaultValue:g()((0,_.U6)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",allowClear:!1})})}),!R&&(0,k.jsx)(k.Fragment,{children:N?(0,k.jsxs)("div",{children:[(0,k.jsx)(p.Z,{placeholder:"搜索班级",onChange:function(e){je(he.filter((function(n){return n.name.indexOf(e.target.value)>-1})))}}),(0,k.jsx)(f.Z,{style:{marginTop:"10px",height:"300px",overflow:"auto"},className:w.antdTable,rowSelection:{type:"checkbox",onChange:function(e){we(e)}},rowKey:"id",pagination:!1,dataSource:ve,loading:H,columns:[{title:"班级",dataIndex:"name"}]})]}):(0,k.jsxs)(x.Z,{gutter:24,children:[(0,k.jsxs)(v.Z,{span:14,children:[(0,k.jsx)("div",{className:w.homeworkType,children:"作业截止"}),(0,k.jsx)(p.Z,{placeholder:"搜索班级",onChange:function(e){V(B.filter((function(n){return n.name.indexOf(e.target.value)>-1})))}}),(0,k.jsx)("div",{className:w.tableWrapper,children:(0,k.jsx)(f.Z,{style:{marginTop:"10px",height:"260px",overflow:"auto"},className:w.antdTable,rowSelection:{type:"checkbox",onChange:function(e){q(e)}},rowKey:"id",pagination:!1,dataSource:K,loading:H,columns:[{title:"班级",dataIndex:"name",ellipsis:!0},{title:"发布时间",dataIndex:"publish_time"},{title:"截止时间",dataIndex:"end_time"}]})})]}),(0,k.jsxs)(v.Z,{flex:10,style:{maxWidth:"280px"},children:[(0,k.jsx)("div",{className:w.homeworkType,children:"补交截止"}),(0,k.jsx)(p.Z,{placeholder:"搜索班级",onChange:function(e){le(ne.filter((function(n){return n.name.indexOf(e.target.value)>-1})))}}),(0,k.jsx)("div",{className:w.tableWrapper,children:(0,k.jsx)(f.Z,{style:{marginTop:"10px",height:"260px",overflow:"auto",maxWidth:"280px"},className:w.antdTable,rowSelection:{type:"checkbox",onChange:function(e){ue(e)}},rowKey:"id",pagination:!1,loading:H,dataSource:ae,columns:[{title:"班级",dataIndex:"name",ellipsis:!0,width:120},{title:"截止时间",dataIndex:"late_time"}]})})]})]})})]})}))},57701:function(e,n,t){var i=t(82242),s=t.n(i),a=t(91232),l=t.n(a),r=t(7557),c=t.n(r),o=t(41498),u=t.n(o),d=t(79800),m=t.n(d),h=t(59301),p=t(8591),f=t(43418),x=t(3113),v=t(86129),j=t.n(v),g=t(97730),_=t(23756),b=t(23634),w=t(37712),Z=function(e,n){var t=e.files,i=void 0===t?[]:t,a=e.name,r=e.buttonProps,o=void 0===r?{}:r,d=e.hide,v=e.onOk,Z=void 0===v?function(){}:v,y=(0,h.useState)(!1),k=m()(y,2),N=k[0],C=k[1],A=(0,h.useRef)(new(j()));(0,h.useImperativeHandle)(n,(function(){return{exportReport:S,exportAndCreateUserFolder:T}}));var S=function(){var e=u()(c()().mark((function e(n){var t,s,a,l,r,o,d,m,h=arguments;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:m=function(){return m=u()(c()().mark((function e(){var n,t;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:E({},"".concat(g.Z.API_SERVER,"/api/attachments/").concat((0,_.Jn)(null==s||null===(n=s[a])||void 0===n?void 0:n.id),"?t=").concat((0,_.Jn)(null==s||null===(t=s[a])||void 0===t?void 0:t.id,Date.now())),function(){var e=u()(c()().mark((function e(n,t){var i,m,h,f,x;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("application/json"!==(null===(i=n.target.response)||void 0===i?void 0:i.type)){e.next=8;break}return e.next=3,H(n.target.response);case 3:if(!(h=e.sent).message){e.next=8;break}return p.ZP.warning((null==h?void 0:h.message)||"下载出错, 请联系管理员"),C(!1),e.abrupt("return");case 8:f=new Blob([n.target.response],{type:"application/vnd.ms-excel;charset=utf-8"}),l+=f.size,x=null==s||null===(m=s[a])||void 0===m?void 0:m.filename,setTimeout(u()(c()().mark((function e(){return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:A.current.file(x,f),o.update({content:(0,w.jsxs)("div",{children:["当前进度: ",(0,w.jsx)("span",{className:"c-blue",children:a+1}),"/",null==s?void 0:s.length,r>0?(0,w.jsxs)("span",{children:["(已拆分",r,"个zip包)"]}):""]})}),a===(null==s?void 0:s.length)-1?O(o,r>0?r+1:0):l>943718400?(r++,l=0,I(r,(function(){a++,d()}))):(a++,d());case 3:case"end":return e.stop()}}),e)}))),2600);case 12:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}());case 1:case"end":return e.stop()}}),e)}))),m.apply(this,arguments)},d=function(){return m.apply(this,arguments)},t=h.length>1&&void 0!==h[1]?h[1]:"附件",s=n||i,C(!0),a=0,l=0,r=0,o=f.Z.info({width:460,title:(0,w.jsxs)("div",{children:["正在导出",t,",",(0,w.jsx)("span",{className:"c-red",children:"请勿关闭或操作当前浏览器窗口"})]}),content:(0,w.jsxs)("div",{children:["当前进度: ",(0,w.jsx)("span",{className:"c-blue",children:a+1}),"/",null==s?void 0:s.length]}),maskClosable:!1,okText:"我知道了",onOk:function(){}}),d();case 10:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),T=function(){var e=u()(c()().mark((function e(n){var t,i,s,r,o,d,m,h,p,x,v,_,y,k,N,S,T,H=arguments;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:m=function(){return(m=u()(c()().mark((function e(n,t){var i,a,l;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,b.ZP)("".concat(g.Z.API_SERVER,"/api/attachments/").concat(n.id),{method:"get"});case 2:i=e.sent,a=new Blob([i],{type:"application/vnd.ms-excel;charset=utf-8"}),l=n.filename,t.file(l,a),s+=1,o.update({content:(0,w.jsxs)("div",{children:["当前进度: ",(0,w.jsx)("span",{className:"c-blue",children:s}),"/",r]})});case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)},d=function(e,n){return m.apply(this,arguments)},t=H.length>1&&void 0!==H[1]?H[1]:"附件",i=H.length>2?H[2]:void 0,C(!0),s=0,r=n.flat().length,o=f.Z.info({width:460,title:(0,w.jsxs)("div",{children:["正在导出",t,",",(0,w.jsx)("span",{className:"c-red",children:"请勿关闭或操作当前浏览器窗口"})]}),content:(0,w.jsxs)("div",{children:["当前进度: ",(0,w.jsx)("span",{className:"c-blue",children:s}),"/",r]}),maskClosable:!1,okText:"我知道了"}),h=l()(n),e.prev=9,h.s();case 11:if((p=h.n()).done){e.next=34;break}x=p.value,v="".concat(x[0].user_name,"-").concat(x[0].student_id),_=A.current.folder(v),y=l()(x),e.prev=16,y.s();case 18:if((k=y.n()).done){e.next=24;break}return N=k.value,e.next=22,d(N,_);case 22:e.next=18;break;case 24:e.next=29;break;case 26:e.prev=26,e.t0=e.catch(16),y.e(e.t0);case 29:return e.prev=29,y.f(),e.finish(29);case 32:e.next=11;break;case 34:e.next=39;break;case 36:e.prev=36,e.t1=e.catch(9),h.e(e.t1);case 39:return e.prev=39,h.f(),e.finish(39);case 42:return e.next=44,A.current.generateAsync({type:"blob"});case 44:S=e.sent,(T=document.createElement("a")).href=window.URL.createObjectURL(S),T.download="".concat(i||a,".zip"),document.body.appendChild(T),T.click(),document.body.removeChild(T),window.URL.revokeObjectURL(T.href),o.destroy(),C(!1),Z(),A.current=new(j());case 56:case"end":return e.stop()}}),e,null,[[9,36,39,42],[16,26,29,32]])})));return function(n){return e.apply(this,arguments)}}();function H(e){return new Promise((function(n){var t=new FileReader;t.readAsText(e,"utf-8"),t.addEventListener("loadend",(function(){var e=JSON.parse(t.result);n(e)}))}))}var E=function(e,n,t,i){var s=n,a=new window.XMLHttpRequest;return a.withCredentials=!0,a.addEventListener("load",(function(e){t(e,a)}),!1),a.addEventListener("error",(function(e){i&&i(e)}),!1),a.responseType="blob",a.open("GET",s),a.send(null),a},I=function(e,n){A.current.generateAsync({type:"blob"}).then((function(t){var i=document.createElement("a");i.href=window.URL.createObjectURL(t),i.download=a+"-".concat(e)+".zip",document.body.appendChild(i);var s=document.createEvent("MouseEvents");s.initEvent("click",!1,!1),i.dispatchEvent(s),document.body.removeChild(i),A.current=new(j()),n()}))},O=function(e,n){A.current.generateAsync({type:"blob"}).then((function(t){var i=document.createElement("a");i.href=window.URL.createObjectURL(t),i.download=n>0?a+"-".concat(n)+".zip":a+".zip",document.body.appendChild(i);var s=document.createEvent("MouseEvents");s.initEvent("click",!1,!1),i.dispatchEvent(s),document.body.removeChild(i),e.destroy(),C(!1),Z(),A.current=new(j())}))};return d?(0,w.jsx)(w.Fragment,{}):(0,w.jsx)(x.ZP,s()(s()({},o),{},{onClick:function(){return S()},loading:N,children:"下载"}))};n.Z=(0,h.forwardRef)(Z)},90588:function(e,n,t){t.d(n,{t:function(){return m}});var i=t(82242),s=t.n(i),a=(t(59301),t(3113)),l="buttonFixed___vyq30",r="button___hxmYv",c="buttonWrap___uK8dl",o=t(92310),u=t.n(o),d=t(37712),m=function(e){var n=e.cancelText,t=void 0===n?"取消":n,i=e.okText,o=void 0===i?"确定":i,m=e.loading,h=void 0!==m&&m,p=e.hasOkBtn,f=void 0===p||p,x=e.hasCancelBtn,v=void 0===x||x,j=e.okButtonProps,g=void 0===j?{}:j,_=e.onCancel,b=void 0===_?function(){}:_,w=e.onOk,Z=void 0===w?function(){}:w,y=e.className,k=void 0===y?"":y;return(0,d.jsx)("div",{className:u()(l,k),children:(0,d.jsxs)("div",{className:c,children:[v&&(0,d.jsx)(a.ZP,{size:"middle",className:"".concat(r," mr20"),onClick:b,children:t}),f&&(0,d.jsx)(a.ZP,s()(s()({size:"middle",type:"primary",className:"".concat(r," mr20"),loading:h,onClick:Z},g),{},{children:o}))]})})}},306:function(e,n,t){var i=t(82242),s=t.n(i),a=t(37205),l=t.n(a),r=t(39647),c=t.n(r),o=t(79800),u=t.n(o),d=t(59301),m=t(78241),h=t(95237),p=t(43604),f=t(57809),x=t(94001),v=t(57930),j=t(92832),g=t(71371),_=t(45532),b=t(3858),w=t(97618),Z=t(37712),y=["key","name"];n.Z=(0,b.connect)((function(e){return{shixunHomeworks:e.shixunHomeworks}}))((function(e){var n=e.disabled,t=e.shixunHomeworks,i=e.selectOptions,a=e.form,r=t.workSetting,o=(0,d.useState)([]),b=u()(o,2),k=b[0],N=b[1],C=(0,d.useMemo)((function(){return null==i?void 0:i.filter((function(e){return!k.includes(e.value)}))}),[k,i]);return(0,d.useEffect)((function(){var e,n=(null==r||null===(e=r.anonymous_appeal_settings)||void 0===e?void 0:e.filter((function(e){return e.appeal_time})))||[];N(n.map((function(e){return e.group_name})))}),[r]),(0,Z.jsx)(m.Z.List,{name:"anonymous_appeal_settings",children:function(e,t){var i=t.add,o=t.remove;return(0,Z.jsx)(Z.Fragment,{children:e.map((function(t){var u,d=t.key,b=t.name,k=c()(t,y),A=a.getFieldValue(["anonymous_appeal_settings",b]).deleteflag;return(0,Z.jsx)("div",{children:(0,Z.jsxs)(h.Z,{align:"middle",style:{marginLeft:30,marginBottom:30},children:[(0,Z.jsxs)(p.Z,{children:["申诉规则",d+1,""]}),(0,Z.jsx)(p.Z,{span:8,children:(0,Z.jsx)(m.Z.Item,s()(s()({},k),{},{name:[t.name,"group_name"],children:(0,Z.jsx)(f.default,{mode:"multiple",disabled:n||!A,placeholder:"请选择分班名称",options:C||[],onSelect:function(e){N((function(n){return[].concat(l()(n),[e])}))},onDeselect:function(e){N((function(n){return n.filter((function(n){return n!==e}))}))}})}))}),(0,Z.jsx)(p.Z,{className:"ml20",children:(0,Z.jsx)(m.Z.Item,s()(s()({},k),{},{label:"违规匿评扣分",name:[t.name,"appeal_penalty"],children:(0,Z.jsx)(x.Z,{min:0,disabled:n})}))}),(0,Z.jsx)(p.Z,{className:"ml20",children:(0,Z.jsx)(m.Z.Item,s()(s()({},k),{},{label:"结束时间",name:[t.name,"appeal_time"],children:(0,Z.jsx)(v.default,{allowClear:!1,style:{width:170},placeholder:"请选择结束时间",disabled:n,disabledDate:function(e){return(0,w.Q8)(e,null==r?void 0:r.course_end_date)},disabledTime:function(e){return(0,w.d0)(e)},showTime:{format:"HH:mm"},format:"YYYY-MM-DD HH:mm"})}))}),(0,Z.jsx)(m.Z.Item,s()(s()({},k),{},{name:[b,"deleteflag"],children:(0,Z.jsx)(j.Z,{type:"hidden"})})),0!==d&&!n&&A&&(0,Z.jsx)(g.Z,{className:"ml20",onClick:function(){var e=a.getFieldValue(["anonymous_appeal_settings",b,"group_name"])||[];N((function(n){return n.filter((function(n){return!e.includes(n)}))})),o(b)}}),!n&&e.length<(null==r||null===(u=r.anonymous_appeal_settings)||void 0===u?void 0:u.length)&&(0,Z.jsx)(_.Z,{className:"c-green ml20",onClick:function(){i({deleteflag:!0})}})]})},d)}))})}})}))},53536:function(e,n,t){var i=t(82242),s=t.n(i),a=t(37205),l=t.n(a),r=t(39647),c=t.n(r),o=t(79800),u=t.n(o),d=t(59301),m=t(57930),h=t(78241),p=t(95237),f=t(43604),x=t(57809),v=t(8591),j=t(92832),g=t(94001),_=t(24905),b=t(71371),w=t(45532),Z=t(61186),y=t.n(Z),k=t(3858),N=t(97618),C=t(74505),A=t(37712),S=["key","name"],T=m.default.RangePicker;n.Z=(0,k.connect)((function(e){return{shixunHomeworks:e.shixunHomeworks,classroomList:e.classroomList}}))((function(e){var n=e.disabled,t=e.shixunHomeworks,i=e.selectOptions,a=e.form,r=e.data,o=e.classroomList,m=t.workSetting,Z=(0,d.useState)([]),k=u()(Z,2),H=k[0],E=k[1],I=(0,d.useMemo)((function(){return null==i?void 0:i.filter((function(e){return!H.includes(e.value)}))}),[H,i]);(0,d.useEffect)((function(){var e,n=(null==m||null===(e=m.anonymous_comment_settings)||void 0===e?void 0:e.filter((function(e){return e.evaluation_end})))||[];E(n.map((function(e){return e.group_name})))}),[m]);return(0,A.jsx)(h.Z.List,{name:"anonymous_comment_settings",children:function(e,t){var i=t.add,u=t.remove;return(0,A.jsx)(A.Fragment,{children:e.map((function(t){var d,Z,k,H,O,Y=t.key,D=t.name,L=c()(t,S),M=a.getFieldValue(["anonymous_comment_settings",D]),R=M.deleteflag,F=y()(null===(d=M.evaluation_start)||void 0===d?void 0:d[0])<=y()(),P=!R&&F?[!0,(k=null==M?void 0:M.group_id,O=null==m||null===(H=m.anonymous_appeal_settings)||void 0===H?void 0:H.find((function(e){return e.group_id===k})),r.anonymous_appeal&&O&&null!==(null==O?void 0:O.appeal_time))]:[!1,!1];return(0,A.jsx)("div",{children:(0,A.jsxs)(p.Z,{align:"top",style:{marginLeft:30,marginBottom:30},children:[(0,A.jsxs)(f.Z,{children:["匿评规则",Y+1,""]}),(0,A.jsxs)(f.Z,{flex:1,children:[(0,A.jsxs)(p.Z,{align:"middle",style:{marginBottom:16},children:[(0,A.jsx)(f.Z,{span:8,children:(0,A.jsx)(h.Z.Item,s()(s()({},L),{},{name:[D,"group_name"],children:(0,A.jsx)(x.default,{mode:"multiple",disabled:n||!R,placeholder:"请选择分班名称",options:I||[],onSelect:function(e){E((function(n){return[].concat(l()(n),[e])}))},onDeselect:function(e){E((function(n){return n.filter((function(n){return n!==e}))}))}})}))}),(0,A.jsx)(f.Z,{className:"ml20",children:(0,A.jsx)(h.Z.Item,s()(s()({},L),{},{name:[D,"evaluation_start"],children:(0,A.jsx)(T,{ranges:{"此刻":function(){var e,n=null==M||null===(e=M.evaluation_start)||void 0===e?void 0:e[0];return[n?y()(n):y()(),y()()]}},disabled:n||P,allowClear:!1,disabledDate:function(e){return(0,N.Q8)(e,null==m?void 0:m.course_end_date)},disabledTime:function(e){return(0,N.d0)(e)},showTime:{format:"HH:mm"},format:"YYYY-MM-DD HH:mm",onChange:function(){var e;!(0,C.Rm)()||null!==(e=o.AssistantObject.group)&&void 0!==e&&e.can_anonymous_comment||v.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能")}})}))}),(0,A.jsx)(h.Z.Item,s()(s()({},L),{},{name:[D,"deleteflag"],children:(0,A.jsx)(j.Z,{type:"hidden"})})),0!==Y&&!n&&R&&(0,A.jsx)(b.Z,{className:"ml20",onClick:function(){var e=a.getFieldValue(["anonymous_comment_settings",D,"group_name"])||[];E((function(n){return n.filter((function(n){return!e.includes(n)}))})),u(D)}}),!n&&e.length<(null==m||null===(Z=m.anonymous_comment_settings)||void 0===Z?void 0:Z.length)&&(0,A.jsx)(w.Z,{className:"c-green ml20",onClick:function(){i({deleteflag:!0})}})]}),(0,A.jsxs)(p.Z,{align:"middle",children:[(0,A.jsx)(f.Z,{span:4,children:(0,A.jsx)(h.Z.Item,s()(s()({},L),{},{label:"匿评数量",name:[D,"evaluation_num"],children:(0,A.jsx)(g.Z,{min:0,disabled:n||!R&&F})}))}),(0,A.jsx)(f.Z,{span:4,children:(0,A.jsx)(h.Z.Item,s()(s()({},L),{},{label:"缺评扣分",name:[D,"absence_penalty"],children:(0,A.jsx)(g.Z,{min:0,disabled:n,onChange:function(e){var n;!(0,C.Rm)()||null!==(n=o.AssistantObject.group)&&void 0!==n&&n.can_anonymous_comment||v.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能")}})}))}),(0,A.jsx)(f.Z,{className:"ml20",children:(0,A.jsx)(h.Z.Item,s()(s()({},L),{},{name:[D,"student_comment"],valuePropName:"checked",children:(0,A.jsx)(_.Z,{disabled:n,onChange:function(){var e;!(0,C.Rm)()||null!==(e=o.AssistantObject.group)&&void 0!==e&&e.can_anonymous_comment||v.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能")}})}))}),(0,A.jsx)(f.Z,{className:"ml10",children:"匿评计入已评阅"})]})]})]})},Y)}))})}})}))},73097:function(e,n,t){t(59301);var i=t(3858),s=t(95237),a=t(43604),l=t(57930),r=t(94001),c=t(61186),o=t.n(c),u=t(97618),d=t(37712);n.Z=(0,i.connect)((function(e){return{shixunHomeworks:e.shixunHomeworks}}))((function(e){var n=e.data,t=e.disabled,i=e.setData,c=e.shixunHomeworks,m=c.workSetting;c.workList;return(0,d.jsxs)("div",{children:[(0,d.jsxs)(s.Z,{align:"middle",className:"mt25 pl70",children:[(0,d.jsx)(a.Z,{children:"结束时间:"}),(0,d.jsx)(a.Z,{className:"ml5",children:(0,d.jsx)(l.default,{allowClear:!1,style:{width:170},placeholder:"请选择结束时间",showTime:{format:"HH:mm"},format:"YYYY-MM-DD HH:mm",disabled:t,disabledDate:function(e){return(0,u.Q8)(e,null==m?void 0:m.course_end_date)},disabledTime:function(e){return(0,u.d0)(e)},value:n.appeal_time?o()(n.appeal_time):"",onChange:function(e,t){n.appeal_time=t,i(Object.assign({},n))}})}),(0,d.jsx)(a.Z,{children:(0,d.jsx)("span",{className:"c-grey-c ml10",children:"(学生匿评TA人作品的时间截点)"})})]}),(0,d.jsxs)(s.Z,{align:"middle",className:"mt25 pl70",children:[(0,d.jsx)(a.Z,{children:"违规匿评扣分:"}),(0,d.jsx)(a.Z,{className:"ml5",children:(0,d.jsx)(r.Z,{disabled:t,value:n.appeal_penalty,min:0,onChange:function(e){n.appeal_penalty=e,i(Object.assign({},n))}})}),(0,d.jsx)(a.Z,{flex:"1",className:"ml5",children:(0,d.jsx)("span",{className:"c-grey-c ml10",children:"(学生违规匿评TA人作品时其成绩将被扣减的分值)"})})]})]})}))},37018:function(e,n,t){t(59301);var i=t(95237),s=t(43604),a=t(57930),l=t(94001),r=t(24905),c=t(61186),o=t.n(c),u=t(3858),d=t(97618),m=t(37712);n.Z=(0,u.connect)((function(e){return{shixunHomeworks:e.shixunHomeworks}}))((function(e){var n=e.data,t=e.setData,c=e.disabled,u=e.shixunHomeworks.workSetting,h=o()(null==u?void 0:u.evaluation_start)<=o()(),p=n.anonymous_appeal;return(0,m.jsxs)("div",{children:[(0,m.jsxs)(i.Z,{align:"middle",className:"pl30",children:[(0,m.jsx)(s.Z,{children:"开始时间:"}),(0,m.jsx)(s.Z,{className:"ml5",children:(0,m.jsx)(a.default,{allowClear:!1,style:{width:170},placeholder:"请选择开始时间",showTime:{format:"HH:mm"},format:"YYYY-MM-DD HH:mm",disabledDate:function(e){return(0,d.Q8)(e,null==u?void 0:u.course_end_date)},disabledTime:function(e){return(0,d.d0)(e)},disabled:c||h||p,value:n.evaluation_start?o()(n.evaluation_start):"",onChange:function(e,i){n.evaluation_start=i,t(Object.assign({},n))}})}),(0,m.jsx)(s.Z,{children:(0,m.jsx)("span",{className:"c-grey-c ml10",children:"(匿评开始时间之前提交作品的学生,参与匿评)"})})]}),(0,m.jsxs)(i.Z,{align:"middle",className:"mt25 pl30",children:[(0,m.jsx)(s.Z,{children:"结束时间:"}),(0,m.jsx)(s.Z,{className:"ml5",children:(0,m.jsx)(a.default,{allowClear:!1,style:{width:170},placeholder:"请选择结束时间",showTime:{format:"HH:mm"},format:"YYYY-MM-DD HH:mm",disabledDate:function(e){return(0,d.Q8)(e,null==u?void 0:u.course_end_date,n.evaluation_start)},disabledTime:function(e){return(0,d.d0)(e,o()(n.evaluation_start))},disabled:c||p,value:n.evaluation_end?o()(n.evaluation_end):"",onChange:function(e,i){n.evaluation_end=i,t(Object.assign({},n))}})}),(0,m.jsx)(s.Z,{children:(0,m.jsx)("span",{className:"c-grey-c ml10",children:"(学生匿评TA人作品的时间截点)"})})]}),(0,m.jsxs)(i.Z,{align:"middle",className:"mt25 pl30",children:[(0,m.jsx)(s.Z,{children:"匿评数量:"}),(0,m.jsx)(s.Z,{className:"ml5",children:(0,m.jsx)(l.Z,{disabled:c||h||p,value:n.evaluation_num,min:0,onChange:function(e){n.evaluation_num=e,t(Object.assign({},n))}})}),(0,m.jsx)(s.Z,{flex:"1",className:"ml5",children:(0,m.jsx)("span",{className:"c-grey-c ml10",children:"(本处填写每个学生将被分配的匿评作品数量。如全班实际提交作业数量小于本数值,则以实际提交作业数量为准。)"})})]}),(0,m.jsxs)(i.Z,{align:"middle",className:"mt25 pl30",children:[(0,m.jsx)(s.Z,{children:"缺评扣分:"}),(0,m.jsx)(s.Z,{className:"ml5",children:(0,m.jsx)(l.Z,{min:0,disabled:c,value:n.absence_penalty,onChange:function(e){n.absence_penalty=e,t(Object.assign({},n))}})}),(0,m.jsxs)(s.Z,{flex:"1",className:"ml5",children:["分",(0,m.jsx)("span",{className:"c-grey-c ml10",children:"(学生缺评时,其成绩将被扣减的分值)"})]})]}),n.anonymous_comment&&(0,m.jsx)(m.Fragment,{children:(0,m.jsx)(i.Z,{children:(0,m.jsxs)(s.Z,{span:24,className:"mt15 pl30",children:[(0,m.jsx)(r.Z,{checked:n.student_comment,disabled:c,onChange:function(){n.student_comment=!n.student_comment,t(Object.assign({},n))},children:(0,m.jsx)("strong",{children:"匿评计入已评阅"})}),(0,m.jsx)("span",{className:"c-grey-c font12",children:"(学生相互匿评的数据,在作品列表中计入已评阅)"})]})})})]})}))},20805:function(e,n,t){t.d(n,{Z:function(){return g}});var i=t(7557),s=t.n(i),a=t(41498),l=t.n(a),r=t(79800),c=t.n(r),o=t(59301),u=t(92832),d=t(24905),m=t(95237),h="leftdiv___aBzsX",p="listClass___bxIEW",f="spantitle___v_Vc4",x="rightdiv___xWu4M",v=t(72721),j=t(37712),g=function(e){var n=e.data,t=(e.value,e.handleChangePage,e.setSelectedRowKeys),i=e.selectedRowKeys,a=(e.onChange,(0,o.useState)([])),r=c()(a,2),g=r[0],_=r[1],b=(0,o.useState)([]),w=c()(b,2),Z=w[0],y=w[1],k=(0,o.useState)([]),N=c()(k,2),C=N[0],A=N[1],S=(0,o.useState)(1),T=c()(S,2),H=(T[0],T[1],(0,o.useState)()),E=c()(H,2);E[0],E[1];return(0,o.useEffect)((function(){_(n),y([]),A([])}),[n]),(0,o.useEffect)((function(){t&&(y(i),A(i))}),[i]),(0,j.jsxs)("div",{style:{display:"flex",justifyContent:"space-between"},children:[(0,j.jsxs)("div",{className:h,children:[(0,j.jsx)(u.Z.Search,{size:"middle",onChange:function(){var e=l()(s()().mark((function e(t){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:_(n.filter((function(e){var n;return null==e||null===(n=e.name)||void 0===n?void 0:n.includes(t.target.value)})));case 1:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),placeholder:"可输入班级名称查询"}),0===g.length&&(0,j.jsx)(v.Z,{styles:{margin:"70px auto"},customText:"暂无分班"}),(0,j.jsx)("div",{style:{height:"85%",overflow:"auto",overflowX:"hidden"},children:(0,j.jsx)(d.Z.Group,{value:Z.map((function(e){return"".concat(e.id)})),onChange:function(e){t(g.filter((function(n){return e.includes("".concat(n.id))})))},style:{marginTop:"10px",flexDirection:"column"},children:g.map((function(e,n){return(0,j.jsx)(m.Z,{style:{marginTop:"10px",lineHeight:"24px",display:"flex",width:200},children:(0,j.jsx)(d.Z,{style:{display:"flex",height:"24px",alignItems:"center"},disabled:e.is_published,value:"".concat(e.id),children:(0,j.jsxs)("div",{className:p,children:[(0,j.jsx)("span",{className:f,style:{width:e.is_published?"108px":"170px"},children:e.name}),e.is_published&&(0,j.jsx)("span",{style:{width:"52px",height:"24px",background:"#B8B8B8",borderRadius:"13px",color:"white",lineHeight:"24px",textAlign:"center",display:"inline-block"},children:"已发布"})]})})},e.id)}))})})]}),(0,j.jsxs)("div",{className:x,children:[(0,j.jsx)(u.Z.Search,{onChange:function(e){A(Z.filter((function(n){return n.name.includes(e.target.value)})))},size:"middle",placeholder:"可输入班级名称查询"}),0===C.length&&(0,j.jsx)(v.Z,{styles:{margin:"70px auto"},customText:"暂未选择分班"}),C.length>0&&(0,j.jsx)("div",{style:{marginTop:"10px",height:"85%",overflow:"hidden",position:"relative"},children:(0,j.jsx)("div",{style:{overflowX:"hidden",overflowY:"scroll",position:"absolute",left:0,top:0,right:-17,bottom:0},children:C.map((function(e,n){return(0,j.jsxs)(m.Z,{justify:"space-between",style:{marginTop:"10px"},children:[(0,j.jsx)("div",{style:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",marginRight:"5px",marginLeft:"5px",width:"75%"},children:e.name}),(0,j.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(){t(Z.filter((function(n){return"".concat(n.id)!="".concat(e.id)})))}})]},e.id)}))})})]})]})}},38698:function(e,n,t){t.d(n,{Ei:function(){return j},rU:function(){return g},ZP:function(){return _}});var i=t(82242),s=t.n(i),a=t(79800),l=t.n(a),r=t(59301),c={wrap:"wrap___W3YuU",title:"title___OzKge",exhibition:"exhibition___ugphm"},o=t(78241),u=t(95237),d=t(43604),m=t(24905),h=t(94001),p=t(6848),f=t(92310),x=t.n(f),v=t(37712),j=function(e){var n=e.value,t=e.className,i=e.style,s=(0,r.useState)("0"),a=l()(s,2),o=a[0],u=a[1];(0,r.useEffect)((function(){if(n){var e=n.submit_limit,t=n.must_file;if(e&&t)return void u("1");if(e&&!t)return void u("2");if(!e&&t)return void u("3")}}),[n]);var d={1:(0,v.jsxs)("span",{children:["作业内容至少填写",(0,v.jsx)("span",{className:"ml5 mr5 c-light-primary",children:null==n?void 0:n.submit_limit_num}),"字符,并且必须上传相关附件。"]}),2:(0,v.jsxs)("span",{children:["作业内容至少填写",(0,v.jsx)("span",{className:"ml5 mr5 c-light-primary",children:null==n?void 0:n.submit_limit_num}),"字符"]}),3:(0,v.jsx)("span",{children:"必须上传相关附件。"})};return"0"===o?(0,v.jsx)(v.Fragment,{}):(0,v.jsxs)("section",{className:x()(c.exhibition,t),style:i,children:[(0,v.jsx)("span",{className:"c-grey-666 mr10",children:"提交作业要求:"}),null==d?void 0:d[o]]})},g=function(e){var n=e.className,t=e.style,i=e.form,s=o.Z.useWatch("submit_limit",i),a=o.Z.useWatch("can_submit",i);return(0,v.jsx)("section",{className:x()(c.newWrap,n),style:t,children:(0,v.jsxs)("div",{style:{padding:"20px 0",borderBottom:"1px solid #EDEDED"},children:[(0,v.jsx)("h1",{children:"提交设置"}),(0,v.jsxs)(u.Z,{wrap:!1,align:"middle",gutter:10,className:"mt20",children:[(0,v.jsx)(d.Z,{children:(0,v.jsx)(o.Z.Item,{name:"can_submit",valuePropName:"checked",children:(0,v.jsx)(m.Z,{children:(0,v.jsx)("span",{className:"font16",children:"限制学生提交作品"})})})}),(0,v.jsx)(d.Z,{children:(0,v.jsx)(o.Z.Item,{name:"submit_num",rules:a&&[{required:!0,message:"请填写作品次数"}],children:(0,v.jsx)(h.Z,{precision:0,min:1,disabled:!a})})}),(0,v.jsx)(d.Z,{children:"次"}),(0,v.jsxs)(d.Z,{children:[" ",(0,v.jsx)(p.Z,{overlayInnerStyle:{width:520},title:(0,v.jsxs)("div",{children:["1、若未开启该限制学生可以无限次提交作品",(0,v.jsx)("br",{}),"2、若作业在补交阶段已用完提交次数的学生将获得一次额外的提交作品机会",(0,v.jsx)("br",{}),"3、若学生需要超出规定次数提交作品教师可使用“打回重做”功能让该学生重新提交一次。"]}),children:(0,v.jsx)("i",{className:"iconfont icon-tishixiaowenhao font14 c-grey-999"})})]})]}),(0,v.jsxs)(u.Z,{wrap:!1,align:"middle",gutter:10,className:"mt20",children:[(0,v.jsx)(d.Z,{children:(0,v.jsx)(o.Z.Item,{name:"submit_limit",valuePropName:"checked",children:(0,v.jsx)(m.Z,{children:(0,v.jsx)("span",{className:"font16",children:"学生填写内容至少"})})})}),(0,v.jsx)(d.Z,{children:(0,v.jsx)(o.Z.Item,{name:"submit_limit_num",rules:s&&[{required:!0,message:"字数不能为空"}],children:(0,v.jsx)(h.Z,{precision:0,min:1,disabled:!s})})}),(0,v.jsx)(d.Z,{children:"字"})]}),(0,v.jsx)(u.Z,{wrap:!1,align:"middle",gutter:10,className:"mt20",children:(0,v.jsx)(d.Z,{children:(0,v.jsx)(o.Z.Item,{name:"must_file",valuePropName:"checked",children:(0,v.jsx)(m.Z,{children:(0,v.jsx)("span",{className:"font16",children:"学生提交作业必须上传附件"})})})})})]})})},_=function(e){var n=e.value,t=e.onChange,i=e.className,a=e.style,o=e.disabled,d=void 0!==o&&o,f=(0,r.useState)({}),j=l()(f,2),g=j[0],_=j[1];(0,r.useEffect)((function(){if(console.log(n,"value"),n){var e={submit_limit:null==n?void 0:n.submit_limit,submit_limit_num:null==n?void 0:n.submit_limit_num,must_file:null==n?void 0:n.must_file,can_submit:null==n?void 0:n.can_submit,submit_num:null==n?void 0:n.submit_num};_(s()({},e))}}),[n]);var b=function(e){var n=s()(s()({},g),e);t(n)};return(0,v.jsxs)("section",{className:x()(c.wrap,i),style:a,children:[(0,v.jsx)("div",{className:c.title,children:"提交设置"}),(0,v.jsxs)(u.Z,{align:"middle",className:"mb20",children:[(0,v.jsx)(m.Z,{disabled:d,checked:null==g?void 0:g.can_submit,onChange:function(e){return b({can_submit:e.target.checked})}}),(0,v.jsx)("span",{className:"ml10 mr10",children:"限制学生提交作业"}),(0,v.jsx)(h.Z,{precision:0,min:1,disabled:d||!(null!=g&&g.can_submit),value:null==g?void 0:g.submit_num,onChange:function(e){return b({submit_num:e})}}),(0,v.jsx)("span",{className:"ml5",children:"次"}),(0,v.jsx)(p.Z,{overlayInnerStyle:{width:520},title:(0,v.jsxs)("div",{children:["1、若未开启该限制学生可以无限次提交作品",(0,v.jsx)("br",{}),"2、若作业在补交阶段已用完提交次数的学生将获得一次额外的提交作品机会",(0,v.jsx)("br",{}),"3、若学生需要超出规定次数提交作品教师可使用“打回重做”功能让该学生重新提交一次。"]}),children:(0,v.jsx)("i",{className:"iconfont icon-tishixiaowenhao font14 c-grey-999 ml5"})})]}),(0,v.jsxs)(u.Z,{align:"middle",className:"mb20",children:[(0,v.jsx)(m.Z,{disabled:d,checked:null==g?void 0:g.submit_limit,onChange:function(e){return b({submit_limit:e.target.checked})}}),(0,v.jsx)("span",{className:"ml10 mr10",children:"学生填写内容至少"}),(0,v.jsx)(h.Z,{precision:0,min:1,disabled:d||!(null!=g&&g.submit_limit),value:null==g?void 0:g.submit_limit_num,onChange:function(e){return b({submit_limit_num:e})}}),(0,v.jsx)("span",{className:"ml5",children:"字"})]}),(0,v.jsxs)(u.Z,{align:"middle",children:[(0,v.jsx)(m.Z,{disabled:d,checked:null==g?void 0:g.must_file,onChange:function(e){return b({must_file:e.target.checked})}}),(0,v.jsx)("span",{className:"ml10",children:"学生提交作业必须上传附件"})]})]})}},68765:function(e,n,t){t.d(n,{M:function(){return r},Y:function(){return l}});var i=t(61186),s=t.n(i),a=t(89392),l=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"YYYY-MM-DD",t=(0,a.cloneDeepWith)(e,(function(e){if(e instanceof s())return e.format(n)}));return t},r=function e(n,t,i){var a=function(e){return"[object Object]"===Reflect.toString.call(e)};if(!a(n)&&!Array.isArray(n))return n;for(var l=0,r=Object.keys(n);l<r.length;l++){var c=r[l];Array.isArray(n[c])?n[c]=n[c].map((function(n){return e(n,t,i)})):a(n[c])?n[c]=e(n[c],t,i):t.includes(c)&&"string"==typeof n[c]&&(n[c]=i?s()(n[c],i):s()(n[c]))}return n}}}]);