视频统计

courseware
杨树林 5 years ago
parent 2e996636a8
commit 7c357ff220

@ -403,3 +403,9 @@
cursor: default;
}
.font-14{
font-size: 14px !important;
}
.mr32{
margin-right: 32px;
}

@ -3,6 +3,7 @@ import axios from 'axios';
import '../signin/css/signincdi.css';
import Videostatisticscom from './component/Videostatisticscom';
import Videostatisticslist from './component/Videostatisticslist';
import Videostatisticscomtwo from './component/Videostatisticscomtwo';
//在线学习
@ -11,6 +12,8 @@ class Videostatistics extends Component{
super(props);
this.state={
watch_staticsdata:[],
tisticsbool:true,
tisid:0,
}
@ -40,41 +43,48 @@ class Videostatistics extends Component{
});
}
tisticsbools=(bool,id)=>{
this.setState({
tisticsbool:bool,
tisid:id,
})
}
render(){
let {watch_staticsdata}= this.state;
let {watch_staticsdata,tisticsbool}= this.state;
return(
<React.Fragment>
<div className="ws100s">
<div className="ws100s" style={{
position: "relative",
}}>
<div className="ws100s xaxisreverseorder" style={{
position: "absolute",
top: "-29px",
}}>
<p className="sortinxdirection xiaoshou" onClick={()=>this.props.statisticsy(false)}>
<i className="iconfont icon-zuojiantou posiivsiconmyss mr5"></i>
<p className="fh mr20"> 返回</p>
</p>
</div>
<Videostatisticscom {...this.state} {...this.props} watch_staticsdata={watch_staticsdata}></Videostatisticscom>
{
tisticsbool===false?
<div className="ws100s" style={{
position: "relative",
}}>
<div className="ws100s xaxisreverseorder" style={{
position: "absolute",
top: "-29px",
}}>
<p className="sortinxdirection xiaoshou" onClick={()=>this.props.statisticsy(false)}>
<i className="iconfont icon-zuojiantou posiivsiconmyss mr5"></i>
<p className="fh mr20"> 返回</p>
</p>
<div>
<Videostatisticslist {...this.state} {...this.props} details={()=>this.details()}></Videostatisticslist>
</div>
<Videostatisticscom {...this.state} {...this.props} watch_staticsdata={watch_staticsdata} ></Videostatisticscom>
<div>
<Videostatisticslist {...this.state} {...this.props} tisticsbools={(b,id)=>this.tisticsbools(b,id)}></Videostatisticslist>
</div>
</div>
:
<Videostatisticscomtwo {...this.state} {...this.props} tisticsbools={(b,id)=>this.tisticsbools(b,id)}></Videostatisticscomtwo>
}
</div>
</div>
</div>
</React.Fragment>
)

@ -0,0 +1,118 @@
import React, {Component} from "react";
import '../../signin/css/signincdi.css';
import {Pagination,Table} from 'antd';
import {getImageUrl} from 'educoder';
import axios from 'axios';
import LoadingSpin from "../../../../common/LoadingSpin";
import NoneDatas from "../../signin/component/NoneDatas";
//条目
class Videostatisticscom extends Component {
//条目组件
constructor(props) {
super(props);
this.state = {
data:[],
page:1,
limit:10,
members_count:0,
columnsstu:[],
loading:false,
}
}
componentDidMount() {
}
componentDidUpdate = (prevProps) => {
}
paginationonChange = (pageNumber) => {
this.setState({
page: pageNumber,
})
}
render() {
let {loading,data,page,limit,members_count,columnsstu}=this.state
return (
<React.Fragment>
<div className="ws100s" >
<div className="ws100s teacherentrydivs edu-back-white ">
<div className="ws100s sortinxdirection">
<div className="ws50s sptits">视频名称视频名称</div>
<div className="ws50s sptitss xaxisreverseorder font-14" style={{
color:"#5091FF",
lineHeight: "42px",
}}>
<div className="xiaoshou" onClick={()=>this.props.tisticsbools(false,null)}>
<span className="mr5 xiaoshou">视频统计总览</span><i className="iconfont icon-fanhui font-13 xiaoshou"></i>
</div>
<div className="xiaoshou">
<span className="mr5 xiaoshou">分班</span><i className="iconfont icon-sanjiaoxing-up font-13 mr32 xiaoshou"></i>
</div>
</div>
</div>
<style>
{
`
.ysltableo .ant-table-thead > tr > th, .ant-table-tbody > tr > td {
padding: 10px 10px;
}
`
}
</style>
{
loading===true?
<div style={{
minHeight: "400px",
}} className="ws100s">
<LoadingSpin></LoadingSpin>
</div>
:
<div className="ws100s ysltableo teacherentrydivs">
{
data.length===0?
<div style={{
minHeight: "400px",
}} className="ws100s">
<NoneDatas></NoneDatas>
</div>
:
<Table columns={columnsstu} dataSource={data} pagination={false}/>
}
</div>
}
</div>
<div className="mb30 clearfix educontent mt40 intermediatecenter">
{
data&&data.length>0?
<Pagination showQuickJumper current={this.state.page} onChange={this.paginationonChange}
pageSize={this.state.limit}
total={this.state.members_count}></Pagination>
:""
}
</div>
</div>
</React.Fragment>
)
}
}
export default Videostatisticscom;

@ -78,7 +78,7 @@ class Videostatisticslist extends Component {
className: 'font-14',
width: '90px',
render: (text, record) => (
<span style={{width: '90px',color:'#5091FF'}} className="xiaoshou" onClick={()=>this.props.details()}>详情</span>
<span style={{width: '90px',color:'#5091FF'}} className="xiaoshou" onClick={()=>this.props.tisticsbools(true,record.id)}>详情</span>
),
}
],

Loading…
Cancel
Save