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/p__Classrooms__Lists__Group...

1 line
240 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([[10195,70516],{67016:function(e,n,t){t.d(n,{Z:function(){return x}});var s=t(82242),i=t.n(s),a=t(7557),l=t.n(a),r=t(41498),o=t.n(r),u=t(79800),c=t.n(u),d=t(39647),m=t.n(d),p=t(3113),_=t(59301),h=t(37712),f=["children"],x=function(e){var n=e.children,t=m()(e,f),s=(0,_.useState)(!1),a=c()(s,2),r=a[0],u=a[1];return(0,h.jsx)(p.ZP,i()(i()({},t),{},{loading:r,onClick:function(){var e=o()(l()().mark((function e(n){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,u(!0),e.next=4,t.onClick(n);case 4:u(!1),e.next=11;break;case 7:e.prev=7,e.t0=e.catch(0),console.error(e.t0),u(!1);case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(n){return e.apply(this,arguments)}}(),children:n}))}},80839:function(e,n,t){t.r(n),t.d(n,{default:function(){return On}});var s=t(37205),i=t.n(s),a=t(7557),l=t.n(a),r=t(41498),o=t.n(r),u=t(82242),c=t.n(u),d=t(79800),m=t.n(d),p=t(59301),_=t(75102),h=t(49127),f=t(3113),x=t(8591),v=t(66104),g=t(6848),y=t(99313),j=t(43418),w=t(95237),b=t(43604),k=t(98135),Z=t(14491),N=t(22596),I=t(11298),P=t(95888),S=t(85573),H=t.n(S),O=t(78241),C=t(20834),L=t(24905),T=t(38854),Y=t(53864),A=t(5112),D=t(94001),F=t(57809),R=t(43501),E=t(53547),M=t(44770),V=t(86984),W=t(10032),z=t(52943),G=t(37712),J=(0,_.connect)((function(e){return{shixunHomeworks:e.shixunHomeworks}}))((function(e){var n=e.shixunHomeworks,t=e.dispatch,s=(0,_.useParams)();return(0,G.jsxs)(j.Z,{centered:!0,title:"提示",open:"打回重做"===n.actionTabs.key,okText:"确定",cancelText:"取消",onOk:o()(l()().mark((function e(){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,W.ZP)("/api/myshixuns/".concat(n.actionTabs.selectArrs.myshixun_identifier,"/reset_my_game.json"),{method:"post",body:{course_id:s.coursesId}});case 2:0===e.sent.status&&(x.ZP.success("删除成功"),t({type:"shixunHomeworks/setActionTabs",payload:{}}),t({type:"shixunHomeworks/getWorkList",payload:c()({},n.actionTabs.params)}));case 4:case"end":return e.stop()}}),e)}))),onCancel:function(){t({type:"shixunHomeworks/setActionTabs",payload:{}})},children:[(0,G.jsx)("p",{children:"该作业将被打回重做,学生实训记录将被清空!"}),(0,G.jsx)("p",{children:"确定打回?"})]})})),q=(0,_.connect)((function(e){return{shixunHomeworks:e.shixunHomeworks}}))((function(e){var n=e.shixunHomeworks,t=e.dispatch,s=((0,_.useParams)(),(0,p.useState)(!0)),i=m()(s,2),a=(i[0],i[1],(0,p.useState)(!1)),r=m()(a,2),u=r[0],d=r[1],h=O.Z.useForm(),f=m()(h,1)[0];return(0,G.jsx)(G.Fragment,{children:(0,G.jsxs)(j.Z,{centered:!0,title:"调分",open:"调分"===n.actionTabs.key,okText:"确定",cancelText:"取消",confirmLoading:u,onOk:o()(l()().mark((function e(){var s;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,f.validateFields();case 2:return s=f.getFieldsValue(),d(!0),e.next=6,(0,W.ZP)("/api/student_works/".concat(n.actionTabs.id,"/adjust_score.json"),{method:"post",body:c()({},s)});case 6:0===e.sent.status&&(x.ZP.success("评阅成功"),f.resetFields(),t({type:"shixunHomeworks/setActionTabs",payload:{}}),t({type:"shixunHomeworks/getWorkList",payload:c()({},n.actionTabs.params)})),d(!1);case 9:case"end":return e.stop()}}),e)}))),onCancel:function(){t({type:"shixunHomeworks/setActionTabs",payload:{}})},children:[(0,G.jsx)("p",{className:"tc",children:"该学生的最终成绩将不会按照评分规则进行计算"}),(0,G.jsxs)(O.Z,{form:f,layout:"horizontal",children:[(0,G.jsxs)("div",{style:{display:"flex",alignItems:"baseline"},children:[(0,G.jsx)(O.Z.Item,{label:"成绩",name:"score",rules:[{required:!0,message:"请输入!"}],children:(0,G.jsx)(D.Z,{min:0,placeholder:"请填写分数"})}),(0,G.jsx)("span",{className:"ml10",children:"分"})]}),(0,G.jsx)("div",{children:(0,G.jsx)(O.Z.Item,{name:"comment",children:(0,G.jsx)(k.Z.TextArea,{placeholder:"请填写您对作品调分的原因",rows:8})})})]})]})})})),B=t(70464),Q={flex_box_center:"flex_box_center___NBXH7",flex_space_between:"flex_space_between___l6hzm",flex_box_vertical_center:"flex_box_vertical_center___m8uTT",flex_box_center_end:"flex_box_center_end___BwXBn",flex_box_column:"flex_box_column___amI5B",wrap:"wrap___d__UZ",MdEditor:"MdEditor___QRYr6",workListButtonWrap:"workListButtonWrap___lhXWg",anticon:"anticon___b_3pM",workListClass:"workListClass___EI4Fm",left:"left___wBY4f",visible:"visible___uwm7P",status:"status___DUABx",tips:"tips___H3M_T",tableWrapper:"tableWrapper___EW8TX",atitle:"atitle___XxlIn",tables:"tables___thRYc"},U=t(70516),K=t(67016),X=t(12752),$=t(89392),ee=t(99232),ne=t.n(ee),te=t(52560),se=t(70070),ie=t(5095),ae=(0,_.connect)((function(e){var n=e.shixunHomeworks,t=e.classroomList,s=e.globalSetting;return{shixunHomeworks:n,classroomList:t,loading:e.loading.effects,globalSetting:s}}))((function(e){var n,t,s,i,a,r,u=e.shixunHomeworks,d=(e.user,e.loading),h=e.dispatch,f=e.classroomList,v=e.globalSetting,y=(0,_.useParams)(),k=u.workList,N=u.workSetting,S=(0,te.U)(se.Gw,{homeworkId:null==k?void 0:k.id}),H=m()(S,3),O=H[1],C=H[2],L=(0,p.useState)([]),T=m()(L,2),Y=T[0],A=T[1],D=[(null==k?void 0:k.base_on_project)&&{title:"关联项目",align:"left",dataIndex:"base_on_project",width:200,render:function(e,n){var t,s,i,a,l,r;return{children:-1!==(null===(t=n.project_info)||void 0===t?void 0:t.id)?(0,G.jsx)("a",{target:"_blank",title:null===(s=n.project_info)||void 0===s?void 0:s.name,href:"".concat(null==v||null===(i=v.setting)||void 0===i?void 0:i.old_url).concat(null===(a=n.project_info)||void 0===a?void 0:a.id),style:{whiteSpace:"break-spaces"},children:null===(l=n.project_info)||void 0===l?void 0:l.name}):null===(r=n.project_info)||void 0===r?void 0:r.name,props:{rowSpan:n.rowSpan}}}},{title:"姓名",align:"left",dataIndex:"user_name",ellipsis:!0,width:150,render:function(e,n){return(0,G.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,G.jsxs)("span",{className:Q.atitle,style:{width:n.is_leader?"":130,maxWidth:n.is_leader&&80},children:[" ",e]}),n.is_leader&&(0,G.jsx)("span",{style:{display:"inline-flex",background:"rgba(22,93,255,0.2)",width:32,height:18,borderRadius:2,color:"#3061D0",alignItems:"center",justifyContent:"center",fontSize:10,marginLeft:10},children:"组长"})]})}},(null==k?void 0:k.base_on_project)&&{title:"代码行数",align:"left",dataIndex:"code_lines_count",width:80,render:function(e){return e||"--"}},(null==k?void 0:k.base_on_project)&&{title:"issue数量",align:"left",dataIndex:"issues_count",width:80,render:function(e,n){return e||"--"}},(null==k?void 0:k.base_on_project)&&{title:"更新时间",align:"left",dataIndex:"update_time",width:140,render:function(e,n){return{children:e?(0,G.jsxs)("span",{style:{display:"block",alignItems:"center"},children:["更新代码",(0,G.jsx)("br",{}),ne()(e).format("YYYY-MM-DD HH:mm")]}):"--",props:{rowSpan:n.rowSpan}}}},{title:"作品状态",dataIndex:"work_status",align:"left",width:150,render:function(e,n){return{children:-1===e?"重做中":(0,G.jsx)(I.Uw,{status:e}),props:{rowSpan:n.rowSpan}}}},{title:"分组",align:"left",dataIndex:"work_group",width:70,render:function(e,n){return{children:(0,G.jsx)("span",{className:"c-blue",children:e}),props:{rowSpan:n.rowSpan}}}},{title:"当前成绩",align:"left",dataIndex:"work_score",width:150,render:function(e,n){return(0,G.jsx)(g.Z,{placement:"bottom",title:(0,G.jsxs)("div",{children:[(0,G.jsx)("div",{children:n.teacher_score?"教师评分:".concat(n.teacher_score,"分"):"教师评分0.0分"}),(0,G.jsx)("div",{children:n.teaching_asistant_score?"助教评分:".concat(n.teaching_asistant_score,"分"):"助教评分0.0分"}),null!=k&&k.anonymous_comment?(0,G.jsx)("div",{children:n.student_score?"匿评评分:".concat(n.student_score,"分"):"匿评评分0.0分"}):"",null!=k&&k.is_group_grade?(0,G.jsx)("div",{children:n.group_leader_score?"组长评分:".concat(n.group_leader_score,"分"):"组长评分0.0分"}):"",(0,G.jsx)("div",{children:n.late_penalty?"补交扣分:".concat(n.late_penalty,"分"):"补交扣分0.0分"}),(0,G.jsx)("div",{children:n.repeat_minus_score?"查重扣分:".concat(n.repeat_minus_score,"分"):"查重扣分0.0分"}),null!=k&&k.anonymous_comment?(0,G.jsx)("div",{children:n.absence_penalty?"缺评扣分:".concat(n.absence_penalty,"分"):"缺评扣分0.0分"}):"",(null==k?void 0:k.anonymous_appeal)&&"违评扣分:".concat(n.appeal_penalty||"0.0","分"),(0,G.jsx)("div",{children:n.work_score?"最终成绩:".concat(n.work_score,"分"):"最终成绩0.0分"}),!(null!=k&&k.is_jupyter||null!=k&&k.is_jupyter_lab)&&(0,G.jsx)("div",{onClick:function(e){e.stopPropagation(),_.history.push("/classrooms/".concat(y.coursesId,"/group_homework/").concat(y.categoryId,"/review/").concat(n.id))},style:{color:"#8bb6fd",cursor:"pointer"},children:"查看评分 >"})]}),children:e>0?(0,G.jsx)("span",{style:{color:"#ff8100"},children:e}):e})}},(null==N?void 0:N.can_submit)&&{title:"提交次数",dataIndex:"submit_count",width:75,ellipsis:!0,render:function(e){return 0==(null==k?void 0:k.work_status)?"--":e||"--"}},(null==k?void 0:k.student_anonymous_comment)&&{title:"需评数",align:"center",dataIndex:"need_comment_count",width:75},(null==k?void 0:k.student_anonymous_comment)&&{title:"已评数",align:"center",dataIndex:"user_comment_count",width:75},(null==k?void 0:k.student_anonymous_comment)&&{title:"被评数",align:"center",dataIndex:"student_comment_count",width:75},(null==k?void 0:k.student_anonymous_comment)&&{title:"被匿评分数",align:"center",dataIndex:"student_score",width:120},(null==k?void 0:k.student_anonymous_comment)&&{title:"申诉次数",align:"center",dataIndex:"appeal_all_count",width:75},(null==k?void 0:k.student_anonymous_comment)&&{title:"待审核申诉",align:"center",dataIndex:"appeal_deal_count",width:120},{title:"操作",width:null!=k&&k.base_on_project?100:80,align:"center",dataInex:"action",fixed:"right",render:function(e,n){var t;return null!==(t=k.homework_status)&&void 0!==t&&t.includes("导入")?(0,G.jsx)("div",{children:(0,G.jsx)("a",{style:{marginLeft:10},onClick:(0,$.debounce)(function(){var e=o()(l()().mark((function e(t){var s,i,a,r,o,u;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.stopPropagation(),e.next=3,(0,W.ZP)("/api/student_works/".concat(null==n?void 0:n.id,"/passed_condition.json"),{method:"get"});case 3:u=e.sent,j.Z.confirm({title:"作业详情",closable:!0,width:750,icon:null,content:(0,G.jsxs)("div",{children:[(0,G.jsxs)("div",{style:{display:"flex"},children:[(0,G.jsxs)("div",{children:[(0,G.jsx)("span",{style:{color:"#666666"},children:"学生姓名"}),(0,G.jsx)("span",{style:{marginLeft:10},children:null==u||null===(s=u.data)||void 0===s?void 0:s.user_name})]}),(0,G.jsxs)("div",{style:{marginLeft:60},children:[(0,G.jsx)("span",{style:{color:"#666666"},children:"学号"}),(0,G.jsx)("span",{style:{marginLeft:10},children:null==u||null===(i=u.data)||void 0===i?void 0:i.student_id})]}),(0,G.jsxs)("div",{style:{marginLeft:60},children:[(0,G.jsx)("span",{style:{color:"#666666"},children:"班级"}),(0,G.jsx)("span",{style:{marginLeft:10},children:null==u||null===(a=u.data)||void 0===a?void 0:a.group_name})]})]}),(0,G.jsxs)("div",{style:{marginTop:22},children:[(0,G.jsx)("div",{style:{color:"#666666"},children:"作业描述:"}),(0,G.jsx)("div",{style:{marginTop:10,background:"#F6F7F9",padding:10},children:(null==u||null===(r=u.data)||void 0===r?void 0:r.description)||"暂无信息"})]}),(0,G.jsxs)("div",{style:{marginTop:22,marginBottom:20},children:[(0,G.jsx)("div",{style:{color:"#666666"},children:"点评内容:"}),(0,G.jsx)("div",{style:{marginTop:10,background:"#F6F7F9",padding:10},children:(null==u||null===(o=u.data)||void 0===o?void 0:o.comment)||"暂无信息"})]})]}),footer:null});case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),300),children:"查看详情"})}):0===n.work_status?(0,G.jsx)("div",{children:"--"}):(0,G.jsx)("a",{className:"c-blue",onClick:function(e){var t;e.preventDefault(),!(0,P.Rm)()||null!=f&&null!==(t=f.AssistantObject)&&void 0!==t&&null!==(t=t.group)&&void 0!==t&&t.can_view?_.history.push("/classrooms/".concat(y.coursesId,"/group_homework/").concat(y.categoryId,"/review/").concat(n.id,"?review=review")):x.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能")},children:" 查看 "})}}].filter((function(e){return!!e})),F=[{title:"序号",dataIndex:"name",ellipsis:!0,width:120,render:function(e,n,t){return t+1}},{title:"姓名",dataIndex:"user_name",ellipsis:!0},{title:"评阅状态",dataIndex:"current_user_work_status",ellipsis:!0,render:function(e){return e?(0,G.jsx)("span",{style:{color:"#028D01"},children:"已评"}):(0,G.jsx)("span",{style:{color:"#FF6801"},children:"未评"})}},{title:"更新时间",dataIndex:"update_time",ellipsis:!0,render:function(e){return e?ne()(e).format("YYYY-MM-DD HH:mm"):"--"}},{title:"匿评分数",dataIndex:"student_score",ellipsis:!0,render:function(e){return e||"--"}},{title:(0,G.jsxs)("span",{children:["是否整组同评",(0,G.jsx)(g.Z,{title:"如果学生对作品进行了整组同评,那么该作品所属分组的人数等于已评作品数,并且学生的已评作品总数将超过需评数。",children:(0,G.jsx)("i",{className:"iconfont icon-tishixiaowenhao font14 current c-grey-999 current-primary ml5"})})]}),dataIndex:"group_comment",ellipsis:!0},{title:"被申诉次数",dataIndex:"appeal_all_count",ellipsis:!0,render:function(e){return e||"--"}},{title:"被申诉审核状态",dataIndex:"current_user_appeal_status",ellipsis:!0,render:function(e){return 1===e?(0,G.jsx)("span",{style:{color:"#FF6801"},children:"待审核"}):-1===e?"--":(0,G.jsx)("span",{style:{color:"#028D01"},children:"已审核"})}},{title:"操作",dataIndex:"name",ellipsis:!0,align:"right",width:80,render:function(e,n){return(0,G.jsx)("a",{onClick:function(){var e;0!=(null==k?void 0:k.work_status)?null!==(e=k.homework_status)&&void 0!==e&&e.includes("导入")||_.history.push("/classrooms/".concat(y.coursesId,"/group_homework/").concat(y.categoryId,"/review/").concat(n.id)):x.ZP.warning("你未提交作品,不能参与匿评")},children:null!=n&&n.current_user_work_status?"查看":"评阅"})}}];return(0,p.useEffect)((function(){null!=k&&k.course_id&&A(k.student_works)}),[k]),(0,G.jsxs)("section",{className:"minH500 bg-white p30",style:{paddingTop:25},children:[!(null!=k&&k.all_member_count)&&!d["shixunHomeworks/getWorkList"]&&((null==k||null===(n=k.homework_status)||void 0===n?void 0:n.includes("未发布"))||(null==k||null===(t=k.homework_status)||void 0===t?void 0:t.includes("未开始")))&&(0,G.jsx)(z.Z,{}),!(null!=k&&null!==(s=k.homework_status)&&void 0!==s&&s.includes("未发布"))&&!(null!=k&&null!==(i=k.homework_status)&&void 0!==i&&i.includes("未开始"))&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(w.Z,{wrap:!1,align:"middle",justify:"space-between",children:[(0,G.jsx)(b.Z,{children:(0,G.jsx)("span",{className:"c-grey-333",children:"我的作品"})}),(0,G.jsx)(b.Z,{children:(0,G.jsxs)("span",{children:[null==k||null===(a=k.left_time)||void 0===a?void 0:a.status,(0,G.jsx)("span",{className:"ml10",style:{color:"#FF9D18"},children:null==k||null===(r=k.left_time)||void 0===r?void 0:r.time})]})})]}),(null==k?void 0:k.is_shixun)&&!(null!=k&&k.open_evaluate)&&!(null!=k&&k.is_close_tips)&&(0,G.jsxs)(w.Z,{align:"middle",justify:"space-between",style:{background:"#F5F5F5",borderRadius:4,height:42,padding:"0px 10px",color:"#9096A3"},children:[(0,G.jsx)(b.Z,{children:(0,G.jsx)("span",{children:"该实践项目未启用评测功能,学生提交作品后需要教师手动评分,请耐心等待教师的评分结果。 "})}),(0,G.jsx)(b.Z,{children:(0,G.jsx)("span",{className:"current",onClick:o()(l()().mark((function e(){var n;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,W.ZP)("/api/homework_commons/".concat(y.categoryId,"/close_tips.json"),{method:"post"});case 2:0===(null==(n=e.sent)?void 0:n.status)&&h({type:"shixunHomeworks/getWorkList",payload:c()({},y)});case 4:case"end":return e.stop()}}),e)}))),children:"X"})})]}),(null==k?void 0:k.feedback_notice)&&(0,G.jsxs)("div",{className:"font14 mt10",style:{padding:"9px 20px",background:"rgba(255,157,24,0.1)",color:"#FF9D18",display:"flex",alignItems:"center"},children:[(0,G.jsx)("i",{className:"iconfont icon-tishi11 font14"}),(0,G.jsx)("span",{className:"ml10",style:{flex:"1"},children:"有学生反馈了作品问题,请及时查看处理"}),O?(0,G.jsx)(ie.Z,{}):(0,G.jsx)("i",{className:"iconfont icon-guanbi10 font14 current",style:{color:"#979797"},onClick:o()(l()().mark((function e(){var n;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,C({homeworkId:null==k?void 0:k.id});case 2:0===(null==(n=e.sent)?void 0:n.status)&&h({type:"shixunHomeworks/getWorkList",payload:c()({},y)});case 4:case"end":return e.stop()}}),e)})))})]}),(0,G.jsx)(Z.Z,{className:"mt15",loading:d["shixunHomeworks/getWorkList"],rowKey:"id",bordered:!0,rowClassName:function(e,n){return(null==e?void 0:e.item_index)%2==0&&Q.tables},pagination:!1,dataSource:[k],columns:D,locale:{emptyText:(0,G.jsx)(z.Z,{})},scroll:null!=k&&k.student_anonymous_comment||null!=k&&k.base_on_project?{x:"calc(100% + 60px)"}:{}}),(null==k?void 0:k.student_anonymous_comment)&&(0,G.jsxs)("div",{className:"mt30",children:[(0,G.jsxs)(w.Z,{wrap:!1,align:"middle",justify:"space-between",children:[(0,G.jsxs)(b.Z,{children:["共",(0,G.jsx)("span",{className:"ml5 mr5",style:{color:"#FA6400"},children:(null==k?void 0:k.work_count)||0}),"份作业需评阅"]}),(0,G.jsxs)(b.Z,{children:[(0,G.jsx)("i",{className:"iconfont icon-shijian1 c-grey-666 mr10"}),"匿评时间",(0,G.jsxs)("span",{className:"c-grey-333 ml10",children:[(null==k?void 0:k.evaluation_start)&&ne()(null==k?void 0:k.evaluation_start).format("YYYY-MM-DD HH:mm"),"至 ",(null==k?void 0:k.evaluation_end)&&ne()(null==k?void 0:k.evaluation_end).format("YYYY-MM-DD HH:mm")]})]})]}),(0,G.jsx)(Z.Z,{className:"mt15",locale:{emptyText:(0,G.jsx)(z.Z,{})},columns:F,dataSource:Y,pagination:!1})]})]})]})})),le=(0,p.createRef)(),re=(0,_.connect)((function(e){var n=e.shixunHomeworks,t=e.classroomList,s=e.globalSetting;return{shixunHomeworks:n,classroomList:t,loading:e.loading.effects,globalSetting:s}}))((function(e){var n,t,s,a,r,u,d,h,v,y,N,S,ee,te,se,ie=e.shixunHomeworks,re=e.classroomList,oe=e.loading,ue=e.globalSetting,ce=e.dispatch,de=e.zip,me=e.btnLoading,pe=e.setBtnLoading,_e=(0,p.useState)(c()(c()({},(0,_.useParams)()),{page:1,limit:20})),he=m()(_e,2),fe=he[0],xe=(he[1],(0,_.useLocation)(),ie.workList),ve=(0,p.useState)({}),ge=m()(ve,2),ye=ge[0],je=(ge[1],(0,p.useState)("")),we=m()(je,2),be=(we[0],we[1]),ke=(0,p.useState)(""),Ze=m()(ke,2),Ne=(Ze[0],Ze[1],(0,p.useState)("")),Ie=m()(Ne,2),Pe=(Ie[0],Ie[1],(0,p.useState)([])),Se=m()(Pe,2),He=Se[0],Oe=Se[1],Ce=(0,p.useState)(),Le=m()(Ce,2),Te=(Le[0],Le[1]),Ye=(0,p.useState)([]),Ae=m()(Ye,2),De=Ae[0],Fe=(Ae[1],(0,p.useState)(!1)),Re=m()(Fe,2),Ee=Re[0],Me=Re[1],Ve=(0,p.useState)([]),We=m()(Ve,2),ze=We[0],Ge=We[1],Je=(0,p.useState)(!1),qe=m()(Je,2),Be=qe[0],Qe=qe[1],Ue=(0,p.useState)(),Ke=m()(Ue,2),Xe=Ke[0],$e=Ke[1],en=(0,p.useState)(1),nn=m()(en,2),tn=nn[0],sn=nn[1],an=(0,p.useState)(),ln=m()(an,2),rn=ln[0],on=ln[1],un=(0,p.useState)(),cn=m()(un,2),dn=cn[0],mn=cn[1],pn=(0,p.useState)(),_n=m()(pn,2),hn=_n[0],fn=_n[1],xn=(0,p.useState)(!1),vn=m()(xn,2),gn=vn[0],yn=vn[1],jn=O.Z.useForm(),wn=m()(jn,1)[0],bn=(0,p.useState)({groupAll:[],userAll:[]}),kn=m()(bn,2),Zn=kn[0],Nn=kn[1],In=(0,p.useState)(!1),Pn=m()(In,2),Sn=Pn[0],Hn=Pn[1],On=(0,p.useState)({status:!1,visible:!0}),Cn=m()(On,2),Ln=Cn[0],Tn=Cn[1],Yn=O.Z.useForm(),An=m()(Yn,1)[0],Dn=function(){var e=o()(l()().mark((function e(){var n,t;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,W.ZP)("/api/homework_commons/".concat(fe.categoryId,"/get_group_members"),{method:"get",params:{}});case 2:return n=e.sent,e.next=5,(0,W.ZP)("/api/courses/".concat(fe.coursesId,"/students.json"),{method:"get",params:{coursesId:fe.coursesId,homework_id:fe.categoryId,page:1,limit:2e3}});case 5:t=e.sent,0==(null==n?void 0:n.status)&&Nn({groupAll:null==n?void 0:n.group_infos,userAll:null==t?void 0:t.students});case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();(0,p.useEffect)((function(){var e;(null==xe||null===(e=xe.course_recommends)||void 0===e?void 0:e.length)>0&&Hn(!0)}),[null==xe?void 0:xe.course_recommends]),(0,p.useEffect)((function(){le&&le.current&&(le.current.clientHeight>47?Tn({status:!0,visible:!0}):Tn({status:!1,visible:!0}))}),[xe.course_group_info&&xe.course_group_info.length]),(0,p.useEffect)((function(){null!=xe&&xe.course_id}),[null==xe?void 0:xe.course_id]),(0,p.useEffect)((function(){null!=xe&&xe.course_id&&setTimeout((function(){if(xe.base_on_project){var e,n=[];null===(e=xe.new_student_works)||void 0===e||e.map((function(e,t){var s;null==e||null===(s=e.student_works)||void 0===s||s.map((function(t,s){var i,a,l;t.item_index=e.item_index,t.rowSpan=null!=t&&t.is_leader?null==e||null===(i=e.student_works)||void 0===i?void 0:i.length:-1===(null==t||null===(a=t.project_info)||void 0===a?void 0:a.id)?1:(null==e||null===(l=e.student_works)||void 0===l||null===(l=l.filter((function(e){return e.is_leader})))||void 0===l?void 0:l.length)>0?0:1,n.push(t)}))})),console.log("---",n),Oe([].concat(n))}else{var t,s=[];null===(t=xe.new_student_works)||void 0===t||t.map((function(e,n){var t;null==e||null===(t=e.student_works)||void 0===t||t.map((function(n,t){var i,a;n.item_index=e.item_index,n.rowSpan=0==t?null==e||null===(i=e.student_works)||void 0===i?void 0:i.length:(null==e||null===(a=e.student_works)||void 0===a||null===(a=a.filter((function(e){return e.id})))||void 0===a?void 0:a.length)>0?0:1,s.push(n)}))})),Oe([].concat(s))}}),400)}),[xe]);var Fn=function(){var e=o()(l()().mark((function e(){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ce({type:"shixunHomeworks/getWorkList",payload:c()({},fe)});case 2:e.sent;case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();function Rn(){sn(1),Te(""),on(""),mn(""),fn(""),Ge([])}var En=[{title:"序号",dataIndex:"item_index",align:"left",width:50,render:function(e,n,t){return{children:e,props:{rowSpan:n.rowSpan}}}},(null==xe?void 0:xe.base_on_project)&&{title:"关联项目",align:"left",dataIndex:"base_on_project",width:200,render:function(e,n){var t,s,i,a,l,r;return{children:-1!==(null===(t=n.project_info)||void 0===t?void 0:t.id)?(0,G.jsx)("a",{target:"_blank",title:null===(s=n.project_info)||void 0===s?void 0:s.name,href:"".concat(null==ue||null===(i=ue.setting)||void 0===i?void 0:i.old_url).concat(null===(a=n.project_info)||void 0===a?void 0:a.id),style:{whiteSpace:"break-spaces"},children:null===(l=n.project_info)||void 0===l?void 0:l.name}):null===(r=n.project_info)||void 0===r?void 0:r.name,props:{rowSpan:n.rowSpan}}}},!(null!=xe&&xe.base_on_project)&&{title:"分组",align:"left",dataIndex:"work_group",width:200,render:function(e,n){return{children:(0,G.jsx)("span",{className:"c-blue",children:e}),props:{rowSpan:n.rowSpan}}}},{title:"姓名",align:"left",dataIndex:"user_name",ellipsis:!0,width:150,render:function(e,n){return(0,G.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,G.jsxs)("span",{className:Q.atitle,style:{width:n.is_leader?"":130,maxWidth:n.is_leader&&80},children:[" ",e]}),n.is_leader&&(0,G.jsx)("span",{style:{display:"inline-flex",background:"rgba(22,93,255,0.2)",width:32,height:18,borderRadius:2,color:"#3061D0",alignItems:"center",justifyContent:"center",fontSize:10,marginLeft:10},children:"组长"})]})}},(0,P.GJ)()&&{title:"学号",align:"left",dataIndex:"student_id",sortDirections:["descend","ascend"],width:null!=xe&&xe.base_on_project?100:150,ellipsis:!0,render:function(e){return(0,G.jsx)("span",{style:{color:"#666666"},children:e})}},(0,P.GJ)()&&!(null!=xe&&xe.base_on_project)&&{title:"分班",align:"left",width:150,dataIndex:"group_name"},((0,P.GJ)()||(0,P.dE)()&&!(null!=xe&&xe.anonymous_comment)&&!xe.anonymous_appeal||(0,P.dE)()&&(null===(n=xe.homework_status)||void 0===n?void 0:n.includes("已截止")))&&{title:"当前成绩",align:"left",dataIndex:"work_score",sortDirections:["descend","ascend"],render:function(e,n){return(0,G.jsx)(g.Z,{placement:"bottom",title:(0,G.jsxs)("div",{children:[(0,G.jsx)("div",{children:n.teacher_score?"教师评分:".concat(n.teacher_score,"分"):"教师评分0.0分"}),(0,G.jsx)("div",{children:n.teaching_asistant_score?"助教评分:".concat(n.teaching_asistant_score,"分"):"助教评分0.0分"}),null!=xe&&xe.anonymous_comment?(0,G.jsx)("div",{children:n.student_score?"匿评评分:".concat(n.student_score,"分"):"匿评评分0.0分"}):"",null!=xe&&xe.is_group_grade?(0,G.jsx)("div",{children:n.group_leader_score?"组长评分:".concat(n.group_leader_score,"分"):"组长评分0.0分"}):"",(0,G.jsx)("div",{children:n.late_penalty?"补交扣分:".concat(n.late_penalty,"分"):"补交扣分0.0分"}),(0,G.jsx)("div",{children:n.repeat_minus_score?"查重扣分:".concat(n.repeat_minus_score,"分"):"查重扣分0.0分"}),null!=xe&&xe.anonymous_comment?(0,G.jsx)("div",{children:n.absence_penalty?"缺评扣分:".concat(n.absence_penalty,"分"):"缺评扣分0.0分"}):"",(null==xe?void 0:xe.anonymous_appeal)&&"违评扣分:".concat(n.appeal_penalty||"0.0","分"),(0,G.jsx)("div",{children:n.work_score?"最终成绩:".concat(n.work_score,"分"):"最终成绩0.0分"}),!(null!=xe&&xe.is_jupyter||null!=xe&&xe.is_jupyter_lab)&&(0,G.jsx)("div",{onClick:function(e){e.stopPropagation(),_.history.push("/classrooms/".concat(fe.coursesId,"/group_homework/").concat(fe.categoryId,"/review/").concat(n.id))},style:{color:"#8bb6fd",cursor:"pointer"},children:"查看评分 >"})]}),children:e>0?(0,G.jsx)("span",{style:{color:"#ff8100"},children:e}):e})}},(null==xe?void 0:xe.base_on_project)&&{title:"代码行数",align:"left",dataIndex:"code_lines_count",render:function(e){return e||"--"}},(null==xe?void 0:xe.base_on_project)&&{title:"issue数量",align:"left",dataIndex:"issues_count",render:function(e,n){return{children:e||"--"}}},(null==xe?void 0:xe.base_on_project)&&{title:"更新时间",align:"left",dataIndex:"update_time",width:140,render:function(e,n){return{children:e?(0,G.jsxs)("span",{style:{display:"block",alignItems:"center"},children:["更新代码",(0,G.jsx)("br",{}),ne()(e).format("YYYY-MM-DD HH:mm")]}):"--",props:{rowSpan:n.rowSpan}}}},{title:"作品状态",dataIndex:"work_status",align:"left",width:null!=xe&&xe.base_on_project?160:200,render:function(e,n){return{children:-1===e?"重做中":(0,G.jsx)(I.Uw,{status:e}),props:{rowSpan:n.rowSpan}}}},{title:"操作",width:null!=xe&&xe.base_on_project?100:150,align:"left",dataInex:"action",render:function(e,n){var t;return null!==(t=xe.homework_status)&&void 0!==t&&t.includes("导入")?(0,G.jsxs)("div",{children:[(0,P.GJ)()&&(0,G.jsx)("a",{onClick:function(e){e.stopPropagation(),ce({type:"classroomList/setActionTabs",payload:{key:"修改成绩",id:null==n?void 0:n.id,type:"normal"}})},children:"修改成绩"}),(0,G.jsx)("a",{style:{marginLeft:10},onClick:(0,$.debounce)(function(){var e=o()(l()().mark((function e(t){var s,i,a,r,o,u;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.stopPropagation(),e.next=3,(0,W.ZP)("/api/student_works/".concat(null==n?void 0:n.id,"/passed_condition.json"),{method:"get"});case 3:u=e.sent,j.Z.confirm({title:"作业详情",closable:!0,width:750,icon:null,content:(0,G.jsxs)("div",{children:[(0,G.jsxs)("div",{style:{display:"flex"},children:[(0,G.jsxs)("div",{children:[(0,G.jsx)("span",{style:{color:"#666666"},children:"学生姓名"}),(0,G.jsx)("span",{style:{marginLeft:10},children:null==u||null===(s=u.data)||void 0===s?void 0:s.user_name})]}),(0,G.jsxs)("div",{style:{marginLeft:60},children:[(0,G.jsx)("span",{style:{color:"#666666"},children:"学号"}),(0,G.jsx)("span",{style:{marginLeft:10},children:null==u||null===(i=u.data)||void 0===i?void 0:i.student_id})]}),(0,G.jsxs)("div",{style:{marginLeft:60},children:[(0,G.jsx)("span",{style:{color:"#666666"},children:"班级"}),(0,G.jsx)("span",{style:{marginLeft:10},children:null==u||null===(a=u.data)||void 0===a?void 0:a.group_name})]})]}),(0,G.jsxs)("div",{style:{marginTop:22},children:[(0,G.jsx)("div",{style:{color:"#666666"},children:"作业描述:"}),(0,G.jsx)("div",{style:{marginTop:10,background:"#F6F7F9",padding:10},children:(null==u||null===(r=u.data)||void 0===r?void 0:r.description)||"暂无信息"})]}),(0,G.jsxs)("div",{style:{marginTop:22,marginBottom:20},children:[(0,G.jsx)("div",{style:{color:"#666666"},children:"点评内容:"}),(0,G.jsx)("div",{style:{marginTop:10,background:"#F6F7F9",padding:10},children:(null==u||null===(o=u.data)||void 0===o?void 0:o.comment)||"暂无信息"})]})]}),footer:null});case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),300),children:"查看详情"})]}):0!==n.work_status||(0,P.GJ)()?(0,G.jsxs)("div",{style:{display:"flex",justifyContent:"space-between"},children:[!(0,P.GJ)()&&(0,G.jsx)("a",{className:"c-blue",onClick:function(e){var t;e.preventDefault(),!(0,P.Rm)()||null!=re&&null!==(t=re.AssistantObject)&&void 0!==t&&null!==(t=t.group)&&void 0!==t&&t.can_view?_.history.push("/classrooms/".concat(fe.coursesId,"/group_homework/").concat(fe.categoryId,"/review/").concat(n.id)):x.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能")},children:"查看"}),(0,P.GJ)()&&(0,G.jsx)("a",{className:"c-blue",onClick:function(e){var t;e.preventDefault(),!(0,P.Rm)()||null!==(t=re.AssistantObject.group)&&void 0!==t&&t.can_view?_.history.push("/classrooms/".concat(fe.coursesId,"/group_homework/").concat(fe.categoryId,"/review/").concat(n.id)):x.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能")},children:n.has_comment?"已评阅":"评阅"}),(0,P.GJ)()&&(0,G.jsx)(g.Z,{placement:"bottom",title:(0,G.jsxs)("p",{children:["调整学生当前成绩",(0,G.jsx)("br",{}),"其它历史评分将全部失效"]}),children:(0,G.jsx)("a",{style:{color:"#3061D0"},className:"c-green",onClick:function(e){var t;e.preventDefault(),!(0,P.Rm)()||null!==(t=re.AssistantObject.group)&&void 0!==t&&t.can_appraise?ce({type:"shixunHomeworks/setActionTabs",payload:{key:"调分",selectArrs:n,id:n.id,params:fe}}):x.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能")},children:"调分"})})]}):(0,G.jsx)("div",{children:"--"})}}].filter((function(e){return!!e})),Mn=i()(En.map((function(e){return c()({},e)})));Mn[0].render=function(e){return"我"};var Vn=function(){var e=o()(l()().mark((function e(){var n,t;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return pe(!0),e.next=3,(0,W.ZP)("/api/homework_commons/".concat(null==fe?void 0:fe.categoryId,"/export_student_works.json"),{method:"get",params:JSON.parse(sessionStorage.all_student_works_params)});case 3:0===(n=e.sent).status?null===(t=de.current)||void 0===t||t.exportReport(n.files):pe(!1);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Wn=function(){var e=o()(l()().mark((function e(){var n,t;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,W.ZP)("/api/homework_commons/".concat(null==fe?void 0:fe.categoryId,"/export_student_works.json"),{method:"get",params:JSON.parse(sessionStorage.all_student_works_params)});case 2:0===(n=e.sent).status&&(Array.isArray(n.sub_data)&&n.sub_data.length>0?null===(t=de.current)||void 0===t||t.exportAndCreateUserFolder(n.sub_data,"批注附件","".concat(null==xe?void 0:xe.homework_name,"-作品批注附件")):x.ZP.warning("暂无可下载的批注附件"));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,P.GJ)()?(0,G.jsxs)("section",{className:"".concat(Q.wrap," minH500"),children:[(0,G.jsx)("aside",{children:(0,G.jsxs)("aside",{className:"minH500 bg-white pl30 ".concat((0,P.GJ)()?"pt30":""," pr30"),children:[!(null!=xe&&xe.all_member_count)&&!oe["shixunHomeworks/getWorkList"]&&((null==xe||null===(t=xe.homework_status)||void 0===t?void 0:t.includes("未发布"))||(null==xe||null===(s=xe.homework_status)||void 0===s?void 0:s.includes("未开始")))&&(0,G.jsx)("aside",{className:"bg-white inline-block w100",children:(0,G.jsx)(z.Z,{})}),!(0,P.GJ)()&&(0,G.jsxs)("aside",{className:"pt10 pb10",children:[(0,G.jsx)("span",{className:"c-orange",children:xe.commit_count}),"已交",(0,G.jsx)("span",{className:"ml10",children:xe.uncommit_count}),"未交",(null==xe||null===(a=xe.left_time)||void 0===a?void 0:a.time)&&(0,G.jsxs)("span",{className:"ml10",children:[(0,G.jsx)("span",{children:null==xe||null===(r=xe.left_time)||void 0===r?void 0:r.status}),(0,G.jsx)("span",{className:"c-orange",children:null==xe||null===(u=xe.left_time)||void 0===u?void 0:u.time})]})]}),(0,G.jsx)("aside",{children:!(null!=xe&&null!==(d=xe.homework_status)&&void 0!==d&&d.includes("未发布"))&&!(null!=xe&&null!==(h=xe.homework_status)&&void 0!==h&&h.includes("未开始"))&&(0,G.jsxs)("aside",{children:[(0,P.GJ)()&&(0,G.jsxs)("aside",{className:"mb30",children:[(0,G.jsxs)(O.Z,{form:An,onChange:function(){fe.page=1;var e=Object.assign({},An.getFieldValue());delete fe.course_group,delete fe.teacher_comment,Object.keys(e).map((function(n){switch(n){case"teacher_comment":case"member_work":var t;if(e[n].length>1||!e[n].length)delete fe[n],An.setFieldsValue(H()({},n,"all"));else fe[n]=null===(t=e[n])||void 0===t?void 0:t[0],An.setFieldsValue(H()({},"teacher_comment",e[n]));break;case"file_status":e[n].includes("all")||xe[n].length===e[n].length||!e[n].length?(delete fe.file_status,An.setFieldsValue(H()({},"file_status","all"))):(fe.file_status=e[n][0],An.setFieldsValue(H()({},"file_status",e[n])));break;case"work_status":e[n].includes("all")||xe.task_status.length===e[n].length||!e[n].length?(delete fe.work_status,An.setFieldsValue(H()({},"work_status","all"))):(fe.work_status=e[n],An.setFieldsValue(H()({},"work_status",fe.work_status)));break;case"course_group_info":e[n].includes("all")||xe[n].length===e[n].length||!e[n].length?(delete fe.course_group,An.setFieldsValue(H()({},"course_group_info","all"))):(fe.course_group=e[n],An.setFieldsValue(H()({},"course_group_info",fe.course_group)))}})),Fn()},initialValues:H()(H()(H()(H()(H()({},"member_work","all"),"work_status","all"),"course_group_info","all"),"teacher_comment","all"),"file_status","all"),children:[(0,G.jsx)(O.Z.Item,{name:"teacher_comment",children:(0,G.jsx)(L.Z.Group,{style:{width:"100%"},children:(0,G.jsxs)(w.Z,{children:[(0,G.jsx)(b.Z,{flex:"80px",style:{fontSize:14},children:"你的评阅:"}),(0,G.jsx)(b.Z,{flex:"80px",children:(0,G.jsx)(L.Z,{value:"all",checked:!ye.teacher_comment,children:"全部"})}),(0,G.jsx)(b.Z,{flex:"1",children:xe.teacher_comment&&xe.teacher_comment.map((function(e){return(0,G.jsxs)(L.Z,{value:e.id,children:[e.name,"(",e.count,")"]},e.id)}))})]})})}),(0,G.jsx)(O.Z.Item,{name:"file_status",children:(0,G.jsx)(L.Z.Group,{style:{width:"100%"},children:(0,G.jsxs)(w.Z,{children:[(0,G.jsx)(b.Z,{flex:"80px",style:{fontSize:14},children:"附件状态:"}),(0,G.jsx)(b.Z,{flex:"80px",children:(0,G.jsx)(L.Z,{value:"all",children:"全部"})}),(0,G.jsx)(b.Z,{flex:"1",children:null==xe||null===(v=xe.file_status)||void 0===v?void 0:v.map((function(e){return(0,G.jsxs)(L.Z,{value:e.id,children:[e.name,"(",e.count,")"]},e.id)}))})]})})}),(0,G.jsx)(O.Z.Item,{name:"work_status",children:(0,G.jsx)(L.Z.Group,{value:[],style:{width:"100%"},children:(0,G.jsxs)(w.Z,{children:[(0,G.jsx)(b.Z,{flex:"80px",style:{fontSize:14},children:"作品状态:"}),(0,G.jsx)(b.Z,{flex:"80px",children:(0,G.jsx)(L.Z,{value:"all",checked:!ye.work_status,children:"全部"})}),(0,G.jsx)(b.Z,{flex:"1",children:xe.task_status&&xe.task_status.map((function(e){return(0,G.jsxs)(L.Z,{name:"work_status",value:e.id,children:[e.name,"(",e.count,")"]},e.id)}))})]})})}),(0,G.jsx)(O.Z.Item,{name:"member_work",children:(0,G.jsx)(L.Z.Group,{style:{width:"100%"},children:(0,G.jsxs)(w.Z,{children:[(0,G.jsx)(b.Z,{flex:"80px",style:{fontSize:14},children:"组内角色:"}),(0,G.jsx)(b.Z,{flex:"80px",children:(0,G.jsx)(L.Z,{value:"all",children:"全部"})}),(0,G.jsx)(b.Z,{flex:"1",children:[{name:"组长",id:1},{name:"组员",id:0}].map((function(e){return(0,G.jsx)(L.Z,{value:e.id,children:e.name},e.id)}))})]})})}),(0,G.jsx)(O.Z.Item,{name:"course_group_info",children:(0,G.jsx)(L.Z.Group,{style:{width:"100%"},children:(0,G.jsxs)(w.Z,{children:[(0,G.jsx)(b.Z,{flex:"80px",style:{fontSize:14},children:"分班情况:"}),(0,G.jsx)(b.Z,{flex:"80px",children:(0,G.jsx)(L.Z,{value:"all",checked:!ye.course_group,children:"全部"})}),(0,G.jsxs)(b.Z,{flex:"1",className:"".concat(Q.workListClass," ").concat(Ln.visible?Q.visible:""," ").concat(Ln.status?"":Q.status),children:[(0,G.jsx)("div",{ref:le,className:Q.left,children:xe.course_group_info&&xe.course_group_info.map((function(e){return(0,G.jsxs)(L.Z,{value:e.course_group_id,children:[e.group_group_name,"(",e.count,")"]},e.course_group_id)}))}),Ln.status&&(0,G.jsx)("div",{className:Q.tips,onClick:function(){return Tn(c()(c()({},Ln),{},{visible:!Ln.visible}))},children:(0,G.jsxs)("span",{children:[Ln.visible?"展开":"收起",Ln.visible?(0,G.jsx)(R.Z,{style:{marginBottom:"3px",marginLeft:"2px"}}):(0,G.jsx)(E.Z,{style:{marginBottom:"3px",marginLeft:"2px"}})]})})]})]})})})]}),(0,G.jsxs)(w.Z,{align:"middle",children:[(0,G.jsx)(b.Z,{flex:"1",children:(0,G.jsxs)(w.Z,{align:"middle",children:[(0,G.jsx)(b.Z,{children:(0,G.jsx)(k.Z.Search,{allowClear:!0,placeholder:"请输入姓名或者学号搜索",onSearch:function(e){fe.page=1,fe.search=e.trim(),ce({type:"shixunHomeworks/getWorkList",payload:c()({},fe)})},style:{width:240}})}),(0,G.jsxs)(b.Z,{children:[(0,G.jsx)("span",{className:"ml5 c-red",children:xe.work_count}),"个检索结果(",xe.work_count,"个学生)"]})]})}),(0,G.jsxs)(b.Z,{style:{textAlign:"end"},className:Q.workListButtonWrap,children:[!(null!==(y=xe.homework_status)&&void 0!==y&&y.includes("导入"))&&!(0,P.dE)()&&(0,G.jsx)(K.Z,{className:"mr20",onClick:o()(l()().mark((function e(){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Dn();case 2:yn(!0);case 3:case"end":return e.stop()}}),e)}))),children:"调整分组"}),(0,G.jsx)(T.Z,{dropdownRender:function(){var e,n;return(0,G.jsxs)(C.Z,{children:[(0,G.jsx)(C.Z.Item,{children:(0,G.jsx)("span",{onClick:function(){return(0,U.Iy)(JSON.parse(sessionStorage.all_student_works_params),"group_work_list")},children:"导出成绩"})},"1"),!(null!==(e=xe.homework_status)&&void 0!==e&&e.includes("导入"))&&(0,G.jsx)(C.Z.Item,{children:(0,G.jsx)(f.ZP,{loading:me,ghost:!0,style:{paddingLeft:0,background:"transparent"},type:"text",onClick:function(){return Vn()},children:"导出作品附件"})},"3"),!(null!==(n=xe.homework_status)&&void 0!==n&&n.includes("导入"))&&(0,G.jsx)(C.Z.Item,{children:(0,G.jsx)(K.Z,{style:{paddingLeft:0,background:"transparent"},type:"text",onClick:Wn,children:"导出作品批注"})},"4"),(0,G.jsx)(C.Z.Item,{children:(0,G.jsx)(_.Link,{to:"/classrooms/".concat(fe.coursesId,"/exportlist/group_work_list"),children:"历史导出"})},"2")]})},children:(0,G.jsxs)(f.ZP,{children:[(0,G.jsx)(M.Z,{}),"导出",(0,G.jsx)(V.Z,{})]})})]})]})]}),(0,P.G5)()&&(0,G.jsxs)("div",{children:[(null==xe?void 0:xe.base_on_project)&&(0,G.jsx)("p",{children:"项目概览"}),(0,G.jsx)(Z.Z,{dataSource:[null==xe?void 0:xe.group_data],pagination:!1,bordered:!0,style:{marginBottom:20},columns:[null!=xe&&xe.base_on_project?{title:"项目总数",align:"center",dataIndex:"project_num",key:"project_num"}:{title:"分组总数",align:"center",dataIndex:"group_size",key:"group_size"},{title:"学生人数",align:"center",dataIndex:"work_count"},(null==xe?void 0:xe.base_on_project)&&{title:"关联项目人数",align:"center",dataIndex:"associated_num"},(null==xe?void 0:xe.base_on_project)&&{title:"未关联项目人数",align:"center",dataIndex:"unassociated_num"},!(null!=xe&&xe.base_on_project)&&{title:"已分组数",align:"center",dataIndex:"non_zero_count"},!(null!=xe&&xe.base_on_project)&&{title:"未分组数",align:"center",dataIndex:"zero_count"},{title:"未提交人数",align:"center",dataIndex:"not_submitted_num"},(null==xe?void 0:xe.base_on_project)&&{title:"部分提交",align:"center",dataIndex:"partial_submission"},{title:"按时提交",align:"center",dataIndex:"submitted_num"},{title:"延时提交",align:"center",dataIndex:"delayed_num"}].filter((function(e){return!!e}))})]}),!!De.length&&(0,G.jsx)(Z.Z,{className:"mb10 ".concat(Q.tableWrapper),dataSource:De,columns:Mn,pagination:!1,showHeader:!1,loading:!1}),(0,G.jsx)("aside",{style:{paddingBottom:30},children:(0,G.jsx)(Z.Z,{loading:oe["shixunHomeworks/getWorkList"],rowKey:"id",bordered:!0,rowClassName:function(e,n){return(null==e?void 0:e.item_index)%2==0&&Q.tables},className:Q.tableWrapper,hideOnSinglePage:!0,pagination:!1,dataSource:He,columns:En,onChange:function(e,n,t){if(void 0===t.order)if("student_id"===t.field)be("descend"),fe.b_order="desc",fe.order=t.field;else delete fe.b_order,delete fe.order;else fe.b_order=t.order.replace("end",""),fe.order=t.field;ce({type:"shixunHomeworks/getWorkList",payload:c()({},fe)})}})}),(0,G.jsx)(Y.Z,{showSizeChanger:!1,style:{paddingBottom:30},hideOnSinglePage:!0,onChange:function(e,n){fe.page=e,fe.limit=20,Fn()},defaultCurrent:fe.page||1,current:fe.page||1,defaultPageSize:20,total:ie.workList.work_count})]})})]})}),(0,G.jsx)(q,{}),(0,G.jsx)(J,{}),Ee&&(0,G.jsx)(j.Z,{title:"一键打回重做",open:Ee,centered:!0,destroyOnClose:!0,forceRender:!0,width:700,onOk:o()(l()().mark((function e(){var n,t;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(2!==tn){e.next=13;break}if(!(ze.length<=0)){e.next=4;break}return x.ZP.info("请选择作业状态"),e.abrupt("return");case 4:if(hn){e.next=7;break}return x.ZP.info("评语不能为空"),e.abrupt("return");case 7:return e.next=9,(0,W.ZP)("/api/homework_commons/".concat(fe.categoryId,"/confirm_redo_modal.json"),{method:"post",body:{id:fe.categoryId,comment:hn,status:ze}});case 9:0===(n=e.sent).status&&($e(n),Me(!1),Qe(!0)),e.next=32;break;case 13:if(0!==dn&&0!==rn){e.next=16;break}e.next=22;break;case 16:if(dn){e.next=19;break}return x.ZP.info("最低分不能为空"),e.abrupt("return");case 19:if(rn){e.next=22;break}return x.ZP.info("最高分不能为空"),e.abrupt("return");case 22:if(!(dn>rn)){e.next=25;break}return x.ZP.info("最高分不能大于最低分"),e.abrupt("return");case 25:if(hn){e.next=28;break}return x.ZP.info("评语不能为空"),e.abrupt("return");case 28:return e.next=30,(0,W.ZP)("/api/homework_commons/".concat(fe.categoryId,"/confirm_redo_modal.json"),{method:"post",body:{id:fe.categoryId,comment:hn,min_score:dn,max_score:rn}});case 30:0===(t=e.sent).status&&($e(t),Me(!1),Qe(!0));case 32:case"end":return e.stop()}}),e)}))),onCancel:function(){Me(!1),Rn()},children:(0,G.jsx)("div",{style:{padding:"32px"},children:(0,G.jsxs)("div",{children:[(0,G.jsxs)("div",{children:[(0,G.jsx)("span",{style:{width:"80px"},children:"打回方式:"}),(0,G.jsxs)(A.ZP.Group,{value:tn,onChange:function(e){sn(e.target.value)},children:[(0,G.jsx)(A.ZP,{value:1,children:"按成绩打回"}),(0,G.jsx)(A.ZP,{value:2,children:"按作业状态打回"})]})]}),1===tn&&(0,G.jsxs)("div",{style:{display:"flex",marginTop:"20px"},children:[(0,G.jsxs)("span",{style:{width:"70px",textAlign:"end"},children:[(0,G.jsx)("span",{style:{color:"red"},children:"*"}),"最低分:"]}),(0,G.jsx)(D.Z,{min:0,max:100,value:dn,onChange:function(e){return mn(e)},style:{width:"100px"}}),(0,G.jsxs)("span",{style:{width:"80px",textAlign:"end"},children:[(0,G.jsx)("span",{style:{color:"red"},children:"*"}),"最高分:"]}),(0,G.jsx)(D.Z,{min:0,max:100,value:rn,onChange:function(e){return on(e)},style:{width:"100px"}})]}),2===tn&&(0,G.jsxs)("div",{style:{display:"flex",marginTop:"20px"},children:[(0,G.jsx)("span",{style:{width:"80px"},children:"作业状态:"}),(0,G.jsx)(L.Z.Group,{onChange:function(e){Ge(i()(e))},style:{width:"100%"},children:null===(N=xe.task_status)||void 0===N?void 0:N.map((function(e,n){return(0,G.jsxs)(L.Z,{name:"task_status",value:e.id,children:[e.name,"(",e.count,")"]})}))})]}),(0,G.jsxs)("div",{style:{display:"flex",marginTop:"20px"},children:[(0,G.jsxs)("span",{style:{width:"70px",textAlign:"end"},children:[(0,G.jsx)("span",{style:{color:"red"},children:"*"})," 评语:"]}),(0,G.jsx)(B.Z,{className:Q.MdEditor,onChange:function(e){return fn(e)},placeholder:"请填写评语"})]})]})})}),Be&&(0,G.jsx)(j.Z,{open:Be,title:"打回确认",onOk:o()(l()().mark((function e(){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(2!==tn){e.next=7;break}return e.next=3,(0,W.ZP)("/api/homework_commons/".concat(fe.categoryId,"/batch_redo_modal.json"),{method:"post",body:{id:fe.categoryId,comment:hn,status:ze}});case 3:0===e.sent.status&&(x.ZP.info("打回成功"),Rn(),Fn(),Qe(!1)),e.next=11;break;case 7:return e.next=9,(0,W.ZP)("/api/homework_commons/".concat(fe.categoryId,"/batch_redo_modal.json"),{method:"post",body:{id:fe.categoryId,comment:hn,min_score:dn,max_score:rn}});case 9:0===e.sent.status&&(x.ZP.info("打回成功"),Rn(),Fn(),Qe(!1));case 11:case"end":return e.stop()}}),e)}))),onCancel:function(){Rn(),Qe(!1)},children:(0,G.jsxs)("div",{style:{padding:"32px"},children:[1===tn&&(0,G.jsxs)("span",{children:["确认将成绩在",dn,"-",rn,"的学生进行打回重做吗?"]}),2===tn&&(0,G.jsxs)("span",{children:["确认将作业状态为",(null===(S=xe.task_status)||void 0===S?void 0:S.filter((function(e){return null==ze?void 0:ze.includes(e.id)})).map((function(e){return e.name})).toString())+",","的学生进行作业打回重做吗?"]}),(0,G.jsx)("br",{}),(0,G.jsxs)("span",{children:["该条件下共有",null==Xe?void 0:Xe.count,"名学生"]})]})}),(0,G.jsx)(j.Z,{title:"调整分组",centered:!0,destroyOnClose:!0,open:gn,onOk:o()(l()().mark((function e(){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:wn.submit();case 1:case"end":return e.stop()}}),e)}))),onCancel:function(){yn(!1)},children:(0,G.jsxs)(O.Z,{form:wn,initialValues:{},labelCol:{span:4},onFinish:function(){var e=o()(l()().mark((function e(n){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.user_id){e.next=3;break}return x.ZP.warning("课堂里暂无此学生"),e.abrupt("return");case 3:if(n.group_id){e.next=6;break}return x.ZP.warning("课堂里暂无此分组"),e.abrupt("return");case 6:return e.next=8,(0,W.ZP)("/api/homework_commons/".concat(fe.categoryId,"/adjust_group.json"),{method:"post",body:n});case 8:if(0!=e.sent.status){e.next=15;break}return x.ZP.success("调整成功"),wn.resetFields(),yn(!1),e.next=15,Fn();case 15:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:[(0,G.jsx)(O.Z.Item,{name:"user_id",label:"学生姓名",rules:[{required:!0,message:"请输入学生姓名"}],children:(0,G.jsx)(F.default,{showSearch:!0,placeholder:"请输入学生姓名",filterOption:function(e,n){var t;return(null!==(t=null==n?void 0:n.label)&&void 0!==t?t:"").toLowerCase().includes(e.toLowerCase())},options:null==Zn||null===(ee=Zn.userAll)||void 0===ee?void 0:ee.map((function(e){return{value:e.user_id,label:e.name}}))})}),(0,G.jsx)(O.Z.Item,{name:"group_id",label:"调整至",rules:[{required:!0,message:"请输入分组名称"}],children:(0,G.jsx)(F.default,{showSearch:!0,placeholder:"请输入分组名称",filterOption:function(e,n){var t;return(null!==(t=null==n?void 0:n.label)&&void 0!==t?t:"").toLowerCase().includes(e.toLowerCase())},options:null==Zn||null===(te=Zn.groupAll)||void 0===te?void 0:te.map((function(e){return{value:e.group_id,label:"".concat(e.group_name,"")+(null==e?void 0:e.name_list)}}))})})]})}),(0,G.jsxs)(j.Z,{title:(0,G.jsxs)("span",{children:["资源推荐",(0,G.jsx)("span",{className:"font14 c-black-333",children:"(体验版)"})]}),destroyOnClose:!0,open:Sn,footer:null,onCancel:function(){Hn(!1)},width:700,children:[(0,G.jsxs)("div",{children:["根据你所在的分组及学习情况,为你推荐最佳的学习资源",(0,G.jsx)("b",{children:"顺序"}),"如下:"]}),null==xe||null===(se=xe.course_recommends)||void 0===se?void 0:se.map((function(e,n){return(0,G.jsxs)(w.Z,{align:"middle",justify:"space-between",children:[(0,G.jsxs)(w.Z,{style:{width:525},align:"middle",wrap:!1,children:[(0,G.jsxs)("div",{className:Q.Onerow,style:{display:"inline-block"},children:[n+1,"、",e.name]}),"外链"==e.type&&(0,G.jsx)("div",{className:"ml5",style:{display:"inline-block",whiteSpace:"nowrap",padding:"0px 10px",borderRadius:"10px",color:"#fff",background:"#1890ff"},children:"外链"})]}),(0,G.jsxs)(b.Z,{children:[(0,G.jsx)(X.op,{type:"link",onClick:function(){window.open(null==e?void 0:e.url)},children:"查看"}),"外链"!=e.type&&(0,G.jsx)(X.op,{openLoading:!0,type:"link",onClick:o()(l()().mark((function n(){return l()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:(0,I.FH)("","".concat(null==e?void 0:e.url));case 1:case"end":return n.stop()}}),n)}))),children:"下载"})]})]},n)}))]})]}):(0,G.jsx)(ae,{})})),oe=t(22107),ue=t(28388),ce=(0,_.connect)((function(e){return{shixunHomeworks:e.shixunHomeworks}}))((function(e){var n=e.shixunHomeworks,t=e.dispatch;(0,_.useParams)();return(0,G.jsx)(j.Z,{centered:!0,title:"提示",open:"删除"===n.actionTabs.key,okText:"确定",cancelText:"取消",onOk:o()(l()().mark((function e(){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t({type:"shixunHomeworks/deleteReply",payload:{object_id:n.actionTabs.selectArr.id,object_type:"journals_for_message"}});case 2:0===e.sent.status&&(x.ZP.success("删除成功"),t({type:"shixunHomeworks/setActionTabs",payload:{}}),t({type:"shixunHomeworks/getReplyList",payload:c()({},n.actionTabs.params)}));case 4:case"end":return e.stop()}}),e)}))),onCancel:function(){t({type:"shixunHomeworks/setActionTabs",payload:{}})},children:(0,G.jsx)("p",{children:"确定要删除该条回复吗?"})})})),de=t(97632),me=t(71418),pe=t(20360),_e=t(62426),he={flex_box_center:"flex_box_center___CUQTA",flex_space_between:"flex_space_between___VY1nG",flex_box_vertical_center:"flex_box_vertical_center___XJiqA",flex_box_center_end:"flex_box_center_end___w4A8Z",flex_box_column:"flex_box_column___WAD8k",top:"top___wjvbq",desc:"desc___dEt4i",liked:"liked___HcN9D",likedActive:"likedActive___VhZeS",reply:"reply___DaEgJ",replyList:"replyList___ZYtQu",comment:"comment___PfBmX",headpic:"headpic___ne811"};ne().locale("ZH-cn");var fe=(0,_.connect)((function(e){var n=e.shixunHomeworks,t=e.classroomList,s=e.user,i=e.loading;return{shixunHomeworks:n,globalSetting:e.globalSetting,user:s,classroomList:t,loading:i.effects}}))((function(e){var n,t,s,i=e.shixunHomeworks,a=e.classroomList,r=(e.globalSetting,e.loading),u=e.user,d=e.dispatch,h=(0,p.useState)(c()({},(0,_.useParams)())),v=m()(h,2),y=v[0],j=(v[1],(0,p.useState)(!1)),Z=m()(j,2),N=Z[0],I=Z[1],S=(0,p.useState)(-1),H=m()(S,2),O=H[0],C=H[1],L=(0,p.useState)(""),T=m()(L,2),A=T[0],D=T[1],F=(0,p.useState)(""),R=m()(F,2),E=R[0],M=R[1],V=(i.workList,a.detailLeftMenus),W=(i.shixunHomeworksDetail,i.replyList),z=i.workDetail;return y.page_size=10,(0,p.useEffect)((function(){d({type:"shixunHomeworks/getReplyList",payload:c()({},y)}),d({type:"shixunHomeworks/getWorkDetail",payload:c()({},y)}),V.course_modules||d({type:"classroomList/getClassroomLeftMenus",payload:c()({},y)})}),[y.categoryId]),(0,G.jsxs)("section",{className:he.bg,children:[(0,G.jsx)(me.Z,{spinning:r["shixunHomeworks/getWorkDetail"],children:(0,G.jsxs)("section",{className:"",children:[(0,G.jsxs)("aside",{className:[he.desc,"c-black","font14","bg-white"].join(" "),children:["编辑作业"!==i.actionTabs.key&&(0,G.jsx)(ue.Z,{value:(null==z?void 0:z.description)||"暂无~"}),"分组要求:",null==z||null===(n=z.group_info)||void 0===n?void 0:n.min_num," ~ ",null==z||null===(t=z.group_info)||void 0===t?void 0:t.max_num,"人 ",(0,G.jsx)("span",{className:"c-light-black",children:"(学生提交作品时需要关联同组成员,组内成员作品共享)"}),(0,G.jsx)("br",{}),"基于项目实施:",null!=z&&null!==(s=z.group_info)&&void 0!==s&&s.base_on_project?"是":"否",(0,G.jsx)("span",{className:"c-light-black",children:"(学生必须在本平台创建项目,项目管理员可以提交作品)"}),(0,G.jsx)(de.Z,{authority:(0,P.GJ)(),showDimensions:!1,dataSource:null==z?void 0:z.attachments,callback:function(){d({type:"shixunHomeworks/getWorkDetail",payload:c()({},y)})}}),"编辑作业"===i.actionTabs.key&&(0,G.jsxs)("aside",{className:["bg-white"].join(" "),children:[(0,G.jsx)(B.Z,{onChange:function(e){D(e)},defaultValue:null==z?void 0:z.explanation,height:200,isFocus:!0,watch:!0}),(0,G.jsx)(w.Z,{children:(0,G.jsxs)(b.Z,{span:24,className:"tr",children:[(0,G.jsx)(f.ZP,{type:"default",size:"large",onClick:o()(l()().mark((function e(){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:d({type:"shixunHomeworks/setActionTabs",payload:{key:""}});case 1:case"end":return e.stop()}}),e)}))),children:"取消"}),(0,G.jsx)(f.ZP,{type:"primary",size:"large",className:"ml20",onClick:o()(l()().mark((function e(){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(""!==A){e.next=4;break}x.ZP.error("请输入内容"),e.next=8;break;case 4:return e.next=6,d({type:"shixunHomeworks/updateWork",payload:{explanation:A,categoryId:y.categoryId}});case 6:0===e.sent.status&&(x.ZP.success("操作成功"),d({type:"shixunHomeworks/setActionTabs",payload:{key:""}}),d({type:"shixunHomeworks/getWorkDetail",payload:c()({},y)}));case 8:case"end":return e.stop()}}),e)}))),children:"保存"})]})})]})]}),(0,G.jsxs)("aside",{className:[he.reply,"bg-white","mt20"].join(" "),children:[N&&(0,G.jsx)(B.Z,{onChange:function(e){D(e)},height:200,isFocus:!0,watch:!0}),(0,G.jsxs)(w.Z,{onClick:function(){I(!0)},children:[(0,G.jsx)(b.Z,{flex:"1",style:{pointerEvents:"none"},children:!N&&(0,G.jsx)(k.Z,{size:"large",className:"current",placeholder:"说点什么",disabled:!0})}),(0,G.jsx)(b.Z,{children:(0,G.jsx)(f.ZP,{type:"primary",size:"large",onClick:o()(l()().mark((function e(){var n;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(0,P.Rm)()||null!==(n=a.AssistantObject.practice)&&void 0!==n&&n.can_create){e.next=3;break}return x.ZP.warn("您未获取此权限,需向管理员申请权限才能使用此功能"),e.abrupt("return");case 3:if(""!==A){e.next=7;break}x.ZP.error("请输入内容"),e.next=11;break;case 7:return e.next=9,d({type:"shixunHomeworks/createReply",payload:{journals_for_message:{jour_id:y.categoryId,jour_type:"HomeworkCommon",reply_id:1,notes:A}}});case 9:0===e.sent.status&&(x.ZP.success("发布成功"),d({type:"shixunHomeworks/getReplyList",payload:c()({},y)}),I(!1),D(""));case 11:case"end":return e.stop()}}),e)}))),children:"发表"})})]})]}),(null==W?void 0:W.comments)&&""!=W.comments&&(0,G.jsx)("aside",{className:[he.replyList,"bg-white"].join(" "),children:null==W?void 0:W.comments.map((function(e,n){var t,s,i,a;return(0,G.jsxs)(w.Z,{gutter:[12,12],children:[(0,G.jsx)(b.Z,{flex:"40px",children:(0,G.jsx)("img",{className:he.headpic,width:"40",src:"".concat(oe.Z.IMG_SERVER,"/images/").concat(null==e||null===(t=e.author)||void 0===t?void 0:t.image_url)})}),(0,G.jsx)(b.Z,{flex:"1",children:(0,G.jsxs)(w.Z,{align:"middle",children:[(0,G.jsxs)(b.Z,{span:20,children:[(0,G.jsx)("span",{className:"c-light-black",children:null==e||null===(s=e.author)||void 0===s?void 0:s.name}),(0,G.jsxs)("span",{className:"c-light-black ml10",children:[null==e?void 0:e.time," 发布"]})]}),(0,G.jsx)(b.Z,{className:"tr",span:4,children:(0,G.jsx)("div",{className:"tr",children:((0,P.GJ)()||(null==u||null===(i=u.userInfo)||void 0===i?void 0:i.login)===(null==e||null===(a=e.author)||void 0===a?void 0:a.login))&&(0,G.jsx)(g.Z,{title:"删除",children:(0,G.jsx)(pe.Z,{className:"current",onClick:function(){d({type:"shixunHomeworks/setActionTabs",payload:{key:"删除",params:y,selectArr:e}})}})})})}),(0,G.jsx)(b.Z,{span:24,children:(0,G.jsx)(ue.Z,{value:e.content})}),e.children&&(0,G.jsx)("aside",{className:he.comment,children:e.children.map((function(e,n){var t,s;return(0,G.jsxs)(w.Z,{children:[(0,G.jsx)(b.Z,{span:24,children:(0,G.jsxs)(w.Z,{children:[(0,G.jsxs)(b.Z,{flex:"1",children:[e.author.name,(0,G.jsx)("span",{className:"c-light-black ml10",children:null==e?void 0:e.time})]}),(0,G.jsx)(b.Z,{children:((0,P.GJ)()||(null==u||null===(t=u.userInfo)||void 0===t?void 0:t.login)===(null==e||null===(s=e.author)||void 0===s?void 0:s.login))&&(0,G.jsx)(g.Z,{title:"删除",children:(0,G.jsx)(pe.Z,{className:"current",onClick:function(){d({type:"shixunHomeworks/setActionTabs",payload:{key:"删除",params:y,selectArr:e}})}})})})]})}),(0,G.jsx)(b.Z,{children:(0,G.jsx)(ue.Z,{value:e.content})})]},n)}))}),(0,G.jsxs)(b.Z,{span:24,className:"mt5 c-light-black",children:[O===n&&(0,G.jsxs)("aside",{children:[(0,G.jsx)(B.Z,{onChange:function(e){M(e)},height:150,isFocus:!0}),(0,G.jsx)(w.Z,{children:(0,G.jsx)(b.Z,{span:24,className:"tr",children:(0,G.jsx)(f.ZP,{type:"primary",size:"large",onClick:o()(l()().mark((function n(){return l()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(""!==E){n.next=4;break}x.ZP.error("请输入内容"),n.next=9;break;case 4:return n.next=6,d({type:"shixunHomeworks/createReply",payload:{journals_for_message:{jour_id:y.categoryId,jour_type:"HomeworkCommon",m_parent_id:e.id,reply_id:1,notes:E}}});case 6:d({type:"shixunHomeworks/getReplyList",payload:c()({},y)}),x.ZP.success("发布成功"),C(-1);case 9:case"end":return n.stop()}}),n)}))),children:"发表"})})})]}),O!==n&&(0,G.jsxs)("div",{className:"tr",children:[(0,G.jsx)("span",{className:"iconfont icon-huifu1 mr5 ml30",onClick:function(){return C(n)}}),!!e.user_praise&&(0,G.jsxs)("span",{className:"c-orange",children:[(0,G.jsx)(_e.Z,{className:"mr5 ml30",onClick:o()(l()().mark((function n(){return l()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,d({type:"shixunHomeworks/replyUnLike",payload:{object_id:e.id,object_type:"journals_for_message"}});case 2:d({type:"shixunHomeworks/getReplyList",payload:c()({},y)});case 3:case"end":return n.stop()}}),n)})))}),!!e.praise_count&&e.praise_count]}),!e.user_praise&&(0,G.jsxs)("span",{children:[(0,G.jsx)(_e.Z,{className:"mr5 ml30",onClick:o()(l()().mark((function n(){return l()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,d({type:"shixunHomeworks/replyLike",payload:{object_id:e.id,object_type:"journals_for_message"}});case 2:d({type:"shixunHomeworks/getReplyList",payload:c()({},y)});case 3:case"end":return n.stop()}}),n)})))}),!!e.praise_count&&e.praise_count]})]})]})]})})]},n)}))})]})}),(0,G.jsx)("aside",{className:"tc mt30 pb30",children:(0,G.jsx)(Y.Z,{defaultCurrent:1,total:null==W?void 0:W.total_count,hideOnSinglePage:!0,current:y.page||1,onChange:function(e){y.page=e,d({type:"shixunHomeworks/getReplyList",payload:c()({},y)})}})}),(0,G.jsx)(ce,{})]})}));ne().locale("ZH-cn");var xe=(0,_.connect)((function(e){var n=e.shixunHomeworks,t=e.classroomList,s=e.loading;return{shixunHomeworks:n,globalSetting:e.globalSetting,classroomList:t,loading:s.effects}}))((function(e){var n,t=e.shixunHomeworks,s=e.classroomList,i=(e.globalSetting,e.loading,e.dispatch),a=(0,_.useParams)(),l=s.detailLeftMenus,r=(t.replyList,t.referenceAnswer);return a.page_size=10,(0,p.useEffect)((function(){i({type:"shixunHomeworks/getReplyList",payload:c()({},a)}),i({type:"shixunHomeworks/getReferenceAnswer",payload:{coursesId:a.categoryId}}),l.course_modules||i({type:"classroomList/getClassroomLeftMenus",payload:c()({},a)})}),[a.categoryId]),(0,G.jsx)("section",{className:"pb30 pl30 pr30 pt30 bg-white",children:(0,G.jsxs)("aside",{className:["c-black","font14"].join(" "),children:["编辑作业"!==t.actionTabs.key&&(0,G.jsxs)("div",{children:[(null==r?void 0:r.reference_answer)&&(0,G.jsx)(ue.Z,{value:null==r?void 0:r.reference_answer}),!(null!=r&&r.reference_answer)&&(0,G.jsx)(z.Z,{})]}),null==r||null===(n=r.attachments)||void 0===n?void 0:n.map((function(e,n){return(0,G.jsx)("div",{children:(0,G.jsxs)("a",{href:"".concat(oe.Z.API_SERVER).concat(e.url),children:[(0,G.jsx)("span",{className:"iconfont icon-fujian c-green font14"}),(0,G.jsx)("span",{className:"ml10 c-black",children:e.title}),(0,G.jsx)("span",{className:"c-light-black ml20 font12",children:e.filesize})]})})}))]})})})),ve=t(24028),ge=t(39647),ye=t.n(ge),je="modal___lF39e",we=["classroomList","shixunHomeworks","dispatch","cb"],be=(0,_.connect)((function(e){return{shixunHomeworks:e.shixunHomeworks,classroomList:e.classroomList}}))((function(e){var n,t,s,i,a,r=e.classroomList,u=e.shixunHomeworks,d=e.dispatch,h=e.cb,f=(ye()(e,we),(0,_.useParams)()),v=(0,p.useState)(""),g=m()(v,2),y=g[0],w=g[1],b=(0,p.useState)([]),k=m()(b,2),Z=k[0],N=k[1],I=(0,p.useState)({learn:0,active:0,score:0,chat:0}),P=m()(I,2),S=P[0],H=P[1];console.log(u,"classroomList");var O=u.workList;(0,p.useEffect)((function(){r.actionTabs.key}),[r.actionTabs]);var C=function(){var e=o()(l()().mark((function e(){var n;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(y){e.next=3;break}return x.ZP.warning("每个小组学生人数不能为空"),e.abrupt("return");case 3:return d({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"正在进行智能分组,请稍后..."}}),e.next=6,(0,W.ZP)("/api/homework_commons/".concat(f.categoryId,"/ai_bulk_create.json"),{method:"post",body:c()(c()({min:1,max:y,course_id:f.coursesId},S),{},{course_group_ids:Z})});case 6:0===(null==(n=e.sent)?void 0:n.status)&&(x.ZP.info("智能分组成功"),d({type:"classroomList/setActionTabs",payload:{}}),h()),d({type:"globalSetting/setGlobalLoading",payload:{show:!1}});case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,G.jsxs)(j.Z,{width:584,className:je,zIndex:3,centered:!0,destroyOnClose:!0,afterClose:function(){N([]),w(""),H({learn:0,active:0,score:0,chat:0})},title:"智能分组",onOk:C,open:"智能分组"===r.actionTabs.key,onCancel:function(){d({type:"classroomList/setActionTabs",payload:{}})},children:[(0,G.jsxs)("p",{style:{display:"flex",alignItems:"center"},children:[(0,G.jsx)("label",{style:{minWidth:80,display:"inline-flex",justifyContent:"end",marginRight:10,alignItems:"center"},children:"每个小组学生人数:"}),(0,G.jsx)(D.Z,{style:{width:100},min:null==O||null===(n=O.group_data)||void 0===n?void 0:n.min_num,max:null==O||null===(t=O.group_data)||void 0===t?void 0:t.max_num,precision:0,step:1,value:y,onChange:function(e){w(e)}}),(0,G.jsxs)("span",{style:{marginLeft:10,color:"#a6a6a6"},children:["每组成员人数范围为",null==O||null===(s=O.group_data)||void 0===s?void 0:s.min_num,"~",null==O||null===(i=O.group_data)||void 0===i?void 0:i.max_num,"人"]})]}),(0,G.jsxs)("p",{style:{display:"flex"},children:[(0,G.jsx)("label",{style:{minWidth:80,display:"inline-flex",justifyContent:"end",marginRight:10},children:"分班:"}),(0,G.jsx)(L.Z.Group,{value:Z,onChange:function(e){N(e)},children:null==O||null===(a=O.course_group_info)||void 0===a?void 0:a.map((function(e){return(0,G.jsx)(L.Z,{value:null==e?void 0:e.course_group_id,children:null==e?void 0:e.group_group_name},null==e?void 0:e.course_group_id)}))})]}),(0,G.jsxs)("div",{style:{display:"flex"},children:[(0,G.jsx)("label",{style:{minWidth:80,display:"inline-flex",justifyContent:"end",marginRight:10},children:"分组规则:"}),(0,G.jsxs)(L.Z.Group,{onChange:function(e){H({learn:e.indexOf(1)>-1?1:0,active:e.indexOf(2)>-1?1:0,score:e.indexOf(3)>-1?1:0,chat:e.indexOf(4)>-1?1:0})},children:[(0,G.jsx)(L.Z,{value:1,children:"在线时长"}),(0,G.jsx)(L.Z,{value:2,children:"参与课堂数"}),(0,G.jsx)(L.Z,{value:4,children:"互动次数"}),(0,G.jsx)(L.Z,{value:3,children:"历史总成绩"})]})]})]})})),ke=t(4015),Ze={flex_box_center:"flex_box_center___eiaQ9",flex_space_between:"flex_space_between___fT_mk",flex_box_vertical_center:"flex_box_vertical_center___th1VG",flex_box_center_end:"flex_box_center_end___uybac",flex_box_column:"flex_box_column___TqJIG",form:"form___njbEi",efficiency:"efficiency___Oei2A",configworksContainer:"configworksContainer___Nq83Z"},Ne=t(70236),Ie=t.n(Ne),Pe=(0,_.connect)((function(e){return{shixunHomeworks:e.shixunHomeworks,loading:e.loading.effects}}))((function(e){var n,t;Ie()(e);var s=(0,p.useState)(!0),i=m()(s,2),a=i[0],r=i[1],u=(0,p.useState)(!1),c=m()(u,2),d=c[0],h=c[1],v=(0,p.useState)([]),g=m()(v,2),y=g[0],N=g[1],I=(0,p.useState)([]),P=m()(I,2),S=P[0],H=P[1],O=(0,p.useState)([]),C=m()(O,2),L=C[0],T=C[1],Y=(0,p.useState)([]),A=m()(Y,2),D=A[0],F=A[1],R=(0,_.useParams)();function E(){return M.apply(this,arguments)}function M(){return(M=o()(l()().mark((function e(){var n;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,W.ZP)("/api/homework_commons/".concat(R.categoryId,"/homework_common_collaborators.json"),{method:"get"});case 2:n=e.sent,H(n);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function V(){return J.apply(this,arguments)}function J(){return(J=o()(l()().mark((function e(){var n;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,W.ZP)("/api/courses/".concat(null==R?void 0:R.coursesId,"/teachers"),{method:"get",params:{homework_id:R.categoryId,limit:1e3}});case 2:null==(n=e.sent)||n.teacher_list.map((function(e){e.key=e.user_id})),T(null==n?void 0:n.teacher_list),F(null==n?void 0:n.teacher_list);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}(0,p.useEffect)((function(){E(),V()}),[R]);return(0,G.jsxs)("section",{className:[Ze.form," bg-white pl30 pr30 pt10"].join(" "),children:[(0,G.jsx)(w.Z,{children:(0,G.jsxs)(b.Z,{flex:"1",children:[(0,G.jsx)("span",{style:{fontSize:"16px"},children:"协作设置"}),(null==S?void 0:S.can_edit)&&(0,G.jsx)("span",{style:{cursor:"pointer",color:"#0152d9",marginLeft:"10px"},onClick:function(){h(!0)},children:"+添加协作者"})]})}),(0,G.jsxs)(w.Z,{style:{marginTop:"20px",marginBottom:"20px"},children:[(null==S||null===(n=S.data)||void 0===n?void 0:n.length)<=0&&(0,G.jsx)(z.Z,{customText:"该作业暂无协作者"}),null==S||null===(t=S.data)||void 0===t?void 0:t.map((function(e){return(0,G.jsxs)("span",{style:{display:"inline-flex",height:"40px",borderRadius:"4px",border:"1px solid #44D7B6",padding:"7px 20px",color:"#44D7B6",marginRight:"40px",marginBottom:20},children:[(0,G.jsx)("span",{style:{flex:"1"},children:null==e?void 0:e.real_name}),(null==S?void 0:S.can_edit)&&(0,G.jsx)("span",{style:{cursor:"pointer",marginLeft:"10px"},onClick:o()(l()().mark((function n(){return l()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,W.ZP)("/api/homework_commons/".concat(R.categoryId,"/homework_common_collaborators/delete.json"),{method:"delete",body:{user_id:e.id}});case 2:0===n.sent.status&&(x.ZP.info("删除成功"),E(),V());case 4:case"end":return n.stop()}}),n)}))),children:"X"})]},e.id)}))]}),(0,G.jsx)(w.Z,{children:!a&&(0,G.jsxs)(b.Z,{className:"mb50",children:[(0,G.jsx)(f.ZP,{type:"primary",size:"middle",onClick:function(){},children:"提交"}),(0,G.jsx)(f.ZP,{type:"primary",size:"middle",ghost:!0,className:"ml20",onClick:function(){r(!0)},children:"取消"})]})}),(0,G.jsx)(j.Z,{title:"添加协作者",open:d,onCancel:function(){return h(!1)},onOk:o()(l()().mark((function e(){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==y.length){e.next=3;break}return x.ZP.info("请选择协作老师"),e.abrupt("return");case 3:return e.next=5,(0,W.ZP)("/api/homework_commons/".concat(R.categoryId,"/homework_common_collaborators.json"),{method:"post",body:{user_ids:y}});case 5:0===e.sent.status&&(x.ZP.info("添加成功"),N([]),E(),V(),h(!1));case 7:case"end":return e.stop()}}),e)}))),children:(0,G.jsxs)("div",{children:[(0,G.jsxs)("div",{style:{display:"flex"},children:[(0,G.jsx)("label",{style:{width:"50px"},children:"姓名:"})," ",(0,G.jsx)(k.Z.Search,{onChange:function(e){T(D.filter((function(n){return n.name.indexOf(e.target.value)>-1})))}})]}),(0,G.jsx)(Z.Z,{style:{marginTop:"10px",height:"300px",overflow:"auto"},rowSelection:{type:"checkbox",onChange:function(e,n){N(e)},selectedRowKeys:y,getCheckboxProps:function(e){return{disabled:e.is_collaborator}}},pagination:!1,dataSource:L,columns:[{title:"姓名",dataIndex:"name",key:"name"},{title:"角色",dataIndex:"role",key:"role"}]})]})})]})})),Se=t(84291),He=t(57703),Oe=t(38990),Ce=t(68360),Le=t(11982),Te=Se.default.RangePicker,Ye=F.default.Option,Ae=(0,_.connect)((function(e){return{shixunHomeworks:e.shixunHomeworks,classroomList:e.classroomList}}))((function(e){var n,t,s,a,r,u,d,h,v,g,y=e.shixunHomeworks,k=e.classroomList,Z=e.getData,N=e.dispatch,S=y.workSetting,H=y.workList,O=(0,_.useParams)(),C=(0,p.useState)(!0),T=m()(C,2),Y=T[0],R=T[1],E=(0,p.useState)([]),M=m()(E,2),V=M[0],W=M[1],z=(0,p.useState)([]),J=m()(z,2),q=J[0],B=J[1],Q=(0,p.useState)({unified_setting:!1,publish_time:"",end_time:"",is_group_grade:!1,ta_mode:1,final_mode:!1,st_proportion:"20%",ta_proportion:"30%",te_proportion:"50%",gr_proportion:"",student_comment:!1,anonymous_appeal:!1,appeal_penalty:0,appeal_time:"",anonymous_comment:!1,evaluation_num:0,evaluation_start:"",evaluation_end:"",absence_penalty:0,work_public:!1,allow_late:!1,unified_late:!0,late_time:"",late_penalty:0,penalty_type:Oe.Q.Number,challenge_settings:[],work_efficiency:!1,shixun_evaluation:"",answer_open_evaluation:!1,answer_public:!1,score_open:!1,total_score:"",eff_score:"",unified_anonymous_comment:!0,unified_anonymous_appeal:!0,submit_limit:!1,submit_limit_num:"",must_file:!1,can_submit:!1,submit_num:""}),U=m()(Q,2),K=U[0],X=U[1],ee=(0,p.useState)(!1),te=m()(ee,2),se=(te[0],te[1]);(0,p.useEffect)((function(){null!=S&&S.course_id&&(Object.keys(K).map((function(e){e.indexOf("proportion")>-1?K[e]=100*S[e]:K[e]=S[e]})),S.anonymous_comment&&(K.unified_late=S.unified_anonymous_comment,se(S.unified_anonymous_comment)),K.allow_late&&K.unified_late||(K.late_penalty=5),K.unified_setting||(K.unified_late=!1,K.unified_anonymous_comment=!1,K.unified_anonymous_appeal=!1),V=JSON.parse(JSON.stringify(S.group_settings.map((function(e){return c()(c()({},e),{},{group_name:[e.group_name]})})).filter((function(e){return null!==e.publish_time})))),q=JSON.parse(JSON.stringify(S.allow_late_settings.map((function(e){return c()(c()({},e),{},{group_name:[e.group_name]})})).filter((function(e){return null!==e.late_time})))),X(c()({},K)),W(V.length?i()(V):[{}]),B(i()(q)))}),[S]);var ie=(0,p.useState)(!1),ae=m()(ie,2),le=ae[0],re=ae[1],oe=function(){var e=o()(l()().mark((function e(){var n,t,s;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(re(!le),(t=JSON.parse(JSON.stringify(K))).categoryId=O.categoryId,K.unified_setting||(V=null===(n=V)||void 0===n?void 0:n.map((function(e){var n;if(!e.publish_time||!e.end_time)throw x.ZP.error("发布、截止时间不能为空"),re(!1),new String("发布、截止时间不能为空");if(!e.group_name)throw x.ZP.error("请选择分班名称"),re(!1),new String("请选择分班名称");return e.group_name="string"==typeof(null==e?void 0:e.group_name)?[null==e?void 0:e.group_name]:null==e?void 0:e.group_name,e.group_id=null==e||null===(n=e.group_name)||void 0===n||null===(n=n.map((function(e){var n,t=null===(n=S.group_settings)||void 0===n||null===(n=n.filter((function(n){return(null==n?void 0:n.group_name)===e})))||void 0===n?void 0:n[0];return null==t?void 0:t.group_id})))||void 0===n?void 0:n.toString().split(","),e}))),t.group_settings=V,!K.allow_late){e.next=19;break}if(!K.unified_late){e.next=17;break}if(!(null===K.late_penalty||void 0===K.late_penalty||K.late_penalty<0||K.late_penalty>100)){e.next=11;break}throw x.ZP.error("迟交扣分填写区间为0~100"),re(!1),new String("迟交扣分填写区间为0~100");case 11:if(K.late_time){e.next=15;break}throw x.ZP.error("补交截止时间不能为空"),re(!1),new String("补交截止时间不能为空");case 15:e.next=19;break;case 17:q=null===(s=q)||void 0===s?void 0:s.map((function(e){var n;if(e.penalty_type=Oe.Q.Number,null===e.late_penalty||void 0===e.late_penalty||e.late_penalty<0||e.late_penalty>100)throw x.ZP.error("迟交扣分填写区间为0~100"),re(!1),new String("迟交扣分填写区间为0~100");if(!e.late_time)throw x.ZP.error("补交截止时间不能为空"),re(!1),new String("补交截止时间不能为空");if(!e.group_name)throw x.ZP.error("请选择分班名称"),re(!1),new String("请选择分班名称");return e.group_name="string"==typeof(null==e?void 0:e.group_name)?[null==e?void 0:e.group_name]:null==e?void 0:e.group_name,e.group_id=null==e||null===(n=e.group_name)||void 0===n||null===(n=n.map((function(e){var n,t=null===(n=S.group_settings)||void 0===n||null===(n=n.filter((function(n){return(null==n?void 0:n.group_name)===e})))||void 0===n?void 0:n[0];return null==t?void 0:t.group_id})))||void 0===n?void 0:n.toString().split(","),e})),t.allow_late_settings=q;case 19:if(null==K||!K.submit_limit||null!=K&&K.submit_limit_num){e.next=23;break}return x.ZP.warning("学生填写内容字数不能为空"),re(!1),e.abrupt("return");case 23:if(null==K||!K.can_submit||null!=K&&K.submit_num){e.next=27;break}return x.ZP.warning("学生提交作品次数不能为空"),re(!1),e.abrupt("return");case 27:Object.keys(t).map((function(e){e.indexOf("proportion")>-1&&(t[e]=t[e]/100)})),N({type:"shixunHomeworks/updateSetting",payload:c()(c()({},t),{},{penalty_type:Oe.Q.Number})}).then((function(e){0===e.status?(re(!1),x.ZP.success("更新成功"),R(!0),Z()):re(!1)}));case 29:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ue=((0,p.useMemo)((function(){return(null==S?void 0:S.allow_late)||(null==S?void 0:S.all_group_late)}),[S,H]),function(e,n){var t,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"group_id";return n?n.find((function(n){return n[s]===e})):null==S||null===(t=S.group_settings)||void 0===t?void 0:t.find((function(n){return n.group_id[0]===e}))}),ce=null==S?void 0:S.anonymous_comment,de=!(null==S||null===(n=S.allow_late_settings)||void 0===n||!n.length)&&(null==S||null===(t=S.allow_late_settings)||void 0===t?void 0:t.every((function(e){if(e.evaluation_start)return!0}))),me=(null==S?void 0:S.unified_late)&&(null==S?void 0:S.anonymous_comment),_e=null==S?void 0:S.anonymous_comment,he=function(e){if(!e)return!1;var n=ue(e,null==S?void 0:S.anonymous_comment_settings);return(null==S?void 0:S.anonymous_comment)&&n&&null!==(null==n?void 0:n.evaluation_start)},fe=function(e){var n=ue(e,null==S?void 0:S.anonymous_comment_settings);return n&&null!==(null==n?void 0:n.evaluation_start)};return(0,G.jsxs)("div",{className:"bg-white pl30 pr30 pb30",children:[(0,G.jsxs)(w.Z,{children:[(0,G.jsx)(b.Z,{span:24,children:(0,G.jsxs)(w.Z,{align:"middle",children:[(0,G.jsx)(b.Z,{flex:"1",children:(0,G.jsx)("h1",{className:"mt15",children:"发布设置"})}),(0,G.jsxs)(b.Z,{children:[(0,P.GJ)()&&Y&&(0,G.jsx)(f.ZP,{type:"primary",size:"middle",ghost:!0,onClick:function(){var e,n;!(0,P.Rm)()||null!==(e=k.AssistantObject.group)&&void 0!==e&&e.can_late||null!==(n=k.AssistantObject.group)&&void 0!==n&&n.can_publish?R(!1):x.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能")},children:"编辑设置"}),!Y&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(f.ZP,{loading:le,type:"primary",size:"middle",onClick:function(){return oe()},children:"提交"}),(0,G.jsx)(f.ZP,{onClick:function(){R(!0),Z()},type:"primary",size:"middle",ghost:!0,className:"ml20",children:"取消"})]})]})]})}),(null==S||null===(s=S.group_settings)||void 0===s?void 0:s.length)>0?(0,G.jsxs)(b.Z,{span:24,className:"mt10",children:[(0,G.jsx)(L.Z,{checked:K.unified_setting,disabled:Y||!(null!=S&&null!==(a=S.homework_status)&&void 0!==a&&a.includes("未发布"))||(0,P.Rm)()&&!(null!==(r=k.AssistantObject)&&void 0!==r&&null!==(r=r.group)&&void 0!==r&&r.can_publish)||!(null!=S&&S.manage_all_group),onChange:function(){var e;null!=S&&null!==(e=S.homework_status)&&void 0!==e&&e.includes("未发布")?(K.unified_setting=!K.unified_setting,K.unified_setting||(K.unified_late=!1),X(Object.assign({},K)),""!=V?K.unified_setting&&(W([]),B([{late_penalty:5}])):W([{}])):x.ZP.error("已发布,不能再修改统一设置")},children:(0,G.jsx)("strong",{children:"统一设置"})}),(0,G.jsx)("span",{className:"c-grey-c font12",children:"(选中则所有分班使用相同的发布设置,仅课堂管理员可修改;否则各个分班允许单独设置)"})]}):null]}),K.unified_setting&&(0,G.jsxs)("div",{children:[(0,G.jsxs)(w.Z,{align:"middle",className:"mt25 pl30",children:[(0,G.jsx)(b.Z,{children:"发布时间:"}),(0,G.jsx)(b.Z,{className:"ml5",children:(0,G.jsx)(Se.default,{style:{width:170},placeholder:"请选择发布时间",showTime:{format:"HH:mm",defaultValue:ne()((0,I.U6)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",allowClear:!1,disabled:Y||!(null!=S&&null!==(u=S.homework_status)&&void 0!==u&&u.includes("未发布")||null!=S&&null!==(d=S.homework_status)&&void 0!==d&&d.includes("未开始"))||(0,P.Rm)()&&!(null!==(h=k.AssistantObject)&&void 0!==h&&null!==(h=h.group)&&void 0!==h&&h.can_publish),value:K.publish_time?ne()(K.publish_time):"",disabledDate:function(e){return(0,Le.Q8)(e,null==S?void 0:S.course_end_date)},disabledTime:function(e){return(0,Le.d0)(e)},onChange:function(e,n){K.publish_time=n,!K.end_time&&K.unified_setting&&(K.end_time=ne()(e).add(1,"month").format("YYYY-MM-DD HH:mm:ss")),X(Object.assign({},K))}})}),(0,G.jsx)(b.Z,{children:(0,G.jsx)("span",{className:"c-grey-c ml10",children:"(学生收到作业的时间)"})})]}),(0,G.jsxs)(w.Z,{align:"middle",className:"mt25 pl30",children:[(0,G.jsx)(b.Z,{children:"截止时间:"}),(0,G.jsx)(b.Z,{className:"ml5",children:(0,G.jsx)(Se.default,{allowClear:!1,style:{width:170},placeholder:"请选择截止时间",showTime:{format:"HH:mm",defaultValue:ne()((0,I.U6)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",disabled:de||_e||(null==S?void 0:S.allow_late)&&(null==S?void 0:S.homework_status.includes("已截止"))||Y||(null==S?void 0:S.allow_late)&&ne()()>=ne()(null==S?void 0:S.end_time)||(0,P.Rm)()&&!(null!==(v=k.AssistantObject)&&void 0!==v&&null!==(v=v.group)&&void 0!==v&&v.can_publish),disabledDate:function(e){return(0,Le.Q8)(e,null==S?void 0:S.course_end_date,K.publish_time)},disabledTime:function(e){return(0,Le.d0)(e,K.publish_time)},value:K.end_time?ne()(K.end_time):"",onChange:function(e,n){K.end_time=n,X(Object.assign({},K))}})}),(0,G.jsx)(b.Z,{children:(0,G.jsx)("span",{className:"c-grey-c ml10",children:"(学生“按时”提交作品的时间截点)"})})]})]}),!K.unified_setting&&(0,G.jsxs)(w.Z,{style:{marginTop:30,paddingTop:40,marginLeft:40,borderTop:"1px solid #eee"},children:[(0,G.jsx)(b.Z,{span:24,children:(0,G.jsxs)(w.Z,{children:[(0,G.jsx)(b.Z,{span:10}),(0,G.jsx)(b.Z,{span:1}),(0,G.jsx)(b.Z,{span:9,children:(0,G.jsxs)(w.Z,{className:"c-grey-c ",children:[(0,G.jsx)(b.Z,{flex:"1",children:"(学生收到作业时间)"}),(0,G.jsx)(b.Z,{flex:"1",children:"(学生“按时”提交作品时间截点)"})]})}),(0,G.jsx)(b.Z,{span:4})]})}),V&&V.map((function(e,n){var t,s,a,l,r,o,u,d,m;return(0,G.jsx)(b.Z,{span:24,children:(0,G.jsxs)(w.Z,{children:[(0,G.jsx)(b.Z,{span:10,children:(0,G.jsxs)(w.Z,{gutter:[8,16],children:[(0,G.jsxs)(b.Z,{children:["发布规则 ",n+1]}),(0,G.jsx)(b.Z,{flex:"auto",style:{maxWidth:350},children:(0,G.jsx)(F.default,{disabled:Y||!(null!=S&&null!==(t=S.homework_status)&&void 0!==t&&t.includes("未发布")&&e.id||ne()()<ne()(null==e?void 0:e.publish_time))&&!(null==e||!e.publish_time),className:"ml20",mode:"multiple",style:{width:"100%"},value:e.group_name,placeholder:"请选择分班名称",onChange:function(t){var s;if(!(0,P.Rm)()||null!==(s=k.AssistantObject)&&void 0!==s&&null!==(s=s.group)&&void 0!==s&&s.can_publish){V[n].group_name=t,V[n].group_id=e.group_id;var i=(0,$.flattenDeep)(V.map((function(e){return e.group_name}))),a=q.map((function(e){var n=(null==e?void 0:e.group_name)||[];return c()(c()({},e),{},{group_name:(0,$.remove)(n,(function(e){return i.includes(e)}))})}));B(a),W(V.slice())}else x.ZP.warning("您未获得此权限,需向管理员申请权限才能使用此功能")},children:S.group_settings&&S.group_settings.map((function(e){if(!V.map((function(e){return e.group_name})).toString().split(",").includes(String(e.group_name)))return(0,G.jsx)(Ye,{value:e.group_name,children:e.group_name},e.id)}))})})]})}),(0,G.jsx)(b.Z,{span:1}),(0,G.jsx)(b.Z,{span:9,children:(0,G.jsx)(Te,{allowClear:!1,ranges:{"此刻":[e.publish_time?ne()(e.publish_time):ne()(),ne()()]},disabled:Y||!(ne()()<=ne()(null===(s=ue(e.id))||void 0===s?void 0:s.publish_time))&&[!0,(l=e.id,u=ue(l,null==S?void 0:S.allow_late_settings,"id"),d=ue(l,null==S?void 0:S.anonymous_comment_settings),m=ue(l),(null==S?void 0:S.allow_late)&&u&&ne()(null==u?void 0:u.late_time)<=ne()()||(null==S?void 0:S.anonymous_comment)&&d&&null!==(null==d?void 0:d.evaluation_start)||null!=(null===(r=(ne()(null==m?void 0:m.end_time)<=ne()()&&(null==S||null===(o=S.allow_late_settings)||void 0===o?void 0:o.filter((function(e){return e.group_id.includes(l)}))))[0])||void 0===r?void 0:r.late_time))],style:{width:400},placeholder:["请选择发布时间","请选择截止时间"],disabledDate:function(e){return(0,Le.Q8)(e,null==S?void 0:S.course_end_date)},disabledTime:function(e){return(0,Le.d0)(e)},showTime:{format:"HH:mm",defaultValue:[ne()((0,I.U6)(),"HH:mm"),ne()((0,I.U6)(),"HH:mm")]},format:"YYYY-MM-DD HH:mm",value:e.publish_time&&[ne()(e.publish_time),ne()(e.end_time)],onChange:function(e,t){var s;!(0,P.Rm)()||null!==(s=k.AssistantObject)&&void 0!==s&&null!==(s=s.group)&&void 0!==s&&s.can_publish?(V[n].publish_time=t[0],V[n].end_time=t[1],W(i()(V))):x.ZP.warning("您未获得此权限,需向管理员申请权限才能使用此功能")}})}),!Y&&(0,G.jsxs)(b.Z,{span:4,children:[((null==e?void 0:e.publish_time)&&ne()()<ne()(null==e?void 0:e.publish_time)||!(null!=e&&e.publish_time))&&0!=n&&(0,G.jsx)(pe.Z,{onClick:function(){var e;if(!(0,P.Rm)()||null!==(e=k.AssistantObject)&&void 0!==e&&null!==(e=e.group)&&void 0!==e&&e.can_publish){var t=(0,$.cloneDeep)(q);t.forEach((function(e,t){e.group_name&&(e.group_name=e.group_name.filter((function(e){var t;return!(null!==(t=V[n].group_name)&&void 0!==t&&t.includes(e))})))})),B(t),V=V.filter((function(e,t){return n!==t})),W(V.slice()),setTimeout((function(){return W(V.slice())}),10)}else x.ZP.warning("您未获得此权限,需向管理员申请权限才能使用此功能")}}),V.length<(null==S||null===(a=S.group_settings)||void 0===a?void 0:a.length)&&(0,G.jsx)(He.Z,{className:"c-green ml20",onClick:function(){W(V.concat({}))}})]})]})},n)}))]}),(0,G.jsx)(Ce.ZP,{className:"mb20",disabled:Y,value:K,onChange:function(e){return X(c()(c()({},K),e))}}),(0,G.jsxs)(w.Z,{children:[(0,G.jsx)(b.Z,{children:(0,G.jsx)("strong",{children:"补交设置"})}),(0,G.jsxs)(b.Z,{span:24,className:"mt15 pl30",children:[(0,G.jsx)(L.Z,{checked:K.allow_late,disabled:de||(Y||(null==S?void 0:S.allow_late)),onChange:function(e){var n;!(0,P.Rm)()||null!==(n=k.AssistantObject.group)&&void 0!==n&&n.can_late?(e.target.checked&&j.Z.warning({title:"开启补交提示",width:480,centered:!0,content:(0,G.jsxs)("div",{style:{padding:10,background:"#f5f6f9"},children:[(0,G.jsx)("div",{children:"1.开启补交后不可关闭,补交方式提交保存后不可修改;"}),(0,G.jsx)("div",{children:"2.补交截止时间必须晚于作业截止时间;"}),(0,G.jsx)("div",{children:"3.班级阶段进入“补交中”则不可变更作业截止时间。"})]})}),K.allow_late=!K.allow_late,""==q&&B([{late_penalty:5}]),X(Object.assign({},K))):x.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能")},children:(0,G.jsx)("strong",{children:"开启补交"})}),(0,G.jsx)("span",{className:"c-grey-c font12",children:"(选中,则允许学生延时提交作品)"})]})]}),(null==K?void 0:K.allow_late)&&(0,G.jsxs)("div",{style:{marginLeft:22},children:[(0,G.jsxs)("div",{className:"ml30 mt20",children:[(0,G.jsx)("span",{children:"补交方式:"}),(0,G.jsxs)(A.ZP.Group,{disabled:Y,value:K.unified_late,onChange:function(e){var n;!(0,P.Rm)()||null!==(n=k.AssistantObject.group)&&void 0!==n&&n.can_late?(K.unified_late=e.target.value,""!=q||e.target.value||B([{late_penalty:5}]),X(c()({},K))):x.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能")},children:[(null==K?void 0:K.unified_setting)&&(0,G.jsx)(A.ZP,{disabled:(null==S?void 0:S.allow_late)||!(null!=S&&S.manage_all_group),value:!0,children:" 统一补交 "}),(null==S||null===(g=S.group_settings)||void 0===g?void 0:g.length)&&(0,G.jsx)(A.ZP,{disabled:null==S?void 0:S.allow_late,value:!1,children:" 分班补交 "})]})]}),null!=K&&K.unified_late?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(w.Z,{align:"middle",className:"mt25 pl30",children:[(0,G.jsx)(b.Z,{children:"补交扣分:"}),(0,G.jsx)(b.Z,{className:"ml5",children:(0,G.jsx)(D.Z,{disabled:Y||ce,min:0,value:K.late_penalty,onChange:function(e){var n;!(0,P.Rm)()||null!==(n=k.AssistantObject.group)&&void 0!==n&&n.can_late?(K.late_penalty=e,X(Object.assign({},K))):x.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能")}})}),(0,G.jsxs)(b.Z,{flex:"1",className:"ml5",children:["分",(0,G.jsx)("span",{className:"c-grey-c ml10",children:"(延时提交作品时,学生成绩将被扣减的分值)"})]})]}),(0,G.jsxs)(w.Z,{align:"middle",className:"mt25 pl30",children:[(0,G.jsx)(b.Z,{children:"补交截止时间:"}),(0,G.jsx)(b.Z,{className:"ml5",children:(0,G.jsx)(Se.default,{allowClear:!1,style:{width:170},placeholder:"请选择截止时间",showTime:{format:"HH:mm",defaultValue:ne()((0,I.U6)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",disabled:Y||me||de,value:K.late_time?ne()(K.late_time):"",disabledDate:function(e){return(0,Le.Q8)(e,null==S?void 0:S.course_end_date)},disabledTime:function(e){return(0,Le.d0)(e)},onChange:function(e,n){var t;!(0,P.Rm)()||null!==(t=k.AssistantObject.group)&&void 0!==t&&t.can_late?(K.late_time=n,X(Object.assign({},K))):x.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能")}})}),(0,G.jsx)(b.Z,{children:(0,G.jsx)("span",{className:"c-grey-c ml10",children:"(学生“延时”提交作品的时间截点)"})})]})]}):q.map((function(e,n){var t;return(0,G.jsx)(b.Z,{span:24,children:(0,G.jsxs)(w.Z,{className:"mt25",align:"middle",children:[(0,G.jsxs)(b.Z,{style:{marginLeft:30},children:[(0,G.jsxs)("span",{children:["补交规则",n+1,""]}),(0,G.jsx)(F.default,{disabled:Y||!(null!=S&&null!==(t=S.homework_status)&&void 0!==t&&t.includes("未发布"))&&e.id,mode:"multiple",style:{width:306},value:"string"==typeof e.group_name?[e.group_name]:e.group_name,placeholder:"请选择分班名称",onChange:function(t){var s;!(0,P.Rm)()||null!==(s=k.AssistantObject.group)&&void 0!==s&&s.can_late?(q[n].group_name=t,q[n].group_id=e.group_id,B(q.slice())):x.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能")},children:S.group_settings&&S.group_settings.map((function(e){return(null==K||!K.unified_setting||q.map((function(e){return e.group_name})).toString().split(",").includes(String(e.group_name))||fe(e.id))&&(!V.map((function(e){return e.group_name})).toString().split(",").includes(String(e.group_name))||q.map((function(e){return e.group_name})).toString().split(",").includes(String(e.group_name))||fe(e.id))?void 0:(0,G.jsx)(Ye,{value:e.group_name,children:e.group_name},e.id)}))})]}),(0,G.jsxs)(b.Z,{className:"ml20",children:[(0,G.jsx)("span",{children:"补交扣分:"}),(0,G.jsx)(D.Z,{min:0,max:100,disabled:Y||he(e.id),defaultValue:e.late_penalty,onChange:function(e){var t;!(0,P.Rm)()||null!==(t=k.AssistantObject.group)&&void 0!==t&&t.can_late?(q[n].late_penalty=e,q[n].penalty_type=Oe.Q.Number):x.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能")}})]}),(0,G.jsxs)(b.Z,{className:"ml20",children:[(0,G.jsx)("span",{children:"补交截止时间:"}),(0,G.jsx)(Se.default,{disabled:Y||he(e.id),style:{width:200},showTime:{format:"HH:mm",defaultValue:ne()((0,I.U6)(),"HH:mm")},placeholder:"请选择截止时间",disabledDate:function(e){return(0,Le.Q8)(e,null==S?void 0:S.course_end_date)},disabledTime:function(e){return(0,Le.d0)(e)},format:"YYYY-MM-DD HH:mm",value:null!=e&&e.late_time?ne()(e.late_time):void 0,onChange:function(e,t){var s;!(0,P.Rm)()||null!==(s=k.AssistantObject.group)&&void 0!==s&&s.can_late?(q[n].late_time=t,B(i()(q))):x.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能")}})]}),!Y&&(0,G.jsxs)(b.Z,{className:"ml20",children:[n>0&&!e.id&&(0,G.jsx)(pe.Z,{onClick:function(){var e;!(0,P.Rm)()||null!==(e=k.AssistantObject.group)&&void 0!==e&&e.can_late?(q=q.filter((function(e,t){return n!==t})),B(q.slice()),setTimeout((function(){return B(q.slice())}),10)):x.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能")}}),(0,G.jsx)(He.Z,{className:"c-green ml20",onClick:function(){var e;!(0,P.Rm)()||null!==(e=k.AssistantObject.group)&&void 0!==e&&e.can_late?B(q.concat({penalty_type:Oe.Q.Number,late_penalty:5})):x.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能")}})]})]})},n)}))]})]})})),De=t(78673),Fe=t(60324),Re=t(85699),Ee=(0,_.connect)((function(e){return{shixunHomeworks:e.shixunHomeworks}}))((function(e){var n=e.shixunHomeworks,t=e.getData,s=e.dispatch,a=n.workSetting,r=(0,_.useParams)(),u=(0,p.useState)(!0),d=m()(u,2),h=d[0],v=d[1],g=(0,p.useState)([]),y=m()(g,2),k=y[0],Z=y[1],N=(0,p.useState)([]),I=m()(N,2),S=I[0],H=I[1],O=(0,p.useState)(!1),C=m()(O,2),L=C[0],T=C[1],Y=(0,p.useState)({unified_setting:!1,publish_time:"",end_time:"",is_group_grade:!1,ta_mode:1,final_mode:!1,st_proportion:"20%",ta_proportion:"30%",te_proportion:"50%",gr_proportion:"",student_comment:!1,anonymous_appeal:!1,appeal_penalty:0,appeal_time:"",anonymous_comment:!1,evaluation_num:0,evaluation_start:"",evaluation_end:"",absence_penalty:0,work_public:!1,allow_late:!1,unified_late:!0,late_time:"",late_penalty:0,penalty_type:Oe.Q.Number,challenge_settings:[],work_efficiency:!1,shixun_evaluation:"",answer_open_evaluation:!1,answer_public:!1,score_open:!1,total_score:"",eff_score:"",unified_anonymous_comment:!0,unified_anonymous_appeal:!0}),F=m()(Y,2),R=F[0],E=F[1];(0,p.useEffect)((function(){null!=a&&a.course_id&&(Object.keys(R).map((function(e){e.indexOf("proportion")>-1?(R[e]=(100*a[e]).toFixed(0),console.log(e,R[e],a[e])):R[e]=a[e]})),R.allow_late&&R.unified_late||(R.late_penalty=5),R.unified_setting||(R.unified_late=!1,R.unified_anonymous_comment=!1,R.unified_anonymous_appeal=!1),k=JSON.parse(JSON.stringify(a.group_settings.map((function(e){return c()(c()({},e),{},{group_name:[e.group_name]})})).filter((function(e){return null!==e.publish_time})))),S=JSON.parse(JSON.stringify(a.allow_late_settings.map((function(e){return c()(c()({},e),{},{group_name:[e.group_name]})})).filter((function(e){return null!==e.late_time})))),E(c()({},R)),Z(i()(k)),H(i()(S)),console.log(R,a))}),[a]);var M=function(){var e=o()(l()().mark((function e(){var n,i,o;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((i=JSON.parse(JSON.stringify(R))).categoryId=r.categoryId,R.unified_setting||(k=null===(n=k)||void 0===n?void 0:n.map((function(e){var n;if(!e.publish_time||!e.end_time)throw x.ZP.error("发布、截止时间不能为空"),new String("发布、截止时间不能为空");if(!e.group_name)throw x.ZP.error("请选择分班名称"),new String("请选择分班名称");return e.group_name="string"==typeof(null==e?void 0:e.group_name)?[null==e?void 0:e.group_name]:null==e?void 0:e.group_name,e.group_id=null==e||null===(n=e.group_name)||void 0===n||null===(n=n.map((function(e){var n,t=null===(n=a.group_settings)||void 0===n||null===(n=n.filter((function(n){return(null==n?void 0:n.group_name)===e})))||void 0===n?void 0:n[0];return null==t?void 0:t.group_id})))||void 0===n?void 0:n.toString().split(","),e}))),i.group_settings=k,!R.allow_late){e.next=16;break}if(!R.unified_late){e.next=14;break}if(!(null===R.late_penalty||void 0===R.late_penalty||R.late_penalty<0||R.late_penalty>100)){e.next=9;break}throw x.ZP.error("迟交扣分填写区间为0~100"),new String("迟交扣分填写区间为0~100");case 9:if(R.late_time){e.next=12;break}throw x.ZP.error("补交截止时间不能为空"),new String("补交截止时间不能为空");case 12:e.next=16;break;case 14:S=null===(o=S)||void 0===o?void 0:o.map((function(e){var n;if(e.penalty_type=Oe.Q.Number,null===e.late_penalty||void 0===e.late_penalty||e.late_penalty<0||e.late_penalty>100)throw x.ZP.error("迟交扣分填写区间为0~100"),new String("迟交扣分填写区间为0~100");if(!e.late_time)throw x.ZP.error("补交截止时间不能为空"),new String("补交截止时间不能为空");if(!e.group_name)throw x.ZP.error("请选择分班名称"),new String("请选择分班名称");return e.group_name="string"==typeof(null==e?void 0:e.group_name)?[null==e?void 0:e.group_name]:null==e?void 0:e.group_name,e.group_id=null==e||null===(n=e.group_name)||void 0===n||null===(n=n.map((function(e){var n,t=null===(n=a.group_settings)||void 0===n||null===(n=n.filter((function(n){return(null==n?void 0:n.group_name)===e})))||void 0===n?void 0:n[0];return null==t?void 0:t.group_id})))||void 0===n?void 0:n.toString().split(","),e})),i.allow_late_settings=S;case 16:Object.keys(i).map((function(e){e.indexOf("proportion")>-1&&(i[e]=i[e]/100)})),s({type:"shixunHomeworks/updateSetting",payload:c()(c()({},i),{},{penalty_type:Oe.Q.Number})}).then((function(e){0===e.status&&(x.ZP.success("更新成功"),v(!0),t())}));case 18:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,G.jsxs)("div",{className:"bg-white pl30 pr30 pb30",children:[(0,G.jsxs)(w.Z,{align:"middle",children:[(0,G.jsx)(b.Z,{flex:"1",children:(0,G.jsx)("h1",{className:"mt15",children:"评分设置"})}),(0,G.jsxs)(b.Z,{children:[(0,P.GJ)()&&h&&(0,G.jsx)(f.ZP,{type:"primary",size:"middle",ghost:!0,onClick:function(){return v(!1)},children:"编辑设置"}),!h&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(f.ZP,{type:"primary",size:"middle",className:"mr20",onClick:function(){return T(!0)},children:"设置默认评分"}),(0,G.jsx)(f.ZP,{type:"primary",size:"middle",onClick:function(){return M()},children:"提交"}),(0,G.jsx)(f.ZP,{onClick:function(){v(!0),t()},type:"primary",size:"middle",ghost:!0,className:"ml20",children:"取消"})]})]})]}),(0,G.jsxs)(w.Z,{align:"middle",className:"mt25",style:{paddingLeft:40},children:[(0,G.jsx)(b.Z,{children:(0,G.jsx)("strong",{children:"组长评分"})}),(0,G.jsxs)(w.Z,{className:"ml10",children:[(0,G.jsx)(b.Z,{children:(0,G.jsx)(De.Z,{disabled:h,checked:R.is_group_grade,onChange:function(e){R.is_group_grade=e,E(c()({},R))}})}),(0,G.jsx)(b.Z,{className:"c-grey-c ml10",children:"(选中,则组长首次提交作业时需要对组员进行评分)"})]})]}),(0,G.jsxs)(w.Z,{className:"mt25",style:{paddingLeft:40},children:[(0,G.jsx)(b.Z,{children:(0,G.jsx)("strong",{children:"助教评分"})}),(0,G.jsx)(b.Z,{span:24,className:"pl30 mt10"})]}),(0,G.jsx)(w.Z,{style:{paddingLeft:65},children:(0,G.jsxs)(A.ZP.Group,{disabled:h,value:R.ta_mode,onChange:function(e){R.ta_mode=e.target.value,E(c()({},R))},children:[(0,G.jsxs)(A.ZP,{value:1,style:{marginTop:15},children:[(0,G.jsx)("strong",{children:"普通模式"}),(0,G.jsx)("span",{className:"c-grey-c",children:"(选中,则取各助教最终评分的平均分)"})]}),(0,G.jsx)("br",{}),(0,G.jsxs)(A.ZP,{value:0,style:{marginTop:15},children:[(0,G.jsx)("strong",{children:"复审模式"}),(0,G.jsx)("span",{className:"c-grey-c",children:"(选中,则只取最新的助教评分)"})]})]})}),(0,G.jsxs)(w.Z,{className:"mt25",style:{paddingLeft:40},children:[(0,G.jsx)(b.Z,{children:(0,G.jsx)("strong",{children:"最终成绩组成:"})}),(0,G.jsx)(b.Z,{span:24,className:"pl30 mt10"})]}),(0,G.jsx)(w.Z,{style:{paddingLeft:65},children:(0,G.jsxs)(A.ZP.Group,{disabled:h,value:R.final_mode,onChange:function(e){R.final_mode=e.target.value,E(c()({},R))},children:[(0,G.jsxs)(A.ZP,{value:!1,style:{marginTop:15},children:[(0,G.jsx)("strong",{children:"多项评分配比"}),(0,G.jsxs)("span",{className:"c-grey-c",children:["(选中,则按照比例计算最终成绩)",(0,G.jsx)(Fe.Z,{overlayClassName:"edu-popover",placement:"bottomLeft",content:(0,G.jsxs)("span",{className:"font14",children:["计算说明:",(0,G.jsx)("br",{}),"教师评分 * 其百分比 + 助教评分 * 其百分比 + 组长评分 * 其百分比 + 学生匿评平均分 * 其百分比 - ( ",(0,G.jsx)("br",{}),"迟交扣分 + 缺评扣分 * 缺评数 + 违规匿评扣分 * 违规匿评数 )",(0,G.jsx)("br",{}),(0,G.jsx)("br",{}),"注意",(0,G.jsx)("br",{}),"非零百分比的评分选项,若评分记录为空,则其百分比将自动平摊到其它非零",(0,G.jsx)("br",{}),"评分选项上。",(0,G.jsx)("br",{}),"例教师评分40% + 助教评分35% + 学生匿评25%学生A没有教师评分记",(0,G.jsx)("br",{}),"录则其最终成绩按照助教评分55% + 学生匿评45%进行计算"]}),trigger:"click",children:(0,G.jsx)("span",{className:"mt10 ml10 current font14",children:(0,G.jsx)(Re.Z,{})})})]})]}),(0,G.jsxs)(w.Z,{align:"middle",className:"mt25 pl30 font14",children:[(0,G.jsx)(b.Z,{children:"教师评分:"}),(0,G.jsxs)(b.Z,{className:"ml5",children:[(0,G.jsx)(D.Z,{disabled:h,min:0,max:100,value:R.te_proportion,onChange:function(e){R.te_proportion=e,E(Object.assign({},R))}}),(0,G.jsx)("span",{className:"ml10",children:"%"})]})]}),(0,G.jsxs)(w.Z,{align:"middle",className:"mt25 pl30 font14",children:[(0,G.jsx)(b.Z,{children:"助教评分:"}),(0,G.jsxs)(b.Z,{className:"ml5",children:[(0,G.jsx)(D.Z,{disabled:h,min:0,max:100,value:R.ta_proportion,onChange:function(e){R.ta_proportion=e,E(Object.assign({},R))}}),(0,G.jsx)("span",{className:"ml10",children:"%"})]})]}),R.is_group_grade&&(0,G.jsxs)(w.Z,{align:"middle",className:"mt25 pl30 font14",children:[(0,G.jsx)(b.Z,{children:"组长评分:"}),(0,G.jsxs)(b.Z,{className:"ml5",children:[(0,G.jsx)(D.Z,{disabled:h,min:0,max:100,value:R.gr_proportion,onChange:function(e){R.gr_proportion=e,E(Object.assign({},R))}}),(0,G.jsx)("span",{className:"ml10",children:"%"})]})]}),(0,G.jsxs)(w.Z,{align:"middle",className:"mt25 pl30 font14",children:[(0,G.jsx)(b.Z,{children:"学生匿评:"}),(0,G.jsxs)(b.Z,{className:"ml5",children:[(0,G.jsx)(D.Z,{disabled:h,min:0,max:100,value:R.st_proportion,onChange:function(e){R.st_proportion=e,E(Object.assign({},R))}}),(0,G.jsx)("span",{className:"ml10",children:"%"})]})]}),(0,G.jsx)("br",{}),(0,G.jsxs)(A.ZP,{value:!0,style:{marginTop:15},children:[(0,G.jsx)("strong",{children:"单项评分优先"}),(0,G.jsxs)("span",{className:"c-grey-c",children:["(选中,则按照优先顺序计算最终成绩)",(0,G.jsx)(Fe.Z,{overlayClassName:"edu-popover",placement:"bottomLeft",content:(0,G.jsxs)("span",{className:"font14",children:["计算说明:",(0,G.jsx)("br",{}),"优先顺序排前的非零评分 * 100% - ",(0,G.jsx)("br",{}),"( 迟交扣分 + 缺评扣分 * 缺评数 + 违规匿评扣分 * 违规匿评数 )",(0,G.jsx)("br",{}),"例有教师评分则教师评分100%否则教辅评分100%,依次类推"]}),trigger:"click",children:(0,G.jsx)("span",{className:"mt10 ml10 current font14",children:(0,G.jsx)(Re.Z,{})})})]})]}),(0,G.jsx)(w.Z,{children:(0,G.jsx)(b.Z,{span:24,className:"ml20",children:(0,G.jsx)("div",{style:{color:"#ccc"},children:"(教师评分 → 助教评分 → 组长评分 → 学生匿评评分)"})})})]})}),(0,G.jsx)(j.Z,{open:L,title:"是否设置为您的默认评分?",centered:!0,width:470,onCancel:function(){T(!1)},onOk:o()(l()().mark((function e(){var n;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=JSON.parse(JSON.stringify(R)),Object.keys(n).map((function(e){e.indexOf("proportion")>-1&&(n[e]=n[e]/100)})),e.next=4,(0,W.ZP)("/api/courses/".concat(r.coursesId,"/homework_commons/set_default_score_setting.json"),{method:"post",body:{homework_type:3,score_settings:n}});case 4:0===e.sent.status&&(x.ZP.success("设置成功"),T(!1));case 6:case"end":return e.stop()}}),e)}))),children:(0,G.jsx)("div",{children:"您是否要将当前评分规则设置为您的默认规则,该默认规则仅应用于您后续新建的作业,且不会影响其他老师新建作业的评分规则。"})})]})})),Me=(0,_.connect)((function(e){return{shixunHomeworks:e.shixunHomeworks}}))((function(e){var n=e.getData,t=e.dispatch,s=e.shixunHomeworks.workSetting,a=(0,_.useParams)(),r=(0,p.useState)(!0),u=m()(r,2),d=u[0],h=u[1],v=(0,p.useState)([]),g=m()(v,2),y=g[0],j=g[1],k=(0,p.useState)([]),Z=m()(k,2),N=Z[0],I=Z[1],S=(0,p.useState)({unified_setting:!1,publish_time:"",end_time:"",ta_mode:1,final_mode:!1,st_proportion:"20%",ta_proportion:"30%",te_proportion:"50%",student_comment:!1,anonymous_appeal:!1,appeal_penalty:0,appeal_time:"",anonymous_comment:!1,evaluation_num:0,evaluation_start:"",evaluation_end:"",absence_penalty:0,work_public:!1,allow_late:!1,unified_late:!0,late_time:"",late_penalty:0,penalty_type:Oe.Q.Number,challenge_settings:[],work_efficiency:!1,shixun_evaluation:"",answer_open_evaluation:!1,answer_public:!1,score_open:!1,total_score:"",eff_score:"",unified_anonymous_comment:!0,unified_anonymous_appeal:!0,personal_score_open:!0}),H=m()(S,2),O=H[0],C=H[1];(0,p.useEffect)((function(){null!=s&&s.course_id&&(Object.keys(O).map((function(e){e.indexOf("proportion")>-1?(O[e]=100*s[e],console.log(e,O[e],s[e])):O[e]=s[e]})),O.allow_late&&O.unified_late||(O.late_penalty=5),O.unified_setting||(O.unified_late=!1,O.unified_anonymous_comment=!1,O.unified_anonymous_appeal=!1),y=JSON.parse(JSON.stringify(s.group_settings.map((function(e){return c()(c()({},e),{},{group_name:[e.group_name]})})).filter((function(e){return null!==e.publish_time})))),N=JSON.parse(JSON.stringify(s.allow_late_settings.map((function(e){return c()(c()({},e),{},{group_name:[e.group_name]})})).filter((function(e){return null!==e.late_time})))),C(c()({},O)),j(i()(y)),I(i()(N)))}),[s]);var T=function(){var e=o()(l()().mark((function e(){var i,r,o;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((r=JSON.parse(JSON.stringify(O))).categoryId=a.categoryId,O.unified_setting||(y=null===(i=y)||void 0===i?void 0:i.map((function(e){var n;if(!e.publish_time||!e.end_time)throw x.ZP.error("发布、截止时间不能为空"),new String("发布、截止时间不能为空");if(!e.group_name)throw x.ZP.error("请选择分班名称"),new String("请选择分班名称");return e.group_name="string"==typeof(null==e?void 0:e.group_name)?[null==e?void 0:e.group_name]:null==e?void 0:e.group_name,e.group_id=null==e||null===(n=e.group_name)||void 0===n||null===(n=n.map((function(e){var n,t=null===(n=s.group_settings)||void 0===n||null===(n=n.filter((function(n){return(null==n?void 0:n.group_name)===e})))||void 0===n?void 0:n[0];return null==t?void 0:t.group_id})))||void 0===n?void 0:n.toString().split(","),e}))),r.group_settings=y,!O.allow_late){e.next=16;break}if(!O.unified_late){e.next=14;break}if(!(null===O.late_penalty||void 0===O.late_penalty||O.late_penalty<0||O.late_penalty>100)){e.next=9;break}throw x.ZP.error("迟交扣分填写区间为0~100"),new String("迟交扣分填写区间为0~100");case 9:if(O.late_time){e.next=12;break}throw x.ZP.error("补交截止时间不能为空"),new String("补交截止时间不能为空");case 12:e.next=16;break;case 14:N=null===(o=N)||void 0===o?void 0:o.map((function(e){var n;if(e.penalty_type=Oe.Q.Number,null===e.late_penalty||void 0===e.late_penalty||e.late_penalty<0||e.late_penalty>100)throw x.ZP.error("迟交扣分填写区间为0~100"),new String("迟交扣分填写区间为0~100");if(!e.late_time)throw x.ZP.error("补交截止时间不能为空"),new String("补交截止时间不能为空");if(!e.group_name)throw x.ZP.error("请选择分班名称"),new String("请选择分班名称");return e.group_name="string"==typeof(null==e?void 0:e.group_name)?[null==e?void 0:e.group_name]:null==e?void 0:e.group_name,e.group_id=null==e||null===(n=e.group_name)||void 0===n||null===(n=n.map((function(e){var n,t=null===(n=s.group_settings)||void 0===n||null===(n=n.filter((function(n){return(null==n?void 0:n.group_name)===e})))||void 0===n?void 0:n[0];return null==t?void 0:t.group_id})))||void 0===n?void 0:n.toString().split(","),e})),r.allow_late_settings=N;case 16:Object.keys(r).map((function(e){e.indexOf("proportion")>-1&&(r[e]=r[e]/100)})),t({type:"shixunHomeworks/updateSetting",payload:c()(c()({},r),{},{penalty_type:Oe.Q.Number})}).then((function(e){0===e.status&&(x.ZP.success("更新成功"),h(!0),n())}));case 18:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,G.jsx)("div",{className:"bg-white pl30 pr30 pb30",children:(0,G.jsxs)(w.Z,{children:[(0,G.jsx)(b.Z,{span:24,children:(0,G.jsxs)(w.Z,{align:"middle",children:[(0,G.jsx)(b.Z,{flex:"1",children:(0,G.jsx)("h1",{className:"mt15",children:"公开设置"})}),(0,G.jsxs)(b.Z,{children:[(0,P.GJ)()&&d&&(0,G.jsx)(f.ZP,{type:"primary",size:"middle",ghost:!0,onClick:function(){return h(!1)},children:"编辑设置"}),!d&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(f.ZP,{type:"primary",size:"middle",onClick:function(){return T()},children:"提交"}),(0,G.jsx)(f.ZP,{onClick:function(){h(!0),n()},type:"primary",size:"middle",ghost:!0,className:"ml20",children:"取消"})]})]})]})}),(0,G.jsxs)(b.Z,{span:24,className:"mt15 pl30",children:[(0,G.jsx)(L.Z,{checked:O.work_public,disabled:d,onChange:function(e){O.work_public=e.target.checked,C(Object.assign({},O))},children:(0,G.jsx)("strong",{children:"公开作品"})}),(0,G.jsx)("span",{className:"c-grey-c font12",children:"(选中,则在作业截止/补交截止/匿评截止时间之后,已提交作品的学生可以查看其它学生的作品,否则只能查看自己的作品)"})]}),(0,G.jsxs)(b.Z,{span:24,className:"mt15 pl30",children:[(0,G.jsx)(L.Z,{checked:O.score_open,disabled:d,onChange:function(e){e.target.checked&&(O.personal_score_open=!0),O.score_open=e.target.checked,C(Object.assign({},O))},children:(0,G.jsx)("strong",{children:"公开成绩"})}),(0,G.jsx)("span",{className:"c-grey-c font12",children:"(选中,则在作业截止/补交截止/匿评截止时间之后,已提交作品的学生可以查看其它学生的成绩,否则只能查看自己的成绩)"})]}),(0,G.jsxs)(b.Z,{span:24,className:"mt15 pl30",children:[(0,G.jsx)(L.Z,{checked:O.personal_score_open,disabled:d||O.score_open,onChange:function(e){O.personal_score_open=e.target.checked,C(Object.assign({},O))},children:(0,G.jsx)("strong",{children:"公开个人成绩"})}),(0,G.jsx)("span",{className:"c-grey-c font12",children:"(选中,则在作业截止/补交结束时间之后,已提交作品的学生可以查看个人成绩,否则不可查看个人成绩)"})]}),(0,G.jsxs)(b.Z,{span:24,className:"mt15 pl30 pb40",children:[(0,G.jsx)(L.Z,{checked:O.answer_public,disabled:d,onChange:function(e){O.answer_public=e.target.checked,C(Object.assign({},O))},children:(0,G.jsx)("strong",{children:"公开答案"})}),(0,G.jsx)("span",{className:"c-grey-c font12",children:"(选中,则在作业截止/补交结束时间之后,已提交作品的学生可以查看作业参考答案,否则不能查看作业参考答案)"})]})]})})})),Ve=t(91232),We=t.n(Ve),ze=t(28103),Ge=t(32200),Je=t(37418),qe=t(36376),Be=t(72590),Qe=t(75288),Ue=function(e,n){if("comment"===n){var t=null==e?void 0:e.filter((function(e){return null!==e.evaluation_end}));return 0===t.length?[{deleteflag:!0}]:(0,Qe.M)(t,["evaluation_start","evaluation_end"]).map((function(e){return c()(c()({},e),{},{evaluation_start:[e.evaluation_start,e.evaluation_end],group_name:[e.group_name],deleteflag:!1})}))}if("appeal"===n){var s=null==e?void 0:e.filter((function(e){return null!==e.appeal_time}));return 0===s.length?[{deleteflag:!0}]:(0,Qe.M)(s,["appeal_time"]).map((function(e){return c()(c()({},e),{},{group_name:[e.group_name],deleteflag:!1})}))}},Ke=function(e,n){return e.map((function(e){return n.find((function(n){return n.value===e})).id}))},Xe=(0,_.connect)((function(e){return{shixunHomeworks:e.shixunHomeworks,classroomList:e.classroomList}}))((function(e){var n,t,s,a,r,u,d,h,v,y=e.shixunHomeworks,j=e.classroomList,k=e.dispatch,Z=y.workSetting,N=y.workList,I=(0,_.useParams)(),S=(0,p.useState)(!0),H=m()(S,2),C=H[0],T=H[1],Y=(0,p.useState)([]),D=m()(Y,2),F=D[0],R=D[1],E=(0,p.useState)([]),M=m()(E,2),V=M[0],z=M[1],J=(0,p.useState)({unified_setting:!1,publish_time:"",end_time:"",ta_mode:1,final_mode:!1,st_proportion:"20%",ta_proportion:"30%",te_proportion:"50%",student_comment:!1,anonymous_appeal:!1,appeal_penalty:0,appeal_time:"",anonymous_comment:!1,evaluation_num:0,evaluation_start:"",evaluation_end:"",absence_penalty:0,work_public:!1,allow_late:!1,unified_late:!0,late_time:"",late_penalty:0,penalty_type:Oe.Q.Number,challenge_settings:[],work_efficiency:!1,shixun_evaluation:"",answer_open_evaluation:!1,answer_public:!1,score_open:!1,total_score:"",eff_score:"",unified_anonymous_comment:!0,unified_anonymous_appeal:!0,anonymous_group:!1}),q=m()(J,2),B=q[0],Q=q[1],U=null==Z||null===(n=Z.anonymous_comment_settings)||void 0===n?void 0:n.map((function(e){return{label:e.group_name,value:e.group_name,id:e.group_id}})),K=null==Z||null===(t=Z.anonymous_appeal_settings)||void 0===t?void 0:t.map((function(e){return{label:e.group_name,value:e.group_name,id:e.group_id}})),X=O.Z.useForm(),ee=m()(X,1)[0],te=O.Z.useForm(),se=m()(te,1)[0],ie=function(){var e=o()(l()().mark((function e(){var n,t,s,i,a;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=(0,Qe.Y)(ee.getFieldsValue(),"YYYY-MM-DD HH:mm"),t=(0,$.cloneDeep)(n),s=We()(t.anonymous_comment_settings||[]),e.prev=3,s.s();case 5:if((i=s.n()).done){e.next=19;break}if(null!=(a=i.value)&&a.evaluation_start){e.next=10;break}return x.ZP.warning("匿评开始时间不能为空"),e.abrupt("return",Promise.reject());case 10:if(a.group_name){e.next=13;break}return x.ZP.warning("请选择分班名称"),e.abrupt("return",Promise.reject());case 13:a.evaluation_end=null==a?void 0:a.evaluation_start[1],a.evaluation_start=null==a?void 0:a.evaluation_start[0],a.group_id=Ke(a.group_name,U),Reflect.deleteProperty(a,"deleteflag");case 17:e.next=5;break;case 19:e.next=24;break;case 21:e.prev=21,e.t0=e.catch(3),s.e(e.t0);case 24:return e.prev=24,s.f(),e.finish(24);case 27:return e.abrupt("return",t);case 28:case"end":return e.stop()}}),e,null,[[3,21,24,27]])})));return function(){return e.apply(this,arguments)}}(),ae=function(){var e,n=(0,Qe.Y)(se.getFieldsValue(),"YYYY-MM-DD HH:mm"),t=(0,$.cloneDeep)(n),s=We()(t.anonymous_appeal_settings||[]);try{for(s.s();!(e=s.n()).done;){var i=e.value;i.group_id=Ke(i.group_name,K),Reflect.deleteProperty(i,"deleteflag")}}catch(e){s.e(e)}finally{s.f()}return t},le=function(){var e=o()(l()().mark((function e(){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,k({type:"shixunHomeworks/getWorkSetting",payload:c()({},I)});case 2:ee.resetFields(),se.resetFields();case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();(0,p.useEffect)((function(){null!=Z&&Z.course_id&&(Object.keys(B).map((function(e){e.indexOf("proportion")>-1?B[e]=100*Z[e]:B[e]=Z[e]})),B.allow_late&&B.unified_late||(B.late_penalty=5),B.unified_setting||(B.unified_late=!1,B.unified_anonymous_comment=!1,B.unified_anonymous_appeal=!1),F=JSON.parse(JSON.stringify(Z.group_settings.map((function(e){return c()(c()({},e),{},{group_name:[e.group_name]})})).filter((function(e){return null!==e.publish_time})))),V=JSON.parse(JSON.stringify(Z.allow_late_settings.map((function(e){return c()(c()({},e),{},{group_name:[e.group_name]})})).filter((function(e){return null!==e.late_time})))),Q(c()({},B)),R(i()(F)),z(i()(V)))}),[Z]);var re=((null==Z||null===(s=Z.homework_status)||void 0===s?void 0:s.includes("已截止"))||(null==U?void 0:U.length)>0)&&(null==Z?void 0:Z.student_works),oe=(null==Z||null===(a=Z.anonymous_appeal_settings)||void 0===a?void 0:a.length)>0,ue=(null==Z?void 0:Z.anonymous_comment)&&(null==Z?void 0:Z.unified_anonymous_comment)&&(null==N||null===(r=N.homework_status)||void 0===r?void 0:r.includes("已截止"))||oe,ce=(0,p.useState)(!1),de=m()(ce,2),me=de[0],pe=de[1],_e=function(){var e=o()(l()().mark((function e(){var n,t,s,i,a;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(pe(!me),(t=JSON.parse(JSON.stringify(B))).categoryId=I.categoryId,B.unified_setting||(F=null===(n=F)||void 0===n?void 0:n.map((function(e){var n;if(!e.publish_time||!e.end_time)throw x.ZP.error("发布、截止时间不能为空"),pe(!1),new String("发布、截止时间不能为空");if(!e.group_name)throw x.ZP.error("请选择分班名称"),pe(!1),new String("请选择分班名称");return e.group_name="string"==typeof(null==e?void 0:e.group_name)?[null==e?void 0:e.group_name]:null==e?void 0:e.group_name,e.group_id=null==e||null===(n=e.group_name)||void 0===n||null===(n=n.map((function(e){var n,t=null===(n=Z.group_settings)||void 0===n||null===(n=n.filter((function(n){return(null==n?void 0:n.group_name)===e})))||void 0===n?void 0:n[0];return null==t?void 0:t.group_id})))||void 0===n?void 0:n.toString().split(","),e}))),t.group_settings=F,!B.allow_late){e.next=19;break}if(!B.unified_late){e.next=17;break}if(!(null===B.late_penalty||void 0===B.late_penalty||B.late_penalty<0||B.late_penalty>100)){e.next=11;break}throw x.ZP.error("迟交扣分填写区间为0~100"),pe(!1),new String("迟交扣分填写区间为0~100");case 11:if(B.late_time){e.next=15;break}throw x.ZP.error("补交截止时间不能为空"),pe(!1),new String("补交截止时间不能为空");case 15:e.next=19;break;case 17:V=null===(s=V)||void 0===s?void 0:s.map((function(e){var n;if(e.penalty_type=Oe.Q.Number,null===e.late_penalty||void 0===e.late_penalty||e.late_penalty<0||e.late_penalty>100)throw x.ZP.error("迟交扣分填写区间为0~100"),pe(!1),new String("迟交扣分填写区间为0~100");if(!e.late_time)throw x.ZP.error("补交截止时间不能为空"),pe(!1),new String("补交截止时间不能为空");if(!e.group_name)throw x.ZP.error("请选择分班名称"),pe(!1),new String("请选择分班名称");return e.group_name="string"==typeof(null==e?void 0:e.group_name)?[null==e?void 0:e.group_name]:null==e?void 0:e.group_name,e.group_id=null==e||null===(n=e.group_name)||void 0===n||null===(n=n.map((function(e){var n,t=null===(n=Z.group_settings)||void 0===n||null===(n=n.filter((function(n){return(null==n?void 0:n.group_name)===e})))||void 0===n?void 0:n[0];return null==t?void 0:t.group_id})))||void 0===n?void 0:n.toString().split(","),e})),t.allow_late_settings=V;case 19:if(!B.evaluation_start){e.next=28;break}if(!(B.end_time&&ne()(B.evaluation_start)<=ne()(B.end_time))){e.next=24;break}throw x.ZP.error("匿评开启时间要晚于作业截止时间、补交截止时间"),pe(!1),new String("匿评开启时间要晚于作业截止时间、补交截止时间");case 24:if(!(B.late_time&&ne()(B.evaluation_start)<=ne()(B.late_time))){e.next=28;break}throw x.ZP.error("匿评开启时间要晚于作业截止时间、补交截止时间"),pe(!1),new String("匿评开启时间要晚于作业截止时间、补交截止时间");case 28:if(Object.keys(t).map((function(e){e.indexOf("proportion")>-1&&(t[e]=t[e]/100)})),!t.anonymous_comment||t.unified_anonymous_comment){e.next=35;break}return e.next=32,ie();case 32:i=e.sent,t.anonymous_comment_settings=i.anonymous_comment_settings,["evaluation_end","evaluation_num","evaluation_start","student_comment","absence_penalty"].forEach((function(e){Reflect.deleteProperty(t,e)}));case 35:return t.anonymous_appeal&&!t.unified_anonymous_appeal&&(a=ae(),t.anonymous_appeal_settings=a.anonymous_appeal_settings,["appeal_time","appeal_penalty"].forEach((function(e){Reflect.deleteProperty(t,e)}))),e.next=38,(0,W.ZP)("/api/homework_commons/".concat(I.categoryId,"/evaluation_setting.json"),{method:"post",body:c()({},t)});case 38:0===e.sent.status?(pe(!1),x.ZP.success("更新成功"),T(!0),le()):pe(!1);case 40:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,G.jsxs)("div",{className:"bg-white pl30 pr30 pb30",children:[(0,G.jsxs)(w.Z,{children:[(0,G.jsx)(b.Z,{span:24,children:(0,G.jsxs)(w.Z,{align:"middle",children:[(0,G.jsx)(b.Z,{flex:"1",children:(0,G.jsxs)(w.Z,{align:"middle",className:"mt15",children:[(0,G.jsx)("h1",{style:{marginBottom:0},children:"匿评设置"}),(0,G.jsx)(g.Z,{placement:"right",overlayStyle:{maxWidth:600},title:(0,G.jsxs)("div",{children:[(0,G.jsx)("div",{children:"规则"}),(0,G.jsx)("div",{children:"1.作业截止、补交结束后才可开启匿评,开启申诉后不可变更匿评结束时间;"}),(0,G.jsx)("div",{children:"2.所有分组互评提交作品的分组数量≥2可开启分组互相匿评"}),(0,G.jsx)("div",{children:"3.班内小组互评同班级提交作品的分组数量≥2可开启班内分组互相匿评。"}),(0,G.jsx)("div",{children:"注:为确保公平,匿评规则确定后不可再修改,请谨慎操作!"})]}),children:(0,G.jsx)(Re.Z,{style:{marginLeft:4,cursor:"pointer"}})})]})}),(0,G.jsxs)(b.Z,{children:[((0,P.t_)()||(null==Z?void 0:Z.can_edit))&&C&&(0,G.jsx)(f.ZP,{type:"primary",size:"middle",ghost:!0,onClick:function(){return T(!1)},children:"编辑设置"}),!C&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(f.ZP,{loading:me,type:"primary",size:"middle",onClick:function(){return _e()},children:"提交"}),(0,G.jsx)(f.ZP,{onClick:function(){T(!0),le()},type:"primary",size:"middle",ghost:!0,className:"ml20",children:"取消"})]})]})]})}),(0,G.jsx)(b.Z,{span:24,className:"mt15 pl30",children:(0,G.jsx)(L.Z,{checked:B.anonymous_comment,disabled:C||!re||(null==Z?void 0:Z.anonymous_comment),onChange:function(){var e;!(0,P.Rm)()||null!==(e=j.AssistantObject.group)&&void 0!==e&&e.can_anonymous_comment?(B.anonymous_comment=!B.anonymous_comment,B.allow_late&&!B.evaluation_start?B.late_time&&""!=B.late_time&&(B.evaluation_start=ne()(B.late_time).add(14,"day").format("YYYY-MM-DD HH:mm:ss"),B.evaluation_end=ne()(B.late_time).add(28,"day").format("YYYY-MM-DD HH:mm:ss")):B.unified_setting&&!B.evaluation_start&&B.end_time&&""!=B.end_time&&(B.evaluation_start=ne()(B.end_time).add(14,"day").format("YYYY-MM-DD HH:mm:ss"),B.evaluation_end=ne()(B.end_time).add(28,"day").format("YYYY-MM-DD HH:mm:ss")),B.anonymous_comment&&(B.evaluation_num=parseInt(B.evaluation_num)?B.evaluation_num:3,B.absence_penalty=parseInt(B.absence_penalty)?B.absence_penalty:3),Q(Object.assign({},B))):x.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能")},children:(0,G.jsx)("strong",{children:"启用匿评"})})})]}),B.anonymous_comment&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(w.Z,{align:"middle",className:"mt25 mb25 pl30",children:[(0,G.jsx)(b.Z,{children:"匿评方式:"}),(0,G.jsx)(b.Z,{className:"ml5",children:(0,G.jsxs)(A.ZP.Group,{value:B.unified_anonymous_comment,disabled:C||B.anonymous_appeal||(null==Z?void 0:Z.anonymous_comment),onChange:function(e){var n;!(0,P.Rm)()||null!==(n=j.AssistantObject.group)&&void 0!==n&&n.can_anonymous_comment?(Q((function(n){return c()(c()({},n),{},{unified_anonymous_comment:e.target.value})})),ee.resetFields()):x.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能")},children:[(null==Z?void 0:Z.unified_setting)&&(null==Z?void 0:Z.unified_late)&&(0,G.jsx)(A.ZP,{value:!0,disabled:C||B.anonymous_appeal||(null==Z?void 0:Z.anonymous_comment)||!(null!=Z&&Z.manage_all_group),children:"统一匿评"}),(null==Z||null===(u=Z.group_settings)||void 0===u?void 0:u.length)>0&&(0,G.jsx)(A.ZP,{value:!1,children:"分班匿评"})]})})]}),B.unified_anonymous_comment&&(0,G.jsxs)(w.Z,{align:"middle",className:"mt25 mb25 pl30",children:[(0,G.jsx)(b.Z,{children:"互评方式:"}),(0,G.jsx)(b.Z,{className:"ml5",children:(0,G.jsxs)(A.ZP.Group,{value:B.anonymous_group,disabled:C||B.anonymous_appeal||(null==Z?void 0:Z.anonymous_comment),onChange:function(e){var n;!(0,P.Rm)()||null!==(n=j.AssistantObject.group)&&void 0!==n&&n.can_anonymous_comment?Q((function(n){return c()(c()({},n),{},{anonymous_group:e.target.value})})):x.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能")},children:[(0,G.jsx)(A.ZP,{value:!1,children:"所有分组互评"}),(null==Z||null===(d=Z.group_settings)||void 0===d?void 0:d.length)>0&&(0,G.jsx)(A.ZP,{value:!0,disabled:C||!(null!=Z&&Z.can_anonymous_group),children:"班内小组互评"})]})})]}),B.unified_anonymous_comment?(0,G.jsx)(Ge.Z,{data:B,setData:Q,disabled:C}):(0,G.jsx)(O.Z,{form:ee,autoComplete:"off",initialValues:null!=Z&&Z.unified_anonymous_comment?{anonymous_comment_settings:[{deleteflag:!0}]}:{anonymous_comment_settings:Ue(null==Z?void 0:Z.anonymous_comment_settings,"comment")},children:(0,G.jsx)(Je.Z,{disabled:C,selectOptions:U,form:ee,data:B})})]}),(0,G.jsx)(ze.Z,{}),(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(w.Z,{children:(0,G.jsxs)(b.Z,{span:24,className:"mt15 pl30",children:[(0,G.jsx)(L.Z,{checked:B.anonymous_appeal,disabled:C||!ue||(null==Z?void 0:Z.anonymous_appeal),onChange:function(){var e;!(0,P.Rm)()||null!==(e=j.AssistantObject.group)&&void 0!==e&&e.can_anonymous_appeal?(B.anonymous_appeal=!B.anonymous_appeal,B.anonymous_appeal&&(B.appeal_penalty=parseInt(B.appeal_penalty)?B.appeal_penalty:2),Q(Object.assign({},B))):x.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能")},children:(0,G.jsx)("strong",{children:"启用匿评申诉"})}),(0,G.jsx)(Fe.Z,{overlayClassName:"edu-popover",placement:"bottomLeft",content:(0,G.jsxs)("span",{className:"font12",children:["允许学生对自己作品的匿评评分进行申诉,由教师和助教处理申诉",(0,G.jsx)("br",{}),(0,G.jsx)("br",{}),"1、接受学生的合理申诉",(0,G.jsx)("br",{}),(0,G.jsx)("span",{className:"p",children:"被申诉的评分记录无效,不参与最终成绩的计算"}),(0,G.jsx)("span",{className:"p",children:"被申诉的评阅人的作品成绩,将被扣减违规匿评分"}),(0,G.jsx)("br",{}),"2、拒绝学生的不合理申诉",(0,G.jsx)("br",{}),(0,G.jsx)("span",{className:"p",children:"被申诉的评分记录有效,不允许学生对该评分记录进行二次申诉"}),(0,G.jsx)("span",{className:"p",children:"被申诉的评阅人的作品成绩,不会扣除违规匿评分"})]}),trigger:"click",children:(0,G.jsx)("span",{className:"mt10 ml10 current font14",children:(0,G.jsx)(Re.Z,{})})})]})}),B.anonymous_appeal&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(w.Z,{align:"middle",className:"mt25 mb25 pl30",children:[(0,G.jsx)(b.Z,{children:"申诉方式:"}),(0,G.jsx)(b.Z,{className:"ml5",children:(0,G.jsxs)(A.ZP.Group,{value:B.unified_anonymous_appeal,disabled:C||(null==Z?void 0:Z.anonymous_appeal),onChange:function(e){var n;!(0,P.Rm)()||null!==(n=j.AssistantObject.group)&&void 0!==n&&n.can_anonymous_appeal?(Q((function(n){return c()(c()({},n),{},{unified_anonymous_appeal:e.target.value})})),se.resetFields()):x.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能")},children:[(null==Z?void 0:Z.unified_anonymous_comment)&&(0,G.jsx)(A.ZP,{value:!0,disabled:!(null!=Z&&Z.manage_all_group),children:"统一申诉"}),(null==Z||null===(h=Z.group_settings)||void 0===h?void 0:h.length)>0&&(0,G.jsx)(A.ZP,{value:!1,children:"分班申诉"})]})})]}),B.unified_anonymous_appeal?(0,G.jsx)(qe.Z,{data:B,setData:Q,disabled:C}):(0,G.jsx)(O.Z,{form:se,initialValues:null!=Z&&Z.unified_anonymous_appeal?{anonymous_appeal_settings:[{deleteflag:!0}]}:{anonymous_appeal_settings:Ue(null==Z?void 0:Z.anonymous_appeal_settings,"appeal")},children:(0,G.jsx)(Be.Z,{disabled:C||(0,P.Rm)()&&!(null!==(v=j.AssistantObject.group)&&void 0!==v&&v.can_anonymous_appeal),selectOptions:K,form:se})})]})]})]})})),$e=t(64244),en=function(){var e=o()(l()().mark((function e(n){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,W.ZP)("/api/homework_commons/".concat(null==n?void 0:n.categoryId,"/publish_setting.json"),{method:"post",body:n});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),nn=function(){var e=o()(l()().mark((function e(n){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,W.ZP)("/api/homework_commons/".concat(null==n?void 0:n.categoryId,"/evaluation_setting.json"),{method:"post",body:n});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),tn=function(e,n){return null==e?void 0:e.map((function(e){var t;return null==n||null===(t=n.find((function(n){return n.value===e})))||void 0===t?void 0:t.id}))},sn=function(e,n){var t;return null===(t=e="string"==typeof e?[e]:e)||void 0===t||null===(t=t.map((function(e){return null==n?void 0:n.find((function(n){var t;return null==n||null===(t=n.group_name)||void 0===t?void 0:t.includes(e)}))})))||void 0===t?void 0:t.filter((function(e){return e}))},an=function(e,n,t){var s=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=null,a=s?n:sn(e,n);return null==a||a.forEach((function(e,n){(0==n||t(e,i||{}))&&(i=e)})),i},ln=(0,_.connect)((function(e){return{shixunHomeworks:e.shixunHomeworks,classroomList:e.classroomList,loading:e.loading.effects}}))((function(e){var n,t,s,a,r,u,d,h,f,v=e.shixunHomeworks,y=e.loading,k=e.dispatch,Z=e.classroomList,N=(0,_.useParams)(),S=v.workSetting,H=v.workList,C=(0,te.U)(en,{categoryId:null==N?void 0:N.categoryId,penalty_type:Oe.Q.Number}),T=m()(C,3),Y=T[1],R=T[2],E=(0,te.U)(nn,{categoryId:null==N?void 0:N.categoryId}),M=m()(E,3),V=M[1],W=M[2],z=O.Z.useForm(),J=m()(z,1)[0],q=O.Z.useWatch("unified_setting",J),B=O.Z.useWatch("group_settings",J),Q=O.Z.useWatch("allow_late_settings",J),U=O.Z.useWatch("end_time",J),K=O.Z.useWatch("publish_time",J),X=O.Z.useWatch("allow_late",J),$=O.Z.useWatch("unified_late",J),ee=O.Z.useWatch("late_time",J),se=O.Z.useWatch("anonymous_comment",J),ie=O.Z.useWatch("unified_anonymous_comment",J),ae=O.Z.useWatch("evaluation_start",J),le=O.Z.useWatch("anonymous_appeal",J),re=O.Z.useWatch("anonymous_comment_settings",J),oe=O.Z.useWatch("unified_anonymous_appeal",J),ue=O.Z.useWatch("anonymous_appeal_settings",J),ce=(0,p.useState)(!1),de=m()(ce,2),pe=de[0],_e=de[1],he=(0,p.useState)({}),fe=m()(he,2),xe=fe[0],ve=fe[1],ge=pe||(0,P.Rm)()&&!(null!==(n=Z.AssistantObject)&&void 0!==n&&null!==(n=n.group)&&void 0!==n&&n.can_publish),ye=pe||(0,P.Rm)()&&!(null!==(t=Z.AssistantObject)&&void 0!==t&&null!==(t=t.group)&&void 0!==t&&t.can_late),je=pe||(0,P.Rm)()&&!(null!==(s=Z.AssistantObject)&&void 0!==s&&null!==(s=s.group)&&void 0!==s&&s.can_anonymous_comment),we=pe||(0,P.Rm)()&&!(null!==(a=Z.AssistantObject)&&void 0!==a&&null!==(a=a.group)&&void 0!==a&&a.can_anonymous_appeal),be=function(e,n){var t,s;if(null!==(t=e)&&void 0!==t&&t.some((function(e){return"string"!=typeof e.group_name}))){var i,a=[];null===(i=e)||void 0===i||i.forEach((function(e){var n;"string"!=typeof e.group_name&&(null===(n=e.group_name)||void 0===n||n.forEach((function(n){a.push(c()(c()({},e),{},{group_name:n}))})))})),e=a}return null===(s=e)||void 0===s?void 0:s.filter((function(e){var t;return!(null!=n&&null!==(t=n.map((function(e){return null==e?void 0:e.group_name})))&&void 0!==t&&null!==(t=t.toString())&&void 0!==t&&null!==(t=t.split(","))&&void 0!==t&&t.includes(String(e.group_name)))&&e.is_admin}))},ke=function(e){if("allow_late"!=e)if("anonymous_comment"!=e){if("anonymous_appeal"!=e)return"unified_late"==e?"已开启分班发布,无法更改为统一补交":"unified_anonymous_comment"==e?!1===q?"已开启分班发布,无法更改为统一匿评":"已开启分班补交,无法更改为统一匿评":"unified_anonymous_appeal"==e?!1===q?"已开启分班发布,无法更改为统一申诉":!1===$?"已开启分班补交,无法更改为统一申诉":"已开启分班匿评,无法更改为统一申诉":"make_up_score"==e?X?"扣分数据来源于补交扣分":"开启后,允许未按时提交的学生补交作品一次,并扣除相应的分数作为迟交的处罚,该学生才可以参与匿评。":"submit_num"==e?"若学生需要在规定次数外再次提交作品,教师可使用打回重做功能让该学生重新提交一次。":void 0;j.Z.warning({centered:!0,width:760,icon:null,title:"开启匿评申诉提示",content:(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)("span",{className:"blod",children:"允许学生对自己作品的匿评评分进行申诉,由教师和助教处理申诉"}),(0,G.jsx)("br",{}),"1、接受学生的合理申诉",(0,G.jsx)("br",{}),"被申诉的评分记录无效,不参与最终成绩的计算被申诉的评阅人的作品成绩,将被扣减违规匿评分",(0,G.jsx)("br",{}),"2、拒绝学生的不合理申诉",(0,G.jsx)("br",{}),"被申诉的评分记录有效,不允许学生对该评分记录进行二次申诉被申诉的评阅人的作品成绩,不会扣除违规匿评分",(0,G.jsx)("br",{})]})})}else j.Z.warning({centered:!0,width:550,icon:null,title:"开启匿评提示",content:(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)("span",{className:"blod",children:"规则说明:"}),"开启匿评,学生将在隐藏身份的情况下,对其他匿名作业进行评阅。",(0,G.jsx)("br",{}),(0,G.jsxs)("div",{className:"font12 mt10",style:{color:"#E99237"},children:[(0,G.jsx)("i",{className:"iconfont icon-tishi11 mr5 font12"}),"学生必须提交作品才能参与匿评,若学生未能按时提交作品,建议启用“允许学生补交”功能,允许学生补交作品一次,并扣除相应的分数作为迟交的处罚,该学生才可以参与匿评。"]})]})});else j.Z.warning({centered:!0,width:472,icon:null,title:"开启补交提示",content:(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)("div",{children:[(0,G.jsx)("span",{className:"blod",children:"规则说明:"}),"开启补交,仅在补交时间提交作业的学生将扣除分值;若学生在“按时提交”的时间内已成功提交作业,在补交时间再次提交则不会扣分。"]}),(0,G.jsxs)("div",{className:"font12 mt10",style:{color:"#E99237"},children:[(0,G.jsx)("i",{className:"iconfont icon-tishi11 mr5 font12"}),"注意:班级阶段进入“补交中”则不可变更作业截止时间、不可关闭补交。"]})]})})},Ze=function(e){var n,t,s,i,a,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("unified_setting"==e)return ge||!(null!=H&&null!==(n=H.homework_status)&&void 0!==n&&n.includes("未发布"))||!(null!=S&&S.manage_all_group);if("publish_time"==e)return ge||!(null!=H&&null!==(t=H.homework_status)&&void 0!==t&&t.includes("未发布")||null!=H&&null!==(s=H.homework_status)&&void 0!==s&&s.includes("未开始"));if("end_time"==e){var r=an([],(null==S?void 0:S.anonymous_comment_settings)||[],(function(e,n){return(null==e?void 0:e.evaluation_start)&&(null==n?void 0:n.evaluation_start)&&ne()(null==e?void 0:e.evaluation_start).startOf("second")<ne()(null==n?void 0:n.evaluation_start).startOf("second")}),!0);return ge||(null==S?void 0:S.allow_late)&&ne()().startOf("second")>=ne()(null==S?void 0:S.end_time).startOf("second")||(null==S?void 0:S.anonymous_comment)&&ne()().startOf("second")>=ne()(null==S?void 0:S.evaluation_start).startOf("second")||(null==S?void 0:S.anonymous_comment)&&(null==r?void 0:r.evaluation_start)&&ne()().startOf("second")>=ne()(null==r?void 0:r.evaluation_start).startOf("second")}if(["group_settings","group_name"].every((function(n){return null==e?void 0:e.includes(n)})))return ge||!(null!=l&&l.is_admin)||!(null!=H&&null!==(i=H.homework_status)&&void 0!==i&&i.includes("未发布"))&&(null==l?void 0:l.publish_time)&&ne()().startOf("second")>=ne()(null==l||null===(a=l.publish_time)||void 0===a?void 0:a[0]).startOf("second");if(["group_settings","publish_time"].every((function(n){return null==e?void 0:e.includes(n)}))){var o,u,c=an(null==l?void 0:l.group_name,(null==S?void 0:S.allow_late_settings)||[],(function(e,n){return(null==e?void 0:e.late_time)&&(null==n?void 0:n.late_time)&&ne()(null==e?void 0:e.late_time).startOf("second")<ne()(null==n?void 0:n.late_time).startOf("second")})),d=an(null==l?void 0:l.group_name,(null==S?void 0:S.anonymous_comment_settings)||[],(function(e,n){return(null==e?void 0:e.evaluation_start)&&(null==n?void 0:n.evaluation_start)&&ne()(null==e?void 0:e.evaluation_start).startOf("second")<ne()(null==n?void 0:n.evaluation_start).startOf("second")}));return ge||!(null!=l&&l.is_admin)||[!(null!=H&&null!==(o=H.homework_status)&&void 0!==o&&o.includes("未发布"))&&(null==l?void 0:l.publish_time)&&ne()().startOf("second")>=ne()(null==l||null===(u=l.publish_time)||void 0===u?void 0:u[0]).startOf("second"),(null==S?void 0:S.allow_late)&&(null==c?void 0:c.late_time)&&ne()().startOf("second")>=ne()(null==l?void 0:l.end_time).startOf("second")||(null==S?void 0:S.anonymous_comment)&&(null==d?void 0:d.evaluation_start)&&ne()().startOf("second")>=ne()(null==d?void 0:d.evaluation_start).startOf("second")]}if("allow_late"==e)return ye||(null==S?void 0:S.anonymous_comment)&&(null==S?void 0:S.evaluation_start)&&ne()().startOf("second")>=ne()(null==S?void 0:S.evaluation_start).startOf("second");if("unified_late"==e){an(null,(null==S?void 0:S.anonymous_comment_settings)||[],(function(e,n){return(null==e?void 0:e.evaluation_start)&&(null==n?void 0:n.evaluation_start)&&ne()(null==e?void 0:e.evaluation_start).startOf("second")<ne()(null==n?void 0:n.evaluation_start).startOf("second")}),!0);return ye||(null==S?void 0:S.allow_late)&&ne()().startOf("second")>=ne()(null==S?void 0:S.end_time).startOf("second")||!1===q}if("late_penalty"==e)return ye||(null==S?void 0:S.anonymous_comment)&&ne()().startOf("second")>=ne()(null==S?void 0:S.evaluation_start).startOf("second");if("late_time"==e)return ye||(null==S?void 0:S.anonymous_comment)&&ne()().startOf("second")>=ne()(null==S?void 0:S.evaluation_start).startOf("second");if(["allow_late_settings","group_name"].every((function(n){return null==e?void 0:e.includes(n)}))){var m,p=an(null==l?void 0:l.group_name,(null==S?void 0:S.group_settings)||[],(function(e,n){return(null==e?void 0:e.end_time)&&(null==n?void 0:n.end_time)&&ne()(null==e?void 0:e.end_time).startOf("second")>ne()(null==n?void 0:n.end_time).startOf("second")}));return ge||!(null!=l&&l.is_admin)||(null==p?void 0:p.end_time)&&ne()().startOf("second")>=ne()(null==p?void 0:p.end_time).startOf("second")||(null==l?void 0:l.group_name)&&(null==l||null===(m=l.group_name)||void 0===m?void 0:m.length)&&(null==S?void 0:S.unified_setting)&&(null==S?void 0:S.end_time)&&ne()().startOf("second")>=ne()(null==S?void 0:S.end_time).startOf("second")}if(["allow_late_settings","late_penalty"].every((function(n){return null==e?void 0:e.includes(n)}))){var _=an(null==l?void 0:l.group_name,(null==S?void 0:S.anonymous_comment_settings)||[],(function(e,n){return(null==e?void 0:e.evaluation_start)&&(null==n?void 0:n.evaluation_start)&&ne()(null==e?void 0:e.evaluation_start).startOf("second")>ne()(null==n?void 0:n.evaluation_start).startOf("second")}));return ge||!(null!=l&&l.is_admin)||(null==_?void 0:_.evaluation_start)&&(null==S?void 0:S.anonymous_comment)&&ne()().startOf("second")>=ne()(null==_?void 0:_.evaluation_start).startOf("second")}if(["allow_late_settings","late_time"].every((function(n){return null==e?void 0:e.includes(n)}))){var h=an(null==l?void 0:l.group_name,(null==S?void 0:S.anonymous_comment_settings)||[],(function(e,n){return(null==e?void 0:e.evaluation_start)&&(null==n?void 0:n.evaluation_start)&&ne()(null==e?void 0:e.evaluation_start).startOf("second")<ne()(null==n?void 0:n.evaluation_start).startOf("second")}));return ge||!(null!=l&&l.is_admin)||(null==h?void 0:h.evaluation_start)&&(null==S?void 0:S.anonymous_comment)&&ne()().startOf("second")>=ne()(null==h?void 0:h.evaluation_start).startOf("second")}if("anonymous_comment"==e){var f=an(null,(null==S?void 0:S.anonymous_comment_settings)||[],(function(e,n){return(null==e?void 0:e.evaluation_start)&&(null==n?void 0:n.evaluation_start)&&ne()(null==e?void 0:e.evaluation_start).startOf("second")>ne()(null==n?void 0:n.evaluation_start).startOf("second")}),!0);return je||!(null!=S&&S.can_edit)&&!(0,P.t_)()||(null==S?void 0:S.anonymous_comment)&&ne()().startOf("second")>=ne()(null==S?void 0:S.evaluation_start).startOf("second")||(null==S?void 0:S.anonymous_comment)&&(null==f?void 0:f.evaluation_start)&&ne()().startOf("second")>=ne()(null==f?void 0:f.evaluation_start).startOf("second")}if("unified_anonymous_comment"==e){var x=an(null,(null==S?void 0:S.anonymous_comment_settings)||[],(function(e,n){return(null==e?void 0:e.evaluation_start)&&(null==n?void 0:n.evaluation_start)&&ne()(null==e?void 0:e.evaluation_start).startOf("second")<ne()(null==n?void 0:n.evaluation_start).startOf("second")}),!0);return je||!(null!=S&&S.can_edit)&&!(0,P.t_)()||(null==S?void 0:S.anonymous_comment)&&(null==S?void 0:S.unified_anonymous_comment)&&(null==S?void 0:S.evaluation_start)&&ne()().startOf("second")>=ne()(null==S?void 0:S.evaluation_start).startOf("second")||!(null!=S&&S.unified_anonymous_comment)&&(null==S?void 0:S.anonymous_comment)&&x.evaluation_start&&ne()().startOf("second")>=ne()(null==x?void 0:x.evaluation_start).startOf("second")||!1===$||!1===q}if("anonymous_group"==e)return je||!(null!=S&&S.can_edit)&&!(0,P.t_)()||(null==S?void 0:S.anonymous_comment)&&(null==S?void 0:S.evaluation_start)&&ne()().startOf("second")>=ne()(null==S?void 0:S.evaluation_start).startOf("second");if("evaluation_start"==e)return je||!(null!=S&&S.can_edit)&&!(0,P.t_)()||(null==S?void 0:S.anonymous_comment)&&ne()().startOf("second")>=ne()(null==S?void 0:S.evaluation_start).startOf("second");if("evaluation_start"==e)return je;if("evaluation_end"==e)return je||!(null!=S&&S.can_edit)&&!(0,P.t_)();if("evaluation_num"==e)return je||!(null!=S&&S.can_edit)&&!(0,P.t_)()||ne()().startOf("second")>=ne()(null==S?void 0:S.evaluation_start).startOf("second");if("absence_penalty"==e)return je||!(null!=S&&S.can_edit)&&!(0,P.t_)();if(["anonymous_comment_settings","group_name"].every((function(n){return null==e?void 0:e.includes(n)}))){var v=an(null==l?void 0:l.group_name,(null==S?void 0:S.anonymous_comment_settings)||[],(function(e,n){return(null==e?void 0:e.evaluation_start)&&(null==n?void 0:n.evaluation_start)&&ne()(null==e?void 0:e.evaluation_start).startOf("second")>ne()(null==n?void 0:n.evaluation_start).startOf("second")}));return je||!(null!=S&&S.can_edit)&&!(0,P.t_)()||!(null!=l&&l.is_admin)||(null==v?void 0:v.evaluation_start)&&ne()().startOf("second")>=ne()(null==v?void 0:v.evaluation_start).startOf("second")}if(["anonymous_comment_settings","evaluation_start"].every((function(n){return null==e?void 0:e.includes(n)}))){var g=an(null==l?void 0:l.group_name,(null==S?void 0:S.anonymous_comment_settings)||[],(function(e,n){return(null==e?void 0:e.evaluation_start)&&(null==n?void 0:n.evaluation_start)&&ne()(null==e?void 0:e.evaluation_start).startOf("second")>ne()(null==n?void 0:n.evaluation_start).startOf("second")}));return je||!(null!=S&&S.can_edit)&&!(0,P.t_)()||!(null!=l&&l.is_admin)||[(null==g?void 0:g.evaluation_start)&&ne()().startOf("second")>=ne()(null==g?void 0:g.evaluation_start).startOf("second"),!1]}if(["anonymous_comment_settings","evaluation_num"].every((function(n){return null==e?void 0:e.includes(n)}))){var y=an(null==l?void 0:l.group_name,(null==S?void 0:S.anonymous_comment_settings)||[],(function(e,n){return(null==e?void 0:e.evaluation_start)&&(null==n?void 0:n.evaluation_start)&&ne()(null==e?void 0:e.evaluation_start).startOf("second")>ne()(null==n?void 0:n.evaluation_start).startOf("second")}));return je||!(null!=S&&S.can_edit)&&!(0,P.t_)()||!(null!=l&&l.is_admin)||(null==y?void 0:y.evaluation_start)&&ne()().startOf("second")>=ne()(null==y?void 0:y.evaluation_start).startOf("second")}if(["anonymous_comment_settings","absence_penalty"].every((function(n){return null==e?void 0:e.includes(n)})))return je||!(null!=S&&S.can_edit)&&!(0,P.t_)()||!(null!=l&&l.is_admin);if(["anonymous_comment_settings","student_comment"].every((function(n){return null==e?void 0:e.includes(n)})))return je||!(null!=S&&S.can_edit)&&!(0,P.t_)()||!(null!=l&&l.is_admin);if("student_comment"==e)return je||!(null!=S&&S.can_edit)&&!(0,P.t_)();if("is_open_abnormal_score"==e)return je||!(null!=S&&S.can_edit)&&!(0,P.t_)()||(null==S?void 0:S.is_open_abnormal_score);if("anonymous_appeal"==e)return we||!(null!=S&&S.can_edit)&&!(0,P.t_)()||S.anonymous_appeal&&ne()().startOf("second")>=ne()(null==S?void 0:S.evaluation_start).startOf("second");if("unified_anonymous_appeal"==e)return we||!(null!=S&&S.can_edit)&&!(0,P.t_)()||ne()().startOf("second")>=ne()(null==S?void 0:S.evaluation_start).startOf("second")||!1===$||!1===q||0==ie;if("appeal_penalty"==e)return we||!(null!=S&&S.can_edit)&&!(0,P.t_)();if(["anonymous_appeal_settings","group_name"].every((function(n){return null==e?void 0:e.includes(n)}))){var j=an(null==l?void 0:l.group_name,(null==S?void 0:S.anonymous_comment_settings)||[],(function(e,n){return(null==e?void 0:e.evaluation_end)&&(null==n?void 0:n.evaluation_end)&&ne()(null==e?void 0:e.evaluation_end).startOf("second")>ne()(null==n?void 0:n.evaluation_end).startOf("second")}));return we||!(null!=S&&S.can_edit)&&!(0,P.t_)()||!(null!=l&&l.is_admin)||(null==j?void 0:j.evaluation_end)&&ne()().startOf("second")>=ne()(null==j?void 0:j.evaluation_end).startOf("second")}return!!["anonymous_appeal_settings","appeal_penalty"].every((function(n){return null==e?void 0:e.includes(n)}))&&(we||!(null!=S&&S.can_edit)&&!(0,P.t_)()||!(null!=l&&l.is_admin))},Ne=function(){var e=o()(l()().mark((function e(n){var t,s,i,a,r;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=n).group_settings=null==r||null===(t=r.group_settings)||void 0===t?void 0:t.map((function(e){var n,t;return e.end_time=ne()(null==e||null===(n=e.publish_time)||void 0===n?void 0:n[1]).startOf("second"),e.publish_time=ne()(null==e||null===(t=e.publish_time)||void 0===t?void 0:t[0]).startOf("second"),e.group_name="string"==typeof(null==e?void 0:e.group_name)?[null==e?void 0:e.group_name]:null==e?void 0:e.group_name,e.group_id=tn(null==e?void 0:e.group_name,null==S?void 0:S.group_settings),e})),r.allow_late_settings=null==r||null===(s=r.allow_late_settings)||void 0===s?void 0:s.map((function(e){return e.group_name="string"==typeof(null==e?void 0:e.group_name)?[null==e?void 0:e.group_name]:null==e?void 0:e.group_name,e.group_id=tn(null==e?void 0:e.group_name,null==S?void 0:S.group_settings),e})),r.anonymous_comment_settings=null==r||null===(i=r.anonymous_comment_settings)||void 0===i?void 0:i.map((function(e){var n,t;return e.evaluation_end=ne()(null==e||null===(n=e.evaluation_start)||void 0===n?void 0:n[1]).startOf("second"),e.evaluation_start=ne()(null==e||null===(t=e.evaluation_start)||void 0===t?void 0:t[0]).startOf("second"),e.group_name="string"==typeof(null==e?void 0:e.group_name)?[null==e?void 0:e.group_name]:null==e?void 0:e.group_name,e.group_id=tn(null==e?void 0:e.group_name,null==S?void 0:S.group_settings),e})),r.anonymous_appeal_settings=null==r||null===(a=r.anonymous_appeal_settings)||void 0===a?void 0:a.map((function(e){return e.group_name="string"==typeof(null==e?void 0:e.group_name)?[null==e?void 0:e.group_name]:null==e?void 0:e.group_name,e.group_id=tn(null==e?void 0:e.group_name,null==S?void 0:S.group_settings),e})),e.next=7,R(c()({},r));case 7:if(0===e.sent.status){e.next=10;break}return e.abrupt("return");case 10:return e.next=12,W(c()({},r));case 12:if(0===e.sent.status){e.next=15;break}return e.abrupt("return");case 15:x.ZP.success("保存成功"),Ie(),k({type:"shixunHomeworks/setActionTabs",payload:{key:""}});case 18:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),Ie=function(){k({type:"shixunHomeworks/getWorkSetting",payload:c()({},N)}),k({type:"shixunHomeworks/getWorkList",payload:c()({},N)})};return(0,p.useEffect)((function(){var e,n,t,s,i=null==S||null===(e=S.group_settings)||void 0===e?void 0:e.filter((function(e){return null!==e.publish_time})).map((function(e){return c()(c()({},e),{},{group_name:[e.group_name],publish_time:(null==e?void 0:e.publish_time)&&[ne()(null==e?void 0:e.publish_time),ne()(null==e?void 0:e.end_time)]})})),a=null===(n=S.allow_late_settings)||void 0===n?void 0:n.filter((function(e){return null!==e.late_time})).map((function(e){return c()(c()({},e),{},{group_name:[e.group_name],late_time:(null==e?void 0:e.late_time)&&ne()(null==e?void 0:e.late_time)})})),l=null===(t=S.anonymous_comment_settings)||void 0===t?void 0:t.filter((function(e){return null!==e.evaluation_start})).map((function(e){return c()(c()({},e),{},{group_name:[e.group_name],evaluation_start:(null==e?void 0:e.evaluation_start)&&[ne()(null==e?void 0:e.evaluation_start),ne()(null==e?void 0:e.evaluation_end)]})})),r=null===(s=S.anonymous_appeal_settings)||void 0===s?void 0:s.filter((function(e){return null!==e.appeal_time})).map((function(e){return c()(c()({},e),{},{group_name:[e.group_name]})})),o=c()(c()({},S),{},{late_penalty:null!=S&&S.late_penalty?null==S?void 0:S.late_penalty:5,evaluation_num:null!=S&&S.evaluation_num?null==S?void 0:S.evaluation_num:3,absence_penalty:null!=S&&S.absence_penalty?null==S?void 0:S.absence_penalty:3,appeal_penalty:null!=S&&S.appeal_penalty?null==S?void 0:S.appeal_penalty:2,publish_time:null!=S&&S.publish_time?ne()(null==S?void 0:S.publish_time):"",end_time:null!=S&&S.end_time?ne()(null==S?void 0:S.end_time):"",late_time:null!=S&&S.late_time?ne()(null==S?void 0:S.late_time):"",evaluation_start:null!=S&&S.evaluation_start?ne()(null==S?void 0:S.evaluation_start):"",evaluation_end:null!=S&&S.evaluation_end?ne()(null==S?void 0:S.evaluation_end):"",group_settings:null!=i&&i.length?i:[{is_admin:!0}],allow_late_settings:null!=a&&a.length?a:[{is_admin:!0,late_penalty:5}],anonymous_comment_settings:null!=l&&l.length?l:[{is_admin:!0,absence_penalty:3,evaluation_num:3}],anonymous_appeal_settings:null!=r&&r.length?r:[{is_admin:!0,appeal_penalty:2}]});J.setFieldsValue(o),ve(o),_e(!(0,P.GJ)()),console.log("workSetting",S)}),[S]),(0,p.useEffect)((function(){return k({type:"globalSetting/footerToggle",payload:!1}),function(){k({type:"globalSetting/footerToggle",payload:!0}),k({type:"shixunHomeworks/setActionTabs",payload:{key:""}}),null==J||J.resetFields()}}),[]),(0,G.jsx)(me.Z,{spinning:!!y["shixunHomeworks/getWorkSetting"]||!!y["shixunHomeworks/getWorkList"],children:(0,G.jsxs)("section",{style:{padding:"20px 30px 90px",background:"#fff"},children:[(0,G.jsxs)(O.Z,{form:J,colon:!1,disabled:pe,initialValues:xe,scrollToFirstError:!0,onValuesChange:function(e,n){if(console.log("handleValuesChange",e,n),k({type:"shixunHomeworks/setActionTabs",payload:{key:"发布设置离开"}}),"unified_setting"in e&&(null!=n&&n.unified_setting||J.setFieldsValue({unified_late:!1,unified_anonymous_comment:!1,unified_anonymous_appeal:!1})),"unified_late"in e&&(null!=n&&n.unified_late||J.setFieldsValue({unified_anonymous_comment:!1,unified_anonymous_appeal:!1})),"unified_anonymous_comment"in e&&(null!=n&&n.unified_anonymous_comment||J.setFieldsValue({unified_anonymous_appeal:!1})),"group_settings"in e){var t,s,a,l,r=[];null==n||null===(t=n.group_settings)||void 0===t||t.forEach((function(e){r=[].concat(i()(r),i()((null==e?void 0:e.group_name)||[]))})),J.setFieldsValue({allow_late_settings:(null==n||null===(s=n.allow_late_settings)||void 0===s?void 0:s.map((function(e){var n;return c()(c()({},e),{},{group_name:null==e||null===(n=e.group_name)||void 0===n?void 0:n.filter((function(e){return r.includes(e)}))})})))||[{is_admin:!0,late_penalty:5}],anonymous_comment_settings:(null==n||null===(a=n.anonymous_comment_settings)||void 0===a?void 0:a.map((function(e){var n,t;return c()(c()({},e),{},{group_name:null!=e&&e.evaluation_start&&ne()().startOf("second")>=ne()(null==e||null===(n=e.evaluation_start)||void 0===n?void 0:n[0]).startOf("second")?null==e?void 0:e.group_name:null==e||null===(t=e.group_name)||void 0===t?void 0:t.filter((function(e){return r.includes(e)}))})})))||[{is_admin:!0,absence_penalty:3,evaluation_num:3}],anonymous_appeal_settings:(null==n||null===(l=n.anonymous_appeal_settings)||void 0===l?void 0:l.map((function(e){var n;return c()(c()({},e),{},{group_name:null==e||null===(n=e.group_name)||void 0===n?void 0:n.filter((function(e){return r.includes(e)}))})})))||[{is_admin:!0,appeal_penalty:2}]})}if("allow_late_settings"in e){var o,u,d,m=[];null==n||null===(o=n.allow_late_settings)||void 0===o||o.forEach((function(e){m=[].concat(i()(m),i()((null==e?void 0:e.group_name)||[]))})),J.setFieldsValue({anonymous_comment_settings:(null==n||null===(u=n.anonymous_comment_settings)||void 0===u?void 0:u.map((function(e){var n,t;return c()(c()({},e),{},{group_name:null!=e&&e.evaluation_start&&ne()().startOf("second")>=ne()(null==e||null===(n=e.evaluation_start)||void 0===n?void 0:n[0]).startOf("second")?null==e?void 0:e.group_name:null==e||null===(t=e.group_name)||void 0===t?void 0:t.filter((function(e){return m.includes(e)}))})})))||[{is_admin:!0,absence_penalty:3,evaluation_num:3}],anonymous_appeal_settings:(null==n||null===(d=n.anonymous_appeal_settings)||void 0===d?void 0:d.map((function(e){var n;return c()(c()({},e),{},{group_name:null==e||null===(n=e.group_name)||void 0===n?void 0:n.filter((function(e){return m.includes(e)}))})})))||[{is_admin:!0,appeal_penalty:2}]})}if("anonymous_comment_settings"in e){var p,_,h=[];null==n||null===(p=n.anonymous_comment_settings)||void 0===p||p.forEach((function(e){h=[].concat(i()(h),i()((null==e?void 0:e.group_name)||[]))})),J.setFieldsValue({anonymous_appeal_settings:(null==n||null===(_=n.anonymous_appeal_settings)||void 0===_?void 0:_.map((function(e){var n;return c()(c()({},e),{},{group_name:null==e||null===(n=e.group_name)||void 0===n?void 0:n.filter((function(e){return h.includes(e)}))})})))||[{is_admin:!0,appeal_penalty:2}]})}J.validateFields(),console.log("=====",ne()(null==n?void 0:n.end_time).format("YYYY-MM-DD HH:mm:ss"))},onFinish:Ne,children:[(0,G.jsxs)("div",{style:{paddingBottom:"30px",borderBottom:"1px solid #EDEDED"},children:[(0,G.jsx)("h1",{children:"发布设置"}),(0,G.jsx)(O.Z.Item,{name:"unified_setting",rules:[{required:!0,message:"请选择发布类型"}],children:(0,G.jsxs)(A.ZP.Group,{disabled:Ze("unified_setting"),children:[(0,G.jsx)(A.ZP,{value:!0,children:(0,G.jsx)("span",{className:"font16",children:"统一发布"})}),(null==S||null===(r=S.group_settings)||void 0===r?void 0:r.length)>0&&(0,G.jsx)(A.ZP,{value:!1,children:(0,G.jsx)("span",{className:"font16",children:"分班发布"})})]})}),q?(0,G.jsxs)("div",{style:{marginTop:"20px",display:"flex",flexDirection:"column",gap:"20px"},children:[(0,G.jsxs)(w.Z,{style:{lineHeight:"32px"},wrap:!1,align:"top",gutter:10,children:[(0,G.jsx)(b.Z,{children:(0,G.jsx)(O.Z.Item,{style:{marginLeft:24},label:"发布时间",name:"publish_time",rules:[{validator:function(e,n){return null===n?Promise.reject("请选择发布时间"):Promise.resolve()}}],normalize:function(e){return e&&ne()(e).startOf("second")},children:(0,G.jsx)(Se.default,{style:{width:200},disabled:Ze("publish_time"),placeholder:"请选择发布时间",format:"YYYY-MM-DD HH:mm",disabledDate:function(e){return(0,I.Q8)(e,null==S?void 0:S.course_end_date)},disabledTime:function(e){return(0,I.d0)(e)},showTime:{format:"HH:mm",defaultValue:ne()((0,I.U6)(),"HH:mm")}})})}),(0,G.jsx)(b.Z,{children:(0,G.jsx)("span",{className:"c-grey-999",children:"(学生收到作业的时间)"})})]}),(0,G.jsxs)(w.Z,{style:{lineHeight:"32px"},wrap:!1,align:"top",gutter:10,children:[(0,G.jsx)(b.Z,{children:(0,G.jsx)(O.Z.Item,{style:{marginLeft:24},label:"截止时间",name:"end_time",rules:[{validator:function(e,n){return null===n?Promise.reject("请选择截止时间"):Promise.resolve()}}],normalize:function(e){return e&&ne()(e).startOf("second")},children:(0,G.jsx)(Se.default,{style:{width:200},disabled:Ze("end_time"),placeholder:"请选择截止时间",format:"YYYY-MM-DD HH:mm",disabledDate:function(e){return(0,I.Q8)(e,null==S?void 0:S.course_end_date,ne()(K).add(1,"minutes").format())},disabledTime:function(e){return(0,I.d0)(e,ne()(K).add(1,"minutes"))},showTime:{format:"HH:mm",defaultValue:ne()((0,I.U6)(),"HH:mm")}})})}),(0,G.jsx)(b.Z,{children:(0,G.jsx)("span",{className:"c-grey-999",children:"(学生“按时”提交作品的时间截点)"})})]})]}):(0,G.jsx)(O.Z.List,{name:"group_settings",children:function(e,n){var t=n.add,s=n.remove;return e.map((function(e,n){var i,a;return(0,G.jsxs)("div",{className:"mt20",children:[(0,G.jsxs)(w.Z,{wrap:!1,align:"middle",gutter:14,children:[(0,G.jsx)(b.Z,{flex:"25px",children:(0,G.jsx)("div",{style:{height:8,width:8,background:"#C1C5CE",borderRadius:"50%"}})}),(0,G.jsxs)(b.Z,{children:["发布规则",n+1]})]}),(0,G.jsxs)(w.Z,{className:"mt15",wrap:!1,align:"top",justify:"space-between",style:{lineHeight:"32px"},children:[(0,G.jsx)(b.Z,{children:(0,G.jsx)("span",{className:"ml25",children:"班级"})}),(0,G.jsx)(b.Z,{children:(0,G.jsx)(O.Z.Item,{className:"ml10",name:[e.name,"group_name"],rules:[{required:!0,message:"请选择班级"}],children:(0,G.jsx)(F.default,{disabled:Ze(["group_settings","group_name"],null==B?void 0:B[n]),placeholder:"请选择分班名称",style:{width:314},mode:"multiple",fieldNames:{label:"group_name",value:"group_name"},options:null==S||null===(i=S.group_settings)||void 0===i?void 0:i.filter((function(e){var n;return!(null!=B&&null!==(n=B.map((function(e){return null==e?void 0:e.group_name})))&&void 0!==n&&null!==(n=n.toString())&&void 0!==n&&null!==(n=n.split(","))&&void 0!==n&&n.includes(String(e.group_name)))&&e.is_admin}))})})}),(0,G.jsx)(b.Z,{children:(0,G.jsx)("span",{className:"ml40",children:"作业时间"})}),(0,G.jsx)(b.Z,{children:(0,G.jsx)(O.Z.Item,{className:"ml10",name:[e.name,"publish_time"],rules:[{required:!0,message:"请选择作业时间"}],children:(0,G.jsx)(Se.default.RangePicker,{style:{width:543},disabled:Ze(["group_settings","publish_time"],null==B?void 0:B[n]),placeholder:["请选择发布时间","请选择截止时间"],disabledDate:function(e){return(0,I.Q8)(e,null==S?void 0:S.course_end_date)},disabledTime:function(e){return(0,I.d0)(e)},showTime:{format:"HH:mm",defaultValue:[ne()((0,I.U6)(),"HH:mm"),ne()((0,I.U6)(),"HH:mm")]},format:"YYYY-MM-DD HH:mm"})})}),!pe&&(0,G.jsx)(b.Z,{flex:1,children:(0,G.jsxs)(w.Z,{wrap:!1,align:"middle",justify:"end",children:[0!=n&&!Ze(["group_settings","group_name"],null==B?void 0:B[n])&&(0,G.jsx)(b.Z,{children:(0,G.jsx)("i",{className:"iconfont icon-shanjian1 current",style:{color:"#E30000"},onClick:function(){s(e.name)}})}),(null==S||null===(a=S.group_settings)||void 0===a||null===(a=a.filter((function(e){var n;return!(null!=B&&null!==(n=B.map((function(e){return null==e?void 0:e.group_name})))&&void 0!==n&&null!==(n=n.toString())&&void 0!==n&&null!==(n=n.split(","))&&void 0!==n&&n.includes(String(e.group_name)))&&e.is_admin})))||void 0===a?void 0:a.length)>0&&(0,G.jsx)(b.Z,{children:(0,G.jsx)("i",{className:"iconfont icon-tianjiatimu ml15 current",style:{color:"#3061D0"},onClick:function(){t({is_admin:!0})}})})]})})]})]},e.key)}))}})]}),(0,G.jsx)(Ce.rU,{form:J}),(0,G.jsxs)("div",{style:{padding:"20px 0",borderBottom:"1px solid #EDEDED"},children:[(0,G.jsx)("h1",{children:"补交设置"}),(0,G.jsxs)(w.Z,{wrap:!1,align:"middle",gutter:10,children:[(0,G.jsx)(b.Z,{children:(0,G.jsx)(O.Z.Item,{name:"allow_late",valuePropName:"checked",children:(0,G.jsx)(L.Z,{disabled:Ze("allow_late"),children:(0,G.jsx)("span",{className:"font16",children:"开启补交"})})})}),(0,G.jsx)(b.Z,{children:(0,G.jsx)("a",{onClick:function(){ke("allow_late")},children:"规则说明"})})]}),X&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(w.Z,{className:"mt20",wrap:!1,align:"middle",gutter:10,style:{position:"relative"},children:[(0,G.jsx)(b.Z,{children:(0,G.jsx)("span",{className:"ml25",children:"补交方式"})}),(0,G.jsx)(b.Z,{children:(0,G.jsx)(O.Z.Item,{className:"ml10",name:"unified_late",rules:[{required:!0,message:"请选择补交方式"}],children:(0,G.jsxs)(A.ZP.Group,{disabled:Ze("unified_late"),children:[(0,G.jsx)(A.ZP,{value:!0,children:"统一补交"}),(null==S||null===(u=S.group_settings)||void 0===u?void 0:u.length)>0&&(0,G.jsx)(A.ZP,{value:!1,children:"分班补交"})]})})}),!1===q&&(0,G.jsx)(g.Z,{title:ke("unified_late"),placement:"topLeft",children:(0,G.jsx)("div",{style:{width:"calc(100% - 95px)",height:"100%",position:"absolute",top:0,left:"95px"}})})]}),$?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(w.Z,{className:"mt20",wrap:!1,align:"top",gutter:10,style:{lineHeight:"30px",position:"relative"},children:[(0,G.jsx)(b.Z,{flex:"90px",style:{textAlign:"end"},children:"补交扣分"}),(0,G.jsx)(b.Z,{children:(0,G.jsx)(O.Z.Item,{name:"late_penalty",rules:[{required:!0,message:"请输入补交扣分"}],children:(0,G.jsx)(D.Z,{min:0,disabled:Ze("late_penalty")})})}),(0,G.jsx)(b.Z,{children:"分"}),(0,G.jsx)(b.Z,{children:(0,G.jsx)("span",{className:"c-grey-999",children:"(延时提交作品时,学生成绩将被扣减的分值)"})})]}),(0,G.jsxs)(w.Z,{className:"mt20 mb10",style:{lineHeight:"32px"},wrap:!1,align:"top",gutter:10,children:[(0,G.jsx)(b.Z,{flex:"90px",style:{textAlign:"end"},children:(0,G.jsx)("span",{className:"c-grey-333",children:"截止时间"})}),(0,G.jsx)(b.Z,{children:(0,G.jsx)(O.Z.Item,{name:"late_time",rules:[{required:!0,validator:function(e,n){return null===n?Promise.reject("请选择截止时间"):ne()(n).startOf("second")<=ne()(U).startOf("second")?Promise.reject("补交截止时间不能≤发布截止时间,请重新选择"):Promise.resolve()}}],normalize:function(e){return e&&ne()(e).startOf("second")},children:(0,G.jsx)(Se.default,{style:{width:200},disabled:Ze("late_time"),placeholder:"请选择截止时间",format:"YYYY-MM-DD HH:mm",disabledDate:function(e){return(0,I.Q8)(e,null==S?void 0:S.course_end_date,ne()(U).add(1,"minutes").format())},disabledTime:function(e){return(0,I.d0)(e,ne()(U).add(1,"minutes"))},showTime:{format:"HH:mm",defaultValue:ne()((0,I.U6)(),"HH:mm")}})})}),(0,G.jsx)(b.Z,{style:{position:"absolute",left:320},children:(0,G.jsx)("span",{className:"c-grey-999",children:"(学生“延时”提交作品的时间截点)"})})]})]}):(0,G.jsx)(O.Z.List,{name:"allow_late_settings",children:function(e,n){var t=n.add,s=n.remove;return e.map((function(e,n){var a,l,r,o,u=U||(null===(a=an(null==Q||null===(l=Q[n])||void 0===l?void 0:l.group_name,B||[],(function(e,n){var t,s;return ne()(null==e||null===(t=e.publish_time)||void 0===t?void 0:t[1]).startOf("second")>ne()(null==n||null===(s=n.publish_time)||void 0===s?void 0:s[1]).startOf("second")})))||void 0===a||null===(a=a.publish_time)||void 0===a?void 0:a[1]);return(0,G.jsxs)("div",{className:"mt20 mb30",children:[(0,G.jsxs)(w.Z,{wrap:!1,align:"middle",gutter:14,children:[(0,G.jsx)(b.Z,{flex:"25px",children:(0,G.jsx)("div",{style:{height:8,width:8,background:"#C1C5CE",borderRadius:"50%"}})}),(0,G.jsxs)(b.Z,{children:["补交规则",n+1]})]}),(0,G.jsxs)(w.Z,{className:"mt15",wrap:!1,align:"top",justify:"space-between",style:{lineHeight:"32px"},children:[(0,G.jsx)(b.Z,{children:(0,G.jsx)("span",{className:"ml25",children:"班级"})}),(0,G.jsx)(b.Z,{children:(0,G.jsx)(O.Z.Item,{className:"ml10",name:[e.name,"group_name"],rules:[{required:!0,message:"请选择班级"}],children:(0,G.jsx)(F.default,{disabled:Ze(["allow_late_settings","group_name"],null==Q?void 0:Q[n]),placeholder:"请选择分班名称",style:{width:314},mode:"multiple",fieldNames:{label:"group_name",value:"group_name"},options:be(q?null==S?void 0:S.group_settings:B,[].concat(i()(Q||[]),i()((null==S?void 0:S.anonymous_comment)&&!(null!=S&&S.unified_anonymous_comment)&&(null==S||null===(r=S.anonymous_comment_settings)||void 0===r?void 0:r.filter((function(e){return(null==e?void 0:e.evaluation_start)&&ne()().startOf("second")>=ne()(null==e?void 0:e.evaluation_start).startOf("second")})))||[])))})})}),(0,G.jsx)(b.Z,{children:(0,G.jsx)("span",{className:"ml40",children:"补交扣分"})}),(0,G.jsx)(b.Z,{children:(0,G.jsx)(O.Z.Item,{className:"ml10",name:[e.name,"late_penalty"],rules:[{required:!0,message:"请输入补交扣分"}],children:(0,G.jsx)(D.Z,{min:0,disabled:Ze(["allow_late_settings","late_penalty"],null==Q?void 0:Q[n])})})}),(0,G.jsx)(b.Z,{children:(0,G.jsx)("span",{className:"ml5",children:"分"})}),(0,G.jsx)(b.Z,{children:(0,G.jsx)("span",{className:"ml40",children:"截止时间"})}),(0,G.jsx)(b.Z,{children:(0,G.jsx)(O.Z.Item,{className:"ml10",name:[e.name,"late_time"],rules:[{required:!0,validator:function(e,n){return null==n?Promise.reject("请选择截止时间"):u&&ne()(n).startOf("second")<=ne()(u).startOf("second")?Promise.reject("补交截止时间不能≤发布截止时间,请重新选择"):Promise.resolve()}}],children:(0,G.jsx)(Se.default,{disabled:Ze(["allow_late_settings","late_time"],null==Q?void 0:Q[n]),style:{width:333},placeholder:"请选择截止时间",format:"YYYY-MM-DD HH:mm",disabledDate:function(e){return(0,I.Q8)(e,null==S?void 0:S.course_end_date,ne()(u).add(1,"minutes").format())},disabledTime:function(e){return(0,I.d0)(e,ne()(u).add(1,"minutes"))},showTime:{format:"HH:mm",defaultValue:ne()((0,I.U6)(),"HH:mm")}})})}),!pe&&(0,G.jsx)(b.Z,{flex:1,children:(0,G.jsxs)(w.Z,{wrap:!1,align:"middle",justify:"end",children:[0!=n&&!Ze(["allow_late_settings","group_name"],null==Q?void 0:Q[n])&&(0,G.jsx)(b.Z,{children:(0,G.jsx)("i",{className:"iconfont icon-shanjian1 current",style:{color:"#E30000"},onClick:function(){s(e.name)}})}),(null===(o=be(q?null==S?void 0:S.group_settings:B,Q))||void 0===o?void 0:o.length)>0&&(0,G.jsx)(b.Z,{children:(0,G.jsx)("i",{className:"iconfont icon-tianjiatimu ml15 current",style:{color:"#3061D0"},onClick:function(){t({is_admin:!0,late_penalty:5})}})})]})})]})]},e.key)}))}})]})]}),(0,G.jsxs)("div",{style:{padding:"20px 0"},children:[(0,G.jsx)("h1",{children:"匿评设置"}),(0,G.jsxs)(w.Z,{wrap:!1,align:"middle",gutter:10,children:[(0,G.jsx)(b.Z,{children:(0,G.jsx)(O.Z.Item,{name:"anonymous_comment",valuePropName:"checked",children:(0,G.jsx)(L.Z,{disabled:Ze("anonymous_comment"),children:(0,G.jsx)("span",{className:"font16",children:"启用匿评"})})})}),(0,G.jsx)(b.Z,{children:(0,G.jsx)("a",{onClick:function(){ke("anonymous_comment")},children:"规则说明"})})]}),se&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(w.Z,{className:"mt20",wrap:!1,children:[(0,G.jsx)(b.Z,{children:(0,G.jsx)(O.Z.Item,{style:{marginLeft:24},name:"can_make_up",valuePropName:"checked",children:(0,G.jsxs)(L.Z,{children:[" ",X?"允许学生补交,并且扣除补交扣分":"允许学生补交,补交扣分"," "]})})}),!X&&(0,G.jsx)(b.Z,{children:(0,G.jsx)(O.Z.Item,{name:"make_up_score",children:(0,G.jsx)(D.Z,{min:1,max:100,style:{width:84}})})}),(0,G.jsxs)(b.Z,{children:[" ",!X&&(0,G.jsx)("span",{style:{lineHeight:"30px"},className:"ml10",children:"分"}),(0,G.jsx)(g.Z,{title:ke("make_up_score"),children:(0,G.jsx)("i",{className:"iconfont icon-tishixiaowenhao font14 current c-grey-999 current-primary ml5",style:{lineHeight:"30px"}})})]})]}),(0,G.jsxs)("div",{className:"mt20",style:{position:"relative"},children:[(0,G.jsxs)(w.Z,{wrap:!1,align:"middle",gutter:10,children:[(0,G.jsx)(b.Z,{flex:"90px",style:{textAlign:"end"},children:"匿评方式"}),(0,G.jsx)(b.Z,{children:(0,G.jsx)(O.Z.Item,{className:"ml10",name:"unified_anonymous_comment",rules:[{validator:function(e,n){return null===n?Promise.reject("请选择匿评方式"):Promise.resolve()}}],children:(0,G.jsxs)(A.ZP.Group,{disabled:Ze("unified_anonymous_comment"),children:[(0,G.jsx)(A.ZP,{value:!0,children:"统一匿评"}),(null==S||null===(d=S.group_settings)||void 0===d?void 0:d.length)>0&&(0,G.jsx)(A.ZP,{value:!1,children:"分班匿评"})]})})})]}),(!1===$||!1===q)&&(0,G.jsx)(g.Z,{title:ke("unified_anonymous_comment"),placement:"topLeft",children:(0,G.jsx)("div",{style:{width:"calc(100% - 95px)",height:"100%",position:"absolute",top:0,left:"95px"}})})]}),ie?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(w.Z,{className:"mt20",wrap:!1,align:"middle",gutter:10,children:[(0,G.jsx)(b.Z,{flex:"90px",style:{textAlign:"end"},children:"互评方式"}),(0,G.jsx)(b.Z,{children:(0,G.jsx)(O.Z.Item,{className:"ml10",name:"anonymous_group",rules:[{required:!0,message:"请选择互评方式"}],children:(0,G.jsxs)(A.ZP.Group,{disabled:Ze("anonymous_group"),children:[(0,G.jsx)(A.ZP,{value:!1,children:"所有学生互评"}),(null==S||null===(h=S.group_settings)||void 0===h?void 0:h.length)>0&&(0,G.jsx)(A.ZP,{value:!0,children:"班级内互评"})]})})})]}),(0,G.jsxs)(w.Z,{className:"mt20",wrap:!1,align:"top",gutter:10,style:{lineHeight:"30px"},children:[(0,G.jsx)(b.Z,{flex:"90px",style:{textAlign:"end"},children:"开始时间"}),(0,G.jsx)(b.Z,{children:(0,G.jsx)(O.Z.Item,{name:"evaluation_start",rules:[{required:!0,validator:function(e,n){return null===n?Promise.reject("请选择开始时间"):ne()(n).startOf("second")<=ne()(ee||U).startOf("second")?Promise.reject(ee?"匿评开始时间不能≤补交截止时间,请重新选择":"匿评开始时间不能≤发布截止时间,请重新选择"):Promise.resolve()}}],normalize:function(e){return e&&ne()(e).startOf("second")},children:(0,G.jsx)(Se.default,{style:{width:200},disabled:Ze("evaluation_start"),placeholder:"请选择开始时间",format:"YYYY-MM-DD HH:mm",disabledDate:function(e){return(0,I.Q8)(e,null==S?void 0:S.course_end_date,ne()(ee||U).add(1,"minutes").format())},disabledTime:function(e){return(0,I.d0)(e,ne()(ee||U).add(1,"minutes"))},showTime:{format:"HH:mm",defaultValue:ne()((0,I.U6)(),"HH:mm")}})})}),(0,G.jsx)(b.Z,{children:(0,G.jsx)("span",{className:"c-grey-999",children:"(匿评开始时间之前提交作品的学生,参与匿评)"})})]}),(0,G.jsxs)(w.Z,{className:"mt20",wrap:!1,align:"top",gutter:10,style:{lineHeight:"30px",position:"relative"},children:[(0,G.jsx)(b.Z,{flex:"90px",style:{textAlign:"end"},children:"截止时间"}),(0,G.jsx)(b.Z,{children:(0,G.jsx)(O.Z.Item,{name:"evaluation_end",rules:[{required:!0,validator:function(e,n){return null===n?Promise.reject("请选择截止时间"):ne()(n).startOf("second")<=ne()(ae||ee||U).startOf("second")?Promise.reject(ae?"匿评截止时间不能≤匿评开始时间,请重新选择":ee?"匿评截止时间不能≤补交截止时间,请重新选择":"匿评截止时间不能≤发布截止时间,请重新选择"):Promise.resolve()}}],normalize:function(e){return e&&ne()(e).startOf("second")},children:(0,G.jsx)(Se.default,{style:{width:200},disabled:Ze("evaluation_end"),placeholder:"请选择截止时间",format:"YYYY-MM-DD HH:mm",disabledDate:function(e){return(0,I.Q8)(e,null==S?void 0:S.course_end_date,ne()(ae||ee||U).add(1,"minutes").format())},disabledTime:function(e){return(0,I.d0)(e,ne()(ae||ee||U).add(1,"minutes"))},showTime:{format:"HH:mm",defaultValue:ne()((0,I.U6)(),"HH:mm")}})})}),(0,G.jsx)(b.Z,{style:{position:"absolute",left:300},children:(0,G.jsx)("span",{className:"c-grey-999",children:"学生匿评TA人作品的时间截点"})})]}),(0,G.jsxs)(w.Z,{className:"mt20",wrap:!1,align:"top",gutter:10,style:{lineHeight:"30px"},children:[(0,G.jsx)(b.Z,{flex:"90px",style:{textAlign:"end"},children:"匿评数量"}),(0,G.jsx)(b.Z,{children:(0,G.jsx)(O.Z.Item,{name:"evaluation_num",rules:[{required:!0,message:"请输入匿评数量"}],children:(0,G.jsx)(D.Z,{disabled:Ze("evaluation_num")})})}),(0,G.jsx)(b.Z,{children:(0,G.jsx)("span",{className:"c-grey-999",children:"(本处填写每个学生将被分配的匿评作品数量。如全班实际提交作业数量小于本数值,则以实际提交作业数量为准。)"})})]}),(0,G.jsxs)(w.Z,{className:"mt20",wrap:!1,align:"top",gutter:10,style:{lineHeight:"30px"},children:[(0,G.jsx)(b.Z,{flex:"90px",style:{textAlign:"end"},children:"缺评扣分"}),(0,G.jsx)(b.Z,{children:(0,G.jsx)(O.Z.Item,{name:"absence_penalty",rules:[{required:!0,message:"请输入缺评扣分"}],children:(0,G.jsx)(D.Z,{disabled:Ze("absence_penalty")})})}),(0,G.jsx)(b.Z,{children:"分"}),(0,G.jsx)(b.Z,{children:(0,G.jsx)("span",{className:"c-grey-999",children:"(学生缺评时,其成绩将被扣减的分值)"})})]})]}):(0,G.jsx)(O.Z.List,{name:"anonymous_comment_settings",children:function(e,n){var t=n.add,s=n.remove;return e.map((function(e,n){var i,a,l,r,o,u=ee||(null===(i=an(null==re||null===(a=re[n])||void 0===a?void 0:a.group_name,Q||[],(function(e,n){return ne()(null==e?void 0:e.late_time).startOf("second")>ne()(null==n?void 0:n.late_time).startOf("second")})))||void 0===i?void 0:i.late_time)||U||(null===(l=an(null==re||null===(r=re[n])||void 0===r?void 0:r.group_name,B||[],(function(e,n){var t,s;return ne()(null==e||null===(t=e.publish_time)||void 0===t?void 0:t[1]).startOf("second")>ne()(null==n||null===(s=n.publish_time)||void 0===s?void 0:s[1]).startOf("second")})))||void 0===l||null===(l=l.publish_time)||void 0===l?void 0:l[1]);return(0,G.jsxs)("div",{className:"mt20",children:[(0,G.jsxs)(w.Z,{wrap:!1,align:"middle",gutter:14,children:[(0,G.jsx)(b.Z,{flex:"25px",children:(0,G.jsx)("div",{style:{height:8,width:8,background:"#C1C5CE",borderRadius:"50%"}})}),(0,G.jsxs)(b.Z,{children:["匿评规则",n+1]})]}),(0,G.jsxs)(w.Z,{className:"mt15",wrap:!1,align:"top",justify:"space-between",style:{lineHeight:"32px"},children:[(0,G.jsxs)(b.Z,{children:[(0,G.jsxs)(w.Z,{wrap:!1,align:"top",children:[(0,G.jsx)(b.Z,{children:(0,G.jsx)("span",{className:"ml25",children:"班级"})}),(0,G.jsx)(b.Z,{children:(0,G.jsx)(O.Z.Item,{className:"ml10",name:[e.name,"group_name"],rules:[{required:!0,message:"请选择班级"}],children:(0,G.jsx)(F.default,{disabled:Ze(["anonymous_comment_settings","group_name"],null==re?void 0:re[n]),placeholder:"请选择分班名称",style:{width:314},mode:"multiple",fieldNames:{label:"group_name",value:"group_name"},options:be(q?null==S?void 0:S.group_settings:B,re)})})}),(0,G.jsx)(b.Z,{children:(0,G.jsx)("span",{className:"ml40",children:"匿评时间"})}),(0,G.jsx)(b.Z,{children:(0,G.jsx)(O.Z.Item,{className:"ml10",name:[e.name,"evaluation_start"],rules:[{required:!0,validator:function(e,n){return null==n?Promise.reject("请选择匿评时间"):u&&ne()(n).startOf("second")<=ne()(u).startOf("second")?Promise.reject(U?"匿评时间不能≤发布截止时间,请重新选择":"匿评时间不能≤补交截止时间,请重新选择"):Promise.resolve()}}],children:(0,G.jsx)(Se.default.RangePicker,{disabled:Ze(["anonymous_comment_settings","evaluation_start"],null==re?void 0:re[n]),style:{width:543},placeholder:["请选择发布时间","请选择截止时间"],disabledDate:function(e){return(0,I.Q8)(e,null==S?void 0:S.course_end_date,ne()(u).add(1,"minutes").format())},disabledTime:function(e){return(0,I.d0)(e,ne()(u).add(1,"minutes"))},showTime:{format:"HH:mm",defaultValue:[ne()((0,I.U6)(),"HH:mm"),ne()((0,I.U6)(),"HH:mm")]},format:"YYYY-MM-DD HH:mm"})})})]}),(0,G.jsxs)(w.Z,{className:"mt20",wrap:!1,align:"top",children:[(0,G.jsx)(b.Z,{children:(0,G.jsx)("span",{className:"ml25",children:"匿评数量"})}),(0,G.jsx)(b.Z,{children:(0,G.jsx)(O.Z.Item,{className:"ml10",name:[e.name,"evaluation_num"],rules:[{required:!0,message:"请输入匿评数量"}],children:(0,G.jsx)(D.Z,{min:0,disabled:Ze(["anonymous_comment_settings","evaluation_num"],null==re?void 0:re[n])})})}),(0,G.jsx)(b.Z,{children:(0,G.jsx)("span",{className:"ml60",children:"缺评扣分"})}),(0,G.jsx)(b.Z,{children:(0,G.jsx)(O.Z.Item,{className:"ml10",name:[e.name,"absence_penalty"],rules:[{required:!0,message:"请输入缺评扣分"}],children:(0,G.jsx)(D.Z,{min:0,disabled:Ze(["anonymous_comment_settings","absence_penalty"],null==re?void 0:re[n])})})}),(0,G.jsx)(b.Z,{children:(0,G.jsx)("span",{className:"ml5",children:"分"})}),!ie&&(0,G.jsx)(b.Z,{children:(0,G.jsx)(O.Z.Item,{style:{marginLeft:60},name:[e.name,"student_comment"],valuePropName:"checked",children:(0,G.jsx)(L.Z,{disabled:Ze(["anonymous_comment_settings","student_comment"],null==re?void 0:re[n]),children:"匿评计入已评阅"})})})]})]}),!pe&&(0,G.jsx)(b.Z,{flex:1,children:(0,G.jsxs)(w.Z,{wrap:!1,align:"top",justify:"end",children:[0!=n&&!Ze(["anonymous_comment_settings","group_name"],null==re?void 0:re[n])&&(0,G.jsx)(b.Z,{children:(0,G.jsx)("i",{className:"iconfont icon-shanjian1 current",style:{color:"#E30000"},onClick:function(){s(e.name)}})}),(null===(o=be(q?null==S?void 0:S.group_settings:B,re))||void 0===o?void 0:o.length)>0&&(0,G.jsx)(b.Z,{children:(0,G.jsx)("i",{className:"iconfont icon-tianjiatimu ml15 current",style:{color:"#3061D0"},onClick:function(){t({is_admin:!0,absence_penalty:3,evaluation_num:3})}})})]})})]})]},e.key)}))}}),(0,G.jsxs)(w.Z,{className:"mt30",wrap:!1,children:[(0,G.jsx)(b.Z,{children:(0,G.jsx)(O.Z.Item,{name:"is_open_abnormal_score",valuePropName:"checked",children:(0,G.jsx)(L.Z,{disabled:Ze("is_open_abnormal_score"),children:(0,G.jsx)("span",{className:"font16",children:"学生匿评分差超过"})})})}),(0,G.jsx)(b.Z,{children:(0,G.jsx)(O.Z.Item,{name:"abnormal_score",children:(0,G.jsx)(D.Z,{disabled:Ze("student_comment"),min:1,max:100,style:{width:84}})})}),(0,G.jsxs)(b.Z,{children:[" ",(0,G.jsxs)("span",{style:{lineHeight:"30px",fontSize:"16px"},className:"ml10",children:["分计入",pe?"匿评评分异常列表":(0,G.jsx)("span",{style:{color:"#3061d0",cursor:"pointer"},onClick:function(){null!=S&&S.anonymous_comment?window.open("/classrooms/".concat(null==N?void 0:N.coursesId,"/group_homework/").concat(null==N?void 0:N.categoryId,"/detail?TabsActiveKey=2&tabs=10")):x.ZP.warning("保存启用设置后,点击该按钮即可跳转至匿评评分异常列表")},children:"匿评评分异常列表"})]}),(0,G.jsx)(g.Z,{title:"开启后若学生匿评分差值超过设置分数该条评分将计入匿评评分异常列表。此外不论是否开启该功能若学生匿评得分不超过60分也将自动计入该异常列表",children:(0,G.jsx)("i",{className:"iconfont icon-tishixiaowenhao font14 current c-grey-999 current-primary ml5"})})]})]}),ie&&(0,G.jsx)(O.Z.Item,{className:"mt30",name:"student_comment",valuePropName:"checked",children:(0,G.jsx)(L.Z,{disabled:Ze("student_comment"),children:(0,G.jsxs)(w.Z,{wrap:!1,align:"middle",gutter:10,children:[(0,G.jsx)(b.Z,{children:(0,G.jsx)("span",{className:"font16",children:"匿评计入已评阅"})}),(0,G.jsx)(b.Z,{children:(0,G.jsx)("span",{className:"c-grey-999",children:"(学生相互匿评的数据,在作品列表中计入已评阅)"})})]})})}),(0,G.jsxs)(w.Z,{className:"mt30",wrap:!1,align:"middle",gutter:10,children:[(0,G.jsx)(b.Z,{children:(0,G.jsx)(O.Z.Item,{name:"anonymous_appeal",valuePropName:"checked",children:(0,G.jsx)(L.Z,{disabled:Ze("anonymous_appeal"),children:(0,G.jsx)("span",{className:"font16",children:"启用匿评申诉"})})})}),(0,G.jsx)(b.Z,{children:(0,G.jsx)("a",{onClick:function(){ke("anonymous_appeal")},children:"规则说明"})})]}),le&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(w.Z,{className:"mt20",wrap:!1,align:"middle",gutter:10,style:{position:"relative"},children:[(0,G.jsx)(b.Z,{flex:"90px",style:{textAlign:"end"},children:"申诉方式"}),(0,G.jsx)(b.Z,{children:(0,G.jsx)(O.Z.Item,{className:"ml10",name:"unified_anonymous_appeal",rules:[{required:!0,message:"请选择申诉方式"}],children:(0,G.jsxs)(A.ZP.Group,{disabled:Ze("unified_anonymous_appeal"),children:[(0,G.jsx)(A.ZP,{value:!0,children:"统一申诉"}),(null==S||null===(f=S.group_settings)||void 0===f?void 0:f.length)>0&&(0,G.jsx)(A.ZP,{value:!1,children:"分班申诉"})]})})}),(!1===$||!1===q||0==ie)&&(0,G.jsx)(g.Z,{title:ke("unified_anonymous_appeal"),placement:"topLeft",children:(0,G.jsx)("div",{style:{width:"calc(100% - 95px)",height:"100%",position:"absolute",top:0,left:"95px"}})})]}),oe?(0,G.jsxs)(w.Z,{className:"mt20",wrap:!1,align:"top",gutter:10,style:{lineHeight:"30px"},children:[(0,G.jsx)(b.Z,{flex:"120px",style:{textAlign:"end"},children:"违规匿评扣分"}),(0,G.jsx)(b.Z,{children:(0,G.jsx)(O.Z.Item,{name:"appeal_penalty",rules:[{required:!0,message:"请输入违规匿评扣分"}],children:(0,G.jsx)(D.Z,{min:1,max:100,disabled:Ze("appeal_penalty")})})}),(0,G.jsx)(b.Z,{children:"分"}),(0,G.jsx)(b.Z,{children:(0,G.jsx)("span",{className:"c-grey-999",children:"学生违规匿评TA人作品时其成绩将被扣减的分值"})})]}):(0,G.jsx)(O.Z.List,{name:"anonymous_appeal_settings",children:function(e,n){var t=n.add,s=n.remove;return e.map((function(n,i){var a;return(0,G.jsxs)("div",{className:"mt20",children:[(0,G.jsxs)(w.Z,{wrap:!1,align:"middle",gutter:14,children:[(0,G.jsx)(b.Z,{flex:"25px",children:(0,G.jsx)("div",{style:{height:8,width:8,background:"#C1C5CE",borderRadius:"50%"}})}),(0,G.jsxs)(b.Z,{children:["申诉规则",i+1]})]}),(0,G.jsxs)(w.Z,{className:"mt15",wrap:!1,align:"top",justify:"space-between",style:{lineHeight:"32px"},children:[(0,G.jsx)(b.Z,{children:(0,G.jsx)("span",{className:"ml25",children:"班级"})}),(0,G.jsx)(b.Z,{children:(0,G.jsx)(O.Z.Item,{className:"ml10",name:[n.name,"group_name"],rules:[{required:!0,message:"请选择班级"}],children:(0,G.jsx)(F.default,{disabled:Ze(["anonymous_appeal_settings","group_name"],null==ue?void 0:ue[i]),placeholder:"请选择分班名称",style:{width:314},mode:"multiple",fieldNames:{label:"group_name",value:"group_name"},options:be(ie?null==S?void 0:S.group_settings:re,ue)})})}),(0,G.jsx)(b.Z,{children:(0,G.jsx)("span",{className:"ml40",children:"违规匿评扣分"})}),(0,G.jsx)(b.Z,{children:(0,G.jsx)(O.Z.Item,{className:"ml10",name:[n.name,"appeal_penalty"],rules:[{required:!0,message:"请输入违规匿评扣分"}],children:(0,G.jsx)(D.Z,{min:1,max:100,disabled:Ze(["anonymous_appeal_settings","appeal_penalty"],null==ue?void 0:ue[i])})})}),(0,G.jsx)(b.Z,{flex:1,children:(0,G.jsx)("span",{className:"ml5",children:"分"})}),!pe&&(0,G.jsx)(b.Z,{flex:1,children:(0,G.jsxs)(w.Z,{wrap:!1,align:"middle",justify:"end",children:[0!=i&&!Ze(["anonymous_appeal_settings","group_name"],null==ue?void 0:ue[i])&&(0,G.jsx)(b.Z,{children:(0,G.jsx)("i",{className:"iconfont icon-shanjian1 current",style:{color:"#E30000"},onClick:function(){s(n.name)}})}),(null===(a=be(ie?null==S?void 0:S.group_settings:re,ue))||void 0===a?void 0:a.length)>(null==e?void 0:e.length)&&(0,G.jsx)(b.Z,{children:(0,G.jsx)("i",{className:"iconfont icon-tianjiatimu ml15 current",style:{color:"#3061D0"},onClick:function(){t({is_admin:!0,appeal_penalty:2})}})})]})})]})]},n.key)}))}})]})]})]})]}),((0,P.GJ)()||!(ge||ye||je))&&(0,G.jsx)($e.t,{okText:"保存设置",loading:Y||V,onCancel:function(){x.ZP.warning("已取消本次修改的内容"),J.resetFields()},onOk:function(){J.submit()}})]})})})),rn=(0,_.connect)((function(e){return{shixunHomeworks:e.shixunHomeworks}}))((function(e){var n=e.shixunHomeworks,t=e.dispatch,s=n.workSetting;(0,p.useEffect)((function(){h()}),[]);var i=(0,_.useParams)(),a=(0,p.useState)("1"),r=m()(a,2),u=r[0],d=r[1],h=function(){var e=o()(l()().mark((function e(){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t({type:"shixunHomeworks/getWorkSetting",payload:c()({},i)});case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,G.jsx)("section",{className:[Ze.form,"mb50",Ze.configworksContainer].join(" "),children:(0,G.jsxs)(y.Z,{destroyInactiveTabPane:!0,defaultActiveKey:"1",activeKey:u,onChange:function(e){"发布设置离开"==n.actionTabs.key?j.Z.confirm({centered:!0,title:"离开此页提示",content:"系统可能不会保存您所做的更改。",okText:"离开",onOk:function(){d(e),t({type:"shixunHomeworks/setActionTabs",payload:{key:""}})}}):d(e)},children:[(0,G.jsx)(y.Z.TabPane,{tab:"发布设置",children:null!=s&&s.is_new_rule?(0,G.jsx)(ln,{}):(0,G.jsx)(Ae,{getData:h})},1),!(null!=s&&s.is_new_rule)&&(0,G.jsx)(y.Z.TabPane,{tab:"匿评设置",children:(0,G.jsx)(Xe,{})},3),(0,G.jsx)(y.Z.TabPane,{tab:"评分设置",children:(0,G.jsx)(Ee,{getData:h})},4),(0,G.jsx)(y.Z.TabPane,{tab:"公开设置",children:(0,G.jsx)(Me,{getData:h})},5),(0,G.jsx)(y.Z.TabPane,{tab:"协作设置",children:(0,G.jsx)(Pe,{})},6)]})})})),on=t(48194),un=t(89580),cn=t(15753);Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;var dn={flex_box_center:"flex_box_center___Bm9CS",flex_space_between:"flex_space_between___ZsXhA",flex_box_vertical_center:"flex_box_vertical_center___xiJ7Z",flex_box_center_end:"flex_box_center_end___WJleE",flex_box_column:"flex_box_column___x3Ypw",wrap:"wrap___rzUN_",btns:"btns___YKkXq"},mn=(0,_.connect)((function(e){return{user:e.user}}))((function(e){e.user,e.dispatch;var n=(0,_.useParams)(),t=(0,p.useState)({page:1,limit:10}),s=m()(t,2),i=s[0],a=s[1],r=(0,p.useState)([{}]),u=m()(r,2),d=u[0],h=u[1],f=(0,p.useState)(0),v=m()(f,2),y=v[0],j=v[1],b=(0,p.useState)(!0),k=m()(b,2),N=k[0],I=k[1],P=[{title:"序号",dataIndex:"index",align:"left",render:function(e,n,t){return t+1},width:70},{title:"姓名",align:"left",dataIndex:"user_name",width:100,ellipsis:!0},{title:"学号",align:"left",dataIndex:"student_id",width:110,ellipsis:!0,render:function(e){return e||"--"}},{title:"班级",align:"left",dataIndex:"course_group_name",width:110,ellipsis:!0,render:function(e){return e||"--"}},{title:"当前分组",align:"left",dataIndex:"from_course_group_name",width:110,render:function(e,n){var t;return(0,G.jsxs)("span",{children:[(0,G.jsx)("span",{children:e}),(0,G.jsx)(g.Z,{overlayClassName:dn.tip,placement:"right",title:(0,G.jsxs)(w.Z,{style:{maxHeight:200,overflow:"auto"},children:[(0,G.jsx)("div",{children:"分组成员:"}),(0,G.jsx)("div",{children:null==n||null===(t=n.from_course_group_members)||void 0===t?void 0:t.map((function(e){return(0,G.jsx)("div",{children:e})}))})]}),children:(0,G.jsx)("i",{className:"iconfont icon-xiaowenhao2 ml5 c-light-primary font14"})})]})}},{title:"申请更换分组",align:"left",dataIndex:"to_course_group_name",width:110,render:function(e,n){var t;return(0,G.jsxs)("span",{children:[(0,G.jsx)("span",{children:e}),(0,G.jsx)(g.Z,{overlayClassName:dn.tip,placement:"right",title:(0,G.jsxs)(w.Z,{style:{maxHeight:200,overflow:"auto"},children:[(0,G.jsx)("div",{children:"分组成员:"}),(0,G.jsx)("div",{children:null==n||null===(t=n.to_course_group_members)||void 0===t?void 0:t.map((function(e){return(0,G.jsx)("div",{children:e})}))})]}),children:(0,G.jsx)("i",{className:"iconfont icon-xiaowenhao2 ml5 c-light-primary font14"})})]})}},{title:"申请理由",align:"left",dataIndex:"reason"},{title:"操作",align:"right",dataIndex:"status",width:110,render:function(e,n){return(0,G.jsxs)(G.Fragment,{children:["待处理"===e&&(0,G.jsxs)("span",{className:dn.btns,children:[(0,G.jsx)("span",{onClick:function(){return S(n.id,2)},children:"拒绝"}),(0,G.jsx)("span",{className:"ml30",onClick:function(){return S(n.id,1)},children:"同意"})]}),"已同意"===e&&(0,G.jsx)("span",{style:{color:"#00B187"},children:"已同意"}),"已拒绝"===e&&(0,G.jsx)("span",{style:{color:"#E30000"},children:"已拒绝"})]})}}],S=function(){var e=o()(l()().mark((function e(t,s){var a;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return I(!0),e.next=3,(0,W.ZP)("/api/homework_commons/".concat(null==n?void 0:n.categoryId,"/deal_request"),{method:"post",body:{request_id:t,status:s}});case 3:0===(null==(a=e.sent)?void 0:a.status)&&(x.ZP.success("操作成功"),H(i)),I(!1);case 6:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}();(0,p.useEffect)((function(){H(i)}),[]);var H=function(){var e=o()(l()().mark((function e(t){var s;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return I(!0),e.next=3,(0,W.ZP)("/api/homework_commons/".concat(null==n?void 0:n.categoryId,"/get_request"),{method:"get",params:c()({},t)});case 3:0===(null==(s=e.sent)?void 0:s.status)&&(h(s.data),j(null==s?void 0:s.total_count)),I(!1);case 6:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();return(0,G.jsx)("section",{className:dn.wrap,children:(0,G.jsx)(Z.Z,{dataSource:d,bordered:!1,rowKey:function(e){return e.id},columns:P,loading:N,pagination:{pageSize:i.limit,total:y,current:i.page,onChange:function(e,n){i.page=e,i.limit=n,a(c()({},i)),H(i)},showQuickJumper:!0,hideOnSinglePage:!0}})})})),pn=t(64165),_n="modal___AejJU",hn="member___mqy9M",fn="head___TWHLt",xn="listWrap___zvWV4",vn="list___dWwg9",gn=["classroomList","dispatch","cb"],yn=(0,_.connect)((function(e){return{classroomList:e.classroomList}}))((function(e){var n,t,s,i,a,r,u,d,h=e.classroomList,f=e.dispatch,v=e.cb,g=(ye()(e,gn),(0,_.useParams)()),y=(0,p.useState)({}),b=m()(y,2),Z=b[0],N=b[1],I=(0,p.useState)(""),P=m()(I,2),S=P[0],H=P[1],O=(0,p.useState)(!0),C=m()(O,2),L=C[0],T=C[1],Y=(0,p.useState)(!1),A=m()(Y,2),D=A[0],R=A[1],E=(0,p.useState)(""),M=m()(E,2),V=M[0],z=M[1];(0,p.useEffect)((function(){"申请换组"===h.actionTabs.key&&J()}),[h.actionTabs]);var J=function(){var e=o()(l()().mark((function e(){var n,t,s=arguments;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=s.length>0&&void 0!==s[0]?s[0]:"",T(!0),e.next=4,(0,W.ZP)("/api/homework_commons/".concat(g.categoryId,"/get_group_members"),{method:"get",params:{group_id:n}});case 4:0===(null==(t=e.sent)?void 0:t.status)&&N(c()({},t)),T(!1);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),q=function(){var e=o()(l()().mark((function e(){var n;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(S){e.next=3;break}return x.ZP.warning("请选择需要更换的分组"),e.abrupt("return");case 3:if(V){e.next=6;break}return x.ZP.warning("请输入更换原因"),e.abrupt("return");case 6:return R(!0),e.next=9,(0,W.ZP)("/api/homework_commons/".concat(g.categoryId,"/create_request"),{method:"post",body:{to_course_group_id:S,reason:V}});case 9:0===(null==(n=e.sent)?void 0:n.status)&&(x.ZP.info("操作成功"),f({type:"classroomList/setActionTabs",payload:{}}),v()),R(!1);case 12:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,G.jsx)(j.Z,{width:700,centered:!0,afterClose:function(){H(""),z("")},confirmLoading:D,title:"申请更换分组",onOk:q,open:"申请换组"===h.actionTabs.key,onCancel:function(){f({type:"classroomList/setActionTabs",payload:{}})},children:(0,G.jsx)("div",{className:_n,children:(0,G.jsxs)(me.Z,{spinning:L,children:[(0,G.jsxs)(w.Z,{align:"middle",justify:"space-between",children:[(0,G.jsxs)("div",{className:"c-black",children:["你当前所在分组 ",(0,G.jsx)("b",{children:null==Z?void 0:Z.current_group})]}),(0,G.jsxs)(w.Z,{align:"middle",children:[(0,G.jsx)("div",{className:"mr15",children:"更换分组"}),(0,G.jsx)(F.default,{onChange:function(e){H(e),J(e)},value:S,size:"large",style:{width:248},children:null==Z||null===(n=Z.group_infos)||void 0===n?void 0:n.map((function(e){return(0,G.jsx)(F.default.Option,{value:e.group_id,children:e.group_name},e.group_id)}))})]})]}),(0,G.jsxs)(w.Z,{className:"mt15",children:[(0,G.jsxs)("div",{className:hn,style:{borderRight:"1px solid #D9DFE8"},children:[(0,G.jsxs)(w.Z,{className:fn,children:[(0,G.jsxs)("div",{children:[null==Z?void 0:Z.current_group,"成员"]}),(0,G.jsxs)("div",{children:["共",(0,G.jsx)("span",{className:"ml5 mr5 c-light-primary",children:null==Z||null===(t=Z.current_group_members)||void 0===t?void 0:t.length}),"人"]})]}),(0,G.jsx)(w.Z,{style:{height:"calc(100% - 34px)"},children:(0,G.jsx)("div",{className:xn,style:{borderRight:0},children:null==Z||null===(s=Z.current_group_members)||void 0===s?void 0:s.map((function(e){return(0,G.jsxs)("div",{className:vn,children:[(0,G.jsx)("img",{src:"".concat(oe.Z.IMG_SERVER,"/images/").concat(null==e?void 0:e.avatar_url)}),(0,G.jsx)("span",{children:e.real_name}),(null==e?void 0:e.is_me)&&(0,G.jsx)("div",{children:"我"})]},e.user_id)}))})})]}),(0,G.jsxs)("div",{className:hn,children:[!(null!=Z&&null!==(i=Z.group_members)&&void 0!==i&&i.length)&&(0,G.jsx)(pn.Z,{}),!(null==Z||null===(a=Z.group_members)||void 0===a||!a.length)&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(w.Z,{className:fn,children:[(0,G.jsxs)("div",{children:[null==Z||null===(r=Z.group_infos)||void 0===r||null===(r=r.find((function(e){return e.group_id===S})))||void 0===r?void 0:r.group_name,"成员"]}),(0,G.jsxs)("div",{children:["共",(0,G.jsx)("span",{className:"ml5 mr5 c-light-primary",children:null==Z||null===(u=Z.group_members)||void 0===u?void 0:u.length}),"人"]})]}),(0,G.jsx)(w.Z,{style:{height:"calc(100% - 34px)"},children:(0,G.jsx)("div",{className:xn,style:{borderLeft:0},children:null==Z||null===(d=Z.group_members)||void 0===d?void 0:d.map((function(e){return(0,G.jsxs)("div",{className:vn,children:[(0,G.jsx)("img",{src:"".concat(oe.Z.IMG_SERVER,"/images/").concat(null==e?void 0:e.avatar_url)}),(0,G.jsx)("span",{children:e.real_name})]},e.user_id)}))})})]})]})]}),(0,G.jsxs)(w.Z,{className:"mt15",children:[(0,G.jsx)("div",{className:"mr15",style:{color:"#5F6368"},children:"更换原因"}),(0,G.jsx)(k.Z.TextArea,{maxLength:300,value:V,onChange:function(e){return z(e.target.value)},style:{width:578},placeholder:"请输入换组原因",size:"large"})]})]})})})})),jn={flex_box_center:"flex_box_center___sf_sV",flex_space_between:"flex_space_between___k0joE",flex_box_vertical_center:"flex_box_vertical_center___fyum8",flex_box_center_end:"flex_box_center_end___UC5kA",flex_box_column:"flex_box_column___JCpJG",Onerow:"Onerow___OAbXd",title:"title___YZryt",export:"export___wcKFT",bg:"bg___fNXI3",tabs:"tabs___hlZi4",workListTabWrap:"workListTabWrap___sjHcT",workListTabButton:"workListTabButton___MOSGf",title_style:"title_style___mGYw9"},wn=t(26908),bn=t(2062),kn=t(78824),Zn=t(37906),Nn="TabsStyle___TanFG",In=function(){var e=o()(l()().mark((function e(n){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,W.ZP)("/api/student_works/".concat(n.userId,"/deal_appeal_score.json"),{method:"post",body:n});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),Pn=(0,_.connect)((function(e){var n=e.user,t=e.shixunHomeworks,s=e.loading,i=e.globalSetting,a=e.classroomList;return{user:n,shixunHomeworks:t,globalSetting:i,loading:s.effects,classroomList:a}}))((function(e){e.globalSetting;var n,t,s,i,a,r,u=e.shixunHomeworks,d=(e.dispatch,e.classroomList,(0,_.useParams)()),h=(0,_.useSearchParams)(),f=m()(h,1)[0],x=O.Z.useForm(),v=m()(x,1)[0],g=u.workSetting,k=(0,p.useState)(!1),N=m()(k,2),P=N[0],S=N[1],H=(0,p.useState)(null),C=m()(H,2),T=C[0],Y=C[1],A=(0,te.U)(se.cN,{homeworkId:null==d?void 0:d.categoryId}),F=m()(A,4),R=F[1],E=F[2],M=F[3],V=(0,te.U)(se.Qz,{homeworkId:null==d?void 0:d.categoryId}),W=m()(V,4),J=W[1],q=W[2],B=W[3],Q=(0,te.U)(se.mQ,{homeworkId:null==d?void 0:d.categoryId}),U=m()(Q,4),K=U[1],$=U[2],ee=U[3],ie=(0,te.U)(In,{}),ae=m()(ie,4),le=ae[2],re=(ae[3],(0,p.useState)({activeKey:"1",page:1,limit:10,status:""})),oe=m()(re,2),ue=oe[0],ce=oe[1],de=[{title:"序号",dataIndex:"id",key:"id",ellipsis:!0,width:80,render:function(e,n,t){return"".concat(((null==ue?void 0:ue.page)-1)*ue.limit+t+1)}},{title:"学生姓名",ellipsis:!0,width:180,dataIndex:"real_name",key:"real_name"},{title:"反馈问题",dataIndex:"content",ellipsis:!0,key:"content"},{title:"被反馈问题的学生",dataIndex:"unfeedback_real_name",key:"unfeedback_real_name",ellipsis:!0,width:180,render:function(e,n){return(0,G.jsx)("a",{href:"/classrooms/".concat(null==d?void 0:d.coursesId,"/group_homework/").concat(null==d?void 0:d.categoryId,"/review/").concat(null==n?void 0:n.student_work_id),target:"_blank",children:e})}},{title:"反馈问题时间",dataIndex:"created_at",key:"created_at",width:180,render:function(e){return ne()(e).format("YYYY-MM-DD HH:mm")}},{title:"操作",align:"right",dataIndex:"id",key:"id",width:80,render:function(e,n){return(0,G.jsx)("a",{href:"/classrooms/".concat(null==d?void 0:d.coursesId,"/group_homework/").concat(null==d?void 0:d.categoryId,"/review/").concat(null==n?void 0:n.student_work_id),target:"_blank",children:"查看"})}}],pe=[{title:"序号",dataIndex:"id",key:"id",ellipsis:!0,width:80,render:function(e,n,t){return"".concat(((null==ue?void 0:ue.page)-1)*ue.limit+t+1)}},{title:"姓名",ellipsis:!0,width:180,dataIndex:"real_name",key:"real_name"},{title:"作业状态",dataIndex:"status",ellipsis:!0,key:"status",render:function(e){return-1===e?"重做中":(0,G.jsx)(I.Uw,{status:e})}},{title:"被评数",dataIndex:"student_comment_count",key:"student_comment_count",ellipsis:!0,width:100},{title:"被匿评最大分差",dataIndex:"abnormal_score",key:"abnormal_score",width:180},{title:"匿评分数",dataIndex:"score",key:"score",width:180},{title:"匿评异常时间",dataIndex:"abnormal_date",key:"abnormal_date",width:180},{title:"操作",align:"right",dataIndex:"id",key:"id",width:80,render:function(e,n){return(0,G.jsx)("a",{href:"/classrooms/".concat(null==d?void 0:d.coursesId,"/group_homework/").concat(null==d?void 0:d.categoryId,"/review/").concat(null==n?void 0:n.student_work_id),target:"_blank",children:"查看"})}}],_e=[{title:"序号",dataIndex:"id",key:"id",ellipsis:!0,width:80,render:function(e,n,t){return"".concat(((null==ue?void 0:ue.page)-1)*ue.limit+t+1)}},{title:"申诉人",ellipsis:!0,dataIndex:"real_name",key:"real_name",width:150,render:function(e,n){return(0,G.jsx)("a",{href:"/classrooms/".concat(null==d?void 0:d.coursesId,"/group_homework/").concat(null==d?void 0:d.categoryId,"/review/").concat(null==n?void 0:n.student_work_id),target:"_blank",children:e})}},{title:"被申诉人",dataIndex:"unappeal_real_name",ellipsis:!0,width:150,key:"unappeal_real_name"},{title:"被申诉人评分",dataIndex:"score",key:"score",width:120,ellipsis:!0},{title:"申诉理由",dataIndex:"comment",key:"comment"},{title:"提交申诉时间",dataIndex:"created_at",key:"created_at",width:150,render:function(e){return ne()(e).format("YYYY-MM-DD HH:mm")}},{title:"操作",align:"right",dataIndex:"appeal_status",key:"appeal_status",width:150,render:function(e,n){return(0,G.jsxs)(G.Fragment,{children:[3==e&&(0,G.jsx)("span",{className:"c-grey-333",children:"已接受"}),4==e&&(0,G.jsx)("span",{className:"c-grey-333",children:"已驳回"}),1==e&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(X.op,{openLoading:!0,type:"link",style:{padding:0},danger:!0,onClick:o()(l()().mark((function e(){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,le({userId:n.student_work_id,score_id:n.student_works_score_id,status:4});case 2:0===e.sent.status&&he();case 4:case"end":return e.stop()}}),e)}))),children:"驳回"}),(0,G.jsx)(X.op,{openLoading:!0,className:"ml20",type:"link",style:{padding:0},onClick:o()(l()().mark((function e(){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Y(n),S(!0);case 2:case"end":return e.stop()}}),e)}))),children:"接受"})]})]})}}],he=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ue;"1"==ue.activeKey&&q({page:null==e?void 0:e.page,limit:null==e?void 0:e.limit}),"2"==ue.activeKey&&$({page:null==e?void 0:e.page,limit:null==e?void 0:e.limit}),"3"==ue.activeKey&&E({page:null==e?void 0:e.page,limit:null==e?void 0:e.limit,status:null==e?void 0:e.status})};return(0,p.useEffect)((function(){he(ue)}),[ue]),(0,p.useEffect)((function(){console.log("params",d,f.get("TabsActiveKey")?f.get("TabsActiveKey"):null!=g&&g.is_new_rule?"3":"1"),ce(c()(c()({},ue),{},{activeKey:f.get("TabsActiveKey")||"1"}))}),[f.get("TabsActiveKey")]),(0,G.jsx)(me.Z,{spinning:J||R||K,children:(0,G.jsxs)("section",{className:"p30",style:{background:"#fff"},children:[(0,G.jsxs)(y.Z,{destroyInactiveTabPane:!0,className:Nn,activeKey:ue.activeKey,onChange:function(e){ce(c()(c()({},ue),{},{activeKey:e,page:1,limit:10}))},children:[(0,G.jsx)(y.Z.TabPane,{tab:"问题反馈",children:(0,G.jsx)(Z.Z,{className:"mt20",locale:{emptyText:(0,G.jsx)(z.Z,{})},columns:de,dataSource:(null==B||null===(n=B.data)||void 0===n?void 0:n.list)||[],pagination:{total:(null==B||null===(t=B.data)||void 0===t?void 0:t.count)||0,onChange:function(e,n){ce(c()(c()({},ue),{},{page:e,limit:n}))},current:null==ue?void 0:ue.page,pageSize:null==ue?void 0:ue.limit,showTotal:function(e){return(0,G.jsxs)(G.Fragment,{children:["共",(0,G.jsx)("span",{className:"ml5 mr5",style:{color:"#3061d0"},children:e}),"条数据"]})}}})},"1"),(0,G.jsx)(y.Z.TabPane,{tab:"匿评评分异常",children:(0,G.jsx)(Z.Z,{className:"mt20",locale:{emptyText:(0,G.jsx)(z.Z,{})},columns:pe,dataSource:(null==ee||null===(s=ee.data)||void 0===s?void 0:s.list)||[],pagination:{total:(null==ee||null===(i=ee.data)||void 0===i?void 0:i.count)||0,onChange:function(e,n){ce(c()(c()({},ue),{},{page:e,limit:n}))},current:null==ue?void 0:ue.page,pageSize:null==ue?void 0:ue.limit,showTotal:function(e){return(0,G.jsxs)(G.Fragment,{children:["共",(0,G.jsx)("span",{className:"ml5 mr5",style:{color:"#3061d0"},children:e}),"条数据"]})}}})},"2"),(0,G.jsxs)(y.Z.TabPane,{tab:"匿评申诉",children:[(0,G.jsx)(X.qp,{title:"申诉状态",className:"mt20",value:ue.status,onChange:function(e){ce(c()(c()({},ue),{},{status:e,page:1}))},dataSource:[{id:"",name:"全部"},{id:1,name:"待审核"},{id:3,name:"接受申诉"},{id:4,name:"驳回申诉"}],titleWidth:60}),(0,G.jsx)(Z.Z,{locale:{emptyText:(0,G.jsx)(z.Z,{})},columns:_e,dataSource:(null==M||null===(a=M.data)||void 0===a?void 0:a.list)||[],pagination:{total:(null==M||null===(r=M.data)||void 0===r?void 0:r.count)||0,onChange:function(e,n){ce(c()(c()({},ue),{},{page:e,limit:n}))},current:null==ue?void 0:ue.page,pageSize:null==ue?void 0:ue.limit,showTotal:function(e){return(0,G.jsxs)(G.Fragment,{children:["共",(0,G.jsx)("span",{className:"ml5 mr5",style:{color:"#3061d0"},children:e}),"条数据"]})}}})]},"3")]}),(0,G.jsx)(j.Z,{title:"接受申诉",open:P,centered:!0,destroyOnClose:!0,onCancel:function(){S(!1)},maskClosable:!1,width:544,onOk:function(){v.submit()},children:(0,G.jsxs)(O.Z,{form:v,colon:!1,onFinish:function(){var e=o()(l()().mark((function e(n){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,le(c()(c()({},n),{},{userId:T.student_work_id,score_id:T.student_works_score_id,status:3}));case 2:0===e.sent.status&&(he(),S(!1));case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:[(0,G.jsx)("div",{style:{color:"#191919"},children:"确认是否接受申诉?一旦接受,被申诉的评分记录将作废。请您补充匿评评分:"}),(0,G.jsx)(Zn.Z,{style:{marginTop:"20px"},colon:!1,items:[{key:"1",label:"申诉人",children:(0,G.jsx)("a",{href:"/classrooms/".concat(null==d?void 0:d.coursesId,"/group_homework/").concat(null==d?void 0:d.categoryId,"/review/").concat(null==T?void 0:T.student_work_id),target:"_blank",children:null==T?void 0:T.real_name})},{key:"2",label:"被申诉人",children:(0,G.jsx)("span",{style:{color:"#191919"},children:null==T?void 0:T.unappeal_real_name})},{key:"3",label:"被申诉人评分",children:(0,G.jsx)("span",{style:{color:"#191919"},children:null==T?void 0:T.score})}]}),(0,G.jsxs)(w.Z,{className:"mt20",wrap:!1,children:[(0,G.jsx)(b.Z,{children:(0,G.jsx)(O.Z.Item,{label:"匿评分数",name:"score",rules:[{required:!0,message:"请输入分数"}],children:(0,G.jsx)(D.Z,{min:1,max:100,step:1})})}),(0,G.jsx)(b.Z,{children:(0,G.jsx)("span",{className:"ml10",style:{lineHeight:"30px"},children:"分"})}),(0,G.jsx)(b.Z,{children:(0,G.jsx)(O.Z.Item,{className:"ml20",valuePropName:"checked",name:"is_appeal_penalty",initialValue:!0,children:(0,G.jsx)(L.Z,{children:"扣除违规匿评分数"})})})]})]})})]})})})),Sn={},Hn=(0,_.connect)((function(e){var n=e.shixunHomeworks,t=e.classroomList,s=e.globalSetting;return{shixunHomeworks:n,classroomList:t,loading:e.loading.effects,globalSetting:s}}))((function(e){var n=e.shixunHomeworks,t=e.loading,s=e.globalSetting,i=e.dispatch,a=(0,p.useState)(c()(c()({},(0,_.useParams)()),{page:1,limit:20})),r=m()(a,2),u=r[0],d=(r[1],n.workList),h=n.workSetting,f=(0,p.useState)([]),x=m()(f,2),v=x[0],g=x[1],y=function(){var e=o()(l()().mark((function e(){var n;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i({type:"shixunHomeworks/getWorkList",payload:c()(c()({},u),{},{score_open:null==h?void 0:h.score_open,work_public:null==h?void 0:h.work_public})});case 2:n=e.sent,g((null==n?void 0:n.student_works)||[]);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();useEffect((function(){y()}),[]);var j=[(null==d?void 0:d.base_on_project)&&{title:"关联项目",align:"left",dataIndex:"base_on_project",width:200,render:function(e,n){var t,i,a,l,r,o;return{children:-1!==(null===(t=n.project_info)||void 0===t?void 0:t.id)?(0,G.jsx)("a",{target:"_blank",title:null===(i=n.project_info)||void 0===i?void 0:i.name,href:"".concat(null==s||null===(a=s.setting)||void 0===a?void 0:a.old_url).concat(null===(l=n.project_info)||void 0===l?void 0:l.id),style:{whiteSpace:"break-spaces"},children:null===(r=n.project_info)||void 0===r?void 0:r.name}):null===(o=n.project_info)||void 0===o?void 0:o.name,props:{rowSpan:n.rowSpan}}}},{title:"姓名",align:"left",dataIndex:"user_name",ellipsis:!0,width:150,render:function(e,n){return(0,G.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,G.jsxs)("span",{className:Sn.atitle,style:{width:n.is_leader?"":130,maxWidth:n.is_leader&&80},children:[" ",e]}),n.is_leader&&(0,G.jsx)("span",{style:{display:"inline-flex",background:"rgba(22,93,255,0.2)",width:32,height:18,borderRadius:2,color:"#3061D0",alignItems:"center",justifyContent:"center",fontSize:10,marginLeft:10},children:"组长"})]})}},{title:"学号",align:"left",dataIndex:"student_id",sortDirections:["descend","ascend"],width:80,ellipsis:!0,sorter:null==d||!d.base_on_project,render:function(e){return(0,G.jsx)("span",{style:{color:"#666666"},children:e})}},(null==d?void 0:d.base_on_project)&&{title:"代码行数",align:"left",dataIndex:"code_lines_count",render:function(e){return e||"--"}},(null==d?void 0:d.base_on_project)&&{title:"issue数量",align:"left",dataIndex:"issues_count",render:function(e,n){return e||"--"}},(null==d?void 0:d.base_on_project)&&{title:"更新时间",align:"left",dataIndex:"update_time",width:140,render:function(e,n){return{children:e?(0,G.jsxs)("span",{style:{display:"block",alignItems:"center"},children:["更新代码",(0,G.jsx)("br",{}),ne()(e).format("YYYY-MM-DD HH:mm")]}):"--",props:{rowSpan:n.rowSpan}}}},{title:"作品状态",dataIndex:"work_status",align:"left",render:function(e,n){return{children:-1===e?"重做中":(0,G.jsx)(I.Uw,{status:e}),props:{rowSpan:n.rowSpan}}}},!(null!=d&&d.base_on_project)&&{title:"分组",align:"left",dataIndex:"work_group",width:70,render:function(e,n){return{children:(0,G.jsx)("span",{className:"c-blue",children:e}),props:{rowSpan:n.rowSpan}}}},{title:"操作",width:null!=d&&d.base_on_project?100:150,align:"left",dataInex:"action",render:function(e,n){return null!=d&&d.work_public?(0,G.jsx)("a",{className:"c-blue",onClick:function(e){e.preventDefault(),_.history.push("/classrooms/".concat(u.coursesId,"/group_homework/").concat(u.categoryId,"/review/").concat(n.id))},children:" 查看 "}):"--"}}].filter((function(e){return!!e}));return(0,G.jsxs)("div",{className:"p30 bg-white",children:[(0,G.jsx)("aside",{style:{paddingBottom:30},children:(0,G.jsx)(Z.Z,{loading:t["shixunHomeworks/getWorkList"],rowKey:"id",bordered:!0,rowClassName:function(e,n){return(null==e?void 0:e.item_index)%2==0&&Sn.tables},className:Sn.tableWrapper,hideOnSinglePage:!0,pagination:!1,dataSource:v,columns:j,onChange:function(e,n,t){if(void 0===t.order)if("student_id"===t.field)u.b_order="desc",u.order=t.field;else delete u.b_order,delete u.order;else u.b_order=t.order.replace("end",""),u.order=t.field;i({type:"shixunHomeworks/getWorkList",payload:c()({},u)})}})}),(0,G.jsx)(Y.Z,{showSizeChanger:!1,style:{paddingBottom:30},hideOnSinglePage:!0,onChange:function(e,n){u.page=e,u.limit=20,y()},defaultCurrent:u.page||1,current:u.page||1,defaultPageSize:20,total:n.workList.work_count})]})})),On=(0,_.connect)((function(e){var n=e.user,t=e.shixunHomeworks,s=e.loading,i=e.globalSetting,a=e.classroomList;return{user:n,shixunHomeworks:t,globalSetting:i,loading:s.effects,classroomList:a}}))((function(e){var n,t,s,a,r,u,d,S,H=e.shixunHomeworks,O=e.classroomList,C=e.globalSetting,L=e.dispatch,T=e.user,Y=(0,p.useState)(c()({},(0,_.useParams)())),A=m()(Y,2),D=A[0],F=A[1],R=(0,_.useSearchParams)(),E=m()(R,1)[0],M=((0,_.useLocation)(),(0,p.useState)(E.get("tabs")||"0")),V=m()(M,2),z=V[0],J=V[1],q=(0,p.useState)(!1),B=m()(q,2),Q=B[0],U=B[1],K=(0,p.useState)(1),X=m()(K,2),ee=X[0],ne=X[1],ie=(0,p.useRef)(null),ae=H.workList,le=H.workSetting,oe=(0,p.useState)(!1),ue=m()(oe,2),ce=ue[0],de=ue[1],me=(0,p.useState)([]),pe=m()(me,2),_e=pe[0],he=pe[1],ge=(0,p.useState)([]),ye=m()(ge,2),je=ye[0],we=ye[1],Ze=(0,p.useState)(!1),Ne=m()(Ze,2),Ie=Ne[0],Pe=Ne[1],Se=(0,p.useState)(!1),He=m()(Se,2),Oe=He[0],Ce=He[1],Le=(0,te.U)(se.Gw,{homeworkId:null==ae?void 0:ae.id});m()(Le,3)[2];E.get("category_id")&&F(c()(c()({},D),{},{category:E.get("category_id")})),(0,p.useEffect)((function(){Xe()}),[D.coursesId]),(0,p.useEffect)((function(){L({type:"classroomList/getAssistantPermissions",payload:{course_id:D.coursesId}})}),[(0,P.bg)()]);var Te,Ye,Ae,De,Fe,Re,Ee,Me,Ve,We,ze,Ge,Je,qe,Be,Qe,Ue,Ke,Xe=function(){L({type:"shixunHomeworks/getWorkList",payload:c()({},D)})},$e=[{name:(0,P.GJ)()?"作业列表":"作品列表",id:0,component:(0,G.jsx)(re,{zip:ie,btnLoading:Q,setBtnLoading:U})},((0,P.dE)()||(null==ae?void 0:ae.can_public_work))&&{name:"公开作品",id:"11",component:(0,G.jsx)(Hn,{})},{name:"作业描述",id:1,component:(0,G.jsx)("div",{className:"minH500",children:(0,G.jsx)(fe,{})})},{name:"分组调整申请",id:6,component:(0,G.jsx)(mn,{})},{name:"参考答案",id:2,component:(0,G.jsx)(xe,{})},(0,P.G5)()&&(null==le?void 0:le.anonymous_comment)&&{name:(0,G.jsx)(h.Z,{dot:null==ae?void 0:ae.appeal_notice,offset:[5,-5],children:(0,G.jsx)("span",{style:{color:"10"==z?"":"#b9b8b8"},children:"匿评详情"})}),id:"10",component:(0,G.jsx)(Pn,{})},{name:(0,P.GJ)()?"设置":"得分规则",id:3,component:null!=ae&&null!==(n=ae.homework_status)&&void 0!==n&&n.includes("导入")?(0,G.jsx)(wn.Z,{}):(0,G.jsx)(rn,{}),forceRender:!0}].filter((function(e){return null!=ae&&ae.view_answer?e:"参考答案"!==(null==e?void 0:e.name)})).filter((function(e){return null!=ae&&ae.is_show_request?e:"分组调整申请"!==(null==e?void 0:e.name)})).filter((function(e){return(0,P.G5)()?e:"学生分组"!==(null==e?void 0:e.name)})).filter((function(e){var n;return null!=ae&&null!==(n=ae.homework_status)&&void 0!==n&&n.includes("导入")?(0,P.dE)()?[0,1].includes(null==e?void 0:e.id):[0,1,3].includes(null==e?void 0:e.id):e}));return(0,G.jsxs)("section",{className:jn.bg,children:[(0,G.jsxs)("div",{className:"edu-container",children:[ae.homework_name&&(0,G.jsxs)("section",{className:"animated fadeIn",children:[(0,G.jsx)("aside",{className:"mt10",children:ae.category&&(0,G.jsxs)(v.Z,{separator:">",children:[(0,G.jsx)(v.Z.Item,{children:(0,G.jsx)(_.Link,{to:"/classrooms/".concat(ae.course_id,"/group_homework"),children:ae.course_name})}),(0,G.jsx)(v.Z.Item,{children:(0,G.jsx)(_.Link,{to:"/classrooms/".concat(null==ae?void 0:ae.course_id,"/group_homework/").concat(null!=ae&&null!==(t=ae.category)&&void 0!==t&&t.main?"":null==ae||null===(s=ae.category)||void 0===s?void 0:s.category_id),children:ae.category.category_name})}),(0,G.jsx)(v.Z.Item,{children:"作业详情"})]})}),(0,G.jsxs)("aside",{className:[jn.title,"mt20"].join(" "),children:[(0,G.jsx)(_.Link,{to:"/classrooms/".concat(ae.course_id,"/group_homework"),children:(0,G.jsx)(N.Z,{className:"font16 c-black"})}),(0,G.jsx)(g.Z,{placement:"topLeft",title:ae.homework_name,children:(0,G.jsx)("strong",{className:[jn.title_style,"font20 ml5"].join(" "),children:ae.homework_name})}),(0,G.jsx)(I.VV,{status:null==ae?void 0:ae.homework_status})]})]}),(0,G.jsx)("aside",{className:"mt30 relative ".concat(jn.workListTabWrap),children:(0,G.jsx)(y.Z,{type:"card",activeKey:z,tabBarExtraContent:null!==(a=ae.homework_status)&&void 0!==a&&a.includes("导入")&&(0,P.GJ)()?(0,G.jsx)(f.ZP,{icon:(0,G.jsx)("span",{className:"iconfont icon-shixun3 translateY1"}),onClick:function(){L({type:"classroomList/setActionTabs",payload:{key:"补充成绩",name:null==ae?void 0:ae.homework_name,id:null==ae?void 0:ae.homework_id,type:"group"}})},type:"primary",children:"补充成绩"}):(0,G.jsxs)("div",{className:jn.workListTabButton,children:[(0,P.GJ)()&&(0,G.jsxs)(G.Fragment,{children:[((null===(Te=ae.homework_status)||void 0===Te?void 0:Te.includes("未发布"))||(null===(Ye=ae.homework_status)||void 0===Ye?void 0:Ye.includes("未开始")))&&(0,G.jsx)(f.ZP,{type:"primary",icon:(0,G.jsx)("i",{className:"iconfont icon-yishezhifabushijian1"}),onClick:function(e){e.preventDefault(),L({type:"classroomList/setActionTabs",payload:{key:"立即发布",selectArrs:[D.categoryId],selectArrsAll:[ae],params:c()(c()({},D),{},{id:D.coursesId}),type:2,manage_all_group:null==le?void 0:le.manage_all_group,detail:"更新"}})},children:"立即发布"}),!(null!==(Ae=ae.homework_status)&&void 0!==Ae&&Ae.includes("未发布"))&&!(null!==(De=ae.homework_status)&&void 0!==De&&De.includes("未开始"))&&!(null!==(Fe=ae.homework_status)&&void 0!==Fe&&Fe.includes("已截止"))&&(0,G.jsx)(f.ZP,{type:"primary",icon:(0,G.jsx)("i",{className:"iconfont icon-jiezhishiyan"}),onClick:function(e){var n;!(0,P.Rm)()||null!=O&&null!==(n=O.AssistantObject)&&void 0!==n&&null!==(n=n.group)&&void 0!==n&&n.can_stop?(e.preventDefault(),L({type:"classroomList/setActionTabs",payload:{key:"立即截止",selectArrs:[D.categoryId],selectArrsAll:[],params:c()(c()({},D),{},{id:D.coursesId}),type:2}})):x.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能")},children:"立即截止"}),(0,P.j5)()&&(0,G.jsx)(f.ZP,{type:"primary",icon:(0,G.jsx)("img",{style:{transform:"translate(-3px, -1px)"},src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMCAwaDE0djE0SDB6Ii8+PGcgc3Ryb2tlPSIjRkZGIj48cGF0aCBkPSJNMS41IDUuNjg1aDd2N2gtN3oiLz48cGF0aCBkPSJNMyA0Ljc4N1YzLjg3bDcuNDI1LjA0OXY2LjgxNmgtLjk0MyIvPjxwYXRoIGQ9Ik01IDIuOTE3VjJsNy40MjUuMDV2Ni42ODVoLS45NDMiLz48L2c+PC9nPjwvc3ZnPg=="}),onClick:function(){L({type:"classroomList/setActionTabs",payload:{key:"智能分组",params:c()(c()({},D),{},{id:D.coursesId})}})},children:"智能分组"}),(0,G.jsx)(f.ZP,{type:"primary",icon:(0,G.jsx)("i",{className:"iconfont icon-bianji2"}),onClick:function(){var e;!(0,P.Rm)()||null!=O&&null!==(e=O.AssistantObject)&&void 0!==e&&null!==(e=e.group)&&void 0!==e&&e.can_create?_.history.push("/classrooms/".concat(D.coursesId,"/group_homework/").concat(D.categoryId,"/edit")):x.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能")},children:"编辑作业"})]}),(null==ae||null===(Re=ae.work_statuses)||void 0===Re?void 0:Re.includes("取消关联"))&&(0,G.jsx)(f.ZP,{type:"primary",onClick:o()(l()().mark((function e(){var n;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,se.rN)({homeworkId:D.categoryId});case 2:0===(null==(n=e.sent)?void 0:n.status)&&(x.ZP.success("取消关联成功"),L({type:"shixunHomeworks/getWorkList",payload:c()({},D)}));case 4:case"end":return e.stop()}}),e)}))),children:"取消关联"}),(null==ae||null===(Ee=ae.work_statuses)||void 0===Ee?void 0:Ee.includes("关联项目"))&&(0,G.jsx)(f.ZP,{type:"primary",onClick:function(){var e;return(0,I.xg)("".concat(null==C||null===(e=C.setting)||void 0===e?void 0:e.old_url,"/projects/deposit/new"))},children:"创建项目"}),(null==ae||null===(Me=ae.work_statuses)||void 0===Me?void 0:Me.includes("关联项目"))&&(0,G.jsx)(f.ZP,{type:"primary",onClick:function(e){e.preventDefault(),L({type:"classroomList/setActionTabs",payload:{key:"关联项目",params:D,selectArrs:{homework_id:D.categoryId},cb:function(){L({type:"shixunHomeworks/getWorkList",payload:c()({},D)})}}})},children:"关联项目"}),(null==ae||null===(Ve=ae.work_statuses)||void 0===Ve?void 0:Ve.includes("提交作品"))&&(0,G.jsx)(f.ZP,{type:"primary",onClick:function(){return(0,I.xg)("/classrooms/".concat(ae.course_id,"/group_homework/").concat(ae.homework_id,"/post"))},children:"提交作品"}),(null==ae||null===(We=ae.work_statuses)||void 0===We?void 0:We.includes("创建分组"))&&(0,G.jsx)(f.ZP,{type:"primary",onClick:o()(l()().mark((function e(){var n,t;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,W.ZP)("/api/homework_commons/".concat(ae.homework_id,"/get_member_list.json"),{method:"get",params:{}});case 2:0===(null==(n=e.sent)?void 0:n.status)&&(de(!0),he(null==n?void 0:n.data),we(null==n||null===(t=n.data)||void 0===t?void 0:t.filter((function(e){var n;return(null==e?void 0:e.user_id)===(null==T||null===(n=T.userInfo)||void 0===n?void 0:n.user_id)}))));case 4:case"end":return e.stop()}}),e)}))),children:"创建分组"}),(null==ae||null===(ze=ae.work_statuses)||void 0===ze?void 0:ze.includes("加入分组"))&&(0,G.jsx)(f.ZP,{type:"primary",onClick:(0,$.throttle)(o()(l()().mark((function e(){var n,t;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,W.ZP)("/api/homework_commons/".concat(ae.homework_id,"/get_group_list.json"),{method:"get"});case 2:if(0!==(null==(n=e.sent)?void 0:n.status)){e.next=9;break}if(!((null==n||null===(t=n.data)||void 0===t?void 0:t.length)<=0)){e.next=7;break}return x.ZP.info("暂无分组"),e.abrupt("return");case 7:Pe(!0),Ce(null==n?void 0:n.data);case 9:case"end":return e.stop()}}),e)}))),300),children:"加入分组"}),(null==ae||null===(Ge=ae.work_statuses)||void 0===Ge?void 0:Ge.includes("更换项目"))&&(0,G.jsx)(f.ZP,{type:"primary",onClick:function(){L({type:"classroomList/setActionTabs",payload:{key:"更换项目",params:D,selectArrs:{homework_id:null==ae?void 0:ae.id},cb:function(){L({type:"shixunHomeworks/getWorkList",payload:c()({},D)})}}})},children:"更换项目"}),(null==ae||null===(Je=ae.work_statuses)||void 0===Je?void 0:Je.includes("申请换组"))&&(0,G.jsx)(f.ZP,{type:"primary",onClick:function(){L({type:"classroomList/setActionTabs",payload:{key:"申请换组",params:D}})},children:"申请换组"}),(null==ae||null===(qe=ae.work_statuses)||void 0===qe?void 0:qe.includes("修改作品"))&&(0,G.jsx)(f.ZP,{type:"primary",onClick:function(){null==le||!le.can_submit||null!=le&&le.submit_size?(0,I.xg)("/classrooms/".concat(ae.course_id,"/group_homework/").concat(ae.homework_id,"/").concat(ae.id,"/edit")):x.ZP.warning("您的作品提交机会已用完。如需继续修改,请联系指导老师或平台运营。")},children:"修改作品"}),(null==ae||null===(Be=ae.work_statuses)||void 0===Be?void 0:Be.includes("补交作品"))&&(0,G.jsx)(f.ZP,{type:"primary",onClick:function(){return(0,I.xg)("/classrooms/".concat(ae.course_id,"/group_homework/").concat(ae.homework_id,"/post"))},children:"补交作品"}),((null==ae||null===(Qe=ae.work_statuses)||void 0===Qe?void 0:Qe.includes("补交附件"))||(null==ae||null===(Ue=ae.work_statuses)||void 0===Ue?void 0:Ue.includes("修改附件")))&&(0,G.jsx)(f.ZP,{type:"primary",onClick:function(){null==le||!le.can_submit||null!=le&&le.submit_size?L({type:"classroomList/setActionTabs",payload:{key:"补交附件",params:D,selectArrs:c()({},ae)}}):x.ZP.warning("您的作品提交机会已用完。如需继续修改,请联系指导老师或平台运营。")},children:null!=ae&&null!==(Ke=ae.work_statuses)&&void 0!==Ke&&Ke.includes("修改附件")?"修改附件":"补交附件"})]}),onTabClick:function(e,n){var t=function(){if(2===parseInt(e)){if(null==ae||!ae.view_answer)return void x.ZP.info("本次作业老师未公开答案");(null==ae?void 0:ae.time_status)>2||(0,P.Gg)()?J(e):x.ZP.info("截止之后的试卷才能查看答案")}else J(e)};"11"!==e&&Xe(),"发布设置离开"==H.actionTabs.key?j.Z.confirm({centered:!0,title:"离开此页提示",content:"系统可能不会保存您所做的更改。",okText:"离开",onOk:function(){t(),L({type:"shixunHomeworks/setActionTabs",payload:{key:""}})}}):t()},className:jn.tabs,items:$e.map((function(e){return{label:e.name,key:"".concat(e.id),children:e.component,forceRender:e.forceRender}}))})})]}),(0,G.jsx)(un.Z,{}),(0,G.jsx)(j.Z,{title:"创建分组",open:ce,width:800,onCancel:function(){de(!1),we([])},onOk:o()(l()().mark((function e(){var n,t,s;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!((null==ae||null===(n=ae.group_data)||void 0===n?void 0:n.max_num)<(null==je?void 0:je.length))){e.next=3;break}return x.ZP.error("人数不能超过".concat(null==ae||null===(t=ae.group_data)||void 0===t?void 0:t.max_num)),e.abrupt("return");case 3:return e.next=5,(0,W.ZP)("/api/homework_commons/".concat(ae.homework_id,"/create_group.json"),{method:"post",body:{user_id:null==je?void 0:je.map((function(e){return e.user_id}))}});case 5:0===(null==(s=e.sent)?void 0:s.status)&&(x.ZP.info("创建成功"),Xe(),de(!1));case 7:case"end":return e.stop()}}),e)}))),children:(0,G.jsxs)("div",{children:[(0,G.jsxs)(w.Z,{style:{marginBottom:10},children:[(0,G.jsxs)(b.Z,{span:12,children:["组员数量要求:",null==ae||null===(r=ae.group_data)||void 0===r?void 0:r.min_num,"~",null==ae||null===(u=ae.group_data)||void 0===u?void 0:u.max_num,"人"]}),(0,G.jsx)(b.Z,{span:12,children:(0,G.jsx)(k.Z.Search,{placeholder:"请输入姓名或学号搜索",onSearch:function(){var e=o()(l()().mark((function e(n){var t;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,W.ZP)("/api/homework_commons/".concat(ae.homework_id,"/get_member_list.json"),{method:"get",params:{keyword:n}});case 2:0===(null==(t=e.sent)?void 0:t.status)&&he(null==t?void 0:t.data);case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}()})})]}),(0,G.jsx)(Z.Z,{dataSource:_e,pagination:!1,rowKey:function(e){return e.user_id},style:{border:"1px solid #F6F7F9",minWidth:550},rowSelection:{type:"checkbox",getCheckboxProps:function(e){return{disabled:(null==e?void 0:e.user_id)===T.userInfo.user_id}},selectedRowKeys:null==je?void 0:je.map((function(e){return e.user_id})),onChange:function(e,n,t){we(i()(n))}},scroll:{y:400},columns:[{title:"姓名",dataIndex:"name",key:"name"},{title:"分班",dataIndex:"course_group_name",key:"course_group_name"},{title:"学号",dataIndex:"student_id",key:"student_id"}]})]})}),(0,G.jsx)(j.Z,{title:"加入分组",open:Ie,width:800,onCancel:function(){Pe(!1)},footer:!1,children:(0,G.jsxs)("div",{children:[(0,G.jsxs)(w.Z,{style:{marginBottom:10},children:[(0,G.jsxs)(b.Z,{span:12,children:["组员数量要求:",null==ae||null===(d=ae.group_data)||void 0===d?void 0:d.min_num,"~",null==ae||null===(S=ae.group_data)||void 0===S?void 0:S.max_num,"人"]}),(0,G.jsx)(b.Z,{span:12,children:(0,G.jsx)(k.Z.Search,{placeholder:"请输入队长名称",onSearch:function(){var e=o()(l()().mark((function e(n){var t;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,W.ZP)("/api/homework_commons/".concat(ae.homework_id,"/get_group_list.json"),{method:"get",params:{keyword:n}});case 2:0===(null==(t=e.sent)?void 0:t.status)&&Ce(null==t?void 0:t.data);case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}()})})]}),(0,G.jsx)(Z.Z,{dataSource:Oe,pagination:!1,rowKey:function(e){return e.user_id},style:{border:"1px solid #F6F7F9",minWidth:550},scroll:{y:400},columns:[{title:"组名",dataIndex:"group_name",key:"group_name"},{title:"队长",dataIndex:"leader_name",key:"leader_name"},{title:"成员数",dataIndex:"user_list",key:"user_list"},{title:"操作",dataIndex:"group_id",key:"group_id",render:function(e,n){return(0,G.jsx)(f.ZP,{disabled:null==n?void 0:n.can_join,onClick:o()(l()().mark((function n(){var t;return l()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,W.ZP)("/api/homework_commons/".concat(ae.homework_id,"/join_group.json"),{method:"post",body:{group_id:e}});case 2:0===(null==(t=n.sent)?void 0:t.status)&&(x.ZP.info("加入成功"),Xe(),Pe(!1));case 4:case"end":return n.stop()}}),n)}))),children:null!=n&&n.can_join?"已满":"加入"})}}]})]})}),(0,G.jsx)(on.Z,{}),(0,G.jsx)(bn.Z,{onOk:function(){Xe()}}),(0,G.jsx)(kn.Z,{onOk:function(){Xe()}}),(0,G.jsx)(ve.Z,{type:"edit",onCallback:function(){return Xe()},courseEndTime:null==ae?void 0:ae.course_end_date}),(0,G.jsx)(ke.Z,{courseEndTime:null==ae?void 0:ae.course_end_date,successCallback:function(){return Xe()},visible:"立即截止"===O.actionTabs.key,homeworkIds:[D.categoryId],courseId:D.coursesId,isBatch:!1}),(0,G.jsx)(be,{cb:function(){ne(ee+1),J("0"),Xe()}}),(0,G.jsx)(yn,{cb:function(){}}),(0,G.jsx)(cn.Z,{ref:ie,hide:!0,name:"".concat(null==ae?void 0:ae.homework_name,"-作品附件"),onOk:function(){return U(!1)}})]})}))},78824:function(e,n,t){var s=t(82242),i=t.n(s),a=t(85573),l=t.n(a),r=t(7557),o=t.n(r),u=t(41498),c=t.n(u),d=t(79800),m=t.n(d),p=t(59301),_=t(46651),h=t(78241),f=t(43418),x=t(94001),v=t(75102),g=t(10032),y=t(99232),j=t.n(y),w=t(11298),b=t(37712);_.Z.Dragger;n.Z=(0,v.connect)((function(e){return{classroomList:e.classroomList}}))((function(e){var n,t=e.classroomList,s=e.dispatch,a=e.onOk,r=(0,v.useParams)(),u=h.Z.useForm(),d=m()(u,1)[0],_=(0,p.useState)(),y=m()(_,2),k=(y[0],y[1]),Z=(0,p.useState)(!1),N=m()(Z,2),I=N[0],P=N[1];n=c()(o()().mark((function e(n){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return k(n),e.abrupt("return",!1);case 2:case"end":return e.stop()}}),e)})));return(0,p.useEffect)((function(){d.setFieldsValue(l()(l()({},"publish_time",j()(j()(new Date).add(0,"days").format("YYYY-MM-DD HH:mm"))),"end_time",j()(j()(new Date((0,w.qd)("/"))).add(7,"days").format("YYYY-MM-DD HH:mm"))))}),[]),(0,b.jsx)(f.Z,{centered:!0,title:"修改成绩",open:"修改成绩"===t.actionTabs.key,okText:"确定",width:600,cancelText:"取消",okButtonProps:{loading:I},onOk:c()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:d.submit();case 1:case"end":return e.stop()}}),e)}))),onCancel:function(){d.resetFields(),s({type:"classroomList/setActionTabs",payload:{}})},children:(0,b.jsx)(h.Z,{form:d,onFinish:function(){var e=c()(o()().mark((function e(n){var l,u,c;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("---",t.actionTabs,n,r),c="exercise"===(null==t||null===(l=t.actionTabs)||void 0===l?void 0:l.type)?"/api/exercises/".concat(null==r?void 0:r.category,"/exercise_user/edit_score.json"):"/api/student_works/".concat(t.actionTabs.id,"/edit_score.json"),P(!0),e.next=5,(0,g.ZP)(c,{method:"post",body:i()(i()({},n),{},{exercise_user_id:"exercise"===(null==t||null===(u=t.actionTabs)||void 0===u?void 0:u.type)?t.actionTabs.id:""})});case 5:e.sent,P(!1),d.resetFields(),s({type:"classroomList/setActionTabs",payload:{}}),a();case 10:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:(0,b.jsx)(h.Z.Item,{label:"最终成绩",style:{marginBottom:0},name:"score",rules:[{required:!0,message:"请输入最终成绩"}],children:(0,b.jsx)(x.Z,{min:0,style:{width:"100%"}})})})})}))},26908:function(e,n,t){var s=t(85573),i=t.n(s),a=t(7557),l=t.n(a),r=t(41498),o=t.n(r),u=t(79800),c=t.n(u),d=t(70236),m=t.n(d),p=t(59301),_=t(46651),h=t(78241),f=t(3113),x=t(95237),v=t(81327),g=t(84291),y=t(75102),j=t(99232),w=t.n(j),b=t(11982),k=t(10032),Z=t(37712);_.Z.Dragger;n.Z=(0,y.connect)((function(e){return{classroomList:e.classroomList}}))((function(e){m()(e);var n=(0,y.useParams)(),t=h.Z.useForm(),s=c()(t,1)[0],a=(0,p.useState)(!0),r=c()(a,2),u=r[0],d=r[1],_=(0,p.useState)(!1),j=c()(_,2),N=j[0],I=j[1];function P(){return(P=o()(l()().mark((function e(){var t,a,r,o;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=window.location.href.indexOf("exercise")>-1?"/api/exercises/".concat(null==n?void 0:n.categoryId,"/get_time_setting.json"):"/api/homework_commons/".concat(null==n?void 0:n.categoryId,"/get_time_setting.json"),e.next=3,(0,k.ZP)(t,{method:"get"});case 3:0===(null==(a=e.sent)?void 0:a.status)&&s.setFieldsValue(i()(i()({},"publish_time",w()(w()(null==a||null===(r=a.data)||void 0===r?void 0:r.publish_time).format("YYYY-MM-DD HH:mm"))),"end_time",w()(w()(null==a||null===(o=a.data)||void 0===o?void 0:o.end_time).format("YYYY-MM-DD HH:mm"))));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return console.log("----",n),(0,p.useEffect)((function(){!function(){P.apply(this,arguments)}()}),[]),(0,Z.jsxs)("div",{style:{padding:"50px 30px",background:"#fff"},children:[(0,Z.jsxs)("div",{style:{textAlign:"end"},children:[u&&(0,Z.jsx)(f.ZP,{onClick:function(){d(!1)},children:"编辑设置"}),!u&&(0,Z.jsxs)("div",{children:[(0,Z.jsx)(f.ZP,{type:"primary",loading:N,onClick:function(){s.submit()},children:"提交"}),(0,Z.jsx)(f.ZP,{style:{marginLeft:20},onClick:function(){d(!0)},children:"取消"})]})]}),(0,Z.jsxs)(h.Z,{form:s,disabled:u,onFinish:function(){var e=o()(l()().mark((function e(t){var s,i;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return I(!0),console.log("---",window.location.href),s=window.location.href.indexOf("exercise")>-1?"/api/exercises/".concat(null==n?void 0:n.categoryId,"/time_setting.json"):"/api/homework_commons/".concat(null==n?void 0:n.categoryId,"/time_setting.json"),e.next=5,(0,k.ZP)(s,{method:"post",body:{publish_time:w()(t.publish_time).format("YYYY-MM-DD HH:mm"),end_time:w()(t.end_time).format("YYYY-MM-DD HH:mm")}});case 5:i=e.sent,I(!1),0===(null==i?void 0:i.status)&&d(!0);case 8:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),children:[(0,Z.jsx)(x.Z,{children:(0,Z.jsxs)(v.Z,{children:[(0,Z.jsx)(h.Z.Item,{label:"开始时间",name:"publish_time",rules:[{required:!0,message:"请选择开始时间"}],children:(0,Z.jsx)(g.default,{placeholder:"请选择发布时间",showTime:{format:"HH:mm"},style:{width:260},size:"large",disabledDate:function(e){return(0,b.Q8)(e)},disabledTime:function(e){return(0,b.d0)(e)},allowClear:!1,format:"YYYY-MM-DD HH:mm"})}),(0,Z.jsx)("span",{style:{color:"#999999",fontSize:"14px",height:40,marginBottom:8,display:"block"},children:"(学生收到作业的时间)"})]})}),(0,Z.jsx)(x.Z,{children:(0,Z.jsxs)(v.Z,{children:[(0,Z.jsx)(h.Z.Item,{label:"结束时间",name:"end_time",rules:[{required:!0,message:"请选择结束时间"}],children:(0,Z.jsx)(g.default,{placeholder:"请选择发布时间",showTime:{format:"HH:mm"},style:{width:260},size:"large",disabledDate:function(e){return(0,b.Q8)(e,"",s.getFieldValue("publish_time"))},disabledTime:function(e){return(0,b.d0)(e,s.getFieldValue("publish_time"))},allowClear:!1,format:"YYYY-MM-DD HH:mm"})}),(0,Z.jsx)("span",{style:{color:"#999999",fontSize:"14px",height:40,marginBottom:8,display:"block"},children:"(学生“按时”提交作品的时间截点)"})]})})]})]})}))},70516:function(e,n,t){t.d(n,{AD:function(){return C},D9:function(){return F},Hp:function(){return k},IM:function(){return E},Iy:function(){return N},KM:function(){return U},MJ:function(){return Z},Ne:function(){return R},ON:function(){return G},Uj:function(){return B},VY:function(){return W},YO:function(){return q},YX:function(){return J},Zn:function(){return f},_g:function(){return j},_k:function(){return A},c6:function(){return H},cr:function(){return x},eV:function(){return O},fi:function(){return v},gh:function(){return P},hS:function(){return M},iA:function(){return g},j6:function(){return w},je:function(){return Y},jj:function(){return b},kS:function(){return z},o6:function(){return S},pO:function(){return Q},rQ:function(){return L},sA:function(){return I},xm:function(){return D},xo:function(){return V},y8:function(){return T},yd:function(){return y}});var s=t(7557),i=t.n(s),a=t(82242),l=t.n(a),r=t(41498),o=t.n(r),u=t(85889),c=t(75102),d=t(11298),m=t(8591),p=t(22107),_=function(){(0,c.getDvaApp)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"正在生成文件,请稍后..."}})},h=function(){(0,c.getDvaApp)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!1,text:""}})},f=function(){var e=o()(i()().mark((function e(n){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return _(),e.next=3,(0,u.YR)(l()({},n));case 3:if(0!==e.sent.status){e.next=7;break}return e.next=7,(0,d.QH)("",(0,d.NY)({url:p.Z.API_SERVER+"/api/courses/".concat(n.coursesId,"/export_couser_info.json"),query:n}));case 7:h();case 8:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),x=function(){var e=o()(i()().mark((function e(n){var t;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.yS)(l()({},n));case 2:if(0!==(t=e.sent).status){e.next=8;break}m.ZP.info("导出任务生成成功"),c.history.push("/classrooms/".concat(n.coursesId,"/exportlist/course_member_act_score")),e.next=13;break;case 8:if(-2!==t.status){e.next=12;break}return e.abrupt("return",t);case 12:-3===t.status&&((0,c.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),c.history.push("/classrooms/".concat(n.coursesId,"/exportlist/course_member_act_score")));case 13:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),v=function(){var e=o()(i()().mark((function e(n){var t;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.W0)(l()({},n));case 2:if(0!==(t=e.sent).status){e.next=8;break}m.ZP.info("导出任务生成成功"),c.history.push("/classrooms/".concat(n.coursesId,"/exportlist/course_total_score")),e.next=13;break;case 8:if(-4!==t.status){e.next=12;break}return e.abrupt("return",t);case 12:-3===t.status&&((0,c.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),c.history.push("/classrooms/".concat(n.coursesId,"/exportlist/course_total_score")));case 13:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),g=function(){var e=o()(i()().mark((function e(n){var t;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.Nl)(l()({},n));case 2:if(0!==(t=e.sent).status){e.next=8;break}m.ZP.info("导出任务生成成功"),c.history.push("/classrooms/".concat(n.coursesId,"/exportlist/course_total_exercise_and_other")),e.next=13;break;case 8:if(-4!==t.status){e.next=12;break}return e.abrupt("return",t);case 12:-3===t.status&&((0,c.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),c.history.push("/classrooms/".concat(n.coursesId,"/exportlist/course_total_exercise_and_other")));case 13:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),y=function(){var e=o()(i()().mark((function e(n){var t;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.IU)(l()({},n));case 2:if(0!==(t=e.sent).status){e.next=8;break}m.ZP.info("导出任务生成成功"),c.history.push("/classrooms/".concat(n.coursesId,"/exportlist/export_star_user")),e.next=13;break;case 8:if(-4!==t.status){e.next=12;break}return e.abrupt("return",t);case 12:-3===t.status&&((0,c.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),c.history.push("/classrooms/".concat(n.coursesId,"/exportlist/export_star_user")));case 13:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),j=function(){var e=o()(i()().mark((function e(n){var t;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.td)(l()({},n));case 2:if(0!==(t=e.sent).status){e.next=8;break}m.ZP.info("导出任务生成成功"),c.history.push("/classrooms/".concat(n.coursesId,"/exportlist/course_total_exercise_and_other")),e.next=19;break;case 8:if(-2!==t.status){e.next=12;break}return e.abrupt("return",t);case 12:if(-3!==t.status){e.next=17;break}(0,c.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),c.history.push("/classrooms/".concat(n.coursesId,"/exportlist/course_total_exercise_and_other")),e.next=19;break;case 17:if(-4!==t.status){e.next=19;break}return e.abrupt("return",t);case 19:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),w=function(){var e=o()(i()().mark((function e(n){var t;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.QX)(l()({},n));case 2:if(0!==(t=e.sent).status){e.next=8;break}m.ZP.info("导出任务生成成功"),c.history.push("/classrooms/".concat(n.coursesId,"/exportlist/course_total_homework")),e.next=13;break;case 8:if(-4!==t.status){e.next=12;break}return e.abrupt("return",t);case 12:-3===t.status&&((0,c.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),c.history.push("/classrooms/".concat(n.coursesId,"/exportlist/course_total_homework")));case 13:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),b=function(){var e=o()(i()().mark((function e(n,t){var s;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.o_)(l()({},n));case 2:0===(s=e.sent).status?(m.ZP.info("导出任务生成成功导出后文件保存时间为7天请及时下载"),c.history.push("/classrooms/".concat(n.coursesId,"/exportlist/").concat(t))):-3===s.status&&((0,c.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),c.history.push("/classrooms/".concat(n.coursesId,"/exportlist/").concat(t)));case 4:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),k=function(){var e=o()(i()().mark((function e(n,t){var s;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.ZL)(l()({},n));case 2:0===(s=e.sent).status?(m.ZP.info("导出任务生成成功导出后文件保存时间为7天请及时下载"),c.history.push("/classrooms/".concat(n.coursesId,"/exportlist/").concat(t))):-3===s.status&&((0,c.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),c.history.push("/classrooms/".concat(n.coursesId,"/exportlist/").concat(t)));case 4:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),Z=function(){var e=o()(i()().mark((function e(n,t){var s;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.vV)(l()({},n));case 2:0===(s=e.sent).status?(m.ZP.info("导出任务生成成功导出后文件保存时间为7天请及时下载"),c.history.push("/classrooms/".concat(n.coursesId,"/exportlist/").concat(t))):-3===s.status&&((0,c.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),c.history.push("/classrooms/".concat(n.coursesId,"/exportlist/").concat(t)));case 4:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),N=function(){var e=o()(i()().mark((function e(n,t){var s;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.aP)(l()({},n));case 2:0===(s=e.sent).status?(m.ZP.info("导出任务生成成功"),c.history.push("/classrooms/".concat(n.coursesId,"/exportlist/").concat(t))):-3===s.status&&((0,c.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),c.history.push("/classrooms/".concat(n.coursesId,"/exportlist/").concat(t)));case 4:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),I=function(){var e=o()(i()().mark((function e(n){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return _(),e.next=3,(0,u.MJ)(l()({},n));case 3:if(0!==e.sent.status){e.next=7;break}return e.next=7,(0,d.FH)("",(0,d.NY)({url:p.Z.API_SERVER+"/api/polls/".concat(n.categoryId,"/commit_result.xlsx"),query:n}));case 7:h();case 8:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),P=function(){var e=o()(i()().mark((function e(n){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,d.FH)("",(0,d.NY)({url:p.Z.API_SERVER+"/api/courses/".concat(n.coursesId,"/attendances/export_xlsx_data.xlsx"),query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),S=function(){var e=o()(i()().mark((function e(n){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,d.FH)("",(0,d.NY)({url:p.Z.API_SERVER+"/api/courses/".concat(n.coursesId,"/video_study_statics.xlsx"),query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),H=function(){var e=o()(i()().mark((function e(n){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,d.FH)("",(0,d.NY)({url:p.Z.API_SERVER+"/api/courses/".concat(n.coursesId,"/export_video_study.xlsx"),query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),O=function(){var e=o()(i()().mark((function e(n){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,d.FH)("",(0,d.NY)({url:p.Z.API_SERVER+"/api/courses/".concat(n.coursesId,"/export_course_students_info.xlsx"),query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),C=function(){var e=o()(i()().mark((function e(n){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,d.FH)("",(0,d.NY)({url:p.Z.API_SERVER+"/api/school_manages/students.xlsx",query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),L=function(){var e=o()(i()().mark((function e(n){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,d.FH)("",(0,d.NY)({url:p.Z.API_SERVER+"/api/item_banks/export.xlsx",query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),T=function(){var e=o()(i()().mark((function e(n){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,d.FH)("",(0,d.NY)({url:p.Z.API_SERVER+"/api/competitions/region_reports.xlsx",query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),Y=function(){var e=o()(i()().mark((function e(n){var t;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.Uy)(l()({},n));case 2:0===(t=e.sent).status?(m.ZP.info("导出任务生成成功"),c.history.push("/classrooms/".concat(n.coursesId,"/exportlist/exercise_score"))):-3===t.status&&((0,c.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),c.history.push("/classrooms/".concat(n.coursesId,"/exportlist/exercise_score")));case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),A=function(){var e=o()(i()().mark((function e(n){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("----------","调用下载"),e.next=3,(0,d.FH)("",(0,d.NY)({url:p.Z.API_SERVER+"/api/export_records/".concat(n.id,".xlsx"),query:n}));case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),D=function(){var e=o()(i()().mark((function e(n){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,d.FH)("",(0,d.NY)({url:p.Z.API_SERVER+"/api/ec_major_schools/0/ec_years.xlsx",query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),F=function(){var e=o()(i()().mark((function e(n){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,d.FH)("",(0,d.NY)({url:p.Z.API_SERVER+"/api/courses/".concat(null==n?void 0:n.coursesId,"/").concat(n.menuKey,"_statistic.xlsx?").concat(n.checkedList.map((function(e){return"course_group_id[]=".concat(e)})).join("&")),query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),R=function(){var e=o()(i()().mark((function e(n){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,d.FH)("",(0,d.NY)({url:p.Z.API_SERVER+"/api/ec_years/".concat(null==n?void 0:n.ec_year_id,"/ec_training_objectives.xlsx"),query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),E=function(){var e=o()(i()().mark((function e(n){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,d.FH)(null==n?void 0:n.name,(0,d.NY)({url:p.Z.API_SERVER+"/api/attachments/get_ecs_attachment.docx",query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),M=function(){var e=o()(i()().mark((function e(n){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,d.FH)("",(0,d.NY)({url:p.Z.API_SERVER+"/api/ec_years/".concat(null==n?void 0:n.ec_year_id,"/ec_courses.xlsx"),query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),V=function(){var e=o()(i()().mark((function e(n){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,d.FH)("",(0,d.NY)({url:p.Z.API_SERVER+"/api/ec_years/".concat(null==n?void 0:n.ec_year_id,"/ec_graduation_requirements.xlsx"),query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),W=function(){var e=o()(i()().mark((function e(n){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,d.FH)("",(0,d.NY)({url:p.Z.API_SERVER+"/api/courses/rank_list.xlsx",query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),z=function(){var e=o()(i()().mark((function e(n){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,d.FH)("",(0,d.NY)({url:p.Z.API_SERVER+"/api/courses/question_rank_list.xlsx",query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),G=function(){var e=o()(i()().mark((function e(n){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,d.FH)("",(0,d.NY)({url:p.Z.API_SERVER+"/api/examination_banks/".concat(n.id,".json"),query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),J=function(){var e=o()(i()().mark((function e(n){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,d.FH)("",(0,d.NY)({url:p.Z.API_SERVER+"/api/exercises/".concat(n.categoryId,".json"),query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),q=function(){var e=o()(i()().mark((function e(n){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,d.FH)("",(0,d.NY)({url:p.Z.API_SERVER+"/api/polls/".concat(null==n?void 0:n.id,"/commit_result.json"),query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),B=function(){var e=o()(i()().mark((function e(n){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,d.FH)("",(0,d.NY)({url:p.Z.API_SERVER+"/api/paths/get_task_pass.json",query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),Q=function(){var e=o()(i()().mark((function e(n,t){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,d.FH)(t||"",(0,d.NY)({url:p.Z.API_SERVER+"/api/exercises/".concat(null==n?void 0:n.exercise_id,"/consult_exercise.json"),query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),U=function(){var e=o()(i()().mark((function e(n){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,d.FH)("",(0,d.NY)({url:p.Z.API_SERVER+"/api/competitions/".concat(null==n?void 0:n.identifier,"/competition_commit_records/member_works.xlsx"),query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}()}}]);