import React, { Component } from 'react'; import { BrowserRouter as Router, Route, Switch } from 'react-router-dom'; import { Input, Pagination, Tooltip } from 'antd'; import { Loadable } from 'educoder'; import Loading from '../../Loading'; import Guide from "../../modules/courses/shixunHomework/Guide"; //业务组件 import CoursesBanner from "./coursesDetail/CoursesBanner"; import Coursesleftnav from "./coursesDetail/CoursesLeftNav"; //普通作业 const CommonWork = Loadable({ loader: () => import('./busyWork/commonWork'), loading: Loading, }) const GroupWork = Loadable({ loader: () => import('./busyWork/commonWork'), loading: Loading, }) // 讨论 const Boards = Loadable({ loader: () => import('./boards'), loading: Loading, }) //教师列表 const TeacherList = Loadable({ loader: () => import('./members/teacherList'), loading: Loading, }) //学生列表 const StudentsList = Loadable({ loader: () => import('./members/studentsList'), loading: Loading, }); //分班列表 const CourseGroupList = Loadable({ loader: () => import('./members/CourseGroupList'), loading: Loading, }); const Eduinforms = Loadable({ loader: () => import('./gradinforms/Eduinforms'), loading: Loading, }); //2019.10.29 统计 const Statistics = Loadable({ loader: () => import('./statistics/Statistics'), loading: Loading, }); const Elearning = Loadable({ loader: () => import('./elearning/Elearning'), loading: Loading, }); // const Exercise = Loadable({ loader: () => import('./exercise/Exercise'), loading: Loading, }) // const Poll = Loadable({ loader: () => import('./poll/Poll'), loading: Loading, }) // 资源 const Resourcelist = Loadable({ loader: () => import('./Resource/index'), loading: Loading, }) // 视频 const CourseVideo = Loadable({ loader: () => import('./Video/VideoIndex'), loading: Loading, }) //实训作业 const ShixunHomework = Loadable({ loader: () => import('./shixunHomework/shixunHomework'), loading: Loading, }) const GraduationTopics = Loadable({ loader: () => import('./graduation/topics'), loading: Loading, }) const GraduationTasks = Loadable({ loader: () => import('./graduation/tasks'), loading: Loading, }) class ListPageIndex extends Component { constructor(props) { super(props); this.state = { yslGuideone: undefined, yslElearning: false, isexcellent: false } } comyslElearning(bool) { if (bool === true) { this.setState({ yslElearning: true, }) } else { this.setState({ yslElearning: false, }) } } componentDidMount() { // console.log("77"); var yslGuideone = window.localStorage.getItem('yslGuideone'); // console.log("78"); // console.log(yslGuideone); try { if (yslGuideone === "true") { // console.log("true 字符串"); this.setState({ yslGuideone: true, }) } else { this.setState({ yslGuideone: false, }); // console.log("false 字符串"); } } catch (e) { console.log(e); this.setState({ yslGuideone: false, }); } } // // getleftNavid=(navid,newselectnavid)=>{ // console.log(navid,newselectnavid) // this.setState({ // navkey:navid, // navttype:newselectnavid // }) // } componentWillUnmount() { // window.localStorage.setItem('yslGuideone', "false"); } setwindowlocal = (bool) => { window.localStorage.setItem('yslGuideone', bool); try { if (bool === "true") { this.setState({ yslGuideone: true, }) } else { this.setState({ yslGuideone: false, }); } } catch (e) { // console.log(e); this.setState({ yslGuideone: false, }); } } ispostexcellenttype = (excellent) => { this.setState({ isexcellent: excellent }) } updatabanners = () => { this.refs.CoursesBanner.updatabanner() } render() { let { yslGuideone } = this.state; // console.log("98"); // console.log(yslGuideone); // console.log(this.props.isAdmin()); // // var yslGuideones = window.sessionStorage.getItem('yslGuideone'); // console.log(this.props); // console.log(this.props.location.search); return (
{/*头部banner*/} this.ispostexcellenttype(excellent)}> {/*下面是指引哦*/} {/*{yslGuideone!==undefined?*/} {/*(*/} {/* yslGuideone===true?*/} {/* this.setwindowlocal(b)}*/} {/* >*/} {/* */} {/* :""*/} {/* )*/} {/* :""*/} {/*}*/}
{/*left_nav*/}
this.comyslElearning(i)}/>
{/*right_concent*/}
{/* --------------------------------------------------------------------- */} {/* 作业设置 */} {/* http://localhost:3007/courses/1309/homework/9300/setting */} {/* 普通作业 */} () } > {/* 作品列表 */} () } > () } > {/*视频列表*/} () } > () } > (this.updatabanners()} {...this.props} {...props} {...this.state} />) } > {/* 学生列表*/} () } > () } > () } > () } > {/*right_concent*/}
{/* --------------------------------------------------------------------- */} {/* 作业设置 */} {/* http://localhost:3007/courses/1309/homework/9300/setting */} {/* 普通作业 */} () } > {/* 作品列表 */} () } > () } > {/*视频列表*/} () } > ( this.updatabanners()} {...this.props} {...props} {...this.state} />) } > {/* 学生列表*/} () } > () } > () } > () } > () } > {/* () } > */} {/* 实训作业子页面*/} () } > {/*课堂统计列表2019.10.29 */} () } > {/*公告栏列表*/} () } > {/*在线学习*/} ( this.comyslElearning(i)} />) } > {/* 实训作业页面*/} () } > () } > () } > () }> () } > {/* 默认 */} () } >
) } } export default ListPageIndex;