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

courseware
杨树明 5 years ago
commit f8c5826048

@ -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*/}
@ -261,16 +277,16 @@ class ListPageIndex extends Component{
} }
></Route> ></Route>
{/*视频列表*/} {/*视频列表*/}
<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>
{/* 教师列表*/} {/* 教师列表*/}
<Route path="/classrooms/:coursesId/teachers" <Route path="/classrooms/:coursesId/teachers"
render={ render={

@ -41,7 +41,6 @@ class VideoIndex extends Component {
liveVisible: false, liveVisible: false,
statistics: false, statistics: false,
} }
} }
@ -75,13 +74,27 @@ class VideoIndex extends Component {
} }
} }
componentDidUpdate = (prevProps) => { componentDidUpdate = (prevProps) => {
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) { 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) => {
@ -239,9 +252,11 @@ class VideoIndex extends Component {
} }
//统计 //统计
statisticsy = (bool) => { statisticsy = (bool) => {
this.setState({ this.setState({
statistics: bool statistics: bool,
}) })
} }
render() { render() {
@ -311,16 +326,20 @@ class VideoIndex extends Component {
{ {
newOperation ? newOperation ?
<span> <span>
<WordsBtn style="blue" className="ml30 font-16 tongjis"
onClick={() => this.statisticsy(true)}
><i className="iconfont icon-tongji1 mr5"></i></WordsBtn>
{ {
videoId ? videoId ?
<WordsBtn style="blue" <WordsBtn style="blue"
onClick={() => this.editDir(videoData && videoData.category_name, videoId)} onClick={() => this.editDir(videoData && videoData.category_name, videoId)}
className={"ml30 font-16"}>目录重命名</WordsBtn> className={"ml30 font-16"}>目录重命名</WordsBtn>
: :
<WordsBtn style="blue" className="ml30 font-16" onClick={this.addDir}>新建目录</WordsBtn> <span>
<WordsBtn style="blue" className="ml30 font-16 tongjis"
onClick={() => this.statisticsy(true)}
><i className="iconfont icon-tongji1 mr5"></i></WordsBtn>
<WordsBtn style="blue" className="ml30 font-16" onClick={this.addDir}>新建目录</WordsBtn>
</span>
} }
<WordsBtn style="blue" className="ml30 font-16" <WordsBtn style="blue" className="ml30 font-16"
onClick={() => this.setLinkeVisible(true)}>增加外链</WordsBtn> onClick={() => this.setLinkeVisible(true)}>增加外链</WordsBtn>

@ -1,78 +1,78 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import axios from 'axios'; import axios from 'axios';
import {Input,Pagination,Tooltip} from 'antd'; import {Input,Pagination,Tooltip} from 'antd';
//业务组件 //业务组件
import CoursesBanner from "../coursesDetail/CoursesBanner"; import CoursesBanner from "../coursesDetail/CoursesBanner";
import Coursesleftnav from "../coursesDetail/CoursesLeftNav"; import Coursesleftnav from "../coursesDetail/CoursesLeftNav";
class CourseLayoutcomponent extends Component{ class CourseLayoutcomponent extends Component{
constructor(props) { constructor(props) {
super(props) super(props)
} }
componentDidMount(){ componentDidMount(){
} }
// //
// getleftNavid=(navid,newselectnavid)=>{ // getleftNavid=(navid,newselectnavid)=>{
// console.log(navid,newselectnavid) // console.log(navid,newselectnavid)
// this.setState({ // this.setState({
// navkey:navid, // navkey:navid,
// navttype:newselectnavid // navttype:newselectnavid
// }) // })
// } // }
render() { render() {
// 加 , ...this.props 样式会出现2份children // 加 , ...this.props 样式会出现2份children
const childrenWithProps = React.Children.map(this.props.children, child => { const childrenWithProps = React.Children.map(this.props.children, child => {
// debugger; // debugger;
if(!child) { if(!child) {
return '' return ''
} }
return React.cloneElement(child, { ...this.state }) return React.cloneElement(child, { ...this.state })
} }
); );
// console.log("CoursesBanner") // console.log("CoursesBanner")
// console.log(this.props) // console.log(this.props)
return ( return (
<div> <div>
<div className="newMain clearfix"> <div className="newMain clearfix">
{/*头部banner*/} {/*头部banner*/}
<CoursesBanner {...this.props}></CoursesBanner> <CoursesBanner {...this.props}></CoursesBanner>
<div className="educontent clearfix" style={{flex: "1 0 auto"}}> <div className="educontent clearfix" style={{flex: "1 0 auto"}}>
<div className="stud-class-set"> <div className="stud-class-set">
<div className="news"> <div className="news">
<div className="edu-class-inner container clearfix"> <div className="edu-class-inner container clearfix">
<div className="member for-content-0 for-content"> <div className="member for-content-0 for-content">
<div className="people clearfix mb60"> <div className="people clearfix mb60">
{/*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*/}
<div className="with78 fl"> <div className="with78 fl">
<div className={"ml20 clearfix"}> <div className={"ml20 clearfix"}>
{childrenWithProps} {childrenWithProps}
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
) )
} }
} }
export default CourseLayoutcomponent; export default CourseLayoutcomponent;

@ -1,105 +1,106 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import axios from 'axios'; import axios from 'axios';
import {Input,Pagination,Tooltip} from 'antd'; import {Input,Pagination,Tooltip} from 'antd';
//业务组件 //业务组件
//top banner //top banner
import CoursesBanner from "./CoursesBanner"; import CoursesBanner from "./CoursesBanner";
//Left nav //Left nav
import Coursesleftnav from "./CoursesLeftNav"; import Coursesleftnav from "./CoursesLeftNav";
// 实训作业 // 实训作业
import ShixunHomework from '../shixunHomework/shixunHomework'; import ShixunHomework from '../shixunHomework/shixunHomework';
// 问卷 // 问卷
import Poll from '../poll/Poll'; import Poll from '../poll/Poll';
// 试卷 // 试卷
import Exercise from '../exercise/Exercise'; import Exercise from '../exercise/Exercise';
//教师列表 //教师列表
import TeacherList from "../members/teacherList" import TeacherList from "../members/teacherList"
//普通作业 //普通作业
import CommonWork from "../busyWork/commonWork" import CommonWork from "../busyWork/commonWork"
// 毕设选题 // 毕设选题
import graduationTopics from '../graduation/topics/index' import graduationTopics from '../graduation/topics/index'
class CoursesDetail extends Component{ class CoursesDetail extends Component{
constructor(props) { constructor(props) {
super(props) super(props)
this.state = { this.state = {
getleftNavid:undefined, getleftNavid:undefined,
coursesId:"" coursesId:""
} }
} }
componentDidMount(){ componentDidMount(){
} }
getleftNavid=(type,id)=>{ getleftNavid=(type,id)=>{
console.log(type+" "+id) console.log(type+" "+id)
this.setState({ this.setState({
getleftNavid:type, getleftNavid:type,
coursesId:id coursesId:id
}) })
} }
render() { render() {
let{getleftNavid,coursesId}=this.state; let{getleftNavid,coursesId}=this.state;
// console.log(getleftNavid) // console.log(getleftNavid)
return ( return (
<div> <div>
<div className="newMain clearfix"> <div className="newMain clearfix">
{/*头部banner*/} {/*头部banner*/}
<CoursesBanner {...this.props}></CoursesBanner> <CoursesBanner {...this.props}></CoursesBanner>
<div className="educontent clearfix" style={{flex: "1 0 auto"}}> <div className="educontent clearfix" style={{flex: "1 0 auto"}}>
<div className="stud-class-set"> <div className="stud-class-set">
<div className="news"> <div className="news">
<div className="edu-class-inner container clearfix"> <div className="edu-class-inner container clearfix">
<div className="member for-content-0 for-content"> <div className="member for-content-0 for-content">
<div className="people clearfix mb60"> <div className="people clearfix mb60">
{/*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 <Coursesleftnav
{...this.props} {...this.props}
getleftNavid={this.getleftNavid} myinex={false}
/> getleftNavid={this.getleftNavid}
</div> />
</div>
{/*right_concent*/}
<div className="with78 fl"> {/*right_concent*/}
<div className={"ml20 clearfix"}> <div className="with78 fl">
{/* 毕设选题 */} <div className={"ml20 clearfix"}>
{getleftNavid==="graduation"?<graduationTopics {...this.props} coursesId={coursesId}></graduationTopics>:""} {/* 毕设选题 */}
{getleftNavid==="graduation"?<graduationTopics {...this.props} coursesId={coursesId}></graduationTopics>:""}
{/*/!*普通作业*!/*/}
{/*{getleftNavid==="common_homework"?<CommonWork {...this.props} coursesId={coursesId}/>:""}*/} {/*/!*普通作业*!/*/}
{/*{getleftNavid==="common_homework"?<CommonWork {...this.props} coursesId={coursesId}/>:""}*/}
<ShixunHomework {...this.props} child={false}/>
{/*{getleftNavid==="shixun_homeworkchild"?<ShixunHomework {...this.props} child={true} />:""}*/} <ShixunHomework {...this.props} child={false}/>
{/*{getleftNavid==="shixun_homeworkchild"?<ShixunHomework {...this.props} child={true} />:""}*/}
{/*/!*问卷*!/*/}
{/*{getleftNavid==="poll"?<Poll child={false}/>:""}*/} {/*/!*问卷*!/*/}
{/*/!*试卷*!/*/} {/*{getleftNavid==="poll"?<Poll child={false}/>:""}*/}
{/*{getleftNavid==="exercise"?<Exercise child={false}/>:""}*/} {/*/!*试卷*!/*/}
{/*{getleftNavid==="exercise"?<Exercise child={false}/>:""}*/}
</div>
</div> </div>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div>
</div>
</div> </div>
</div> </div>
) </div>
} )
} }
export default CoursesDetail; }
export default CoursesDetail;

@ -394,7 +394,16 @@ class Coursesleftnav extends Component{
indexs:index indexs:index
}) })
// this.props.history.replace(urls); // this.props.history.replace(urls);
e.stopPropagation();//阻止冒泡 try {
if(this.props.myinex===true){
this.props.Callhomedirectoryornot(true);
}
}catch (e) {
}
e.stopPropagation();//阻止冒泡
} }
selectnavids=(e,key,id,type,urls,index,santype)=>{ selectnavids=(e,key,id,type,urls,index,santype)=>{
@ -409,6 +418,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();//阻止冒泡
} }
@ -1008,6 +1025,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();//阻止冒泡
} }

@ -188,6 +188,9 @@
padding-top: 20px; padding-top: 20px;
padding-bottom: 20px; padding-bottom: 20px;
} }
.pdinstop0{
padding-top: 0px !important;
}
.teacherentrydivss{ .teacherentrydivss{
padding-left: 20px; padding-left: 20px;
padding-right: 20px; padding-right: 20px;
@ -414,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)=> {

@ -404,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>
{ {
@ -414,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>
) )
@ -472,7 +472,7 @@ class Videostatisticscomtwo extends Component {
} }
</style> </style>
<div className="ws100s ysltableo"> <div className="ws100s ysltableo mt10">
{ {
data.length === 0 ? data.length === 0 ?
<div style={{ <div style={{

@ -266,7 +266,7 @@ class Videostatisticslist extends Component {
} }
</style> </style>
<div className="ws100s ysltableo teacherentrydivs"> <div className="ws100s ysltableo teacherentrydivs pdinstop0">
{ {
data.length===0? data.length===0?
<div style={{ <div style={{

Loading…
Cancel
Save