From d615be0346dd8339c67d70f7d8018e8461c6d83e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Fri, 1 Nov 2019 17:31:24 +0800
Subject: [PATCH] =?UTF-8?q?=E7=AB=9E=E8=B5=9B=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../CompetitionContentspdf.js | 13 +-
.../CompetitionContentspdfdownload.css | 10 ++
.../CompetitionContentspdfdownload.js | 131 ++++++++++++++++--
3 files changed, 140 insertions(+), 14 deletions(-)
diff --git a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdf.js b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdf.js
index 177356400..3f059ce41 100644
--- a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdf.js
+++ b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdf.js
@@ -11,7 +11,7 @@ class CompetitionContentspdf extends Component{
constructor(props) {
super(props)
this.state={
-
+ Tabskey:"1"
}
}
@@ -20,6 +20,12 @@ class CompetitionContentspdf extends Component{
}
+ Competitioncallback=(key)=>{
+ this.setState({
+ Tabskey:key
+ })
+ }
+
render() {
@@ -27,11 +33,12 @@ class CompetitionContentspdf extends Component{
-
-
+ this.Competitioncallback(e)} activeKey={this.state.Tabskey}>
+
this.Competitioncallback(e)}
/>
diff --git a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfdownload.css b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfdownload.css
index eb41e7c05..b8d6812f1 100644
--- a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfdownload.css
+++ b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfdownload.css
@@ -9,4 +9,14 @@
.pdfpicture{
font-size:16px;
color:rgba(0,0,0,1);
+}
+.pdfdownloadfont4CACFF{
+ color: #4CACFF;
+}
+
+.pdfdownloadfont00CC5F{
+ color:#00CC5F;
+}
+.pdfdownloadfontFF6602{
+ color:#FF6602;
}
\ No newline at end of file
diff --git a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfdownload.js b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfdownload.js
index 1e4d520d4..c83cefe7f 100644
--- a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfdownload.js
+++ b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfdownload.js
@@ -1,5 +1,5 @@
import React, { Component } from 'react';
-import {Button,Layout,Row, Col,Divider} from 'antd';
+import {Button,Layout,Row, Col,Divider,Table} from 'antd';
import axios from 'axios';
import {getImageUrl} from 'educoder';
import './CompetitionContentspdfdownload.css';
@@ -16,15 +16,12 @@ class CompetitionContentspdfdownload extends Component{
componentDidMount(){
window.document.title = '竞赛';
- console.log(this.props.match.params.identifier)
let url=`/competitions/${this.props.match.params.identifier}/prize.json`;
axios.get(url).then((response) => {
if(response.status===200){
this.setState({
data:response.data,
})
-
- console.log(response.data)
}
}).catch((error) => {
console.log(error)
@@ -32,8 +29,100 @@ class CompetitionContentspdfdownload extends Component{
}
render() {
- console.log(this.props)
+
+ // email_binded: true
+ // name: "伍逸凡"
+ // phone_binded: true
+ // 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 = [
+ {
+ title: '角色',
+ dataIndex: 'type',
+ key: 'type',
+ render: (text, record) => (
+
+ {record.role}
+
+ ),
+ },
+ {
+ title: '姓名',
+ dataIndex: 'name',
+ key: 'name',
+ render: (text, record) => (
+
+ {record.name}
+
+ ),
+ },
+ {
+ title: '实名认证',
+ dataIndex: 'namecertify',
+ key: 'namecertify',
+ render: (text, record) => (
+
+ {record.real_name_auth==="authed"?已认证:record.real_name_auth==="authing"?待审核:record.real_name_auth==="not_authed"?未认证:""}
+
+ ),
+ },
+ {
+ title: '职业认证',
+ key: 'certify',
+ dataIndex: 'certify',
+ render: (text, record) => (
+
+ {record.professional_auth==="authed"?已认证:record.real_name_auth==="authing"?待审核:record.real_name_auth==="not_authed"?未认证:""}
+
+ ),
+ },
+ {
+ title: '手机绑定',
+ key: 'mobile',
+ dataIndex: 'mobile',
+ render: (text, record) => (
+
+ {record.phone_binded===true?已绑定:未绑定}
+
+ ),
+ },
+ {
+ title: '邮箱绑定',
+ key: 'mail',
+ dataIndex: 'mail',
+ render: (text, record) => (
+
+ {record.email_binded===true?已绑定:未绑定}
+
+ ),
+ },
+ {
+ title: '开户行及银行卡号信息(队长填写)',
+ key: 'idcard',
+ dataIndex: 'idcard',
+ render: (value, row, index,record) => {
+ console.log(row)
+ console.log(record)
+ console.log(value)
+ const obj = {
+ children: bank_account[index],
+ props: {},
+ };
+
+ obj.props.rowSpan = 0;
+ return obj
+ },
+ },
+ ];
+
return (
@@ -45,19 +134,39 @@ class CompetitionContentspdfdownload extends Component{
- {data&&data.personal_certifications.length===0?个人证书:暂未生成 原因:还未认证个人信息,立即查看:""}
+ {data&&data.personal_certifications.length===0?个人证书:暂未生成 原因:还未认证个人信息,this.props.Competitioncallback("2")}>立即查看:""}
- 团队证书: 暂未生成
- 立即下载
+ 团队证书:
+ {data&&data.team_certifications.length===0?暂未生成
+ :立即下载}
+
+ {data&&data.teams.map((item,key)=>{
+ return(
+
+ {item.name}战队信息填报概况
-
- XXXXXX战队信息填报概况
-
+