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

courseware
cxt 5 years ago
commit 98cbc7468e

@ -973,15 +973,15 @@ class GamesController < ApplicationController
if res && res['code'].to_i != 0 if res && res['code'].to_i != 0
raise("实训云平台繁忙繁忙等级99") raise("实训云平台繁忙繁忙等级99")
end end
# @vnc_url = res['showServer'] @vnc_url = res['showServer']
@vnc_url = # @vnc_url =
if request.subdomain == "pre-newweb" || request.subdomain == "test-newweb" # if request.subdomain == "pre-newweb" || request.subdomain == "test-newweb"
# 无域名版本 # # 无域名版本
"http://#{service_host}:#{res['port']}/vnc_lite.html?password=headless" # "http://#{service_host}:#{res['port']}/vnc_lite.html?password=headless"
else # else
# 有域名版本 # # 有域名版本
"https://#{res['port']}.#{service_host}/vnc_lite.html?password=headless" # "https://#{res['port']}.#{service_host}/vnc_lite.html?password=headless"
end # end
@vnc_evaluate = shixun.vnc_evaluate @vnc_evaluate = shixun.vnc_evaluate
rescue Exception => e rescue Exception => e
Rails.logger.error(e.message) Rails.logger.error(e.message)

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

@ -102,7 +102,8 @@ class ListPageIndex extends Component{
this.state={ this.state={
yslGuideone:undefined, yslGuideone:undefined,
yslElearning:false, yslElearning:false,
isexcellent:false isexcellent:false,
homedirectory:false,
} }
} }
comyslElearning(bool){ comyslElearning(bool){
@ -183,6 +184,21 @@ class ListPageIndex extends Component{
updatabanners=()=>{ updatabanners=()=>{
this.refs.CoursesBanner.updatabanner() this.refs.CoursesBanner.updatabanner()
} }
//是否点击了目录
Callhomedirectoryornot=(bool)=>{
this.setState({
homedirectory:bool
})
if(bool===true){
setTimeout(() => {
this.setState({
homedirectory:false,
})
}, 1000);
}
}
render() { render() {
let {yslGuideone} =this.state; let {yslGuideone} =this.state;
// console.log("98"); // console.log("98");
@ -218,7 +234,7 @@ class ListPageIndex extends Component{
{/*left_nav*/} {/*left_nav*/}
<div className={"with22 fl setleft"} style={{width:'264px',minHeight:'500px'}}> <div className={"with22 fl setleft"} style={{width:'264px',minHeight:'500px'}}>
<Coursesleftnav {...this.props} {...this.state} comyslElearning={(i)=>this.comyslElearning(i)}/> <Coursesleftnav {...this.props} {...this.state} comyslElearning={(i)=>this.comyslElearning(i)} myinex={true} Callhomedirectoryornot={(b)=>this.Callhomedirectoryornot(b)}/>
</div> </div>
{/*right_concent*/} {/*right_concent*/}
@ -263,12 +279,12 @@ class ListPageIndex extends Component{
{/*视频列表*/} {/*视频列表*/}
<Route path="/classrooms/:coursesId/course_video/:videoId" <Route path="/classrooms/:coursesId/course_video/:videoId"
render={ render={
(props) => (<CourseVideo {...this.props} {...props} {...this.state} />) (props) => (<CourseVideo {...this.props} {...props} {...this.state} homedirectory={this.state.homedirectory}/>)
} }
></Route> ></Route>
<Route path="/classrooms/:coursesId/course_videos" <Route path="/classrooms/:coursesId/course_videos"
render={ render={
(props) => (<CourseVideo {...this.props} {...props} {...this.state} />) (props) => (<CourseVideo {...this.props} {...props} {...this.state} homedirectory={this.state.homedirectory}/>)
} }
></Route> ></Route>
{/* 教师列表*/} {/* 教师列表*/}

@ -191,15 +191,21 @@ class Video extends Component {
const CourseId = this.props.match.params.coursesId; const CourseId = this.props.match.params.coursesId;
const VID = this.props.match.params.videoId; const VID = this.props.match.params.videoId;
const login = this.props.user && this.props.user.login; let login = this.props && this.props.user&&this.props.user.login;;
const _inputValue = videoId && this.getCopyText(videoId.file_url, videoId.cover_url); const _inputValue = videoId && this.getCopyText(videoId.file_url, videoId.cover_url);
const { admin, is_teacher, business, user_id } = this.props.user; // const { admin, is_teacher, business, user_id } = this.props && this.props.user;
let admin = this.props && this.props.user&&this.props.user.admin;;
let business = this.props && this.props.user&&this.props.user.business;;
let user_id = this.props && this.props.user&&this.props.user.user_id;;
const { videos, upload, uploadVideo, videoData, changePage, pageSize, page } = this.props; const { videos, upload, uploadVideo, videoData, changePage, pageSize, page } = this.props;
const operation = admin || business; const operation = admin || business;
const { course_identity } = this.props.coursedata; const { course_identity } = this.props && this.props.coursedata;
const flagMove = parseInt(course_identity) < 5; const flagMove = parseInt(course_identity) < 5;
return ( return (

@ -1,7 +1,7 @@
import React,{ Component } from "react"; import React, {Component} from "react";
import { WordsBtn,on, trigger ,publicSearchs} from 'educoder'; import {WordsBtn, on, trigger, publicSearchs} from 'educoder';
import { Menu, Spin } from 'antd'; import {Menu, Spin} from 'antd';
import axios from 'axios'; import axios from 'axios';
import Videos from './Video'; import Videos from './Video';
@ -12,114 +12,129 @@ import Videostatistics from '../videostatistics/Videostatistics';
import './video.css'; import './video.css';
import '../css/Courses.css'; import '../css/Courses.css';
import '../publicNav/nav.css'; import '../publicNav/nav.css';
const PAGE_SIZE = 15; const PAGE_SIZE = 15;
const LIVE_PAGE_SIZE = 10; const LIVE_PAGE_SIZE = 10;
const $ = window.$; const $ = window.$;
function getRight(){ function getRight() {
var right = parseInt($(".-task-sidebar").css("right")); var right = parseInt($(".-task-sidebar").css("right"));
return right===0?0:right; return right === 0 ? 0 : right;
} }
class VideoIndex extends Component{
constructor(props){ class VideoIndex extends Component {
constructor(props) {
super(props); super(props);
this.state={ this.state = {
page:1, page: 1,
upload:false, upload: false,
videos:undefined, videos: undefined,
videoData:undefined, videoData: undefined,
otherLinkVisible:false, otherLinkVisible: false,
type:"video", type: "video",
isSpining:false, isSpining: false,
lives:undefined, lives: undefined,
liveData:undefined, liveData: undefined,
liveId:undefined, liveId: undefined,
liveVisible:false,
statistics:false,
liveVisible: false,
statistics: false,
} }
} }
checkType=(type,page)=>{ checkType = (type, page) => {
this.setState({ this.setState({
type, type,
isSpining:true isSpining: true
}) })
if(type === "video"){ if (type === "video") {
this.getList(page); this.getList(page);
}else{ } else {
this.getLiveList(page); this.getLiveList(page);
} }
} }
componentDidMount=()=>{ componentDidMount = () => {
const { search } = this.props.location; const {search} = this.props.location;
const { page } = this.state; const {page} = this.state;
if(search && search === "?open=live"){ if (search && search === "?open=live") {
this.setState({ this.setState({
type:"live" type: "live"
}) })
this.checkType("live",page); this.checkType("live", page);
}else{ } else {
if(search === "?open=new"){ if (search === "?open=new") {
this.setState({ this.setState({
upload:true upload: true
}) })
} }
this.checkType("video",page); this.checkType("video", page);
} }
} }
componentDidUpdate = (prevProps) => { componentDidUpdate = (prevProps) => {
if(this.props.match.params.videoId !== prevProps.match.params.videoId ){ try {
if (this.props.homedirectory !== prevProps.homedirectory) {
if(this.props.homedirectory ===true){
this.setState({
statistics:false,
})
}
}
}catch (e) {
}
if (this.props.match.params.videoId !== prevProps.match.params.videoId) {
this.setState({ this.setState({
upload:false upload: false,
}) })
const { page } = this.state; const {page} = this.state;
this.checkType("video",page); this.checkType("video", page);
} }
} }
// 获取直播列表 // 获取直播列表
getLiveList=(page)=>{ getLiveList = (page) => {
const CourseId=this.props.match.params.coursesId; const CourseId = this.props.match.params.coursesId;
const url = `/courses/${CourseId}/live_links.json`; const url = `/courses/${CourseId}/live_links.json`;
axios.get(url,{ axios.get(url, {
params:{ params: {
page, page,
limit:LIVE_PAGE_SIZE limit: LIVE_PAGE_SIZE
} }
}).then(result=>{ }).then(result => {
if(result){ if (result) {
this.setState({ this.setState({
liveData:result.data, liveData: result.data,
lives:result.data.lives, lives: result.data.lives,
isSpining:false, isSpining: false,
}) })
} }
}).catch(error=>{ }).catch(error => {
console.log(error); console.log(error);
}) })
} }
// 获取视频列表 // 获取视频列表
getList=(page)=>{ getList = (page) => {
const { coursesId , videoId }=this.props.match.params; const {coursesId, videoId} = this.props.match.params;
const fetchUrl = `/courses/${coursesId}/course_videos.json`; const fetchUrl = `/courses/${coursesId}/course_videos.json`;
axios.get(fetchUrl, { axios.get(fetchUrl, {
params: { params: {
page, page,
limit: PAGE_SIZE, limit: PAGE_SIZE,
category_id:videoId category_id: videoId
} }
}) })
.then((response) => { .then((response) => {
if(response){ if (response) {
this.setState({ this.setState({
videos:response.data.videos, videos: response.data.videos,
videoData:response.data, videoData: response.data,
isSpining:false isSpining: false
}) })
} }
}).catch((error) => { }).catch((error) => {
@ -127,23 +142,23 @@ class VideoIndex extends Component{
}) })
} }
changeType=(e)=>{ changeType = (e) => {
this.setState({ this.setState({
type:e.key, type: e.key,
upload:false, upload: false,
page:1 page: 1
}) })
this.checkType(e.key,1); this.checkType(e.key, 1);
} }
changePage=(page,type)=>{ changePage = (page, type) => {
this.setState({ this.setState({
page page
}) })
this.checkType(type,page); this.checkType(type, page);
} }
onEditVideo=(item)=>{ onEditVideo = (item) => {
let videoId = { let videoId = {
videoId: item.id, videoId: item.id,
title: item.title title: item.title
@ -153,25 +168,25 @@ class VideoIndex extends Component{
}) })
this.setVisible(true); this.setVisible(true);
} }
uploadVideo=(upload)=>{ uploadVideo = (upload) => {
this.setState({ this.setState({
upload, upload,
isSpining:true isSpining: true
}) })
const { page } = this.state; const {page} = this.state;
setTimeout(()=>{ setTimeout(() => {
this.getList(page); this.getList(page);
},500) }, 500)
} }
toUpload =()=> { toUpload = () => {
const { admin , is_teacher,business} = this.props.user; const {admin, is_teacher, business} = this.props.user;
if (admin || business || (is_teacher && this.props.checkIfProfessionalCertification())) { if (admin || business || (is_teacher && this.props.checkIfProfessionalCertification())) {
this.setState({ this.setState({
type:"video", type: "video",
upload:true, upload: true,
page:1 page: 1
}) })
} else { } else {
this.props.showProfessionalCertificationDialog(); this.props.showProfessionalCertificationDialog();
@ -187,70 +202,76 @@ class VideoIndex extends Component{
// this.checkType("live",1); // this.checkType("live",1);
// } // }
// 直播设置 // 直播设置
liveSetting=()=>{ liveSetting = () => {
this.setState({ this.setState({
liveId:undefined liveId: undefined
}) })
this.setliveVisibel(true); this.setliveVisibel(true);
} }
//直播设置弹框 //直播设置弹框
setliveVisibel=(flag,changetypeFlag)=>{ setliveVisibel = (flag, changetypeFlag) => {
this.setState({ this.setState({
liveVisible:flag liveVisible: flag
}) })
if(flag === false){ if (flag === false) {
this.setState({ this.setState({
liveId:undefined liveId: undefined
}) })
} }
if(changetypeFlag){ if (changetypeFlag) {
this.checkType("live",1); this.checkType("live", 1);
} }
} }
// 列表-编辑修改传到编辑的id // 列表-编辑修改传到编辑的id
setLiveId=(id)=>{ setLiveId = (id) => {
this.setState({ this.setState({
liveId:id liveId: id
}) })
this.setliveVisibel(true); this.setliveVisibel(true);
} }
// 新增目录 // 新增目录
addDir=()=>{ addDir = () => {
let {videoData}=this.state; let {videoData} = this.state;
trigger('videoAdd', parseInt(videoData.course_module_id)); trigger('videoAdd', parseInt(videoData.course_module_id));
} }
// 目录重命名 // 目录重命名
editDir=(name,id)=>{ editDir = (name, id) => {
let data={id,name,update:this.getList} let data = {id, name, update: this.getList}
trigger('editVideo',data); trigger('editVideo', data);
} }
// 增加外链 // 增加外链
setLinkeVisible=(flag,refresh)=>{ setLinkeVisible = (flag, refresh) => {
this.setState({ this.setState({
otherLinkVisible:flag otherLinkVisible: flag
}) })
if(refresh){ if (refresh) {
const { page } = this.state; const {page} = this.state;
this.getList(page); this.getList(page);
} }
} }
//统计 //统计
statisticsy=(bool)=>{ statisticsy = (bool) => {
this.setState({ this.setState({
statistics:bool statistics: bool,
}) })
} }
render(){
const { videos , upload , videoData , type , liveData , lives , page , liveVisible , isSpining , liveId , otherLinkVisible,statistics } = this.state;
const { is_teacher } = this.props.user;
const { coursesId , videoId }=this.props.match.params;
const {course_identity} = this.props.coursedata; render() {
const {videos, upload, videoData, type, liveData, lives, page, liveVisible, isSpining, liveId, otherLinkVisible, statistics} = 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;
const flag = parseInt(course_identity) < 5; const flag = parseInt(course_identity) < 5;
const newOperation = flag; const newOperation = flag;
const new_upload = flag && (is_teacher && this.props.checkIfProfessionalCertification()); const new_upload = flag && (is_teacher && this.props.checkIfProfessionalCertification());
return(
const isAdmin = this.props&& this.props.isAdmin();
return (
<React.Fragment> <React.Fragment>
<VideoLink <VideoLink
coursesId={coursesId} coursesId={coursesId}
@ -275,9 +296,9 @@ class VideoIndex extends Component{
overflow: hidden!important; overflow: hidden!important;
} }
.-task-sidebar{ .-task-sidebar{
right:${getRight()+7}px!important; right:${getRight() + 7}px!important;
} }
`}</style>: `}</style> :
<style>{ <style>{
` `
body{ body{
@ -286,15 +307,15 @@ class VideoIndex extends Component{
`}</style> `}</style>
} }
{ {
statistics===false? statistics === false ?
<div className="edu-back-white" style={{marginBottom:"1px"}}> <div className="edu-back-white" style={{marginBottom: "1px"}}>
<div className="clearfix pl30 pr30 menuDiv"> <div className="clearfix pl30 pr30 menuDiv">
{ {
videoData && videoData.category_name && type === "video" ? videoData && videoData.category_name && type === "video" ?
<span className="font-18 fl color-dark-21 mt20 mb20">{videoData.category_name}</span> <span className="font-18 fl color-dark-21 mt20 mb20">{videoData.category_name}</span>
: :
<div className="task_menu_ul fl mt2" style={{width:"240px"}}> <div className="task_menu_ul fl mt2" style={{width: "240px"}}>
<Menu mode="horizontal" selectedKeys={[type]} onClick={this.changeType}> <Menu mode="horizontal" selectedKeys={[type]} onClick={this.changeType}>
<Menu.Item key="video">视频</Menu.Item> <Menu.Item key="video">视频</Menu.Item>
<Menu.Item key="live">直播</Menu.Item> <Menu.Item key="live">直播</Menu.Item>
@ -305,32 +326,50 @@ class VideoIndex extends Component{
{ {
type === "video" ? type === "video" ?
<React.Fragment> <React.Fragment>
{
newOperation ?
<span> <span>
{
videoId ?
""
:
<WordsBtn style="blue" className="ml30 font-16 tongjis" <WordsBtn style="blue" className="ml30 font-16 tongjis"
onClick={()=>this.statisticsy(true)} onClick={() => this.statisticsy(true)}
><i className="iconfont icon-tongji1 mr5"></i></WordsBtn> ><i className="iconfont icon-tongji1 mr5"></i></WordsBtn>
}
</span>
{
newOperation ?
<span>
{ {
videoId ? videoId ?
<WordsBtn style="blue" onClick={()=>this.editDir(videoData && videoData.category_name,videoId)} className={"ml30 font-16"}>目录重命名</WordsBtn> <WordsBtn style="blue"
onClick={() => this.editDir(videoData && videoData.category_name, videoId)}
className={"ml30 font-16"}>目录重命名</WordsBtn>
: :
<WordsBtn style="blue" className="ml30 font-16" onClick={this.addDir}>新建目录</WordsBtn> <WordsBtn style="blue" className="ml30 font-16" onClick={this.addDir}>新建目录</WordsBtn>
} }
<WordsBtn style="blue" className="ml30 font-16" onClick={()=>this.setLinkeVisible(true)}>增加外链</WordsBtn> <WordsBtn style="blue" className="ml30 font-16"
</span>:"" onClick={() => this.setLinkeVisible(true)}>增加外链</WordsBtn>
</span> : ""
} }
{ {
new_upload ? new_upload ?
<span> <span>
{ {
upload ? upload ?
<WordsBtn style="grey" className="font-16 ml30" onClick={()=>this.uploadVideo(false)}>取消</WordsBtn> <WordsBtn style="grey" className="font-16 ml30"
onClick={() => this.uploadVideo(false)}>取消</WordsBtn>
: :
<WordsBtn style="blue" className="font-16 ml30" onClick={this.toUpload}>上传视频</WordsBtn> <WordsBtn style="blue" className="font-16 ml30" onClick={this.toUpload}>上传视频</WordsBtn>
} }
</span>:"" </span>
: ""
} }
</React.Fragment> </React.Fragment>
: :
<WordsBtn style="blue" className="font-16 ml30" onClick={this.liveSetting}>添加直播</WordsBtn> <WordsBtn style="blue" className="font-16 ml30" onClick={this.liveSetting}>添加直播</WordsBtn>
@ -339,10 +378,10 @@ class VideoIndex extends Component{
</div> </div>
</div> </div>
: :
<Videostatistics {...this.props} {...this.state} statisticsy={(b)=>this.statisticsy(b)}></Videostatistics> <Videostatistics {...this.props} {...this.state} statisticsy={(b) => this.statisticsy(b)}></Videostatistics>
} }
{ {
statistics===false? statistics === false ?
<Spin spinning={isSpining}> <Spin spinning={isSpining}>
{ {
type === "video" ? type === "video" ?
@ -379,4 +418,5 @@ class VideoIndex extends Component{
) )
} }
} }
export default VideoIndex; export default VideoIndex;

@ -14,7 +14,7 @@ function CommonWorkAppraiseReviseAttachments(props) {
} }
`}</style> `}</style>
<div className={"color-grey-6 mb10 font-16"}> <div className={"color-grey-6 mb10 font-16"}>
补交附件 补交内容
</div> </div>
{/* {age} */} {/* {age} */}

@ -24,7 +24,10 @@ class PublishRightnow extends Component{
Savesname:undefined, Savesname:undefined,
Cancel:undefined, Cancel:undefined,
Saves:undefined, Saves:undefined,
Topvalright:undefined Topvalright:undefined,
modallate_time:undefined,
immediatelyopen:false,
starttimeslate_time:undefined
} }
} }
open = (usingCheckBeforePost) => { open = (usingCheckBeforePost) => {
@ -70,6 +73,8 @@ class PublishRightnow extends Component{
Cancel:this.homeworkhide, Cancel:this.homeworkhide,
Saves:this.homeworkstartend, Saves:this.homeworkstartend,
typs:showdatatypes ? "start" : "end", typs:showdatatypes ? "start" : "end",
immediatelyopen:true,
modallate_time:showdatatypes?this.state.starttimeslate_time:undefined,
}) })
} }
homeworkhide=()=>{ homeworkhide=()=>{
@ -91,7 +96,9 @@ class PublishRightnow extends Component{
StudentList_value:undefined, StudentList_value:undefined,
addname:undefined, addname:undefined,
addnametype:false, addnametype:false,
addnametab:undefined addnametab:undefined,
modallate_time:undefined,
immediatelyopen:false
}) })
} }
@ -187,6 +194,7 @@ class PublishRightnow extends Component{
this.setState({ this.setState({
course_groups: response.data.course_groups, course_groups: response.data.course_groups,
starttimesend:response.data.end_time===undefined||response.data.end_time===null||response.data.end_time===""?undefined:response.data.end_time, starttimesend:response.data.end_time===undefined||response.data.end_time===null||response.data.end_time===""?undefined:response.data.end_time,
starttimeslate_time:response.data.late_time===undefined||response.data.late_time===null||response.data.late_time===""?undefined:response.data.late_time,
}) })
}) })
.catch(function (error) { .catch(function (error) {
@ -260,6 +268,8 @@ class PublishRightnow extends Component{
starttimes={this.state.starttimes} starttimes={this.state.starttimes}
starttimesend={this.state.starttimesend} starttimesend={this.state.starttimesend}
typs={this.state.typs} typs={this.state.typs}
immediatelyopen={this.state.immediatelyopen}
modallate_time={this.state.starttimeslate_time}
/>:""} />:""}
{ showActionButton && <a href="javascript:void(0)" className="color-grey-9" onClick={this.homeworkstart}>{ showdatatypes ? "立即发布" : "立即截止" }</a> } { showActionButton && <a href="javascript:void(0)" className="color-grey-9" onClick={this.homeworkstart}>{ showdatatypes ? "立即发布" : "立即截止" }</a> }
</div> </div>

@ -53,7 +53,7 @@ class CourseLayoutcomponent extends Component{
{/*left_nav*/} {/*left_nav*/}
<div className={"with22 fl setleft"} style={{width:'264px',minHeight:'500px'}}> <div className={"with22 fl setleft"} style={{width:'264px',minHeight:'500px'}}>
<Coursesleftnav {...this.props} {...this.state}/> <Coursesleftnav myinex={false} {...this.props} {...this.state}/>
</div> </div>
{/*right_concent*/} {/*right_concent*/}

@ -64,6 +64,7 @@ class CoursesDetail extends Component{
<div className={"with22 fl setleft"} style={{width:'264px',minHeight:'500px'}}> <div className={"with22 fl setleft"} style={{width:'264px',minHeight:'500px'}}>
<Coursesleftnav <Coursesleftnav
{...this.props} {...this.props}
myinex={false}
getleftNavid={this.getleftNavid} getleftNavid={this.getleftNavid}
/> />
</div> </div>

@ -347,6 +347,15 @@ class Coursesleftnav extends Component{
indexs:index indexs:index
}) })
// this.props.history.replace(urls); // this.props.history.replace(urls);
try {
if(this.props.myinex===true){
this.props.Callhomedirectoryornot(true);
}
}catch (e) {
}
e.stopPropagation();//阻止冒泡 e.stopPropagation();//阻止冒泡
} }
@ -359,6 +368,14 @@ class Coursesleftnav extends Component{
}) })
this.props.updataleftNavfun(); this.props.updataleftNavfun();
this.props.history.replace(urls); this.props.history.replace(urls);
try {
if(this.props.myinex===true){
this.props.Callhomedirectoryornot(true);
}
}catch (e) {
}
e.stopPropagation();//阻止冒泡 e.stopPropagation();//阻止冒泡
} }
@ -885,6 +902,13 @@ class Coursesleftnav extends Component{
url:urls, url:urls,
indexs:index indexs:index
}) })
try {
if(this.props.myinex===true){
this.props.Callhomedirectoryornot(true);
}
}catch (e) {
}
this.props.history.replace(urls); this.props.history.replace(urls);
e.stopPropagation();//阻止冒泡 e.stopPropagation();//阻止冒泡
} }

@ -35,7 +35,10 @@ class OneSelfOrderModal extends Component{
group_ids:[], group_ids:[],
endtime:"", endtime:"",
course_groups:undefined, course_groups:undefined,
Checkboxtype:true Checkboxtype:true,
endtimetypevalue:undefined,
endtimetypeid:undefined,
endtimetypename:undefined
} }
} }
componentDidMount() { componentDidMount() {
@ -202,12 +205,16 @@ class OneSelfOrderModal extends Component{
} }
propsSaves=(ds,endtime)=>{ propsSaves=(ds,endtime)=>{
this.setState({
endtimetype:false
})
let {course_groups}=this.state; let {course_groups}=this.state;
if(this.props.typs=="end"){ if(this.props.typs=="end"){
this.props.Saves() this.props.Saves()
}else{ }else{
if(!this.props.immediatelyopen){
if(this.props.typs!="end"){ if(this.props.typs!="end"){
if(!endtime){ if(!endtime){
this.setState({ this.setState({
@ -224,6 +231,8 @@ class OneSelfOrderModal extends Component{
return return
} }
} }
}
let type=false let type=false
if(course_groups===undefined||course_groups.length===0){ if(course_groups===undefined||course_groups.length===0){
@ -238,6 +247,7 @@ class OneSelfOrderModal extends Component{
this.setState({ this.setState({
endtimetype:true, endtimetype:true,
endtimetypeid:items.id, endtimetypeid:items.id,
endtimetypename:items.name,
endtimetypevalue:"截止时间不能为空" endtimetypevalue:"截止时间不能为空"
}) })
return return
@ -245,12 +255,29 @@ class OneSelfOrderModal extends Component{
// arr.push(moment(moment(handleDateString(this.props.staytime)).add(1, 'week')).format("YYYY-MM-DD HH:mm")) // arr.push(moment(moment(handleDateString(this.props.staytime)).add(1, 'week')).format("YYYY-MM-DD HH:mm"))
}else{ }else{
if(moment(items.end_time,"YYYY-MM-DD HH:mm") <= moment(this.props.starttime,"YYYY-MM-DD HH:mm")){ if(moment(items.end_time,"YYYY-MM-DD HH:mm") <= moment(this.props.starttime,"YYYY-MM-DD HH:mm")){
type=true
this.setState({ this.setState({
endtimetype:true, endtimetype:true,
endtimetypevalue:"必须晚于当前时间" endtimetypeid:items.id,
endtimetypename:items.name,
endtimetypevalue:"截止时间必须晚于当前时间"
}) })
return return
} }
if(this.props.modallate_time){
if(moment(items.end_time,"YYYY-MM-DD HH:mm") >= moment(this.props.modallate_time,"YYYY-MM-DD HH:mm")){
type=true
this.setState({
endtimetype:true,
endtimetypeid:items.id,
endtimetypename:items.name,
endtimetypevalue:"截止时间必须晚于补交结束时间"
})
return
}
}
arr.push(handleDateString(items.end_time)) arr.push(handleDateString(items.end_time))
} }
} }

@ -295,10 +295,10 @@ class Studentshavecompletedthelist extends Component {
) )
}, },
{ {
title:<span>最终成绩<Tooltip placement="top" visible={true} title={<pre> title:<span>最终成绩<Tooltip placement="top" title={<pre>
鼠标停留具体分值上可查<br/> 鼠标停留具体分值上可查<br/>
看得分明细<br/> 看得分明细<br/>
</pre>}></Tooltip></span>, </pre>}><img src={getImageUrl("images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
dataIndex: 'efficiencyscore', dataIndex: 'efficiencyscore',
key: 'efficiencyscore', key: 'efficiencyscore',
align: 'center', align: 'center',
@ -340,6 +340,22 @@ class Studentshavecompletedthelist extends Component {
}}>{record.efficiencyscore}</span> }}>{record.efficiencyscore}</span>
</Tooltip> </Tooltip>
: :
<Tooltip placement="right" title={<div>
<div>{record.objective_score===undefined?"":record.objective_score === "--" ? <span>客观题得分0</span> :
<span>客观题得分{record.objective_score}</span>}
</div>
<div>{record.subjective_score===undefined?"":record.subjective_score === "--" ? <span>主观题得分0</span> :
<span>主观题得分{record.subjective_score}</span>}
</div>
<div>{record.efficiencyscore === "--" ? <span>最终成绩0</span> :
<span>最终成绩{record.efficiencyscore}</span>}
</div>
</div>
}>
<span style={parseInt(record.efficiencyscore) > 90 ? { <span style={parseInt(record.efficiencyscore) > 90 ? {
color: '#DD1717', color: '#DD1717',
textAlign: "center" textAlign: "center"
@ -353,6 +369,7 @@ class Studentshavecompletedthelist extends Component {
color: '#747A7F', color: '#747A7F',
textAlign: "center" textAlign: "center"
}}>{record.efficiencyscore}</span> }}>{record.efficiencyscore}</span>
</Tooltip>
} }
</span> </span>
) )
@ -590,10 +607,10 @@ class Studentshavecompletedthelist extends Component {
) )
}, },
{ {
title:<span>最终成绩<Tooltip placement="top" visible={true} title={<pre> title:<span>最终成绩<Tooltip placement="top" title={<pre>
鼠标停留具体分值上可查<br/> 鼠标停留具体分值上可查<br/>
看得分明细<br/> 看得分明细<br/>
</pre>}></Tooltip></span>, </pre>}><img src={getImageUrl("images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
dataIndex: 'efficiencyscore', dataIndex: 'efficiencyscore',
key: 'efficiencyscore', key: 'efficiencyscore',
align: 'center', align: 'center',
@ -637,6 +654,22 @@ class Studentshavecompletedthelist extends Component {
}}>{record.efficiencyscore}</span> }}>{record.efficiencyscore}</span>
</Tooltip> </Tooltip>
: :
<Tooltip placement="right" title={<div>
<div>{record.objective_score===undefined?"":record.objective_score === "--" ? <span>客观题得分0</span> :
<span>客观题得分{record.objective_score}</span>}
</div>
<div>{record.subjective_score===undefined?"":record.subjective_score === "--" ? <span>主观题得分0</span> :
<span>主观题得分{record.subjective_score}</span>}
</div>
<div>{record.efficiencyscore === "--" ? <span>最终成绩0</span> :
<span>最终成绩{record.efficiencyscore}</span>}
</div>
</div>
}>
<span style={parseInt(record.efficiencyscore) > 90 ? { <span style={parseInt(record.efficiencyscore) > 90 ? {
color: '#DD1717', color: '#DD1717',
textAlign: "center", textAlign: "center",
@ -654,6 +687,7 @@ class Studentshavecompletedthelist extends Component {
textAlign: "center", textAlign: "center",
width:"199px" width:"199px"
}}>{record.efficiencyscore}</span> }}>{record.efficiencyscore}</span>
</Tooltip>
} }
</span> </span>
@ -877,10 +911,10 @@ class Studentshavecompletedthelist extends Component {
) )
}, },
{ {
title: <span>最终成绩<Tooltip placement="top" visible={true} title={<pre> title: <span>最终成绩<Tooltip placement="top" title={<pre>
鼠标停留具体分值上可查<br/> 鼠标停留具体分值上可查<br/>
看得分明细<br/> 看得分明细<br/>
</pre>}></Tooltip></span>, </pre>}><img src={getImageUrl("images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
dataIndex: 'efficiencyscore', dataIndex: 'efficiencyscore',
key: 'efficiencyscore', key: 'efficiencyscore',
align: 'center', align: 'center',
@ -918,6 +952,22 @@ class Studentshavecompletedthelist extends Component {
}}>{record.efficiencyscore}</span> }}>{record.efficiencyscore}</span>
</Tooltip> </Tooltip>
: :
<Tooltip placement="right" title={<div>
<div>{record.objective_score===undefined?"":record.objective_score === "--" ? <span>客观题得分0</span> :
<span>客观题得分{record.objective_score}</span>}
</div>
<div>{record.subjective_score===undefined?"":record.subjective_score === "--" ? <span>主观题得分0</span> :
<span>主观题得分{record.subjective_score}</span>}
</div>
<div>{record.efficiencyscore === "--" ? <span>最终成绩0</span> :
<span>最终成绩{record.efficiencyscore}</span>}
</div>
</div>
}>
<span style={parseInt(record.efficiencyscore) > 90 ? { <span style={parseInt(record.efficiencyscore) > 90 ? {
color: '#DD1717', color: '#DD1717',
textAlign: "center", textAlign: "center",
@ -931,6 +981,7 @@ class Studentshavecompletedthelist extends Component {
color: '#747A7F', color: '#747A7F',
textAlign: "center", textAlign: "center",
}}>{record.efficiencyscore}</span> }}>{record.efficiencyscore}</span>
</Tooltip>
} }
</span> </span>
) )
@ -1104,10 +1155,10 @@ class Studentshavecompletedthelist extends Component {
) )
}, },
{ {
title: <span>最终成绩<Tooltip placement="top" visible={true} title={<pre> title: <span>最终成绩<Tooltip placement="top" title={<pre>
鼠标停留具体分值上可查<br/> 鼠标停留具体分值上可查<br/>
看得分明细<br/> 看得分明细<br/>
</pre>}></Tooltip></span>, </pre>}><img src={getImageUrl("images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
dataIndex: 'efficiencyscore', dataIndex: 'efficiencyscore',
key: 'efficiencyscore', key: 'efficiencyscore',
align: 'center', align: 'center',
@ -1144,6 +1195,22 @@ class Studentshavecompletedthelist extends Component {
}}>{record.efficiencyscore}</span> }}>{record.efficiencyscore}</span>
</Tooltip> </Tooltip>
: :
<Tooltip placement="right" title={<div>
<div>{record.objective_score===undefined?"":record.objective_score === "--" ? <span>客观题得分0</span> :
<span>客观题得分{record.objective_score}</span>}
</div>
<div>{record.subjective_score===undefined?"":record.subjective_score === "--" ? <span>主观题得分0</span> :
<span>主观题得分{record.subjective_score}</span>}
</div>
<div>{record.efficiencyscore === "--" ? <span>最终成绩0</span> :
<span>最终成绩{record.efficiencyscore}</span>}
</div>
</div>
}>
<span style={parseInt(record.efficiencyscore) > 90 ? { <span style={parseInt(record.efficiencyscore) > 90 ? {
color: '#DD1717', color: '#DD1717',
textAlign: "center", textAlign: "center",
@ -1157,6 +1224,7 @@ class Studentshavecompletedthelist extends Component {
color: '#747A7F', color: '#747A7F',
textAlign: "center", textAlign: "center",
}}>{record.efficiencyscore}</span> }}>{record.efficiencyscore}</span>
</Tooltip>
} }
</span> </span>
) )
@ -1511,6 +1579,8 @@ class Studentshavecompletedthelist extends Component {
completion: exercise_users[i].objective_score === undefined ? "--" : exercise_users[i].objective_score === null ? "--" : exercise_users[i].objective_score === "" ? "--" : exercise_users[i].objective_score, completion: exercise_users[i].objective_score === undefined ? "--" : exercise_users[i].objective_score === null ? "--" : exercise_users[i].objective_score === "" ? "--" : exercise_users[i].objective_score,
levelscore: exercise_users[i].subjective_score === undefined ? "--" : exercise_users[i].subjective_score === null ? "--" : exercise_users[i].subjective_score === "" ? "--" : exercise_users[i].subjective_score, levelscore: exercise_users[i].subjective_score === undefined ? "--" : exercise_users[i].subjective_score === null ? "--" : exercise_users[i].subjective_score === "" ? "--" : exercise_users[i].subjective_score,
efficiencyscore: exercise_users[i].score === null ? "--" : exercise_users[i].score === "" ? "--" : exercise_users[i].score, efficiencyscore: exercise_users[i].score === null ? "--" : exercise_users[i].score === "" ? "--" : exercise_users[i].score,
objective_score: exercise_users[i].objective_score === null ? "--" : exercise_users[i].objective_score === "" ? "--" : exercise_users[i].objective_score,
subjective_score:exercise_users[i].subjective_score === null ? "--" : exercise_users[i].subjective_score === "" ? "--" : exercise_users[i].subjective_score,
operating: "评阅", operating: "评阅",
commit_method:exercise_users[i].commit_method, commit_method:exercise_users[i].commit_method,
}) })
@ -1527,6 +1597,8 @@ class Studentshavecompletedthelist extends Component {
completion: exercise_users[i].objective_score === undefined ? "--" : exercise_users[i].objective_score === null ? "--" : exercise_users[i].objective_score === "" ? "--" : exercise_users[i].objective_score, completion: exercise_users[i].objective_score === undefined ? "--" : exercise_users[i].objective_score === null ? "--" : exercise_users[i].objective_score === "" ? "--" : exercise_users[i].objective_score,
levelscore: exercise_users[i].subjective_score === undefined ? "--" : exercise_users[i].subjective_score === null ? "--" : exercise_users[i].subjective_score === "" ? "--" : exercise_users[i].subjective_score, levelscore: exercise_users[i].subjective_score === undefined ? "--" : exercise_users[i].subjective_score === null ? "--" : exercise_users[i].subjective_score === "" ? "--" : exercise_users[i].subjective_score,
efficiencyscore: exercise_users[i].score === null ? "--" : exercise_users[i].score === "" ? "--" : exercise_users[i].score, efficiencyscore: exercise_users[i].score === null ? "--" : exercise_users[i].score === "" ? "--" : exercise_users[i].score,
objective_score: exercise_users[i].objective_score === null ? "--" : exercise_users[i].objective_score === "" ? "--" : exercise_users[i].objective_score,
subjective_score:exercise_users[i].subjective_score === null ? "--" : exercise_users[i].subjective_score === "" ? "--" : exercise_users[i].subjective_score,
operating: "--", operating: "--",
commit_method:exercise_users[i].commit_method commit_method:exercise_users[i].commit_method
}) })
@ -1552,6 +1624,8 @@ class Studentshavecompletedthelist extends Component {
submitstate: current_answer_user.commit_status === 1 ? "已提交" : "未提交", submitstate: current_answer_user.commit_status === 1 ? "已提交" : "未提交",
updatetime: moment(current_answer_user.end_at).format('YYYY-MM-DD HH:mm') === "Invalid date" ? "--" : moment(current_answer_user.end_at).format('YYYY-MM-DD HH:mm'), updatetime: moment(current_answer_user.end_at).format('YYYY-MM-DD HH:mm') === "Invalid date" ? "--" : moment(current_answer_user.end_at).format('YYYY-MM-DD HH:mm'),
efficiencyscore: current_answer_user.score === undefined ? "--" : current_answer_user.score === null ? "--" : current_answer_user.score === "" ? "--" : current_answer_user.score, efficiencyscore: current_answer_user.score === undefined ? "--" : current_answer_user.score === null ? "--" : current_answer_user.score === "" ? "--" : current_answer_user.score,
objective_score: exercise_users[i].objective_score === null ? "--" : exercise_users[i].objective_score === "" ? "--" : exercise_users[i].objective_score,
subjective_score:exercise_users[i].subjective_score === null ? "--" : exercise_users[i].subjective_score === "" ? "--" : exercise_users[i].subjective_score,
review_status: current_answer_user.review_status, review_status: current_answer_user.review_status,
completion: current_answer_user.objective_score === undefined ? "--" : current_answer_user.objective_score === null ? "--" : current_answer_user.objective_score === "" ? "--" : current_answer_user.objective_score, completion: current_answer_user.objective_score === undefined ? "--" : current_answer_user.objective_score === null ? "--" : current_answer_user.objective_score === "" ? "--" : current_answer_user.objective_score,
levelscore: current_answer_user.subjective_score === undefined ? "--" : current_answer_user.subjective_score === null ? "--" : current_answer_user.subjective_score === "" ? "--" : current_answer_user.subjective_score, levelscore: current_answer_user.subjective_score === undefined ? "--" : current_answer_user.subjective_score === null ? "--" : current_answer_user.subjective_score === "" ? "--" : current_answer_user.subjective_score,
@ -1594,6 +1668,8 @@ class Studentshavecompletedthelist extends Component {
completion: exercise_users[i].objective_score === undefined ? "--" : exercise_users[i].objective_score === null ? "--" : exercise_users[i].objective_score === "" ? "--" : exercise_users[i].objective_score, completion: exercise_users[i].objective_score === undefined ? "--" : exercise_users[i].objective_score === null ? "--" : exercise_users[i].objective_score === "" ? "--" : exercise_users[i].objective_score,
levelscore: exercise_users[i].subjective_score === undefined ? "--" : exercise_users[i].subjective_score === null ? "--" : exercise_users[i].subjective_score === "" ? "--" : exercise_users[i].subjective_score, levelscore: exercise_users[i].subjective_score === undefined ? "--" : exercise_users[i].subjective_score === null ? "--" : exercise_users[i].subjective_score === "" ? "--" : exercise_users[i].subjective_score,
efficiencyscore: exercise_users[i].score === null ? "--" : exercise_users[i].score === "" ? "--" : exercise_users[i].score, efficiencyscore: exercise_users[i].score === null ? "--" : exercise_users[i].score === "" ? "--" : exercise_users[i].score,
objective_score: exercise_users[i].objective_score === null ? "--" : exercise_users[i].objective_score === "" ? "--" : exercise_users[i].objective_score,
subjective_score:exercise_users[i].subjective_score === null ? "--" : exercise_users[i].subjective_score === "" ? "--" : exercise_users[i].subjective_score,
operating: "查看", operating: "查看",
commit_method:exercise_users[i].commit_method, commit_method:exercise_users[i].commit_method,
}) })
@ -1739,6 +1815,8 @@ class Studentshavecompletedthelist extends Component {
completion: exercise_users[i].objective_score === undefined ? "--" : exercise_users[i].objective_score === null ? "--" : exercise_users[i].objective_score === "" ? "--" : exercise_users[i].objective_score, completion: exercise_users[i].objective_score === undefined ? "--" : exercise_users[i].objective_score === null ? "--" : exercise_users[i].objective_score === "" ? "--" : exercise_users[i].objective_score,
levelscore: exercise_users[i].subjective_score === undefined ? "--" : exercise_users[i].subjective_score === null ? "--" : exercise_users[i].subjective_score === "" ? "--" : exercise_users[i].subjective_score, levelscore: exercise_users[i].subjective_score === undefined ? "--" : exercise_users[i].subjective_score === null ? "--" : exercise_users[i].subjective_score === "" ? "--" : exercise_users[i].subjective_score,
efficiencyscore: exercise_users[i].score === undefined ? "--" : exercise_users[i].score === null ? "--" : exercise_users[i].score === "" ? "--" : exercise_users[i].score, efficiencyscore: exercise_users[i].score === undefined ? "--" : exercise_users[i].score === null ? "--" : exercise_users[i].score === "" ? "--" : exercise_users[i].score,
objective_score: exercise_users[i].objective_score === null ? "--" : exercise_users[i].objective_score === "" ? "--" : exercise_users[i].objective_score,
subjective_score:exercise_users[i].subjective_score === null ? "--" : exercise_users[i].subjective_score === "" ? "--" : exercise_users[i].subjective_score,
finalscore: "评阅", finalscore: "评阅",
user_id: exercise_users[i].user_id, user_id: exercise_users[i].user_id,
commit_method:exercise_users[i].commit_method commit_method:exercise_users[i].commit_method
@ -1756,6 +1834,8 @@ class Studentshavecompletedthelist extends Component {
completion: exercise_users[i].objective_score === undefined ? "--" : exercise_users[i].objective_score === null ? "--" : exercise_users[i].objective_score === "" ? "--" : exercise_users[i].objective_score, completion: exercise_users[i].objective_score === undefined ? "--" : exercise_users[i].objective_score === null ? "--" : exercise_users[i].objective_score === "" ? "--" : exercise_users[i].objective_score,
levelscore: exercise_users[i].subjective_score === undefined ? "--" : exercise_users[i].subjective_score === null ? "--" : exercise_users[i].subjective_score === "" ? "--" : exercise_users[i].subjective_score, levelscore: exercise_users[i].subjective_score === undefined ? "--" : exercise_users[i].subjective_score === null ? "--" : exercise_users[i].subjective_score === "" ? "--" : exercise_users[i].subjective_score,
efficiencyscore: exercise_users[i].score === undefined ? "--" : exercise_users[i].score === null ? "--" : exercise_users[i].score === "" ? "--" : exercise_users[i].score, efficiencyscore: exercise_users[i].score === undefined ? "--" : exercise_users[i].score === null ? "--" : exercise_users[i].score === "" ? "--" : exercise_users[i].score,
objective_score: exercise_users[i].objective_score === null ? "--" : exercise_users[i].objective_score === "" ? "--" : exercise_users[i].objective_score,
subjective_score:exercise_users[i].subjective_score === null ? "--" : exercise_users[i].subjective_score === "" ? "--" : exercise_users[i].subjective_score,
finalscore: "--", finalscore: "--",
user_id: exercise_users[i].user_id, user_id: exercise_users[i].user_id,
commit_method:exercise_users[i].commit_method commit_method:exercise_users[i].commit_method

@ -353,7 +353,7 @@ class PollDetailTabForthRules extends Component{
render(){ render(){
let {rules,course_group,flagPageEdit}=this.state let {rules,course_group,flagPageEdit}=this.state
let isAdmin=this.props.isAdmin(); let isAdmin=this.props.isAdmin();
console.log(flagPageEdit) // console.log(flagPageEdit)
return( return(
<div className="bor-top-greyE pt20"> <div className="bor-top-greyE pt20">
<p className="clearfix mb10"> <p className="clearfix mb10">

@ -1204,10 +1204,10 @@ class Listofworksstudentone extends Component {
) )
}, },
{ {
title: <span>当前成绩<Tooltip placement="top" visible={true} title={<pre> title: <span>当前成绩<Tooltip placement="top"title={<pre>
鼠标停留具体分值上可查<br/> 鼠标停留具体分值上可查<br/>
看得分明细<br/> 看得分明细<br/>
</pre>}></Tooltip></span>, </pre>}><img src={getImageUrl("images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
dataIndex: 'work_score', dataIndex: 'work_score',
key: 'work_score', key: 'work_score',
align: 'center', align: 'center',
@ -1572,10 +1572,10 @@ class Listofworksstudentone extends Component {
) )
}, },
{ {
title: <span>当前成绩<Tooltip placement="top" visible={true} title={<pre> title: <span>当前成绩<Tooltip placement="top" title={<pre>
鼠标停留具体分值上可查<br/> 鼠标停留具体分值上可查<br/>
看得分明细<br/> 看得分明细<br/>
</pre>}></Tooltip></span>, </pre>}><img src={getImageUrl("images/educoder/problem.png")} className={"ml2"}/></Tooltip></span>,
dataIndex: 'work_score', dataIndex: 'work_score',
key: 'work_score', key: 'work_score',
align: 'center', align: 'center',

@ -135,6 +135,8 @@ class Trainingjobsetting extends Component {
borredszfls:'', borredszfls:'',
total_scoretwo:0, total_scoretwo:0,
total_score:0, total_score:0,
immediatelyopen:false,
modallate_time:undefined
} }
// console.log("获取到的值") // console.log("获取到的值")
// console.log("Trainingjobsetting") // console.log("Trainingjobsetting")
@ -1757,7 +1759,9 @@ class Trainingjobsetting extends Component {
Savesname: "立即发布", Savesname: "立即发布",
Cancel: this.homeworkhide, Cancel: this.homeworkhide,
Saves: this.homeworkstartend, Saves: this.homeworkstartend,
course_groups: response.data.course_groups, course_groups:response.data.course_groups,
immediatelyopen:true,
modallate_time:response.data.late_time,
}) })
} }
}).catch((error) => { }).catch((error) => {
@ -1799,6 +1803,7 @@ class Trainingjobsetting extends Component {
} }
// 立即发布 // 立即发布
homeworkstartend = (ds, endtime) => { homeworkstartend = (ds, endtime) => {
debugger
var homeworkid = this.props.match.params.homeworkid; var homeworkid = this.props.match.params.homeworkid;
let data = {} let data = {}
@ -1914,6 +1919,8 @@ class Trainingjobsetting extends Component {
typs: undefined, typs: undefined,
starttimes: undefined, starttimes: undefined,
starttimesend: undefined, starttimesend: undefined,
immediatelyopen:false,
modallate_time:undefined,
}) })
} }
cancelBox = () => { cancelBox = () => {
@ -2401,6 +2408,8 @@ class Trainingjobsetting extends Component {
starttimes={this.state.starttimes} starttimes={this.state.starttimes}
starttimesend={this.state.starttimesend} starttimesend={this.state.starttimesend}
typs={this.state.typs} typs={this.state.typs}
immediatelyopen={this.state.immediatelyopen}
modallate_time={this.state.modallate_time}
/> : ""} /> : ""}
<Modals <Modals

@ -188,6 +188,15 @@
padding-top: 20px; padding-top: 20px;
padding-bottom: 20px; padding-bottom: 20px;
} }
.pdinstop0{
padding-top: 0px !important;
}
.teacherentrydivss{
padding-left: 20px;
padding-right: 20px;
padding-top: 20px;
padding-bottom: 20px;
}
.teachedivp{ .teachedivp{
font-size:16px; font-size:16px;
font-family:Microsoft YaHei; font-family:Microsoft YaHei;
@ -408,6 +417,14 @@
white-space:nowrap; white-space:nowrap;
cursor: default; cursor: default;
} }
.maxnamewidth200yss{
text-align: center;
max-width:200px;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
cursor: default;
}
.maxnamewidth100s{ .maxnamewidth100s{
width: 100px; width: 100px;
max-width: 100px; max-width: 100px;

@ -49,6 +49,7 @@ class Students_signin extends Component{
page:1, page:1,
limit:5 limit:5
} }
this.gogetdatas(data); this.gogetdatas(data);
// const query = this.props.location.search; // const query = this.props.location.search;
@ -58,8 +59,17 @@ class Students_signin extends Component{
} }
componentDidUpdate = (prevProps) => { componentDidUpdate = (prevProps) => {
try {
if (this.props.homedirectory !== prevProps.homedirectory) {
if(this.props.homedirectory ===true){
this.setState({
switchs:false,
})
}
}
}catch (e) {
}
} }
callback=(key)=> { callback=(key)=> {

@ -33,7 +33,7 @@ class Videostatisticscom extends Component {
<div className="ws100s edu-back-white sortinxdirection" style={{ <div className="ws100s edu-back-white sortinxdirection" style={{
position: "relative" position: "relative"
}}> }}>
<div className="ws100s teacherentrydivs "> <div className="ws100s teacherentrydivss ">
<div className="ws100s sortinxdirection"> <div className="ws100s sortinxdirection">
<div className="ws50s sptits">视频统计总览</div> <div className="ws50s 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 className="ws50s sptitss xaxisreverseorder">播放数据从{this.props.watch_staticsdata&&this.props.watch_staticsdata.begin_at?this.props.watch_staticsdata.begin_at:0}开始统计</div>

@ -1,7 +1,7 @@
import React, {Component} from "react"; import React, {Component} from "react";
import '../../signin/css/signincdi.css'; import '../../signin/css/signincdi.css';
import {Pagination, Table, Menu, Dropdown} from 'antd'; import {Pagination, Table, Menu, Dropdown,Spin} from 'antd';
import {getImageUrl, sortDirections} from 'educoder'; import {getImageUrl, sortDirections,formatSeconds} from 'educoder';
import axios from 'axios'; import axios from 'axios';
import LoadingSpin from "../../../../common/LoadingSpin"; import LoadingSpin from "../../../../common/LoadingSpin";
import NoneDatas from "../../signin/component/NoneDatas"; import NoneDatas from "../../signin/component/NoneDatas";
@ -16,7 +16,7 @@ class Videostatisticscomtwo extends Component {
this.state = { this.state = {
data: [], data: [],
page: 1, page: 1,
limit: 10, limit: 20,
members_count: 0, members_count: 0,
columnsstu: [ columnsstu: [
{ {
@ -38,7 +38,12 @@ class Videostatisticscomtwo extends Component {
className: 'font-14 maxnamewidth100s', className: 'font-14 maxnamewidth100s',
width: '100px', width: '100px',
render: (text, record) => ( render: (text, record) => (
<span style={{width: '100px'}} className="maxnamewidth100s">{record.user_name}</span> <span style={{width: '100px'}} className="maxnamewidth100s">
<a className="maxnamewidth100s" style={{
color:"#333333"
}} title={record.user_name}>{record.user_name}</a>
</span>
), ),
}, },
{ {
@ -63,7 +68,9 @@ class Videostatisticscomtwo extends Component {
sorter: true, sorter: true,
sortDirections: sortDirections, sortDirections: sortDirections,
render: (text, record) => ( render: (text, record) => (
<span style={{width: '150px'}} className="maxnamewidth150s">{record.total_duration}</span> <span style={{width: '150px'}} className="maxnamewidth150s"><a className="maxnamewidth150s" style={{
color:"#333333"
}} title={record.total_duration}>{record.total_duration}</a></span>
), ),
}, },
{ {
@ -76,7 +83,11 @@ class Videostatisticscomtwo extends Component {
sorter: true, sorter: true,
sortDirections: sortDirections, sortDirections: sortDirections,
render: (text, record) => ( render: (text, record) => (
<span style={{width: '100px'}} className="maxnamewidth100s">{record.feq}</span> <span style={{width: '100px'}} className="maxnamewidth100s">
<a className="maxnamewidth100s" style={{
color:"#333333"
}} title={record.feq}>{record.feq}</a>
</span>
), ),
}, },
{ {
@ -87,7 +98,11 @@ class Videostatisticscomtwo extends Component {
className: 'font-14 maxnamewidth100s', className: 'font-14 maxnamewidth100s',
width: '100px', width: '100px',
render: (text, record) => ( render: (text, record) => (
<span style={{width: '100px', color: '#5091FF'}} className="xiaoshou">{record.start_at}</span> <span style={{width: '100px'}} >
<a className="maxnamewidth100s" style={{
color:"#333333"
}} title= {record.start_at}> {record.start_at}</a>
</span>
), ),
}, },
{ {
@ -98,7 +113,11 @@ class Videostatisticscomtwo extends Component {
className: 'font-14 maxnamewidth100s', className: 'font-14 maxnamewidth100s',
width: '100px', width: '100px',
render: (text, record) => ( render: (text, record) => (
<span style={{width: '100px', color: '#5091FF'}} className="xiaoshou">{record.end_at}</span> <span style={{width: '100px'}} >
<a className="maxnamewidth100s" style={{
color:"#333333"
}} title= {record.end_at}>{record.end_at}</a>
</span>
), ),
} }
], ],
@ -183,7 +202,7 @@ class Videostatisticscomtwo extends Component {
number: (parseInt(this.state.page) - 1) * parseInt(this.state.limit) + (i + 1), number: (parseInt(this.state.page) - 1) * parseInt(this.state.limit) + (i + 1),
user_name: response.data.data[i].user_name, user_name: response.data.data[i].user_name,
is_finished: response.data.data[i].is_finished, 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, feq: response.data.data[i].feq,
start_at: response.data.data[i].start_at, start_at: response.data.data[i].start_at,
end_at: response.data.data[i].end_at, end_at: response.data.data[i].end_at,
@ -385,7 +404,7 @@ class Videostatisticscomtwo extends Component {
<Menu> <Menu>
<Menu.Item> <Menu.Item>
<a onClick={() => this.setcourse_groups(null)}> <a onClick={() => this.setcourse_groups(null)}>
<p className="maxnamewidth200s">全部</p> <p className="maxnamewidth200yss">全部</p>
</a> </a>
</Menu.Item> </Menu.Item>
{ {
@ -395,7 +414,7 @@ class Videostatisticscomtwo extends Component {
return ( return (
<Menu.Item> <Menu.Item>
<a onClick={() => this.setcourse_groups(item.id)} key={key}> <a onClick={() => this.setcourse_groups(item.id)} key={key}>
<p className="maxnamewidth200s">{item.name}</p> <p className="maxnamewidth200yss">{item.name}</p>
</a> </a>
</Menu.Item> </Menu.Item>
) )
@ -409,7 +428,7 @@ class Videostatisticscomtwo extends Component {
return ( return (
<React.Fragment> <React.Fragment>
<div className="ws100s"> <div className="ws100s">
<div className="ws100s teacherentrydivs edu-back-white "> <div className="ws100s teacherentrydivss edu-back-white ">
<div className="ws100s sortinxdirection"> <div className="ws100s sortinxdirection">
<div className="ws50s sptits">视频名称视频名称</div> <div className="ws50s sptits">视频名称视频名称</div>
<div className="ws50s sptitss xaxisreverseorder font-14" style={{ <div className="ws50s sptitss xaxisreverseorder font-14" style={{
@ -452,15 +471,8 @@ class Videostatisticscomtwo extends Component {
` `
} }
</style> </style>
{
loading === true ? <div className="ws100s ysltableo mt10">
<div style={{
minHeight: "400px",
}} className="ws100s">
<LoadingSpin></LoadingSpin>
</div>
:
<div className="ws100s ysltableo teacherentrydivs">
{ {
data.length === 0 ? data.length === 0 ?
<div style={{ <div style={{
@ -469,17 +481,18 @@ class Videostatisticscomtwo extends Component {
<NoneDatas></NoneDatas> <NoneDatas></NoneDatas>
</div> </div>
: :
<Spin spinning={loading}>
<Table <Table
columns={columnsstu} columns={columnsstu}
dataSource={data} dataSource={data}
pagination={false} pagination={false}
onChange={this.table1handleChange} onChange={this.table1handleChange}
/> />
</Spin>
} }
</div> </div>
}
</div> </div>

@ -1,7 +1,7 @@
import React, {Component} from "react"; import React, {Component} from "react";
import '../../signin/css/signincdi.css'; import '../../signin/css/signincdi.css';
import {Pagination,Table} from 'antd'; import {Pagination,Table,Spin} from 'antd';
import {getImageUrl,sortDirections} from 'educoder'; import {getImageUrl,sortDirections,formatSeconds} from 'educoder';
import axios from 'axios'; import axios from 'axios';
import LoadingSpin from "../../../../common/LoadingSpin"; import LoadingSpin from "../../../../common/LoadingSpin";
import NoneDatas from "../../signin/component/NoneDatas"; import NoneDatas from "../../signin/component/NoneDatas";
@ -34,7 +34,12 @@ class Videostatisticslist extends Component {
className: 'font-14 maxnamewidth150s', className: 'font-14 maxnamewidth150s',
width: '150px', width: '150px',
render: (text, record) => ( render: (text, record) => (
<span style={{width: '150px'}} className="maxnamewidth150s">{record.title}</span> <span style={{width: '150px'}} className="maxnamewidth150s">
<a className="maxnamewidth150s" style={{
color:"#333333"
}} title={record.title}>{record.title}</a>
</span>
), ),
}, },
{ {
@ -55,12 +60,17 @@ class Videostatisticslist extends Component {
dataIndex: 'total_time', dataIndex: 'total_time',
key: 'total_time', key: 'total_time',
align: "center", align: "center",
className: 'font-14 maxnamewidth150s', className: 'font-14 maxnamewidth100s',
width: '150px', width: '100px',
sorter: true, sorter: true,
sortDirections: sortDirections, sortDirections: sortDirections,
render: (text, record) => ( render: (text, record) => (
<span style={{width: '150px'}} className="maxnamewidth150s">{record.total_time}</span> <span style={{width: '100px'}} className="maxnamewidth100s">
<a className="maxnamewidth100s" style={{
color:"#333333"
}} title={record.total_time}>{record.total_time}</a>
</span>
), ),
}, },
{ {
@ -71,7 +81,12 @@ class Videostatisticslist extends Component {
className: 'font-14 maxnamewidth100s', className: 'font-14 maxnamewidth100s',
width: '100px', width: '100px',
render: (text, record) => ( render: (text, record) => (
<span style={{width: '100px'}} className="maxnamewidth100s">{record.user_name}</span> <span style={{width: '100px'}} className="maxnamewidth100s">
<a className="maxnamewidth100s" style={{
color:"#333333"
}} title={record.user_name}>{record.user_name}</a>
</span>
), ),
}, },
{ {
@ -80,16 +95,16 @@ class Videostatisticslist extends Component {
key: 'id', key: 'id',
align: "center", align: "center",
className: 'font-14', className: 'font-14',
width: '90px', width: '50px',
render: (text, record) => ( render: (text, record) => (
<span style={{width: '90px',color:'#5091FF'}} className="xiaoshou" onClick={()=>this.props.tisticsbools(true,record.id)}>详情</span> <span style={{width: '50px',color:'#5091FF'}} className="xiaoshou" onClick={()=>this.props.tisticsbools(true,record.id)}>详情</span>
), ),
} }
], ],
loading:false, loading:false,
data:[], data:[],
page:1, page:1,
limit:10, limit:20,
members_count:0, members_count:0,
order:undefined, order:undefined,
} }
@ -134,10 +149,10 @@ class Videostatisticslist extends Component {
let datalists = []; let datalists = [];
for (var i = 0; i < response.data.videos.length; i++) { for (var i = 0; i < response.data.videos.length; i++) {
datalists.push({ datalists.push({
number: (parseInt(this.state.spage) - 1) * parseInt(this.state.limit) + (i + 1), number: (parseInt(this.state.page) - 1) * parseInt(this.state.limit) + (i + 1),
title: response.data.videos[i].title, title: response.data.videos[i].title,
people_num: response.data.videos[i].people_num, 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, user_name: response.data.videos[i].user_name,
id: response.data.videos[i].id, id: response.data.videos[i].id,
}) })
@ -235,7 +250,7 @@ class Videostatisticslist extends Component {
<React.Fragment> <React.Fragment>
<div className="ws100s mt20"> <div className="ws100s mt20">
<div className="ws100s edu-back-white"> <div className="ws100s edu-back-white">
<div className="ws100s teacherentrydivs "> <div className="ws100s teacherentrydivss ">
<div className="ws100s sortinxdirection"> <div className="ws100s sortinxdirection">
<div className="ws100s sptits">统计详情</div> <div className="ws100s sptits">统计详情</div>
</div> </div>
@ -250,15 +265,8 @@ class Videostatisticslist extends Component {
` `
} }
</style> </style>
{
loading===true? <div className="ws100s ysltableo teacherentrydivs pdinstop0">
<div style={{
minHeight: "400px",
}} className="ws100s">
<LoadingSpin></LoadingSpin>
</div>
:
<div className="ws100s ysltableo teacherentrydivs">
{ {
data.length===0? data.length===0?
<div style={{ <div style={{
@ -267,6 +275,7 @@ class Videostatisticslist extends Component {
<NoneDatas></NoneDatas> <NoneDatas></NoneDatas>
</div> </div>
: :
<Spin spinning={loading}>
<Table <Table
columns={columnsstu} columns={columnsstu}
dataSource={data} dataSource={data}
@ -274,11 +283,11 @@ class Videostatisticslist extends Component {
onChange={this.table1handleChange} onChange={this.table1handleChange}
/> />
</Spin>
} }
</div> </div>
}
</div> </div>

@ -13,6 +13,7 @@ class AccountImg extends Component {
<ChangeHeaderPicModal <ChangeHeaderPicModal
{...this.props} ref="picModal" imageSrc={picUrl} userLogin={this.props.current_user ? this.props.current_user.login : '' }></ChangeHeaderPicModal> {...this.props} ref="picModal" imageSrc={picUrl} userLogin={this.props.current_user ? this.props.current_user.login : '' }></ChangeHeaderPicModal>
<style>{` <style>{`
/* /*
.headphoto { .headphoto {
text-align: center; text-align: center;
@ -26,11 +27,13 @@ class AccountImg extends Component {
margin-top: 19px; margin-top: 19px;
box-sizing: border-box; box-sizing: border-box;
} }
.headphoto img { .headphoto img {
width: 109px; width: 109px;
border-radius: 50%; border-radius: 50%;
height: 109px; height: 109px;
} }
.headphoto-black { .headphoto-black {
display: none; display: none;
cursor: pointer; cursor: pointer;
@ -45,23 +48,37 @@ class AccountImg extends Component {
background-color: rgba(0,0,0,0.3); background-color: rgba(0,0,0,0.3);
color: #fff; color: #fff;
} */ } */
.headphoto:hover .headphoto-black { .headphoto:hover .headphoto-black {
display: block; display: block;
} }
.newheadphotoblack{ .newheadphotoblack{
position: absolute; position: absolute;
top: 49px; top: 45px;
left: 4px; left: 0px;
text-align: center; text-align: center;
color: #fff; color: #fff;
width: 107px; width: 110px;
height: 23px; height: 23px;
line-height:23px; line-height: 23px;
background: rgba(76,172,255,0.7); background: rgba(76,172,255,0.7);
} }
.relativeRadiusbox{
overflow: hidden;
position: relative;
width: 109px;
border-radius: 50%;
height: 109px;
}
`}</style> `}</style>
<img alt="头像" id="user_avatar_show" nhname="avatar_image" src={`${picUrl}`}></img> <div className={"relativeRadiusbox"}>
<p className="newheadphotoblack" onClick={this.editImg} >修改头像</p> <img alt="头像" id="user_avatar_show" nhname="avatar_image" className={"xiaoshou"} src={`${picUrl}`} onClick={this.editImg} ></img>
<div className="newheadphotoblack xiaoshou" onClick={this.editImg} >修改头像</div>
</div>
</div> </div>
); );
} }

@ -74,7 +74,8 @@ function VideoInReviewItem (props) {
<div className="df buttonRow mb10"> <div className="df buttonRow mb10">
{/* <div className={"play_duration"}>累计学习时长:{play_duration} h</div> */} {/* <div className={"play_duration"}>累计学习时长:{play_duration} h</div> */}
{/* <span className="time">{moment(published_at || created_at).format('YYYY-MM-DD HH:mm:ss')}{people_num}</span> */} {/* <span className="time">{moment(published_at || created_at).format('YYYY-MM-DD HH:mm:ss')}{people_num}</span> */}
{link ?<span className="time"> </span>:<span className="time">{
{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' */} {/* total_time<60?total_time+' s':total_time/60<60?(total_time/60).toFixed(0)+' min':(total_time/3600).toFixed(1)+ ' h' */}
</span>} </span>}
@ -82,7 +83,7 @@ function VideoInReviewItem (props) {
<div className="df buttonRow"> <div className="df buttonRow">
{/* 2019-09-01 10:00:22 */} {/* 2019-09-01 10:00:22 */}
<span className={"dianjilianicon"}> <span className={"dianjilianicon"}>
{!people_num || (people_num && people_num)===0 ? "" : <Tooltip title="观看人数" placement="bottom"> {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> <i className={`icon-dianjiliang iconfont dianjilianicon font-12`}> {!people_num || (people_num && people_num)===0?"":people_num}</i>
</Tooltip> } </Tooltip> }
</span> </span>

Loading…
Cancel
Save