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.
1 line
14 KiB
1 line
14 KiB
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[64217],{89136:function(e,t,n){n.d(t,{Z:function(){return l}});var s=n(1565),a=n(59301),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},r=n(68475),o=function(e,t){return a.createElement(r.Z,(0,s.Z)({},e,{ref:t,icon:i}))};var l=a.forwardRef(o)},70843:function(e,t,n){n.r(t),n.d(t,{default:function(){return O}});var s=n(82242),a=n.n(s),i=n(79800),r=n.n(i),o=n(59301),l=n(51136),c=n(6457),d=n(7880),u=n(95237),p=n(43604),f=n(14491),m=n(53864),g=n(11407),x="statisticsWrp___AFSeR",v="statistics___VhLdy",h="infoWrp___v6ya3",b="divwidth___QoNXd",j="table_caozuo___JPF0b",_="change_button___C7wgN",y="button_no___HL5ih",C="button_active___zXAgk",S="caozuo_button___R4kUc",N="button_img___H7JFl",E="studentListTable___xqGFG",k="bg___U4gVx",Z=n(84717),A=n(37712),O=(0,d.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,o.useState)(a()({},(0,d.useParams)())),O=r()(i,2),I=O[0],w=(O[1],(0,d.useSearchParams)()),P=r()(w,1)[0],z=((0,d.useLocation)(),(0,o.useState)({})),L=r()(z,2),B=L[0],R=L[1],D=(0,o.useState)(""),M=r()(D,2),Q=(M[0],M[1]),K=(0,o.useState)("a"),q=r()(K,2),V=q[0],X=q[1],F=(0,o.useState)(),W=r()(F,2),T=W[0],U=W[1],J=(0,o.useState)(),H=r()(J,2),G=H[0],Y=H[1],$=t.videoStatisticsList,ee=t.videoStatistics;I.category=P.get("category_id"),(0,o.useEffect)((function(){s({type:"video/getVideoStatisticsList",payload:a()({},I)}),s({type:"video/getVideoStatistics",payload:a()(a()({},I),{},{all:!0})})}),[I.coursesId]);var te=[{title:"序号",dataIndex:"name",render:function(e,t,n){return n+1}},{title:"视频名称",dataIndex:"title"},{title:"观看人数",dataIndex:"people_num",sortOrder:B.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:B.total_time,sortDirections:["descend","ascend"],sorter:function(e,t){return e.total_time-t.total_time},render:function(e){return(0,A.jsx)("span",{children:e?(0,c.li)(e):"--"})}},{title:"发布人",dataIndex:"user_name"},{title:"操作",dataInex:"action",render:function(e,t){return(0,A.jsx)("div",{children:(0,A.jsx)(d.Link,{to:"/classrooms/".concat(I.coursesId,"/video/").concat(I.categoryId,"/statistics/").concat(t.id),className:"c-blue",children:"详情"})})}}],ne=[{title:"姓名",dataIndex:"user_name",align:"center",fixed:"left",render:function(e,t,n){return(0,A.jsx)("span",{children:e})}},{title:"学号",dataIndex:"student_id",align:"center"},{title:"学习视频数",align:"center",dataIndex:"num",render:function(e){return(0,A.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,A.jsx)("span",{className:"c-black",children:(0,c.li)(parseInt(e))||"--"})}},{title:"平均学习完成度",align:"center",dataIndex:"rate",render:function(e,t){return(0,A.jsx)("span",{className:"c-black",children:e?e+"%":"0%"})}},{title:"开始学习时间",align:"center",dataIndex:"start_at",render:function(e,t){return(0,A.jsx)("span",{className:"c-black",children:e||"--"})}},{title:"最后学习时间",align:"center",dataIndex:"end_at",render:function(e,t){return(0,A.jsx)("span",{className:"c-black",children:e||"--"})}},{title:"操作",align:"center",fixed:"right",dataIndex:"course_group_name",render:function(e,t){return(0,A.jsx)(d.Link,{to:"/classrooms/".concat(null==I?void 0:I.coursesId,"/video_statistics/").concat(null==I?void 0:I.categoryId,"/Student/").concat(null==t?void 0:t.user_id),children:"详情"})}}],se=function(e){Y(e),(0,l.ZP)("/api/courses/".concat(null==I?void 0:I.coursesId,"/video_study_statics.json"),{method:"get",params:{page:e,per_page:10,course_id:null==I?void 0:I.coursesId,course_group_id:-1}}).then((function(e){e&&U(e)}))};return(0,A.jsxs)("section",{className:k,children:[(0,A.jsxs)("aside",{className:x,children:[(0,A.jsxs)(u.Z,{justify:"space-between",className:"mt10 mb20",children:[(0,A.jsxs)(p.Z,{span:"16",children:[(0,A.jsx)(g.Z,{className:"current mr10 font16",onClick:function(){return d.history.back()}}),(0,A.jsx)("strong",{className:"font16",children:"视频统计总览"})]}),(0,A.jsxs)(p.Z,{span:"8",className:"c-light-black tr",children:["播放数据从 ",ee.begin_at," 开始统计"]})]}),(0,A.jsxs)(u.Z,{justify:"space-between",className:v,children:[(0,A.jsxs)(p.Z,{span:"7",children:[(0,A.jsx)("span",{children:"观看人数 (人)"}),(0,A.jsx)("br",{}),(0,A.jsx)("strong",{title:ee.num,className:b,children:ee.num})]}),(0,A.jsxs)(p.Z,{span:"7",children:[(0,A.jsx)("span",{children:"观看总人次 (次)"}),(0,A.jsx)("br",{}),(0,A.jsx)("strong",{title:ee.freq,className:b,children:ee.freq})]}),(0,A.jsxs)(p.Z,{span:"7",children:[(0,A.jsx)("span",{children:"总观看时长 (时)"}),(0,A.jsx)("br",{}),(0,A.jsx)("strong",{title:ee.total_duration?(0,c.li)(ee.total_duration):"--",className:b,children:ee.total_duration?(0,c.li)(ee.total_duration):"--"})]})]})]}),(0,A.jsxs)("aside",{className:h,children:[(0,A.jsx)("div",{children:(0,A.jsx)("strong",{className:"font16",children:"统计列表"})}),(0,A.jsxs)("div",{className:j,children:[(0,A.jsx)("div",{className:_,children:"a"===V?(0,A.jsxs)("div",{style:{display:"flex"},children:[(0,A.jsx)("div",{className:C,children:"视频维度"}),(0,A.jsx)("div",{className:y,onClick:function(){X("b"),se(1)},children:"学生维度"})]}):(0,A.jsxs)("div",{style:{display:"flex"},children:[(0,A.jsx)("div",{className:y,onClick:function(){X("a")},children:"视频维度"}),(0,A.jsx)("div",{className:C,children:"学生维度"})]})}),(0,A.jsxs)("div",{className:S,children:[(0,A.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:N}),(0,A.jsx)("div",{onClick:function(){(0,Z.c6)({coursesId:null==I?void 0:I.coursesId,course_group_id:-1})},children:"导出数据"})]})]}),"a"==V&&(0,A.jsx)(f.Z,{className:"mt10",loading:n["video/getVideoStatisticsList"],hideOnSinglePage:!0,pagination:!1,dataSource:$.videos,columns:te,onChange:function(e,t,n){if(B={},void 0===n.order){if(B[n.field]="descend","student_id"===n.field)Q("descend"),I.order=n.field+"-desc"}else I.order=n.field+"-"+n.order.replace("end",""),B[n.field]=n.order;R(a()({},B)),s({type:"video/getVideoStatisticsList",payload:a()({},I)})}}),"b"==V&&(0,A.jsxs)("aside",{children:[(0,A.jsx)(f.Z,{dataSource:null==T?void 0:T.student,pagination:!1,columns:ne,className:E,scroll:{x:"max-content"}}),(0,A.jsx)("aside",{className:"tc mb50 mt30 mb20",children:(0,A.jsx)(m.Z,{hideOnSinglePage:!0,showSizeChanger:!1,onChange:function(e,t){se(e)},current:G||1,defaultPageSize:10,total:null==T?void 0:T.count})})]})]}),"a"==V&&(0,A.jsx)("aside",{className:"tc mb50 mt30",children:(0,A.jsx)(m.Z,{showSizeChanger:!1,onChange:function(e){I.page=e,s({type:"video/getVideoStatisticsList",payload:a()({},I)})},defaultCurrent:1,current:I.page||1,pageSize:20,hideOnSinglePage:!0,total:null==$?void 0:$.count})})]})}))},98135:function(e,t,n){n.d(t,{Z:function(){return P}});var s=n(92310),a=n.n(s),i=n(59301),r=n(36355),o=n(32441),l=n(9937);var c=e=>{const{getPrefixCls:t,direction:n}=(0,i.useContext)(r.E_),{prefixCls:s,className:c}=e,d=t("input-group",s),u=t("input"),[p,f]=(0,l.ZP)(u),m=a()(d,{[`${d}-lg`]:"large"===e.size,[`${d}-sm`]:"small"===e.size,[`${d}-compact`]:e.compact,[`${d}-rtl`]:"rtl"===n},f,c),g=(0,i.useContext)(o.aM),x=(0,i.useMemo)((()=>Object.assign(Object.assign({},g),{isFormItemInput:!1})),[g]);return p(i.createElement("span",{className:m,style:e.style,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onFocus:e.onFocus,onBlur:e.onBlur},i.createElement(o.aM.Provider,{value:x},e.children)))},d=n(9432),u=n(1565),p={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"},f=n(68475),m=function(e,t){return i.createElement(f.Z,(0,u.Z)({},e,{ref:t,icon:p}))};var g=i.forwardRef(m),x=n(89136),v=n(70521),h=n(16863),b=n(59412),j=function(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(s=Object.getOwnPropertySymbols(e);a<s.length;a++)t.indexOf(s[a])<0&&Object.prototype.propertyIsEnumerable.call(e,s[a])&&(n[s[a]]=e[s[a]])}return n};const _=e=>e?i.createElement(x.Z,null):i.createElement(g,null),y={click:"onClick",hover:"onMouseOver"};var C=i.forwardRef(((e,t)=>{const{visibilityToggle:n=!0}=e,s="object"==typeof n&&void 0!==n.visible,[o,l]=(0,i.useState)((()=>!!s&&n.visible)),c=(0,i.useRef)(null);i.useEffect((()=>{s&&l(n.visible)}),[s,n]);const u=(0,b.Z)(c),p=()=>{const{disabled:t}=e;t||(o&&u(),l((e=>{var t;const s=!e;return"object"==typeof n&&(null===(t=n.onVisibleChange)||void 0===t||t.call(n,s)),s})))},{className:f,prefixCls:m,inputPrefixCls:g,size:x}=e,C=j(e,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:S}=i.useContext(r.E_),N=S("input",g),E=S("input-password",m),k=n&&(t=>{const{action:n="click",iconRender:s=_}=e,a=y[n]||"",r=s(o),l={[a]:p,className:`${t}-icon`,key:"passwordIcon",onMouseDown:e=>{e.preventDefault()},onMouseUp:e=>{e.preventDefault()}};return i.cloneElement(i.isValidElement(r)?r:i.createElement("span",null,r),l)})(E),Z=a()(E,f,{[`${E}-${x}`]:!!x}),A=Object.assign(Object.assign({},(0,v.Z)(C,["suffix","iconRender","visibilityToggle"])),{type:o?"text":"password",className:Z,prefixCls:N,suffix:k});return x&&(A.size=x),i.createElement(d.Z,Object.assign({ref:(0,h.sQ)(t,c)},A))})),S=n(11013),N=n(92343),E=n(3113),k=n(19716),Z=n(33234),A=function(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(s=Object.getOwnPropertySymbols(e);a<s.length;a++)t.indexOf(s[a])<0&&Object.prototype.propertyIsEnumerable.call(e,s[a])&&(n[s[a]]=e[s[a]])}return n};var O=i.forwardRef(((e,t)=>{const{prefixCls:n,inputPrefixCls:s,className:o,size:l,suffix:c,enterButton:u=!1,addonAfter:p,loading:f,disabled:m,onSearch:g,onChange:x,onCompositionStart:v,onCompositionEnd:b}=e,j=A(e,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:_,direction:y}=i.useContext(r.E_),C=i.useRef(!1),O=_("input-search",n),I=_("input",s),{compactSize:w}=(0,Z.ri)(O,y),P=(0,k.Z)((e=>{var t;return null!==(t=null!=l?l:w)&&void 0!==t?t:e})),z=i.useRef(null),L=e=>{var t;document.activeElement===(null===(t=z.current)||void 0===t?void 0:t.input)&&e.preventDefault()},B=e=>{var t,n;g&&g(null===(n=null===(t=z.current)||void 0===t?void 0:t.input)||void 0===n?void 0:n.value,e,{source:"input"})},R="boolean"==typeof u?i.createElement(S.Z,null):null,D=`${O}-button`;let M;const Q=u||{},K=Q.type&&!0===Q.type.__ANT_BUTTON;M=K||"button"===Q.type?(0,N.Tm)(Q,Object.assign({onMouseDown:L,onClick:e=>{var t,n;null===(n=null===(t=null==Q?void 0:Q.props)||void 0===t?void 0:t.onClick)||void 0===n||n.call(t,e),B(e)},key:"enterButton"},K?{className:D,size:P}:{})):i.createElement(E.ZP,{className:D,type:u?"primary":void 0,size:P,disabled:m,key:"enterButton",onMouseDown:L,onClick:B,loading:f,icon:R},u),p&&(M=[M,(0,N.Tm)(p,{key:"addonAfter"})]);const q=a()(O,{[`${O}-rtl`]:"rtl"===y,[`${O}-${P}`]:!!P,[`${O}-with-button`]:!!u},o);return i.createElement(d.Z,Object.assign({ref:(0,h.sQ)(z,t),onPressEnter:e=>{C.current||f||B(e)}},j,{size:P,onCompositionStart:e=>{C.current=!0,null==v||v(e)},onCompositionEnd:e=>{C.current=!1,null==b||b(e)},prefixCls:I,addonAfter:M,suffix:c,onChange:e=>{e&&e.target&&"click"===e.type&&g&&g(e.target.value,e,{source:"clear"}),x&&x(e)},className:q,disabled:m}))})),I=n(1643);const w=d.Z;w.Group=c,w.Search=O,w.TextArea=I.Z,w.Password=C;var P=w}}]); |