竞赛调整

dev_auth
杨树明 5 years ago
parent 4761a7fe23
commit ab502dbaf3

@ -11,7 +11,7 @@
color:rgba(0,0,0,1); color:rgba(0,0,0,1);
} }
.pdfdownloadfont4CACFF{ .pdfdownloadfont4CACFF{
color: #4CACFF; color: #4CACFF !important;
} }
.pdfdownloadfont00CC5F{ .pdfdownloadfont00CC5F{

@ -10,7 +10,8 @@ class CompetitionContentspdfdownload extends Component{
constructor(props) { constructor(props) {
super(props) super(props)
this.state={ this.state={
data:undefined data:undefined,
teams:undefined
} }
} }
@ -19,8 +20,23 @@ class CompetitionContentspdfdownload extends Component{
let url=`/competitions/${this.props.match.params.identifier}/prize.json`; let url=`/competitions/${this.props.match.params.identifier}/prize.json`;
axios.get(url).then((response) => { axios.get(url).then((response) => {
if(response.status===200){ if(response.status===200){
let datas=response.data.teams;
if(datas.length>0){
datas.map((item,key)=>{
let lista=item.team_members;
if(lista.length>0){
console.log(lista)
lista.map((i,k)=>{
i["bank_account"]=item.bank_account;
})
}
})
}
this.setState({ this.setState({
data:response.data, data:response.data,
teams:datas,
}) })
} }
}).catch((error) => { }).catch((error) => {
@ -30,19 +46,10 @@ class CompetitionContentspdfdownload extends Component{
render() { render() {
// email_binded: true
// name: "伍逸凡"
// phone_binded: true let {data,teams}=this.state;
// professional_auth: "authed"
// real_name_auth: "authed"
// role: "队长"
let {data}=this.state;
let bank_account=[];
{data&&data.teams.map((item,key)=>{
bank_account.push(item.bank_account)
})
}
const columns = [ const columns = [
{ {
title: '角色', title: '角色',
@ -108,21 +115,20 @@ class CompetitionContentspdfdownload extends Component{
title: '开户行及银行卡号信息(队长填写)', title: '开户行及银行卡号信息(队长填写)',
key: 'idcard', key: 'idcard',
dataIndex: 'idcard', dataIndex: 'idcard',
render: (value, row, index,record) => { render: (value, record, index) => {
console.log(row) if (index === 0&&record.bank_account!=null) {
console.log(record) return {
console.log(value) children: <span>{record.bank_account.bank + record.bank_account.second_bank + record.bank_account.card_no}</span>,
const obj = { };
children: bank_account[index], }
props: {},
};
obj.props.rowSpan = 0;
return obj
}, },
}, },
]; ];
let people=[ { url: '/api/competitions/xxxxx/certificates/1/personal' },
{ url: '/api/competitions/xxxxx/certificates/2/personal' },]
return ( return (
<React.Fragment> <React.Fragment>
<Row> <Row>
@ -134,13 +140,30 @@ class CompetitionContentspdfdownload extends Component{
</Row> </Row>
<Row className={"mt30"}> <Row className={"mt30"}>
{data&&data.personal_certifications.length===0?<Col>个人证书<span className={"pdfpicture font-14"}>暂未生成</span> <span className={"ml20"}><span className={"pdfpicture font-14"}></span><a className={"pdfdownloadfont4CACFF"} onClick={()=>this.props.Competitioncallback("2")}></a></span></Col>:""} <Col>个人证书 {data&&data.personal_certifications.length===0?<span><span className={"pdfpicture font-14"}>暂未生成</span> <span className={"ml20"}><span className={"pdfpicture font-14"}></span><a className={"pdfdownloadfont4CACFF"} onClick={()=>this.props.Competitioncallback("2")}></a></span></span>:
data&&data.personal_certifications.map((item,key)=>{
return(
<span className={"mr10"} key={key}>
<img src={ getImageUrl(`images/educoder/pdfs.png`)} />
<a className={"pdfdownloadfont4CACFF ml10"} href={item.url} download=""
title="下载" mce_href="#">立即下载</a>
</span>
)
})}</Col>
</Row> </Row>
<Row className={"mt30"}> <Row className={"mt30"}>
<Col>团队证书 <Col>团队证书
{data&&data.team_certifications.length===0?<span className={"pdfpicture font-14"}>暂未生成</span> {data&&data.team_certifications.length===0?<span className={"pdfpicture font-14"}>暂未生成</span>
:<span className={"ml20"}><i className="iconfont icon-pdf"></i><a></a></span>} :data&&data.team_certifications.map((item,key)=>{
return(
<span className={"mr10"} key={key}>
<img src={ getImageUrl(`images/educoder/pdfs.png`)} />
<a className={"pdfdownloadfont4CACFF ml10"} href={item.url} download=""
title="下载" mce_href="#">立即下载</a>
</span>
)
})}
</Col> </Col>
</Row> </Row>
<Divider /> <Divider />
@ -152,12 +175,15 @@ class CompetitionContentspdfdownload extends Component{
} }
.pdfdownloadTable .ant-table-tbody > tr > td{ .pdfdownloadTable .ant-table-tbody > tr > td{
color:#666666; color:#666666;
// border-bottom: 1px solid transparent; border-bottom: 1px solid transparent;
} }
.pdfdownloadTable .ant-table-thead > tr > th, .ant-table-tbody > tr > td{
text-align: center;
}
` `
} }
</style> </style>
{data&&data.teams.map((item,key)=>{ {teams&&teams.map((item,key)=>{
return( return(
<Row className={"mt30"} key={key}> <Row className={"mt30"} key={key}>
<Col className={"pdfpicture mb20"}>{item.name}战队信息填报概况</Col> <Col className={"pdfpicture mb20"}>{item.name}战队信息填报概况</Col>

@ -438,7 +438,7 @@ class Statistics extends Component{
return( return(
<Col span={5} className={"relatives"}> <Col span={5} className={"relatives"}>
<li className="pr rankingss"> <li className="pr rankingss">
<img src="https://test-newweb.educoder.net/images/educoder/imperialcrown.png" className="huangguans mb5" /> <img src={getImageUrl(`images/educoder/imperialcrown.png`)} className="huangguans mb5" />
<a href={`/users/${item.user_login}`} className="color-dark"> <a href={`/users/${item.user_login}`} className="color-dark">
<img src={getImageUrl(`images/${item.avatar_url}`)} className={"mb10 mt5"}/> <img src={getImageUrl(`images/${item.avatar_url}`)} className={"mb10 mt5"}/>
</a> </a>

Loading…
Cancel
Save