"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[69944],{2959:function(e,t,n){n.r(t),n.d(t,{default:function(){return h}});var s=n(82242),i=n.n(s),a=n(79800),r=n.n(a),c=n(59301),l=n(83287),o=n(49389),d=n(95237),_=n(43604),u=n(1710),x=n(33853),f={flex_box_center:"flex_box_center___UzlZa",flex_space_between:"flex_space_between___KKZHe",flex_box_vertical_center:"flex_box_vertical_center___MrgBG",flex_box_center_end:"flex_box_center_end___nVkIU",flex_box_column:"flex_box_column___RgI94",title:"title___fjM5C",statisticsWrp:"statisticsWrp___zLCOn",statistics:"statistics____Sl6u",infoWrp:"infoWrp____84Lx"},g=n(37712),h=(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,a=(0,c.useState)(i()({},(0,o.useParams)())),h=r()(a,2),p=h[0],j=(h[1],(0,o.useSearchParams)()),b=r()(j,1)[0],m=(0,c.useState)(1),S=r()(m,2),v=S[0],y=S[1],Z=((0,o.useLocation)(),t.StudentvideoStatistics),N=t.videoStatistics;p.category=b.get("category_id"),(0,c.useEffect)((function(){s({type:"video/getStudentVideoStatisticsList",payload:i()(i()({},p),{},{page:v})}),s({type:"video/getVideoStatistics",payload:i()({},p)})}),[p.coursesId]);var I=[{title:"序号",dataIndex:"name",render:function(e,t,n){return n+1}},{title:"视频名称",dataIndex:"title"},{title:"观看次数",dataIndex:"freq",render:function(e){return e||"--"}},{title:"观看时长",dataIndex:"total_duration",render:function(e){return(0,g.jsx)("span",{children:e?(0,l.li)(e):"--"})}},{title:"发布人",dataIndex:"user_name"},{title:"是否看完",dataInex:"is_finished",render:function(e,t,n){return(0,g.jsx)("span",{children:null!=e&&e.is_finished?"是":"否"})}}];return(0,g.jsxs)("section",{className:f.bg,children:[(0,g.jsxs)("aside",{className:f.statisticsWrp,children:[(0,g.jsxs)(d.Z,{justify:"space-between",className:"mt10 mb20",children:[(0,g.jsxs)(_.Z,{span:"16",children:[(0,g.jsx)(x.Z,{className:"current mr10 font16",onClick:function(){return o.history.back()}}),(0,g.jsx)("strong",{className:"font16",children:"视频统计总览"})]}),(0,g.jsxs)(_.Z,{span:"8",className:"c-light-black tr",children:["播放数据从 ",N.begin_at," 开始统计"]})]}),(0,g.jsxs)(d.Z,{justify:"space-between",className:f.statistics,children:[(0,g.jsxs)(_.Z,{span:"7",children:[(0,g.jsx)("span",{children:"观看总次数 （次）"}),(0,g.jsx)("br",{}),(0,g.jsx)("strong",{children:N.freq})]}),(0,g.jsxs)(_.Z,{span:"7",children:[(0,g.jsx)("span",{children:"观看总个数 （个）"}),(0,g.jsx)("br",{}),(0,g.jsx)("strong",{children:N.num})]}),(0,g.jsxs)(_.Z,{span:"7",children:[(0,g.jsx)("span",{children:"总观看时常 （时）"}),(0,g.jsx)("br",{}),(0,g.jsx)("strong",{children:(0,l.li)(N.total_duration)})]})]})]}),(0,g.jsxs)("aside",{className:f.infoWrp,children:[(0,g.jsx)("div",{children:(0,g.jsx)("strong",{className:"font16",children:"统计列表"})}),(0,g.jsx)(u.Z,{className:"mt20",loading:n["video/getStudentVideoStatisticsList"],pagination:{position:["bottomCenter"],hideOnSinglePage:!0,total:null==Z?void 0:Z.count,current:v,showSizeChanger:!1,defaultPageSize:20},dataSource:null==Z?void 0:Z.data,columns:I,onChange:function(e,t,n){y(e.current),s({type:"video/getStudentVideoStatisticsList",payload:i()(i()({},p),{},{page:e.current})})}})]})]})}))}}]);