|
|
|
@ -153,13 +153,15 @@ class TPMIndex extends Component {
|
|
|
|
|
shixunId: undefined,
|
|
|
|
|
star_info: [0, 0, 0, 0, 0, 0],
|
|
|
|
|
star_infos: [0, 0, 0, 0, 0, 0],
|
|
|
|
|
identity: undefined,
|
|
|
|
|
TPMRightSectionData: undefined,
|
|
|
|
|
identity:undefined,
|
|
|
|
|
TPMRightSectionData:undefined,
|
|
|
|
|
PropaedeuticsList: undefined,
|
|
|
|
|
tpmindexjupyterbool: false,
|
|
|
|
|
is_jupyter: false,
|
|
|
|
|
selectedKeys: "",
|
|
|
|
|
openknows: false
|
|
|
|
|
tpmindexjupyterbool:false,
|
|
|
|
|
is_jupyter:false,
|
|
|
|
|
selectedKeys:"",
|
|
|
|
|
openknows:false,
|
|
|
|
|
newathArray:[]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -378,11 +380,16 @@ class TPMIndex extends Component {
|
|
|
|
|
} else if (e.key === "9") {
|
|
|
|
|
this.props.history.replace(`/shixuns/${id}/settings`);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
setpathArray=(list)=>{
|
|
|
|
|
this.setState({
|
|
|
|
|
newathArray:list
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
render() {
|
|
|
|
|
|
|
|
|
|
let url = window.location.href;
|
|
|
|
|
let flag = false;
|
|
|
|
|
let flag =false;
|
|
|
|
|
// url.indexOf("add_file")>-1;
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
@ -393,7 +400,7 @@ class TPMIndex extends Component {
|
|
|
|
|
<TPMBanner
|
|
|
|
|
{...this.props}
|
|
|
|
|
{...this.state}
|
|
|
|
|
is_jupyter={this.state.is_jupyter}
|
|
|
|
|
is_jupyter={this.state. is_jupyter}
|
|
|
|
|
></TPMBanner>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -545,24 +552,24 @@ class TPMIndex extends Component {
|
|
|
|
|
}></Route>
|
|
|
|
|
|
|
|
|
|
<Route path="/shixuns/:shixunId/repository/master/shixun_show/:fileId" render={
|
|
|
|
|
(props) => (<TPMRepositoryComponent {...this.props} {...this.state} {...props} is_jupyter={this.state.is_jupyter}
|
|
|
|
|
(props) => (<TPMRepositoryComponent {...this.props} {...this.state} {...props} is_jupyter={this.state.is_jupyter} setpathArray={(value)=>this.setpathArray(value)}
|
|
|
|
|
/>)
|
|
|
|
|
}></Route>
|
|
|
|
|
|
|
|
|
|
<Route path="/shixuns/:shixunId/secret_repository/master/shixun_show/:fileId" render={
|
|
|
|
|
(props) => (<TPMRepositoryComponent {...this.props} {...this.state} {...props} secret_repository_tab={true} is_jupyter={this.state.is_jupyter}
|
|
|
|
|
(props) => (<TPMRepositoryComponent {...this.props} {...this.state} {...props} secret_repository_tab={true} is_jupyter={this.state.is_jupyter} setpathArray={(value)=>this.setpathArray(value)}
|
|
|
|
|
/>)
|
|
|
|
|
}></Route>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Route path="/shixuns/:shixunId/repository" render={
|
|
|
|
|
(props) => (<TPMRepositoryComponent {...this.props} {...this.state} {...props} is_jupyter={this.state.is_jupyter}
|
|
|
|
|
(props) => (<TPMRepositoryComponent {...this.props} {...this.state} {...props} is_jupyter={this.state.is_jupyter} setpathArray={(value)=>this.setpathArray(value)}
|
|
|
|
|
/>)
|
|
|
|
|
}></Route>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Route path="/shixuns/:shixunId/secret_repository" render={
|
|
|
|
|
(props) => (<TPMRepositoryComponent {...this.props} {...this.state} {...props} secret_repository_tab={true} is_jupyter={this.state.is_jupyter}
|
|
|
|
|
(props) => (<TPMRepositoryComponent {...this.props} {...this.state} {...props} secret_repository_tab={true} is_jupyter={this.state.is_jupyter} setpathArray={(value)=>this.setpathArray(value)}
|
|
|
|
|
/>)
|
|
|
|
|
}></Route>
|
|
|
|
|
|
|
|
|
@ -570,9 +577,13 @@ class TPMIndex extends Component {
|
|
|
|
|
{/* <Route exact path="/shixuns/:shixunId/propaedeutics" component={TPMPropaedeuticsComponent}></Route> */}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{/* <Route exact path="/shixuns/:shixunId/repository/:shixunId/" component={TPMRepositoryComponent}></Route> */}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Route path="/shixuns/:shixunId/shixun_discuss" render={
|
|
|
|
|
(props) => (<TPMShixunDiscussContainer {...this.props} {...this.state} {...props} is_jupyter={this.state.is_jupyter}
|
|
|
|
|
initForumState={(data) => this.initForumState(data)}
|
|
|
|
|
initForumState={(data)=>this.initForumState(data)}
|
|
|
|
|
setSearchValue={this.setSearchValue}
|
|
|
|
|
setHotLabelIndex={this.setHotLabelIndex}
|
|
|
|
|
/>)
|
|
|
|
@ -580,7 +591,7 @@ class TPMIndex extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Route path="/shixuns/:shixunId/settings" render={
|
|
|
|
|
(props) => (<TPMsettings {...this.props} {...this.state} {...props} />)
|
|
|
|
|
(props) => (<TPMsettings {...this.props} {...this.state} {...props} getcomponentdidmount={()=>this.getcomponentdidmount()} />)
|
|
|
|
|
}></Route>
|
|
|
|
|
|
|
|
|
|
{/*实训项目条目塞选*/}
|
|
|
|
@ -611,18 +622,18 @@ class TPMIndex extends Component {
|
|
|
|
|
|
|
|
|
|
{/*评测设置*/}
|
|
|
|
|
<Route path="/shixuns/:shixunId/challenges/:checkpointId/tab=2" render={
|
|
|
|
|
(props) => (<TPMevaluation {...this.props} {...props} {...this.state} />)
|
|
|
|
|
(props) => (<TPMevaluation {...this.props} {...props} {...this.state}/>)
|
|
|
|
|
}></Route>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{/*参考答案*/}
|
|
|
|
|
<Route path="/shixuns/:shixunId/challenges/:checkpointId/tab=3" render={
|
|
|
|
|
(props) => (<TPManswer {...this.props} {...props} {...this.state} />)
|
|
|
|
|
(props) => (<TPManswer {...this.props} {...props} {...this.state}/>)
|
|
|
|
|
}></Route>
|
|
|
|
|
|
|
|
|
|
{/*新建关卡*/}
|
|
|
|
|
<Route path="/shixuns/:shixunId/challenges/new" render={
|
|
|
|
|
(props) => (<TPMchallengesnew {...this.props} {...props} {...this.state} />)
|
|
|
|
|
(props) => (<TPMchallengesnew {...this.props} {...props} {...this.state}/>)
|
|
|
|
|
}></Route>
|
|
|
|
|
|
|
|
|
|
{/*编辑关卡*/}
|
|
|
|
@ -637,12 +648,12 @@ class TPMIndex extends Component {
|
|
|
|
|
|
|
|
|
|
{/*修改选择题*/}
|
|
|
|
|
<Route path="/shixuns/:shixunId/challenges/:checkpointId/editquestion/:choose_id" render={
|
|
|
|
|
(props) => (<TPMquestion {...this.props} {...props} {...this.state} />)
|
|
|
|
|
(props) => (<TPMquestion {...this.props} {...props} {...this.state}/>)
|
|
|
|
|
}></Route>
|
|
|
|
|
|
|
|
|
|
{/*修改选择题*/}
|
|
|
|
|
<Route path="/shixuns/:shixunId/challenges/:checkpointId/editquestion" render={
|
|
|
|
|
(props) => (<TPMquestion {...this.props} {...props} {...this.state} />)
|
|
|
|
|
(props) => (<TPMquestion {...this.props} {...props} {...this.state}/>)
|
|
|
|
|
}></Route>
|
|
|
|
|
|
|
|
|
|
<Route exact path="/shixuns/:shixunId" render={
|
|
|
|
@ -651,7 +662,6 @@ class TPMIndex extends Component {
|
|
|
|
|
}></Route>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{/*<Route exact path="/shixuns/:shixunId" component={TPMChallengeComponent}></Route>*/}
|
|
|
|
|
</Switch>
|
|
|
|
|
|
|
|
|
|