dev_sync_trustie
杨树明 5 years ago
parent e010ed0a89
commit 46567871bd

@ -1,6 +1,6 @@
import React, { Component } from 'react';
import { Link } from 'react-router-dom';
import { Menu, Icon, List, Avatar,Row, Col,Tag,Pagination} from 'antd';
import { Menu, Icon, List, Avatar,Row, Col,Tag,Pagination,Alert} from 'antd';
import {getImageUrl} from 'educoder';
import axios from 'axios';
import './Competitionsindex.css';
@ -78,8 +78,7 @@ class CompetitionsIndex extends Component{
}
render() {
let {datas,page,count}=this.state;
admin: true
business: false
console.log(this.props.current_user&&this.props.current_user.business)
return (
<div>
@ -133,7 +132,11 @@ class CompetitionsIndex extends Component{
dataSource={datas&&datas}
renderItem={(item,key) => (
<div>
<div className={"CompetitionsList"} >
{item.competition_status==="nearly_published"?
this.props.current_user&&this.props.current_user.admin===true?"":this.props.current_user&&this.props.current_user.business===true?"":<div className={"CompetitionsListzhezhao"}>即将发布 敬请期待</div>:""}
{/*<div className={"CompetitionsListzhezhao"}>即将发布 敬请期待</div>*/}
{item.description===null||item.description===undefined||item.description===""?<style>
{
`
@ -181,7 +184,7 @@ class CompetitionsIndex extends Component{
>
<List.Item.Meta
title={<a className={item.competition_status==="ended"?"endedfont":item.competition_status==="nearly_published"?
this.props.current_user&&this.props.current_user.business===true?"":this.props.current_user&&this.props.current_user.admin===true?"":"endedfont":""}>
this.props.current_user&&this.props.current_user.admin===true?"":this.props.current_user&&this.props.current_user.business===true?"":"endedfont":""}>
<span className={"competitionstitles"}
onClick={()=>this.setcompetitonurl(item.competition_status==="ended"?null:item.competition_status==="nearly_published"? this.props.current_user&&this.props.current_user.business===true?`/newcompetitions/${item.identifier}/common_header`:this.props.current_user&&this.props.current_user.admin===true?`/newcompetitions/${item.identifier}/common_header`:null:item.competition_status==="progressing"?`/newcompetitions/${item.identifier}/common_header`:null)}
>{item.name}</span><span>{item.sub_title===null?"":<Tag className="competitionsrelative" color="#87d068">{
@ -199,7 +202,7 @@ class CompetitionsIndex extends Component{
}
/>}
{datas===undefined?'none':datas.task_count >20 ?<div className="mb40 edu-txt-center padding20-30"
{datas===undefined?"":datas.task_count >20 ?<div className="mb40 edu-txt-center padding20-30"
>
<Pagination

@ -117,14 +117,20 @@
.endedfont{
color:#000 !important;
}
.zhezhaos{
height: 200px;
overflow: hidden;
position: relative;
border: 1px solid rgb(235, 237, 240);
border-radius: 2px;
padding: 48px;
.CompetitionsListzhezhao{
position: absolute;
top: 0px;
left: 0px;
width: 1206px;
height: 100%;
z-index: 10000;
display: none;
background: rgba(51, 51, 51,0.7);
text-align: center;
background: rgb(250, 250, 250);
line-height: 170px;
color: #fff;
font-size: 50px;
}
.CompetitionsList:hover .CompetitionsListzhezhao{
display: block;
}

@ -1,5 +1,5 @@
import React, { Component } from 'react';
import { Breadcrumb,Layout,Table, Divider, Tag,Badge} from 'antd';
import { Breadcrumb,Layout,Table, Divider, Tag,Badge,Tooltip} from 'antd';
import axios from 'axios';
@ -156,13 +156,19 @@ class Competitionteams extends Component{
title: '被fork发布的学习人数',
dataIndex: 'forked_myshixun_count',
key: 'forked_myshixun_count',
render: (text, record) => <div className={record.creator==="合计:"?"teamsLayoucolor-orange":""}>{text}</div>,
render: (text, record) =>
<Tooltip placement="bottom" title={"fork该实训产生的新实训学习总人数"}>
<div className={record.creator==="合计:"?"teamsLayoucolor-orange":""}>{text}</div>
</Tooltip>,
},
{
title: '有效作品数',
dataIndex: 'valid_count',
key: 'valid_count',
render: (text, record) => <div className={record.creator==="合计:"?"teamsLayoucolor-orange":""}>{text}</div>,
render: (text, record) =>
<Tooltip placement="bottom" title={"至少完成了1个关卡"}>
<div className={record.creator==="合计:"?"teamsLayoucolor-orange":""}>{text}</div>
</Tooltip>,
},
{
title: '应用值',
@ -195,13 +201,19 @@ class Competitionteams extends Component{
title: '被fork发布的学习人数',
dataIndex: 'shixun_homework_count',
key: 'shixun_homework_count',
render: (text, record) => <div className={record.creator==="合计:"?"teamsLayoucolor-orange":""}>{text}</div>,
render: (text, record) =>
<Tooltip placement="bottom" title={"fork该实训产生的新实训学习总人数"}>
<div className={record.creator==="合计:"?"teamsLayoucolor-orange":""}>{text}</div>
</Tooltip>,
},
{
title: '有效作品数',
dataIndex: 'valid_count',
key: 'valid_count',
render: (text, record) => <div className={record.creator==="合计:"?"teamsLayoucolor-orange":""}>{text}</div>,
render: (text, record) =>
<Tooltip placement="bottom" title={"至少完成了1个关卡"}>
<div className={record.creator==="合计:"?"teamsLayoucolor-orange":""}>{text}</div>
</Tooltip>,
},
{
title: '应用值',

Loading…
Cancel
Save