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

courseware
cxt 5 years ago
commit 54c7efd94c

@ -105,7 +105,8 @@ class CoursesController < ApplicationController
def course_videos
course_videos = @course.course_videos
course_videos = course_videos.joins("
JOIN videos ON course_videos.video_id = videos.id
LEFT JOIN videos ON course_videos.video_id = videos.id AND
((videos.transcoded = TRUE OR videos.user_id = #{current_user.id}) OR course_videos.is_link = TRUE)
LEFT JOIN (
SELECT watch_course_videos.course_video_id,
SUM(watch_course_videos.total_duration) AS total_duration,
@ -116,7 +117,7 @@ class CoursesController < ApplicationController
WHERE course_videos.course_id = #{@course.id}
GROUP BY watch_course_videos.course_video_id
) AS watch_courses ON watch_courses.course_video_id = course_videos.id
").where("((videos.transcoded = TRUE OR videos.user_id = #{current_user.id}) OR course_videos.is_link = TRUE)")
")
@video_module = @course.course_modules.find_by(module_type: "video")
@ -132,7 +133,7 @@ class CoursesController < ApplicationController
@count = course_videos.count("course_videos.id")
logger.info("#######count:#{@count}")
course_videos = course_videos.select("IFNULL(watch_courses.total_duration, 0) AS total_duration, IFNULL(watch_courses.count,0) AS count, course_videos.video_id, course_videos.title, course_videos.is_link, course_videos.user_id")
course_videos = course_videos.select("course_videos.id, IFNULL(watch_courses.total_duration, 0) AS total_duration, IFNULL(watch_courses.count,0) AS count, course_videos.video_id, course_videos.title, course_videos.link, course_videos.is_link, course_videos.user_id")
@videos = paginate course_videos
end
@ -1533,14 +1534,14 @@ class CoursesController < ApplicationController
JOIN videos ON course_videos.course_id = #{@course.id} AND videos.id = course_videos.video_id
JOIN watch_course_videos ON course_videos.id = watch_course_videos.course_video_id AND watch_course_videos.user_id = #{current_user.id}
JOIN (
SELECT watch_course_videos.course_video_id, COUNT(watch_video_histories.watch_course_video_id) AS num
SELECT watch_course_videos.id, COUNT(watch_video_histories.watch_course_video_id) AS num
FROM watch_course_videos
JOIN course_videos ON course_videos.id = watch_course_videos.course_video_id
JOIN course_members ON course_members.user_id = watch_course_videos.user_id AND course_members.course_id = #{@course.id} AND role = 4
JOIN watch_video_histories ON watch_course_videos.id = watch_video_histories.watch_course_video_id AND watch_video_histories.end_at IS NOT NULL
WHERE course_videos.course_id = #{@course.id} AND watch_course_videos.user_id = #{current_user.id} AND watch_course_videos.end_at IS NOT NULL
GROUP BY watch_course_videos.course_video_id
) AS hisotries ON hisotries.course_video_id = course_videos.id").select("course_videos.id")
GROUP BY watch_course_videos.id
) AS hisotries ON hisotries.id = watch_course_videos.id ").select("course_videos.id")
@count = @videos.count
@ -1553,7 +1554,7 @@ class CoursesController < ApplicationController
end
end
@videos = @videos.select("course_videos.id, course_videos.video_id, watch_course_videos.start_at, watch_course_videos.total_duration, watch_course_videos.end_at, watch_course_videos.is_finished, videos.title, IFNULL(hisotries.num,0) AS freq")
@videos = @videos.select("course_videos.id, watch_course_videos.id AS watch_course_video_id, course_videos.video_id, watch_course_videos.start_at, watch_course_videos.total_duration, watch_course_videos.end_at, watch_course_videos.is_finished, videos.title, IFNULL(hisotries.num,0) AS freq")
@videos = paginate @videos
end

@ -161,7 +161,7 @@ class Course < ApplicationRecord
end
def videos_count
course_videos.where(video_id: videos.where("transcoded = 1 or videos.user_id = #{User.current.id}").pluck(:id))
course_videos.where(video_id: videos.where("transcoded = 1"))
.or(course_videos.where(course_videos: {is_link: true})).size
end

@ -9,6 +9,7 @@ json.videos @videos do |video|
json.user_img url_to_avatar(user)
json.user_login user&.login
else
json.course_video_id video.id
json.partial! 'users/videos/video', locals: { video: video.video }
json.total_time video['total_duration'].round(0)
json.people_num video['count']

@ -1,8 +1,9 @@
json.data do
json.array! @videos.each do |d|
json.watch_course_video_id d['watch_course_video_id']
json.title d.title
json.user_name d.video.user&.real_name
json.is_finished d.is_finished ? true : false
json.is_finished d.is_finished == 1 ? true : false
json.total_duration d.total_duration.round(0)
json.freq d['freq']
json.start_at d.start_at.to_s

@ -46,7 +46,7 @@ debugType="admin";
// 老师
// debugType="teacher";
// 学生
// debugType="student";
// debugType="student";

@ -18,7 +18,7 @@ class Fileslistitem extends Component {
settingList = (bools) => {
let {discussMessage} = this.props
console.log(discussMessage);
this.setState({
discussMessageid: discussMessage.id
})
@ -427,10 +427,10 @@ class Fileslistitem extends Component {
{discussMessage.publish_time === null ? "" : discussMessage.is_publish === true ? moment(discussMessage.publish_time).fromNow() : moment(discussMessage.publish_time).format('YYYY-MM-DD HH:mm')}
</span>
</span>
{discussMessage && discussMessage.category_name === null ? "" : this.props.child === false ?
{discussMessage && discussMessage.category_name === undefined||discussMessage && discussMessage.category_name === null ? "" :
<div className="color-grey9 task-hide fr mr30" title={discussMessage && discussMessage.category_name}
style={{"max-width": "268px"}}>所属目录{discussMessage && discussMessage.category_name}
</div> : ""}
style={{display:'flex',"max-width": "300px"}}>所属目录<div style={{display:discussMessage && discussMessage.parent_category_name === null ? "none":'block',"max-width": "150px",overflow: 'hidden',textOverflow:'ellipsis',whiteSpace: 'nowrap'}}>{discussMessage && discussMessage. parent_category_name}</div><div style={{display:discussMessage && discussMessage.parent_category_name === null ? "none":'block'}}>/</div><div style={{"max-width": "150px",overflow: 'hidden',textOverflow:'ellipsis',whiteSpace: 'nowrap'}}>{discussMessage && discussMessage.category_name}</div>
</div>}
</p>

@ -1,5 +1,5 @@
import React,{ Component } from "react";
import { Input, Checkbox, Table, Tooltip, Pagination,Spin } from "antd";
import { Input, Checkbox, Table, Tooltip, Pagination,Spin, Divider } from "antd";
import { WordsBtn,on, off, trigger ,getUrl} from 'educoder';
import axios from 'axios';
import Modals from '../../modals/Modals';
@ -17,6 +17,7 @@ import _ from 'lodash'
import './style.css';
import '../css/members.css';
import moment from 'moment';
import { tuple } from "antd/lib/_util/type";
class Fileslists extends Component{
constructor(props){
super(props);
@ -45,7 +46,11 @@ class Fileslists extends Component{
isSpin:false,
course_second_categories:[],
title: "",
link: ""
link: "",
//是否展开
istowshowid:'',
//新增参数判断几级目录
parent_category_id:'',
}
}
@ -141,10 +146,6 @@ class Fileslists extends Component{
}
}
}
updadatalist=(id)=>{
@ -163,7 +164,7 @@ class Fileslists extends Component{
let list = response.data.course_modules;
let course_second_categoriess;
list.map((item, key) => {
course_second_categoriess = item.course_second_categories?item.course_second_categories:[]
course_second_categoriess = item.children?item.children:[]
})
this.setState({
@ -181,8 +182,8 @@ class Fileslists extends Component{
}
updatafiled=()=>{
let{sort}=this.state;
console.log(5)
let{sort}=this.state;
if(this.props.match.params.main_id){
this.seactall(undefined,sort);
}else if(this.props.match.params.Id){
@ -216,12 +217,15 @@ class Fileslists extends Component{
})
newsort="desc"
}
console.log(1)
this.getfileslist(pagesize,page,tagname,searchValue,newsort,sorttype,coursesecondcategoryid);
}
getfileslist=(pagesize,page,tagname,searchValue,sort,sorttype,coursesecondcategoryid)=>{
this.updadatalist(0);
let url = "/files.json";
const courseid = this.props.match.params.coursesId;
let id=coursesecondcategoryid;
@ -248,7 +252,8 @@ class Fileslists extends Component{
unpublish_count:list.unpublish_count,
files:list.files,
filesId:list.id,
name:list.name,
name:list.name,
parent_category_id:list.parent_category_id,
course_is_public:result.data.data.course_is_public,
page:page
@ -453,15 +458,21 @@ class Fileslists extends Component{
}
addDir = () => {
let {filesId,course_modules}=this.state;
let {filesId,course_modules,coursesecondcategoryid}=this.state;
//调用获取资源接口 刷新数据
this.setState({
checkBoxValues:[]
})
})
if(parseInt(this.props.match.params.main_id)!=parseInt(this.props.coursesids)){
trigger('attachmentAddlog', parseInt( course_modules&&course_modules.course_modules[0].id))
trigger('attachmentAddlog', {id: parseInt( course_modules&&course_modules.course_modules[0].value),name:'资源',coursesecondcategoryid:coursesecondcategoryid})
}else{
trigger('attachmentAddlog', parseInt(filesId))
}
console.log(parseInt(filesId))
trigger('attachmentAddlog', {id:parseInt(filesId),name:'资源',coursesecondcategoryid:coursesecondcategoryid})
}
}
@ -554,7 +565,9 @@ class Fileslists extends Component{
PaginationTask=(page)=>{
let {search,order,selectpage,checkAllValue,checkBoxValues}=this.state;
let selectpagetype=selectpage===page?true:false
let selectpagetype=selectpage===page&&checkBoxValues.length===15?true:false
console.log(selectpagetype)
this.setState({
page:page,
checkAllValue:selectpagetype,
@ -658,6 +671,13 @@ class Fileslists extends Component{
})
}
//判断二级链接是否显示
istowshow(item){
this.setState({
istowshowid:item.value
})
}
moveTos=(id)=>{
let {checkBoxValues} = this.state;
@ -773,7 +793,9 @@ class Fileslists extends Component{
this.setState({
course_groupslist:id
})
}
}
render(){
let { searchValue,
checkBoxValues,
@ -940,7 +962,7 @@ class Fileslists extends Component{
}
</style>}
<Titlesearchsection
title={child===false?"全部资源":name}
title={name}
searchValue={ searchValue }
// searchtype={this.props.isAdmin||this.props.isStudent ?true:false}
onInputSearchChange={this.onInputSearchChange}
@ -948,7 +970,7 @@ class Fileslists extends Component{
firstRowRight={
<React.Fragment>
{/*{this.props.isAdmin()?parseInt(this.props.match.params.main_id)===parseInt(this.props.coursesids)?<WordsBtn style="blue" onClick={()=>this.addDir()} className={"mr30 font-16"}>新建目录</WordsBtn>:"":""}*/}
{this.props.isAdmin()?<WordsBtn style="blue" onClick={()=>this.addDir()} className={"mr30 font-16"}>新建目录</WordsBtn>:""}
{this.props.isAdmin()?this.state.parent_category_id===null||this.state.parent_category_id===undefined||this.state.parent_category_id===0?<WordsBtn style="blue" onClick={()=>this.addDir()} className={"mr30 font-16"}>新建目录</WordsBtn>:"":''}
{this.props.isAdmin()?parseInt(this.props.match.params.main_id)!=parseInt(this.props.coursesids)?<WordsBtn style="blue" onClick={()=>this.editDir(name)} className={"mr30 font-16"}>目录重命名</WordsBtn>:"":""}
{this.props.isAdmin()||this.props.isStudent() ? this.props.user&&this.props.user.main_site===true? <WordsBtn style="blue" className="mr30 font-16" onClick={()=>this.addResource()}>选用资源</WordsBtn>:"":""}
@ -998,31 +1020,57 @@ class Fileslists extends Component{
.courseSecond{
margin-left: 10px;
padding: 10px;
}
}
`}
</style>
<ul className="drop_down_menu" style={{"right":"0px","left":"unset","min-width":'150px'}}>
<ul className="drop_down_menu" style={{"right":"0px","left":"unset","min-width":'200px'}}>
{/* <p style={{marginLeft:15,color:"#000000",fontSize:20}}>资源</p> */}
{this.state.course_second_categories&&this.state.course_second_categories.length>10? <p className="drop_down_search">
<Input placeholder="搜索" value={this.state.dirSearchValue} onChange={(e) => {this.setState({dirSearchValue: e.target.value})}}/>
</p>:""}
{course_modules&&course_modules.course_modules.map((item,key)=>{
return(
filesId&&filesId===item.id?"":<li key={key} id={item.id} onClick={() => this.moveTos(0)} title={item.module_name}>{item.module_name}</li>
<li key={key} id={item.value} onClick={() => this.moveTos(0)} title={item.title}>{item.title}</li>
)
})}
{ course_modules&&course_modules.course_modules.map( (item,key) => {
return item.course_second_categories&&item.course_second_categories.filter((item)=> {
return (!this.state.dirSearchValue || item.name.indexOf(this.state.dirSearchValue) != -1)
return item.children&&item.children.filter((item)=> {
return (!this.state.dirSearchValue || item.title.indexOf(this.state.dirSearchValue) != -1)
}).map((itm,k)=>{
return(
filesId&&filesId===itm.id?"":<li key={k} id={itm.id} onClick={() => this.moveTos(itm.id )} title={itm.name}>{itm.name}</li>
<div >
<div style={{display:'inline-block',marginTop:10,height:20}}>
<li style={{width:200}} key={key} id={itm.value} onClick={() => this.moveTos(0)} title={itm.title}>{itm.title}</li>
{/* <div onClick={() => this.moveTos(itm.value )} style={{marginLeft:15,width:itm.title.length>13?200:undefined,color:'#000000',overflow: 'hidden',textOverflow:'ellipsis',whiteSpace: 'nowrap'}}>{itm.title}</div> */}
{itm.children.length===0?'':<i style={{marginLeft:15,marginRight:15}} onClick={() => this.istowshow(itm,filesId)} className="iconfont icon-xiajiantou font-12 ml2"></i>}
</div>
{ this.state.istowshowid===itm.value?
itm.children.map((tt,ti) => {
return(
filesId&&filesId===itm.id?"":
<div style={{marginTop:10,height:20}}>
<div style={{display:itm.children.length===1?'none':ti===0?'block':'none',marginLeft:15,width:250,height:1,background:'#c4c4c4'}}></div>
<li style={{marginTop:5,marginBottom:5,paddingLeft:30,width:tt.title.length>13?200:undefined,overflow: 'hidden',textOverflow:'ellipsis',whiteSpace: 'nowrap'}} key={ti} id={tt.value} onClick={() => this.moveTos(tt.value )} title={tt.title}>{tt.title}</li>
</div>
)
})
:''}
</div>
)
})
})}
{this.state.course_second_categories&&this.state.course_second_categories.length===0?
{this.state.course_second_categories.length===0?
<div className={"courseSecond"}>暂无数据</div>:""}
{/*{course_modules&&course_modules.course_modules.map((item,key)=>{*/}
@ -1034,11 +1082,11 @@ class Fileslists extends Component{
{/*})*/}
{/*)*/}
{/*})}*/}
{this.props.isAdmin()?parseInt(this.props.match.params.main_id)===filesId&&filesId?
<p className="drop_down_btn">
{/* {this.props.isAdmin()?parseInt(this.props.match.params.main_id)===filesId&&filesId?
<p style={{marginLeft:15}}>
<a className="color-grey-6" onClick={()=>this.addDir()}>新建目录</a>
</p>
:"":""}
:"":""} */}
</ul>

@ -0,0 +1,7 @@
.indexdiv {
background:#ffffff;
}
.indexdiv:hover {
background:#ccc;
}

@ -255,11 +255,13 @@ class Video extends Component {
<div className="videoContent">
{
videos.map((item, key) => {
console.log(course_identity > 2 && item.user_id === user_id)
//console.log(course_identity > 2 && item.user_id === user_id)
return (
<VideoInReviewItem
Setmyktid={(id,title)=>this.props.Setmyktid(id,title)}
mykt={this.props.mykt}
{...this.props}
{...this.state}
{...item}
key={item.id}
onEditVideo={this.onEditVideo}
@ -268,6 +270,8 @@ class Video extends Component {
operation={operation || item.user_id === user_id}
deleteVideo={(admin || item.user_id === user_id) ? this.deleteVideo : undefined}
moveVideo={videoData && videoData.has_category && flagMove ? () => this.moveVideo(item.id, (course_identity > 2 && item.user_id !== user_id)) : undefined}
newtitle={item.title}
newcourse_video_id={item.course_video_id}
>
</VideoInReviewItem>
)
@ -294,4 +298,4 @@ class Video extends Component {
)
}
}
export default Video;
export default Video;

@ -41,6 +41,8 @@ class VideoIndex extends Component {
liveVisible: false,
statistics: false,
myktid:null,
mytitle:''
}
}
@ -55,7 +57,24 @@ class VideoIndex extends Component {
this.getLiveList(page);
}
}
Setmyktid=(id,title)=>{
const isAdmin = this.props&& this.props.isAdmin();
if(isAdmin===true){
this.setState({
myktid:id,
statistics:true,
mytitle:title,
})
}else{
this.setState({
statistics:true,
myktid:null,
mytitle:"",
})
}
}
componentDidMount = () => {
const {search} = this.props.location;
const {page} = this.state;
@ -79,6 +98,8 @@ class VideoIndex extends Component {
if(this.props.homedirectory ===true){
this.setState({
statistics:false,
myktid:null,
mytitle:"",
})
}
}
@ -255,12 +276,23 @@ class VideoIndex extends Component {
this.setState({
statistics: bool,
myktid:null,
mytitle:"",
})
}
mystatisticsys = (bool,n) => {
this.setState({
statistics: bool,
myktid:null,
mytitle:"",
})
}
render() {
const {videos, upload, videoData, type, liveData, lives, page, liveVisible, isSpining, liveId, otherLinkVisible, statistics} = this.state;
const {videos, upload, videoData, type, liveData, lives, page, liveVisible, isSpining, liveId, otherLinkVisible, statistics,myktid,mytitle} = this.state;
const {coursesId, videoId} = this.props.match.params;
let {course_identity} = this.props && this.props.coursedata;
let is_teacher = this.props && this.props.user && this.props.user.is_teacher;
@ -377,7 +409,14 @@ class VideoIndex extends Component {
</div>
</div>
:
<Videostatistics {...this.props} {...this.state} statisticsy={(b) => this.statisticsy(b)}></Videostatistics>
(
myktid===null||myktid===undefined?
<Videostatistics {...this.props} {...this.state} statisticsy={(b) => this.statisticsy(b)}></Videostatistics>
:
<Videostatisticscomtwo {...this.state} {...this.props} tisid={myktid} mytitle={mytitle} tisticsbools={(b,id)=>this.mystatisticsys(b,id)}></Videostatisticscomtwo>
)
}
@ -387,6 +426,8 @@ class VideoIndex extends Component {
{
type === "video" ?
<Videos
mykt={"mykt"}
Setmyktid={(id,title)=>this.Setmyktid(id,title)}
upload={upload}
videos={videos}
page={page}

@ -1,7 +1,7 @@
import React,{ Component } from "react";
import { Link } from "react-router-dom";
import axios from 'axios';
import {Checkbox,Modal,Input,Tooltip,notification,Popover} from 'antd';
import {Checkbox,Modal,Input,Tooltip,notification,Popover,Dropdown,Menu,TreeSelect} from 'antd';
import { DragDropContext,Draggable, Droppable} from 'react-beautiful-dnd';
import Modals from '../../modals/Modals';
import { on, off, trigger } from 'educoder';
@ -11,7 +11,8 @@ const CheckboxGroup = Checkbox.Group;
let navidtype=true;
const { SubMenu } = Menu;
const { TreeNode } = TreeSelect;
//a little function to help us with reordering the result
const reorder = (list, startIndex, endIndex) => {
@ -62,9 +63,27 @@ class Coursesleftnav extends Component{
antIcon:false,
chapterupdate:false,
successFunc:undefined
successFunc:undefined,
//用来判断 是不是资源点击进入的
Navmodalziyname:'',
treeData:undefined,
//默认为0主目录
parentid:0,
//判断3级目录是否显示三个点
sanshow:'',
sansandiantype:undefined,
//新增参数判断打开关闭 默认关闭
showPreson:false,
//获取资源id 判断是否选中的事资源来判控
treeDataid:'',
//默认值
treedefaultValue:'',
dropdownStyleshow:'',
treeDataname:''
}
}
// updataleftNav=()=>{
//
@ -182,7 +201,7 @@ class Coursesleftnav extends Component{
this.Navmodalnames(e,5,"editSecondname", data.id, data.name);
}
attachmentAddlog=(e,data)=>{
this.Navmodalnames(e,1,"attachment",data);
this.Navmodalnames(e,1,"attachment",data.id,data.name,data.coursesecondcategoryid,data.coursesecondcategoryid===undefined?false:true);
}
flieseditDir=(e, data)=>{
this.Navmodalnames(e,4,"editSecondname",data.id,data.name);
@ -208,7 +227,6 @@ class Coursesleftnav extends Component{
on('editcommon_homeworks',this.editcommon_homeworks)
let courstype=this.props.match.url;
courstype = courstype.split('/');
courstype=courstype[3];
@ -234,7 +252,6 @@ class Coursesleftnav extends Component{
newselectnavid:parseInt(category_id),
})
}else{
if(isNaN(category_id)){
this.setState({
positiontype:courstype,
@ -286,7 +303,37 @@ class Coursesleftnav extends Component{
}
}
}
}
//请求接口获取资源列表数据
getatahcment(){
let coursesId=this.props.match.params.coursesId;
let url="/courses/"+coursesId+"/attahcment_category_list.json";
axios.get(url, {params:{
no_child: true,
}
}).then((response) => {
if(response!=undefined){
if(response.data&&response.data) {
if (response.data.status != 401) {
let tr=response.data.course_modules;
this.setState({
treeData:tr
})
tr.map((iem,index)=>{
this.setState({
treeDataid:iem.value,
treeDataname:iem.title
})
})
}
}
}
})
}
setnavid=(e,key,id,type,url)=>{
// this.props.getleftNavid && this.props.getleftNavid(key,type);
@ -359,7 +406,8 @@ class Coursesleftnav extends Component{
e.stopPropagation();//阻止冒泡
}
selectnavids=(e,key,id,type,urls,index)=>{
selectnavids=(e,key,id,type,urls,index,santype)=>{
this.setState({
selectnavid:true,
newselectnavid:id,
@ -384,7 +432,6 @@ class Coursesleftnav extends Component{
// console.log("twosandianshow");
// console.log(key);
// console.log(type);
this.setState({
toopvisibleindexs:key,
twosandiantype:key,
@ -394,6 +441,23 @@ class Coursesleftnav extends Component{
})
e.stopPropagation();//阻止冒泡
}
sansandianshow=(e,key,type,name)=>{
// console.log("twosandianshow");
// console.log(key);
this.setState({
toopvisibleindexs:key,
sansandiantype:key,
toopvisible:false,
sanshow:name,
toopvisibleindex:undefined,
twosandiantypes:type
})
e.stopPropagation();//阻止冒泡
}
twosandianshowys=(e,key,type)=>{
// console.log("twosandianshow");
// console.log(key);
@ -403,6 +467,17 @@ class Coursesleftnav extends Component{
})
e.stopPropagation();//阻止冒泡
}
sansandianshowys=(e,key,type)=>{
// console.log("twosandianshow");
// console.log(key);
// console.log(type);
this.setState({
toopvisibleindexs:key,
})
e.stopPropagation();//阻止冒泡
}
twosandianshowyss=(e,key,type)=>{
// console.log("twosandianshow");
// console.log(key);
@ -413,6 +488,16 @@ class Coursesleftnav extends Component{
e.stopPropagation();//阻止冒泡
}
sansandianshowyss=(e,key,type)=>{
// console.log("twosandianshow");
// console.log(key);
// console.log(type);
this.setState({
toopvisibleindexs:undefined,
})
e.stopPropagation();//阻止冒泡
}
twosandianhide=(e,index,type)=>{
// console.log(index)
this.setState({
@ -426,6 +511,20 @@ class Coursesleftnav extends Component{
e.stopPropagation();//阻止冒泡
}
sansandianhide=(e,index,type)=>{
// console.log(index)
this.setState({
toopvisibleindexs:undefined,
sansandiantype:undefined,
twosandiantypenum:undefined,
toopvisible:true,
sanshow:'',
toopvisibleindex:index,
twosandiantypes:type
})
e.stopPropagation();//阻止冒泡
}
twosandianhideys=(e,index,type)=>{
// console.log(index)
this.setState({
@ -442,6 +541,9 @@ class Coursesleftnav extends Component{
navid:undefined,
sandiantype:undefined,
twosandiantype:undefined,
sansandiantype:undefined,
})
let url="/course_modules/"+id+"/sticky_module.json"
@ -461,6 +563,7 @@ class Coursesleftnav extends Component{
navid:undefined,
sandiantype:undefined,
twosandiantype:undefined,
sansandiantype:undefined,
ModalsType:false
})
@ -481,6 +584,8 @@ class Coursesleftnav extends Component{
})
}
edithidden=(e,id)=>{
e.stopPropagation();//阻止冒泡
let {course_modules}=this.props;
@ -505,8 +610,9 @@ class Coursesleftnav extends Component{
}
Navmodalnames=(e,id,type,setnavid,name)=>{
Navmodalnames=(e,id,type,setnavid,name,towid,showPreson)=>{
e.stopPropagation();//阻止冒泡
this.getatahcment()
navidtype=false
if(id===1||id===2||id===6){
this.setState({
@ -515,7 +621,11 @@ class Coursesleftnav extends Component{
Navplaceholder:"请输入名称最大限制60个字符",
Navmodalnametype:true,
Navmodaltypename:id,
Navmodalziyname:name,
treedefaultValue:towid,
showPreson:showPreson,
setnavid:setnavid,
parentid:towid,
NavmodalValue:""
})
}else if(id===3||id===4||id===5||id===7){
@ -527,6 +637,10 @@ class Coursesleftnav extends Component{
Navmodalnametype:true,
Navmodaltypename:id,
setnavid:setnavid,
treedefaultValue:towid,
showPreson:showPreson,
Navmodalziyname:'',
parentid:towid,
NavmodalValue:name
})
@ -565,7 +679,9 @@ class Coursesleftnav extends Component{
saveNavmodapost=(url,value,positiontype,coursesId,type)=>{
console.log(positiontype)
axios.post(url,
{name:value}).then((result)=>{
{name:value,
parent_id:this.state.parentid
}).then((result)=>{
if(result!=undefined){
if(result.data.status===0){
@ -604,11 +720,9 @@ class Coursesleftnav extends Component{
}
if(positiontype==="files"||positiontype==="file"){
if(type===true){
this.updasaveNavmoda()
trigger('files')
}else{
this.updasaveNavmoda()
this.props.history.push(`/classrooms/${coursesId}/file/${result.data.category_id}`);
@ -798,7 +912,23 @@ class Coursesleftnav extends Component{
}
}
tronChange=(value)=>{
console.log(this.state.dropdownStyleshow)
this.setState({
parentid:this.state.treeDataid===value?0:value,
dropdownStyleshow:'none'
})
}
tronclick=()=>{
this.setState({
dropdownStyleshow:'inline-block'
})
}
droppablepost=(url,list)=>{
axios.post(url,{position: list}).then((result)=>{
@ -871,6 +1001,7 @@ class Coursesleftnav extends Component{
}
hidesandian=(e,key)=>{
this.setState({
sandiantypes:undefined
@ -885,9 +1016,11 @@ class Coursesleftnav extends Component{
e.stopPropagation();//阻止冒泡
}
showsandians=(e,key,urls,num,id,type,index)=> {
let {url}=this.state;
if (key === this.props.indexs) {
this.props.unlocationNavfun(undefined)
} else {
this.props.updataleftNavfun();
@ -923,7 +1056,7 @@ class Coursesleftnav extends Component{
{/*/!* 分组作业 *!/*/}
{item.type==="group_homework"?<div onClick={e=>this.Navmodalnames(e,1,"group_homeworks",item.id)}>新建目录</div>:""}
{/*资源*/}
{item.type==="attachment"?<div onClick={e=>this.Navmodalnames(e,1,"attachment",item.id)}>新建目录</div>:""}
{item.type==="attachment"?<div onClick={e=>this.Navmodalnames(e,1,"attachment",item.id,"资源")}>新建目录</div>:""}
{/* 视频 */}
{item.type==="video"?<div onClick={e=>this.Navmodalnames(e,1,"video",item.id)}>新建目录</div>:""}
{/*毕业设计*/}
@ -948,10 +1081,11 @@ class Coursesleftnav extends Component{
<div onClick={e=>this.editSetup(e,item.id)}>置顶</div>
</div>)
}
content=(item,iem,index)=>{
content=(item,iem,index,san)=>{
let {twosandiantypes,twosandiantypenum}=this.state;
return (item.type==="graduation"?"": <div className={item.type===twosandiantypes&&twosandiantypenum===index?"sandianboxs":"sandianboxs"} >
{/*作业/资源*/}
{item.type==="attachment"&&san!=='san'?<div onClick={e=>this.Navmodalnames(e,1,"attachment",item.id,"资源",iem.category_id,true)}>新建目录</div>:""}
{item.type==="shixun_homework"||item.type==="attachment"||item.type==="graduation"||item.type==="common_homework"||item.type==="group_homework"?<div onClick={e=>this.Navmodalnames(e,4,"editSecondname",iem.category_id,iem.category_name)}>重命名</div>:""}
{item.type==="shixun_homework"||item.type==="attachment"||item.type==="common_homework"||item.type==="group_homework"?<div onClick={e=>this.deleteSecondary(e,1,iem.category_id)}>删除</div>:""}
{/*分班*/}
@ -980,6 +1114,7 @@ class Coursesleftnav extends Component{
})
}
render(){
let {
twosandiantype,
Navmodalname,
@ -991,7 +1126,8 @@ class Coursesleftnav extends Component{
ModalSave,
loadtype,
twosandiantypes,
toopvisibleindexs
toopvisibleindexs,
sansandiantype
}=this.state;
let {course_modules,hidden_modules,is_teacher} =this.props;
@ -1003,6 +1139,9 @@ class Coursesleftnav extends Component{
// console.log("CoursesLeftNav");
// console.log(course_modules);
return(
<ul className="mb10 newedu-class-leftnav">
@ -1059,14 +1198,35 @@ class Coursesleftnav extends Component{
destroyOnClose={true}
centered={true}
>
<div className="df">
<div className={"fl mt5"}>{this.state.Navtitles}</div>
<div>
{this.state.Navmodalziyname==="资源"?<div className="df" style={{marginBottom:50}}>
<div className={"fl mt5"} >上级目录</div>
<TreeSelect
className={"input-flex-35 greyInput fl"}
style={{width:300,color:'#000000'}}
dropdownClassName={{display:this.state.dropdownStyleshow}}
// dropdownMenuStyle={{display:this.state.dropdownStyleshow}}
treeData={this.state.treeData}
placeholder={this.state.treeDataname}
disabled={this.state.showPreson}
defaultValue={this.state.treedefaultValue}
treeDefaultExpandAll
onChange={this.tronChange}
onClick={this.tronclick}
/>
</div>:''}
<div className="df" >
<div className={"fl mt5"} >{this.state.Navtitles}</div>
<Input placeholder={this.state.Navplaceholder}
className={"input-flex-35 greyInput fl"}
maxLength="60"
value={NavmodalValue}
onInput={this.setNavmodalValue}
/>
</div>
</div>
<style>
{
@ -1077,6 +1237,7 @@ class Coursesleftnav extends Component{
`
}
</style>
{this.state.NavmodalValuetype===true?<span className={"ml70 color-red"}>
{this.state.NavmodalValues}
</span>:""}
@ -1182,7 +1343,7 @@ class Coursesleftnav extends Component{
>
{/*"/classrooms/"+this.props.match.params.coursesId+"/"+item.type+"/"+iem.category_type+"/"+iem.category_id*/}
<a className={"Draggablelichild"} key={index}>
<li className="clearfix width93 Draggableli" key={index} onClick={(e)=>this.selectnavids(e,key,iem.category_id,item.type+"child",iem.second_category_url,key)} onMouseLeave={(e)=>this.twosandianhide(e,index,item.type)} onMouseEnter={(e)=>this.twosandianshow(e,index,item.type)}
<li className="clearfix width93 Draggableli" key={index} onClick={(e)=>this.selectnavids(e,key,iem.category_id,item.type+"child",iem.second_category_url,key,'san')} onMouseLeave={(e)=>this.twosandianhide(e,index,item.type)} onMouseEnter={(e)=>this.twosandianshow(e,index,item.type)}
key={index}
ref={provided.innerRef}
{...provided.draggableProps}
@ -1193,6 +1354,7 @@ class Coursesleftnav extends Component{
<span className={this.props.location.pathname===iem.second_category_url?"color-blue fl ml38 maxwidth170 task-hide Draggablelichild":"fl ml38 maxwidth170 task-hide Draggablelichild"} onMouseEnter={(e)=>this.twosandianshowys(e,index,item.type)}>{iem.category_name}</span>
<span className={twosandiantype===undefined?this.props.location.pathname===iem.second_category_url?"fr mr20 color-blue Draggablelichild font-14":"fr mr20 color999 Draggablelichild font-14":item.type===twosandiantypes&&twosandiantype===index&&iem.category_id!=0?"none":this.props.location.pathname===iem.second_category_url?"fr mr20 color-blue Draggablelichild font-14":"fr mr20 color999 Draggablelichild font-14"} >{iem.category_count===0?"":iem.category_count}</span>
{item.type===twosandiantypes&&twosandiantype===index?
iem.category_id===0?"":
iem.category_type==="graduation_topics"||iem.category_type==="graduation_tasks"?
@ -1222,8 +1384,55 @@ class Coursesleftnav extends Component{
{provided.placeholder}
</li>
</a>
{
iem.third_category===undefined?"":iem.third_category.map((itt,index)=>{
if(itt.category_type!=="attachment"){
return
}
return(
<div onClick={this.getatahcment} style={{display:this.state.newselectnavid===undefined?'none':itt.parent_id===this.state.newselectnavid?'block':'none'}}>
{/*"/classrooms/"+this.props.match.params.coursesId+"/"+item.type+"/"+iem.category_type+"/"+iem.category_id*/}
<a className={"Draggablelichild"} key={index}>
<li className="clearfix width93 Draggableli" key={index} onClick={(e)=>this.selectnavids(e,key,itt.parent_id,item.type+"child",itt.second_category_url,key)} onMouseLeave={(e)=>this.sansandianhide(e,index,item.type)} onMouseEnter={(e)=>this.sansandianshow(e,index,item.type,itt.category_name)}
key={index}
ref={provided.innerRef}
{...provided.draggableProps}
{...provided.dragHandleProps}
// title={iem.category_name.length<10?"":iem.category_name}
>
<a className="fl pl46 pd0 Draggablelichild">
<span style={{marginLeft:15}} className={this.props.location.pathname===itt.second_category_url?"color-blue fl ml38 maxwidth155 task-hide Draggablelichild":"fl ml38 maxwidth155 task-hide Draggablelichild"} onMouseEnter={(e)=>this.sansandianshowys(e,index,item.type)}>{itt.category_name}</span>
<span className={sansandiantype===undefined?this.props.location.pathname===itt.second_category_url?"fr mr20 color-blue Draggablelichild font-14":"fr mr20 color999 Draggablelichild font-14":item.type===twosandiantypes&&sansandiantype===index&&itt.category_id!=0?"none":this.props.location.pathname===itt.second_category_url?"fr mr20 color-blue Draggablelichild font-14":"fr mr20 color999 Draggablelichild font-14"} >{itt.category_count===0?"":itt.category_count}</span>
{iem.category_type===twosandiantypes&&sansandiantype===index?
itt.category_name!==this.state.sanshow?"":
(
itt.category_name&&itt.category_name.length<13?
<Popover placement="right" content={this.content(item,itt,index,'san')} trigger="hover" key={index} onMouseEnter={(e)=>this.sansandianshowyss(e)}>
<i className={"iconfont icon-sandian fr color999 mr15 Draggablelichild"}></i>
</Popover>
:
<Tooltip placement="right" key={index} title={itt.category_name} visible={toopvisibleindexs===undefined?false:toopvisibleindexs===index?true:false}>
<Popover placement="right" content={this.content(item,itt,index,'san')} trigger="hover" key={index} onMouseEnter={(e)=>this.sansandianshowyss(e)}>
<i className={"iconfont icon-sandian fr color999 mr15 Draggablelichild"}></i>
</Popover>
</Tooltip>
)
:""}
</a>
</li>
</a>
</div>
)
})
}
</Tooltip>
)}
</Draggable>
@ -1312,10 +1521,53 @@ class Coursesleftnav extends Component{
<span className={twosandiantype===undefined?this.props.location.pathname===iem.second_category_url?"fr mr20 color-blue font-14":"fr mr20 color999 font-14":twosandiantype===index&&item.type!="graduation"?"none":this.props.location.pathname===iem.second_category_url?"fr mr20 color-blue font-14":"fr mr20 color999 font-14"}>{iem.category_count===0?"":iem.category_count}</span>
</a>
</Tooltip>
}
</li>
{
iem.third_category===undefined?"":iem.third_category.map((itt,index)=>{
if(itt.category_type!=="attachment"){
return
}
return(
<div onClick={this.getatahcment} style={{display:this.state.newselectnavid===undefined?'none':itt.parent_id===this.state.newselectnavid?'block':'none'}}>
{/*"/classrooms/"+this.props.match.params.coursesId+"/"+item.type+"/"+iem.category_type+"/"+iem.category_id*/}
<a className={"Draggablelichild"} key={index}>
<li className="clearfix width93 Draggableli" key={index} onClick={(e)=>this.selectnavids(e,key,itt.parent_id,item.type+"child",itt.second_category_url,key)} onMouseLeave={(e)=>this.sansandianhide(e,index,item.type)} onMouseEnter={(e)=>this.sansandianshow(e,index,item.type,itt.category_name)}
key={index}
// title={iem.category_name.length<10?"":iem.category_name}
>
<a className="fl pl46 pd0 Draggablelichild">
<span style={{marginLeft:15}} className={this.props.location.pathname===itt.second_category_url?"color-blue fl ml38 maxwidth155 task-hide Draggablelichild":"fl ml38 maxwidth155 task-hide Draggablelichild"} onMouseEnter={(e)=>this.sansandianshowys(e,index,item.type)}>{itt.category_name}</span>
<span className={sansandiantype===undefined?this.props.location.pathname===itt.second_category_url?"fr mr20 color-blue Draggablelichild font-14":"fr mr20 color999 Draggablelichild font-14":item.type===twosandiantypes&&sansandiantype===index&&itt.category_id!=0?"none":this.props.location.pathname===itt.second_category_url?"fr mr20 color-blue Draggablelichild font-14":"fr mr20 color999 Draggablelichild font-14"} >{itt.category_count===0?"":itt.category_count}</span>
{iem.category_type===twosandiantypes&&sansandiantype===index?
itt.category_name!==this.state.sanshow?"":
(
itt.category_name&&itt.category_name.length<13?
''
:
<Tooltip placement="right" key={index} title={itt.category_name} visible={toopvisibleindexs===undefined?false:toopvisibleindexs===index?true:false}>
</Tooltip>
)
:""}
</a>
</li>
</a>
</div>
)
})
}
</a>
)
})
}

@ -29,6 +29,19 @@
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0);
background-color: white;
}
.ant-select-tree-title{
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
display:inline-block;
max-width:200px;
}
.ant-select-tree-title{
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
max-width:200px;
}
/*鼠标悬浮在滚动条上的主干部分*/
/*.droppableul::-webkit-scrollbar-track:hover {*/

@ -423,6 +423,21 @@
color:rgba(255,255,255,1);
line-height: 33px;
}
.maxnamewidth200s{
width: 200px;
max-width: 200px;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
cursor: default;
}
.maxnamewidth200ss{
max-width: 200px;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
cursor: default;
}
.maxnamewidth150s{
width: 150px;
max-width: 150px;
@ -431,6 +446,13 @@
white-space:nowrap;
cursor: default;
}
.maxnamewidth150ss{
max-width: 150px;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
cursor: default;
}
.maxnamewidth140s{
width: 140px;
max-width: 140px;
@ -472,7 +494,21 @@
white-space:nowrap;
cursor: default;
}
.maxnamewidth100s{
max-width: 100px;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
cursor: default;
}
.maxnamewidth90s{
width: 90px;
max-width: 90px;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
cursor: default;
}
.font-14{
font-size: 14px !important;
}
@ -487,4 +523,29 @@
}
.ml32{
margin-left: 32px;
}
.textalignlefts{
text-align: left;
}
.textalignrights{
text-align: right;
}
.width200s{
width: 200px !important;
}
.width150s{
width: 150px !important;
}
.width100s{
width: 100px !important;
}
.widh150pxwp{
wordWrap: break-word;
wordBreak: break-word
}
.widh150wpos{
word-break: break-all;
}

@ -33,6 +33,20 @@ class Studenticscom extends Component {
<div className="ws100s edu-back-white sortinxdirection" style={{
position: "relative"
}}>
<script>
{
`
a{ 
    text-decoration:none;
    color:#333;
}
a:hover{
    text-decoration:none;//鼠标放上面不显示下划线
    color:#333;
}
`
}
</script>
<div className="ws100s teacherentrydivss ">
<div className="ws100s sortinxdirection">
<p className="sortinxdirection h40s" onClick={()=>this.props.statisticsy(false)} >

@ -30,16 +30,30 @@ class Studentstatistics extends Component {
title: '视频名称',
dataIndex: 'title',
key: 'title',
align: "center",
align: "left",
className: 'font-14 maxnamewidth150s',
width: '150px',
render: (text, record) => (
<span style={{width: '150px'}} className="maxnamewidth150s">
<a className="maxnamewidth150s" style={{
<div style={{width: '150px'}} className="maxnamewidth150s textalignlefts">
<script>
{
`
a{ 
    text-decoration:none;
    color:#333;
}
a:hover{
    text-decoration:none;
    color:#333;
}
`
}
</script>
<a className="maxnamewidth150s textalignlefts" style={{
color:"#333333"
}} title={record.title}>{record.title}</a>
</span>
</div>
),
},
{
@ -65,12 +79,26 @@ class Studentstatistics extends Component {
sorter: true,
sortDirections: sortDirections,
render: (text, record) => (
<span style={{width: '100px'}} className="maxnamewidth100s">
<a className="maxnamewidth100s" style={{
color:"#333333"
}} title={record.total_duration}>{record.total_duration}</a>
<div style={{width: '100px'}} className="maxnamewidth100s ">
<script>
{
`
a{ 
    text-decoration:none;
    color:#333;
}
a:hover{
    text-decoration:none;
    color:#333;
}
`
}
</script>
<a className="maxnamewidth100s " style={{
color:"#333333"
}} title={record.total_duration}>{record.total_duration}</a>
</span>
</div>
),
},
{
@ -82,6 +110,20 @@ class Studentstatistics extends Component {
width: '100px',
render: (text, record) => (
<span style={{width: '100px'}} className="maxnamewidth100s">
<script>
{
`
a{ 
    text-decoration:none;
    color:#333;
}
a:hover{
    text-decoration:none;
    color:#333;
}
`
}
</script>
<a className="maxnamewidth100s" style={{
color:"#333333"
}} title={record.user_name}>{record.user_name}</a>
@ -98,7 +140,7 @@ class Studentstatistics extends Component {
width: '90px',
render: (text, record) => (
<span style={{width: '90px'}}>{record.is_finished === true ?
<span style={{color: "#5091FF"}}></span> : <span style={{color: "#E02020"}}></span>}</span>
<span style={{color: "#333333"}}></span> : <span style={{color: "#E02020"}}></span>}</span>
),
},
],
@ -252,6 +294,20 @@ class Studentstatistics extends Component {
return (
<React.Fragment>
<div className="ws100s mt20">
<script>
{
`
a{ 
    text-decoration:none;
    color:#333;
}
a:hover{
    text-decoration:none;//鼠标放上面不显示下划线
    color:#333;
}
`
}
</script>
<div className="ws100s edu-back-white">
<div className="ws100s teacherentrydivss pd15s">
<div className="ws100s sortinxdirection">
@ -286,11 +342,7 @@ class Studentstatistics extends Component {
onChange={this.table1handleChange}
/>
</Spin>:
<div style={{
minHeight: "400px",
}} className="ws100s">
<NoneDatas></NoneDatas>
</div>
""
}

@ -33,6 +33,20 @@ class Videostatisticscom extends Component {
<div className="ws100s edu-back-white sortinxdirection" style={{
position: "relative"
}}>
<script>
{
`
a{ 
    text-decoration:none;
    color:#333;
}
a:hover{
    text-decoration:none;//鼠标放上面不显示下划线
    color:#333;
}
`
}
</script>
<div className="ws100s teacherentrydivss ">
<div className="ws100s sortinxdirection">
<p className="sortinxdirection h40s" onClick={()=>this.props.statisticsy(false)} >

@ -28,7 +28,7 @@ class Videostatisticscomtwo extends Component {
className: 'font-14',
width: '50px',
render: (text, record) => (
<span style={{width: '50px'}}>{record.number}</span>
<div style={{width: '50px'}}>{record.number}</div>
),
},
{
@ -39,56 +39,99 @@ class Videostatisticscomtwo extends Component {
className: 'font-14 maxnamewidth100s',
width: '100px',
render: (text, record) => (
<span style={{width: '100px'}} className="maxnamewidth100s">
<div style={{width: "100px",wordWrap: 'break-word', wordBreak: 'break-word'}} className="maxnamewidth100s">
<script>
{
`
a{ 
    text-decoration:none;
    color:#333;
}
a:hover{
    text-decoration:none;
    color:#333;
}
`
}
</script>
<a className="maxnamewidth100s" style={{
color:"#333333"
}} title={record.user_name}>{record.user_name}</a>
</span>
</div>
),
},
{
title: '视频是否看完',
title: '是否看完',
dataIndex: 'is_finished',
key: 'is_finished',
align: "center",
className: 'font-14',
className: 'font-14 maxnamewidth90s',
width: '90px',
render: (text, record) => (
<span style={{width: '90px'}}>{record.is_finished === true ?
<span style={{color: "#5091FF"}}></span> : <span style={{color: "#E02020"}}></span>}</span>
<div style={{width: '90px'}} className="maxnamewidth90s">{record.is_finished === true ?
<span style={{color: "#333333"}}></span> : <span style={{color: "#E02020"}}></span>}</div>
),
},
{
title: '视频累计观看时长',
title: '观看时长',
dataIndex: 'total_duration',
key: 'total_duration',
align: "center",
className: 'font-14 maxnamewidth140s',
width: '140px',
className: 'font-14 maxnamewidth100s',
width: '100px',
sorter: true,
sortDirections: sortDirections,
render: (text, record) => (
<span style={{width: '140px'}} className="maxnamewidth140s"><a className="maxnamewidth140s" style={{
<div style={{width: '100px'}} className="maxnamewidth100s">
<script>
{
`
a{ 
    text-decoration:none;
    color:#333;
}
a:hover{
    text-decoration:none;
    color:#333;
}
`
}
</script>
<a className="maxnamewidth100s" style={{
color:"#333333"
}} title={record.total_duration}>{record.total_duration}</a></span>
}} title={record.total_duration}>{record.total_duration}</a></div>
),
},
{
title: '累计观看次数(次)',
title: '观看次数',
dataIndex: 'feq',
key: 'feq',
align: "center",
className: 'font-14 maxnamewidth140s',
width: '140px',
className: 'font-14 maxnamewidth100s',
width: '100px',
sorter: true,
sortDirections: sortDirections,
render: (text, record) => (
<span style={{width: '140px'}} className="maxnamewidth140s">
<a className="maxnamewidth140s" style={{
<div style={{width: '100px'}} className="maxnamewidth100s">
<script>
{
`
a{ 
    text-decoration:none;
    color:#333;
}
a:hover{
    text-decoration:none;
    color:#333;
}
`
}
</script>
<a className="maxnamewidth100s" style={{
color:"#333333"
}} title={record.feq}>{record.feq}</a>
</span>
</div>
),
},
{
@ -96,14 +139,32 @@ class Videostatisticscomtwo extends Component {
dataIndex: 'start_at',
key: 'start_at',
align: "center",
className: 'font-14 maxnamewidth90s',
width: '90px',
className: 'font-14 ',
render: (text, record) => (
<span style={{width: '90px'}} >
<a className="maxnamewidth90s" style={{
color:"#333333"
}} title= {moment(record.start_at).format('YYYY-MM-DD HH:mm:ss')}> {record.start_at}</a>
</span>
<div>
<script>
{
`
a{ 
    text-decoration:none;
    color:#333;
}
a:hover{
    text-decoration:none;
    color:#333;
}
`
}
</script>
{
record.start_at?
<a style={{
color:"#333333"
}} title={moment(record.start_at).format('YYYY-MM-DD HH:mm:ss')}>{moment(record.start_at).format('YYYY-MM-DD HH:mm:ss')}</a>
:
<span style={{color:"#333333"}}>--</span>
}
</div>
),
},
{
@ -111,14 +172,34 @@ class Videostatisticscomtwo extends Component {
dataIndex: 'end_at',
key: 'end_at',
align: "center",
className: 'font-14 maxnamewidth90s',
width: '90px',
className: 'font-14 ',
render: (text, record) => (
<span style={{width: '90px'}} >
<a className="maxnamewidth90s" style={{
color:"#333333"
}} title={moment(record.end_at).format('YYYY-MM-DD HH:mm:ss')}>{record.end_at}</a>
</span>
<div>
<script>
{
`
a{ 
    text-decoration:none;
    color:#333;
}
a:hover{
    text-decoration:none;
    color:#333;
}
`
}
</script>
{
record.end_at?
<a style={{
color:"#333333"
}} title={moment(record.end_at).format('YYYY-MM-DD HH:mm:ss')}>{moment(record.end_at).format('YYYY-MM-DD HH:mm:ss')}</a>
:
<span style={{color:"#333333"}}>--</span>
}
</div>
),
}
],
@ -206,8 +287,8 @@ class Videostatisticscomtwo extends Component {
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,
start_at: response.data.data[i].start_at?response.data.data[i].start_at:null,
end_at: response.data.data[i].end_at?response.data.data[i].end_at:null,
title: response.data.data[i].title,
})
}
@ -475,20 +556,39 @@ class Videostatisticscomtwo extends Component {
return (
<React.Fragment>
<div className="ws100s">
<script>
{
`
a{ 
    text-decoration:none;
    color:#333;
}
a:hover{
    text-decoration:none;//鼠标放上面不显示下划线
    color:#333;
}
`
}
</script>
<div className="ws100s teacherentrydivss edu-back-white ">
<div className="ws100s sortinxdirection">
<div className="ws50s sptits font-18">{mytitle}</div>
<p className="sortinxdirection h40s" onClick={() => this.props.tisticsbools(false, null)} >
<i className="iconfont icon-zuojiantou1 font-14 posiivsiconmyss mr5 colorbluesigin xiaoshou h36s" style={{color:'#BBBBBB'}} ></i>
</p>
<div className="ws50s sptits font-18">
<div className="ml10">{mytitle}</div>
</div>
<div className="ws50s sptitss xaxisreverseorder font-14" style={{
color: "#5091FF",
lineHeight: "42px",
}}>
{
isAdmin === true ?
<div className="xiaoshou ml32" 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 ml32" onClick={() => this.props.tisticsbools(false, null)}>*/}
{/* <span className="mr5 xiaoshou">视频统计总览</span><i className="iconfont icon-fanhui font-13 xiaoshou"></i>*/}
{/* </div>*/}
{/* :""*/}
{/*}*/}
{
isAdmin === true ?

@ -21,56 +21,84 @@ class Videostatisticslist extends Component {
key: 'number',
align: "center",
className: 'font-14',
width: '90px',
width: '100px',
render: (text, record) => (
<span style={{width: '90px'}}>{record.number}</span>
<span style={{width: '100px'}}>{record.number}</span>
),
},
{
title: '视频名称',
dataIndex: 'title',
key: 'title',
align: "center",
className: 'font-14 maxnamewidth150s',
width: '150px',
align: "left",
className: 'font-14 width200s widh150wpos',
width:200,
render: (text, record) => (
<span style={{width: '150px'}} className="maxnamewidth150s">
<a className="maxnamewidth150s" style={{
<div className="maxnamewidth200ss textalignlefts" style={{ wordWrap: 'break-word', wordBreak: 'break-word' }}>
<script>
{
`
a{ 
    text-decoration:none;
    color:#333;
}
a:hover{
    text-decoration:none;
    color:#333;
}
`
}
</script>
<a className="maxnamewidth200ss textalignlefts" style={{
color:"#333333"
}} title={record.title}>{record.title}</a>
</span>
</div>
),
},
{
title: '观看人数(人)',
title: '观看人数',
dataIndex: 'people_num',
key: 'people_num',
align: "center",
className: 'font-14',
width: '98px',
className: 'font-14 width150s',
sorter: true,
sortDirections: sortDirections,
width:150,
render: (text, record) => (
<span style={{width: '98px'}}>{record.people_num}</span>
<span>{record.people_num}</span>
),
},
{
title: '累计观看时长',
title: '观看时长',
dataIndex: 'total_time',
key: 'total_time',
align: "center",
className: 'font-14 maxnamewidth100s',
width: '100px',
className: 'font-14 width100s ',
sorter: true,
sortDirections: sortDirections,
width:100,
render: (text, record) => (
<span style={{width: '100px'}} className="maxnamewidth100s">
<a className="maxnamewidth100s" style={{
<div className="maxnamewidth100s ">
<script>
{
`
a{ 
    text-decoration:none;
    color:#333;
}
a:hover{
    text-decoration:none;
    color:#333;
}
`
}
</script>
<a className="maxnamewidth100s " style={{
color:"#333333"
}} title={record.total_time}>{record.total_time}</a>
</span>
</div>
),
},
{
@ -78,11 +106,25 @@ class Videostatisticslist extends Component {
dataIndex: 'user_name',
key: 'user_name',
align: "center",
className: 'font-14 maxnamewidth100s',
width: '100px',
className: 'font-14 width150s',
width:150,
render: (text, record) => (
<span style={{width: '100px'}} className="maxnamewidth100s">
<a className="maxnamewidth100s" style={{
<span className="maxnamewidth150ss">
<script>
{
`
a{ 
    text-decoration:none;
    color:#333;
}
a:hover{
    text-decoration:none;
    color:#333;
}
`
}
</script>
<a className="maxnamewidth150ss" style={{
color:"#333333"
}} title={record.user_name}>{record.user_name}</a>
@ -95,9 +137,8 @@ class Videostatisticslist extends Component {
key: 'id',
align: "center",
className: 'font-14',
width: '50px',
render: (text, record) => (
<span style={{width: '50px',color:'#5091FF'}} className="xiaoshou" onClick={()=>this.props.tisticsbools(true,record.id,record.title)}>详情</span>
<span style={{color:'#5091FF'}} className="xiaoshou" onClick={()=>this.props.tisticsbools(true,record.id,record.title)}>详情</span>
),
}
],
@ -249,6 +290,20 @@ class Videostatisticslist extends Component {
return (
<React.Fragment>
<div className="ws100s mt20">
<script>
{
`
a{ 
    text-decoration:none;
    color:#333;
}
a:hover{
    text-decoration:none;//鼠标放上面不显示下划线
    color:#333;
}
`
}
</script>
<div className="ws100s edu-back-white">
<div className="ws100s teacherentrydivss pd15s">
<div className="ws100s sortinxdirection">
@ -285,11 +340,7 @@ class Videostatisticslist extends Component {
/>
</Spin>
:
<div style={{
minHeight: "400px",
}} className="ws100s">
<NoneDatas></NoneDatas>
</div>
""
}

@ -21,7 +21,7 @@ const clipboardMap = {}
function VideoInReviewItem (props) {
const theme = useContext(ThemeContext);
const { history, file_url , play_url , cover_url , transcoded , title, created_at, published_at, isReview, id
, onEditVideo, onMaskClick, getCopyText, showNotification,vv,play_duration,operation , deleteVideo , moveVideo ,link, people_num,total_time} = props;
, onEditVideo, onMaskClick, getCopyText, showNotification,vv,play_duration,operation , deleteVideo , moveVideo ,link, people_num,total_time,Setmyktid} = props;
useEffect(()=> {
if (!isReview) {
_clipboard = new ClipboardJS(`.copybtn_item_${id}`);
@ -38,7 +38,7 @@ function VideoInReviewItem (props) {
}
}, [])
const username = props.match.params.username
function toList() {
@ -52,11 +52,11 @@ function VideoInReviewItem (props) {
<div className={`${isReview ? 'videoInReviewItem' : 'nItem'} videoItem`}>
<Spin tip="正在转码,请稍等..." spinning={!transcoded && !link}>
<img className="cover" src={imgUrl} alt=""></img>
{ link ?
{ link ?
<a href={link} target='_blank' className="otherLinkPanel">
<span className="otherLink">外链</span>
</a>
: ""
</a>
: ""
}
{!isReview && <div className="mask" onClick={() => onMaskClick(props)}></div>}
@ -76,7 +76,7 @@ function VideoInReviewItem (props) {
{/* <span className="time">{moment(published_at || created_at).format('YYYY-MM-DD HH:mm:ss')}{people_num}</span> */}
{link||total_time===undefined?<span className="time"> </span>:<span className="time">{
formatSeconds(total_time)}
formatSeconds(total_time)}
{/* total_time<60?total_time+' s':total_time/60<60?(total_time/60).toFixed(0)+' min':(total_time/3600).toFixed(1)+ ' h' */}
</span>}
</div>
@ -85,28 +85,32 @@ function VideoInReviewItem (props) {
<span className={"dianjilianicon"}>
{total_time===undefined?'':!people_num || (people_num && people_num)===0 ? "" : <Tooltip title="观看人数" placement="bottom">
<i className={`icon-dianjiliang iconfont dianjilianicon font-12`}> {!people_num || (people_num && people_num)===0?"":people_num}</i>
</Tooltip> }
</Tooltip> }
</span>
<div>
{
isReview !== true && moveVideo &&
<Tooltip title="移动" placement="bottom">
isReview !== true && moveVideo &&
<Tooltip title="移动" placement="bottom">
<i className="icon-yidong iconfont font-15" onClick={() => moveVideo(props)}
style={{ marginTop: '1px', display: 'inline-block'}}
style={{ marginTop: '1px', display: 'inline-block'}}
></i>
</Tooltip>
}
{
deleteVideo &&
<Tooltip title="删除" placement="bottom">
<i className="icon-shanchu iconfont" onClick={() => deleteVideo(props)}
style={{ marginTop: '1px', display: 'inline-block'}}
props&&props.mykt!=undefined? isReview !== true && !link ?
<Tooltip title="统计" placement="bottom">
<i className="icon-tongji1 iconfont font-15" onClick={() => Setmyktid(props.newcourse_video_id,props.newtitle)}
style={{ marginTop: '1px', display: 'inline-block'}}
></i>
</Tooltip>
</Tooltip>:"":""
}
{
isReview !== true && operation &&
<Tooltip title="编辑" placement="bottom">
@ -115,14 +119,23 @@ function VideoInReviewItem (props) {
></i>
</Tooltip>
}
{
isReview !== true && !link ?
<Tooltip title="复制视频地址" placement="bottom">
<Tooltip title="复制" placement="bottom">
<i className={`icon-fuzhi iconfont copybtn_item_${id}`} data-clipboard-text={getCopyText((play_url || file_url), cover_url)}></i>
</Tooltip>:""
}
</div>
{
deleteVideo &&
<Tooltip title="删除" placement="bottom">
<i className="icon-shanchu iconfont" onClick={() => deleteVideo(props)}
style={{ marginTop: '1px', display: 'inline-block'}}
></i>
</Tooltip>
}
</div>
</div>
</div>
</div>

Loading…
Cancel
Save