|
|
|
@ -5,6 +5,7 @@ import {getImageUrl, sortDirections,formatSeconds} from 'educoder';
|
|
|
|
|
import axios from 'axios';
|
|
|
|
|
import LoadingSpin from "../../../../common/LoadingSpin";
|
|
|
|
|
import NoneDatas from "../../signin/component/NoneDatas";
|
|
|
|
|
import moment from 'moment';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//条目
|
|
|
|
@ -52,9 +53,9 @@ class Videostatisticscomtwo extends Component {
|
|
|
|
|
key: 'is_finished',
|
|
|
|
|
align: "center",
|
|
|
|
|
className: 'font-14',
|
|
|
|
|
width: '98px',
|
|
|
|
|
width: '90px',
|
|
|
|
|
render: (text, record) => (
|
|
|
|
|
<span style={{width: '98px'}}>{record.is_finished === true ?
|
|
|
|
|
<span style={{width: '90px'}}>{record.is_finished === true ?
|
|
|
|
|
<span style={{color: "#5091FF"}}>是</span> : <span style={{color: "#E02020"}}>否</span>}</span>
|
|
|
|
|
),
|
|
|
|
|
},
|
|
|
|
@ -63,12 +64,12 @@ class Videostatisticscomtwo extends Component {
|
|
|
|
|
dataIndex: 'total_duration',
|
|
|
|
|
key: 'total_duration',
|
|
|
|
|
align: "center",
|
|
|
|
|
className: 'font-14 maxnamewidth150s',
|
|
|
|
|
width: '150px',
|
|
|
|
|
className: 'font-14 maxnamewidth140s',
|
|
|
|
|
width: '140px',
|
|
|
|
|
sorter: true,
|
|
|
|
|
sortDirections: sortDirections,
|
|
|
|
|
render: (text, record) => (
|
|
|
|
|
<span style={{width: '150px'}} className="maxnamewidth150s"><a className="maxnamewidth150s" style={{
|
|
|
|
|
<span style={{width: '140px'}} className="maxnamewidth140s"><a className="maxnamewidth140s" style={{
|
|
|
|
|
color:"#333333"
|
|
|
|
|
}} title={record.total_duration}>{record.total_duration}</a></span>
|
|
|
|
|
),
|
|
|
|
@ -78,13 +79,13 @@ class Videostatisticscomtwo extends Component {
|
|
|
|
|
dataIndex: 'feq',
|
|
|
|
|
key: 'feq',
|
|
|
|
|
align: "center",
|
|
|
|
|
className: 'font-14 maxnamewidth100s',
|
|
|
|
|
width: '100px',
|
|
|
|
|
className: 'font-14 maxnamewidth140s',
|
|
|
|
|
width: '140px',
|
|
|
|
|
sorter: true,
|
|
|
|
|
sortDirections: sortDirections,
|
|
|
|
|
render: (text, record) => (
|
|
|
|
|
<span style={{width: '100px'}} className="maxnamewidth100s">
|
|
|
|
|
<a className="maxnamewidth100s" style={{
|
|
|
|
|
<span style={{width: '140px'}} className="maxnamewidth140s">
|
|
|
|
|
<a className="maxnamewidth140s" style={{
|
|
|
|
|
color:"#333333"
|
|
|
|
|
}} title={record.feq}>{record.feq}</a>
|
|
|
|
|
</span>
|
|
|
|
@ -95,13 +96,13 @@ class Videostatisticscomtwo extends Component {
|
|
|
|
|
dataIndex: 'start_at',
|
|
|
|
|
key: 'start_at',
|
|
|
|
|
align: "center",
|
|
|
|
|
className: 'font-14 maxnamewidth100s',
|
|
|
|
|
width: '100px',
|
|
|
|
|
className: 'font-14 maxnamewidth90s',
|
|
|
|
|
width: '90px',
|
|
|
|
|
render: (text, record) => (
|
|
|
|
|
<span style={{width: '100px'}} >
|
|
|
|
|
<a className="maxnamewidth100s" style={{
|
|
|
|
|
<span style={{width: '90px'}} >
|
|
|
|
|
<a className="maxnamewidth90s" style={{
|
|
|
|
|
color:"#333333"
|
|
|
|
|
}} title= {record.start_at}> {record.start_at}</a>
|
|
|
|
|
}} title= {moment(record.start_at).format('YYYY-MM-DD HH:mm:ss')}> {record.start_at}</a>
|
|
|
|
|
</span>
|
|
|
|
|
),
|
|
|
|
|
},
|
|
|
|
@ -110,13 +111,13 @@ class Videostatisticscomtwo extends Component {
|
|
|
|
|
dataIndex: 'end_at',
|
|
|
|
|
key: 'end_at',
|
|
|
|
|
align: "center",
|
|
|
|
|
className: 'font-14 maxnamewidth100s',
|
|
|
|
|
width: '100px',
|
|
|
|
|
className: 'font-14 maxnamewidth90s',
|
|
|
|
|
width: '90px',
|
|
|
|
|
render: (text, record) => (
|
|
|
|
|
<span style={{width: '100px'}} >
|
|
|
|
|
<a className="maxnamewidth100s" style={{
|
|
|
|
|
<span style={{width: '90px'}} >
|
|
|
|
|
<a className="maxnamewidth90s" style={{
|
|
|
|
|
color:"#333333"
|
|
|
|
|
}} title= {record.end_at}>{record.end_at}</a>
|
|
|
|
|
}} title={moment(record.end_at).format('YYYY-MM-DD HH:mm:ss')}>{record.end_at}</a>
|
|
|
|
|
</span>
|
|
|
|
|
),
|
|
|
|
|
}
|
|
|
|
@ -126,6 +127,7 @@ class Videostatisticscomtwo extends Component {
|
|
|
|
|
course_groups: [],
|
|
|
|
|
fbbool: false,
|
|
|
|
|
groupsid: null,
|
|
|
|
|
none_group_member_count:0,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -164,9 +166,9 @@ class Videostatisticscomtwo extends Component {
|
|
|
|
|
let url = `/courses/${CourseId}/course_groups.json`;
|
|
|
|
|
axios.get(url).then((response) => {
|
|
|
|
|
if (response) {
|
|
|
|
|
console.log("分班");
|
|
|
|
|
console.log("response");
|
|
|
|
|
console.log(response);
|
|
|
|
|
// console.log("分班");
|
|
|
|
|
// console.log("response");
|
|
|
|
|
// console.log(response);
|
|
|
|
|
this.setState({
|
|
|
|
|
course_groups: response.data.course_groups,
|
|
|
|
|
current_group_id: response.data.current_group_id,
|
|
|
|
@ -206,6 +208,7 @@ class Videostatisticscomtwo extends Component {
|
|
|
|
|
feq: response.data.data[i].feq,
|
|
|
|
|
start_at: response.data.data[i].start_at,
|
|
|
|
|
end_at: response.data.data[i].end_at,
|
|
|
|
|
title: response.data.data[i].title,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -288,12 +291,26 @@ class Videostatisticscomtwo extends Component {
|
|
|
|
|
group_id: id
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -398,7 +415,7 @@ class Videostatisticscomtwo extends Component {
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
|
let {loading, data, page, limit, members_count, columnsstu, fbbool, course_groups} = this.state;
|
|
|
|
|
const isAdmin = this.props.isAdmin();
|
|
|
|
|
const isAdmin = this.props&& this.props.isAdmin();
|
|
|
|
|
|
|
|
|
|
const menu = (
|
|
|
|
|
<Menu>
|
|
|
|
@ -423,21 +440,57 @@ class Videostatisticscomtwo extends Component {
|
|
|
|
|
:
|
|
|
|
|
""
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
this.state.none_group_member_count&&this.state.none_group_member_count>0?
|
|
|
|
|
<Menu.Item>
|
|
|
|
|
<a onClick={() => this.setcourse_groups(0)}>
|
|
|
|
|
<p className="maxnamewidth200yss">未分班</p>
|
|
|
|
|
</a>
|
|
|
|
|
</Menu.Item>
|
|
|
|
|
:
|
|
|
|
|
""
|
|
|
|
|
}
|
|
|
|
|
</Menu>
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
let mytitle="";
|
|
|
|
|
if(isAdmin){
|
|
|
|
|
mytitle=this.props&&this.props.mytitle;
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
if(this.state.data){
|
|
|
|
|
if(this.state.data.length>0){
|
|
|
|
|
try {
|
|
|
|
|
if(this.state.data[0].title){
|
|
|
|
|
mytitle=this.state.data[0].title;
|
|
|
|
|
}
|
|
|
|
|
}catch (e) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<React.Fragment>
|
|
|
|
|
<div className="ws100s">
|
|
|
|
|
<div className="ws100s teacherentrydivss edu-back-white ">
|
|
|
|
|
<div className="ws100s sortinxdirection">
|
|
|
|
|
<div className="ws50s sptits">视频名称视频名称…</div>
|
|
|
|
|
<div className="ws50s sptits font-18">{mytitle}</div>
|
|
|
|
|
<div className="ws50s sptitss xaxisreverseorder font-14" style={{
|
|
|
|
|
color: "#5091FF",
|
|
|
|
|
lineHeight: "42px",
|
|
|
|
|
}}>
|
|
|
|
|
{
|
|
|
|
|
isAdmin === true ?
|
|
|
|
|
<div className="xiaoshou" onClick={() => this.props.tisticsbools(false, null)}>
|
|
|
|
|
<span className="mr5 xiaoshou">视频统计总览</span><i className="iconfont icon-fanhui font-13 xiaoshou"></i>
|
|
|
|
|
</div>
|
|
|
|
|
:""
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
isAdmin === true ?
|
|
|
|
|
<div className="xiaoshou" onClick={() => this.fenbanone()}>
|
|
|
|
@ -447,9 +500,9 @@ class Videostatisticscomtwo extends Component {
|
|
|
|
|
<span className="mr5 xiaoshou">分班</span>
|
|
|
|
|
{
|
|
|
|
|
fbbool === true ?
|
|
|
|
|
<i className="iconfont icon-sanjiaoxing-down font-13 mr32 xiaoshou"></i>
|
|
|
|
|
:
|
|
|
|
|
<i className="iconfont icon-sanjiaoxing-up font-13 mr32 xiaoshou"></i>
|
|
|
|
|
:
|
|
|
|
|
<i className="iconfont icon-sanjiaoxing-down font-13 mr32 xiaoshou"></i>
|
|
|
|
|
}
|
|
|
|
|
</span>
|
|
|
|
|
</Dropdown>
|
|
|
|
@ -466,13 +519,13 @@ class Videostatisticscomtwo extends Component {
|
|
|
|
|
{
|
|
|
|
|
`
|
|
|
|
|
.ysltableo .ant-table-thead > tr > th, .ant-table-tbody > tr > td {
|
|
|
|
|
padding: 10px 10px;
|
|
|
|
|
padding: 10px 5px;
|
|
|
|
|
}
|
|
|
|
|
`
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
|
|
|
|
|
<div className="ws100s ysltableo mt10">
|
|
|
|
|
<div className="ws100s ysltableo mt10" style={{ minHeight: "400px"}}>
|
|
|
|
|
{
|
|
|
|
|
data.length === 0 ?
|
|
|
|
|
<div style={{
|
|
|
|
|