-
{record.title}
@@ -60,12 +61,12 @@ class Videostatisticslist extends Component {
dataIndex: 'people_num',
key: 'people_num',
align: "center",
- className: 'font-14',
- width: '98px',
+ className: 'font-14 width150s',
sorter: true,
sortDirections: sortDirections,
+ width:150,
render: (text, record) => (
-
{record.people_num}
+
{record.people_num}
),
},
{
@@ -73,12 +74,12 @@ class Videostatisticslist extends Component {
dataIndex: 'total_time',
key: 'total_time',
align: "center",
- className: 'font-14 maxnamewidth100s ',
- width: '100px',
+ className: 'font-14 width150s ',
sorter: true,
sortDirections: sortDirections,
+ width:150,
render: (text, record) => (
-
+
-
{record.total_time}
@@ -105,10 +106,10 @@ class Videostatisticslist extends Component {
dataIndex: 'user_name',
key: 'user_name',
align: "center",
- className: 'font-14 maxnamewidth100s',
- width: '100px',
+ className: 'font-14 width150s',
+ width:150,
render: (text, record) => (
-
+
- {record.user_name}
@@ -136,9 +137,8 @@ class Videostatisticslist extends Component {
key: 'id',
align: "center",
className: 'font-14',
- width: '50px',
render: (text, record) => (
- this.props.tisticsbools(true,record.id,record.title)}>详情
+ this.props.tisticsbools(true,record.id,record.title)}>详情
),
}
],
From a853f3d57b1b2d693f275240b98b29b520c0e7c0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Wed, 18 Mar 2020 02:04:06 +0800
Subject: [PATCH 2/9] =?UTF-8?q?=E5=90=88=E5=B9=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../courses/videostatistics/component/Videostatisticscomtwo.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js b/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js
index df7be0c7b..a05be5a39 100644
--- a/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js
+++ b/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js
@@ -159,6 +159,7 @@ class Videostatisticscomtwo extends Component {
{
record.start_at?
{moment(record.start_at).format('YYYY-MM-DD HH:mm:ss')}
:
--
@@ -191,7 +192,7 @@ class Videostatisticscomtwo extends Component {
{
record.end_at?
{moment(record.end_at).format('YYYY-MM-DD HH:mm:ss')}
:
--
From cb51a001559a3369c720c4fbc7e7e9e17e1bc154 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Wed, 18 Mar 2020 02:23:38 +0800
Subject: [PATCH 3/9] =?UTF-8?q?=E5=90=88=E5=B9=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/react/src/AppConfig.js | 2 +-
.../modules/courses/signin/css/signincdi.css | 4 ++++
.../component/Studentstatistics.js | 18 +++++++++---------
3 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js
index 7c52d64ae..41adf5bef 100644
--- a/public/react/src/AppConfig.js
+++ b/public/react/src/AppConfig.js
@@ -46,7 +46,7 @@ debugType="admin";
// 老师
// debugType="teacher";
// 学生
-// debugType="student";
+ debugType="student";
diff --git a/public/react/src/modules/courses/signin/css/signincdi.css b/public/react/src/modules/courses/signin/css/signincdi.css
index e93a0032e..c8156fdfb 100644
--- a/public/react/src/modules/courses/signin/css/signincdi.css
+++ b/public/react/src/modules/courses/signin/css/signincdi.css
@@ -532,3 +532,7 @@
.width150s{
width: 150px !important;
}
+.widh150pxwp{
+ wordWrap: break-word;
+ wordBreak: break-word
+}
diff --git a/public/react/src/modules/courses/videostatistics/component/Studentstatistics.js b/public/react/src/modules/courses/videostatistics/component/Studentstatistics.js
index 06eda7f4d..8c6a463af 100644
--- a/public/react/src/modules/courses/videostatistics/component/Studentstatistics.js
+++ b/public/react/src/modules/courses/videostatistics/component/Studentstatistics.js
@@ -31,10 +31,10 @@ class Studentstatistics extends Component {
dataIndex: 'title',
key: 'title',
align: "center",
- className: 'font-14 width200s',
- width: 200,
+ className: 'font-14 maxnamewidth150s',
+ width: '150px',
render: (text, record) => (
-
),
},
{
@@ -110,7 +110,7 @@ class Studentstatistics extends Component {
width: '100px',
render: (text, record) => (
-
- {record.total_time}
From 943c93aa494ce4f9c97159514f443ebb5f92d6bf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Wed, 18 Mar 2020 02:38:35 +0800
Subject: [PATCH 6/9] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../courses/videostatistics/component/Studentstatistics.js | 6 +++---
.../videostatistics/component/Videostatisticslist.js | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/public/react/src/modules/courses/videostatistics/component/Studentstatistics.js b/public/react/src/modules/courses/videostatistics/component/Studentstatistics.js
index 8c6a463af..16e8bddb2 100644
--- a/public/react/src/modules/courses/videostatistics/component/Studentstatistics.js
+++ b/public/react/src/modules/courses/videostatistics/component/Studentstatistics.js
@@ -30,7 +30,7 @@ class Studentstatistics extends Component {
title: '视频名称',
dataIndex: 'title',
key: 'title',
- align: "center",
+ align: "left",
className: 'font-14 maxnamewidth150s',
width: '150px',
render: (text, record) => (
@@ -79,7 +79,7 @@ class Studentstatistics extends Component {
sorter: true,
sortDirections: sortDirections,
render: (text, record) => (
-
+
-
{record.total_duration}
diff --git a/public/react/src/modules/courses/videostatistics/component/Videostatisticslist.js b/public/react/src/modules/courses/videostatistics/component/Videostatisticslist.js
index 5d6a18742..bc10e6d9f 100644
--- a/public/react/src/modules/courses/videostatistics/component/Videostatisticslist.js
+++ b/public/react/src/modules/courses/videostatistics/component/Videostatisticslist.js
@@ -30,7 +30,7 @@ class Videostatisticslist extends Component {
title: '视频名称',
dataIndex: 'title',
key: 'title',
- align: "center",
+ align: "left",
className: 'font-14 width200s widh150wpos',
width:200,
render: (text, record) => (
@@ -79,7 +79,7 @@ class Videostatisticslist extends Component {
sortDirections: sortDirections,
width:100,
render: (text, record) => (
-
+
-
{record.total_time}
From b54f9ad588a0a5c58d1aa06585474daa328a37cf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Wed, 18 Mar 2020 02:44:10 +0800
Subject: [PATCH 7/9] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../courses/videostatistics/component/Videostatisticslist.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/public/react/src/modules/courses/videostatistics/component/Videostatisticslist.js b/public/react/src/modules/courses/videostatistics/component/Videostatisticslist.js
index bc10e6d9f..5280633c5 100644
--- a/public/react/src/modules/courses/videostatistics/component/Videostatisticslist.js
+++ b/public/react/src/modules/courses/videostatistics/component/Videostatisticslist.js
@@ -57,7 +57,7 @@ class Videostatisticslist extends Component {
),
},
{
- title: '观看人数(人)',
+ title: '观看人数',
dataIndex: 'people_num',
key: 'people_num',
align: "center",
From a404745774be724a098f5e8b27a7676c68bc0cc0 Mon Sep 17 00:00:00 2001
From: cxt <853663049@qq.com>
Date: Wed, 18 Mar 2020 09:52:29 +0800
Subject: [PATCH 8/9] =?UTF-8?q?=E4=BA=8C=E7=BA=A7=E7=9B=AE=E5=BD=95?=
=?UTF-8?q?=E7=9A=84=E6=98=BE=E7=A4=BA=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/files/index.json.jbuilder | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/app/views/files/index.json.jbuilder b/app/views/files/index.json.jbuilder
index 67258daf5..6debc3757 100644
--- a/app/views/files/index.json.jbuilder
+++ b/app/views/files/index.json.jbuilder
@@ -17,10 +17,15 @@ json.data do
end
# json.partial! "files/course_groups", attachment_group_settings: attachment.attachment_group_settings
json.category_id attachment.course_second_category_id
- if (@course_second_category_id.to_i == 0 && attachment.course_second_category.present?) || (@parent_category_id == 0 && attachment.course_second_category&.parent_id.to_i != 0)
+ if @course_second_category_id.to_i == 0 && attachment.course_second_category.present?
json.category_name attachment.course_second_category&.name
json.parent_category_name attachment.course_second_category&.parent&.name
end
+
+ if @parent_category_id == 0 && attachment.course_second_category&.parent_id.to_i != 0
+ json.category_name attachment.course_second_category&.name
+ json.parent_category_name nil
+ end
end
end
end
From 8a410b569b7ac993840f67c2cdb3b05aa8e826c8 Mon Sep 17 00:00:00 2001
From: cxt <853663049@qq.com>
Date: Wed, 18 Mar 2020 11:04:10 +0800
Subject: [PATCH 9/9] =?UTF-8?q?=E8=B5=84=E6=BA=90=E7=9A=84=E7=88=B6?=
=?UTF-8?q?=E7=9B=AE=E5=BD=95=E9=9C=80=E7=BB=9F=E8=AE=A1=E5=AD=90=E7=9B=AE?=
=?UTF-8?q?=E5=BD=95=E4=B8=AA=E6=95=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/helpers/courses_helper.rb | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/app/helpers/courses_helper.rb b/app/helpers/courses_helper.rb
index 4e088c0fd..03779a237 100644
--- a/app/helpers/courses_helper.rb
+++ b/app/helpers/courses_helper.rb
@@ -251,7 +251,13 @@ module CoursesHelper
# 获取课堂的资源数
def get_attachment_count(course, category_id)
identity = current_user.course_identity(course)
- attachments = category_id.to_i == 0 ? course.attachments : course.attachments.where(course_second_category_id: category_id)
+ if category_id.to_i == 0
+ attachments = course.attachments
+ else
+ # children_ids = CourseSecondCategory.where(parent_id: category_id).pluck(:id)
+ # category_ids = [category_id] + children_ids
+ attachments = course.attachments.joins(:course_second_category).where(course_second_categories: {id: category_id}).or(course.attachments.joins(:course_second_category).where(course_second_categories: {parent_id: category_id}))
+ end
identity > Course::ASSISTANT_PROFESSOR ? attachments.published.size : attachments.size
end