Merge branch 'courseware' of http://bdgit.educoder.net/Hjqreturn/educoder into courseware
commit
fc781e15e1
@ -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;
|
||||||
|
Loading…
Reference in new issue