diff --git a/app/models/course.rb b/app/models/course.rb index d4d5387d5..e4c771765 100644 --- a/app/models/course.rb +++ b/app/models/course.rb @@ -161,7 +161,7 @@ class Course < ApplicationRecord end def videos_count - course_videos.where(video_id: videos.where("transcoded = 1 or videos.user_id = #{User.current.id}").pluck(:id)) + course_videos.where(video_id: videos.where("transcoded = 1")) .or(course_videos.where(course_videos: {is_link: true})).size end diff --git a/public/react/src/modules/courses/signin/css/signincdi.css b/public/react/src/modules/courses/signin/css/signincdi.css index 50fcceef4..a5e067ca6 100644 --- a/public/react/src/modules/courses/signin/css/signincdi.css +++ b/public/react/src/modules/courses/signin/css/signincdi.css @@ -472,7 +472,14 @@ white-space:nowrap; cursor: default; } - +.maxnamewidth90s{ + width: 90px; + max-width: 90px; + overflow:hidden; + text-overflow:ellipsis; + white-space:nowrap; + cursor: default; +} .font-14{ font-size: 14px !important; } diff --git a/public/react/src/modules/courses/videostatistics/component/Studenticscom.js b/public/react/src/modules/courses/videostatistics/component/Studenticscom.js index 5d1c81692..191e078b2 100644 --- a/public/react/src/modules/courses/videostatistics/component/Studenticscom.js +++ b/public/react/src/modules/courses/videostatistics/component/Studenticscom.js @@ -33,6 +33,20 @@ class Studenticscom extends Component {
+

this.props.statisticsy(false)} > diff --git a/public/react/src/modules/courses/videostatistics/component/Studentstatistics.js b/public/react/src/modules/courses/videostatistics/component/Studentstatistics.js index 44cdf6536..eb25dfbe6 100644 --- a/public/react/src/modules/courses/videostatistics/component/Studentstatistics.js +++ b/public/react/src/modules/courses/videostatistics/component/Studentstatistics.js @@ -252,6 +252,20 @@ class Studentstatistics extends Component { return (

+
diff --git a/public/react/src/modules/courses/videostatistics/component/Videostatisticscom.js b/public/react/src/modules/courses/videostatistics/component/Videostatisticscom.js index a16e0ed39..f6334f941 100644 --- a/public/react/src/modules/courses/videostatistics/component/Videostatisticscom.js +++ b/public/react/src/modules/courses/videostatistics/component/Videostatisticscom.js @@ -33,6 +33,20 @@ class Videostatisticscom extends Component {
+

this.props.statisticsy(false)} > diff --git a/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js b/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js index 702f90712..10301c8ea 100644 --- a/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js +++ b/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js @@ -28,7 +28,7 @@ class Videostatisticscomtwo extends Component { className: 'font-14', width: '50px', render: (text, record) => ( - {record.number} +

{record.number}
), }, { @@ -39,56 +39,56 @@ class Videostatisticscomtwo extends Component { className: 'font-14 maxnamewidth100s', width: '100px', render: (text, record) => ( - + ), }, { - title: '视频是否看完', + title: '是否看完', dataIndex: 'is_finished', key: 'is_finished', align: "center", - className: 'font-14', + className: 'font-14 maxnamewidth90s', width: '90px', render: (text, record) => ( - {record.is_finished === true ? - : } +
{record.is_finished === true ? + : }
), }, { - title: '视频累计观看时长', + title: '观看时长', dataIndex: 'total_duration', key: 'total_duration', align: "center", - className: 'font-14 maxnamewidth140s', - width: '140px', + className: 'font-14 maxnamewidth100s', + width: '100px', sorter: true, sortDirections: sortDirections, render: (text, record) => ( - {record.total_duration} + }} title={record.total_duration}>{record.total_duration}
), }, { - title: '累计观看次数(次)', + title: '观看次数', dataIndex: 'feq', key: 'feq', align: "center", - className: 'font-14 maxnamewidth140s', - width: '140px', + className: 'font-14 maxnamewidth100s', + width: '100px', sorter: true, sortDirections: sortDirections, render: (text, record) => ( - - + {record.feq} - +
), }, { @@ -96,14 +96,13 @@ class Videostatisticscomtwo extends Component { dataIndex: 'start_at', key: 'start_at', align: "center", - className: 'font-14 maxnamewidth90s', - width: '90px', + className: 'font-14 ', render: (text, record) => ( - - + {record.start_at} - + }} title={moment(record.start_at).format('YYYY-MM-DD HH:mm:ss')}> {moment(record.start_at).format('YYYY-MM-DD HH:mm:ss')} +
), }, { @@ -111,14 +110,13 @@ class Videostatisticscomtwo extends Component { dataIndex: 'end_at', key: 'end_at', align: "center", - className: 'font-14 maxnamewidth90s', - width: '90px', + className: 'font-14 ', render: (text, record) => ( - - + {record.end_at} - + }} title={moment(record.end_at).format('YYYY-MM-DD HH:mm:ss')}>{moment(record.end_at).format('YYYY-MM-DD HH:mm:ss')} +
), } ], @@ -475,6 +473,20 @@ class Videostatisticscomtwo extends Component { return (
+
{mytitle}
diff --git a/public/react/src/modules/courses/videostatistics/component/Videostatisticslist.js b/public/react/src/modules/courses/videostatistics/component/Videostatisticslist.js index 1a04ec8ab..049a9ebbb 100644 --- a/public/react/src/modules/courses/videostatistics/component/Videostatisticslist.js +++ b/public/react/src/modules/courses/videostatistics/component/Videostatisticslist.js @@ -249,6 +249,20 @@ class Videostatisticslist extends Component { return (
+