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/1275.30e63ee1.async.js

1 line
43 KiB

This file contains ambiguous Unicode characters!

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

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1275],{95197:function(e,n,t){function i(e){var n=!0;if(e.length>0){for(var t=0;t<e.length;t++)if(0==e[t].compile_success||!e[t].compile_success){n=!1;break}}else n=!1;return n}function a(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",t=[],i=0;i<e.length;i++){var a=e[i],r=n?"".concat(n,"/").concat(a.name):"".concat(a.name);t.push({title:a.name,type:a.type,isLeaf:"tree"!==a.type,key:r})}return t}function r(e,n,t){for(var i=0;i<e.length;i++){var a=e[i];if(a.key===n){a.children=t;break}a.children&&r(a.children,n,t)}return e}function s(e,n,t){var i;return function(){var a=this,r=arguments,s=function(){i=null,t||e.apply(a,r)},l=t&&!i;clearTimeout(i),i=setTimeout(s,n),l&&e.apply(a,r)}}t.d(n,{Ax:function(){return r},Ds:function(){return s},KI:function(){return l},SI:function(){return a},f1:function(){return i}});var l=t(22805).Z.API_SERVER},42944:function(e,n,t){t.d(n,{Z:function(){return C}});var i=t(7557),a=t.n(i),r=t(41498),s=t.n(r),l=t(79800),o=t.n(l),c=t(59301),d=t(78241),u=t(8591),m=t(43418),p=t(78550),h=t(92832),x=t(2595),f=t(95237),_=t(43604),g=t(61186),v=t.n(g),j=t(69824),y=t(87381),b={tips:"tips___e8J4O",homeworkType:"homeworkType___ZjN2X",antdTable:"antdTable___amDdp",modalWrapper:"modalWrapper___XPojI"},w=t(23779),Z=t(737),k=t(37712),C=(0,y.connect)((function(e){return{shixunHomeworks:e.shixunHomeworks,classroomList:e.classroomList}}))((function(e){var n=e.dispatch,t=e.courseEndTime,i=(e.classroomList,e.successCallback),r=void 0===i?function(){}:i,l=e.visible,g=e.homeworkIds,y=e.courseId,C=e.isBatch,S=(e.shixunHomeworks,d.Z.useForm()),N=o()(S,1)[0],A=(0,c.useState)(!1),I=o()(A,2),H=I[0],F=I[1],L=(0,c.useState)(!1),T=o()(L,2),E=T[0],R=T[1],O=(0,c.useState)(!1),Y=o()(O,2),D=Y[0],z=Y[1],P=(0,c.useState)([]),M=o()(P,2),W=M[0],Q=M[1],B=(0,c.useState)([]),U=o()(B,2),V=U[0],K=U[1],X=(0,c.useState)([]),J=o()(X,2),G=J[0],q=J[1],$=(0,c.useState)([]),ee=o()($,2),ne=ee[0],te=ee[1],ie=(0,c.useState)([]),ae=o()(ie,2),re=ae[0],se=ae[1],le=(0,c.useState)([]),oe=o()(le,2),ce=oe[0],de=oe[1],ue=(0,c.useState)([]),me=o()(ue,2),pe=me[0],he=me[1],xe=(0,c.useState)([]),fe=o()(xe,2),_e=fe[0],ge=fe[1],ve=(0,c.useState)([]),je=o()(ve,2),ye=je[0],be=je[1];(0,c.useEffect)((function(){l?we():ke()}),[l]);var we=function(){var e=s()(a()().mark((function e(){var n;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return F(!0),e.next=3,(0,w.oR)(g[0],{course_id:y});case 3:n=e.sent,z(n.no_group),C?(he(n.all_course_groups),ge(n.all_course_groups)):(te(n.late_course_groups),se(n.late_course_groups),Q(n.submit_course_groups),K(n.submit_course_groups)),F(!1),N.setFieldsValue({end_time:v()()});case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Ze=function(){var e=s()(a()().mark((function e(){var t,i,s;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=N.getFieldsValue(),i=v()(t.end_time).format("YYYY-MM-DD HH:mm"),!(C?0===ye.length:0===G.length&&0===ce.length)||D){e.next=6;break}return u.ZP.warning("请选择需要操作的班级"),e.abrupt("return");case 6:return R(!0),e.next=9,(0,w.Mc)(y,{no_group:D,homework_ids:g,group_ids:C?ye:G,end_time:i,late_group_ids:C?ye:ce});case 9:s=e.sent,R(!1),0===s.status&&(ke(),u.ZP.success("操作成功"),r(),n({type:"classroomList/setActionTabs",payload:{key:"清除选择数据"}}));case 12:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ke=function(){q([]),de([]),K([]),se([])};return(0,k.jsxs)(m.Z,{centered:!0,title:"立即截止",className:b.modalWrapper,width:C||D?520:760,open:l,confirmLoading:E,destroyOnClose:!0,okText:"截止",cancelText:"取消",onOk:function(){return Ze()},onCancel:function(){ke(),n({type:"classroomList/setActionTabs",payload:{}})},children:[(0,k.jsxs)("div",{className:b.tips,children:[(0,k.jsx)("div",{children:"1、截止后学生不能再提交作业。"}),(0,k.jsx)("div",{children:"2、本操作只对“提交中”、“补交中”的作业有效。"})]}),(0,k.jsx)(d.Z,{form:N,layout:"vertical",children:(0,k.jsx)(d.Z.Item,{name:"end_time",label:"截止时间",children:(0,k.jsx)(p.default,{style:{width:"100%"},disabledDate:function(e){return(0,Z.Q8)(e,t)},disabledTime:function(e){return(0,Z.d0)(e)},placeholder:"请选择结束时间",showTime:{format:"HH:mm",defaultValue:v()((0,j.U6)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",allowClear:!1})})}),!D&&(0,k.jsx)(k.Fragment,{children:C?(0,k.jsxs)("div",{children:[(0,k.jsx)(h.Z,{placeholder:"搜索班级",onChange:function(e){ge(pe.filter((function(n){return n.name.indexOf(e.target.value)>-1})))}}),(0,k.jsx)(x.Z,{style:{marginTop:"10px",height:"300px",overflow:"auto"},className:b.antdTable,rowSelection:{type:"checkbox",onChange:function(e){be(e)}},rowKey:"id",pagination:!1,dataSource:_e,loading:H,columns:[{title:"班级",dataIndex:"name"}]})]}):(0,k.jsxs)(f.Z,{gutter:24,children:[(0,k.jsxs)(_.Z,{span:14,children:[(0,k.jsx)("div",{className:b.homeworkType,children:"作业截止"}),(0,k.jsx)(h.Z,{placeholder:"搜索班级",onChange:function(e){K(W.filter((function(n){return n.name.indexOf(e.target.value)>-1})))}}),(0,k.jsx)("div",{className:b.tableWrapper,children:(0,k.jsx)(x.Z,{style:{marginTop:"10px",height:"260px",overflow:"auto"},className:b.antdTable,rowSelection:{type:"checkbox",onChange:function(e){q(e)}},rowKey:"id",pagination:!1,dataSource:V,loading:H,columns:[{title:"班级",dataIndex:"name",ellipsis:!0},{title:"发布时间",dataIndex:"publish_time"},{title:"截止时间",dataIndex:"end_time"}]})})]}),(0,k.jsxs)(_.Z,{flex:10,style:{maxWidth:"280px"},children:[(0,k.jsx)("div",{className:b.homeworkType,children:"补交截止"}),(0,k.jsx)(h.Z,{placeholder:"搜索班级",onChange:function(e){se(ne.filter((function(n){return n.name.indexOf(e.target.value)>-1})))}}),(0,k.jsx)("div",{className:b.tableWrapper,children:(0,k.jsx)(x.Z,{style:{marginTop:"10px",height:"260px",overflow:"auto",maxWidth:"280px"},className:b.antdTable,rowSelection:{type:"checkbox",onChange:function(e){de(e)}},rowKey:"id",pagination:!1,loading:H,dataSource:re,columns:[{title:"班级",dataIndex:"name",ellipsis:!0,width:120},{title:"截止时间",dataIndex:"late_time"}]})})]})]})})]})}))},70351:function(e,n,t){var i=t(82242),a=t.n(i),r=t(91232),s=t.n(r),l=t(7557),o=t.n(l),c=t(41498),d=t.n(c),u=t(79800),m=t.n(u),p=t(59301),h=t(8591),x=t(43418),f=t(3113),_=t(86129),g=t.n(_),v=t(22805),j=t(69824),y=t(5219),b=t(37712),w=function(e,n){var t=e.files,i=void 0===t?[]:t,r=e.name,l=e.buttonProps,c=void 0===l?{}:l,u=e.hide,_=e.onOk,w=void 0===_?function(){}:_,Z=(0,p.useState)(!1),k=m()(Z,2),C=k[0],S=k[1],N=(0,p.useRef)(new(g()));(0,p.useImperativeHandle)(n,(function(){return{exportReport:A,exportAndCreateUserFolder:I}}));var A=function(){var e=d()(o()().mark((function e(n){var t,a,r,s,l,c,u,m,p=arguments;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:m=function(){return m=d()(o()().mark((function e(){var n,t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:F({},"".concat(v.Z.API_SERVER,"/api/attachments/").concat((0,j.Jn)(null==a||null===(n=a[r])||void 0===n?void 0:n.id),"?t=").concat((0,j.Jn)(null==a||null===(t=a[r])||void 0===t?void 0:t.id,Date.now())),function(){var e=d()(o()().mark((function e(n,t){var i,m,p,x,f;return o()().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(!(p=e.sent).message){e.next=8;break}return h.ZP.warning((null==p?void 0:p.message)||"下载出错, 请联系管理员"),S(!1),e.abrupt("return");case 8:x=new Blob([n.target.response],{type:"application/vnd.ms-excel;charset=utf-8"}),s+=x.size,f=null==a||null===(m=a[r])||void 0===m?void 0:m.filename,setTimeout(d()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:N.current.file(f,x),c.update({content:(0,b.jsxs)("div",{children:["当前进度: ",(0,b.jsx)("span",{className:"c-blue",children:r+1}),"/",null==a?void 0:a.length,l>0?(0,b.jsxs)("span",{children:["(已拆分",l,"个zip包)"]}):""]})}),r===(null==a?void 0:a.length)-1?T(c,l>0?l+1:0):s>943718400?(l++,s=0,L(l,(function(){r++,u()}))):(r++,u());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)},u=function(){return m.apply(this,arguments)},t=p.length>1&&void 0!==p[1]?p[1]:"附件",a=n||i,S(!0),r=0,s=0,l=0,c=x.Z.info({width:460,title:(0,b.jsxs)("div",{children:["正在导出",t,",",(0,b.jsx)("span",{className:"c-red",children:"请勿关闭或操作当前浏览器窗口"})]}),content:(0,b.jsxs)("div",{children:["当前进度: ",(0,b.jsx)("span",{className:"c-blue",children:r+1}),"/",null==a?void 0:a.length]}),maskClosable:!1,okText:"我知道了",onOk:function(){}}),u();case 10:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),I=function(){var e=d()(o()().mark((function e(n){var t,i,a,l,c,u,m,p,h,f,_,j,Z,k,C,A,I,H=arguments;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:m=function(){return(m=d()(o()().mark((function e(n,t){var i,r,s;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,y.ZP)("".concat(v.Z.API_SERVER,"/api/attachments/").concat(n.id),{method:"get"});case 2:i=e.sent,r=new Blob([i],{type:"application/vnd.ms-excel;charset=utf-8"}),s=n.filename,t.file(s,r),a+=1,c.update({content:(0,b.jsxs)("div",{children:["当前进度: ",(0,b.jsx)("span",{className:"c-blue",children:a}),"/",l]})});case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)},u=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,S(!0),a=0,l=n.flat().length,c=x.Z.info({width:460,title:(0,b.jsxs)("div",{children:["正在导出",t,",",(0,b.jsx)("span",{className:"c-red",children:"请勿关闭或操作当前浏览器窗口"})]}),content:(0,b.jsxs)("div",{children:["当前进度: ",(0,b.jsx)("span",{className:"c-blue",children:a}),"/",l]}),maskClosable:!1,okText:"我知道了"}),p=s()(n),e.prev=9,p.s();case 11:if((h=p.n()).done){e.next=34;break}f=h.value,_="".concat(f[0].user_name,"-").concat(f[0].student_id),j=N.current.folder(_),Z=s()(f),e.prev=16,Z.s();case 18:if((k=Z.n()).done){e.next=24;break}return C=k.value,e.next=22,u(C,j);case 22:e.next=18;break;case 24:e.next=29;break;case 26:e.prev=26,e.t0=e.catch(16),Z.e(e.t0);case 29:return e.prev=29,Z.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),p.e(e.t1);case 39:return e.prev=39,p.f(),e.finish(39);case 42:return e.next=44,N.current.generateAsync({type:"blob"});case 44:A=e.sent,(I=document.createElement("a")).href=window.URL.createObjectURL(A),I.download="".concat(i||r,".zip"),document.body.appendChild(I),I.click(),document.body.removeChild(I),window.URL.revokeObjectURL(I.href),c.destroy(),S(!1),w(),N.current=new(g());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 F=function(e,n,t,i){var a=n,r=new window.XMLHttpRequest;return r.withCredentials=!0,r.addEventListener("load",(function(e){t(e,r)}),!1),r.addEventListener("error",(function(e){i&&i(e)}),!1),r.responseType="blob",r.open("GET",a),r.send(null),r},L=function(e,n){N.current.generateAsync({type:"blob"}).then((function(t){var i=document.createElement("a");i.href=window.URL.createObjectURL(t),i.download=r+"-".concat(e)+".zip",document.body.appendChild(i);var a=document.createEvent("MouseEvents");a.initEvent("click",!1,!1),i.dispatchEvent(a),document.body.removeChild(i),N.current=new(g()),n()}))},T=function(e,n){N.current.generateAsync({type:"blob"}).then((function(t){var i=document.createElement("a");i.href=window.URL.createObjectURL(t),i.download=n>0?r+"-".concat(n)+".zip":r+".zip",document.body.appendChild(i);var a=document.createEvent("MouseEvents");a.initEvent("click",!1,!1),i.dispatchEvent(a),document.body.removeChild(i),e.destroy(),S(!1),w(),N.current=new(g())}))};return u?(0,b.jsx)(b.Fragment,{}):(0,b.jsx)(f.ZP,a()(a()({},c),{},{onClick:function(){return A()},loading:C,children:"下载"}))};n.Z=(0,p.forwardRef)(w)},58922:function(e,n,t){t.d(n,{Z:function(){return _},I:function(){return v}});var i=t(82242),a=t.n(i),r=t(79800),s=t.n(r),l=t(78241),o=t(8591),c=t(92832),d=t(3113),u=t(95197),m=t(59301),p=t(37712),h=l.Z.useForm,x={width:280,marginRight:10},f={labelCol:{span:5},wrapperCol:{span:19}},_=function(e){var n=e.callback,t=e.onCancel,i=h(),r=s()(i,1)[0],u=(0,m.useRef)();function _(e,n){-1!==e.status?r.setFieldsValue({src:"/api/attachments/".concat(e.id),type:n.type}):o.ZP.error(e.message)}return(0,p.jsxs)(l.Z,a()(a()({form:r},f),{},{className:"upload-image-panel",onFinish:function(e){n(e,u.current)},style:{width:470,overflow:"hidden"},children:[(0,p.jsx)(l.Z.Item,{label:"图片地址",required:!0,children:(0,p.jsxs)("div",{className:"flex-container",children:[(0,p.jsx)(l.Z.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"请输入图片地址"}],children:(0,p.jsx)(c.Z,{style:x})}),(0,p.jsx)(g,{onFileChange:function(e){var n=e.target.files[0];u.current=n,v(n,_)}})]})}),(0,p.jsx)(l.Z.Item,{label:"图片描述",name:"alt",children:(0,p.jsx)(c.Z,{style:{width:264}})}),(0,p.jsxs)(l.Z.Item,{style:{textAlign:"right"},children:[(0,p.jsx)(d.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,p.jsx)(d.ZP,{type:"default",onClick:t,children:"取消"})]})]}))};function g(e){var n=e.onFileChange;return(0,p.jsxs)("label",{className:"upload-button",style:{cursor:"pointer"},children:["本地上传",(0,p.jsx)("input",{type:"file",onChange:n})]})}function v(e,n){if(!e)throw new String("没有文件");var t=new FormData;t.append("editormd-image-file",e),t.append("file_param_name","editormd-image-file"),t.append("byxhr","true");var i=new window.XMLHttpRequest;i.withCredentials=!0,i.addEventListener("load",(function(t){n(JSON.parse(t.target.responseText),e)}),!1),i.addEventListener("error",(function(e){console.error(e)}),!1),i.open("POST","".concat(u.KI,"/api/attachments.json")),i.send(t)}},89613:function(e,n,t){var i=t(82242),a=t.n(i),r=t(37205),s=t.n(r),l=t(39647),o=t.n(l),c=t(79800),d=t.n(c),u=t(59301),m=t(78241),p=t(95237),h=t(43604),x=t(57809),f=t(400),_=t(6848),g=t(78550),v=t(92832),j=t(87381),y=t(737),b=t(69662),w=t(37712),Z=["key","name"];n.Z=(0,j.connect)((function(e){return{shixunHomeworks:e.shixunHomeworks}}))((function(e){var n=e.disabled,t=e.shixunHomeworks,i=e.selectOptions,r=e.form,l=t.workSetting,c=(0,u.useState)([]),j=d()(c,2),k=j[0],C=j[1],S=(0,u.useMemo)((function(){return null==i?void 0:i.filter((function(e){return!k.includes(e.value)}))}),[k,i]);return(0,u.useEffect)((function(){var e,n=(null==l||null===(e=l.anonymous_appeal_settings)||void 0===e?void 0:e.filter((function(e){return e.appeal_time})))||[];C(n.map((function(e){return e.group_name})))}),[l]),(0,w.jsx)(m.Z.List,{name:"anonymous_appeal_settings",children:function(e,t){var i=t.add,c=t.remove;return(0,w.jsx)(w.Fragment,{children:e.map((function(t){var d,u=t.key,j=t.name,k=o()(t,Z),N=r.getFieldValue(["anonymous_appeal_settings",j]).deleteflag;return(0,w.jsx)("div",{children:(0,w.jsxs)(p.Z,{align:"middle",style:{background:"#F6F7F9",padding:"5px 30px"},children:[(0,w.jsxs)(h.Z,{style:{height:"40px",lineHeight:"40px",width:"80px",textAlign:"left",marginLeft:"54px",color:"#666"},children:["申诉规则",u+1]}),(0,w.jsx)(h.Z,{children:(0,w.jsx)(m.Z.Item,a()(a()({},k),{},{name:[t.name,"group_name"],children:(0,w.jsx)(x.default,{mode:"multiple",disabled:n||!N,placeholder:"请选择分班名称",style:{width:"245px"},className:b.Z.multiple_select,options:S||[],onSelect:function(e){C((function(n){return[].concat(s()(n),[e])}))},onDeselect:function(e){C((function(n){return n.filter((function(n){return n!==e}))}))}})}))}),(0,w.jsx)(h.Z,{style:{marginLeft:"40px",color:"#666",marginRight:"20px"},children:"违规匿评扣分"}),(0,w.jsx)(h.Z,{children:(0,w.jsx)(m.Z.Item,a()(a()({},k),{},{label:"",name:[t.name,"appeal_penalty"],children:(0,w.jsx)(f.Z,{min:0,disabled:n,size:"large",addonAfter:"分",style:{width:"120px"}})}))}),(0,w.jsx)(_.Z,{title:"学生违规匿评其他同学的作品时,其成绩将被扣减的分值",children:(0,w.jsx)("i",{className:"iconfont icon-tishixiaowenhao ml10 ".concat(b.Z.title_icon)})}),(0,w.jsx)(h.Z,{style:{marginLeft:"40px",color:"#666",marginRight:"20px"},children:"结束时间"}),(0,w.jsx)(h.Z,{children:(0,w.jsx)(m.Z.Item,a()(a()({},k),{},{label:"",name:[t.name,"appeal_time"],children:(0,w.jsx)(g.default,{allowClear:!1,style:{width:170},placeholder:"请选择结束时间",disabled:n,size:"large",disabledDate:function(e){return(0,y.Q8)(e,null==l?void 0:l.course_end_date)},disabledTime:function(e){return(0,y.d0)(e)},showTime:{format:"HH:mm"},format:"YYYY-MM-DD HH:mm"})}))}),(0,w.jsx)(m.Z.Item,a()(a()({},k),{},{name:[j,"deleteflag"],children:(0,w.jsx)(v.Z,{type:"hidden"})})),!n&&e.length<(null==l||null===(d=l.anonymous_appeal_settings)||void 0===d?void 0:d.length)&&(0,w.jsx)("i",{className:"iconfont icon-zengjia1 ml20",style:{cursor:"pointer",color:"#00B187"},onClick:function(){i({deleteflag:!0})}}),0!==u&&!n&&N&&(0,w.jsx)("i",{className:"iconfont icon-shanjian1 ml20",style:{cursor:"pointer",color:"#E30000"},onClick:function(){var e=r.getFieldValue(["anonymous_appeal_settings",j,"group_name"])||[];C((function(n){return n.filter((function(n){return!e.includes(n)}))})),c(j)}})]})},u)}))})}})}))},83769:function(e,n,t){var i=t(82242),a=t.n(i),r=t(37205),s=t.n(r),l=t(39647),o=t.n(l),c=t(79800),d=t.n(c),u=t(59301),m=t(78550),p=t(78241),h=t(95237),x=t(43604),f=t(57809),_=t(8591),g=t(92832),v=t(400),j=t(6848),y=t(24905),b=t(61186),w=t.n(b),Z=t(87381),k=t(737),C=t(30400),S=t(69662),N=t(37712),A=["key","name"],I=m.default.RangePicker;n.Z=(0,Z.connect)((function(e){return{shixunHomeworks:e.shixunHomeworks,classroomList:e.classroomList}}))((function(e){var n=e.disabled,t=e.shixunHomeworks,i=e.selectOptions,r=e.form,l=e.data,c=e.classroomList,m=t.workSetting,b=(0,u.useState)([]),Z=d()(b,2),H=Z[0],F=Z[1],L=(0,u.useMemo)((function(){return null==i?void 0:i.filter((function(e){return!H.includes(e.value)}))}),[H,i]);(0,u.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})))||[];F(n.map((function(e){return e.group_name})))}),[m]);return(0,N.jsx)(p.Z.List,{name:"anonymous_comment_settings",children:function(e,t){var i=t.add,d=t.remove;return(0,N.jsx)(N.Fragment,{children:e.map((function(t){var u,b,Z,H,T,E=t.key,R=t.name,O=o()(t,A),Y=r.getFieldValue(["anonymous_comment_settings",R]),D=Y.deleteflag,z=w()(null===(u=Y.evaluation_start)||void 0===u?void 0:u[0])<=w()(),P=!D&&z?[!0,(Z=null==Y?void 0:Y.group_id,T=null==m||null===(H=m.anonymous_appeal_settings)||void 0===H?void 0:H.find((function(e){return e.group_id===Z})),l.anonymous_appeal&&T&&null!==(null==T?void 0:T.appeal_time))]:[!1,!1];return(0,N.jsxs)("div",{style:{background:"#F6F7F9",padding:"5px 30px"},children:[(0,N.jsxs)(h.Z,{align:"top",style:{marginLeft:"53px"},children:[(0,N.jsxs)(x.Z,{style:{height:"40px",lineHeight:"40px",width:"80px",textAlign:"left"},children:["匿评规则",E+1]}),(0,N.jsx)(x.Z,{flex:1,children:(0,N.jsxs)(h.Z,{align:"middle",style:{marginBottom:10},children:[(0,N.jsx)(x.Z,{span:8,children:(0,N.jsx)(p.Z.Item,a()(a()({},O),{},{name:[R,"group_name"],children:(0,N.jsx)(f.default,{mode:"multiple",disabled:n||!D,className:S.Z.multiple_select,placeholder:"请选择分班名称",options:L||[],onSelect:function(e){F((function(n){return[].concat(s()(n),[e])}))},onDeselect:function(e){F((function(n){return n.filter((function(n){return n!==e}))}))}})}))}),(0,N.jsx)(x.Z,{className:"ml20",children:(0,N.jsx)(p.Z.Item,a()(a()({},O),{},{name:[R,"evaluation_start"],children:(0,N.jsx)(I,{ranges:{"此刻":function(){var e,n=null==Y||null===(e=Y.evaluation_start)||void 0===e?void 0:e[0];return[n?w()(n):w()(),w()()]}},size:"large",style:{width:"500px"},disabled:n||P,allowClear:!1,disabledDate:function(e){return(0,k.Q8)(e,null==m?void 0:m.course_end_date)},disabledTime:function(e){return(0,k.d0)(e)},showTime:{format:"HH:mm"},format:"YYYY-MM-DD HH:mm",onChange:function(){var e;!(0,C.Rm)()||null!==(e=c.AssistantObject.group)&&void 0!==e&&e.can_anonymous_comment||_.ZP.warning("您未获取此权限,需向课堂管理员申请权限才能使用此功能")}})}))}),(0,N.jsx)(p.Z.Item,a()(a()({},O),{},{name:[R,"deleteflag"],children:(0,N.jsx)(g.Z,{type:"hidden"})})),!n&&e.length<(null==m||null===(b=m.anonymous_comment_settings)||void 0===b?void 0:b.length)&&(0,N.jsx)("i",{className:"iconfont icon-zengjia1 ml20",style:{cursor:"pointer",color:"#00B187"},onClick:function(){i({deleteflag:!0})}}),0!==E&&!n&&D&&(0,N.jsx)("i",{className:"iconfont icon-shanjian1 ml20",style:{cursor:"pointer",color:"#E30000"},onClick:function(){var e=r.getFieldValue(["anonymous_comment_settings",R,"group_name"])||[];F((function(n){return n.filter((function(n){return!e.includes(n)}))})),d(R)}})]})})]}),(0,N.jsxs)(h.Z,{align:"middle",style:{marginLeft:"53px"},children:[(0,N.jsx)(x.Z,{style:{width:"75px"},children:"匿评数量"}),(0,N.jsx)(x.Z,{children:(0,N.jsx)(p.Z.Item,a()(a()({},O),{},{label:"",colon:!1,name:[R,"evaluation_num"],children:(0,N.jsx)(v.Z,{min:0,size:"large",style:{marginLeft:"5px"},disabled:n||!D&&z})}))}),(0,N.jsx)(j.Z,{title:"每个学生将被分配的匿评作品数量。如全班实际提交作业数量小于本数值,则以实际提交作业数量为准",children:(0,N.jsx)("i",{className:"iconfont icon-tishixiaowenhao ml10 ".concat(S.Z.title_icon)})}),(0,N.jsx)(x.Z,{style:{width:"75px",marginLeft:"40px"},children:"缺评扣分"}),(0,N.jsx)(x.Z,{children:(0,N.jsx)(p.Z.Item,a()(a()({},O),{},{label:"",colon:!1,name:[R,"absence_penalty"],children:(0,N.jsx)(v.Z,{min:0,size:"large",addonAfter:"分",style:{width:"120px"},disabled:n,onChange:function(e){var n;!(0,C.Rm)()||null!==(n=c.AssistantObject.group)&&void 0!==n&&n.can_anonymous_comment||_.ZP.warning("您未获取此权限,需向课堂管理员申请权限才能使用此功能")}})}))}),(0,N.jsx)(x.Z,{style:{marginLeft:"40px"},children:(0,N.jsx)(p.Z.Item,a()(a()({},O),{},{name:[R,"student_comment"],valuePropName:"checked",children:(0,N.jsx)(y.Z,{disabled:n,onChange:function(){var e;!(0,C.Rm)()||null!==(e=c.AssistantObject.group)&&void 0!==e&&e.can_anonymous_comment||_.ZP.warning("您未获取此权限,需向课堂管理员申请权限才能使用此功能")}})}))}),(0,N.jsx)(x.Z,{className:"ml10",children:"匿评计入已评阅"})]})]},E)}))})}})}))},97054:function(e,n,t){var i=t(87381),a=t(95237),r=t(43604),s=t(78550),l=t(400),o=t(6848),c=t(61186),d=t.n(c),u=t(737),m=t(69662),p=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,h=c.workSetting;c.workList;return(0,p.jsx)("div",{children:(0,p.jsxs)(a.Z,{style:{background:"#F6F7F9",padding:"5px 30px",display:"flex",alignItems:"center"},children:[(0,p.jsx)(r.Z,{style:{marginLeft:"54px",marginRight:"20px",color:"#666666"},children:"结束时间"}),(0,p.jsx)(r.Z,{children:(0,p.jsx)(s.default,{allowClear:!1,style:{width:250},placeholder:"请选择结束时间",showTime:{format:"HH:mm"},size:"large",format:"YYYY-MM-DD HH:mm",disabled:t,disabledDate:function(e){return(0,u.Q8)(e,null==h?void 0:h.course_end_date)},disabledTime:function(e){return(0,u.d0)(e)},value:n.appeal_time?d()(n.appeal_time):"",onChange:function(e,t){n.appeal_time=t,i(Object.assign({},n))}})}),(0,p.jsx)(r.Z,{style:{margin:"0 20px 0 60px",color:"#666666"},children:"违规匿评扣分"}),(0,p.jsx)(r.Z,{children:(0,p.jsx)(l.Z,{size:"large",disabled:t,value:n.appeal_penalty,min:0,addonAfter:"分",style:{width:"120px"},onChange:function(e){n.appeal_penalty=e,i(Object.assign({},n))}})}),(0,p.jsx)(o.Z,{title:"学生违规匿评其他同学的作品时,其成绩将被扣减的分值",children:(0,p.jsx)("i",{className:"iconfont icon-tishixiaowenhao ml10 ".concat(m.Z.title_icon)})})]})})}))},6548:function(e,n,t){var i=t(78550),a=t(400),r=t(6848),s=t(24905),l=t(61186),o=t.n(l),c=t(87381),d=t(737),u=t(69662),m=t(37712);n.Z=(0,c.connect)((function(e){return{shixunHomeworks:e.shixunHomeworks}}))((function(e){var n=e.data,t=e.setData,l=e.disabled,c=e.shixunHomeworks.workSetting,p=o()(null==c?void 0:c.evaluation_start)<=o()(),h=n.anonymous_appeal;return(0,m.jsxs)("div",{children:[(0,m.jsxs)("div",{style:{background:"#F6F7F9",padding:"5px 30px",display:"flex",alignItems:"center",marginTop:"1px"},children:[(0,m.jsx)("div",{style:{color:"#666666",marginLeft:"53px",marginRight:"20px"},children:"开始时间"}),(0,m.jsx)(i.default,{allowClear:!1,style:{width:200},placeholder:"请选择开始时间",showTime:{format:"HH:mm"},format:"YYYY-MM-DD HH:mm",size:"large",disabledDate:function(e){return(0,d.Q8)(e,null==c?void 0:c.course_end_date)},disabledTime:function(e){return(0,d.d0)(e)},disabled:l||p||h,value:n.evaluation_start?o()(n.evaluation_start):"",onChange:function(e,i){n.evaluation_start=i,t(Object.assign({},n))}}),(0,m.jsx)("div",{style:{color:"#666666",marginLeft:"60px",marginRight:"20px"},children:"结束时间"}),(0,m.jsx)(i.default,{allowClear:!1,style:{width:200},placeholder:"请选择结束时间",showTime:{format:"HH:mm"},format:"YYYY-MM-DD HH:mm",size:"large",disabledDate:function(e){return(0,d.Q8)(e,null==c?void 0:c.course_end_date,n.evaluation_start)},disabledTime:function(e){return(0,d.d0)(e,o()(n.evaluation_start))},disabled:l||h,value:n.evaluation_end?o()(n.evaluation_end):"",onChange:function(e,i){n.evaluation_end=i,t(Object.assign({},n))}})]}),(0,m.jsxs)("div",{style:{background:"#F6F7F9",padding:"5px 30px",display:"flex",alignItems:"center"},children:[(0,m.jsx)("div",{style:{color:"#666666",marginLeft:"53px",marginRight:"20px"},children:"匿评数量"}),(0,m.jsx)(a.Z,{disabled:l||p||h,value:n.evaluation_num,min:0,style:{width:"150px"},size:"large",onChange:function(e){n.evaluation_num=e,t(Object.assign({},n))}}),(0,m.jsx)(r.Z,{title:"每个学生将被分配的匿评作品数量。如全班实际提交作业数量小于本数值,则以实际提交作业数量为准",children:(0,m.jsx)("i",{className:"iconfont icon-tishixiaowenhao ml10 ".concat(u.Z.title_icon)})}),(0,m.jsx)("div",{style:{color:"#666666",marginLeft:"84px",marginRight:"20px"},children:"缺评扣分"}),(0,m.jsx)(a.Z,{min:0,disabled:l,style:{width:"150px"},size:"large",addonAfter:"分",value:n.absence_penalty,onChange:function(e){n.absence_penalty=e,t(Object.assign({},n))}})]}),n.anonymous_comment&&(0,m.jsx)("div",{style:{background:"#F6F7F9",padding:"13px 30px 13px 83px",display:"flex",alignItems:"center"},children:(0,m.jsx)(s.Z,{checked:n.student_comment,disabled:l,onChange:function(){n.student_comment=!n.student_comment,t(Object.assign({},n))},children:(0,m.jsx)("span",{style:{fontSize:"14px",color:"#000"},children:"匿评计入已评阅"})})})]})}))},92404:function(e,n,t){t.d(n,{Z:function(){return k}});var i=t(82242),a=t.n(i),r=t(7557),s=t.n(r),l=t(41498),o=t.n(l),c=t(79800),d=t.n(c),u=t(59301),m=t(43418),p=t(8591),h=t(95237),x=t(43604),f=t(3113),_=t(24645),g=t(2595),v={achieveSty:"achieveSty___Joqdh",tip:"tip___qAo3r",labolIcon:"labolIcon___QZ4oX"},j=t(94854),y=t(22805),b=t(5219),w=t(69824),Z=t(37712),k=function(e){var n,t,i,r=e.visible,l=e.categoryId,c=e.getData,k=e.onCancle,C=(0,u.useState)([]),S=d()(C,2),N=S[0],A=S[1],I=(0,u.useState)(!1),H=d()(I,2),F=H[0],L=H[1],T=(0,u.useState)(!1),E=d()(T,2),R=E[0],O=E[1],Y=(0,u.useState)({success_size:0,error_list:[]}),D=d()(Y,2),z=D[0],P=D[1],M={withCredentials:!0,maxCount:1,multiple:!1,onRemove:function(){A([])},beforeUpload:(i=o()(s()().mark((function e(n){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return A([n]),e.abrupt("return",!1);case 2:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)}),fileList:N,accept:".xlsx"};return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(m.Z,{centered:!0,maskClosable:!1,title:"导入外部成绩",width:690,open:r,okText:"确定",cancelText:"取消",confirmLoading:R,onOk:o()(s()().mark((function e(){var n,t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==N.length){e.next=3;break}return p.ZP.info("请先上传文件!"),e.abrupt("return");case 3:return O(!0),(n=new FormData).append("file",N[0]),e.next=8,(0,b.ZP)("/api/homework_commons/".concat(l,"/import_external_score.json"),{method:"post",body:n},!0);case 8:0===(null==(t=e.sent)?void 0:t.status)&&(P(t),k(),c(),L(!0),A([])),O(!1);case 11:case"end":return e.stop()}}),e)}))),onCancel:function(){A([]),k()},children:(0,Z.jsxs)("div",{className:v.achieveSty,children:[(0,Z.jsxs)("div",{className:v.tip,children:[(0,Z.jsx)("div",{children:"1.不在学生列表内的学生不支持导入外部成绩;"}),(0,Z.jsx)("div",{children:"2.未提交作品的学生导入外部成绩之后将视为已在线下提交作业;"}),(0,Z.jsx)("div",{children:"3.导入外部成绩会将已评阅学生的最终成绩进行更新。"})]}),(0,Z.jsxs)(h.Z,{align:"middle",className:"mt20",children:[(0,Z.jsxs)(x.Z,{className:"mr10",children:[(0,Z.jsx)("span",{className:v.labolIcon,children:"*"}),(0,Z.jsx)("span",{children:"导入文件"})]}),(0,Z.jsxs)(x.Z,{children:[(0,Z.jsx)(f.ZP,{shape:"default",style:{backgroundColor:"#3061D0",color:"#fff"},children:(0,Z.jsx)("a",{className:v.downloadbutton,onClick:function(e){e.stopPropagation(),e.preventDefault(),(0,w.FH)("",y.Z.API_SERVER+"/api/homework_commons/".concat(l,"/get_example_excel.json"))},children:"下载模版表格"})}),(0,Z.jsx)("span",{className:"ml10",style:{color:"#9096A3"},children:"根据提示信息完善表格内容"})]})]}),(0,Z.jsx)("div",{className:"mt10",style:{marginLeft:"74px",height:"120px"},children:(0,Z.jsxs)(_.Z.Dragger,a()(a()({style:{border:"1px dashed rgba(48,97,208,0.3)",backgroundColor:"rgba(48,97,208,0.06)"}},M),{},{children:[(0,Z.jsx)("div",{children:(0,Z.jsx)(j.op,{shape:"default",children:"选择文件"})}),(0,Z.jsx)("div",{className:"font12 mt10",style:{color:"#9096A3"},children:"下载模版并完善信息后,可将文件拖拽至此处上传。支持格式:.xlsx"})]}))})]})}),(0,Z.jsx)(m.Z,{centered:!0,maskClosable:!1,title:"导入结果",width:508,open:F,onCancel:function(){L(!1)},footer:null,children:(0,Z.jsxs)("div",{children:[(0,Z.jsxs)("div",{style:{marginTop:"5px",marginBottom:"15px"},children:[(0,Z.jsxs)("span",{children:["导入成功",(0,Z.jsxs)("span",{style:{color:"#19CB70"},children:[" ",null==z?void 0:z.success_size," "]}),"个学生"]}),(0,Z.jsxs)("span",{style:{marginLeft:"30px"},children:["导入失败",(0,Z.jsxs)("span",{style:{color:"#E30000"},children:[" ",null==z||null===(n=z.error_list)||void 0===n?void 0:n.length," "]}),"个学生"]})]}),!(null==z||null===(t=z.error_list)||void 0===t||!t.length)&&(0,Z.jsx)("div",{className:"mb20",children:(0,Z.jsx)(g.Z,{columns:[{title:"姓名",dataIndex:"name",key:"name",ellipsis:!0,width:120,render:function(e){return(0,Z.jsx)("span",{style:{color:"#000"},children:e})}},{title:"学号/工号",dataIndex:"student_id",key:"student_id",ellipsis:!0,width:120,render:function(e){return(0,Z.jsx)("span",{style:{color:"#666"},children:e})}},{title:"失败原因",dataIndex:"info",key:"info",ellipsis:!0,align:"end",render:function(e){return(0,Z.jsx)("span",{style:{color:"#000"},children:e})}}],dataSource:null==z?void 0:z.error_list,pagination:!1,scroll:{y:376}})})]})})]})}},18445:function(e,n,t){t.d(n,{Z:function(){return v}});var i=t(7557),a=t.n(i),r=t(41498),s=t.n(r),l=t(79800),o=t.n(l),c=t(59301),d=t(92832),u=t(24905),m=t(95237),p="leftdiv___aBzsX",h="listClass___bxIEW",x="spantitle___v_Vc4",f="rightdiv___xWu4M",_=t(12225),g=t(37712),v=function(e){var n=e.data,t=(e.value,e.handleChangePage,e.setSelectedRowKeys),i=e.selectedRowKeys,r=(e.onChange,(0,c.useState)([])),l=o()(r,2),v=l[0],j=l[1],y=(0,c.useState)([]),b=o()(y,2),w=b[0],Z=b[1],k=(0,c.useState)([]),C=o()(k,2),S=C[0],N=C[1],A=(0,c.useState)(1),I=o()(A,2),H=(I[0],I[1],(0,c.useState)()),F=o()(H,2);F[0],F[1];return(0,c.useEffect)((function(){j(n),Z([]),N([])}),[n]),(0,c.useEffect)((function(){t&&(Z(i),N(i))}),[i]),(0,g.jsxs)("div",{style:{display:"flex",justifyContent:"space-between"},children:[(0,g.jsxs)("div",{className:p,children:[(0,g.jsx)(d.Z.Search,{size:"middle",onChange:function(){var e=s()(a()().mark((function e(t){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:j(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===v.length&&(0,g.jsx)(_.Z,{styles:{margin:"70px auto"},customText:"暂无分班"}),(0,g.jsx)("div",{style:{height:"85%",overflow:"auto",overflowX:"hidden"},children:(0,g.jsx)(u.Z.Group,{value:w.map((function(e){return"".concat(e.id)})),onChange:function(e){t(v.filter((function(n){return e.includes("".concat(n.id))})))},style:{marginTop:"10px",flexDirection:"column"},children:v.map((function(e,n){return(0,g.jsx)(m.Z,{style:{marginTop:"10px",lineHeight:"24px",display:"flex",width:200},children:(0,g.jsx)(u.Z,{style:{display:"flex",height:"24px",alignItems:"center"},disabled:e.is_published,value:"".concat(e.id),children:(0,g.jsxs)("div",{className:h,children:[(0,g.jsx)("span",{className:x,style:{width:e.is_published?"108px":"170px"},children:e.name}),e.is_published&&(0,g.jsx)("span",{style:{width:"52px",height:"24px",background:"#B8B8B8",borderRadius:"13px",color:"white",lineHeight:"24px",textAlign:"center",display:"inline-block"},children:"已发布"})]})})},e.id)}))})})]}),(0,g.jsxs)("div",{className:f,children:[(0,g.jsx)(d.Z.Search,{onChange:function(e){N(w.filter((function(n){return n.name.includes(e.target.value)})))},size:"middle",placeholder:"可输入班级名称查询"}),0===S.length&&(0,g.jsx)(_.Z,{styles:{margin:"70px auto"},customText:"暂未选择分班"}),S.length>0&&(0,g.jsx)("div",{style:{marginTop:"10px",height:"85%",overflow:"hidden",position:"relative"},children:(0,g.jsx)("div",{style:{overflowX:"hidden",overflowY:"scroll",position:"absolute",left:0,top:0,right:-17,bottom:0},children:S.map((function(e,n){return(0,g.jsxs)(m.Z,{justify:"space-between",style:{marginTop:"10px"},children:[(0,g.jsx)("div",{style:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",marginRight:"5px",marginLeft:"5px",width:"75%"},children:e.name}),(0,g.jsx)("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAbVJREFUOE+Nk79rFUEUhb+zE4OFwUD+CyGKKQQbSaMikQQ7C1tBBIsUQaJvl2Fn/cWDpAiIYJsi7YOIaCUWFoKKRhG0sbEzEImFGnev7G6yyXsxeU5159yZb87l3hG9q2WLiBO79FIwXpLp0s6cwITnQCMWrGDM43jdBckZQ0wTMdrong2R2Bxm0/98sZ8ozdcOEm5hjOC41u9Olc9ZQKySclOVkNhljCmCzjeAJM/4FbW5p+8k5tlggTtarfKxLSM6pHq4BTiL0SboaAOIi284jeP1nti+ApMEvdoEvEPMkOpJDZi1IwzwgqDh/wSsYZwk08ca4O0Qua3zW8OV5crmHg6u22EGbQ2nIbx+1IC6rrK+cYJW9gXEVrbxGUEj5bltQGJvgBapHu0LSGwCyEh1vBsQWwd4TNCDPg6uAOcImuoFlL1dJ9WNPg5uYwwRVM3MzhJmKIpjZK6e9bj4jNNpvL4QFx9wuoDXJ1r5IlH0llTtXgcXwa4SolObnYnwKnbFcfEcdJ+gpW6AtzFynuIop/Fn053u4CA5yzjO4FV9tu0Syl2S38WiSWBgD8AfoEPQ7Fb+LwIiyhxWwe2KAAAAAElFTkSuQmCC",style:{cursor:"pointer",height:"16px",marginRight:17},onClick:function(){t(w.filter((function(n){return"".concat(n.id)!="".concat(e.id)})))}})]},e.id)}))})})]})]})}},34294:function(e,n,t){t.d(n,{Ei:function(){return y},rU:function(){return b},ZP:function(){return w}});var i=t(82242),a=t.n(i),r=t(79800),s=t.n(r),l=t(59301),o="wrap___W3YuU",c="title___OzKge",d="exhibition___ugphm",u="title_icon___QGbm6",m=t(78241),p=t(24905),h=t(400),x=t(6848),f=t(95237),_=t(43604),g=t(92310),v=t.n(g),j=t(37712),y=function(e){var n=e.value,t=e.className,i=e.style,a=(0,l.useState)("0"),r=s()(a,2),o=r[0],c=r[1];(0,l.useEffect)((function(){if(n){var e=n.submit_limit,t=n.must_file;if(e&&t)return void c("1");if(e&&!t)return void c("2");if(!e&&t)return void c("3")}}),[n]);var u={1:(0,j.jsxs)("span",{children:["作业内容至少填写",(0,j.jsx)("span",{className:"ml5 mr5 c-light-primary",children:null==n?void 0:n.submit_limit_num}),"字符,并且必须上传相关附件。"]}),2:(0,j.jsxs)("span",{children:["作业内容至少填写",(0,j.jsx)("span",{className:"ml5 mr5 c-light-primary",children:null==n?void 0:n.submit_limit_num}),"字符"]}),3:(0,j.jsx)("span",{children:"必须上传相关附件。"})};return"0"===o?(0,j.jsx)(j.Fragment,{}):(0,j.jsxs)("section",{className:v()(d,t),style:i,children:[(0,j.jsx)("span",{className:"c-grey-666 mr10",children:"提交作业要求:"}),null==u?void 0:u[o]]})},b=function(e){var n=e.className,t=e.style,i=e.form,a=m.Z.useWatch("submit_limit",i),r=m.Z.useWatch("can_submit",i);return(0,j.jsxs)("section",{className:v()(o,n),style:t,children:[(0,j.jsx)("div",{className:"".concat(c," mt30"),children:(0,j.jsx)("span",{children:"提交设置"})}),(0,j.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",background:"#F6F7F9",padding:"5px 30px"},children:[(0,j.jsx)(m.Z.Item,{name:"can_submit",valuePropName:"checked",style:{lineHeight:"40px"},children:(0,j.jsx)(p.Z,{children:"限制提交作品"})}),(0,j.jsx)(m.Z.Item,{className:"ml10 mr10",name:"submit_num",rules:r&&[{required:!0,message:"请填写作品次数"}],children:(0,j.jsx)(h.Z,{precision:0,min:1,disabled:!r,size:"large",addonAfter:"次",style:{width:223}})}),(0,j.jsx)(x.Z,{overlayInnerStyle:{width:520},title:(0,j.jsxs)("div",{children:["1、若未开启该限制学生可以无限次提交作品",(0,j.jsx)("br",{}),"2、若作业在补交阶段已用完提交次数的学生将获得一次额外的提交作品机会",(0,j.jsx)("br",{}),"3、若学生需要超出规定次数提交作品教师可使用“打回重做”功能让该学生重新提交一次。"]}),children:(0,j.jsx)("i",{className:"iconfont icon-tishixiaowenhao ".concat(u),style:{lineHeight:"40px"}})}),(0,j.jsx)(m.Z.Item,{name:"submit_limit",valuePropName:"checked",style:{marginLeft:60,lineHeight:"40px"},children:(0,j.jsx)(p.Z,{children:"填写内容至少"})}),(0,j.jsx)(m.Z.Item,{className:"mr10",name:"submit_limit_num",rules:a&&[{required:!0,message:"字数不能为空"}],children:(0,j.jsx)(h.Z,{precision:0,min:1,disabled:!a,size:"large",addonAfter:"字",style:{width:223,marginRight:100}})}),(0,j.jsx)(m.Z.Item,{name:"must_file",valuePropName:"checked",style:{marginLeft:0,lineHeight:"40px"},children:(0,j.jsx)(p.Z,{children:"提交作业必须上传附件"})}),(0,j.jsx)(m.Z.Item,{name:"can_deadline_submit",valuePropName:"checked",style:{marginLeft:267,lineHeight:"40px"},children:(0,j.jsx)(p.Z,{children:"作业截止后允许修改附件"})}),(0,j.jsx)(x.Z,{overlayInnerStyle:{width:366},placement:"bottom",title:(0,j.jsx)("div",{children:"开启此设置后,已提交作业的学生可以修改已上传附件,而未提交作业的学生则不可上传。"}),children:(0,j.jsx)("i",{className:"iconfont icon-tishixiaowenhao ".concat(u),style:{lineHeight:"40px"}})})]})]})},w=function(e){var n=e.value,t=e.onChange,i=e.className,r=e.style,d=e.disabled,m=void 0!==d&&d,g=e.checkMarginLeft,y=void 0===g?0:g,b=(0,l.useState)({}),w=s()(b,2),Z=w[0],k=w[1];(0,l.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};k(a()({},e))}}),[n]);var C=function(e){var n=a()(a()({},Z),e);t(n)};return(0,j.jsxs)("section",{className:v()(o,i),style:r,children:[(0,j.jsx)("div",{className:"".concat(c," mt30"),children:(0,j.jsx)("span",{children:"提交设置"})}),(0,j.jsxs)(f.Z,{style:{background:"#F6F7F9",padding:"5px 30px"},children:[(0,j.jsxs)(_.Z,{style:{lineHeight:"40px",marginTop:"10px"},children:[(0,j.jsx)(p.Z,{disabled:m,checked:null==Z?void 0:Z.can_submit,onChange:function(e){return C({can_submit:e.target.checked})}}),(0,j.jsx)("span",{className:"ml10",style:{marginRight:18},children:"限制提交作业"}),(0,j.jsx)(h.Z,{size:"large",addonAfter:"次",style:{width:143},precision:0,min:1,disabled:m||!(null!=Z&&Z.can_submit),value:null==Z?void 0:Z.submit_num,onChange:function(e){return C({submit_num:e})}}),(0,j.jsx)(x.Z,{overlayInnerStyle:{width:520},title:(0,j.jsxs)("div",{children:["1、若未开启该限制学生可以无限次提交作品",(0,j.jsx)("br",{}),"2、若作业在补交阶段已用完提交次数的学生将获得一次额外的提交作品机会",(0,j.jsx)("br",{}),"3、若学生需要超出规定次数提交作品教师可使用“打回重做”功能让该学生重新提交一次。"]}),children:(0,j.jsx)("i",{className:"iconfont icon-tishixiaowenhao ml10 ".concat(u)})})]}),(0,j.jsxs)(_.Z,{style:{lineHeight:"40px",marginTop:"10px"},children:[(0,j.jsx)(p.Z,{style:{marginLeft:y},disabled:m,checked:null==Z?void 0:Z.submit_limit,onChange:function(e){return C({submit_limit:e.target.checked})}}),(0,j.jsx)("span",{className:"ml10",style:{marginRight:18},children:"填写内容至少"}),(0,j.jsx)(h.Z,{size:"large",addonAfter:"字",style:{width:143,marginRight:100},precision:0,min:1,disabled:m||!(null!=Z&&Z.submit_limit),value:null==Z?void 0:Z.submit_limit_num,onChange:function(e){return C({submit_limit_num:e})}})]}),(0,j.jsxs)(_.Z,{style:{lineHeight:"40px",marginTop:"10px"},children:[(0,j.jsx)(p.Z,{style:{marginLeft:y},disabled:m,checked:null==Z?void 0:Z.must_file,onChange:function(e){return C({must_file:e.target.checked})}}),(0,j.jsx)("span",{className:"ml10",children:"提交作业必须上传附件"})]})]})]})}},23425:function(e,n,t){t.d(n,{M:function(){return l},Y:function(){return s}});var i=t(61186),a=t.n(i),r=t(89392),s=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"YYYY-MM-DD",t=(0,r.cloneDeepWith)(e,(function(e){if(e instanceof a())return e.format(n)}));return t},l=function e(n,t,i){var r=function(e){return"[object Object]"===Reflect.toString.call(e)};if(!r(n)&&!Array.isArray(n))return n;for(var s=0,l=Object.keys(n);s<l.length;s++){var o=l[s];Array.isArray(n[o])?n[o]=n[o].map((function(n){return e(n,t,i)})):r(n[o])?n[o]=e(n[o],t,i):t.includes(o)&&"string"==typeof n[o]&&(n[o]=i?a()(n[o],i):a()(n[o]))}return n}},29233:function(e,n){n.Z={poor_rating:"poor_rating___h5Pkz",title:"title___Kt7fx",content:"content___uWG5Y",row_sty:"row_sty___VNKxj",bottom_line:"bottom_line___o6CYn",row_sty1:"row_sty1___gzdZR",lable_name:"lable_name___XcFiQ",h_lh_40:"h_lh_40___rY3ds",tooltip_icon:"tooltip_icon___Yv0p3",lable_name1:"lable_name1___g8Eds",title_icon:"title_icon___tSQED"}},69662:function(e,n){n.Z={flex_box_center:"flex_box_center___iIik3",flex_space_between:"flex_space_between___Q7wj5",flex_box_vertical_center:"flex_box_vertical_center___LFAxO",flex_box_center_end:"flex_box_center_end___SFNWP",flex_box_column:"flex_box_column___aq5d_",form:"form___z6oqV",efficiency:"efficiency___VZgt9",configWorkContainer:"configWorkContainer___gQ6ac",tips:"tips___PkPgo",total:"total___c2k9V",tip1:"tip1___BUn8c",tip2:"tip2___Q8WSw",configworksContainer:"configworksContainer___P0ZE6",content:"content___Mow99",pubColSty:"pubColSty___YePTJ",selectSty:"selectSty___AGg4a",borderSty:"borderSty___qYL9U",delSty:"delSty___kbXe4",delBorder:"delBorder___wV7XA",copHover:"copHover___R3G_x",title_icon:"title_icon___eT6qQ",title:"title___uXYiB",multiple_select:"multiple_select___aCIWH"}}}]);