You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
60 lines
2.0 KiB
60 lines
2.0 KiB
import React, { Component } from 'react';
|
|
|
|
import { SnackbarHOC, CNotificationHOC } from 'educoder';
|
|
|
|
|
|
import {BrowserRouter as Router,Route,Switch} from 'react-router-dom';
|
|
import Loadable from 'react-loadable';
|
|
import Loading from '../../Loading';
|
|
import { TPMIndexHOC } from '../tpm/TPMIndexHOC';
|
|
|
|
const PathsDetail = Loadable({
|
|
loader: () => import('./PathDetail/PathDetailIndex'),
|
|
loading:Loading,
|
|
})
|
|
const PathsNew = Loadable({
|
|
loader: () => import('./PathNew'),
|
|
loading:Loading,
|
|
})
|
|
const Statistics = Loadable({
|
|
loader: () => import('./SchoolStatistics/Statistics'),
|
|
loading:Loading
|
|
})
|
|
|
|
const ShixunPaths = Loadable({
|
|
loader: () => import('./ShixunPaths'),
|
|
loading:Loading,
|
|
})
|
|
|
|
|
|
class Index extends Component{
|
|
constructor(props) {
|
|
super(props)
|
|
}
|
|
render() {
|
|
return (
|
|
<div>
|
|
<Switch {...this.props}>
|
|
<Route path="/paths/:pathId/statistics" component = {Statistics} {...this.props} {...this.state}></Route>
|
|
|
|
<Route path="/paths/new" exact
|
|
render={(props)=>(<PathsNew {...this.props} {...this.state} {...props}/>)}
|
|
></Route>
|
|
<Route path="/paths/:pathId/edit" exact
|
|
render={(props)=>(<PathsNew {...this.props} {...this.state} {...props}/>)}
|
|
></Route>
|
|
{/*编辑页面*/}
|
|
<Route path="/paths/:pathId" exact
|
|
render={(props)=>(<PathsDetail {...this.props} {...this.state} {...props}/>)}
|
|
></Route>
|
|
|
|
{/*<Route path="/paths/:pathId" exact component = {PathsDetail} {...this.props} {...this.state}></Route>*/}
|
|
<Route path="/paths" exact
|
|
render={(props)=>(<ShixunPaths {...this.props} {...this.state} {...props}/>)}
|
|
></Route>
|
|
</Switch>
|
|
</div>
|
|
)
|
|
}
|
|
}
|
|
export default CNotificationHOC() (SnackbarHOC() ( TPMIndexHOC(Index) )); |