调整tpm 相关

chromesetting
杨树明 5 years ago
parent f88b1ec393
commit f260de72a8

@ -626,11 +626,26 @@ class App extends Component {
<Route path="/tasks/:stageId" component={IndexWrapperComponent}/> <Route path="/tasks/:stageId" component={IndexWrapperComponent}/>
<Route path="/shixuns/:shixunId" component={TPMIndexComponent}> {/*<Route path="/shixuns/:shixunId" component={TPMIndexComponent}>*/}
</Route> {/*</Route>*/}
<Route path="/shixuns/:shixunId"
render={
(props)=>(<TPMIndexComponent {...this.props} {...props} {...this.state}></TPMIndexComponent>)
}
></Route>
{/*列表页 实训项目列表*/} {/*列表页 实训项目列表*/}
<Route path="/shixuns" component={TPMShixunsIndexComponent}/> {/*<Route path="/shixuns" component={TPMShixunsIndexComponent}/>*/}
<Route path="/shixuns"
render={
(props)=>(<TPMShixunsIndexComponent {...this.props} {...props} {...this.state}></TPMShixunsIndexComponent>)
}
></Route>
{/*实训课程(原实训路径)*/} {/*实训课程(原实训路径)*/}

@ -380,6 +380,26 @@ a:hover.task-btn-orange{background: #4CACFF; color:#fff!important;}
color:#4CACFF; color:#4CACFF;
} }
/*实训详情*/
.backgroudwhite{
height:60px;
background:rgba(255,255,255,1);
box-shadow:0px 1px 0px 0px rgba(244,244,244,1);
line-height: 60px;
}
.tpmbannernavstyler{
font-size:16px;
/*color:rgba(51,51,51,1);*/
}
.ant-menu-horizontal {
border-bottom:none !important;
height:60px;
line-height: 60px;
}
.audit_situationactive{
color: #4CACFF !important;
}

