|
|
|
@ -29,6 +29,7 @@ import TPMCollaboratorsComponent from './TPMCollaboratorsContainer';
|
|
|
|
|
import Audit_situationComponent from './Audit_situationComponent';
|
|
|
|
|
import TPMDataset from './TPMDataset';
|
|
|
|
|
import '../page/tpiPage.css'
|
|
|
|
|
import TPMNav from "./component/TPMNav";
|
|
|
|
|
|
|
|
|
|
const $ = window.$
|
|
|
|
|
//任务
|
|
|
|
@ -143,6 +144,7 @@ class TPMIndex extends Component {
|
|
|
|
|
TPMRightSectionData:undefined,
|
|
|
|
|
PropaedeuticsList: undefined,
|
|
|
|
|
tpmindexjupyterbool:false,
|
|
|
|
|
is_jupyter:false,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -193,7 +195,7 @@ class TPMIndex extends Component {
|
|
|
|
|
propaedeutics:response.data.propaedeutics,
|
|
|
|
|
status: response.data.shixun_status,
|
|
|
|
|
secret_repository: response.data.secret_repository,
|
|
|
|
|
|
|
|
|
|
is_jupyter:response.data.is_jupyter=== undefined||response.data.is_jupyter===null?false:response.data.is_jupyter,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
@ -205,7 +207,8 @@ class TPMIndex extends Component {
|
|
|
|
|
power: undefined,
|
|
|
|
|
identity: undefined,
|
|
|
|
|
status: undefined,
|
|
|
|
|
propaedeutics:undefined
|
|
|
|
|
propaedeutics:undefined,
|
|
|
|
|
is_jupyter:false,
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
@ -274,6 +277,7 @@ class TPMIndex extends Component {
|
|
|
|
|
|
|
|
|
|
let url = window.location.href;
|
|
|
|
|
let flag = url.indexOf("add_file")>-1;
|
|
|
|
|
console.log(this.state.is_jupyter);
|
|
|
|
|
return (
|
|
|
|
|
<div className="newMain clearfix">
|
|
|
|
|
{/*头部*/}
|
|
|
|
@ -295,16 +299,16 @@ class TPMIndex extends Component {
|
|
|
|
|
<Switch {...this.props}>
|
|
|
|
|
|
|
|
|
|
<Route path="/shixuns/:shixunId/repository/:repoId/commits" render={
|
|
|
|
|
(props) => (<TPMRepositoryCommits {...this.props} {...this.state} {...props}
|
|
|
|
|
(props) => (<TPMRepositoryCommits {...this.props} {...this.state} {...props} is_jupyter={this.state.is_jupyter}
|
|
|
|
|
/>)
|
|
|
|
|
}></Route>
|
|
|
|
|
<Route path="/shixuns/:shixunId/secret_repository/:repoId/commits" render={
|
|
|
|
|
(props) => (<TPMRepositoryCommits {...this.props} {...this.state} {...props} secret_repository_tab={true}
|
|
|
|
|
(props) => (<TPMRepositoryCommits {...this.props} {...this.state} {...props} secret_repository_tab={true} is_jupyter={this.state.is_jupyter}
|
|
|
|
|
/>)
|
|
|
|
|
}></Route>
|
|
|
|
|
|
|
|
|
|
{/*任务*/}
|
|
|
|
|
<Route exact path="/shixuns/:shixunId/challenges" render={
|
|
|
|
|
(props) => (<TPMChallengeComponent {...this.props} jupyterbool={true} {...this.state} {...props}
|
|
|
|
|
(props) => (<TPMChallengeComponent {...this.props} {...this.state} {...props} is_jupyter={this.state.is_jupyter}
|
|
|
|
|
/>)
|
|
|
|
|
}></Route>
|
|
|
|
|
|
|
|
|
@ -314,24 +318,24 @@ class TPMIndex extends Component {
|
|
|
|
|
}></Route>
|
|
|
|
|
|
|
|
|
|
<Route path="/shixuns/:shixunId/repository" render={
|
|
|
|
|
(props) => (<TPMRepositoryComponent {...this.props} {...this.state} {...props}
|
|
|
|
|
(props) => (<TPMRepositoryComponent {...this.props} {...this.state} {...props} is_jupyter={this.state.is_jupyter}
|
|
|
|
|
/>)
|
|
|
|
|
}></Route>
|
|
|
|
|
<Route path="/shixuns/:shixunId/secret_repository" render={
|
|
|
|
|
(props) => (<TPMRepositoryComponent {...this.props} {...this.state} {...props} secret_repository_tab={true}
|
|
|
|
|
(props) => (<TPMRepositoryComponent {...this.props} {...this.state} {...props} secret_repository_tab={true} is_jupyter={this.state.is_jupyter}
|
|
|
|
|
/>)
|
|
|
|
|
}></Route>
|
|
|
|
|
|
|
|
|
|
{/* <Route exact path="/shixuns/:shixunId/propaedeutics" component={TPMPropaedeuticsComponent}></Route> */}
|
|
|
|
|
|
|
|
|
|
<Route exact path="/shixuns/:shixunId/propaedeutics" render={
|
|
|
|
|
(props) => (<TPMPropaedeuticsComponent {...this.props} {...this.state} {...props}
|
|
|
|
|
(props) => (<TPMPropaedeuticsComponent {...this.props} {...this.state} {...props} is_jupyter={this.state.is_jupyter}
|
|
|
|
|
/>)
|
|
|
|
|
}></Route>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Route exact path="/shixuns/:shixunId/collaborators" render={
|
|
|
|
|
(props) => (<TPMCollaboratorsComponent {...this.props} {...this.state} {...props}
|
|
|
|
|
(props) => (<TPMCollaboratorsComponent {...this.props} {...this.state} {...props} is_jupyter={this.state.is_jupyter}
|
|
|
|
|
/>)
|
|
|
|
|
}></Route>
|
|
|
|
|
|
|
|
|
@ -340,7 +344,7 @@ class TPMIndex extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Route path="/shixuns/:shixunId/shixun_discuss" render={
|
|
|
|
|
(props) => (<TPMShixunDiscussContainer {...this.props} {...this.state} {...props}
|
|
|
|
|
(props) => (<TPMShixunDiscussContainer {...this.props} {...this.state} {...props} is_jupyter={this.state.is_jupyter}
|
|
|
|
|
initForumState={(data)=>this.initForumState(data)}
|
|
|
|
|
setSearchValue={this.setSearchValue}
|
|
|
|
|
setHotLabelIndex={this.setHotLabelIndex}
|
|
|
|
@ -354,17 +358,17 @@ class TPMIndex extends Component {
|
|
|
|
|
|
|
|
|
|
{/*实训项目条目塞选*/}
|
|
|
|
|
<Route exact path="/shixuns/:shixunId/ranking_list" render={
|
|
|
|
|
(props) => (<TPMRanking_listComponent {...this.props} {...this.state} {...props}
|
|
|
|
|
(props) => (<TPMRanking_listComponent {...this.props} {...this.state} {...props} is_jupyter={this.state.is_jupyter}
|
|
|
|
|
/>)
|
|
|
|
|
}></Route>
|
|
|
|
|
|
|
|
|
|
{/*合作者*/}
|
|
|
|
|
<Route exact path="/shixuns/:shixunId/dataset" render={
|
|
|
|
|
(props) => (<TPMDataset {...this.props} {...this.state} {...props}
|
|
|
|
|
(props) => (<TPMDataset {...this.props} {...this.state} {...props} is_jupyter={this.state.is_jupyter}
|
|
|
|
|
/>)
|
|
|
|
|
}></Route>
|
|
|
|
|
|
|
|
|
|
<Route exact path="/shixuns/:shixunId/audit_situation" render={
|
|
|
|
|
(props) => (<Audit_situationComponent {...this.props} {...this.state} {...props}
|
|
|
|
|
(props) => (<Audit_situationComponent {...this.props} {...this.state} {...props} is_jupyter={this.state.is_jupyter}
|
|
|
|
|
/>)
|
|
|
|
|
}></Route>
|
|
|
|
|
|
|
|
|
@ -415,7 +419,7 @@ class TPMIndex extends Component {
|
|
|
|
|
}></Route>
|
|
|
|
|
|
|
|
|
|
<Route exact path="/shixuns/:shixunId" render={
|
|
|
|
|
(props) => (<TPMChallengeComponent {...this.props} {...this.state} {...props}
|
|
|
|
|
(props) => (<TPMChallengeComponent {...this.props} {...this.state} {...props} is_jupyter={this.state.is_jupyter}
|
|
|
|
|
/>)
|
|
|
|
|
}></Route>
|
|
|
|
|
|
|
|
|
|