import React, { Component } from 'react'; import logo from './logo.svg'; import './App.css'; import { BrowserRouter as Router, Route, Switch } from 'react-router-dom'; import LoginDialog from './modules/login/LoginDialog'; import NotFoundPage from './NotFoundPage'; import Loading from './Loading'; import Loadable from 'react-loadable'; import Index from './modules/page/Index'; import IndexWrapper from './modules/page/IndexWrapper'; import moment from 'moment'; import { MuiThemeProvider, createMuiTheme } from 'material-ui/styles'; import history from './history'; import GraduatesRequirement from './modules/ec/graduatesRequirement' import EcCourseSupportSetting from './modules/ec/ecCourseSupportSetting' const theme = createMuiTheme({ palette: { primary: { main: '#4CACFF', contrastText: 'rgba(255, 255, 255, 0.87)' }, secondary: { main: '#11cb5f' }, // This is just green.A700 as hex. }, }); const IndexWrapperComponent = Loadable({ loader: () => import('./modules/page/IndexWrapper'), loading: Loading, }) const TPMIndexComponent = Loadable({ loader: () => import('./modules/tpm/TPMIndex'), loading: Loading, }) const TPMShixunsIndexComponent = Loadable({ loader: () => import('./modules/tpm/shixuns/ShixunsIndex'), loading: Loading, }) // const TPMShixunchildIndexComponent = Loadable({ // loader: () => import('./modules/tpm/shixunchild/ShixunChildIndex'), // loading: Loading, // }) // const TPMshixunfork_listIndexComponent = Loadable({ // loader: () => import('./modules/tpm/shixunchild/Shixunfork_list'), // loading: Loading, // }) const ForumsIndexComponent = Loadable({ loader: () => import('./modules/forums/ForumsIndex'), loading: Loading, }) const ProjectPackages=Loadable({ loader: () => import('./modules/projectPackages/ProjectPackageIndex'), loading: Loading, }) const ECIndexComponent = Loadable({ loader: () => import('./modules/ec'), loading: Loading, }) const TestIndexComponent = Loadable({ loader: () => import('./modules/test'), loading: Loading, }) // trustie plus forum // const TPForumsIndexComponent = Loadable({ // loader: () => import('./modules/tp-forums/TPForumsIndex'), // loading: Loading, // }) // const TestPageComponent = Loadable({ // loader: () => import('./modules/page/Index'), // loading: Loading, // }) const TPMOnlineCourses_list = Loadable({ loader: () => import('./modules/tpm/Courses_list/Courses_Index'), loading: Loading, }) const CareerPathIndexComponent = Loadable({ loader: () => import('./modules/careerPath/Course_Introduction'), loading: Loading, }) const CareerPathIndexContents= Loadable({ loader: () => import('./modules/careerPath/Content_Arrangement'), loading: Loading, }) const TPMOnlineCourses_Details = Loadable({ loader: () => import('./modules/tpm/Courses_list/Courses_list_details/CoursesListDetailsIndex'), loading: Loading, }) const NewCourseCareerPathIndex =Loadable({ loader: () => import('./modules/careerPath/managementsCareerPath/New_Course_Career_Path_Index'), loading: Loading, }) const NewContentCareerPathIndex =Loadable({ loader: () => import('./modules/careerPath/managementsCareerPath/New_Content_Career_Path_Index'), loading: Loading, }) {/*课程体系对毕业要求的支撑*/} const ecCourseSupports=Loadable({ loader: () => import('./modules/ec/ecCourseSupports/ecCourseSupports'), loading: Loading, }) //课程体系 const ecCourseEvaluations=Loadable({ loader: () => import('./modules/ec/ecCourseEvaluations/ecCourseEvaluations'), loading: Loading, }) const ecGradeEvaluations=Loadable({ loader: () => import('./modules/ec/ecGradeEvaluations/ecGradeEvaluations'), loading: Loading, }) {/*课程目标评价方法*/} const EvaluationMethods=Loadable({ loader: () => import('./modules/ec/ecCourseEvaluations/ecCourseEvaluationsbottom'), loading: Loading, }) {/*达成评价详情*/} const EcCompletionCalculation=Loadable({ loader: () => import('./modules/ec/ecCompletion_calculation/ecCompletion_calculation'), loading: Loading, }) //学生列表 const ecStudentLists=Loadable({ loader: () => import('./modules/ec/ecStudentList/ecStudentList'), loading: Loading, }) // 上海社区 const CommunityHome=Loadable({ loader: () => import('./modules/ShCommunity/CommunityHome'), loading: Loading, }) const Statistics=Loadable({ loader: () => import('./modules/Statistics/Statistics'), loading: Loading, }) /* testPage shixunx/:shixunId/stages/:stageId */ class App extends Component { componentDidMount() { // force an update if the URL changes history.listen(() => this.forceUpdate()); } render() { return ( {/*课程体系对毕业要求的支撑*/} {/*课程体系*/} {/*达成评价详情*/} {/*课程目标评价方法*/} {/* */} {/*众包*/} {/* ec_major_schools/3/academic_years/7/reach_calculation_info */} {/*工程认证13*/} {/*课程体系 vs 毕业要求*/} {/*学生列表*/} {/*成绩等级设置*/} {/* 课程配置 目标配置 */} {/*达成评价详情*/} {/* */} ); } } // moment国际化,设置为中文 moment.defineLocale('zh-cn', { months : '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'), monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'), weekdays : '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'), weekdaysShort : '周日_周一_周二_周三_周四_周五_周六'.split('_'), weekdaysMin : '日_一_二_三_四_五_六'.split('_'), longDateFormat : { LT : 'Ah点mm分', LTS : 'Ah点m分s秒', L : 'YYYY-MM-DD', LL : 'YYYY年MMMD日', LLL : 'YYYY年MMMD日Ah点mm分', LLLL : 'YYYY年MMMD日ddddAh点mm分', l : 'YYYY-MM-DD', ll : 'YYYY年MMMD日', lll : 'YYYY年MMMD日Ah点mm分', llll : 'YYYY年MMMD日ddddAh点mm分' }, meridiemParse: /凌晨|早上|上午|中午|下午|晚上/, meridiemHour: function (hour, meridiem) { if (hour === 12) { hour = 0; } if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') { return hour; } else if (meridiem === '下午' || meridiem === '晚上') { return hour + 12; } else { // '中午' return hour >= 11 ? hour : hour + 12; } }, meridiem : function (hour, minute, isLower) { var hm = hour * 100 + minute; if (hm < 600) { return '凌晨'; } else if (hm < 900) { return '早上'; } else if (hm < 1130) { return '上午'; } else if (hm < 1230) { return '中午'; } else if (hm < 1800) { return '下午'; } else { return '晚上'; } }, calendar : { sameDay : function () { return this.minutes() === 0 ? '[今天]Ah[点整]' : '[今天]LT'; }, nextDay : function () { return this.minutes() === 0 ? '[明天]Ah[点整]' : '[明天]LT'; }, lastDay : function () { return this.minutes() === 0 ? '[昨天]Ah[点整]' : '[昨天]LT'; }, nextWeek : function () { var startOfWeek, prefix; startOfWeek = moment().startOf('week'); prefix = this.unix() - startOfWeek.unix() >= 7 * 24 * 3600 ? '[下]' : '[本]'; return this.minutes() === 0 ? prefix + 'dddAh点整' : prefix + 'dddAh点mm'; }, lastWeek : function () { var startOfWeek, prefix; startOfWeek = moment().startOf('week'); prefix = this.unix() < startOfWeek.unix() ? '[上]' : '[本]'; return this.minutes() === 0 ? prefix + 'dddAh点整' : prefix + 'dddAh点mm'; }, sameElse : 'LL' }, ordinalParse: /\d{1,2}(日|月|周)/, ordinal : function (number, period) { switch (period) { case 'd': case 'D': case 'DDD': return number + '日'; case 'M': return number + '月'; case 'w': case 'W': return number + '周'; default: return number; } }, relativeTime : { future : '%s内', past : '%s前', s : '几秒', m : '1分钟', mm : '%d分钟', h : '1小时', hh : '%d小时', d : '1天', dd : '%d天', M : '1个月', MM : '%d个月', y : '1年', yy : '%d年' }, week : { // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效 dow : 1, // Monday is the first day of the week. doy : 4 // The week that contains Jan 4th is the first week of the year. } }); export default App;