@ -1,6 +1,6 @@
import React, {Component} from 'react'; import React, {Component} from 'react';
import {BrowserRouter as Router, Route, Link, Switch} from "react-router-dom"; import {Link} from "react-router-dom";
import {Rating, Progress} from "@icedesign/base"; import {Rating, Progress} from "@icedesign/base";
@ -857,81 +857,70 @@ class TPMBanner extends Component {
</ul> </ul>
{ {
this.props.is_jupyter===true?"": this.props.is_jupyter===true?"":
<div className="pr fl" id="commentsStar" onMouseOver={() => this.showonMouseOver()}
onMouseOut={() => this.hideonMouseOut()}> <Popover placement="right" content={
<div className={"color-grey-c ml15"} style={{color: "#Fff", textAlign: "center"}}>学员评分</div> <div style={{"width": "530px"}} >
<div className="rateYo"> <div className="pr">
<MyRate allowHalf defaultValue={star_info[0]} disabled/> <span className="rateTrangle"></span>
</div> <div className="pr clearfix" style={{height: '177px'}}>
<div id="ratePanel" className="showratePanel" style={{"width": "530px"}} <div className="fl totalScore ml10">
onMouseOut={() => this.hideonMouseOut()}> <div>
<div className="pr"> <span className="font-24 color-yellow-ff lineh-20 mb10 mlbanner36">{star_infos[0]}</span>
<span className="rateTrangle"></span> <span className="displayblock mt20">总评分</span>
<div className="pr clearfix ratePanelContent" style={{height: '177px'}}> <div className="rateYo">
<div className="fl totalScore"> <MyRate allowHalf defaultValue={star_info[0]} disabled/>
<div> </div>
<span </div>
className="font-24 color-yellow-ff lineh-20 mb10 ml20">{star_infos[0]}</span> </div>
<span className="displayblock">总评分</span> <div className="fr mt20 mr20" style={{width: '375px'}}>
<div className="rateYo"> <div className="clearfix">
{showradios === true ? <div className="rateYo fl mt3">
<MyRate allowHalf defaultValue={star_info[0]} disabled/> <MyRate allowHalf defaultValue={5} disabled/>
: ""} </div>
</div> <Progress percent={star_infos[1]} showInfo={false}></Progress>
</div> <span className="fr ml10 color-grey-6 font-12 mt4">{star_infos[1]}%</span>
</div> </div>
<div className="fr" style={{width: '375px'}}> <div className="clearfix">
<div className="clearfix"> <div className="rateYo fl mt3">
<div className="rateYo fl mt3"> <MyRate allowHalf defaultValue={4} disabled/>
{showradios === true ? </div>
<MyRate allowHalf defaultValue={5} disabled/> <Progress percent={star_infos[2]} showInfo={false}></Progress>
: ""} <span className="fr ml10 color-grey-6 font-12 mt4">{star_infos[2]}%</span>
</div> </div>
<Progress percent={star_infos[1]} showInfo={false}></Progress> <div className="clearfix">
<span className="fr ml10 color-grey-6 font-12 mt4">{star_infos[1]}%</span> <div className="rateYo fl mt3">
</div> <MyRate allowHalf defaultValue={3} disabled/>
<div className="clearfix"> </div>
<div className="rateYo fl mt3"> <Progress percent={star_infos[3]} showInfo={false}></Progress>
{showradios === true ? <span className="fr ml10 color-grey-6 font-12 mt4">{star_infos[3]}%</span>
<MyRate allowHalf defaultValue={4} disabled/> </div>
: ""} <div className="clearfix">
</div> <div className="rateYo fl mt3">
<Progress percent={star_infos[2]} showInfo={false}></Progress> <MyRate allowHalf defaultValue={2} disabled/>
<span className="fr ml10 color-grey-6 font-12 mt4">{star_infos[2]}%</span> </div>
</div> <Progress percent={star_infos[4]} showInfo={false}></Progress>
<div className="clearfix"> <span className="fr ml10 color-grey-6 font-12 mt4">{star_infos[4]}%</span>
<div className="rateYo fl mt3"> </div>
{showradios === true ? <div className="clearfix">
<MyRate allowHalf defaultValue={3} disabled/> <div className="rateYo fl mt3">
: ""} <MyRate allowHalf defaultValue={1} disabled/>
</div> </div>
<Progress percent={star_infos[3]} showInfo={false}></Progress> <Progress percent={star_infos[5]} showInfo={false}></Progress>
<span className="fr ml10 color-grey-6 font-12 mt4">{star_infos[3]}%</span> <span className="fr ml10 color-grey-6 font-12 mt4">{star_infos[5]}%</span>
</div> </div>
<div className="clearfix"> </div>
<div className="rateYo fl mt3"> </div>
{showradios === true ? </div>
<MyRate allowHalf defaultValue={2} disabled/> </div>
: ""} }>
</div> <div className="pr fl" id="commentsStar">
<Progress percent={star_infos[4]} showInfo={false}></Progress> <div className={"color-grey-c ml15"} style={{color: "#fff", textAlign: "center"}}>学员评分</div>
<span className="fr ml10 color-grey-6 font-12 mt4">{star_infos[4]}%</span> <div className="rateYo">
</div> <MyRate allowHalf defaultValue={star_info[0]} disabled/>
<div className="clearfix"> </div>
<div className="rateYo fl mt3"> </div>
{showradios === true ? </Popover>
<MyRate allowHalf defaultValue={1} disabled/>
: ""}
</div>
<Progress percent={star_infos[5]} showInfo={false}></Progress>
<span className="fr ml10 color-grey-6 font-12 mt4">{star_infos[5]}%</span>
</div>
</div>
</div>
</div>
</div>
</div>
} }

@ -92,7 +92,7 @@ body>.-task-title {
} }
.totalScore{ .totalScore{
display: block!important; display: block!important;
padding-top: 28px; padding-top: 40px;
} }
.head-nav ul#header-nav li{ .head-nav ul#header-nav li{
/*font-weight: 600;*/ /*font-weight: 600;*/

