|
|
(self.webpackChunk=self.webpackChunk||[]).push([[31427],{85699:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(4751),s=n(59301),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"},o=n(68475),i=function(e,t){return s.createElement(o.Z,(0,r.Z)({},e,{ref:t,icon:a}))};var l=s.forwardRef(i)},71993:function(e,t,n){"use strict";n(59301);var r=n(43418),s=n(3113),a=n(37712);t.Z=function(e){var t=e.res,n=e.ismodel,o=e.setismodel;return(0,a.jsxs)(r.Z,{open:n,title:"提示",footer:null,style:{background:"transparen"},centered:!0,width:670,maskClosable:!1,children:[null==t?void 0:t.message,(0,a.jsx)("div",{style:{textAlign:"right"},children:(0,a.jsx)(s.ZP,{onClick:function(){o(!1)},type:"primary",children:"确认"})})]})}},22845:function(e,t,n){"use strict";var r=n(82242),s=n.n(r),a=(n(59301),n(19779)),o=n(3113),i=n(37712);t.Z=function(e){var t=e.img,n=e.buttonProps,r=void 0===n?{}:n,l=e.styles,c=void 0===l?{}:l,u=e.customText,d=e.ButtonText,p=e.ButtonClick,m=e.Buttonclass,h=e.ButtonTwo,f=e.imgStyles,x=e.loading,g=void 0!==x&&x;return(0,i.jsxs)("section",{className:"tc animated fadeIn",style:s()(s()({},{color:"#999",margin:"100px auto",visibility:g?"hidden":"visible"}),c),children:[(0,i.jsx)("img",{src:t||a,style:s()({width:288,height:200},f)}),(0,i.jsx)("p",{className:"mt20 font14",children:u||"暂时还没有相关数据哦!"}),d&&(0,i.jsx)(o.ZP,s()(s()({className:m,onClick:p},r),{},{children:d})),h&&h]})}},85114:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return Ne}});var r=n(7557),s=n.n(r),a=n(37205),o=n.n(a),i=n(41498),l=n.n(i),c=n(82242),u=n.n(c),d=n(79800),p=n.n(d),m=n(59301),h=n(99232),f=n.n(h),x=n(26724),g=n.n(x),v=n(96707),_=n(8591),j=n(20834),b=n(24905),y=n(3113),w=n(95237),k=n(43604),N=n(60324),Z=n(38854),S=n(99313),C=n(14491),L=n(53864),P=n(71418),E=n(22845),I={flex_box_center:"flex_box_center___rAB_D",flex_space_between:"flex_space_between___thxzM",flex_box_vertical_center:"flex_box_vertical_center___F4tY6",flex_box_center_end:"flex_box_center_end___r8JQK",flex_box_column:"flex_box_column___sSvJl",bg:"bg___mQXgH",containerTitle:"containerTitle___qt3QK",containerDesc:"containerDesc___qz_Qj",listItem:"listItem___pqPd4",title:"title___xbuRk",titleLeft:"titleLeft___eCOrX",titleRight:"titleRight___QJ5JD",acitons:"acitons___EfL28",memberManager:"memberManager___PqXmq",menu:"menu___b2bjV",topScores:"topScores___tCh6O",first:"first___nhTZp",second:"second___Ko9yk",three:"three___uN_GB",dropmenu:"dropmenu___Ijy35",tabs:"tabs___wLrrY",rightAction:"rightAction___PwBiG",ruleWrap:"ruleWrap___o2oRs"},O=n(68339),R=n(37712);f().locale("zh-cn");var M=(0,v.connect)((function(e){return{classroomList:e.classroomList,loading:e.loading}}))((function(e){var t=e.classroomList,n=e.loading,r=(e.dispatch,(0,v.useParams)(),t.detailCourseStatisticsList.top_scores);return(0,R.jsx)("section",{style:{minHeight:200},children:(0,R.jsxs)(P.Z,{spinning:n.effects["classroomList/getCourseStatistics"],children:[""==r&&(0,R.jsx)(E.Z,{}),r&&(0,R.jsx)("aside",{className:[I.topScores].join(" "),children:(0,R.jsxs)(w.Z,{justify:"center",align:"middle",children:[r[3]&&(0,R.jsx)(k.Z,{span:3,className:"tc",children:(0,R.jsx)("img",{src:"".concat(O.Z.IMG_SERVER,"/images/").concat(r[3].avatar_url),alt:""})}),r[1]&&(0,R.jsxs)(k.Z,{span:5,className:"tc",children:[(0,R.jsx)("img",{src:"".concat(O.Z.IMG_SERVER,"/images/").concat(r[1].avatar_url),alt:""}),(0,R.jsx)(k.Z,{className:I.second,children:(0,R.jsx)("span",{})})]}),r[0]&&(0,R.jsxs)(k.Z,{span:5,className:"tc",children:[(0,R.jsx)("img",{src:"".concat(O.Z.IMG_SERVER,"/images/").concat(r[0].avatar_url),alt:""}),(0,R.jsx)(k.Z,{className:I.first,children:(0,R.jsx)("span",{})})]}),r[2]&&(0,R.jsxs)(k.Z,{span:5,className:"tc",children:[(0,R.jsx)("img",{src:"".concat(O.Z.IMG_SERVER,"/images/").concat(r[2].avatar_url),alt:""}),(0,R.jsx)(k.Z,{className:I.three,children:(0,R.jsx)("span",{})})]}),r[4]&&(0,R.jsx)(k.Z,{span:3,className:"tc",children:(0,R.jsx)("img",{src:"".concat(O.Z.IMG_SERVER,"/images/").concat(r[4].avatar_url),alt:""})})]})}),r&&(0,R.jsx)("aside",{className:[I.topScores].join(" "),children:(0,R.jsxs)(w.Z,{justify:"center",align:"middle",className:"pt10 pb20",children:[r[3]&&(0,R.jsxs)(k.Z,{span:3,className:"tc",children:[(0,R.jsx)("span",{className:"username",children:r[3].user_name}),(0,R.jsx)("br",{}),(0,R.jsx)("span",{className:"c-light-black font12",children:"4th"})]}),r[1]&&(0,R.jsxs)(k.Z,{span:5,className:"tc",children:[(0,R.jsx)("span",{className:"username",children:r[1].user_name}),(0,R.jsx)("br",{}),(0,R.jsx)("span",{className:"c-light-black font12",children:"2nd"})]}),r[0]&&(0,R.jsxs)(k.Z,{span:5,className:"tc",children:[(0,R.jsx)("span",{className:"username",children:r[0].user_name}),(0,R.jsx)("br",{}),(0,R.jsx)("span",{className:"c-light-black font12",children:"1st"})]}),r[2]&&(0,R.jsxs)(k.Z,{span:5,className:"tc",children:[(0,R.jsx)("span",{className:"username",children:r[2].user_name}),(0,R.jsx)("br",{}),(0,R.jsx)("span",{className:"c-light-black font12",children:"3rd"})]}),r[4]&&(0,R.jsxs)(k.Z,{span:3,className:"tc",children:[(0,R.jsx)("span",{className:"username",children:r[4].user_name}),(0,R.jsx)("br",{}),(0,R.jsx)("span",{className:"c-light-black font12",children:"5th"})]})]})})]})})})),T=n(43418),W=n(26415),B=n(98135),$=n(56511),z=n(5112),A=n(51836),D="bg___gJnOP",G="add___qnAqO",F="btn___tlkiy",H="setting___IcAPy",q="actionBtn___gQWdv",J="head___Ndmea",V="left___qdx9f",Q="lli___rjlNl",Y="line___qf5MC",K="active___ONStP",U="right___TOAr0",X="top___Xjvfk",ee="rli___NdIi1",te="name___luU6N",ne="weight___KEDj9",re="listWrap___RSFI7",se="li___AVmMQ",ae="des___WVdQ8",oe="error___Ta8mF",ie=n(39647),le=n.n(ie),ce="bg___vtRyz",ue="setting___YK6mx",de="box___UrJxk",pe="title___Wf0rf",me=n(42441),he=n(22961),fe=["fixed"],xe=function(e){e.loading;var t,n=e.setLoading,r=e.onFeedback,a=e.onRefresh,i=e.groupIds,c=(0,v.useParams)(),d=(0,m.useState)({page:1,limit:10,group_ids:i}),h=p()(d,2),f=h[0],x=h[1],g=(0,m.useState)(!1),_=p()(g,2),j=_[0],b=_[1],y=(0,m.useState)(0),k=p()(y,2),N=k[0],Z=k[1],S=(0,m.useState)({}),L=p()(S,2),P=L[0],E=L[1],I=(0,m.useState)([]),O=p()(I,2),M=O[0],T=O[1],W=(0,m.useState)([]),B=p()(W,2),$=B[0],z=B[1],D=[{title:"姓名",dataIndex:"real_name",align:"left",width:120,ellipsis:!0,fixed:"left",render:function(e,t){return t.is_click?(0,R.jsx)("a",{style:{color:"#0152d9"},href:"/classrooms/".concat(null==c?void 0:c.coursesId,"/StudentSituation/").concat(null==c?void 0:c.categoryId,"/").concat(t.login),target:"_blank",children:e}):e}},{title:"分班",dataIndex:"group_name",width:130,ellipsis:!0,fixed:"left"},{title:"达成度",align:"center",width:110,fixed:"left",dataIndex:"rate",render:function(e){return e+"%"}}];(0,m.useEffect)((function(){f.group_ids=i,f.page=1,f.limit=10,x(u()({},f)),J(f,!0)}),[JSON.stringify(i)]);var G,F,H,q,J=function(){var e=l()(s()().mark((function e(t){var a,i,l,d,p,m,h,f=arguments;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(a=f.length>1&&void 0!==f[1]&&f[1])?n(!0):b(!0),e.next=4,(0,A.ZP)("/api/courses/".concat(null==c?void 0:c.coursesId,"/course_targets/list.json"),{method:"get",params:t});case 4:if(-1===(null==(i=e.sent)?void 0:i.status)){e.next=19;break}if(!a){e.next=14;break}if(null!=i&&i.is_set_target){e.next=10;break}return r(u()({},i)),e.abrupt("return");case 10:p=null==i||null===(d=i.table_course_targets)||void 0===d?void 0:d.map((function(e){return{title:(0,R.jsxs)("div",{className:"tl",children:[(0,R.jsx)("div",{children:e.name}),(0,R.jsxs)("div",{children:["占比:",e.rate,"%"]})]}),dataIndex:e.id,align:"left",render:function(e){return e+"%"}}})),m=D.map((function(e){if(null==p||!p.length){e.fixed;return le()(e,fe)}return e})),E(u()({},i)),z([].concat(o()(m),o()(p)));case 14:h=null==i||null===(l=i.course_members)||void 0===l?void 0:l.map((function(e){var t,n=u()({},e);return null==e||null===(t=e.course_target_users)||void 0===t||t.forEach((function(e){n[e.course_target_id]=e.rate})),n})),T(h),Z((null==i?void 0:i.total_count)||0),n(!1),b(!1);case 19:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return(0,R.jsxs)("section",{className:ce,children:[(0,R.jsxs)("div",{className:"mt20 mb20",children:[(0,R.jsxs)("span",{className:"font14 c-grey-666 mr25",children:["本次数据更新时间:",null==P?void 0:P.updated_at]}),!(0,he.dE)()&&(0,R.jsxs)("span",{onClick:function(){a((function(){return J(f,!0)}))},className:"font14 c-light-primary current",children:[(0,R.jsx)("i",{className:"iconfont icon-shuaxin3 mr10"}),"刷新数据"]})]}),!(0,he.dE)()&&(0,R.jsxs)(m.Fragment,{children:[(0,R.jsxs)(w.Z,{children:[(0,R.jsxs)("div",{className:ue,children:[(0,R.jsx)("span",{children:"目标平均达成度"}),(0,R.jsxs)("b",{children:[null==P?void 0:P.average_rate,"%"]}),(0,R.jsx)("div",{onClick:function(){r(u()({},P))},children:"设置达成度构成"})]}),(0,R.jsxs)("div",{className:de,children:[(0,R.jsxs)("div",{className:pe,children:[(0,R.jsx)("b",{}),"达成度区间"]}),(0,R.jsx)(me.Z,{notMerge:!0,option:(H=[{name:"",type:"bar",barGap:1,barWidth:4,color:"#07C160",itemStyle:{barBorderRadius:[4,4,0,0]}},{name:"",type:"bar",barGap:1,barWidth:4,color:"#145DFF",itemStyle:{barBorderRadius:[4,4,0,0]}},{name:"",type:"bar",barGap:1,barWidth:4,color:"#7296B0",itemStyle:{barBorderRadius:[4,4,0,0]}},{name:"",type:"bar",barGap:1,barWidth:4,color:"#193062",itemStyle:{barBorderRadius:[4,4,0,0]}},{name:"",type:"bar",barGap:1,barWidth:4,color:"#EB624C",itemStyle:{barBorderRadius:[4,4,0,0]}},{name:"",type:"bar",barGap:1,barWidth:4,color:"#FF9D18",itemStyle:{barBorderRadius:[4,4,0,0]}}],q=[],H=null==P||null===(G=P.statistics_data)||void 0===G||null===(G=G.name)||void 0===G?void 0:G.map((function(e,t){return q.push(e),u()(u()({},H[t]),{},{name:String(t)})})),{legend:{top:0,right:0,icon:"circle",itemWidth:6,itemGap:12,formatter:function(e){if(!e)return"";var t=q[Number(e)]||"";return console.log(e,t,222),t.length>5&&(t=t.slice(0,5)+"..."),t}},grid:{top:40,left:"2%",right:0,bottom:0,containLabel:!0},tooltip:{formatter:function(e){console.log(e,"params");var t=q[e.seriesIndex]||"";return t+="<br/>",t+=e.marker,t+=e.name+":",t+=e.value[e.seriesIndex+1]}},dataset:{source:(null==P||null===(F=P.statistics_data)||void 0===F?void 0:F.source)||[]},xAxis:{type:"category",axisTick:{show:!1},axisLabel:{textStyle:{color:"#999999"}},axisLine:{lineStyle:{color:"#E5E5E5"}}},yAxis:{axisTick:{show:!1},axisLabel:{textStyle:{color:"#999999"}},axisLine:{lineStyle:{color:"#E5E5E5"}}},series:H}),style:{width:700,height:170}})]})]}),(0,R.jsxs)("div",{style:{marginTop:36,marginBottom:16},children:["学员达成情况",(0,R.jsx)("span",{className:"ml10 font12 c-grey-999",children:"(点击学生姓名可以查看学生目标达成详情)"})]})]}),(0,R.jsx)(C.Z,{dataSource:M,columns:$,onChange:function(e){f.page=e.current,f.limit=e.pageSize,x(u()({},f)),J(f)},loading:j,pagination:{pageSize:f.limit,total:N,current:f.page,showQuickJumper:!0,showSizeChanger:!0,size:"default",position:["bottomCenter"],showTotal:function(e){return(0,R.jsxs)("span",{className:"mr10",children:["共",(0,R.jsx)("span",{className:"c-orange",children:e}),"条数据"]})}},scroll:{x:null==P||null===(t=P.table_course_targets)||void 0===t||!t.length||"max-content"}})]})},ge=n(89392),ve=n(99401),_e=(0,v.connect)((function(e){return{globalSetting:e.globalSetting}}))((function(e){e.globalSetting;var t,n,r,a=e.dispatch,i=e.groupIds,c=(0,v.useParams)(),d=(0,m.useState)(!0),h=p()(d,2),f=h[0],x=h[1],g=(0,m.useState)(!1),j=p()(g,2),k=j[0],N=j[1],Z=(0,m.useState)(3),S=p()(Z,2),C=S[0],L=S[1],I=(0,m.useRef)([]),O=(0,m.useRef)(null),M=(0,m.useState)(!1),ie=p()(M,2),le=ie[0],ce=ie[1],ue=(0,m.useState)(!1),de=p()(ue,2),pe=de[0],me=de[1],he=(0,m.useState)({edit:!1,name:"",rate:0}),fe=p()(he,2),_e=fe[0],je=fe[1],be=(0,m.useState)(!1),ye=p()(be,2),we=ye[0],ke=ye[1],Ne=(0,m.useState)(!1),Ze=p()(Ne,2),Se=Ze[0],Ce=Ze[1],Le=(0,m.useState)([]),Pe=p()(Le,2),Ee=Pe[0],Ie=Pe[1],Oe=(0,m.useState)(!1),Re=p()(Oe,2),Me=Re[0],Te=Re[1],We=(0,m.useState)(!1),Be=p()(We,2),$e=Be[0],ze=Be[1],Ae=(0,m.useState)(!0),De=p()(Ae,2),Ge=De[0],Fe=De[1],He=(0,m.useState)({}),qe=p()(He,2),Je=qe[0],Ve=qe[1],Qe=(0,m.useState)(!0),Ye=p()(Qe,2),Ke=Ye[0],Ue=Ye[1],Xe=(0,m.useState)(!1),et=p()(Xe,2),tt=et[0],nt=et[1],rt=(0,m.useState)([]),st=p()(rt,2),at=st[0],ot=st[1],it=(0,m.useState)(""),lt=p()(it,2),ct=lt[0],ut=lt[1],dt=(0,m.useState)(0),pt=p()(dt,2),mt=pt[0],ht=pt[1],ft=(0,m.useState)([]),xt=p()(ft,2),gt=xt[0],vt=xt[1],_t=(0,m.useState)(0),jt=p()(_t,2),bt=jt[0],yt=jt[1],wt=(0,m.useRef)(null),kt=(0,m.useRef)(null);(0,m.useEffect)((function(){ct&&Ct(ct)}),[ct]),(0,m.useEffect)((function(){if(kt.current&&!Ge){var e,t=null==kt||null===(e=kt.current)||void 0===e?void 0:e.querySelector(".rc-virtual-list-scrollbar");return null==t||t.addEventListener("click",Zt),console.log(t,"uuu2"),function(){null==t||t.removeEventListener("click",Zt)}}}),[kt.current,Ge,Je]);var Nt=[{name:"实训作业",key:"shixun_homework",num:null,preNum:null,total:0,select:0,show:!1},{name:"普通作业",key:"common_homework",num:null,preNum:null,total:0,select:0,show:!1},{name:"分组作业",key:"group_homework",num:null,preNum:null,total:0,select:0,show:!1},{name:"编程作业",key:"program_homework",num:null,preNum:null,total:0,select:0,show:!1},{name:"在线考试",key:"exercise",num:null,preNum:null,total:0,select:0,show:!1},{name:"视频直播",num:null,preNum:null,total:0,select:0,key:"video",show:!1},{name:"课堂签到",key:"attendance",num:null,preNum:null,total:0,select:0,show:!1}],Zt=function(e){var t;if(null!==(t=e.target.classList)&&void 0!==t&&t.contains("rc-virtual-list-scrollbar")){var n,r=(null==Je||null===(n=Je.course_target_module_records)||void 0===n?void 0:n.length)||0,s=parseInt(80*r*e.offsetY/430);wt.current.scrollTo(s)}},St=function(){var e=l()(s()().mark((function e(){var t,n,r,a,o;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return x(!0),e.next=3,(0,A.ZP)("/api/courses/".concat(null==c?void 0:c.coursesId,"/course_targets.json"),{method:"get"});case 3:-1!==(null==(t=e.sent)?void 0:t.status)&&(r=Nt.map((function(e){var n,r=null==t||null===(n=t.course_modules)||void 0===n?void 0:n.find((function(t){return t.module_type===e.key}));return u()(u()({},e),{},{name:r.module_name})})),I.current=r,ct||(ut((null==t||null===(a=t.course_targets)||void 0===a||null===(a=a[0])||void 0===a?void 0:a.id)||""),null!=t&&null!==(o=t.course_targets)&&void 0!==o&&null!==(o=o[0])&&void 0!==o&&o.id?O.current=u()({},t):(vt([]),yt("-"))),ot(null==t||null===(n=t.course_targets)||void 0===n?void 0:n.map((function(e){return u()(u()({},e),{},{preRate:e.rate})}))),ht(null==t?void 0:t.rate_sum),x(!1));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Ct=function(){var e=l()(s()().mark((function e(t){var n,r,a,o,i,l,d=arguments;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(d.length>1&&void 0!==d[1]&&d[1]?x(!0):N(!0),!O.current){e.next=6;break}r=O.current,e.next=9;break;case 6:return e.next=8,(0,A.ZP)("/api/courses/".concat(null==c?void 0:c.coursesId,"/course_targets.json"),{method:"get"});case 8:r=e.sent;case 9:-1!==(null===(n=r)||void 0===n?void 0:n.status)&&(o=null===(a=r)||void 0===a||null===(a=a.course_targets)||void 0===a||null===(a=a.find((function(e){return e.id===t})))||void 0===a?void 0:a.course_target_modules,i=(0,ge.cloneDeep)(I.current).map((function(e){var t=null==o?void 0:o.find((function(t){return t.module_type===e.key}));return t?u()(u()({},e),{},{id:t.id,num:t.rate,preNum:t.rate,total:t.record_count,select:t.enable_record_count,show:!0}):e})),vt(i),l=i.reduce((function(e,t){return e+(t.num||0)}),0),yt(Math.round(l))),O.current=null,N(!1),x(!1);case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Lt=function(){var e=l()(s()().mark((function e(t){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return x(!0),e.next=3,(0,A.ZP)("/api/courses/".concat(null==c?void 0:c.coursesId,"/course_targets/").concat(t.id,".json"),{method:"put",body:{name:t.name,rate:t.rate}});case 3:e.sent&&St();case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Pt=function(){var e=l()(s()().mark((function e(t){var n,r,a,o=arguments;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=o.length>1&&void 0!==o[1]&&o[1],r={},n?(r.rate=t.num,x(!0)):(N(!0),r.custom_rate=t.custom_rate,r.course_target_module_records=null==t||null===(a=t.course_target_module_records)||void 0===a?void 0:a.map((function(e){return{id:e.id,status:e.status,rate:e.rate}})),"attendance"===(null==t?void 0:t.module_type)&&(r.normal=t.normal,r.late=t.late,r.early=t.early,r.leave=t.leave,r.absence=t.absence)),e.next=5,(0,A.ZP)("/api/courses/".concat(null==c?void 0:c.coursesId,"/course_targets/").concat(ct,"/course_target_modules/").concat(t.id,".json"),{method:"put",body:r});case 5:e.sent&&Ct(ct,n),ze(!1),Te(!1);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Et=function(){var e=l()(s()().mark((function e(){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=_e&&_e.name){e.next=3;break}return _.ZP.warning("请输入目标名称"),e.abrupt("return");case 3:if(me(!0),t={},!_e.id){e.next=11;break}return e.next=8,(0,A.ZP)("/api/courses/".concat(null==c?void 0:c.coursesId,"/course_targets/").concat(_e.id,".json"),{method:"put",body:{name:_e.name,rate:_e.rate}});case 8:t=e.sent,e.next=14;break;case 11:return e.next=13,(0,A.ZP)("/api/courses/".concat(null==c?void 0:c.coursesId,"/course_targets.json"),{method:"post",body:{name:_e.name,rate:_e.rate}});case 13:t=e.sent;case 14:0===t.status&&(ce(!1),L(2),St()),me(!1);case 16:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),It=function(){var e=l()(s()().mark((function e(){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Ce(!0),e.next=3,(0,A.ZP)("/api/courses/".concat(null==c?void 0:c.coursesId,"/course_targets/").concat(ct,"/course_target_modules.json"),{method:"post",body:{module_type:Ee.filter((function(e){return e.checked&&!e.show})).map((function(e){return e.key}))}});case 3:0===e.sent.status&&(ke(!1),Ct(ct)),Ce(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Ot=function(){var e=l()(s()().mark((function e(){var t,n,r;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=Je.course_target_module_records,n=(void 0===t?[]:t).filter((function(e){return e.status})),r=n.reduce((function(e,t){return e+Number(t.rate||0)}),0),n.length){e.next=6;break}return _.ZP.warning("请选择考察的内容"),e.abrupt("return");case 6:if(100===Math.round(r)){e.next=9;break}return _.ZP.warning("权重总和必须等于100%"),e.abrupt("return");case 9:if(!n.some((function(e){return e.status&&(""===e.rate||null===e.rate)}))){e.next=14;break}return _.ZP.warning("选中的内容权重为必填"),nt(!0),e.abrupt("return");case 14:ze(!0),Pt(Je);case 16:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Rt=function(){var e=l()(s()().mark((function e(t){var n,r,a;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Te(!0),Fe(!0),e.next=4,(0,A.ZP)("/api/courses/".concat(null==c?void 0:c.coursesId,"/course_targets/").concat(ct,"/course_target_modules/").concat(t.id,"/list.json"),{method:"get"});case 4:(n=e.sent)&&(Ve(u()({},n)),a=null==n||null===(r=n.course_target_module_records)||void 0===r?void 0:r.every((function(e){return e.status})),Ue(a),Fe(!1));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Mt=function(e,t,n){var r,s=(0,ge.cloneDeep)(Je);"number"==typeof n?s.course_target_module_records[n][e]=t:s[e]=t;var a=null===(r=s)||void 0===r||null===(r=r.course_target_module_records)||void 0===r?void 0:r.every((function(e){return e.status}));s=Tt(s),Ue(a),nt(!1),Ve(s)},Tt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.course_target_module_records,n=void 0===t?[]:t,r=e.custom_rate;if(!r){var s=n.filter((function(e){return e.status})).length,a=1,o=0;n.forEach((function(e,t){if(e.status){if(1===s){var n=(1-o).toFixed(4);e.rate=(100*n).toFixed(2)}if(s>1){var r=(a/s).toFixed(4);s-=1,a=(a-r).toFixed(4),o=(Number(o)+Number(r)).toFixed(4),e.rate=(100*r).toFixed(2)}}else e.rate=0}))}return e},Wt=function(){var e=l()(s()().mark((function e(t){var n;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=t&&null!==(n=t.course_targets)&&void 0!==n&&n.length){e.next=4;break}return L(1),x(!1),e.abrupt("return");case 4:L(2),St();case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Bt=function(){var e=l()(s()().mark((function e(t){var n,r,o,i;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(100===mt||t){e.next=3;break}return _.ZP.warning("课程目标占比需为100%"),e.abrupt("return");case 3:return a({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"达成度计算中,请稍后..."}}),e.next=6,(0,A.ZP)("/api/courses/".concat(null==c?void 0:c.coursesId,"/course_targets/calculate.json"),{method:"get"});case 6:n=e.sent,r=function(){t?t():(ut(""),L(3)),a({type:"globalSetting/setGlobalLoading",payload:{show:!1,text:"达成度计算中,请稍后..."}})},o=null,i=function(){var e=l()(s()().mark((function e(){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,A.ZP)("/api/courses/".concat(null==c?void 0:c.coursesId,"/course_targets/query_calculate.json"),{method:"get",params:{job_id:o}});case 2:0===(t=e.sent).status&&r(),-3===t.status&&setTimeout(i,3e3),-1===t.status&&a({type:"globalSetting/setGlobalLoading",payload:{show:!1,text:"达成度计算中,请稍后..."}});case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),0===n.status&&r(),-3===n.status&&(o=n.message,i()),-1===n.status&&a({type:"globalSetting/setGlobalLoading",payload:{show:!1,text:"达成度计算中,请稍后..."}});case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),$t=null==Ee?void 0:Ee.every((function(e){return e.show})),zt=(null==Je||null===(t=Je.course_target_module_records)||void 0===t||null===(t=t.filter((function(e){return e.status})))||void 0===t?void 0:t.length)||0;return(0,R.jsxs)("section",{className:D,children:[(0,R.jsxs)(P.Z,{spinning:f,children:[1===C&&(0,R.jsx)("div",{className:G,children:(0,R.jsxs)("div",{onClick:function(){return ce(!0)},className:F,children:[(0,R.jsx)("i",{className:"iconfont icon-tianjiashitixiaojiahao"}),"添加课堂目标"]})}),2===C&&(0,R.jsxs)("div",{className:H,children:[(0,R.jsxs)("div",{className:J,children:[(0,R.jsx)("b",{}),(0,R.jsxs)("span",{children:["剩余课堂目标占比 ",100-mt,"%"]}),(0,R.jsx)(y.ZP,{onClick:function(){return Bt()},type:"primary",children:"完成设置"})]}),(0,R.jsxs)("section",{children:[(0,R.jsxs)("div",{className:V,children:[null==at?void 0:at.map((function(e,t){return(0,R.jsxs)("div",{onClick:function(){return ut(e.id)},className:e.id===ct?"".concat(Q," ").concat(K):Q,children:[(0,R.jsxs)("aside",{children:[(0,R.jsx)("span",{title:e.name,children:e.name}),(0,R.jsx)("i",{onClick:function(t){t.stopPropagation(),je(u()({},e)),ce(!0)},className:"iconfont icon-bianji9 font16"}),(0,R.jsx)("i",{onClick:function(t){var n;t.stopPropagation(),T.Z.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",content:"请确认是否删除该课堂目标?",onOk:(n=l()(s()().mark((function t(){return s()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,A.ZP)("/api/courses/".concat(null==c?void 0:c.coursesId,"/course_targets/").concat(e.id,".json"),{method:"delete"});case 2:0===t.sent.status&&(ct===e.id&&(ct=""),St());case 4:case"end":return t.stop()}}),t)}))),function(){return n.apply(this,arguments)})})},className:"iconfont icon-piliangshanchu3 ml10"})]}),(0,R.jsxs)("div",{children:["占比",(0,R.jsx)("span",{onClick:function(e){return e.stopPropagation()},children:(0,R.jsx)(W.Z,{onChange:function(e){var n=(0,ge.cloneDeep)(at);n[t].rate=e,ot(n)},onBlur:l()(s()().mark((function e(){var n,r;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(""===(n=(0,ge.cloneDeep)(at))[t].rate||"number"==typeof n[t].rate){e.next=6;break}return _.ZP.warning("目标占比限制范围为0~100%"),n[t].rate=n[t].preRate,vt(n),e.abrupt("return");case 6:if(r=at.reduce((function(e,t){return e+(t.rate||0)}),0),!(Math.round(r)>100)){e.next=12;break}return _.ZP.warning("多个课堂目标占比之和不能超过100%"),n[t].rate=n[t].preRate,ot(n),e.abrupt("return");case 12:Lt(n[t]);case 13:case"end":return e.stop()}}),e)}))),style:{width:60},min:0,max:100,precision:0,value:e.rate,className:"ml10 mr10"})}),"%"]}),(0,R.jsx)("div",{className:Y})]},e.id)})),at.length<5&&(0,R.jsxs)("div",{onClick:function(){return ce(!0)},className:q,children:[(0,R.jsx)("i",{className:"iconfont icon-tianjiashitixiaojiahao"}),"添加课堂目标"]})]}),(0,R.jsx)("div",{className:U,children:(0,R.jsxs)(P.Z,{spinning:k,children:[(0,R.jsxs)("div",{style:{visibility:"-"===bt?"hidden":"visible"},className:X,children:[(0,R.jsxs)("span",{children:["剩余待分配权重 ",100-bt,"%"]}),(0,R.jsxs)("div",{style:{margin:0},onClick:function(){var e;ke(!0);var t=null===(e=(0,ge.cloneDeep)(gt))||void 0===e?void 0:e.map((function(e){return u()(u()({},e),{},{checked:e.show})}));Ie(t)},className:q,children:[(0,R.jsx)("i",{className:"iconfont icon-tianjiashitixiaojiahao"}),"添加课堂模块"]})]}),null!=gt&>.some((function(e){return e.show}))?(0,R.jsx)(m.Fragment,{children:null==gt?void 0:gt.map((function(e,t){return e.show?(0,R.jsxs)("div",{className:ee,children:[(0,R.jsx)("div",{title:e.name,className:te,children:e.name}),(0,R.jsxs)("div",{children:["占比",(0,R.jsx)(W.Z,{onChange:function(e){console.log(e,"num");var n=(0,ge.cloneDeep)(gt);n[t].num=e,vt(n)},onBlur:l()(s()().mark((function e(){var n,r;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(""===(n=(0,ge.cloneDeep)(gt))[t].num||"number"==typeof n[t].num){e.next=6;break}return _.ZP.warning("权重占比限制范围为0~100%"),n[t].num=n[t].preNum,vt(n),e.abrupt("return");case 6:if(r=gt.reduce((function(e,t){return e+(t.num||0)}),0),!(Math.round(r)>100)){e.next=12;break}return _.ZP.warning("多个课堂模块占比之和不能超过100%"),n[t].num=n[t].preNum,vt(n),e.abrupt("return");case 12:Pt(n[t],!0);case 13:case"end":return e.stop()}}),e)}))),style:{width:60},min:0,max:100,precision:0,value:e.num,className:"ml10 mr10"}),"%"]}),(0,R.jsxs)("div",{style:{marginLeft:70},children:["共",e.total,"个 / 已选",e.select,"个"]}),(0,R.jsxs)("div",{style:{marginLeft:"auto"},children:[(0,R.jsx)("i",{onClick:function(){return Rt(e)},className:"iconfont icon-shezhi4 current c-light-primary"}),(0,R.jsx)("i",{onClick:function(){var t;T.Z.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",content:"请确认是否删除该课堂模块?",onOk:(t=l()(s()().mark((function t(){return s()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,A.ZP)("/api/courses/".concat(null==c?void 0:c.coursesId,"/course_targets/").concat(ct,"/course_target_modules/").concat(e.id,".json"),{method:"delete"});case 2:0===t.sent.status&&Ct(ct);case 4:case"end":return t.stop()}}),t)}))),function(){return t.apply(this,arguments)})})},className:"iconfont icon-piliangshanchu3 current ml15 c-light-primary"})]})]},e.key):(0,R.jsx)(m.Fragment,{},e.key)}))}):(0,R.jsx)(E.Z,{customText:"目标未添加课堂模块,请点击右上角的“添加课堂模块”按钮进行添加"})]})})]})]}),3===C&&(0,R.jsx)(xe,{loading:f,setLoading:x,onFeedback:Wt,onRefresh:Bt,groupIds:i})]}),(0,R.jsx)(T.Z,{centered:!0,destroyOnClose:!0,open:le,title:"".concat(null!=_e&&_e.id?"编辑":"添加","课堂目标"),width:"600px",confirmLoading:pe,onOk:Et,onCancel:function(){return ce(!1)},afterClose:function(){je({name:"",rate:0})},children:(0,R.jsxs)("div",{children:[(0,R.jsxs)("div",{children:["目标名称",(0,R.jsx)(B.Z,{onChange:function(e){return je(u()(u()({},_e),{},{name:e.target.value}))},style:{width:400},maxLength:20,placeholder:"请输入目标名称,最大限制20个字符",suffix:"".concat((null==_e||null===(n=_e.name)||void 0===n?void 0:n.length)||0,"/20"),value:_e.name,className:"ml10 mb20"})]}),(0,R.jsxs)("div",{children:["成绩占比",(0,R.jsx)(W.Z,{onChange:function(e){return je(u()(u()({},_e),{},{rate:e}))},min:0,max:100,precision:0,value:_e.rate,className:"ml10 mr10"}),"%"]})]})}),(0,R.jsx)(T.Z,{centered:!0,destroyOnClose:!0,open:we,title:"添加课堂模块",width:"600px",confirmLoading:Se,onOk:It,onCancel:function(){return ke(!1)},footer:$t?null:void 0,children:(0,R.jsx)("div",{children:$t?(0,R.jsx)("div",{style:{fontSize:14,color:"#3A3A3A",margin:"20px 0",textAlign:"center"},children:"课堂模块已全部添加到课堂目标详情中"}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)("p",{style:{fontSize:14,color:"#3A3A3A"},children:"请选择课堂目标下的课堂模块"}),null==Ee?void 0:Ee.map((function(e,t){return(0,R.jsx)(b.Z,{onChange:function(e){Ee[t].checked=e.target.checked,Ie(o()(Ee))},style:{margin:"0 20px 10px 0"},checked:e.checked,disabled:e.show,children:e.name},t)}))]})})}),(0,R.jsx)(T.Z,{centered:!0,destroyOnClose:!0,open:Me,title:"权重设置",width:"660px",onCancel:function(){return Te(!1)},footer:(0,R.jsxs)(w.Z,{align:"middle",children:[(0,R.jsxs)(b.Z,{checked:Ke,onChange:function(e){var t,n=(0,ge.cloneDeep)(Je);null===(t=n.course_target_module_records)||void 0===t||t.forEach((function(t){return t.status=e.target.checked})),n=Tt(n),Ve(n),Ue(e.target.checked),nt(!1)},style:{flex:1,textAlign:"left"},className:"font14",children:["全选",(0,R.jsxs)("span",{className:"font12 c-grey-999 ml10",children:["当前选中",zt,"个"]})]}),(0,R.jsx)(y.ZP,{onClick:function(){return Te(!1)},children:"取消"}),(0,R.jsx)(y.ZP,{loading:$e,type:"primary",onClick:Ot,children:"确认"})]}),children:(0,R.jsx)("div",{className:ne,children:(0,R.jsxs)($.Z,{loading:Ge,active:!0,children:["video"===(null==Je?void 0:Je.module_type)&&(0,R.jsx)("div",{className:"mb10",children:"视频直播仅支持计算上传到本平台的视频学习达成情况"}),"attendance"===(null==Je?void 0:Je.module_type)&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(w.Z,{className:"mb10",align:"middle",children:[(0,R.jsx)("span",{className:"c-red mr5",children:"*"}),"签到分值设置"]}),(0,R.jsxs)("div",{className:"mb10",children:[(0,R.jsxs)("span",{className:"mr20",children:["正常签到",(0,R.jsx)(W.Z,{className:"ml10",style:{width:60},onChange:function(e){return Mt("normal",e)},value:Je.normal,min:0})]}),(0,R.jsxs)("span",{className:"mr20",children:["迟到",(0,R.jsx)(W.Z,{className:"ml10",style:{width:60},onChange:function(e){return Mt("late",e)},value:Je.late,min:0})]}),(0,R.jsxs)("span",{className:"mr20",children:["早退",(0,R.jsx)(W.Z,{className:"ml10",style:{width:60},onChange:function(e){return Mt("early",e)},value:Je.early,min:0})]}),(0,R.jsxs)("span",{className:"mr20",children:["请假",(0,R.jsx)(W.Z,{className:"ml10",style:{width:60},onChange:function(e){return Mt("leave",e)},value:Je.leave,min:0})]}),(0,R.jsxs)("span",{className:"mr20",children:["旷课",(0,R.jsx)(W.Z,{className:"ml10",style:{width:60},onChange:function(e){return Mt("absence",e)},value:Je.absence,min:0})]})]})]}),(0,R.jsxs)(w.Z,{className:"mb10",align:"middle",children:[(0,R.jsx)("span",{className:"c-red mr5",children:"*"}),"权重分配规则"]}),(0,R.jsxs)(z.ZP.Group,{onChange:function(e){return Mt("custom_rate",e.target.value)},value:Je.custom_rate,children:[(0,R.jsx)(z.ZP,{value:!1,children:"均分权重"}),(0,R.jsx)(z.ZP,{className:"ml30",value:!0,children:"自定义权重"})]}),(0,R.jsx)("div",{className:Y}),(0,R.jsx)("div",{className:re,ref:kt,children:(0,R.jsx)(ve.Z,u()(u()({data:(null==Je?void 0:Je.course_target_module_records)||[],itemHeight:80,ref:wt,itemKey:"id"},(null==Je||null===(r=Je.course_target_module_records)||void 0===r?void 0:r.length)>5?{height:430}:{}),{},{children:function(e,t){var n;return(0,R.jsxs)("div",{className:se,style:{paddingRight:(null==Je||null===(n=Je.course_target_module_records)||void 0===n?void 0:n.length)>5?20:0},children:[(0,R.jsxs)("aside",{children:[(0,R.jsx)(b.Z,{checked:e.status,onChange:function(e){return Mt("status",e.target.checked,t)}})," ",(0,R.jsx)("span",{title:e.name,children:e.name})]}),(0,R.jsxs)("div",{className:ae,children:[(0,R.jsxs)("span",{className:"font14 c-grey-999",children:["创建人:",e.real_name]}),(0,R.jsxs)("span",{className:"font14 c-grey-999",style:{margin:"0 80px"},children:["创建时间:",e.created_at]}),null!=Je&&Je.custom_rate?(0,R.jsxs)("span",{className:tt&&e.status&&(""===e.rate||null===e.rate)?"font14 c-grey-999 ".concat(oe):"font14 c-grey-999",children:["权重",(0,R.jsx)(W.Z,{style:{width:60,margin:"0 10px"},value:e.rate,precision:2,min:0,max:100,onChange:function(e){return Mt("rate",e,t)}}),"%"]}):(0,R.jsxs)("span",{className:"font14 c-grey-999",children:["权重:",parseFloat(e.rate),"%"]})]}),(0,R.jsx)("div",{className:Y})]},e.id)}}))})]})})})]})})),je=n(85699),be=n(43501),ye=n(39324),we=n(71993),ke=n(57265);f().locale("zh-cn");var Ne=(0,v.connect)((function(e){var t=e.classroomList,n=e.loading;return{classroomList:t,globalSetting:e.globalSetting,loading:n,user:e.user}}))((function(e){var t,n,r,a=e.classroomList,i=(e.globalSetting,e.loading),c=e.dispatch,d=e.user,h=(0,m.useState)(u()(u()({},(0,v.useParams)()),{},{page:1,sort:"desc"})),f=p()(h,2),x=f[0],O=(f[1],a.detailCourseStatisticsList),T=a.detailCourseGroupsList,W=a.detailCourseWorkscore,B=a.detailCourseActscore,$=a.detailLeftMenus,z=a.detailTopBanner,A=a.detailLeftMenusNames,D=(O.top_scores,(0,m.useState)([])),G=p()(D,2),F=G[0],H=G[1],q=(0,m.useState)("1"),J=p()(q,2),V=J[0],Q=J[1],Y=(0,m.useState)(!1),K=p()(Y,2),U=K[0],X=K[1],ee=(0,m.useState)(),te=p()(ee,2),ne=te[0],re=te[1],se=(0,m.useState)(!1),ae=p()(se,2),oe=ae[0],ie=ae[1],le=(0,m.useState)(!0),ce=p()(le,2),ue=ce[0],de=ce[1],pe=(0,m.useState)(1),fe=p()(pe,2),xe=fe[0],ge=fe[1],ve=(0,m.useState)(!1),Ne=p()(ve,2),Ze=Ne[0],Se=Ne[1],Ce=(0,m.useState)([]),Le=p()(Ce,2),Pe=Le[0],Ee=Le[1];x.id=x.coursesId,x.course_group_id=0,x.limit=20,$.course_modules&&a.detailLeftMenus.course_modules.filter((function(e){return"board"===e.type}))[0],(0,m.useEffect)((function(){c({type:"classroomList/getCourseStatistics",payload:u()({},x)})}),[x.categoryId]),(0,m.useEffect)((function(){(0,he.GJ)()&&Ie()}),[x.categoryId,d]),(0,m.useEffect)((function(){c("1"===V?{type:"classroomList/getCourseWorkscore",payload:u()({},x)}:{type:"classroomList/getCourseActscore",payload:u()({},x)})}),[V]);var Ie=function(){var e=l()(s()().mark((function e(){var t,n,r;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!ue||Ze){e.next=10;break}return Se(!0),ge(xe+1),e.next=5,c({type:"classroomList/getCourseGroupsList",payload:u()(u()({},x),{},{page:xe})});case 5:n=e.sent,r=o()(n.course_groups),(null===(t=n.course_groups)||void 0===t?void 0:t.length)<20&&(de(!1),r.push({id:0,name:"未分班"})),Se(!1),Ee([].concat(o()(Pe),o()(r)));case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Oe=function(e){x.page=e,c({type:"classroomList/getCourseWorkscore",payload:u()({},x)})},Re=function(){var e=l()(s()().mark((function e(){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"成绩计算中,请稍后..."}}),e.next=3,(0,ye.up)(u()({},x));case 3:t=e.sent,c({type:"globalSetting/setGlobalLoading",payload:{show:!1,text:""}}),0===t.status&&(_.ZP.success("更新成功"),Oe(1));case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Me=null==a||null===(t=a.detailLeftMenus)||void 0===t||null===(t=t.course_modules)||void 0===t?void 0:t.map((function(e){return e.type})),Te=[{title:"序号",render:function(e,t,n){return"".concat((x.page-1)*x.limit+n+1)},width:60,align:"center"},{title:"姓名",dataIndex:"user_name",width:"12%",ellipsis:!0,align:"center",render:function(e,t,n){return(0,he.dE)()?e:(0,R.jsx)("a",{target:"_blank",href:"/classrooms/".concat(null==x?void 0:x.coursesId,"/Studentdetail/").concat(null==t?void 0:t.user_login),children:e})}},{title:"学号",dataIndex:"student_id",align:"center",sorter:!0,width:"16%",ellipsis:!0},(null==Me?void 0:Me.find((function(e){return"course_group"===e})))&&{title:"分班",dataIndex:"course_group",ellipsis:!0,width:100,align:"center"},(null==Me?void 0:Me.find((function(e){return"shixun_homework"===e})))&&{title:null==A?void 0:A.shixun_homework,dataIndex:"practice_score",align:"center",ellipsis:!0,width:80},(null==Me?void 0:Me.find((function(e){return"program_homework"===e})))&&{title:null==A?void 0:A.program_homework,dataIndex:"hack_score",align:"center",ellipsis:!0,width:80},(null==Me?void 0:Me.find((function(e){return"common_homework"===e})))&&{title:null==A?void 0:A.common_homework,dataIndex:"common_score",align:"center",ellipsis:!0,width:80},(null==Me?void 0:Me.find((function(e){return"online_learning"===e})))&&{title:null==A?void 0:A.online_learning,dataIndex:"shixun_score",align:"center",ellipsis:!0,width:80},(null==Me?void 0:Me.find((function(e){return"group_homework"===e})))&&{title:null==A?void 0:A.group_homework,dataIndex:"group_score",align:"center",ellipsis:!0,width:80},(null==Me?void 0:Me.find((function(e){return"graduation"===e})))&&{title:"毕设任务",dataIndex:"graduation_score",align:"center",width:80},(null==Me?void 0:Me.find((function(e){return"exercise"===e})))&&{title:null==A?void 0:A.exercise,dataIndex:"exercise_score",width:80,ellipsis:!0,align:"center"},{title:"总成绩",dataIndex:"total_score",width:80,align:"center",sorter:!0}].filter((function(e){return!!e})),We=(0,R.jsxs)("div",{className:"font12",children:["课堂总成绩 * 70 %",(0,R.jsx)("br",{}),"课堂活跃度 * 10%",(0,R.jsx)("br",{}),"课外学习成绩 * 20%",(0,R.jsx)("br",{}),"其中,课外学习成绩= 当前学生经验值 / 课堂学生经验值 最大值*100",(0,R.jsx)("br",{})]}),Be=(0,R.jsxs)("section",{className:I.dropmenu,children:[(0,R.jsx)("div",{style:{maxHeight:200,overflow:"auto"},children:(0,R.jsx)(g(),{initialLoad:!1,pageStart:1,threshold:20,loadMore:function(e){Ie()},hasMore:ue,useWindow:!1,children:(0,R.jsx)(j.Z,{style:{width:240,zIndex:10},children:T.group_count>0&&Pe.map((function(e,t){return(0,R.jsx)(j.Z.Item,{children:(0,R.jsx)(b.Z,{checked:F.includes(e.id),value:e.id,onChange:function(t){F.indexOf(e.id);F.indexOf(e.id)>-1?H(F.filter((function(t){return t!==e.id}))):H(F.concat(e.id))},children:e.name})},e.id)}))})})}),(0,R.jsx)("aside",{className:I.bg,children:(0,R.jsxs)("div",{children:[(0,R.jsx)(y.ZP,{type:"link",onClick:l()(s()().mark((function e(){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:x.group_ids=F,x.page=1,c(1==V?{type:"classroomList/getCourseWorkscore",payload:u()({},x)}:{type:"classroomList/getCourseActscore",payload:u()({},x)});case 3:case"end":return e.stop()}}),e)}))),children:"确定"}),(0,R.jsx)(y.ZP,{type:"link",onClick:function(){H([])},children:"重置"})]})})]}),$e=(0,R.jsxs)(j.Z,{style:{maxHeight:400,width:240,overflow:"auto"},children:[(0,R.jsx)(j.Z.Item,{onClick:l()(s()().mark((function e(){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,ke.fi)(u()(u()({},x),{},{group_id:x.group_ids||null}));case 2:-2===(null==(t=e.sent)?void 0:t.status)&&(re(t),ie(!0));case 4:case"end":return e.stop()}}),e)}))),children:"总成绩"},"1"),(0,R.jsx)(j.Z.Item,{onClick:l()(s()().mark((function e(){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,ke.j6)(u()(u()({},x),{},{group_id:x.group_ids||null}));case 2:-2===(null==(t=e.sent)?void 0:t.status)&&(re(t),ie(!0));case 4:case"end":return e.stop()}}),e)}))),children:"作业成绩"},"2"),(0,R.jsx)(j.Z.Item,{onClick:l()(s()().mark((function e(){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,ke.iA)(u()(u()({},x),{},{group_id:x.group_ids||null}));case 2:-2===(null==(t=e.sent)?void 0:t.status)&&(re(t),ie(!0));case 4:case"end":return e.stop()}}),e)}))),children:"试卷及其他成绩"},"3"),(null==z?void 0:z.mooc_course_id)&&(0,R.jsx)(j.Z.Item,{onClick:l()(s()().mark((function e(){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,ke._g)(u()(u()({},x),{},{group_id:x.group_ids||null}));case 2:-2===(null==(t=e.sent)?void 0:t.status)&&(re(t),ie(!0));case 4:case"end":return e.stop()}}),e)}))),children:"第三方慕课成绩"},"3"),(0,R.jsx)(j.Z.Item,{children:(0,R.jsx)(v.Link,{to:"/classrooms/".concat(x.coursesId,"/exportlist/course_total_score,course_total_homework,course_total_exercise_and_other"),children:"历史导出"})},"4")]}),ze=(0,R.jsxs)(j.Z,{style:{maxHeight:400,width:240,overflow:"auto"},children:[(0,R.jsx)(j.Z.Item,{onClick:l()(s()().mark((function e(){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,ke.cr)(u()(u()({},x),{},{group_id:x.group_ids||null}));case 2:-2===(null==(t=e.sent)?void 0:t.status)&&(re(t),ie(!0));case 4:case"end":return e.stop()}}),e)}))),children:"活跃度"},"3"),(0,R.jsx)(j.Z.Item,{children:(0,R.jsx)(v.Link,{to:"/classrooms/".concat(x.coursesId,"/exportlist/course_member_act_score"),children:"历史导出"})},"4")]});return(0,R.jsxs)("section",{children:[(0,R.jsxs)("aside",{className:I.bg,children:[(0,R.jsxs)(w.Z,{className:"plr30 pt30",children:[(0,R.jsx)(k.Z,{flex:1,children:(0,R.jsx)("span",{className:"font16",children:"明星学员"})}),(0,R.jsx)(k.Z,{children:(0,R.jsx)(N.Z,{placement:"rightBottom",content:We,title:"明星学员计算说明",trigger:"hover",children:(0,R.jsxs)("span",{className:"font12",children:["计算规则",(0,R.jsx)(je.Z,{className:"ml5"})]})})})]}),(0,R.jsx)(M,{})]}),(0,R.jsxs)("aside",{className:[I.bg,"mt20","plr30 ","mb20",I.tabs].join(" "),children:[(0,R.jsxs)("div",{className:I.rightAction,children:[(null==T?void 0:T.group_count)>0&&(0,he.GJ)()&&(0,R.jsx)(Z.Z,{dropdownRender:function(){return Be},open:U,onOpenChange:function(e){X(e)},children:(0,R.jsxs)("a",{className:"ant-dropdown-link current",onClick:function(e){return e.preventDefault()},children:["分班 ",(0,R.jsx)(be.Z,{})]})}),(0,he.RV)()&&"3"!==V&&(0,R.jsx)("span",{className:"c-blue ml20 current",onClick:function(){return Re()},children:"获取最新成绩"}),(0,he.GJ)()&&(0,R.jsx)(Z.Z,{dropdownRender:function(){return"1"===V?$e:ze},children:(0,R.jsxs)("a",{style:{marginLeft:"15px"},className:"ant-dropdown-link current",onClick:function(e){return e.preventDefault()},children:["导出",(0,R.jsx)(be.Z,{})]})})]}),(0,R.jsxs)(S.Z,{defaultActiveKey:V,onChange:function(e){x.page=1,Q(e)},style:{overflow:"3"===V?"initial":"hidden"},children:[(0,R.jsx)(S.Z.TabPane,{tab:(0,R.jsx)("span",{className:"font16",children:"学习成绩"}),children:null!==(n=W.course_members)&&void 0!==n&&n.length?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(C.Z,{columns:Te,dataSource:W.course_members,loading:i.effects["classroomList/getCourseWorkscore"],pagination:!1,onChange:function(e,t,n){console.log("---",n),n.order?(x.sort_by="total_score"===n.field?"score":n.field,x.sort=n.order,x.sort=x.sort.replace("end","")):delete x.sort,c({type:"classroomList/getCourseWorkscore",payload:u()({},x)})}}),(0,R.jsx)("aside",{className:"tc mb50 mt30",children:(0,R.jsx)(L.Z,{hideOnSinglePage:!0,showSizeChanger:!1,onChange:Oe,defaultCurrent:1,current:x.page||1,defaultPageSize:20,total:W.all_count})})]}):(0,R.jsx)(E.Z,{})},"1"),(0,R.jsx)(S.Z.TabPane,{tab:(0,R.jsx)("span",{className:"font16",children:"课堂活跃度"}),children:null!==(r=B.course_members)&&void 0!==r&&r.length?(0,R.jsxs)(P.Z,{spinning:i.effects["classroomList/getCourseActscore"],children:[(0,R.jsxs)("div",{className:I.ruleWrap,children:[(0,R.jsx)("h1",{className:"font16",children:"Top 10"}),(0,R.jsx)(N.Z,{placement:"bottom",content:(0,R.jsxs)("div",{children:["作业完成数(*10)",(0,R.jsx)("br",{}),"试卷完成数(*10)",(0,R.jsx)("br",{}),"问卷完成数(*7)",(0,R.jsx)("br",{}),"资源发布数(*5)",(0,R.jsx)("br",{}),"帖子发布数(*2)",(0,R.jsx)("br",{}),"帖子回复数(*1)",(0,R.jsx)("br",{}),"作业回复数(*1)"]}),title:"活动规则计算说明",trigger:"hover",children:(0,R.jsxs)("span",{className:"font12",children:["计算规则",(0,R.jsx)(je.Z,{className:"ml5"})]})})]}),(0,R.jsx)(me.Z,{option:B.course_members?{color:["#3398DB"],tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:[{type:"category",data:B.course_members.map((function(e){return e.user_name})),axisLabel:{interval:0}}],yAxis:[{type:"value"}],series:[{name:"活跃度",type:"bar",barWidth:"60%",data:B.course_members.map((function(e){return e.total_score}))}]}:{},className:"mb50"})]}):(0,R.jsx)(E.Z,{})},"2"),(0,R.jsx)(S.Z.TabPane,{tab:(0,R.jsx)("span",{className:"font16",children:"学习达成分析"}),children:(0,R.jsx)(_e,{groupIds:(null==x?void 0:x.group_ids)||[]})},"3")]}),(0,R.jsx)(we.Z,{res:ne,ismodel:oe,setismodel:ie})]})]})}))},77578:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});const r=e=>e?"function"==typeof e?e():e:null},39722:function(e,t,n){"use strict";n.d(t,{t5:function(){return d}});var r=n(92310),s=n.n(r),a=n(55477),o=n(59301),i=n(36355),l=n(77578),c=n(17356),u=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]])}return n};const d=e=>{const{hashId:t,prefixCls:n,className:r,style:i,placement:c="top",title:u,content:d,children:p}=e;return o.createElement("div",{className:s()(t,n,`${n}-pure`,`${n}-placement-${c}`,r),style:i},o.createElement("div",{className:`${n}-arrow`}),o.createElement(a.G,Object.assign({},e,{className:t,prefixCls:n}),p||((e,t,n)=>{if(t||n)return o.createElement(o.Fragment,null,t&&o.createElement("div",{className:`${e}-title`},(0,l.Z)(t)),o.createElement("div",{className:`${e}-inner-content`},(0,l.Z)(n)))})(n,u,d)))};t.ZP=e=>{const{prefixCls:t}=e,n=u(e,["prefixCls"]),{getPrefixCls:r}=o.useContext(i.E_),s=r("popover",t),[a,l]=(0,c.Z)(s);return a(o.createElement(d,Object.assign({},n,{prefixCls:s,hashId:l})))}},60324:function(e,t,n){"use strict";var r=n(92310),s=n.n(r),a=n(59301),o=n(77578),i=n(62892),l=n(36355),c=n(6848),u=n(39722),d=n(17356),p=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]])}return n};const m=e=>{let{title:t,content:n,prefixCls:r}=e;return a.createElement(a.Fragment,null,t&&a.createElement("div",{className:`${r}-title`},(0,o.Z)(t)),a.createElement("div",{className:`${r}-inner-content`},(0,o.Z)(n)))},h=a.forwardRef(((e,t)=>{const{prefixCls:n,title:r,content:o,overlayClassName:u,placement:h="top",trigger:f="hover",mouseEnterDelay:x=.1,mouseLeaveDelay:g=.1,overlayStyle:v={}}=e,_=p(e,["prefixCls","title","content","overlayClassName","placement","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle"]),{getPrefixCls:j}=a.useContext(l.E_),b=j("popover",n),[y,w]=(0,d.Z)(b),k=j(),N=s()(u,w);return y(a.createElement(c.Z,Object.assign({placement:h,trigger:f,mouseEnterDelay:x,mouseLeaveDelay:g,overlayStyle:v},_,{prefixCls:b,overlayClassName:N,ref:t,overlay:r||o?a.createElement(m,{prefixCls:b,title:r,content:o}):null,transitionName:(0,i.m)(k,"zoom-big",_.transitionName),"data-popover-inject":!0})))}));h._InternalPanelDoNotUseOrYouWillBeFired=u.ZP,t.Z=h},17356:function(e,t,n){"use strict";var r=n(17313),s=n(29878),a=n(19447),o=n(33166),i=n(83116),l=n(37613);const c=e=>{const{componentCls:t,popoverColor:n,minWidth:s,fontWeightStrong:o,popoverPadding:i,boxShadowSecondary:l,colorTextHeading:c,borderRadiusLG:u,zIndexPopup:d,marginXS:p,colorBgElevated:m,popoverBg:h}=e;return[{[t]:Object.assign(Object.assign({},(0,r.Wf)(e)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:d,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text",transformOrigin:"var(--arrow-x, 50%) var(--arrow-y, 50%)","--antd-arrow-background-color":m,"&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${t}-content`]:{position:"relative"},[`${t}-inner`]:{backgroundColor:h,backgroundClip:"padding-box",borderRadius:u,boxShadow:l,padding:i},[`${t}-title`]:{minWidth:s,marginBottom:p,color:c,fontWeight:o},[`${t}-inner-content`]:{color:n}})},(0,a.ZP)(e,{colorBg:"var(--antd-arrow-background-color)"}),{[`${t}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow,display:"inline-block",[`${t}-content`]:{display:"inline-block"}}}]},u=e=>{const{componentCls:t}=e;return{[t]:o.i.map((n=>{const r=e[`${n}6`];return{[`&${t}-${n}`]:{"--antd-arrow-background-color":r,[`${t}-inner`]:{backgroundColor:r},[`${t}-arrow`]:{background:"transparent"}}}}))}},d=e=>{const{componentCls:t,lineWidth:n,lineType:r,colorSplit:s,paddingSM:a,controlHeight:o,fontSize:i,lineHeight:l,padding:c}=e,u=o-Math.round(i*l);return{[t]:{[`${t}-inner`]:{padding:0},[`${t}-title`]:{margin:0,padding:`${u/2}px ${c}px ${u/2-n}px`,borderBottom:`${n}px ${r} ${s}`},[`${t}-inner-content`]:{padding:`${a}px ${c}px`}}}};t.Z=(0,i.Z)("Popover",(e=>{const{colorBgElevated:t,colorText:n,wireframe:r}=e,a=(0,l.TS)(e,{popoverPadding:12,popoverBg:t,popoverColor:n});return[c(a),u(a),r&&d(a),(0,s._y)(a,"zoom-big")]}),(e=>({width:177,minWidth:177,zIndexPopup:e.zIndexPopupBase+30})),{resetStyle:!1,deprecatedTokens:[["width","minWidth"]]})},51581:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(59301),a=i(s),o=i(n(12708));function i(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.scrollListener=n.scrollListener.bind(n),n.eventListenerOptions=n.eventListenerOptions.bind(n),n.mousewheelListener=n.mousewheelListener.bind(n),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"componentDidMount",value:function(){this.pageLoaded=this.props.pageStart,this.options=this.eventListenerOptions(),this.attachScrollListener()}},{key:"componentDidUpdate",value:function(){if(this.props.isReverse&&this.loadMore){var e=this.getParentElement(this.scrollComponent);e.scrollTop=e.scrollHeight-this.beforeScrollHeight+this.beforeScrollTop,this.loadMore=!1}this.attachScrollListener()}},{key:"componentWillUnmount",value:function(){this.detachScrollListener(),this.detachMousewheelListener()}},{key:"isPassiveSupported",value:function(){var e=!1,t={get passive(){e=!0}};try{document.addEventListener("test",null,t),document.removeEventListener("test",null,t)}catch(e){}return e}},{key:"eventListenerOptions",value:function(){var e=this.props.useCapture;return this.isPassiveSupported()&&(e={useCapture:this.props.useCapture,passive:!0}),e}},{key:"setDefaultLoader",value:function(e){this.defaultLoader=e}},{key:"detachMousewheelListener",value:function(){var e=window;!1===this.props.useWindow&&(e=this.scrollComponent.parentNode),e.removeEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture)}},{key:"detachScrollListener",value:function(){var e=window;!1===this.props.useWindow&&(e=this.getParentElement(this.scrollComponent)),e.removeEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),e.removeEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture)}},{key:"getParentElement",value:function(e){var t=this.props.getScrollParent&&this.props.getScrollParent();return null!=t?t:e&&e.parentNode}},{key:"filterProps",value:function(e){return e}},{key:"attachScrollListener",value:function(){var e=this.getParentElement(this.scrollComponent);if(this.props.hasMore&&e){var t=window;!1===this.props.useWindow&&(t=e),t.addEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture),t.addEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),t.addEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture),this.props.initialLoad&&this.scrollListener()}}},{key:"mousewheelListener",value:function(e){1!==e.deltaY||this.isPassiveSupported()||e.preventDefault()}},{key:"scrollListener",value:function(){var e=this.scrollComponent,t=window,n=this.getParentElement(e),r=void 0;if(this.props.useWindow){var s=document.documentElement||document.body.parentNode||document.body,a=void 0!==t.pageYOffset?t.pageYOffset:s.scrollTop;r=this.props.isReverse?a:this.calculateOffset(e,a)}else r=this.props.isReverse?n.scrollTop:e.scrollHeight-n.scrollTop-n.clientHeight;r<Number(this.props.threshold)&&e&&null!==e.offsetParent&&(this.detachScrollListener(),this.beforeScrollHeight=n.scrollHeight,this.beforeScrollTop=n.scrollTop,"function"==typeof this.props.loadMore&&(this.props.loadMore(this.pageLoaded+=1),this.loadMore=!0))}},{key:"calculateOffset",value:function(e,t){return e?this.calculateTopPosition(e)+(e.offsetHeight-t-window.innerHeight):0}},{key:"calculateTopPosition",value:function(e){return e?e.offsetTop+this.calculateTopPosition(e.offsetParent):0}},{key:"render",value:function(){var e=this,t=this.filterProps(this.props),n=t.children,r=t.element,s=t.hasMore,o=(t.initialLoad,t.isReverse),i=t.loader,l=(t.loadMore,t.pageStart,t.ref),c=(t.threshold,t.useCapture,t.useWindow,t.getScrollParent,function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["children","element","hasMore","initialLoad","isReverse","loader","loadMore","pageStart","ref","threshold","useCapture","useWindow","getScrollParent"]));c.ref=function(t){e.scrollComponent=t,l&&l(t)};var u=[n];return s&&(i?o?u.unshift(i):u.push(i):this.defaultLoader&&(o?u.unshift(this.defaultLoader):u.push(this.defaultLoader))),a.default.createElement(r,c,u)}}]),t}(s.Component);l.propTypes={children:o.default.node.isRequired,element:o.default.node,hasMore:o.default.bool,initialLoad:o.default.bool,isReverse:o.default.bool,loader:o.default.node,loadMore:o.default.func.isRequired,pageStart:o.default.number,ref:o.default.func,getScrollParent:o.default.func,threshold:o.default.number,useCapture:o.default.bool,useWindow:o.default.bool},l.defaultProps={element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null},t.default=l,e.exports=t.default},26724:function(e,t,n){e.exports=n(51581)}}]); |