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
4.9 KiB

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[60533],{59396:function(e,t,n){n.r(t),n.d(t,{default:function(){return h}});var i=n(82242),a=n.n(i),s=n(79800),r=n.n(s),o=n(59301),d=n(27876),c=n(80608),l=n(38854),u=n(6848),_=n(51945),p=n(86859),f=n(40578),x={flex_box_center:"flex_box_center___Ox04Y",flex_space_between:"flex_space_between___C6xrA",flex_box_vertical_center:"flex_box_vertical_center___ND_1v",flex_box_center_end:"flex_box_center_end___YRYaf",flex_box_column:"flex_box_column___DUfSG",title:"title___kEuJZ",statisticsWrp:"statisticsWrp___VC_CA",infoWrp:"infoWrp___y79ks",warp_task_hide:"warp_task_hide___MGcfK",task_hide:"task_hide___Qc3Yt"},g=n(37712),h=(0,c.connect)((function(e){var t=e.video,n=e.loading,i=e.globalSetting,a=e.classroomList;return{video:t,globalSetting:i,loading:n.effects,classroomList:a}}))((function(e){var t=e.video,n=(e.globalSetting,e.loading),i=e.classroomList,s=e.dispatch,h=(0,o.useState)(a()({},(0,c.useParams)())),m=r()(h,2),y=m[0],v=m[1],j=(0,c.useSearchParams)(),S=r()(j,1)[0],b=((0,c.useLocation)(),(0,o.useState)({})),w=r()(b,2),k=w[0],N=w[1],C=(0,o.useState)(""),L=r()(C,2),I=(L[0],L[1],i.actionTabs,i.courseGroups,i.allCourseGroups),V=t.newVideoStatisticsList,Z=(t.videoStatistics,[{type:"",name:"全部"},{type:"finished",name:"已看完"},{type:"unfinished",name:"未看完"},{type:"unopened",name:"未观看"}]),G=(0,o.useState)(""),O=r()(G,2),P=O[0],W=O[1],q=(0,o.useState)(""),A=r()(q,2),D=A[0],R=A[1];y.category=S.get("category_id"),(0,o.useEffect)((function(){s({type:"video/getNewVideoStatisticsList",payload:a()({},y)}),s({type:"classroomList/getAllCourseGroup",payload:a()({},y)})}),[y.coursesId]);var Y=[{title:"序号",dataIndex:"name",render:function(e,t,n){return 20*((y.page||1)-1)+n+1}},{title:"用户",dataIndex:"user_name"},{title:"是否看完",dataIndex:"is_finished",render:function(e){return e?(0,g.jsx)("span",{className:"c-green",children:"是"}):(0,g.jsx)("span",{className:"c-red",children:"否"})}},{title:"观看次数",dataIndex:"feq",sortOrder:k.feq,sortDirections:["descend","ascend"],sorter:function(e,t){return e.feq-t.feq},render:function(e){return e||"--"}},{title:"观看时长",dataIndex:"total_duration",sortOrder:k.total_duration,sortDirections:["descend","ascend"],sorter:function(e,t){return e.total_duration-t.total_duration},render:function(e){return(0,g.jsx)("span",{children:e&&"--"!==e?(0,d.li)(e):"--"})}},{title:"最早观看时间",dataIndex:"start_at",render:function(e,t){return(0,g.jsx)("span",{children:e||"--"})}},{title:"最晚观看时间",dataInex:"end_at",render:function(e,t){return(0,g.jsx)("span",{children:t.end_at||"--"})}}];return(0,g.jsxs)("section",{className:x.bg,children:[(0,g.jsxs)("aside",{className:x.infoWrp,children:[(0,g.jsxs)("div",{style:{display:"flex"},children:[(0,g.jsxs)("div",{style:{flex:"1"},children:[(0,g.jsx)(f.Z,{className:"current mr10 font16",onClick:function(){return c.history.back()}}),(0,g.jsx)("strong",{className:"font16",children:S.get("title")})]}),(0,g.jsx)(l.Z,{placement:"bottomCenter",dropdownRender:function(){return(0,g.jsx)("div",{style:{background:"#fff",padding:"0px 10px",cursor:"pointer",width:"100px",textAlign:"center"},children:null==Z?void 0:Z.map((function(e){return(0,g.jsx)("p",{className:x.task_hide,style:{color:P===e.type?"#0152d9":"initial"},onClick:function(){W(e.type),y.page=1,v(a()({},y)),s({type:"video/getNewVideoStatisticsList",payload:a()(a()({},y),{},{status:e.type,group_id:D})})},children:e.name})}))})},arrow:!0,children:(0,g.jsx)("span",{style:{marginRight:"40px",cursor:"default"},children:"观看状态"})}),(0,g.jsx)(l.Z,{placement:"bottomCenter",dropdownRender:function(){var e;return(0,g.jsx)("div",{className:x.warp_task_hide,children:null===(e=[{id:"",name:"全部"},{id:0,name:"未分班"}].concat((null==I?void 0:I.course_groups)||[]))||void 0===e?void 0:e.map((function(e,t){return(0,g.jsx)(u.Z,{title:e.name,children:(0,g.jsx)("p",{className:x.task_hide,style:{color:D===e.id?"#0152d9":"initial"},onClick:function(){R(e.id),y.page=1,v(a()({},y)),s({type:"video/getNewVideoStatisticsList",payload:a()(a()({},y),{},{group_id:e.id,status:P})})},children:e.name})})}))})},arrow:!0,children:(0,g.jsx)("span",{style:{cursor:"default"},children:"分班"})})]}),(0,g.jsx)(_.Z,{className:"mt20",loading:n["video/getNewVideoStatisticsList"],hideOnSinglePage:!0,pagination:!1,dataSource:(null==V?void 0:V.data)||[],columns:Y,onChange:function(e,t,n){k={},void 0===n.order?y.order="":(y.order=n.field+"-"+n.order.replace("end",""),k[n.field]=n.order),N(a()({},k)),s({type:"video/getNewVideoStatisticsList",payload:a()(a()({},y),{},{status:P,group_id:D})})}})]}),(0,g.jsx)("aside",{className:"tc mb50 mt30",children:(0,g.jsx)(p.Z,{showSizeChanger:!1,onChange:function(e){y.page=e,s({type:"video/getNewVideoStatisticsList",payload:a()(a()({},y),{},{status:P,group_id:D,page:e})})},current:y.page||1,defaultPageSize:20,hideOnSinglePage:!0,total:null==V?void 0:V.count})})]})}))}}]);