|
|
|
@ -1,15 +1,15 @@
|
|
|
|
|
|
|
|
|
|
import React, { Component } from 'react';
|
|
|
|
|
|
|
|
|
|
import { Route, Link, Switch } from "react-router-dom";
|
|
|
|
|
import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom";
|
|
|
|
|
|
|
|
|
|
import { Row, Col, Menu, } from 'antd';
|
|
|
|
|
import { Row, Col ,Menu,Popover,Button} from 'antd';
|
|
|
|
|
|
|
|
|
|
import Loading from '../../Loading';
|
|
|
|
|
|
|
|
|
|
import TPMIndexHOC from './TPMIndexHOC';
|
|
|
|
|
import TPMIndexHOC from './TPMIndexHOC';
|
|
|
|
|
|
|
|
|
|
import { SnackbarHOC, Loadable } from 'educoder';
|
|
|
|
|
import { SnackbarHOC,Loadable } from 'educoder';
|
|
|
|
|
|
|
|
|
|
import TPMBanner from './TPMBanner';
|
|
|
|
|
|
|
|
|
@ -32,52 +32,104 @@ import TPMDataset from './TPMDataset';
|
|
|
|
|
|
|
|
|
|
import '../page/tpiPage.css';
|
|
|
|
|
|
|
|
|
|
//任务
|
|
|
|
|
// const TPMChallengeComponent = Loadable({
|
|
|
|
|
// loader: () => import('./TPMChallengeContainer'),
|
|
|
|
|
// loading: Loading,
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
|
|
//背景知识
|
|
|
|
|
// const TPMPropaedeuticsComponent = Loadable({
|
|
|
|
|
// loader: () => import('./TPMPropaedeuticsComponent'),
|
|
|
|
|
// loading: Loading,
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
|
|
//版本库
|
|
|
|
|
// const TPMRepositoryComponent = Loadable({
|
|
|
|
|
// loader: () => import('./TPMRepositoryComponent'),
|
|
|
|
|
// loading: Loading,
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
|
|
// const TPMRepositoryComponent = Loadable({
|
|
|
|
|
// loader: () => import('./TPMRepositoryComponent'),
|
|
|
|
|
// loading: Loading,
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
|
|
//合作
|
|
|
|
|
// const TPMCollaboratorsComponent = Loadable({
|
|
|
|
|
// loader: () => import('./TPMCollaboratorsContainer'),
|
|
|
|
|
// loading: Loading,
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//评论
|
|
|
|
|
// const TPMShixunDiscussComponent = Loadable({
|
|
|
|
|
// loader: () => import('./TPMShixunDiscussContainer'),
|
|
|
|
|
// loading: Loading,
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
|
|
//排行版
|
|
|
|
|
// const TPMRanking_listComponent = Loadable({
|
|
|
|
|
// loader: () => import('./TPMRanking_listContainer'),
|
|
|
|
|
// loading: Loading,
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
|
|
// //编辑实训
|
|
|
|
|
// const TPMModifysettings = Loadable({
|
|
|
|
|
// loader: () =>import('./modules/tpm/TPMsettings/TPMsettings'),
|
|
|
|
|
// loading: Loading,
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
|
|
//新建实训
|
|
|
|
|
const TPMchallengesnew = Loadable({
|
|
|
|
|
loader: () => import('./challengesnew/TPMchallengesnew'),
|
|
|
|
|
loading: Loading,
|
|
|
|
|
loader: () => import('./challengesnew/TPMchallengesnew'),
|
|
|
|
|
loading: Loading,
|
|
|
|
|
})
|
|
|
|
|
//新建实训
|
|
|
|
|
// const TPMchallengesnew = Loadable({
|
|
|
|
|
// loader: () => import('./challengesnew/TpmTask/TpmTaskIndex'),
|
|
|
|
|
// loading: Loading,
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
|
|
//新建tab2
|
|
|
|
|
const TPMevaluation = Loadable({
|
|
|
|
|
loader: () => import('./challengesnew/TPMevaluation'),
|
|
|
|
|
loading: Loading,
|
|
|
|
|
loader: () => import('./challengesnew/TPMevaluation'),
|
|
|
|
|
loading: Loading,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
//新建tab3答案
|
|
|
|
|
// const TPManswer = Loadable({
|
|
|
|
|
// loader: () => import('./challengesnew/TPManswer'),
|
|
|
|
|
// loading: Loading,
|
|
|
|
|
// })
|
|
|
|
|
const TPManswer = Loadable({
|
|
|
|
|
loader: () => import('./challengesnew/TPManswer2'),
|
|
|
|
|
loading: Loading,
|
|
|
|
|
loader: () => import('./challengesnew/TPManswer2'),
|
|
|
|
|
loading: Loading,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
//选择题
|
|
|
|
|
const TPMquestion = Loadable({
|
|
|
|
|
loader: () => import('./challengesnew/TPMquestion'),
|
|
|
|
|
loading: Loading,
|
|
|
|
|
loader: () => import('./challengesnew/TPMquestion'),
|
|
|
|
|
loading: Loading,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
//fork列表
|
|
|
|
|
const TPMFork_listComponent = Loadable({
|
|
|
|
|
loader: () => import('./TPMFork/TPMForklist'),
|
|
|
|
|
loading: Loading,
|
|
|
|
|
loader: () => import('./TPMFork/TPMForklist'),
|
|
|
|
|
loading: Loading,
|
|
|
|
|
})
|
|
|
|
|
//背景知识修改
|
|
|
|
|
const TPMUpdatepropaede = Loadable({
|
|
|
|
|
loader: () => import('./TPMUpdatepropaede/TPMUpdatepropaede'),
|
|
|
|
|
loading: Loading,
|
|
|
|
|
loader: () => import('./TPMUpdatepropaede/TPMUpdatepropaede'),
|
|
|
|
|
loading: Loading,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 版本库添加文件
|
|
|
|
|
const AddFile = Loadable({
|
|
|
|
|
loader: () => import('./shixunchild/Repository/RepositoryAddFile'),
|
|
|
|
|
loading: Loading,
|
|
|
|
|
})
|
|
|
|
|
// 版本库上传文件
|
|
|
|
|
const Uploadfile = Loadable({
|
|
|
|
|
loader: () => import('./shixunchild/Repository/RepositoryAddFileupload_file'),
|
|
|
|
|
loading: Loading,
|
|
|
|
|
loader: () => import('./shixunchild/Repository/RepositoryAddFile'),
|
|
|
|
|
loading: Loading,
|
|
|
|
|
})
|
|
|
|
|
// 版本库上传文件
|
|
|
|
|
const Uploadfile= Loadable({
|
|
|
|
@ -85,6 +137,8 @@ const Uploadfile= Loadable({
|
|
|
|
|
loading: Loading,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const interceptorUrlArray = ['repository.json', 'commits.json', 'propaedeutics.json'
|
|
|
|
|
, 'challenges.json', 'discusses.json', 'ranking_list.json', 'collaborators.json']
|
|
|
|
|
const cacheInterceptorUrlMap = {}
|
|
|
|
|
class TPMIndex extends Component {
|
|
|
|
|
constructor(props) {
|
|
|
|
@ -106,35 +160,34 @@ class TPMIndex extends Component {
|
|
|
|
|
newathArray:[]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
openknow = () => {
|
|
|
|
|
let storage = window.localStorage;
|
|
|
|
|
this.setState({
|
|
|
|
|
openknows: false
|
|
|
|
|
})
|
|
|
|
|
let newTPMsettings = this.props.user && this.props.user.user_id + 'newTPMsettings'
|
|
|
|
|
storage.setItem(newTPMsettings, false);
|
|
|
|
|
}
|
|
|
|
|
openknow=()=>{
|
|
|
|
|
let storage=window.localStorage;
|
|
|
|
|
this.setState({
|
|
|
|
|
openknows:false
|
|
|
|
|
})
|
|
|
|
|
let newTPMsettings=this.props.user&&this.props.user.user_id+'newTPMsettings'
|
|
|
|
|
storage.setItem(newTPMsettings,false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
componentDidUpdate(prevProps, prevState) {
|
|
|
|
|
if (prevProps != this.props) {
|
|
|
|
|
if (this.props.user && this.props.user.user_id) {
|
|
|
|
|
let getnewTPMsettings = this.props.user && this.props.user.user_id + 'newTPMsettings';
|
|
|
|
|
let newTPMsettings = window.localStorage.getItem(getnewTPMsettings)
|
|
|
|
|
if (newTPMsettings === undefined || newTPMsettings === false || newTPMsettings === null) {
|
|
|
|
|
this.setState({
|
|
|
|
|
openknows: false
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.setState({
|
|
|
|
|
openknows: false
|
|
|
|
|
})
|
|
|
|
|
if (prevProps!=this.props) {
|
|
|
|
|
if(this.props.user&&this.props.user.user_id){
|
|
|
|
|
let getnewTPMsettings=this.props.user&&this.props.user.user_id+'newTPMsettings';
|
|
|
|
|
let newTPMsettings=window.localStorage.getItem(getnewTPMsettings)
|
|
|
|
|
if(newTPMsettings===undefined||newTPMsettings===false||newTPMsettings===null){
|
|
|
|
|
this.setState({
|
|
|
|
|
openknows:false
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
this.setState({
|
|
|
|
|
openknows:false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getcomponentdidmount=()=>{
|
|
|
|
|
|
|
|
|
@ -203,20 +256,19 @@ class TPMIndex extends Component {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
let newstar_infos = response.data.score_info;
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
this.setState({
|
|
|
|
|
shixunsDetails: response.data,
|
|
|
|
|
shixunId: id,
|
|
|
|
|
star_info: newstar_info,
|
|
|
|
|
star_infos: newstar_infos,
|
|
|
|
|
power: response.data.power,
|
|
|
|
|
identity: response.data.identity,
|
|
|
|
|
propaedeutics: response.data.propaedeutics,
|
|
|
|
|
status: response.data.shixun_status,
|
|
|
|
|
secret_repository: response.data.secret_repository,
|
|
|
|
|
public: response.data.public,
|
|
|
|
|
is_jupyter: response.data.is_jupyter === undefined || response.data.is_jupyter === null ? false : response.data.is_jupyter,
|
|
|
|
|
shixunsDetails: undefined,
|
|
|
|
|
shixunId: undefined,
|
|
|
|
|
star_info: undefined,
|
|
|
|
|
star_infos: undefined,
|
|
|
|
|
power: undefined,
|
|
|
|
|
identity: undefined,
|
|
|
|
|
status: undefined,
|
|
|
|
|
propaedeutics:undefined,
|
|
|
|
|
is_jupyter:false,
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
@ -238,84 +290,88 @@ class TPMIndex extends Component {
|
|
|
|
|
// return Promise.reject(error);
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
// Add a response interceptor
|
|
|
|
|
this.tpmContentResponseInterceptor = axios.interceptors.response.use((response) => {
|
|
|
|
|
let url = response.config.url.split('api')[1];
|
|
|
|
|
url = url.split('?')[0]
|
|
|
|
|
if (cacheInterceptorUrlMap[url]) {
|
|
|
|
|
|
|
|
|
|
this.setState({ loadingContent: false })
|
|
|
|
|
delete cacheInterceptorUrlMap[response.url]
|
|
|
|
|
}
|
|
|
|
|
return response;
|
|
|
|
|
}, function (error) {
|
|
|
|
|
// Do something with response error
|
|
|
|
|
return Promise.reject(error);
|
|
|
|
|
});
|
|
|
|
|
//右侧数据
|
|
|
|
|
let shixunsDetailsURL = `/shixuns/` + id + `/show_right.json`;
|
|
|
|
|
axios.get(shixunsDetailsURL).then((response) => {
|
|
|
|
|
if (response.data) {
|
|
|
|
|
// Add a response interceptor
|
|
|
|
|
this.tpmContentResponseInterceptor = axios.interceptors.response.use((response) => {
|
|
|
|
|
// console.log('loadingContent finished, url:', response.config.url)
|
|
|
|
|
// TODO 依赖了api这个前缀
|
|
|
|
|
let url = response.config.url.split('api')[1];
|
|
|
|
|
url = url.split('?')[0]
|
|
|
|
|
if (cacheInterceptorUrlMap[url]) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
this.setState({
|
|
|
|
|
TPMRightSectionData: response.data
|
|
|
|
|
this.setState({ loadingContent: false })
|
|
|
|
|
delete cacheInterceptorUrlMap[response.url]
|
|
|
|
|
}
|
|
|
|
|
return response;
|
|
|
|
|
}, function (error) {
|
|
|
|
|
// Do something with response error
|
|
|
|
|
return Promise.reject(error);
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
this.getnavdatas()
|
|
|
|
|
}
|
|
|
|
|
componentDidMount = () => {
|
|
|
|
|
this.getcomponentdidmount()
|
|
|
|
|
//右侧数据
|
|
|
|
|
let shixunsDetailsURL=`/shixuns/`+id+`/show_right.json`;
|
|
|
|
|
axios.get(shixunsDetailsURL).then((response)=> {
|
|
|
|
|
if(response.data){
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.setState({
|
|
|
|
|
TPMRightSectionData: response.data
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
this.getnavdatas()
|
|
|
|
|
}
|
|
|
|
|
componentDidMount = () => {
|
|
|
|
|
this.getcomponentdidmount()
|
|
|
|
|
|
|
|
|
|
componentWillUnmount = () => {
|
|
|
|
|
axios.interceptors.request.eject(this.tpmContentRequestInterceptor);
|
|
|
|
|
this.tpmContentRequestInterceptor = null;
|
|
|
|
|
// this.getnavdatas()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
setLoadingContent = (isLoadingContent) => {
|
|
|
|
|
// this.setState({ loadingContent: isLoadingContent })
|
|
|
|
|
}
|
|
|
|
|
componentWillUnmount = () => {
|
|
|
|
|
axios.interceptors.request.eject(this.tpmContentRequestInterceptor);
|
|
|
|
|
this.tpmContentRequestInterceptor = null;
|
|
|
|
|
axios.interceptors.request.eject(this.tpmContentResponseInterceptor);
|
|
|
|
|
this.tpmContentResponseInterceptor = null;
|
|
|
|
|
// this.getnavdatas()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
setLoadingContent = (isLoadingContent) => {
|
|
|
|
|
// this.setState({ loadingContent: isLoadingContent })
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getnavdatas = () => {
|
|
|
|
|
let selectedKeys;
|
|
|
|
|
const { location } = this.props;
|
|
|
|
|
if (location.pathname.indexOf('/challenges') != -1) {
|
|
|
|
|
selectedKeys = "1"
|
|
|
|
|
} else if (location.pathname.indexOf('/propaedeutics') != -1) {
|
|
|
|
|
selectedKeys = "2"
|
|
|
|
|
} else if (location.pathname.indexOf('/repository') != -1) {
|
|
|
|
|
selectedKeys = "3"
|
|
|
|
|
} else if (location.pathname.indexOf('/secret_repository') != -1) {
|
|
|
|
|
selectedKeys = "4"
|
|
|
|
|
} else if (location.pathname.indexOf('/collaborators') != -1) {
|
|
|
|
|
selectedKeys = "5"
|
|
|
|
|
} else if (location.pathname.indexOf('/dataset') != -1) {
|
|
|
|
|
selectedKeys = "6"
|
|
|
|
|
} else if (location.pathname.indexOf('/shixun_discuss') != -1) {
|
|
|
|
|
selectedKeys = "7"
|
|
|
|
|
} else if (location.pathname.indexOf('/ranking_list') != -1) {
|
|
|
|
|
selectedKeys = "8"
|
|
|
|
|
} else if (location.pathname.indexOf('/settings') != -1) {
|
|
|
|
|
selectedKeys = "9"
|
|
|
|
|
getnavdatas=()=>{
|
|
|
|
|
let selectedKeys;
|
|
|
|
|
const {location} = this.props;
|
|
|
|
|
if(location.pathname.indexOf('/challenges')!=-1){
|
|
|
|
|
selectedKeys="1"
|
|
|
|
|
}else if(location.pathname.indexOf('/propaedeutics')!=-1){
|
|
|
|
|
selectedKeys="2"
|
|
|
|
|
}else if(location.pathname.indexOf('/repository')!=-1){
|
|
|
|
|
selectedKeys="3"
|
|
|
|
|
}else if(location.pathname.indexOf('/secret_repository')!=-1){
|
|
|
|
|
selectedKeys="4"
|
|
|
|
|
} else if(location.pathname.indexOf('/collaborators')!=-1){
|
|
|
|
|
selectedKeys="5"
|
|
|
|
|
}else if(location.pathname.indexOf('/dataset')!=-1){
|
|
|
|
|
selectedKeys="6"
|
|
|
|
|
}else if(location.pathname.indexOf('/shixun_discuss')!=-1){
|
|
|
|
|
selectedKeys="7"
|
|
|
|
|
}else if(location.pathname.indexOf('/ranking_list')!=-1){
|
|
|
|
|
selectedKeys="8"
|
|
|
|
|
}else if(location.pathname.indexOf('/settings')!=-1){
|
|
|
|
|
selectedKeys="9"
|
|
|
|
|
}
|
|
|
|
|
this.setState({
|
|
|
|
|
selectedKeys:selectedKeys
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
this.setState({
|
|
|
|
|
selectedKeys: selectedKeys
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
handleClick = (e) => {
|
|
|
|
|
handleClick=(e)=>{
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
selectedKeys: e.key,
|
|
|
|
|
});
|
|
|
|
|
let id = this.props.match.params.shixunId;
|
|
|
|
|
if (e.key === "1") {
|
|
|
|
|
if(e.key==="1"){
|
|
|
|
|
this.props.history.replace(`/shixuns/${id}/challenges`);
|
|
|
|
|
} else if (e.key === "2") {
|
|
|
|
|
}else if(e.key==="2"){
|
|
|
|
|
this.props.history.replace(`/shixuns/${id}/propaedeutics`);
|
|
|
|
|
}else if(e.key==="3"){
|
|
|
|
|
// window.location.href=`/shixuns/${id}/repository`;
|
|
|
|
@ -325,13 +381,13 @@ class TPMIndex extends Component {
|
|
|
|
|
this.props.history.push(`/shixuns/${id}/secret_repository`);
|
|
|
|
|
}else if(e.key==="5"){
|
|
|
|
|
this.props.history.replace(`/shixuns/${id}/collaborators`);
|
|
|
|
|
} else if (e.key === "6") {
|
|
|
|
|
}else if(e.key==="6"){
|
|
|
|
|
this.props.history.replace(`/shixuns/${id}/dataset`);
|
|
|
|
|
} else if (e.key === "7") {
|
|
|
|
|
}else if(e.key==="7"){
|
|
|
|
|
this.props.history.replace(`/shixuns/${id}/shixun_discuss`);
|
|
|
|
|
} else if (e.key === "8") {
|
|
|
|
|
}else if(e.key==="8"){
|
|
|
|
|
this.props.history.replace(`/shixuns/${id}/ranking_list`);
|
|
|
|
|
} else if (e.key === "9") {
|
|
|
|
|
}else if(e.key==="9"){
|
|
|
|
|
this.props.history.replace(`/shixuns/${id}/settings`);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -360,9 +416,9 @@ class TPMIndex extends Component {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
{
|
|
|
|
|
`
|
|
|
|
|
<style>
|
|
|
|
|
{
|
|
|
|
|
`
|
|
|
|
|
.ant-menu-item{
|
|
|
|
|
margin:0 40px 0 0;
|
|
|
|
|
padding:0px;
|
|
|
|
@ -371,56 +427,75 @@ class TPMIndex extends Component {
|
|
|
|
|
z-index:1000 !important;
|
|
|
|
|
}
|
|
|
|
|
`
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
<Row type="flex" className={"backgroudwhite"}>
|
|
|
|
|
<div className={"educontent clearfix"}>
|
|
|
|
|
<Col span={24}>
|
|
|
|
|
|
|
|
|
|
<Menu onClick={this.handleClick} selectedKeys={[this.state.selectedKeys]} mode="horizontal">
|
|
|
|
|
|
|
|
|
|
<Menu.Item key="1" className={"competitionmr50"}>
|
|
|
|
|
<span className={"tpmbannernavstyler"}>任务</span>
|
|
|
|
|
</Menu.Item>
|
|
|
|
|
|
|
|
|
|
{this.state.propaedeutics === undefined ? "" : this.state.propaedeutics === false ? "" : <Menu.Item key="2" className={"competitionmr50"}>
|
|
|
|
|
<span className={"tpmbannernavstyler"}>背景知识</span>
|
|
|
|
|
</Menu.Item>}
|
|
|
|
|
|
|
|
|
|
{this.state.identity > 4 || this.state.identity === undefined ? "" :
|
|
|
|
|
this.state.is_jupyter === false ? <Menu.Item key="3" className={"competitionmr50"}>
|
|
|
|
|
<span className={"tpmbannernavstyler"}>版本库</span>
|
|
|
|
|
</Menu.Item> : ""}
|
|
|
|
|
|
|
|
|
|
{this.state.identity > 4 || this.state.identity === undefined ? "" : this.state.secret_repository && <Menu.Item key="4" className={"competitionmr50"}>
|
|
|
|
|
<span className={"tpmbannernavstyler"}>私密版本库</span>
|
|
|
|
|
</Menu.Item>}
|
|
|
|
|
|
|
|
|
|
<Menu.Item key="5" className={"competitionmr50"}>
|
|
|
|
|
<span className={"tpmbannernavstyler"}>合作者</span>
|
|
|
|
|
</Menu.Item>
|
|
|
|
|
|
|
|
|
|
{this.state.identity > 4 || this.state.identity === undefined ? "" : this.state.is_jupyter === true ? <Menu.Item key="6" className={"competitionmr50"}>
|
|
|
|
|
<span className={"tpmbannernavstyler"}>数据集</span>
|
|
|
|
|
</Menu.Item> : ""}
|
|
|
|
|
|
|
|
|
|
{this.state.is_jupyter === false ? <Menu.Item key="7" className={"competitionmr50"}>
|
|
|
|
|
<span className={"tpmbannernavstyler"}>评论</span>
|
|
|
|
|
</Menu.Item> : ""}
|
|
|
|
|
|
|
|
|
|
{this.state.is_jupyter === false ? <Menu.Item key="8" className={"competitionmr50"}>
|
|
|
|
|
<span className={"tpmbannernavstyler"}>排行榜</span>
|
|
|
|
|
</Menu.Item> : ""}
|
|
|
|
|
{this.state.identity > 4 || this.state.identity === undefined ? "" :
|
|
|
|
|
<Menu.Item key="9" className={"competitionmr50"}>
|
|
|
|
|
<span className={"tpmbannernavstyler"}>配置</span>
|
|
|
|
|
</Menu.Item>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
{this.state.identity > 2 || this.state.identity === undefined ? "" :
|
|
|
|
|
<div className={"fr"}>
|
|
|
|
|
<Link to={`/shixuns/${this.props.match.params.shixunId}/audit_situation`}
|
|
|
|
|
className={`${this.props.match.url.indexOf('audit_situation') != -1 ? 'font-16 audit_situationactive' : 'font-16 audit_situationactive'} fl`}>审核情况</Link>
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
<Row type="flex" className={"backgroudwhite"}>
|
|
|
|
|
<div className={"educontent clearfix"}>
|
|
|
|
|
<Col span={24}>
|
|
|
|
|
|
|
|
|
|
<Menu onClick={this.handleClick} selectedKeys={[this.state.selectedKeys]} mode="horizontal">
|
|
|
|
|
|
|
|
|
|
<Menu.Item key="1" className={"competitionmr50"}>
|
|
|
|
|
<span className={"tpmbannernavstyler"}>任务</span>
|
|
|
|
|
</Menu.Item>
|
|
|
|
|
|
|
|
|
|
{ this.state.propaedeutics===undefined?"":this.state.propaedeutics===false?"":<Menu.Item key="2" className={"competitionmr50"}>
|
|
|
|
|
<span className={"tpmbannernavstyler"}>背景知识</span>
|
|
|
|
|
</Menu.Item>}
|
|
|
|
|
|
|
|
|
|
{ this.state.identity >4||this.state.identity===undefined ?"":
|
|
|
|
|
this.state.is_jupyter===false?<Menu.Item key="3" className={"competitionmr50"}>
|
|
|
|
|
<span className={"tpmbannernavstyler"}>版本库</span>
|
|
|
|
|
</Menu.Item>:""}
|
|
|
|
|
|
|
|
|
|
{this.state.identity >4||this.state.identity===undefined ?"": this.state.secret_repository && <Menu.Item key="4" className={"competitionmr50"}>
|
|
|
|
|
<span className={"tpmbannernavstyler"}>私密版本库</span>
|
|
|
|
|
</Menu.Item>}
|
|
|
|
|
|
|
|
|
|
<Menu.Item key="5" className={"competitionmr50"}>
|
|
|
|
|
<span className={"tpmbannernavstyler"}>合作者</span>
|
|
|
|
|
</Menu.Item>
|
|
|
|
|
|
|
|
|
|
{ this.state.identity >4||this.state.identity===undefined ? "":this.state.is_jupyter===true?<Menu.Item key="6" className={"competitionmr50"}>
|
|
|
|
|
<span className={"tpmbannernavstyler"}>数据集</span>
|
|
|
|
|
</Menu.Item>:""}
|
|
|
|
|
|
|
|
|
|
{ this.state.is_jupyter===false?<Menu.Item key="7" className={"competitionmr50"}>
|
|
|
|
|
<span className={"tpmbannernavstyler"}>评论</span>
|
|
|
|
|
</Menu.Item>:""}
|
|
|
|
|
|
|
|
|
|
{ this.state.is_jupyter===false? <Menu.Item key="8" className={"competitionmr50"}>
|
|
|
|
|
<span className={"tpmbannernavstyler"}>排行榜</span>
|
|
|
|
|
</Menu.Item>:""}
|
|
|
|
|
{/*{this.state.identity >4||this.state.identity===undefined ? "":this.state.openknows===true?<span>*/}
|
|
|
|
|
{/* <Popover*/}
|
|
|
|
|
{/* content={*/}
|
|
|
|
|
{/* <pre className={"bannerpd201"}>*/}
|
|
|
|
|
{/* <div>更多设置在这里,点击“配置”看一看~</div>*/}
|
|
|
|
|
{/* <div className={"wechatcenter mt15"}><Button type="primary" onClick={this.openknow} >我知道了</Button></div>*/}
|
|
|
|
|
{/* </pre>*/}
|
|
|
|
|
{/* }*/}
|
|
|
|
|
{/* trigger="click"*/}
|
|
|
|
|
{/* placement="top"*/}
|
|
|
|
|
{/* visible={this.state.openknows}*/}
|
|
|
|
|
{/* >*/}
|
|
|
|
|
{/* </Popover>*/}
|
|
|
|
|
{/*</span>:""}*/}
|
|
|
|
|
|
|
|
|
|
{this.state.identity >4||this.state.identity===undefined ? "":
|
|
|
|
|
<Menu.Item key="9" className={"competitionmr50"}>
|
|
|
|
|
<span className={"tpmbannernavstyler"}>配置</span>
|
|
|
|
|
</Menu.Item>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
{this.state.identity >2||this.state.identity===undefined?"":
|
|
|
|
|
<div className={"fr"}>
|
|
|
|
|
<Link to={`/shixuns/${this.props.match.params.shixunId}/audit_situation`}
|
|
|
|
|
className={`${this.props.match.url.indexOf('audit_situation') != -1 ? 'font-16 audit_situationactive' : 'font-16 audit_situationactive'} fl`}>审核情况</Link>
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
</Menu>
|
|
|
|
|
</Col>
|
|
|
|
|
</div>
|
|
|
|
|
</Row>
|
|
|
|
|
|
|
|
|
@ -598,4 +673,4 @@ class TPMIndex extends Component {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default SnackbarHOC()(TPMIndexHOC(TPMIndex));
|
|
|
|
|
export default SnackbarHOC() (TPMIndexHOC ( TPMIndex ));
|
|
|
|
|