@ -2,6 +2,8 @@ import React, { Component } from 'react';
import { BrowserRouter as Router, 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 Loading from '../../Loading'; import Loading from '../../Loading';
import Loadable from 'react-loadable'; import Loadable from 'react-loadable';
@ -22,18 +24,16 @@ import TPMRepositoryCommits from './shixunchild/Repository/TPMRepositoryCommits'
import TPMsettings from './TPMsettings/TPMsettings'; import TPMsettings from './TPMsettings/TPMsettings';
//import TPMsettings from './TPMsettings/oldTPMsettings';
import TPMChallengeComponent from './TPMChallengeContainer'; import TPMChallengeComponent from './TPMChallengeContainer';
import TPMPropaedeuticsComponent from './TPMPropaedeuticsComponent'; import TPMPropaedeuticsComponent from './TPMPropaedeuticsComponent';
import TPMRanking_listComponent from './TPMRanking_listContainer'; import TPMRanking_listComponent from './TPMRanking_listContainer';
import TPMCollaboratorsComponent from './TPMCollaboratorsContainer'; import TPMCollaboratorsComponent from './TPMCollaboratorsContainer';
import Audit_situationComponent from './Audit_situationComponent'; import Audit_situationComponent from './Audit_situationComponent';
import TPMDataset from './TPMDataset'; import TPMDataset from './TPMDataset';
import '../page/tpiPage.css' import TPMNav from './component/TPMNav';
import TPMNav from "./component/TPMNav";
import '../page/tpiPage.css';
const $ = window.$
//任务 //任务
// const TPMChallengeComponent = Loadable({ // const TPMChallengeComponent = Loadable({
// loader: () => import('./TPMChallengeContainer'), // loader: () => import('./TPMChallengeContainer'),
@ -147,6 +147,7 @@ class TPMIndex extends Component {
PropaedeuticsList: undefined, PropaedeuticsList: undefined,
tpmindexjupyterbool:false, tpmindexjupyterbool:false,
is_jupyter:false, is_jupyter:false,
selectedKeys:""
} }
} }
@ -248,38 +249,97 @@ class TPMIndex extends Component {
// Do something with response error // Do something with response error
return Promise.reject(error); return Promise.reject(error);
}); });
//右侧数据
let shixunsDetailsURL=`/shixuns/`+id+`/show_right.json`;
//右侧数据 axios.get(shixunsDetailsURL).then((response)=> {
let shixunsDetailsURL=`/shixuns/`+id+`/show_right.json`; this.setState({
axios.get(shixunsDetailsURL).then((response)=> { TPMRightSectionData: response.data
this.setState({ });
TPMRightSectionData: response.data })
}); this.getnavdatas()
})
} }
componentWillUnmount = () => { componentWillUnmount = () => {
axios.interceptors.request.eject(this.tpmContentRequestInterceptor); axios.interceptors.request.eject(this.tpmContentRequestInterceptor);
this.tpmContentRequestInterceptor = null; this.tpmContentRequestInterceptor = null;
axios.interceptors.request.eject(this.tpmContentResponseInterceptor); axios.interceptors.request.eject(this.tpmContentResponseInterceptor);
this.tpmContentResponseInterceptor = null; this.tpmContentResponseInterceptor = null;
// this.getnavdatas()
} }
// componentDidUpdate=()=>{
// this.getnavdatas()
// }
setLoadingContent = (isLoadingContent) => { setLoadingContent = (isLoadingContent) => {
this.setState({ loadingContent: isLoadingContent }) this.setState({ loadingContent: isLoadingContent })
} }
// TpmTPMBannertype(type){
//
// }
getnavdatas=()=>{
let selectedKeys;
const {location} = this.props;
console.log(location.pathname)
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"
}
console.log("进入")
console.log(selectedKeys)
this.setState({
selectedKeys:selectedKeys
})
}
handleClick=(e)=>{
this.setState({
selectedKeys: e.key,
});
let id = this.props.match.params.shixunId;
if(e.key==="1"){
this.props.history.replace(`/shixuns/${id}/challenges`);
}else if(e.key==="2"){
this.props.history.replace(`/shixuns/${id}/propaedeutics`);
}else if(e.key==="3"){
this.props.history.replace(`/shixuns/${id}/repository`);
}else if(e.key==="4"){
this.props.history.replace(`/shixuns/${id}/secret_repository`);
}else if(e.key==="5"){
this.props.history.replace(`/shixuns/${id}/collaborators`);
}else if(e.key==="6"){
this.props.history.replace(`/shixuns/${id}/dataset`);
}else if(e.key==="7"){
this.props.history.replace(`/shixuns/${id}/shixun_discuss`);
}else if(e.key==="8"){
this.props.history.replace(`/shixuns/${id}/ranking_list`);
}else if(e.key==="9"){
this.props.history.replace(`/shixuns/${id}/settings`);
}
}
render() { render() {
let url = window.location.href; let url = window.location.href;
let flag = url.indexOf("add_file")>-1; let flag = url.indexOf("add_file")>-1;
// console.log(this.state.is_jupyter);
return ( return (
<div className="newMain clearfix"> <div className="newMain clearfix">
{/*头部*/} {/*头部*/}
@ -291,6 +351,77 @@ class TPMIndex extends Component {
is_jupyter={this.state. is_jupyter} is_jupyter={this.state. is_jupyter}
></TPMBanner> ></TPMBanner>
} }
<style>
{
`
.ant-menu-item{
margin:0 40px 0 0;
padding:0px;
}
`
}
</style>
<Row type="flex" className={"backgroudwhite"}>
<Col span={5}></Col>
<Col span={14}>
<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.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>
</div>
}
</Menu>
</Col>
<Col span={5}></Col>
</Row>
{/*筛选*/} {/*筛选*/}
{/*{*/} {/*{*/}
{/* tpmindexjupyterbool===false?*/} {/* tpmindexjupyterbool===false?*/}

@ -22,7 +22,12 @@ class TPMNav extends Component {
// console.log("TPMNavTPMNavTPMNav"); // console.log("TPMNavTPMNavTPMNav");
// console.log(is_jupyter); // console.log(is_jupyter);
const is_teacher = this.props&&this.props.current_user&&this.props.current_user.is_teacher?this.props.current_user.is_teacher:""; const is_teacher = this.props&&this.props.current_user&&this.props.current_user.is_teacher?this.props.current_user.is_teacher:"";
const isfalse=true;
return ( return (
isfalse?"":
<div className="bor-bottom-greyE clearfix pl20 pr20 pt40 pb20 edu-back-white challengeNav"> <div className="bor-bottom-greyE clearfix pl20 pr20 pt40 pb20 edu-back-white challengeNav">
<Link <Link
to={challengesPath} to={challengesPath}
@ -71,16 +76,8 @@ class TPMNav extends Component {
} }
{this.props.identity >2||this.props.identity===undefined?"": {this.props.identity >2||this.props.identity===undefined?"":
(this.props.is_jupyter === false?
<Link to={`/shixuns/${shixunId}/audit_situation`}
className={`${match.url.indexOf('audit_situation') != -1 ? 'active' : ''} fl`}>审核情况</Link>
:
<Link to={`/shixuns/${shixunId}/audit_situation`} <Link to={`/shixuns/${shixunId}/audit_situation`}
className={`${match.url.indexOf('audit_situation') != -1 ? 'active' : ''} fl`}>审核情况</Link> className={`${match.url.indexOf('audit_situation') != -1 ? 'active' : ''} fl`}>审核情况</Link>
)
} }
{this.props.identity >4||this.props.identity===undefined ? "":<Link to={`/shixuns/${shixunId}/settings`} className="edu-default-btn edu-blueline-btn ml20 fr" {this.props.identity >4||this.props.identity===undefined ? "":<Link to={`/shixuns/${shixunId}/settings`} className="edu-default-btn edu-blueline-btn ml20 fr"

@ -450,7 +450,7 @@ class Collaborators extends Component {
const antIcon = <Icon type="loading" style={{ fontSize: 24 }} spin />; const antIcon = <Icon type="loading" style={{ fontSize: 24 }} spin />;
console.log(Searchadmin) // console.log(Searchadmin)
return ( return (
<React.Fragment> <React.Fragment>
<p className=" mt30 sortinxdirection" <p className=" mt30 sortinxdirection"

@ -157,3 +157,6 @@ a:active{text-decoration:none;}
color: #ffffff !important; color: #ffffff !important;
} }
.forkNumst{display: block;float: left;width: 36px;text-align: center;border-left: 1px solid #ffffff !important;color: #ffffff!important; } .forkNumst{display: block;float: left;width: 36px;text-align: center;border-left: 1px solid #ffffff !important;color: #ffffff!important; }
.mlbanner36{
margin-left: 36px;
}
Loading…
Cancel
Save