-
this.props.qiandaoxiangq(false)}>
- this.props.qiandaoxiangq(false)}>
-
this.props.qiandaoxiangq(false)}>返回
+
this.props.qiandaoxiangq(false)}>
+ this.props.qiandaoxiangq(false)}>
{item && item.name}
diff --git a/public/react/src/modules/courses/signin/css/signincdi.css b/public/react/src/modules/courses/signin/css/signincdi.css
index 750d27a28..50fcceef4 100644
--- a/public/react/src/modules/courses/signin/css/signincdi.css
+++ b/public/react/src/modules/courses/signin/css/signincdi.css
@@ -108,6 +108,12 @@
.ws45s{
width: 45%;
}
+.ws46s{
+ width: 46%;
+}
+.ws47s{
+ width: 47%;
+}
.hs30s{
height: 30%;
}
@@ -476,3 +482,9 @@
.mr27{
margin-right: 27px;
}
+.pd15s{
+ padding-bottom: 15px !important;
+}
+.ml32{
+ margin-left: 32px;
+}
diff --git a/public/react/src/modules/courses/videostatistics/Videostatistics.js b/public/react/src/modules/courses/videostatistics/Videostatistics.js
index ba4891b2c..a199d95c4 100644
--- a/public/react/src/modules/courses/videostatistics/Videostatistics.js
+++ b/public/react/src/modules/courses/videostatistics/Videostatistics.js
@@ -4,6 +4,8 @@ import '../signin/css/signincdi.css';
import Videostatisticscom from './component/Videostatisticscom';
import Videostatisticslist from './component/Videostatisticslist';
import Videostatisticscomtwo from './component/Videostatisticscomtwo';
+import Studenticscom from './component/Studenticscom';
+import Studentstatistics from './component/Studentstatistics';
//在线学习
@@ -21,16 +23,23 @@ class Videostatistics extends Component{
}
componentDidMount() {
- this.togetdatas();
+ const myisAdmin= this.props&& this.props.isAdmin();
+ if(myisAdmin===true){
+ this.togetdatas();
+ }else{
+ this.togetdataStudent();
+ }
+
}
details=()=>{
}
togetdatas(){
+ console.log("视频统计老师");
const CourseId=this.props.match.params.coursesId;
let url=`/courses/${CourseId}/watch_statics.json`;
- axios.get(url).then((response) => {
+ axios.get(url,{params: {all:true}}).then((response) => {
if(response){
this.setState({
watch_staticsdata:response.data,
@@ -44,6 +53,24 @@ class Videostatistics extends Component{
});
}
+ togetdataStudent(){
+ console.log("视频统计学生数据");
+ const CourseId=this.props.match.params.coursesId;
+ let url=`/courses/${CourseId}/watch_statics.json`;
+ axios.get(url).then((response) => {
+ if(response){
+ this.setState({
+ watch_staticsdata:response.data,
+ })
+
+ }
+
+ }).catch((error) => {
+
+
+ });
+ }
+
tisticsbools=(bool,id,mytitle)=>{
this.setState({
tisticsbool:bool,
@@ -55,6 +82,7 @@ class Videostatistics extends Component{
render(){
let {watch_staticsdata,tisticsbool,tisid,mytitle}= this.state;
+ const isAdmin = this.props&& this.props.isAdmin();
return(
@@ -64,13 +92,22 @@ class Videostatistics extends Component{
+ {
+ isAdmin?
+
this.props.statisticsy(b)}>
+ :
+
this.props.statisticsy(b)}>
-
this.props.statisticsy(b)}>
+ }
- this.tisticsbools(b,id,t)}>
+ { isAdmin?
+ this.tisticsbools(b,id,t)}>
+ :
+ this.tisticsbools(b,id,t)}>
+ }
diff --git a/public/react/src/modules/courses/videostatistics/component/Studenticscom.js b/public/react/src/modules/courses/videostatistics/component/Studenticscom.js
new file mode 100644
index 000000000..ea9c20e8f
--- /dev/null
+++ b/public/react/src/modules/courses/videostatistics/component/Studenticscom.js
@@ -0,0 +1,108 @@
+import React, {Component} from "react";
+import '../../signin/css/signincdi.css';
+import {Progress, message} from 'antd';
+import {getImageUrl} from 'educoder';
+import axios from 'axios';
+
+
+
+//条目
+class Studenticscom extends Component {
+ //条目组件
+ constructor(props) {
+ super(props);
+
+ this.state = {}
+ }
+
+ componentDidMount() {
+
+ }
+
+ componentDidUpdate = (prevProps) => {
+
+
+ }
+
+
+
+ render() {
+
+ return (
+
+
+
+
+
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}开始统计
+
+
+
+
+
+
观看总次数(次)
+
{this.props.watch_staticsdata&&this.props.watch_staticsdata.freq?this.props.watch_staticsdata.freq:0}
+
+
+
+
+
+
+
+
观看总个数(个)
+
{this.props.watch_staticsdata&&this.props.watch_staticsdata.num?this.props.watch_staticsdata.num:0}
+
+
+
+
+
+
总观看时长(时)
+
{this.props.watch_staticsdata&&this.props.watch_staticsdata.total_duration?this.props.watch_staticsdata.total_duration:0}
+
+
+
+
+
+
+
+
+
+
+
+
+ )
+ }
+}
+
+export default Studenticscom;
diff --git a/public/react/src/modules/courses/videostatistics/component/Studentstatistics.js b/public/react/src/modules/courses/videostatistics/component/Studentstatistics.js
new file mode 100644
index 000000000..401c9ec5d
--- /dev/null
+++ b/public/react/src/modules/courses/videostatistics/component/Studentstatistics.js
@@ -0,0 +1,318 @@
+import React, {Component} from "react";
+import '../../signin/css/signincdi.css';
+import {Pagination,Table,Spin} from 'antd';
+import {getImageUrl,sortDirections,formatSeconds} from 'educoder';
+import axios from 'axios';
+import LoadingSpin from "../../../../common/LoadingSpin";
+import NoneDatas from "../../signin/component/NoneDatas";
+
+
+//条目
+class Studentstatistics extends Component {
+ //条目组件
+ constructor(props) {
+ super(props);
+
+ this.state = {
+ columnsstu: [
+ {
+ title: '序号',
+ dataIndex: 'number',
+ key: 'number',
+ align: "center",
+ className: 'font-14',
+ width: '90px',
+ render: (text, record) => (
+
{record.number}
+ ),
+ },
+ {
+ title: '视频名称',
+ dataIndex: 'title',
+ key: 'title',
+ align: "center",
+ className: 'font-14 maxnamewidth150s',
+ width: '150px',
+ render: (text, record) => (
+
+ {record.title}
+
+
+ ),
+ },
+ {
+ title: '观看次数(次)',
+ dataIndex: 'feq',
+ key: 'feq',
+ align: "center",
+ className: 'font-14',
+ width: '98px',
+ sorter: true,
+ sortDirections: sortDirections,
+ render: (text, record) => (
+
{record.feq}
+ ),
+ },
+ {
+ title: '观看时长',
+ dataIndex: 'total_duration',
+ key: 'total_duration',
+ align: "center",
+ className: 'font-14 maxnamewidth100s',
+ width: '100px',
+ sorter: true,
+ sortDirections: sortDirections,
+ render: (text, record) => (
+
+ {record.total_duration}
+
+
+ ),
+ },
+ {
+ title: '发布人',
+ dataIndex: 'user_name',
+ key: 'user_name',
+ align: "center",
+ className: 'font-14 maxnamewidth100s',
+ width: '100px',
+ render: (text, record) => (
+
+ {record.user_name}
+
+
+ ),
+ },
+ {
+ title: '是否看完',
+ dataIndex: 'is_finished',
+ key: 'is_finished',
+ align: "center",
+ className: 'font-14',
+ width: '90px',
+ render: (text, record) => (
+
{record.is_finished === true ?
+ 是 : 否}
+ ),
+ },
+ ],
+ loading:false,
+ data:[],
+ page:1,
+ limit:20,
+ members_count:0,
+ order:undefined,
+ }
+ }
+
+ componentDidMount() {
+ let data={
+ page:1,
+ order:this.state.order
+ }
+ this.togetdatas(data);
+
+ }
+
+ componentDidUpdate = (prevProps) => {
+
+
+ }
+ paginationonChange = (pageNumber) => {
+ this.setState({
+ page: pageNumber,
+ })
+ let data={
+ page:pageNumber,
+ order:this.state.order
+ }
+ this.togetdatas(data);
+ }
+
+
+ togetdatas(data){
+ this.setState({
+ loading:true
+ })
+ const CourseId=this.props.match.params.coursesId;
+ let url=`/courses/${CourseId}/own_watch_histories.json`;
+ axios.get(url,{params:data
+ }).then((response) => {
+ if (response) {
+ if (response.data) {
+ if (response.data.data.length > 0) {
+ let datalists = [];
+ for (var i = 0; i < response.data.data.length; i++) {
+ datalists.push({
+ number: (parseInt(this.state.page) - 1) * parseInt(this.state.limit) + (i + 1),
+ title: response.data.data[i].title,
+ user_name: response.data.data[i].user_name,
+ is_finished: response.data.data[i].is_finished,
+ 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,
+ })
+ }
+
+ this.setState({
+ data: datalists,
+ members_count: response.data.count,
+ })
+ } else {
+ this.setState({
+ data: [],
+ members_count: response.data.count,
+ })
+ }
+ } else {
+ this.setState({
+ data: [],
+ members_count: response.data.count,
+ })
+ }
+
+
+ }
+
+
+
+ this.setState({
+ loading:false
+ })
+ }).catch((error) => {
+ this.setState({
+ loading:false
+ })
+ });
+ }
+
+
+ //实训作业tbale 列表塞选数据
+ table1handleChange = (pagination, filters, sorter) => {
+ if (JSON.stringify(sorter) === "{}") {
+ //没有选择
+ } else {
+ try {
+ //学生学号排序
+ if (sorter.columnKey === "feq"||sorter.columnKey === "total_duration") {
+ let mysorder="";
+ if (sorter.order === "ascend") {
+ if(sorter.columnKey === "feq"){
+ mysorder="feq-asc";
+ }else{
+ mysorder="total_duration-asc";
+
+ }
+ //升序
+ let data={
+ page:this.state.page,
+ order:mysorder
+ }
+ this.togetdatas(data);
+ this.setState({
+ order: mysorder,
+ })
+ } else if (sorter.order === "descend") {
+ if(sorter.columnKey === "feq"){
+ mysorder="feq-desc";
+ }else{
+ mysorder="total_duration-desc";
+
+ }
+ //降序
+ let data={
+ page:this.state.page,
+ order:mysorder
+ }
+ this.togetdatas(data);
+ this.setState({
+ order: mysorder,
+ })
+ }
+ }
+ } catch (e) {
+
+ }
+
+ }
+
+ }
+
+
+
+ render() {
+ let {loading,data,columnsstu,page,members_count,limit}=this.state;
+ return (
+
+
+
+
+
+
+
+ {
+ data&&data.length===0?
+
+
+
+ : data&&data.length>0?
+
+
+ :
+
+
+
+ }
+
+
+
+
+
+
+
+ {
+ data&&data.length>0?
+
+ :""
+ }
+
+
+
+
+
+ )
+ }
+}
+
+export default Studentstatistics;
diff --git a/public/react/src/modules/courses/videostatistics/component/Videostatisticscom.js b/public/react/src/modules/courses/videostatistics/component/Videostatisticscom.js
index 849143b21..9b859cede 100644
--- a/public/react/src/modules/courses/videostatistics/component/Videostatisticscom.js
+++ b/public/react/src/modules/courses/videostatistics/component/Videostatisticscom.js
@@ -35,11 +35,12 @@ class Videostatisticscom extends Component {
}}>
-
this.props.statisticsy(false)} style={{color:'#5091FF'}}>
- this.props.statisticsy(false)} style={{color:'#5091FF'}}>
- {/*
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}开始统计
-
+
观看总人数(人)
-
{this.props.watch_staticsdata&&this.props.watch_staticsdata.people_num?this.props.watch_staticsdata.people_num:0}
+
{this.props.watch_staticsdata&&this.props.watch_staticsdata.num?this.props.watch_staticsdata.num:0}
-
+
观看总人次(次)
{this.props.watch_staticsdata&&this.props.watch_staticsdata.freq?this.props.watch_staticsdata.freq:0}
diff --git a/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js b/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js
index 1e7f4c173..801390923 100644
--- a/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js
+++ b/public/react/src/modules/courses/videostatistics/component/Videostatisticscomtwo.js
@@ -485,7 +485,7 @@ class Videostatisticscomtwo extends Component {
}}>
{
isAdmin === true ?
-
this.props.tisticsbools(false, null)}>
+
this.props.tisticsbools(false, null)}>
视频统计总览
:""
@@ -495,14 +495,14 @@ class Videostatisticscomtwo extends Component {
isAdmin === true ?
this.fenbanone()}>
trigger.parentNode} overlay={menu}
- placement="bottomCenter">
+ placement="bottomLeft">
分班
{
fbbool === true ?
-
+
:
-
+
}
diff --git a/public/react/src/modules/courses/videostatistics/component/Videostatisticslist.js b/public/react/src/modules/courses/videostatistics/component/Videostatisticslist.js
index 056191a4d..1a04ec8ab 100644
--- a/public/react/src/modules/courses/videostatistics/component/Videostatisticslist.js
+++ b/public/react/src/modules/courses/videostatistics/component/Videostatisticslist.js
@@ -250,9 +250,9 @@ class Videostatisticslist extends Component {
-
+
@@ -268,13 +268,13 @@ class Videostatisticslist extends Component {
{
- data.length===0?
+ data&&data.length===0?
- :
+ : data&&data.length>0?
+ :
+
+
+
}
diff --git a/public/stylesheets/educoder/iconfont/demo_index.html b/public/stylesheets/educoder/iconfont/demo_index.html
index 7a6d6b5e8..8b88a36ec 100644
--- a/public/stylesheets/educoder/iconfont/demo_index.html
+++ b/public/stylesheets/educoder/iconfont/demo_index.html
@@ -30,6 +30,12 @@
+ -
+
+
返回左键头
+ 
+
+
-
返回
@@ -2090,6 +2096,15 @@
+ -
+
+
+ 返回左键头
+
+ .icon-zuojiantou1
+
+
+
-
@@ -5134,6 +5149,14 @@
+ -
+
+
返回左键头
+ #icon-zuojiantou1
+
+
-