Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into courseware

courseware
杨树林 5 years ago
commit 65cac18c5f

@ -33,12 +33,10 @@ class CreateWatchVideoService < ApplicationService
if watch_course_video.present?
watch_course_video.total_duration = watch_course_video.watch_video_histories.sum(:total_duration)
watch_course_video.end_at = current_time
if !watch_course_video.is_finished && watch_course_video.watch_duration < params[:watch_duration]
if !watch_course_video.is_finished
# 更新课程视频的时长及是否看完状态
watch_course_video.watch_duration = params[:watch_duration]
if params[:ed].present?
watch_course_video.is_finished = watch_course_video.total_duration >= watch_course_video.duration
end
watch_course_video.watch_duration = params[:watch_duration] if watch_course_video.watch_duration < params[:watch_duration]
watch_course_video.is_finished = watch_course_video.total_duration >= watch_course_video.duration if params[:ed].present?
end
watch_course_video.save!
end

@ -100,7 +100,10 @@
width: 80%;
}
.ws50s{
width: 50%;
width: 50%;
}
.ws40s{
width: 40%;
}
.hs30s{
height: 30%;
@ -425,6 +428,14 @@
white-space:nowrap;
cursor: default;
}
.maxnamewidth90s{
width: 90px;
max-width: 90px;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
cursor: default;
}
.maxnamewidth100s{
width: 100px;
max-width: 100px;
@ -440,3 +451,4 @@
.mr32{
margin-right: 32px;
}

@ -64,19 +64,8 @@ class Videostatistics extends Component{
<div className="ws100s" style={{
position: "relative",
}}>
<div className="ws100s " style={{
position: "absolute",
top: "-29px",
}}>
<p className="sortinxdirection" >
<i className="iconfont icon-zuojiantou posiivsiconmyss mr5 colorbluesigin xiaoshou" onClick={()=>this.props.statisticsy(false)}></i>
<p className="fh mr20 colorbluesigin xiaoshou" onClick={()=>this.props.statisticsy(false)}>返回</p>
</p>
</div>
<Videostatisticscom {...this.state} {...this.props} watch_staticsdata={watch_staticsdata} ></Videostatisticscom>
<Videostatisticscom {...this.state} {...this.props} watch_staticsdata={watch_staticsdata} statisticsy={(b)=>this.props.statisticsy(b)}></Videostatisticscom>

@ -35,7 +35,11 @@ class Videostatisticscom extends Component {
}}>
<div className="ws100s teacherentrydivss ">
<div className="ws100s sortinxdirection">
<div className="ws50s sptits">视频统计总览</div>
<p className="sortinxdirection h40s" onClick={()=>this.props.statisticsy(false)} >
<i className="iconfont icon-zuojiantou posiivsiconmyss mr5 colorbluesigin xiaoshou h40s" onClick={()=>this.props.statisticsy(false)}></i>
<p className="fh mr20 colorbluesigin xiaoshou h40s" onClick={()=>this.props.statisticsy(false)}>返回</p>
</p>
<div className="ws40s sptits">视频统计总览</div>
<div className="ws50s sptitss xaxisreverseorder">播放数据从{this.props.watch_staticsdata&&this.props.watch_staticsdata.begin_at?this.props.watch_staticsdata.begin_at:0}开始统计</div>
</div>
<style>

@ -95,11 +95,11 @@ 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>
</span>
@ -110,11 +110,11 @@ 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>
</span>
@ -203,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,
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,
@ -291,10 +291,24 @@ class Videostatisticscomtwo extends Component {
}
} else {
data = {
id: CourseId,
page: this.state.page
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);
}

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

Loading…
Cancel
Save