diff --git a/public/react/src/modules/courses/videostatistics/component/Videostatisticscom.js b/public/react/src/modules/courses/videostatistics/component/Videostatisticscom.js
index 1111b6509..3c12ff424 100644
--- a/public/react/src/modules/courses/videostatistics/component/Videostatisticscom.js
+++ b/public/react/src/modules/courses/videostatistics/component/Videostatisticscom.js
@@ -35,6 +35,10 @@ class Videostatisticscom extends Component {
}}>
+
this.props.statisticsy(false)} >
+ this.props.statisticsy(false)}>
+
this.props.statisticsy(false)}>返回
+
视频统计总览
播放数据从{this.props.watch_staticsdata&&this.props.watch_staticsdata.begin_at?this.props.watch_staticsdata.begin_at:0}开始统计
diff --git a/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js b/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js
index b64cd06ac..8c4025143 100644
--- a/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js
+++ b/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js
@@ -203,7 +203,7 @@ class Videostatisticscomtwo extends Component {
number: (parseInt(this.state.page) - 1) * parseInt(this.state.limit) + (i + 1),
user_name: response.data.data[i].user_name,
is_finished: response.data.data[i].is_finished,
- total_duration: response.data.data[i].total_duration,
+ total_duration: response.data.data[i].total_duration?formatSeconds(response.data.data[i].total_duration):0,
feq: response.data.data[i].feq,
start_at: response.data.data[i].start_at,
end_at: response.data.data[i].end_at,
@@ -291,10 +291,24 @@ class Videostatisticscomtwo extends Component {
}
} else {
- data = {
- id: CourseId,
- page: this.state.page
+ try {
+ if(id!==null&&id===0){
+ data = {
+ id: CourseId,
+ page: this.state.page,
+ group_id: id
+ }
+ }else{
+ data = {
+ id: CourseId,
+ page: this.state.page
+ }
+ }
+
+ }catch (e) {
+
}
+
}
this.getdatas(data);
}
diff --git a/public/react/src/modules/courses/videostatistics/component/Videostatisticslist.js b/public/react/src/modules/courses/videostatistics/component/Videostatisticslist.js
index fa24c9c32..a30d872de 100644
--- a/public/react/src/modules/courses/videostatistics/component/Videostatisticslist.js
+++ b/public/react/src/modules/courses/videostatistics/component/Videostatisticslist.js
@@ -152,7 +152,7 @@ class Videostatisticslist extends Component {
number: (parseInt(this.state.page) - 1) * parseInt(this.state.limit) + (i + 1),
title: response.data.videos[i].title,
people_num: response.data.videos[i].people_num,
- total_time: response.data.videos[i].total_time,
+ total_time: response.data.videos[i].total_time?formatSeconds(response.data.videos[i].total_time):0,
user_name: response.data.videos[i].user_name,
id: response.data.videos[i].id,
})
From 25e6feccec7855f60ee17d6bf44b9b753a144056 Mon Sep 17 00:00:00 2001
From: anke1460
Date: Tue, 17 Mar 2020 11:43:14 +0800
Subject: [PATCH 2/3] =?UTF-8?q?fix=20=E8=A7=86=E9=A2=91=E7=9C=8B=E5=AE=8C?=
=?UTF-8?q?=E6=B2=A1=E6=A0=87=E8=AE=B0=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/services/create_watch_video_service.rb | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/app/services/create_watch_video_service.rb b/app/services/create_watch_video_service.rb
index 0f1b32814..5a3813571 100644
--- a/app/services/create_watch_video_service.rb
+++ b/app/services/create_watch_video_service.rb
@@ -33,12 +33,10 @@ class CreateWatchVideoService < ApplicationService
if watch_course_video.present?
watch_course_video.total_duration = watch_course_video.watch_video_histories.sum(:total_duration)
watch_course_video.end_at = current_time
- if !watch_course_video.is_finished && watch_course_video.watch_duration < params[:watch_duration]
+ if !watch_course_video.is_finished
# 更新课程视频的时长及是否看完状态
- watch_course_video.watch_duration = params[:watch_duration]
- if params[:ed].present?
- watch_course_video.is_finished = watch_course_video.total_duration >= watch_course_video.duration
- end
+ watch_course_video.watch_duration = params[:watch_duration] if watch_course_video.watch_duration < params[:watch_duration]
+ watch_course_video.is_finished = watch_course_video.total_duration >= watch_course_video.duration if params[:ed].present?
end
watch_course_video.save!
end
From b4703c01eb7b3efa33365834c8dccce33be9f57c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Tue, 17 Mar 2020 11:46:09 +0800
Subject: [PATCH 3/3] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/modules/courses/signin/css/signincdi.css | 13 ++++++++++++-
.../component/Videostatisticscom.js | 2 +-
.../component/Videostatisticscomtwo.js | 16 ++++++++--------
3 files changed, 21 insertions(+), 10 deletions(-)
diff --git a/public/react/src/modules/courses/signin/css/signincdi.css b/public/react/src/modules/courses/signin/css/signincdi.css
index 9416de345..cdd41eede 100644
--- a/public/react/src/modules/courses/signin/css/signincdi.css
+++ b/public/react/src/modules/courses/signin/css/signincdi.css
@@ -100,7 +100,10 @@
width: 80%;
}
.ws50s{
- width: 50%;
+ width: 50%;
+ }
+.ws40s{
+ width: 40%;
}
.hs30s{
height: 30%;
@@ -425,6 +428,14 @@
white-space:nowrap;
cursor: default;
}
+.maxnamewidth90s{
+ width: 90px;
+ max-width: 90px;
+ overflow:hidden;
+ text-overflow:ellipsis;
+ white-space:nowrap;
+ cursor: default;
+}
.maxnamewidth100s{
width: 100px;
max-width: 100px;
diff --git a/public/react/src/modules/courses/videostatistics/component/Videostatisticscom.js b/public/react/src/modules/courses/videostatistics/component/Videostatisticscom.js
index 3c12ff424..dff57d642 100644
--- a/public/react/src/modules/courses/videostatistics/component/Videostatisticscom.js
+++ b/public/react/src/modules/courses/videostatistics/component/Videostatisticscom.js
@@ -39,7 +39,7 @@ class Videostatisticscom extends Component {
this.props.statisticsy(false)}>
this.props.statisticsy(false)}>返回
- 视频统计总览
+ 视频统计总览
播放数据从{this.props.watch_staticsdata&&this.props.watch_staticsdata.begin_at?this.props.watch_staticsdata.begin_at:0}开始统计