courseware
杨树林 5 years ago
parent 98cbc7468e
commit 5107b474bd

@ -42,11 +42,11 @@ if (isDev) {
window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || 'admin'
}
// 超管
debugType="admin";
// debugType="admin";
// 老师
// debugType="teacher";
// 学生
// debugType="student";
debugType="student";

@ -12,7 +12,7 @@ import Videostatistics from '../videostatistics/Videostatistics';
import './video.css';
import '../css/Courses.css';
import '../publicNav/nav.css';
import Videostatisticscomtwo from '../videostatistics/component/Videostatisticscomtwo';
const PAGE_SIZE = 15;
const LIVE_PAGE_SIZE = 10;
const $ = window.$;
@ -378,7 +378,12 @@ class VideoIndex extends Component {
</div>
</div>
:
<Videostatistics {...this.props} {...this.state} statisticsy={(b) => this.statisticsy(b)}></Videostatistics>
(
isAdmin?
<Videostatistics {...this.props} {...this.state} statisticsy={(b) => this.statisticsy(b)}></Videostatistics>
:
<Videostatisticscomtwo {...this.props} {...this.state} ></Videostatisticscomtwo>
)
}
{
statistics === false ?

@ -126,6 +126,7 @@ class Videostatisticscomtwo extends Component {
course_groups: [],
fbbool: false,
groupsid: null,
none_group_member_count:0,
}
}
@ -164,9 +165,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,
@ -202,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?formatSeconds(response.data.data[i].total_duration):0,
total_duration: response.data.data[i].total_duration,
feq: response.data.data[i].feq,
start_at: response.data.data[i].start_at,
end_at: response.data.data[i].end_at,
@ -398,7 +399,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,6 +424,16 @@ 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>
);
return (
@ -435,9 +446,14 @@ class Videostatisticscomtwo extends Component {
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>
{
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()}>

@ -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?formatSeconds(response.data.videos[i].total_time):0,
total_time: response.data.videos[i].total_time,
user_name: response.data.videos[i].user_name,
id: response.data.videos[i].id,
})

Loading…
Cancel
Save