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__Video...

1 line
8.3 KiB

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[64217],{18477:function(e,t,n){n.r(t),n.d(t,{default:function(){return b}});var s=n(82242),a=n.n(s),i=n(79800),c=n.n(i),d=n(59301),r=n(51836),l=n(76279),o=n(96707),u=n(95237),_=n(43604),x=n(14491),g=n(53864),h=n(11407),m={flex_box_center:"flex_box_center___OtxZ1",flex_space_between:"flex_space_between___Iv0vg",flex_box_vertical_center:"flex_box_vertical_center___lRjIl",flex_box_center_end:"flex_box_center_end___RZyEa",flex_box_column:"flex_box_column___tnIy3",title:"title___BVf_l",statisticsWrp:"statisticsWrp___AFSeR",statistics:"statistics___VhLdy",infoWrp:"infoWrp___v6ya3",divwidth:"divwidth___QoNXd",table_caozuo:"table_caozuo___JPF0b",change_button:"change_button___C7wgN",button_no:"button_no___HL5ih",button_active:"button_active___zXAgk",caozuo_button:"caozuo_button___R4kUc",button_img:"button_img___H7JFl",studentListTable:"studentListTable___xqGFG"},f=n(57265),p=n(37712),b=(0,o.connect)((function(e){var t=e.video,n=e.loading;return{video:t,globalSetting:e.globalSetting,loading:n.effects}}))((function(e){var t=e.video,n=(e.globalSetting,e.loading),s=e.dispatch,i=(0,d.useState)(a()({},(0,o.useParams)())),b=c()(i,2),j=b[0],v=(b[1],(0,o.useSearchParams)()),S=c()(v,1)[0],N=((0,o.useLocation)(),(0,d.useState)({})),A=c()(N,2),I=A[0],k=A[1],y=(0,d.useState)(""),Z=c()(y,2),w=(Z[0],Z[1]),L=(0,d.useState)("a"),E=c()(L,2),C=E[0],W=E[1],B=(0,d.useState)(),K=c()(B,2),P=K[0],R=K[1],z=(0,d.useState)(),O=c()(z,2),X=O[0],V=O[1],D=t.videoStatisticsList,Q=t.videoStatistics;j.category=S.get("category_id"),(0,d.useEffect)((function(){s({type:"video/getVideoStatisticsList",payload:a()({},j)}),s({type:"video/getVideoStatistics",payload:a()(a()({},j),{},{all:!0})})}),[j.coursesId]);var q=[{title:"序号",dataIndex:"name",render:function(e,t,n){return n+1}},{title:"视频名称",dataIndex:"title"},{title:"观看人数",dataIndex:"people_num",sortOrder:I.people_num,sortDirections:["descend","ascend"],sorter:function(e,t){return e.people_num-t.people_num},render:function(e){return e||"--"}},{title:"观看时长",dataIndex:"total_time",sortOrder:I.total_time,sortDirections:["descend","ascend"],sorter:function(e,t){return e.total_time-t.total_time},render:function(e){return(0,p.jsx)("span",{children:e&&"--"!==e?(0,l.li)(e):"--"})}},{title:"发布人",dataIndex:"user_name"},{title:"操作",dataInex:"action",render:function(e,t){return(0,p.jsx)("div",{children:(0,p.jsx)(o.Link,{to:"/classrooms/".concat(j.coursesId,"/video/").concat(j.categoryId,"/statistics/").concat(t.id),className:"c-blue",children:"详情"})})}}],F=[{title:"姓名",dataIndex:"user_name",align:"center",fixed:"left",render:function(e,t,n){return(0,p.jsx)("span",{children:e})}},{title:"学号",dataIndex:"student_id",align:"center"},{title:"学习视频数",align:"center",dataIndex:"num",render:function(e){return(0,p.jsx)("span",{className:"c-black",children:e})}},{title:"班级",align:"center",dataIndex:"course_group_name"},{title:"累计学习时长",align:"center",dataIndex:"total_duration",render:function(e){return(0,p.jsx)("span",{className:"c-black",children:(0,l.li)(parseInt(e))||"--"})}},{title:"平均学习完成度",align:"center",dataIndex:"rate",render:function(e,t){return(0,p.jsx)("span",{className:"c-black",children:e?e+"%":"0%"})}},{title:"开始学习时间",align:"center",dataIndex:"start_at",render:function(e,t){return(0,p.jsx)("span",{className:"c-black",children:e||"--"})}},{title:"最后学习时间",align:"center",dataIndex:"end_at",render:function(e,t){return(0,p.jsx)("span",{className:"c-black",children:e||"--"})}},{title:"操作",align:"center",fixed:"right",dataIndex:"course_group_name",render:function(e,t){return(0,p.jsx)(o.Link,{to:"/classrooms/".concat(null==j?void 0:j.coursesId,"/video_statistics/").concat(null==j?void 0:j.categoryId,"/Student/").concat(null==t?void 0:t.user_id),children:"详情"})}}],U=function(e){V(e),(0,r.ZP)("/api/courses/".concat(null==j?void 0:j.coursesId,"/video_study_statics.json"),{method:"get",params:{page:e,per_page:10,course_id:null==j?void 0:j.coursesId,course_group_id:-1}}).then((function(e){e&&R(e)}))};return(0,p.jsxs)("section",{className:m.bg,children:[(0,p.jsxs)("aside",{className:m.statisticsWrp,children:[(0,p.jsxs)(u.Z,{justify:"space-between",className:"mt10 mb20",children:[(0,p.jsxs)(_.Z,{span:"16",children:[(0,p.jsx)(h.Z,{className:"current mr10 font16",onClick:function(){return o.history.back()}}),(0,p.jsx)("strong",{className:"font16",children:"视频统计总览"})]}),(0,p.jsxs)(_.Z,{span:"8",className:"c-light-black tr",children:["播放数据从 ",Q.begin_at," 开始统计"]})]}),(0,p.jsxs)(u.Z,{justify:"space-between",className:m.statistics,children:[(0,p.jsxs)(_.Z,{span:"7",children:[(0,p.jsx)("span",{children:"观看人数 (人)"}),(0,p.jsx)("br",{}),(0,p.jsx)("strong",{title:Q.num,className:m.divwidth,children:Q.num})]}),(0,p.jsxs)(_.Z,{span:"7",children:[(0,p.jsx)("span",{children:"观看总人次 (次)"}),(0,p.jsx)("br",{}),(0,p.jsx)("strong",{title:Q.freq,className:m.divwidth,children:Q.freq})]}),(0,p.jsxs)(_.Z,{span:"7",children:[(0,p.jsx)("span",{children:"总观看时长 (时)"}),(0,p.jsx)("br",{}),(0,p.jsx)("strong",{title:Q.total_duration?(0,l.li)(Q.total_duration):"--",className:m.divwidth,children:Q.total_duration?(0,l.li)(Q.total_duration):"--"})]})]})]}),(0,p.jsxs)("aside",{className:m.infoWrp,children:[(0,p.jsx)("div",{children:(0,p.jsx)("strong",{className:"font16",children:"统计列表"})}),(0,p.jsxs)("div",{className:m.table_caozuo,children:[(0,p.jsx)("div",{className:m.change_button,children:"a"===C?(0,p.jsxs)("div",{style:{display:"flex"},children:[(0,p.jsx)("div",{className:m.button_active,children:"视频维度"}),(0,p.jsx)("div",{className:m.button_no,onClick:function(){W("b"),U(1)},children:"学生维度"})]}):(0,p.jsxs)("div",{style:{display:"flex"},children:[(0,p.jsx)("div",{className:m.button_no,onClick:function(){W("a")},children:"视频维度"}),(0,p.jsx)("div",{className:m.button_active,children:"学生维度"})]})}),(0,p.jsxs)("div",{className:m.caozuo_button,children:[(0,p.jsx)("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAcCAYAAAB/E6/TAAAAAXNSR0IArs4c6QAAAtpJREFUSEu1lm9oTWEcx7+/57rbLLWE9oJQxPy7O2erSXmhRHlDEnnjxTkXS/6k1ChFWMv2Bomku3PLG3snEl5IvDB/yr3nXCEWa01ZQ8SV7e7u+WqzLbu7f3Yuztvn+/t+zvP8vr/nHEERj2m5x+JR46SfUvEjHtUattcnIs3x1tDxydYXDQJZKoJjccc4NRnYpEG1lrdyUKFKaakkdBOBwDBA5KjrVDcVghUEmba3EUQzwapcZgrqcCwaaskHywuqsRKWFkZAqvwm0gcVrIq3Lu3KpcsJMq2OWZAfHSQq8h6LSL9ANsed0O2idmTaXphkZKQP7wFcFeCJKHyh5h0SQUBSCtwSixo3i+6RYXtnQB4UyK1yKd3+0Kn6PhZvy+sXoVCprW4kdL0QZDgzuUSm5Q0l61AgWDb72eXFn/7UGZaXVKJ2QOGtJpdn8xBQBwVPnkaqO/ODwq5Not51jJWZRsbOxKYpDHxIM/0ob1BEkuUlWNB+qbo3547q9r6akfrZf911jNXZ3rgmnNintT4/3CeFTRD5OKrTohQG040g1quArI1Fqu/ljbcZ9i5WlE5puH9xWTITZlreAYLnRNAVd4z5E9bDicPU+rSIWhd3Qnezgjbs7yj9OZgK9mk1sz81sLCiLPA40+hbX3qPJluKBpm2ewRE49gVUyBSRYMM2+sGOWf0HhNhd95BZCAZc1Zc8310pu32kpgF4KsbNaZPZkayaczMHtXufjGXg+mlo2KSbb+vHaEIe/yD5E1QwRqgbBsXBsP2ekBW+jfMXSFAO5S6kQl6jhzT/TdwEWkjuX0s3kPffwIn/sY0a61IEuS0MVDdLndRKo3X/xw0YjhuYA3bi4E0/wdsHKjGSjRo6Ob/DjLDL+dRD3QCLPgP4fdlJtx1pu21k1zl16iQfiIo7O6gxpVChX7XBWpNPBp6MO6oaizvLIF6gmV+DXNE/F3J1JK6pxeWfP4Fq1RgLKZBv/kAAAAASUVORK5CYII=",className:m.button_img}),(0,p.jsx)("div",{onClick:function(){(0,f.c6)({coursesId:null==j?void 0:j.coursesId,course_group_id:-1})},children:"导出数据"})]})]}),"a"==C&&(0,p.jsx)(x.Z,{className:"mt10",loading:n["video/getVideoStatisticsList"],hideOnSinglePage:!0,pagination:!1,dataSource:D.videos,columns:q,onChange:function(e,t,n){if(I={},void 0===n.order){if(I[n.field]="descend","student_id"===n.field)w("descend"),j.order=n.field+"-desc"}else j.order=n.field+"-"+n.order.replace("end",""),I[n.field]=n.order;k(a()({},I)),s({type:"video/getVideoStatisticsList",payload:a()({},j)})}}),"b"==C&&(0,p.jsxs)("aside",{children:[(0,p.jsx)(x.Z,{dataSource:null==P?void 0:P.student,pagination:!1,columns:F,className:m.studentListTable,scroll:{x:"max-content"}}),(0,p.jsx)("aside",{className:"tc mb50 mt30 mb20",children:(0,p.jsx)(g.Z,{hideOnSinglePage:!0,showSizeChanger:!1,onChange:function(e,t){U(e)},current:X||1,defaultPageSize:10,total:null==P?void 0:P.count})})]})]}),(0,p.jsx)("aside",{className:"tc mb50 mt30",children:(0,p.jsx)(g.Z,{showSizeChanger:!1,onChange:function(e){j.page=e,s({type:"video/getVideoStatisticsList",payload:a()({},j)})},defaultCurrent:1,current:j.page||1,pageSize:20,hideOnSinglePage:!0,total:null==D?void 0:D.count})})]})}))}}]);