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/21534.d75bf18a.async.js

1 line
34 KiB

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[21534],{69602:function(e,n,t){t.d(n,{Z:function(){return c}});var s=t(5891),o=t(59301),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M632 698.3l141.9-112a8 8 0 000-12.6L632 461.7c-5.3-4.2-13-.4-13 6.3v76H295c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h324v76c0 6.7 7.8 10.4 13 6.3zm261.3-405L730.7 130.7c-7.5-7.5-16.7-13-26.7-16V112H144c-17.7 0-32 14.3-32 32v278c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V184h136v136c0 17.7 14.3 32 32 32h320c17.7 0 32-14.3 32-32V205.8l136 136V422c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-83.5c0-17-6.7-33.2-18.7-45.2zM640 288H384V184h256v104zm264 436h-56c-4.4 0-8 3.6-8 8v108H184V732c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v148c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V732c0-4.4-3.6-8-8-8z"}}]},name:"delivered-procedure",theme:"outlined"},a=t(88853),i=function(e,n){return o.createElement(a.Z,(0,s.Z)({},e,{ref:n,icon:r}))};var c=o.forwardRef(i)},35099:function(e,n,t){var s=t(7557),o=t.n(s),r=t(82242),a=t.n(r),i=t(41498),c=t.n(i),l=t(39647),d=t.n(l),u=(t(59301),t(43418)),m=t(8591),h=t(82710),p=t(79265),x=t(37712),f=["shixunHomeworks","dispatch"];n.Z=(0,p.connect)((function(e){return{shixunHomeworks:e.shixunHomeworks}}))((function(e){var n=e.shixunHomeworks,t=e.dispatch,s=(d()(e,f),(0,p.useParams)());return(0,x.jsxs)(u.Z,{centered:!0,title:"提示",open:"打回重做"===n.actionTabs.key,okText:"确定",cancelText:"取消",onOk:c()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,h.ZP)("/api/myshixuns/".concat(n.actionTabs.selectArrs.myshixun_identifier,"/reset_my_game.json"),{method:"GET",params:{course_id:s.coursesId}});case 2:e.sent.shixun_identifier&&(m.ZP.success("操作成功"),t({type:"shixunHomeworks/setActionTabs",payload:{}}),t({type:"shixunHomeworks/getWorkList",payload:a()({},n.actionTabs.params)}));case 4:case"end":return e.stop()}}),e)}))),onCancel:function(){t({type:"shixunHomeworks/setActionTabs",payload:{}})},children:[(0,x.jsx)("p",{children:"该作业将被打回重做,学生实训记录将被清空!"}),(0,x.jsx)("p",{children:"确定打回?"})]})}))},21534:function(e,n,t){t.d(n,{n:function(){return ae},Z:function(){return ie}});var s=t(37205),o=t.n(s),r=t(85573),a=t.n(r),i=t(7557),c=t.n(i),l=t(41498),d=t.n(l),u=t(82242),m=t.n(u),h=t(79800),p=t.n(h),x=t(59301),f=t(78241),g=t(8591),_=t(6848),k=t(43418),v=t(20834),w=t(24905),j=t(95237),y=t(43604),b=t(92832),Z=t(3113),I=t(38854),T=t(2595),S=t(5112),P=t(88897),C=t(25700),H=t(18290),A=t(88551),O=t(69602),N=t(35323),L=t(63017),F=t(95972),V=t(35099),E=t(39647),G=t.n(E),J=t(85404),R=t(82710),B=t(79265),W=t(37712),z=["shixunHomeworks","dispatch"],K=(0,B.connect)((function(e){return{shixunHomeworks:e.shixunHomeworks}}))((function(e){var n=e.shixunHomeworks,t=e.dispatch,s=(G()(e,z),(0,B.useParams)()),r=(0,x.useState)(!0),a=p()(r,2),i=a[0],l=a[1],u=(0,x.useState)(!1),h=p()(u,2),_=h[0],v=h[1],w=f.Z.useForm(),j=p()(w,1)[0],y=function(){var e=d()(c()().mark((function e(){var r;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=j.getFieldValue(),e.next=3,(0,R.ZP)("/api/homework_commons/".concat(s.categoryId,"/batch_comment.json"),{method:"post",body:{student_work_ids:o()(n.actionTabs.selectArrs),cover_all:i,hidden_comment:r.hidden_comment,comment:r.comment}});case 3:0===e.sent.status&&(g.ZP.success("评阅成功"),j.resetFields(),t({type:"shixunHomeworks/setActionTabs",payload:{}}),t({type:"shixunHomeworks/getWorkList",payload:m()({},n.actionTabs.params)}));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(k.Z,{centered:!0,title:"一键点评",open:"一键点评"===n.actionTabs.key,okText:"确定",cancelText:"取消",onOk:d()(c()().mark((function e(){var s;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s=j.getFieldValue(),"{}"===JSON.stringify(s)||""===s.hidden_comment&&""===s.comment?v(!0):n.workList.partial_comment?t({type:"shixunHomeworks/setActionTabs",payload:{key:"一键点评确认",selectArrs:n.actionTabs.selectArrs,params:n.actionTabs.params}}):y();case 2:case"end":return e.stop()}}),e)}))),onCancel:function(){t({type:"shixunHomeworks/setActionTabs",payload:{}})},children:[(0,W.jsxs)(f.Z,{form:j,onChange:function(){_&&v(!1)},children:[(0,W.jsx)("p",{children:"学生和课堂老师可见"}),(0,W.jsx)(f.Z.Item,{name:"comment",children:(0,W.jsx)(b.Z.TextArea,{placeholder:"请输入评阅内容",rows:8})}),(0,W.jsx)("p",{children:"仅课堂老师可见"}),(0,W.jsx)(f.Z.Item,{name:"hidden_comment",children:(0,W.jsx)(b.Z.TextArea,{placeholder:"请输入评阅内容",rows:8})})]}),_&&(0,W.jsx)("p",{className:"c-red",children:"评阅内容至少有一个不为空"})]}),(0,W.jsx)(k.Z,{centered:!0,title:(0,W.jsxs)("span",{children:[(0,W.jsx)(J.Z,{className:"c-orange mr20"}),"提示"]}),open:"一键点评确认"===n.actionTabs.key,okText:"确定点评",cancelText:"放弃点评",onOk:function(){y()},onCancel:function(){t({type:"shixunHomeworks/setActionTabs",payload:{}})},width:400,children:(0,W.jsxs)("div",{className:"tc",children:[(0,W.jsx)("p",{children:"部分学生已有点评内容,是否覆盖已有点评内容?"}),(0,W.jsx)("p",{children:(0,W.jsxs)(S.ZP.Group,{onChange:function(e){l(e.target.value)},value:i,children:[(0,W.jsx)(S.ZP,{value:!0,children:"覆盖已有点评"}),(0,W.jsx)(S.ZP,{value:!1,children:"跳过已有点评"})]})})]})})]})})),M=t(4900),q=t(64118),D="wrap___altfw",Q="MdEditor___OuyKH",U="tr1___nwwbX",X="TableDom___pl59W",Y=["shixunHomeworks","dispatch"],$=(0,B.connect)((function(e){return{shixunHomeworks:e.shixunHomeworks}}))((function(e){var n,t,s=e.shixunHomeworks,o=e.dispatch,r=(G()(e,Y),(0,B.useParams)()),a=(0,x.useState)(!1),i=p()(a,2),l=i[0],u=i[1],m=(0,x.useState)(null===(n=s.actionTabs.selectArrs)||void 0===n||null===(n=n.data)||void 0===n?void 0:n.name),h=p()(m,2),_=h[0],v=h[1],w=f.Z.useForm(),j=p()(w,1)[0];(0,x.useEffect)((function(){var e,n,t;"更改点评"===s.actionTabs.key&&j.setFieldsValue({comment:null===(e=s.actionTabs.selectArrs)||void 0===e||null===(e=e.data)||void 0===e?void 0:e.work_comment,hidden_comment:null===(n=s.actionTabs.selectArrs)||void 0===n||null===(n=n.data)||void 0===n?void 0:n.work_comment_hidden}),v(null===(t=s.actionTabs.selectArrs)||void 0===t||null===(t=t.data)||void 0===t?void 0:t.name)}),[s.actionTabs.key]);var y=function(){var e=d()(c()().mark((function e(){var n,t;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=j.getFieldValue(),e.next=3,(0,R.ZP)("/api/student_works/".concat(null===(n=s.actionTabs.selectArrs)||void 0===n||null===(n=n.data)||void 0===n?void 0:n.homeworkId,"/shixun_work_comment.json"),{method:"post",body:{hidden_comment:t.hidden_comment,comment:t.comment}});case 3:if(0!==e.sent.status){e.next=9;break}return g.ZP.success("评阅成功"),j.resetFields(),o({type:"shixunHomeworks/setActionTabs",payload:{}}),e.abrupt("return",o({type:"shixunHomeworks/getWorkList",payload:r}));case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,W.jsx)(W.Fragment,{children:(0,W.jsxs)(k.Z,{centered:!0,title:null!==(t=s.actionTabs.selectArrs)&&void 0!==t&&null!==(t=t.data)&&void 0!==t&&t.work_comment_hidden?"更改"+_+"点评":_+"点评",open:"更改点评"===s.actionTabs.key,okText:"确定",cancelText:"取消",onOk:d()(c()().mark((function e(){var n;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=j.getFieldValue(),"{}"===JSON.stringify(n)||""===n.hidden_comment&&""===n.comment?u(!0):y();case 2:case"end":return e.stop()}}),e)}))),onCancel:function(){o({type:"shixunHomeworks/setActionTabs",payload:{}})},children:[(0,W.jsxs)(f.Z,{form:j,onChange:function(){l&&u(!1)},children:[(0,W.jsx)("p",{children:"学生和课堂老师可见"}),(0,W.jsx)(f.Z.Item,{name:"comment",children:(0,W.jsx)(b.Z.TextArea,{placeholder:"请输入评阅内容",rows:8})}),(0,W.jsx)("p",{children:"仅课堂老师可见"}),(0,W.jsx)(f.Z.Item,{name:"hidden_comment",children:(0,W.jsx)(b.Z.TextArea,{placeholder:"请输入评阅内容",rows:8})})]}),l&&(0,W.jsx)("p",{className:"c-red",children:"评阅内容至少有一个不为空"})]})})})),ee=["shixunHomeworks","dispatch"],ne=(0,B.connect)((function(e){return{shixunHomeworks:e.shixunHomeworks}}))((function(e){var n=e.shixunHomeworks,t=e.dispatch,s=(G()(e,ee),(0,B.useParams)()),r=(0,x.useState)([]),a=p()(r,2),i=a[0],l=a[1],u=(0,x.useState)([]),m=p()(u,2),h=m[0],f=m[1];function g(){return(g=d()(c()().mark((function e(){var n;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,R.ZP)("/api/homework_commons/".concat(s.categoryId,"/code_quality_analyses/group_list.json"),{method:"GET",params:{page:1,limit:200}});case 2:n=e.sent,l(n);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}(0,x.useEffect)((function(){"质量检测"===n.actionTabs.key&&function(){g.apply(this,arguments)}()}),[n.actionTabs.key]);return(0,W.jsx)(W.Fragment,{children:(0,W.jsx)(k.Z,{centered:!0,title:"代码质量评分",open:"质量检测"===n.actionTabs.key,width:700,okText:"确定",cancelText:"取消",onOk:d()(c()().mark((function e(){var n;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,R.ZP)("/api/homework_commons/".concat(s.categoryId,"/code_quality_analyses.json"),{method:"POST",body:{group_ids:h}});case 2:0===(null==(n=e.sent)?void 0:n.status)&&(B.history.replace("/classrooms/".concat(s.coursesId,"/shixun_homework/").concat(s.categoryId,"/detail?tabs=4")),window.location.reload(),t({type:"shixunHomeworks/setActionTabs",payload:{}}),f([]));case 4:case"end":return e.stop()}}),e)}))),onCancel:function(){f([]),t({type:"shixunHomeworks/setActionTabs",payload:{}})},children:(0,W.jsx)(T.Z,{rowSelection:{type:"checkbox",onChange:function(e,n){f(o()(e))},selectedRowKeys:h,getCheckboxProps:function(e){return{disabled:"进行中"===e.status||0===e.works_count}}},rowKey:function(e){return e.key||e.id},scroll:{y:300},pagination:!1,columns:[{title:"分班情况",dataIndex:"name"},{title:"有效作品数",dataIndex:"works_count"},{title:"检测进度",dataIndex:"status"},{title:"上次评分时间",dataIndex:"last_analysis_time"}],dataSource:null==i?void 0:i.group_list})})})})),te=t(85654),se=t(15959),oe=t(15333),re=(0,B.connect)((function(e){return{shixunHomeworks:e.shixunHomeworks}}))((function(e){e.shixunHomeworks,e.dispatch;var n=e.isShow,t=e.setIsShow,s=e.item,o=(e.coursesId,e.categoryId,(0,x.useState)({page:1,limit:10})),r=p()(o,2),a=r[0],i=r[1],l=(0,x.useState)([]),u=p()(l,2),h=u[0],f=u[1],g=(0,x.useState)(!1),_=p()(g,2),v=_[0],w=_[1];function j(){return y.apply(this,arguments)}function y(){return(y=d()(c()().mark((function e(){var n;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return w(!0),e.next=3,(0,R.ZP)("/api/student_works/".concat(s.id,"/game_details.json"),{method:"get",params:m()({},a)});case 3:n=e.sent,w(!1),0===n.status&&f(null==n?void 0:n.data);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}(0,x.useEffect)((function(){n&&j()}),[n]);var b=[{title:"序号",dataIndex:"number",width:50,fixed:"left",ellipsis:!0,render:function(e,n,t){return(0,W.jsx)("span",{style:{color:"#000"},children:a.limit*(a.page-1)+t+1})}},{title:"任务名称",dataIndex:"name",key:"name",ellipsis:!0,render:function(e,n,t){return(0,W.jsx)("span",{style:{color:"#000"},children:e})}},{title:"通关详情",dataIndex:"complete_status",key:"complete_status",ellipsis:!0,width:100,render:function(e,n,t){return(0,W.jsx)("span",{children:0==e?"未通关":4==e?"截止后通关":"已通关"})}},{title:"评测次数",dataIndex:"evaluate_count",key:"evaluate_count",width:100,ellipsis:!0,render:function(e,n,t){return(0,W.jsx)("span",{style:{color:"#333"},children:e})}},{title:"实训耗时",dataIndex:"time_consuming",key:"time_consuming",width:120,ellipsis:!0,render:function(e,n,t){return(0,W.jsx)("span",{style:{color:"#333"},children:e})}}];return(0,W.jsx)(W.Fragment,{children:(0,W.jsxs)(k.Z,{centered:!0,title:"通关情况",open:n,width:700,footer:null,maskClosable:!1,onCancel:function(){a.page=1,a.limit=10,i(m()({},a)),t(!1)},children:[(0,W.jsxs)("div",{style:{display:"flex",justifyContent:"flex-start",alignItems:"center",marginBottom:"20px"},children:[(0,W.jsxs)("div",{style:{maxWidth:"200px",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",WebkitLineClamp:1},children:[(0,W.jsx)("span",{style:{color:"#666",marginRight:"10px"},children:"学生姓名"}),(0,W.jsx)("span",{title:null==s?void 0:s.user_name,style:{color:"#232B40"},children:null==s?void 0:s.user_name})]}),(0,W.jsxs)("div",{style:{marginLeft:"50px",marginRight:"50px",maxWidth:"180px",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",WebkitLineClamp:1},children:[(0,W.jsx)("span",{style:{color:"#666",marginRight:"10px"},children:"学号"}),(0,W.jsx)("span",{title:null==s?void 0:s.student_id,style:{color:"#232B40"},children:(null==s?void 0:s.student_id)||"--"})]}),(0,W.jsxs)("div",{style:{maxWidth:"200px",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",WebkitLineClamp:1},children:[(0,W.jsx)("span",{style:{color:"#666",marginRight:"10px"},children:"班级"}),(0,W.jsx)("span",{title:null==s?void 0:s.group_name,style:{color:"#232B40"},children:(null==s?void 0:s.group_name)||"--"})]})]}),(0,W.jsx)(T.Z,{scroll:{y:380},columns:b,loading:v,style:{marginBottom:a.limit>(null==h?void 0:h.count)?"16px":"0"},dataSource:h.games,pagination:{size:"default",showQuickJumper:!0,showSizeChanger:!0,pageSizeOptions:["10","15","50","100","200"],hideOnSinglePage:!0,pageSize:a.limit,current:a.page,position:["bottomRight"],onChange:function(e,n){a.page=e,a.limit=n,i(m()({},a)),j()},total:null==h?void 0:h.count,showTotal:function(e,n){return(0,W.jsxs)("span",{children:["共",(0,W.jsxs)("span",{style:{color:"#165DFF"},children:[" ",e," "]}),"条数据"]})}}})]})})})),ae=function(e){var n=e.value,t=e.placeholder,s=void 0===t?"":t;if(null==n||""===n)return(0,W.jsx)("span",{children:s});var o=Number(n);return o>=80?(0,W.jsx)("span",{style:{color:"#009C0F"},children:o}):o<80&&o>=60?(0,W.jsx)("span",{style:{color:"#FA6400"},children:o}):o<60?(0,W.jsx)("span",{style:{color:"#E30000"},children:o}):void 0},ie=(0,B.connect)((function(e){var n=e.shixunHomeworks,t=e.classroomList,s=e.loading,o=e.user;return{shixunHomeworks:n,classroomList:t,loading:s.effects,user:o}}))((function(e){var n,t,s,r,i,l,u,h,E,G,J,z,Y=e.shixunHomeworks,ee=e.classroomList,ie=e.loading,ce=e.dispatch,le=e.setExportParams,de=e.user,ue=(0,B.useParams)(),me=(0,x.useState)(m()(m()({},{page:1,limit:20,order:"work_score",b_order:"desc"}),ue)),he=p()(me,2),pe=he[0],xe=(he[1],f.Z.useForm()),fe=p()(xe,1)[0],ge=(0,x.useState)(),_e=p()(ge,2),ke=_e[0],ve=(_e[1],(0,x.useState)({})),we=p()(ve,2),je=we[0],ye=we[1],be=(0,x.useState)([]),Ze=p()(be,2),Ie=(Ze[0],Ze[1]),Te=(0,x.useState)(!1),Se=p()(Te,2),Pe=Se[0],Ce=Se[1],He=(0,x.useState)([]),Ae=p()(He,2),Oe=Ae[0],Ne=Ae[1],Le=(0,x.useState)(!1),Fe=p()(Le,2),Ve=Fe[0],Ee=Fe[1],Ge=(0,x.useState)(),Je=p()(Ge,2),Re=Je[0],Be=Je[1],We=(0,x.useState)(1),ze=p()(We,2),Ke=ze[0],Me=ze[1],qe=(0,x.useState)(),De=p()(qe,2),Qe=(De[0],De[1]),Ue=(0,x.useState)(),Xe=p()(Ue,2),Ye=Xe[0],$e=Xe[1],en=(0,x.useState)(),nn=p()(en,2),tn=nn[0],sn=nn[1],on=(0,x.useState)(),rn=p()(on,2),an=rn[0],cn=rn[1],ln=(0,x.useState)(),dn=p()(ln,2),un=dn[0],mn=dn[1],hn=(0,x.useState)(!1),pn=p()(hn,2),xn=pn[0],fn=pn[1],gn=(0,x.useState)(!1),_n=p()(gn,2),kn=_n[0],vn=_n[1],wn=(0,x.useState)(),jn=p()(wn,2),yn=jn[0],bn=jn[1];(0,B.useLocation)();(0,x.useEffect)((function(){return Zn(),function(){ye([]),Ie([])}}),[pe.coursesId]),(0,x.useEffect)((function(){var e,n=JSON.parse(JSON.stringify(Y.workList));null!=n&&null!==(e=n.student_works)&&void 0!==e&&e.length||null==n||!n.id?(null!=n&&n.id&&Ie([m()(m()({},n),{number:"我"})]),ye(m()({},n))):(n.student_works=[m()({},n)],ye(n))}),[Y.workList]);var Zn=function(e){return le(m()({},pe)),ce({type:"shixunHomeworks/getWorkList",payload:pe})};(0,x.useEffect)((function(){ce({type:"user/getUserInfo",payload:{course_id:pe.coursesId}})}),[]);var In=function(){var e=d()(c()().mark((function e(){var n;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return ce({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"成绩计算中,请稍候..."}}),e.next=3,(0,M.Vs)({categoryId:ue.categoryId});case 3:n=e.sent,ce({type:"globalSetting/setGlobalLoading",payload:{show:!1,text:""}}),0===(null==n?void 0:n.status)&&(g.ZP.success(null==n?void 0:n.message),Zn());case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();(0,x.useEffect)((function(){document.getElementById("divhe")&&(document.getElementById("divhe").scrollHeight>47&&(mn(47),fn(!0)))}),[document.getElementById("divhe")]);function Tn(){Me(1),Qe(""),$e(""),sn(""),cn(""),Ne([])}var Sn=[{title:"序号",dataIndex:"number",align:"center",width:50,fixed:"left",ellipsis:!0,render:function(e,n,t){return pe.limit*(pe.page-1)+t+1}},{title:"姓名",dataIndex:"user_name",align:"center",width:110,fixed:"left",ellipsis:!0,render:function(e){return(0,W.jsx)(_.Z,{placement:"bottomLeft",title:e,children:(0,W.jsx)("span",{className:"current",children:e})})}},!(0,q.Jd)()&&{title:"学号",dataIndex:"student_id",align:"center",sorter:!0,fixed:"left",width:100,ellipsis:!0,showSorterTooltip:!1,sortOrder:"student_id"===pe.order?"desc"===pe.b_order?"descend":"ascend":null,render:function(e){return(0,W.jsx)(_.Z,{placement:"bottomLeft",title:e||"--",children:(0,W.jsx)("span",{className:"current",children:e||"--"})})}},{title:"分班",dataIndex:"group_name",align:"center",width:100,fixed:"left",ellipsis:!0,render:function(e,n){return e?(0,W.jsx)(_.Z,{placement:"bottom",title:e,children:(0,W.jsx)("span",{className:"current",children:e})}):"--"}},{title:"作业状态",dataIndex:"work_status",align:"center",width:94,ellipsis:!0,fixed:"left",sorter:!0,showSorterTooltip:!1,sortOrder:"work_status"===pe.order?"desc"===pe.b_order?"descend":"ascend":null,render:function(e){return(0,W.jsx)(F.lC,{status:e})}},{title:"完成时间",align:"center",dataIndex:"achieve_time",ellipsis:!0,sorter:!0,sortOrder:"achieve_time"===pe.order?"desc"===pe.b_order?"descend":"ascend":null,render:function(e,n){return(0,W.jsx)(_.Z,{placement:"bottomLeft",title:e,children:(0,W.jsx)("span",{className:"current",children:e})})}},{title:"通过情况",align:"center",dataIndex:"achieve_info",ellipsis:!0,render:function(e,n){return(0,W.jsx)("span",{onClick:function(e){var t;e.stopPropagation(),null!==(t=je.homework_status)&&void 0!==t&&t.includes("导入")&&(bn(n),vn(!0))},children:e||"- -"})}},{title:"最终成绩",align:"center",dataIndex:"score",ellipsis:!0,sorter:!0,sortOrder:"work_score"===pe.order?"desc"===pe.b_order?"descend":"ascend":null,render:function(e,n){return(0,W.jsx)(ae,{value:e,placeholder:"- -"})}},{title:"完成时长",dataIndex:"achieve_time_long",align:"center",sorter:!0,ellipsis:!0,sortOrder:"achieve_time_long"===pe.order?"desc"===pe.b_order?"descend":"ascend":null,render:function(e,n){return e&&"--"!=e?(0,W.jsx)(_.Z,{placement:"bottom",title:e,children:(0,W.jsx)("span",{className:"current",children:e})}):"--"}},(null===(n=je.homework_status)||void 0===n?void 0:n.includes("导入"))&&{title:"评测次数",dataIndex:"sum_evaluate_count",align:"center"},!(null!==(t=je.homework_status)&&void 0!==t&&t.includes("导入"))&&{title:(0,W.jsx)("span",{children:"评阅状态"}),align:"center",dataIndex:"has_comment",fixed:"right",ellipsis:!0,render:function(e){return e?"已评阅":"未评阅"}},{title:"操作",dataInex:"action",align:"center",fixed:"right",ellipsis:!0,className:"workListTable",render:function(e,n){var t;return null!==(t=je.homework_status)&&void 0!==t&&t.includes("导入")?(0,q.GJ)()?(0,W.jsx)("a",{onClick:function(e){e.stopPropagation(),ce({type:"classroomList/setActionTabs",payload:{key:"修改成绩",id:null==n?void 0:n.id,type:"normal"}})},children:"修改成绩"}):(0,W.jsx)("a",{onClick:function(e){e.stopPropagation(),bn(n),vn(!0)},children:"查看"}):(0,q.dE)()?(0,W.jsx)("div",{children:"未开启"===(0,F.JL)(null==n?void 0:n.work_status)?(0,W.jsx)("span",{children:"--"}):(0,W.jsx)("a",{onClick:function(e){var t;e.stopPropagation(),!(0,q.Rm)()||null!==(t=ee.AssistantObject.hack)&&void 0!==t&&t.can_view?window.open("/classrooms/".concat(pe.coursesId,"/program_homework/").concat(pe.categoryId,"/").concat(n.id,"/").concat(n.user_id,"/comment"),"_blank"):g.ZP.warning("您未获取此权限,需向课堂管理员申请权限才能使用此功能")},children:"查看"})}):(0,W.jsx)("a",{target:"_blank",onClick:function(e){var t,s;if(e.stopPropagation(),!(0,q.Rm)()||null!==(t=ee.AssistantObject.hack)&&void 0!==t&&t.can_view)return null!==(s=de.userInfo)&&void 0!==s&&s.professional_certification?void window.open("/classrooms/".concat(pe.coursesId,"/program_homework/").concat(pe.categoryId,"/").concat(n.id,"/").concat(n.user_id,"/comment"),"_blank"):(k.Z.confirm({title:"提示",centered:!0,content:(0,W.jsx)("div",{className:"tc",children:"您需要去完成您的职业认证,才能使用此功能"}),okText:"立即完善",cancelText:"稍后完善",onOk:function(){(0,F.xg)("/account/certification")}}),!1);g.ZP.warning("您未获取此权限,需向课堂管理员申请权限才能使用此功能")},children:"查看作业"})}}].filter((function(e){return!!e}));return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)("section",{className:"".concat(D," minH500 bg-white pl30 pr30 pt30"),children:[(null===(s=je.homework_status)||void 0===s?void 0:s.includes("未发布"))&&(0,W.jsx)(L.Z,{}),!(null!==(r=je.homework_status)&&void 0!==r&&r.includes("未发布"))&&(0,W.jsxs)("aside",{children:[!(0,q.GJ)()&&(0,W.jsxs)("div",{className:"c-light-black font12",children:[(0,W.jsxs)("span",{children:["发布时间 ",null==je?void 0:je.publish_time]}),(0,W.jsxs)("span",{className:"ml5",children:["截止时间 ",null==je?void 0:je.end_time]}),(0,W.jsxs)("span",{className:"ml5",children:["补交时间 ",(null==je?void 0:je.late_time)||"- -"]})]}),(0,q.GJ)()&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(f.Z,{form:fe,onChange:function(){pe.page=1;var e=Object.assign({},fe.getFieldsValue());delete pe.course_group,delete pe.teacher_comment,Object.keys(e).map((function(n){switch(n){case"task_status":e[n].includes("all")||!e[n].length?(delete pe.work_status,fe.setFieldsValue(a()({},"task_status","all"))):(pe.work_status=e[n],fe.setFieldsValue(a()({},"task_status",pe.work_status)));break;case"course_group_info":e[n].includes("all")||!e[n].length?(delete pe.course_group,fe.setFieldsValue(a()({},"course_group_info","all"))):(pe.course_group=e[n],fe.setFieldsValue(a()({},"course_group_info",pe.course_group)));break;case"teacher_comment":var t;if(e[n].includes("all")||!e[n].length)delete pe.teacher_comment,fe.setFieldsValue(a()({},"teacher_comment","all"));else pe.teacher_comment=1===(null===(t=e[n])||void 0===t?void 0:t.length)?Number(e[n][0]):"",fe.setFieldsValue(a()({},"teacher_comment",e[n]))}})),Zn()},initialValues:a()(a()(a()({},"task_status","all"),"course_group_info","all"),"teacher_comment","all"),children:[(null===(i=je.task_status)||void 0===i?void 0:i.length)>0&&(0,W.jsx)(f.Z.Item,{name:"task_status",children:(0,W.jsx)(w.Z.Group,{value:[],style:{width:"100%"},children:(0,W.jsxs)(j.Z,{children:[(0,W.jsx)(y.Z,{className:"font14",flex:"80px",children:"作业状态:"}),(0,W.jsx)(y.Z,{flex:"80px",children:(0,W.jsx)(w.Z,{value:"all",children:"全部"})}),(0,W.jsx)(y.Z,{flex:"1",children:je.task_status&&je.task_status.map((function(e,n){return(0,W.jsxs)(w.Z,{name:"task_status",value:e.id,children:[e.name,"(",e.count,")"]})}))})]})})}),(null===(l=je.course_group_info)||void 0===l?void 0:l.length)>0&&(0,W.jsx)(f.Z.Item,{name:"course_group_info",children:(0,W.jsx)(w.Z.Group,{style:{width:"100%"},children:(0,W.jsxs)(j.Z,{children:[(0,W.jsx)(y.Z,{className:"font14",flex:"80px",children:"分班情况:"}),(0,W.jsx)(y.Z,{flex:"80px",children:(0,W.jsx)(w.Z,{value:"all",children:"全部"})}),(0,W.jsx)(y.Z,{flex:"1",id:"divhe",style:{height:un+"px",overflow:"hidden"},children:null===(u=je.course_group_info)||void 0===u?void 0:u.map((function(e,n){return(0,W.jsxs)(w.Z,{value:e.course_group_id,children:[e.group_group_name,"(",e.count,")"]})}))}),xn&&(0,W.jsxs)("span",{onClick:function(){var e=document.getElementById("divhe").scrollHeight;mn(un>47?47:e)},style:{color:"rgb(76, 172, 255)",cursor:"pointer",alignItems:"flex-end",display:"flex"},children:[47===un?"展开":"收起",47===un?(0,W.jsx)(H.Z,{style:{marginBottom:"3px",marginLeft:"2px"}}):(0,W.jsx)(A.Z,{style:{marginBottom:"3px",marginLeft:"2px"}})]})]})})}),(null===(h=je.teacher_comment)||void 0===h?void 0:h.length)>0&&(0,W.jsx)(f.Z.Item,{name:"teacher_comment",children:(0,W.jsx)(w.Z.Group,{style:{width:"100%"},children:(0,W.jsxs)(j.Z,{children:[(0,W.jsx)(y.Z,{className:"font14",flex:"80px",children:"追加点评:"}),(0,W.jsx)(y.Z,{flex:"80px",children:(0,W.jsx)(w.Z,{value:"all",children:"全部"})}),(0,W.jsx)(y.Z,{flex:"1",children:je.teacher_comment&&je.teacher_comment.map((function(e,n){return(0,W.jsxs)(w.Z,{value:String(e.id),children:[e.name,"(",e.count,")"]})}))})]})})})]}),(0,W.jsxs)(j.Z,{align:"middle",children:[(0,W.jsx)(y.Z,{flex:"1",children:(0,W.jsxs)(j.Z,{align:"middle",children:[(0,W.jsx)(y.Z,{children:(0,W.jsx)(b.Z.Search,{allowClear:!0,placeholder:"请输入姓名或者学号搜索",onSearch:function(e){pe.search=e.trim(),pe.page=1,Zn()},style:{width:240}})}),(0,W.jsx)(y.Z,{children:(0,W.jsxs)("span",{className:"ml5",children:[(0,W.jsx)("span",{className:"c-red",children:je.work_count}),"个检索结果(",je.work_count,"个学生)"]})})]})}),(0,W.jsxs)(y.Z,{children:[(0,q.GJ)()&&!(null!==(E=je.homework_status)&&void 0!==E&&E.includes("导入"))&&(0,W.jsxs)(Z.ZP,{className:"ml10",onClick:function(){ce({type:"shixunHomeworks/setActionTabs",payload:{key:"代码查重",selectArrs:je.student_works.map((function(e){return e.id})),params:pe}})},children:[(0,W.jsx)("span",{className:"".concat(U," iconfont icon-daimachazhong")}),"代码查重"]}),(0,q.GJ)()&&!(null!==(G=je.homework_status)&&void 0!==G&&G.includes("导入"))&&(0,W.jsxs)(Z.ZP,{className:"ml10",onClick:In,children:[(0,W.jsx)("i",{className:"iconfont icon-gengxinchengji font14 pr5"}),"更新成绩"]}),(0,q.GJ)()&&(0,W.jsx)(I.Z,{dropdownRender:function(){var e,n;return(0,W.jsxs)(v.Z,{children:[(0,W.jsx)(v.Z.Item,{onClick:function(){var e;!(0,q.Rm)()||null!==(e=ee.AssistantObject.hack)&&void 0!==e&&e.can_download?ce({type:"classroomList/setActionTabs",payload:{key:"选择班级",title:"导出学生成绩",course_groups:null==je?void 0:je.course_group_info,fn:function(){(0,se.Iy)(JSON.parse(sessionStorage.all_student_works_params),"hack_work_list")}}}):g.ZP.warning("您未获取此权限,需向课堂管理员申请权限才能使用此功能")},children:"学生成绩"},"1"),(0,q.GJ)()&&(null==je||null===(e=je.student_works)||void 0===e?void 0:e.length)>0&&!(null!=je&&null!==(n=je.homework_status)&&void 0!==n&&n.includes("导入"))&&(0,W.jsx)(v.Z.Item,{onClick:function(){var e;!(0,q.Rm)()||null!==(e=ee.AssistantObject.hack)&&void 0!==e&&e.can_download?ce({type:"classroomList/setActionTabs",payload:{key:"选择班级",title:"导出编程报告",course_groups:null==je?void 0:je.course_group_info,fn:function(){var e,n;ce({type:"shixunHomeworks/setActionTabs",payload:{key:"导出编程报告",type:2}}),localStorage.setItem("dowolders","1"),B.history.push("/classrooms/".concat(null==pe?void 0:pe.coursesId,"/program_homework/").concat(pe.categoryId,"/").concat(null==je||null===(e=je.student_works)||void 0===e||null===(e=e[0])||void 0===e?void 0:e.id,"/").concat(null==je||null===(n=je.student_works)||void 0===n||null===(n=n[0])||void 0===n?void 0:n.user_id,"/comment"))}}}):g.ZP.warning("您未获取此权限,需向课堂管理员申请权限才能使用此功能")},children:"编程报告"},"3"),(0,W.jsx)(v.Z.Item,{onClick:function(){var e;!(0,q.Rm)()||null!==(e=ee.AssistantObject.hack)&&void 0!==e&&e.can_download?B.history.push("/classrooms/".concat(pe.coursesId,"/exportlist/hack_work_list")):g.ZP.warning("您未获取此权限,需向课堂管理员申请权限才能使用此功能")},children:"历史导出"},"2")]})},className:"ml10",children:(0,W.jsxs)(Z.ZP,{children:[(0,W.jsx)(O.Z,{}),"导出",(0,W.jsx)(N.Z,{})]})})]})]})]}),(0,W.jsx)(j.Z,{style:{justifyContent:"end",marginTop:"5px"},children:(0,q.GJ)()&&ke&&(0,W.jsxs)("span",{children:[(0,W.jsx)("span",{style:{color:"red"},children:"*"}),"列表中作业记录存在差异,请点击“更新成绩”按钮"]})}),(0,W.jsx)(T.Z,{className:"mt30 ".concat(X),loading:ie["shixunHomeworks/getWorkList"],pagination:!1,style:{cursor:"pointer"},onRow:function(e){return{onClick:function(n){var t,s;null!==(t=je.homework_status)&&void 0!==t&&t.includes("导入")||(!(0,q.Rm)()||null!==(s=ee.AssistantObject.hack)&&void 0!==s&&s.can_view?(0,oe.O5)()&&window.open("/classrooms/".concat(pe.coursesId,"/program_homework/").concat(pe.categoryId,"/").concat(e.id,"/").concat(e.user_id,"/comment"),"_blank"):g.ZP.warning("您未获取此权限,需向课堂管理员申请权限才能使用此功能"))}}},scroll:{x:1200},dataSource:je.student_works,columns:Sn,onChange:function(e,n,t){t.field&&(pe.order="score"===t.field?"work_score":t.field),t.order||(pe.b_order="asc"),"ascend"===t.order&&(pe.b_order="asc"),"descend"===t.order&&(pe.b_order="desc"),t.order||(pe.b_order="asc"),Zn()}}),(0,W.jsx)(K,{}),(0,W.jsx)($,{}),(0,W.jsx)(V.Z,{})]}),(0,W.jsx)(k.Z,{title:"一键打回重做",open:Pe,centered:!0,destroyOnClose:!0,forceRender:!0,width:700,onOk:d()(c()().mark((function e(){var n,t;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(2!==Ke){e.next=13;break}if(!(Oe.length<=0)){e.next=4;break}return g.ZP.info("请选择作业状态"),e.abrupt("return");case 4:if(an){e.next=7;break}return g.ZP.info("评语不能为空"),e.abrupt("return");case 7:return e.next=9,(0,R.ZP)("/api/homework_commons/".concat(pe.categoryId,"/confirm_redo_modal.json"),{method:"post",body:{id:pe.categoryId,comment:an,status:Oe}});case 9:0===(n=e.sent).status&&(Be(n),Ce(!1),Ee(!0)),e.next=32;break;case 13:if(0!==tn&&0!==Ye){e.next=16;break}e.next=22;break;case 16:if(tn){e.next=19;break}return g.ZP.info("最低分不能为空"),e.abrupt("return");case 19:if(Ye){e.next=22;break}return g.ZP.info("最高分不能为空"),e.abrupt("return");case 22:if(!(tn>Ye)){e.next=25;break}return g.ZP.info("最高分不能大于最低分"),e.abrupt("return");case 25:if(an){e.next=28;break}return g.ZP.info("评语不能为空"),e.abrupt("return");case 28:return e.next=30,(0,R.ZP)("/api/homework_commons/".concat(pe.categoryId,"/confirm_redo_modal.json"),{method:"post",body:{id:pe.categoryId,comment:an,min_score:tn,max_score:Ye}});case 30:0===(t=e.sent).status&&(Be(t),Ce(!1),Ee(!0));case 32:case"end":return e.stop()}}),e)}))),onCancel:function(){Ce(!1),Tn()},children:(0,W.jsx)("div",{style:{padding:"32px"},children:(0,W.jsxs)("div",{children:[(0,W.jsxs)("div",{children:[(0,W.jsx)("span",{style:{width:"80px"},children:"打回方式:"}),(0,W.jsxs)(S.ZP.Group,{value:Ke,onChange:function(e){Me(e.target.value)},children:[(0,W.jsx)(S.ZP,{value:1,children:"按成绩打回"}),(0,W.jsx)(S.ZP,{value:2,children:"按作业状态打回"})]})]}),1===Ke&&(0,W.jsxs)("div",{style:{display:"flex",marginTop:"20px"},children:[(0,W.jsxs)("span",{style:{width:"70px",textAlign:"end"},children:[(0,W.jsx)("span",{style:{color:"red"},children:"*"}),"最低分:"]}),(0,W.jsx)(P.Z,{min:0,max:100,value:tn,onChange:function(e){return sn(e)},style:{width:"100px"}}),(0,W.jsxs)("span",{style:{width:"80px",textAlign:"end"},children:[(0,W.jsx)("span",{style:{color:"red"},children:"*"}),"最高分:"]}),(0,W.jsx)(P.Z,{min:0,max:100,value:Ye,onChange:function(e){return $e(e)},style:{width:"100px"}})]}),2===Ke&&(0,W.jsxs)("div",{style:{display:"flex",marginTop:"20px"},children:[(0,W.jsx)("span",{style:{width:"80px"},children:"作业状态:"}),(0,W.jsx)(w.Z.Group,{onChange:function(e){Ne(o()(e))},style:{width:"100%"},children:null===(J=je.task_status)||void 0===J?void 0:J.map((function(e,n){return(0,W.jsxs)(w.Z,{name:"task_status",value:e.id,children:[e.name,"(",e.count,")"]})}))})]}),(0,W.jsxs)("div",{style:{display:"flex",marginTop:"20px"},children:[(0,W.jsxs)("span",{style:{width:"70px",textAlign:"end"},children:[(0,W.jsx)("span",{style:{color:"red"},children:"*"})," 评语:"]}),(0,W.jsx)(te.Z,{className:Q,onChange:function(e){return cn(e)},placeholder:"请填写评语"})]})]})})}),(0,W.jsx)(k.Z,{open:Ve,title:"打回确认",onOk:d()(c()().mark((function e(){return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(2!==Ke){e.next=7;break}return e.next=3,(0,R.ZP)("/api/homework_commons/".concat(pe.categoryId,"/batch_redo_modal.json"),{method:"post",body:{id:pe.categoryId,comment:an,status:Oe}});case 3:0===e.sent.status&&(g.ZP.info("打回成功"),Tn(),Zn(),Ee(!1)),e.next=11;break;case 7:return e.next=9,(0,R.ZP)("/api/homework_commons/".concat(pe.categoryId,"/batch_redo_modal.json"),{method:"post",body:{id:pe.categoryId,comment:an,min_score:tn,max_score:Ye}});case 9:0===e.sent.status&&(g.ZP.info("打回成功"),Tn(),Zn(),Ee(!1));case 11:case"end":return e.stop()}}),e)}))),onCancel:function(){Tn(),Ee(!1)},children:(0,W.jsxs)("div",{style:{padding:"32px"},children:[1===Ke&&(0,W.jsxs)("span",{children:["确认将成绩在",tn,"-",Ye,"的学生进行打回重做吗?"]}),2===Ke&&(0,W.jsxs)("span",{children:["确认将作业状态为",(null===(z=je.task_status)||void 0===z?void 0:z.filter((function(e){return null==Oe?void 0:Oe.includes(e.id)})).map((function(e){return e.name})).toString())+",","的学生进行作业打回重做吗?"]}),(0,W.jsx)("br",{}),(0,W.jsxs)("span",{children:["该条件下共有",null==Re?void 0:Re.count,"名学生"]})]})})]}),(0,W.jsx)(ne,{}),(0,W.jsx)(re,{isShow:kn,setIsShow:vn,item:yn,coursesId:pe.coursesId,categoryId:pe.categoryId}),(0,W.jsx)("aside",{className:"tc mb50 mt30",children:(0,W.jsx)(C.Z,{showQuickJumper:!0,hideOnSinglePage:!0,showSizeChanger:!1,onChange:function(e,n){pe.page=e,pe.limit=20,Zn()},current:pe.page||1,defaultPageSize:20,total:je.work_count})})]})}))}}]);