调整新版实训

chromesetting
杨树明 5 years ago
parent ed37f8e02b
commit 94263caead

@ -1,5 +1,5 @@
import React,{ Component } from "react";
import {Table, Pagination,Tooltip,Spin, Row, Col ,Checkbox,Tabs,Menu, Dropdown, Icon,Input} from "antd";
import {Table, Pagination,Popover,Spin, Row, Col ,Tabs, Icon} from "antd";
import { WordsBtn,on, off, trigger ,getImageUrl,sortDirections} from 'educoder';
import axios from'axios';
import Dropdownbox from './Dropdownbox';
@ -423,15 +423,38 @@ class Statistics extends Component{
:""
}
</React.Fragment>;
const content = (
<div className={"Statisticscircle"}>
<p>
课堂总成绩 * 70 %
</p>
<p>
课堂活跃度 * 10%
</p>
<p>
课外学习成绩 * 20%
</p>
<p>
其中课外学习成绩= 当前学生经验值 / 课堂学生经验值 最大值*100
</p>
</div>
);
return(
<React.Fragment>
<div className="edu-back-white">
<Spin size="large" spinning={this.state.topisSpin}>
<p className="clearfix padding30">
<Row gutter={24}>
<Col className={"Statisticsmxxy"}>
<Row>
<Col span={12}>
明星学员
</Col>
<Col span={12} className={"Statisticsliboxjsgz"}>
<span className={"mr10"}>计算规则</span>
<Popover placement="bottom" title={"明星学员计算说明"} content={content} trigger="hover">
<Icon type="info-circle" />
</Popover>
</Col>
</Row>
<Row type="flex" justify="center" align="bottom">

@ -2,7 +2,7 @@ import React, { Component } from 'react';
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';
@ -147,12 +147,21 @@ class TPMIndex extends Component {
PropaedeuticsList: undefined,
tpmindexjupyterbool:false,
is_jupyter:false,
selectedKeys:""
selectedKeys:"",
openknows:false
}
}
componentDidMount = () => {
openknow=()=>{
let storage=window.localStorage;
this.setState({
openknows:false
})
storage.setItem("newTPMsettings",true);
}
componentDidMount = () => {
let newTPMsettings=window.localStorage.newTPMsettings;
let id = this.props.match.params.shixunId;
// console.log('props', this.props);
// let collaborators = `/shixuns/` + id + `/propaedeutics.json`;
@ -200,6 +209,22 @@ class TPMIndex extends Component {
secret_repository: response.data.secret_repository,
is_jupyter:response.data.is_jupyter=== undefined||response.data.is_jupyter===null?false:response.data.is_jupyter,
});
if(response.data.identity <4){
if(newTPMsettings===undefined||newTPMsettings===false){
this.setState({
openknows:true
})
}else{
this.setState({
openknows:false
})
}
}
}
}).catch((error) => {
this.setState({
@ -402,9 +427,23 @@ class TPMIndex extends Component {
<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 >4||this.state.identity===undefined ? "":
<Menu.Item key="9" className={"competitionmr50"}>
<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}
>
<span className={"tpmbannernavstyler"}>配置</span>
</Popover>
</Menu.Item>
}
{this.state.identity >2||this.state.identity===undefined?"":
<div className={"fr"}>

@ -79,9 +79,18 @@ class ShixunCard extends Component {
</div>:""}
<div className="mt10 mb20 clearfix"
<div className="mb20 clearfix"
// style={{display: middleshixundata === undefined || middleshixundata.length === 0 ? "none" : "block"}}
>
<style>
{
`
.square-list{
margin-top:5px;
}
`
}
</style>
<div className="shixun_list_content">
<div className="square-list clearfix">
{middleshixundata === undefined || middleshixundata.length === 0?" ":middleshixundata.map((item,key)=>{

@ -160,8 +160,42 @@ class ShixunCardList extends Component {
this.props.Shixunsupcircles("asc")
}
}
//头部获取是否已经登录了
getUser=(url,type)=>{
if(this.props.checkIfLogin()===false){
this.props.showLoginDialog()
return
}
if(this.props.checkIfProfileCompleted()===false){
this.props.showProfileCompleteDialog()
return
}
if(url !== undefined || url!==""){
window.location.href = url;
}
}
render(){
let {mine,InputValue,upcircle}=this.state;
// console.log("NewHeadermygetHelmetapi123123123123");
let shixuntype=false;
if(this.props&&this.props.mygetHelmetapi!=null){
let shixun="/shixuns";
let paths="/paths";
let courses="/courses";
this.props.mygetHelmetapi.navbar.map((item,key)=>{
var reg = RegExp(item.link);
if(shixun.match(reg)){
if(item.hidden===true){
shixuntype=true
}
}
})
}
return (
<div className="educontent mt20">
<div className="clearfix">
@ -184,7 +218,7 @@ class ShixunCardList extends Component {
id="hot"
onClick={(e)=>this.latestHot(e,3)}>最热
</div>
{shixuntype===true?"":<a className={ "fl font-16 bestChoose active" } onClick={(url)=>this.getUser("/shixuns/new")}>+新建实训项目</a>}
{/*<div className="fl font-16 bestChoose shixun_repertoire ml20 mt1"*/}
{/*style={{display:upcircle===true?"block":"none"}}*/}

@ -394,6 +394,8 @@ class ShixunsIndex extends Component {
parsedid={parsedid}
newtag_level={newtag_level}
newpalce={newpalce}
{...this.props}
{...this.state}
/>
<ShixunCardList
@ -401,6 +403,7 @@ class ShixunsIndex extends Component {
ShixunsSwitch={this.ShixunsSwitch.bind(this)}
Shixunsupcircles={this.Shixunsupcircles.bind(this)}
allUpdatashixunlist={this.allUpdatashixunlist}
{...this.props}
{...this.state}
OnSearchInput={this.OnSearchInput.bind(this)}
/>

Loading…
Cancel
Save