From d9a3511eccee59ecf58426a61a6fc08615a5b430 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Thu, 31 Oct 2019 09:47:53 +0800
Subject: [PATCH 04/14] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../CompetitionContentspdfpeopledata.js | 4 +-
.../mycompetotionchild.css | 74 +++++++++++++++++++
2 files changed, 76 insertions(+), 2 deletions(-)
create mode 100644 public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/mycompetotionchild.css
diff --git a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfpeopledata.js b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfpeopledata.js
index 45a5ab939..69ab5413b 100644
--- a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfpeopledata.js
+++ b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfpeopledata.js
@@ -22,9 +22,9 @@ class CompetitionContentspdfpeopledata extends Component{
return (
)
}
}
-export default CompetitionContentspdfpeopledata;
\ No newline at end of file
+export default CompetitionContentspdfpeopledata;
diff --git a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/mycompetotionchild.css b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/mycompetotionchild.css
new file mode 100644
index 000000000..7f9652f44
--- /dev/null
+++ b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/mycompetotionchild.css
@@ -0,0 +1,74 @@
+/*垂直布局
+
+ 一
+ 二
+ 三
+*/
+.flexdirectionjust{
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+}
+
+
+.directstwebkitflex{
+ display: flex;
+ display: -webkit-flex;
+ flex-direction: column;
+ align-items: center;
+}
+
+.diredisplayitflex{
+ display: flex;
+ display: -webkit-flex;
+ align-items: center;
+}
+/*垂直布局*/
+/*靠左侧
+一 二 三 四 五 六 七 八
+*/
+.flexdirection{
+ display: flex;
+ flex-direction:row;
+}
+
+.flexdirections{
+ display: flex;
+ flex-direction:initial;
+}
+/*靠左侧
+*/
+
+
+
+ /*靠右侧八 七 六 五 四 三 二 一*/
+ .flexdirectionss{
+ display: flex;
+ flex-direction:row-reverse;
+ }
+
+
+/*垂直布局
+一
+二
+三
+四
+*/
+.flexdidirectionss{
+ display: flex;
+ flex-direction:column;
+}
+
+/*垂直布局
+四
+三
+二
+一
+*/
+ .flexdidireverses{
+ display: flex;
+ flex-direction:column-reverse;
+ }
+
+
From 6c987ce6f9193e197710d0dc77de3b9b21338cc1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Thu, 31 Oct 2019 10:25:34 +0800
Subject: [PATCH 05/14] =?UTF-8?q?=E7=AB=9E=E8=B5=9B=E8=AF=81=E4=B9=A6?=
=?UTF-8?q?=E4=B8=8B=E8=BD=BDstart?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../CompetitionContentspdfdownload.css | 12 ++++++++
.../CompetitionContentspdfdownload.js | 30 ++++++++++++++++---
2 files changed, 38 insertions(+), 4 deletions(-)
create mode 100644 public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfdownload.css
diff --git a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfdownload.css b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfdownload.css
new file mode 100644
index 000000000..eb41e7c05
--- /dev/null
+++ b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfdownload.css
@@ -0,0 +1,12 @@
+.pdfdownload{
+ max-width: 791px;
+ height: 40px;
+ background: rgba(249,249,249,1);
+ line-height: 40px;
+ padding-left: 15px;
+}
+
+.pdfpicture{
+ font-size:16px;
+ color:rgba(0,0,0,1);
+}
\ 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 fc461bcb2..cf0482ff9 100644
--- a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfdownload.js
+++ b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfdownload.js
@@ -1,7 +1,8 @@
import React, { Component } from 'react';
-import {Button,Layout} from 'antd';
+import {Button,Layout,Row, Col,Divider} from 'antd';
import axios from 'axios';
import {getImageUrl} from 'educoder';
+import './CompetitionContentspdfdownload.css';
// import NoneData from "../../../courses/shixunHomework/shixunHomework";
@@ -22,11 +23,32 @@ class CompetitionContentspdfdownload extends Component{
console.log(this.props)
return (
+
)
}
}
From 8d71763adc92bb208cbc6fa05ad93508f7c88303 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Thu, 31 Oct 2019 16:23:00 +0800
Subject: [PATCH 06/14] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=AB=9E=E8=B5=9B?=
=?UTF-8?q?=E9=AA=8C=E8=AF=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../CompetitionContentspdfpeopledata.js | 101 +++++++++++++++-
.../mycompetotionchild.css | 109 ++++++++++++++++++
2 files changed, 204 insertions(+), 6 deletions(-)
diff --git a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfpeopledata.js b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfpeopledata.js
index 69ab5413b..9b5f13050 100644
--- a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfpeopledata.js
+++ b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfpeopledata.js
@@ -1,8 +1,8 @@
import React, { Component } from 'react';
-import {Button,Layout} from 'antd';
+import {Button,Layout,Input} from 'antd';
import axios from 'axios';
import {getImageUrl} from 'educoder';
-// import NoneData from "../../../courses/shixunHomework/shixunHomework";
+import mycompetotionchild from './mycompetotionchild.css';
class CompetitionContentspdfpeopledata extends Component{
constructor(props) {
@@ -14,15 +14,104 @@ class CompetitionContentspdfpeopledata extends Component{
componentDidMount(){
window.document.title = '竞赛';
- console.log(this.props.match.params.identifier)
}
render() {
- console.log(this.props)
return (
-
- 345345
+
+
+
*实名信息
+
通过实名认证后才能获得证书
+
立即认证
+
+
+
姓名:
+
胡志勇
已认证
待审核!
撤销认证
+
+
+
+
+
+
*职业信息
+
通过职业认证后才能获得证书
+
立即认证
+
+
+
+
+
+
+
+
+
+
+
Email:
+
163@163.com
+
更换
+
+
+
+
签/领/开户行及银行卡号
+
为保障奖金的及时发放,请队长如实填写你名下的银行卡信息
+
+
+
+
+
+
+
+
+
+
+
+
)
}
diff --git a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/mycompetotionchild.css b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/mycompetotionchild.css
index 7f9652f44..bf73dc59d 100644
--- a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/mycompetotionchild.css
+++ b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/mycompetotionchild.css
@@ -71,4 +71,113 @@
flex-direction:column-reverse;
}
+.fontcolorsysl{
+ color:#FF0000
+}
+.fontcolorsyslhei{
+ color:#000000
+}
+.fontcolorsyslhui{
+ color:#888888
+}
+.fontcolorsyslhui1{
+ color:#666666;
+}
+.fontcolorsysllan{
+ color:#4CACFF
+}
+.fontcolorsysljin{
+ color:#DD7600
+}
+
+.w200{
+ width: 200px;
+}
+.w64{
+ width: 64px;
+}
+
+.w60{
+ width: 60px;
+}
+.w98{
+ width: 98px;
+}
+
+.myysllineheight{
+ line-height: 40px;
+}
+.myyslminwidth{
+ min-width: 60px;
+}
+.myyslminwidth276{
+ width: 276px;
+}
+
+.buttongo{
+ background: #E7E7E7;
+ border: 1px solid #E7E7E7;
+ width: 60px;
+ height: 30px;
+ border-radius: 4px;
+ color: #999999;
+ font-size: 16px;
+}
+
+.buttongo2{
+ background: #4CACFF;
+ border: 1px solid #4CACFF;
+ width: 60px;
+ height: 30px;
+ border-radius: 4px;
+ color: #FFFFFF;
+ font-size: 16px;
+}
+
+.fontwenzi{
+ text-align: center;
+ line-height: 30px;
+}
+
+.mt17{
+ margin-top: 17px;
+}
+.mt36{
+ margin-top: 36px;
+}
+.mt23{
+ margin-top: 23px;
+}
+.mt19{
+ margin-top: 19px;
+}
+.mt23{
+ margin-top: 23px;
+}
+.mt34{
+ margin-top: 34px;
+}
+.ml11{
+ margin-left: 11px;
+}
+.ml38{
+ margin-left: 38px;
+}
+.ml7{
+ margin-left: 7px;
+}
+
+.colorgreenlight{
+ color:#6EC76E
+}
+
+.colorgreenorg{
+ color: #FF7300;
+}
+
+.borcolors{
+ border: 1px solid #4CACFF;
+
+ text-align: center;
+}
From 5418fb7ae1fc05768d01f0abeddfcdce2f552cf3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Fri, 1 Nov 2019 10:26:52 +0800
Subject: [PATCH 07/14] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/react/src/modules/competition/RegistrationSearch.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/public/react/src/modules/competition/RegistrationSearch.js b/public/react/src/modules/competition/RegistrationSearch.js
index 02d4fa861..a1f0b9ac3 100644
--- a/public/react/src/modules/competition/RegistrationSearch.js
+++ b/public/react/src/modules/competition/RegistrationSearch.js
@@ -54,11 +54,11 @@ class RegistrationSearch extends React.Component {
/>
战队总数:
Date: Fri, 1 Nov 2019 11:19:27 +0800
Subject: [PATCH 08/14] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Competitioncommon/CompetitionCommon.js | 42 ++++++++++++++-----
1 file changed, 31 insertions(+), 11 deletions(-)
mode change 100644 => 100755 public/react/src/modules/competitions/Competitioncommon/CompetitionCommon.js
diff --git a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommon.js b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommon.js
old mode 100644
new mode 100755
index d5461b627..e92dd66cc
--- a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommon.js
+++ b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommon.js
@@ -3,9 +3,11 @@ import { Breadcrumb,Layout,Table, Divider, Tag,Badge,Row, Col,Button, Menu, Icon
import { Link } from 'react-router-dom';
import axios from 'axios';
import {markdownToHTML,getImageUrl} from 'educoder';
-import CompetitionContents from './CompetitionContents';
-import CompetitionContentsChart from './CompetitionContentsChart';
-import CompetitionContentsMd from './CompetitionContentsMd';
+import CompetitionContents from './CompetitionCommonChild/CompetitionContents';
+import CompetitionContentsChart from './CompetitionCommonChild/CompetitionContentsChart';
+import CompetitionContentsMd from './CompetitionCommonChild/CompetitionContentsMd';
+import CompetitionContentspdf from './CompetitionCommonChild/CompetitionContentspdf';
+import NoneData from "../../courses/shixunHomework/shixunHomework";
import './CompetitionCommon.css';
@@ -252,6 +254,13 @@ class CompetitionCommon extends Component{
}
+ isdownloadpdf=()=>{
+
+ this.setState({
+ isdownloadpdftype:true
+ })
+
+ }
render() {
let {data,thiskeys,Competitionedittype}=this.state;
@@ -264,11 +273,10 @@ class CompetitionCommon extends Component{
-
+
{data.competition_status==="nearly_published"?
- data && data.permission.editable === true ? "" :
- 即将发布 敬请期待
: ""}
+ data&&data.permission.editable===true?"":即将发布 敬请期待
:""}
@@ -334,7 +342,7 @@ class CompetitionCommon extends Component{
:data.enroll_end===true?:
data.competition_status==="progressing"?
@@ -398,4 +418,4 @@ class CompetitionCommon extends Component{
)
}
}
-export default CompetitionCommon;
+export default CompetitionCommon;
\ No newline at end of file
From 3a0bf1ab44ebe83e3e20b1bad4b8127c9d9b49c9 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 11:45:51 +0800
Subject: [PATCH 09/14] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Competitioncommon/CompetitionCommon.js | 335 +++++++++---------
1 file changed, 177 insertions(+), 158 deletions(-)
diff --git a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommon.js b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommon.js
index d5461b627..52060ada1 100644
--- a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommon.js
+++ b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommon.js
@@ -3,9 +3,10 @@ import { Breadcrumb,Layout,Table, Divider, Tag,Badge,Row, Col,Button, Menu, Icon
import { Link } from 'react-router-dom';
import axios from 'axios';
import {markdownToHTML,getImageUrl} from 'educoder';
-import CompetitionContents from './CompetitionContents';
-import CompetitionContentsChart from './CompetitionContentsChart';
-import CompetitionContentsMd from './CompetitionContentsMd';
+import CompetitionContents from './CompetitionCommonChild/CompetitionContents';
+import CompetitionContentsChart from './CompetitionCommonChild/CompetitionContentsChart';
+import CompetitionContentsMd from './CompetitionCommonChild/CompetitionContentsMd';
+import CompetitionContentspdf from './CompetitionCommonChild/CompetitionContentspdf';
import './CompetitionCommon.css';
@@ -15,14 +16,14 @@ class CompetitionCommon extends Component{
constructor(props) {
super(props)
this.state={
- data:undefined,
- bannerdata:undefined,
- module_type:undefined,
- mdContentdata:undefined,
- chart_rules:undefined,
- Competitionedittype:false,
- chartdata:undefined,
- has_url:false
+ data:undefined,
+ bannerdata:undefined,
+ module_type:undefined,
+ mdContentdata:undefined,
+ chart_rules:undefined,
+ Competitionedittype:false,
+ chartdata:undefined,
+ has_url:false
}
}
@@ -52,8 +53,8 @@ class CompetitionCommon extends Component{
axios.get(url).then((response) => {
if(response.status===200){
this.setState({
- data:response.data,
- thiskeys:menuid===undefined||menuid===""?response.data.competition_modules[0].id:menuid
+ data:response.data,
+ thiskeys:menuid===undefined||menuid===""?response.data.competition_modules[0].id:menuid
})
if(menuid===undefined||menuid===""){
this.getrightdata(
@@ -80,27 +81,27 @@ class CompetitionCommon extends Component{
console.log(error)
})
- if(this.props.user&&this.props.user.login!= ""){
- const zul = `/competitions/${this.props.match.params.identifier}/competition_staff.json`;
- axios.get((zul)).then((result) => {
- if (result) {
- if (result.data) {
- this.setState({
- signupdata:result.data
- })
- }
- }
- }).catch((error) => {
- //console.log(error);
- })
- }
+ if(this.props.user&&this.props.user.login!= ""){
+ const zul = `/competitions/${this.props.match.params.identifier}/competition_staff.json`;
+ axios.get((zul)).then((result) => {
+ if (result) {
+ if (result.data) {
+ this.setState({
+ signupdata:result.data
+ })
+ }
+ }
+ }).catch((error) => {
+ //console.log(error);
+ })
+ }
}
getrightdatas=(e)=>{
- let keys=parseInt(e.key);
- this.getlistdata(keys)
- this.props.history.replace(`?menu=${keys}`);
+ let keys=parseInt(e.key);
+ this.getlistdata(keys)
+ this.props.history.replace(`?menu=${keys}`);
}
getlistdata=(keys,listkey)=>{
@@ -127,7 +128,7 @@ class CompetitionCommon extends Component{
if(response.status===200){
this.setState({
chart_rules:response.data,
- tabkey:tabkey===undefined?response.data.stages[0].id===null?"0":`${response.data.stages[0].id}`:tabkey
+ tabkey:tabkey===undefined?response.data.stages[0].id===null?"0":`${response.data.stages[0].id}`:tabkey
})
@@ -142,10 +143,10 @@ class CompetitionCommon extends Component{
// if(typeid==="enroll"){
// this.props.history.replace(`/competitions/${this.props.match.params.identifier}/enroll`);
- // return
+ // return
// }
- this.getnewchartdata(typeid,listkey)
+ this.getnewchartdata(typeid,listkey)
if(has_url===false){
let url=`${module_url}`;
@@ -167,11 +168,11 @@ class CompetitionCommon extends Component{
console.log(error)
})
}else{
- if(module_url.substring(0,7)=='http://'||module_url.substring(0,8)=='https://') {
+ if(module_url.substring(0,7)=='http://'||module_url.substring(0,8)=='https://') {
// window.location.href= module_url
- window.open(module_url)
+ window.open(module_url)
}else{
- window.open(`https://${module_url}`)
+ window.open(`https://${module_url}`)
// window.location.href=;
}
return
@@ -186,9 +187,9 @@ class CompetitionCommon extends Component{
}
Competitionedit=()=>{
- this.setState({
- Competitionedittype:true
- })
+ this.setState({
+ Competitionedittype:true
+ })
}
hideCompetitionedit=()=>{
@@ -215,10 +216,10 @@ class CompetitionCommon extends Component{
if(data.member_of_course===true){
this.props.history.replace(`/courses/${data.course_id}`);
}else{
- // 以学生身份调用加入课堂 进入课堂首页
+ // 以学生身份调用加入课堂 进入课堂首页
let url="/courses/apply_to_join_course.json"
axios.post(url, {
- invite_code:data.invite_code,
+ invite_code:data.invite_code,
student:1
}
).then((response) => {
@@ -234,7 +235,7 @@ class CompetitionCommon extends Component{
}
Competitioncallback=(key)=>{
- this.setState({
+ this.setState({
tabkey:key
})
let url=`/competitions/${this.props.match.params.identifier}/charts.json`;
@@ -252,150 +253,168 @@ class CompetitionCommon extends Component{
}
+ isdownloadpdf=()=>{
+
+ this.setState({
+ isdownloadpdftype:true
+ })
+
+ }
render() {
let {data,thiskeys,Competitionedittype}=this.state;
return (
data===undefined?"":
-
- 在线竞赛
- {data&&data.name}
-
-
-
-
-
- {data.competition_status==="nearly_published"?
- data && data.permission.editable === true ? "" :
- 即将发布 敬请期待
: ""}
-
-
-
-
-
+
+ 在线竞赛
+ {data&&data.name}
+
+
+
+
+
+ {data.competition_status==="nearly_published"?
+ data&&data.permission.editable===true?"":即将发布 敬请期待
:""}
+
+
+
+
+
- 15?"competitionbannerdiv mt30":"competitionbannerdiv mt30"}>{data&&data.name}
+ 15?"competitionbannerdiv mt30":"competitionbannerdiv mt30"}>{data&&data.name}
-
- 竞赛时间:{data&&data.start_time}~{data&&data.end_time}
- {/**/}
+
+ 竞赛时间:{data&&data.start_time}~{data&&data.end_time}
+ {/**/}
+
+
+
+
+
+ 奖金
+
+
+ 浏览数
+
+ 报名数
+
+
-
-
-
- 奖金
-
-
- 浏览数
-
-
- 报名数
-
-
-
-
-
- ¥{data&&data.bonus}
-
-
- {data.competition_status==="nearly_published"?"--":data&&data.visits_count}
-
-
- this.gotocourse(`/competitions/${this.props.match.params.identifier}/enroll`)}>{data.competition_status==="nearly_published"?"--":data&&data.member_count}
-
-
+
+
+ ¥{data&&data.bonus}
+
+
+ {data.competition_status==="nearly_published"?"--":data&&data.visits_count}
+
+ this.gotocourse(`/competitions/${this.props.match.params.identifier}/enroll`)}>{data.competition_status==="nearly_published"?"--":data&&data.member_count}
+
+
+
- {data.competition_status==="ended"?::}
-
- {data.competition_status==="ended"?
- :data.enroll_end===true?:
- data.competition_status==="progressing"?
-
-
-
-
-
-
-
-
- {this.state.module_type==="chart"?Competitionedittype===false?this.Competitionedit()}
- Competitioncallback={(e)=>this.Competitioncallback(e)}
- />:"":Competitionedittype===false?this.Competitionedit()}
- {...this.props}
- {...this.state}
- />:""}
- {/**/}
- {Competitionedittype===true?this.hideCompetitionedit()}
- getlistdata={(keys,listkey)=>this.getlistdata(keys,listkey)}
- Competitioncallback={(e)=>this.Competitioncallback(e)}
- {...this.props}
- {...this.state}
- />:""}
-
-
-
+ {data&&data.enroll_end_time===null?"":`报名截止时间:${data&&data.enroll_end_time}`}
+
+
+
+
+
+
+
+
+
+
+
+ {this.state.isdownloadpdftype===true?"":
+ {this.state.module_type==="chart"?Competitionedittype===false?this.Competitionedit()}
+ Competitioncallback={(e)=>this.Competitioncallback(e)}
+ />:"":Competitionedittype===false?this.Competitionedit()}
+ {...this.props}
+ {...this.state}
+ />:""}
+ {/**/}
+ {Competitionedittype===true?this.hideCompetitionedit()}
+ getlistdata={(keys,listkey)=>this.getlistdata(keys,listkey)}
+ Competitioncallback={(e)=>this.Competitioncallback(e)}
+ {...this.props}
+ {...this.state}
+ />:""}
+ }
+
+ {this.state.isdownloadpdftype===true?
+
+ :""}
+
)
}
}
-export default CompetitionCommon;
+export default CompetitionCommon;
\ No newline at end of file
From aa63b997dddfe1455d24cf2cf6984587d4b55e93 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 16:01:33 +0800
Subject: [PATCH 10/14] =?UTF-8?q?=E8=8E=B7=E5=A5=96=E8=AF=81=E4=B9=A6?=
=?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Competitioncommon/CompetitionCommon.js | 22 +++++++------------
.../CompetitionContentspdfdownload.js | 18 ++++++++++++---
2 files changed, 23 insertions(+), 17 deletions(-)
diff --git a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommon.js b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommon.js
index 52060ada1..43a41694c 100644
--- a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommon.js
+++ b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommon.js
@@ -253,15 +253,9 @@ class CompetitionCommon extends Component{
}
- isdownloadpdf=()=>{
- this.setState({
- isdownloadpdftype:true
- })
-
- }
render() {
- let {data,thiskeys,Competitionedittype}=this.state;
+ let {data,module_type,Competitionedittype}=this.state;
return (
data===undefined?"":
@@ -373,14 +367,14 @@ class CompetitionCommon extends Component{
})}
-
+ {/*
*/}
- {this.state.isdownloadpdftype===true?"":
+ {module_type==="certificate"?"":
{this.state.module_type==="chart"?Competitionedittype===false?:""}
}
- {this.state.isdownloadpdftype===true?
+ {module_type==="certificate"?
{
+ if(response.status===200){
+ this.setState({
+ data:response.data,
+ })
+
+ console.log(response.data)
+ }
+ }).catch((error) => {
+ console.log(error)
+ })
}
render() {
console.log(this.props)
-
+ let {data}=this.state;
return (
@@ -33,7 +45,7 @@ class CompetitionContentspdfdownload extends Component{
- 个人证书: 暂未生成 原因:还未认证个人信息,立即认证
+ {data&&data.personal_certifications.length===0?个人证书:暂未生成 原因:还未认证个人信息,立即查看:""}
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 11/14] =?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战队信息填报概况
-
+
+
+ )
+ })
+ }
From b7bedb5da85463d2f9e9c233dba58a571b30f334 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Fri, 1 Nov 2019 20:59:09 +0800
Subject: [PATCH 12/14] =?UTF-8?q?=E7=AB=9E=E8=B5=9B=E4=B8=AA=E4=BA=BA?=
=?UTF-8?q?=E4=BF=A1=E6=81=AF=E5=AE=8C=E5=96=84=E5=AE=9E=E7=8E=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../CompetitionContentspdfpeopledata.js | 799 ++++++++++++++++--
.../mycompetotionchild.css | 118 ++-
2 files changed, 866 insertions(+), 51 deletions(-)
diff --git a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfpeopledata.js b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfpeopledata.js
index 9b5f13050..906c4a7bb 100644
--- a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfpeopledata.js
+++ b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfpeopledata.js
@@ -1,119 +1,820 @@
import React, { Component } from 'react';
-import {Button,Layout,Input} from 'antd';
+import {Button, Layout, Input, Form} from 'antd';
import axios from 'axios';
import {getImageUrl} from 'educoder';
import mycompetotionchild from './mycompetotionchild.css';
+import {getHiddenName} from "../../../../user/account/AccountBasicEdit";
+import '../../../../courses/css/Courses.css'
+import RealNameCertificationModal from "../../../../user/modal/RealNameCertificationModal";
+export const identityMap = {"teacher": "教师", "student": "学生", "professional": "专业人士"}
class CompetitionContentspdfpeopledata extends Component{
constructor(props) {
super(props)
- this.state={
-
+ this.state = {
+ basicInfo: {},
+ updating: '',
+ secondsFlag: false,
+ seconds: 60,
+ phonebool: false,
+ emailbool: false,
+ formationdata: [],
+ bank_account_editable: false,
+ leader: false,
+ bank_account: undefined,
+ certification: 1
}
}
componentDidMount(){
window.document.title = '竞赛';
+ console.log("获取用户信息");
+ console.log(this.props);
+ this.getdata();
+ this.GetawardinformationAPI();
}
- render() {
+ GetawardinformationAPI = () => {
+ let url = `/competitions/${this.props.match.params.identifier}/prize.json`;
+ axios.get(url).then((result) => {
+ if (result.data) {
+ this.setState({
+ formationdata: result.data.formationdata,
+ bank_account_editable: result.data.bank_account_editable, //队长是否可以编辑
+ leader: result.data.leader, //是否是队长
+ bank_account: result.data.bank_account, //队长银行卡号信息
+ })
+ }
+ }).catch((error) => {
+ console.log(error);
+ })
+ }
+
+
+ getdata = () => {
+ let url = `/users/accounts/${this.props.current_user.login}.json`;
+ axios.get(url).then((result) => {
+ if (result.data) {
+ // if(result.data && result.data.base_info_completed == false){
+ // this.props.history.push(`/account/profile/edit`);
+ // }
+ // "authentication": "uncertified", // "uncertified" | "applying" | "certified"
+ this.setState({
+ basicInfo: Object.assign({}, {...result.data}, {
+ avatar_url: `${result.data.avatar_url}`,
+ gender: result.data.gender == null || result.data.gender == undefined ? 0 : result.data.gender
+ })
+ })
+ }
+ }).catch((error) => {
+ console.log(error);
+ })
+ };
+ // 绑定手机
+ onPhoneSubmit = () => {
+ this.props.form.validateFieldsAndScroll((err, values) => {
+ if (!err) {
+ let {login} = this.props.current_user;
+ let reg = /^1\d{10}$/;
+ if (reg.test(values.phone)) {
+ let url = `/users/accounts/${login}/phone_bind.json`
+ axios.post((url), {
+ phone: values.phone,
+ code: values.phoneValidateCode
+ }).then((result) => {
+ if (result) {
+ this.props.showNotification("手机号码绑定成功!");
+ this.setState({
+ phonebool: false
+ })
+ this.getdata();
+ }
+ }).catch((error) => {
+ console.log(error);
+ })
+ } else {
+ this.props.showNotification("请输入有效的11位手机号码");
+ }
+ }
+ })
+ }
+ // 绑定邮箱
+ onEmailSubmit = () => {
+ this.props.form.validateFieldsAndScroll((err, values) => {
+ if (!err) {
+ let {login} = this.props.current_user;
+ let reg = /^[a-zA-Z0-9]+([.\-_\\]*[a-zA-Z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$/;
+ if (reg.test(values.email)) {
+ let url = `/users/accounts/${login}/email_bind.json`
+ axios.post((url), {
+ email: values.email,
+ code: values.emailValidateCode
+ }).then((result) => {
+ if (result) {
+ this.props.showNotification("邮箱地址绑定成功!");
+ this.setState({
+ updating: ''
+ })
+ this.getdata();
+ }
+ }).catch((error) => {
+ console.log(error);
+ })
+ } else {
+ this.props.showNotification("请输入正确的邮箱地址");
+ }
+ }
+ })
+ }
+ //取消编辑
+ hideUpdating = (i) => {
+ if (i === 1) {
+ this.setState({
+ phonebool: false
+ })
+ } else if (i === 2) {
+ this.setState({
+ emailbool: false
+ })
+
+ } else if (i === 3) {
+
+ }
+
+ }
+
+ // 获取验证码
+ getCode = (index) => {
+ let url = `/accounts/get_verification_code.json`
+ let login = '';
+ let values = this.props.form.getFieldsValue();
+ if (index == 3) {
+ //绑定手机号码
+ login = values.phone;
+ let reg = /^1\d{10}$/;
+ if (reg.test(login) == false) {
+ this.props.showNotification(`请先输入正确的手机号码`);
+ return;
+ }
+ } else if (index == 4) {
+ // 绑定邮箱
+ login = values.email;
+ let reg = /^[a-zA-Z0-9]+([.\-_\\]*[a-zA-Z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$/;
+ if (reg.test(login) == false) {
+ this.props.showNotification(`请先输入正确的邮箱地址`);
+ return;
+ }
+ }
+ let type = index;
+ if (!login) {
+ this.props.showNotification(`请先输入${index == 3 ? "手机号码" : "邮箱地址"}`);
+ return;
+ }
+ axios.get((url), {
+ params: {
+ login, type
+ }
+ }).then((result) => {
+ if (result) {
+ // 倒计时
+ this.setState({
+ secondsFlag: true
+ })
+ this.remainTime();
+ }
+ }).catch((error) => {
+ console.log(error);
+ })
+ }
+
+ // 获取验证码倒计时
+ remainTime = () => {
+ this.setState({
+ seconds: 60
+ })
+ this.timer = setInterval(() => {
+ let {seconds} = this.state;
+ let s = parseInt(seconds) - 1;
+ if (s > -1) {
+ this.setState({
+ seconds: s
+ })
+ } else {
+ this.setState({
+ secondsFlag: false
+ })
+ clearInterval(this.timer);
+ }
+ }, 1000)
+ }
+
+ phonebools = () => {
+ this.setState({
+ phonebool: true
+ })
+ }
+
+ emailbools = () => {
+ console.log("点击了邮箱");
+ this.setState({
+ emailbool: true
+ })
+ }
+
+ //立即认证
+ checkBasicInfo = (index) => {
+ if (this.state.basicInfo.base_info_completed == true) {
+ this.showRealNameCertificationModal(index)
+ } else {
+ this.props.confirm({
+ okText: `立即完善`,
+ content: `请先完善基本信息`,
+ onOk: () => {
+ this.props.history.push('/account/profile/edit')
+ }
+ })
+ }
+
+ }
+ showRealNameCertificationModal = (index) => {
+ this.setState({
+ certification: index,
+ }, () => {
+ if (index == 1) {
+ this.realNameCertificationModal1.setVisible(true)
+ } else if (index == 2) {
+ this.realNameCertificationModal2.setVisible(true)
+ }
+ })
+ }
+ //绑定银行确认
+ yhBankstrue = () => {
+ this.props.form.validateFieldsAndScroll((err, values) => {
+ if (!err) {
+ let url = `/competitions/${this.props.match.params.identifier}/prize_leader_account.json`;
+ axios.patch(url, {
+ bank: values.openingbank,
+ second_bank: values.subbranchs,
+ card_no: values.subbranch
+ })
+ .then((result) => {
+ try {
+ if (result.data.status == 0) {
+ // console.log(JSON.stringify(result));
+ this.props.showNotification(`提交成功成功`);
+ this.getdata();
+ this.GetawardinformationAPI();
+ }
+ } catch (e) {
+
+ }
+
+ }).catch((error) => {
+ console.log(error);
+ })
+ }
+ })
+
+ }
+ //撤销认证
+ Cancellationofapplication = (index) => {
+ let url = ""
+ if (index === 1) {
+ url = `/users/accounts/${this.props.user.user_id}/authentication_apply.json`;
+ } else if (index === 2) {
+ url = `/users/accounts/${this.props.user.user_id}/professional_auth_apply.json`;
+ }
+ axios.delete(url)
+ .then((response) => {
+ try {
+ if (response.data.status == 0) {
+ if (index === 1) {
+ this.props.showNotification('撤销实名认证成功')
+ } else if (index === 2) {
+ this.props.showNotification('撤销职业认证成功')
+ }
+
+
+ }
+ } catch (e) {
+
+ }
+
+ })
+ .catch(function (error) {
+ console.log(error);
+ });
+ }
+
+
+ render() {
+ const {getFieldDecorator} = this.props.form;
+ const {updating, seconds, secondsFlag, basicInfo, phonebool, emailbool, certification, formationdata, bank_account_editable, leader, bank_account} = this.state
+ console.log(emailbool);
return (
+ {this.state.certification === 1 ?
this.realNameCertificationModal1 = form}
+ certification={certification}
+ > : ""}
+
+ {this.state.certification === 2 ?
this.realNameCertificationModal2 = form}
+ certification={certification}
+ > : ""}
*实名信息
-
通过实名认证后才能获得证书
-
立即认证
+ {basicInfo && basicInfo.authentication == "uncertified" ?
+
通过实名认证后才能获得证书
: ""
+ }
+ {basicInfo && basicInfo.authentication == "uncertified" ?
+
this.checkBasicInfo(1)}>立即认证
: ""
+ }
+
姓名:
-
胡志勇
已认证
待审核!
撤销认证
+
{basicInfo && basicInfo.name}
+
+ {
+ basicInfo && basicInfo.authentication == "uncertified" ? "" :
+ basicInfo && basicInfo.authentication == "applying" ?
+
待审核!
this.Cancellationofapplication(1)}>撤销认证
+ :
+
+
已认证
+
+ }
+
性别:
-
男
+
{basicInfo && basicInfo.gender == 0 ? "男" : "女"}
*职业信息
-
通过职业认证后才能获得证书
-
立即认证
+ {
+ basicInfo && basicInfo.professional_certification == "uncertified" ?
+
通过职业认证后才能获得证书
+
+ : ""}
+ {
+ basicInfo && basicInfo.professional_certification == "uncertified" ?
+
this.checkBasicInfo(2)}>立即认证
+
+ : ""}
职业:
-
教师
已认证
待审核!
撤销认证
+
{basicInfo && basicInfo.identity && identityMap[basicInfo.identity]}
+ {
+ basicInfo && basicInfo.professional_certification == "uncertified" ?
+ "" :
+ basicInfo && basicInfo.professional_certification == "applying" ?
+
+
待审核!
this.Cancellationofapplication(2)}>撤销认证
+
+ :
+
+
已认证
+
this.checkBasicInfo(2)}>重新认证
+
+
+ }
+
职称:
-
副教授
+
{basicInfo && basicInfo.technical_title}
学校:
-
国防科技大学
+
{basicInfo && basicInfo.school_name}
院系:
-
计算机学院
+
{basicInfo && basicInfo.department_name}
-
手机号:
-
未绑定
-
立即绑定
+ {
+ basicInfo && basicInfo.phone ?
+
{basicInfo && basicInfo.phone}
+ :
+
未绑定
+ }
+
this.phonebools()}>{basicInfo && basicInfo.phone ? (phonebool === false ? "更换" : "") : (phonebool === false ? "立即绑定" : "")}
+ {/*手机号绑定*/}
+ {
+ phonebool === true ?
+
+
+
+
+
+ {getFieldDecorator('phone', {
+ rules: [{
+ // initialValue: this.state.cityDefaultValue,
+ required: true,
+ message: `请输入要${basicInfo.phone ? '更换' : '绑定'}的手机号码`,
+ }],
+ })(
+
+ )}
+
+
+
+ {getFieldDecorator('phoneValidateCode', {
+ rules: [{
+ // initialValue: this.state.cityDefaultValue,
+ required: true,
+ message: '请输入手机获取的验证码',
+ }],
+ })(
+
+ )}
+ this.getCode(3)}>
+ {!secondsFlag ? "获取验证码" : `重新发送${seconds}s`}
+
+
+
+
+ this.onPhoneSubmit()}>确定
+ this.hideUpdating(1)}>取消
+
+
+
+
+ : ""
+ }
+
+
Email:
-
163@163.com
-
更换
+
{basicInfo && basicInfo.mail}
+
this.emailbools()}>{basicInfo && basicInfo.mail ? (emailbool === false ? "更换" : "") : (emailbool === false ? "立即绑定" : "")}
+ {
+ emailbool === false ? "" :
+
+
+
+
+
+ {getFieldDecorator('email', {
+ rules: [{
+ // initialValue: this.state.cityDefaultValue,
+ required: true,
+ message: basicInfo && basicInfo.mail ? '请输入要更换的新邮箱地址' : '请输入邮箱地址',
+ }],
+ })(
+
+ )}
+
+
+
+ {getFieldDecorator('emailValidateCode', {
+ rules: [{
+ // initialValue: this.state.cityDefaultValue,
+ required: true,
+ message: '请输入邮箱收到的验证码',
+ }],
+ })(
+
+ )}
+ this.getCode(4)}>
+ {!secondsFlag ? "获取验证码" : `重新发送${seconds}s`}
+
-
-
签/领/开户行及银行卡号
-
为保障奖金的及时发放,请队长如实填写你名下的银行卡信息
+
+ this.onEmailSubmit()}>确定
+ this.hideUpdating(2)}>取消
+
+
+
+ }
+ {
+ leader === true ?
+
+ {
+ bank_account_editable === true ?
+
+
+
签/领/开户行及银行卡号
+
为保障奖金的及时发放,请队长如实填写你名下的银行卡信息
+
+
+
+
+ // class="ant-col ant-form-item-label"
+ `}
+
+
+
+ {getFieldDecorator('openingbank', {
+ rules: [{
+ // initialValue: this.state.cityDefaultValue,
+ required: true,
+ message: '请输入开户行',
+ }],
+ })(
+
+ )}
+
-
+
+ {getFieldDecorator('subbranch', {
+ rules: [{
+ // initialValue: this.state.cityDefaultValue,
+ required: true,
+ message: '请输入支行',
+ }],
+ })(
+
+ )}
+
-
+
+ {getFieldDecorator('subbranchs', {
+ rules: [{
+ // initialValue: this.state.cityDefaultValue,
+ required: true,
+ message: '请输入账号',
+ }],
+ })(
+
+ )}
+
-
+
+
+
+ {/*
*/}
+
this.yhBankstrue()}>确定
+
+
+
+
-
+
+ :
+
+
+
签/领/开户行及银行卡号
+
为保障奖金的及时发放,请队长如实填写你名下的银行卡信息
+
+ {
+ bank_account && bank_account ?
+
+
+
开户行:
+
{bank_account && bank_account.bank}
+
+
+
支行:
+
{bank_account && bank_account.second_bank}
+
+
+
账号:
+
{bank_account && bank_account.card_no}
+
+
+ :
+ ""
+ }
+
+
+ }
+
+
+ : ""
+ }
-
-
)
}
}
-export default CompetitionContentspdfpeopledata;
+
+const CompetitionContentspdfpeopledatas = Form.create({name: 'CompetitionContentspdfpeopledata'})(CompetitionContentspdfpeopledata);
+
+export default CompetitionContentspdfpeopledatas;
+
diff --git a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/mycompetotionchild.css b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/mycompetotionchild.css
index bf73dc59d..9f62759df 100644
--- a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/mycompetotionchild.css
+++ b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/mycompetotionchild.css
@@ -128,8 +128,8 @@
.buttongo2{
background: #4CACFF;
border: 1px solid #4CACFF;
- width: 60px;
- height: 30px;
+ width: 64px;
+ height: 32px;
border-radius: 4px;
color: #FFFFFF;
font-size: 16px;
@@ -181,3 +181,117 @@
text-align: center;
}
+
+.mycompitcursor {
+ cursor: pointer;
+}
+
+.basicForm {
+ background: #fff;
+ padding: 30px;
+ margin-bottom: 10px;
+ box-sizing: border-box;
+ width: 100%;
+ min-height: 390px;
+}
+
+.basicForm .title {
+ font-size: 16px;
+ padding-left: 30px;
+ margin-bottom: 10px;
+}
+
+.flexTable {
+ display: flex;
+ flex-direction: column;
+}
+
+.flexRow {
+ display: flex;
+}
+
+.mb15 {
+ margin-bottom: 15px !important;
+}
+
+/* BUTTOn */
+.ant-btn {
+ border-radius: 2px;
+}
+
+button.ant-btn.ant-btn-primary.grayBtn {
+ background: #CBCBCB;
+ border-color: #CBCBCB;
+}
+
+.borderBottom {
+ border-bottom: 1px solid #4CACFF;
+}
+
+/* form ---------------- START */
+.formItemInline {
+ display: flex;
+}
+
+.formItemInline .ant-form-item-control-wrapper {
+ display: inline-block;
+}
+
+.hideRequireTag .ant-form-item-required:before {
+ display: none;
+}
+
+
+/* .basicForm .ant-form-item-label {
+ width: 100px;
+ padding-right: 10px;
+}
+ .basicForm .ant-form-item-label label {
+ color: #979797
+ } */
+
+
+.courseNormalForm .ant-select-show-search {
+ height: 40px;
+}
+
+.courseNormalForm .ant-select-auto-complete.ant-select .ant-input {
+ height: 40px;
+}
+
+.courseNormalForm .ant-select-search__field__mirror {
+ height: 40px;
+}
+
+.courseNormalForm .ant-input-lg {
+ height: 40px;
+}
+
+.courseNormalForm .ant-select-selection--single {
+ height: 40px;
+}
+
+.courseNormalForm .ant-select-auto-complete.ant-select .ant-select-selection--single {
+ height: 40px
+}
+
+.courseNormalForm .ant-input-affix-wrapper {
+ height: 40px;
+}
+
+/* 职业 */
+.courseNormalForm .ant-select-selection-selected-value {
+ line-height: 38px
+}
+
+.courseNormalForm input {
+ height: 40px;
+}
+
+.w300 {
+ width: 300px;
+}
+
+.w56 {
+ width: 56px;
+}
From ab502dbaf330efd5c6e781ab0415498521ea9304 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 22:58:47 +0800
Subject: [PATCH 13/14] =?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
---
.../CompetitionContentspdfdownload.css | 2 +-
.../CompetitionContentspdfdownload.js | 84 ++++++++++++-------
.../modules/courses/statistics/Statistics.js | 2 +-
3 files changed, 57 insertions(+), 31 deletions(-)
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 b8d6812f1..27ce04e99 100644
--- a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfdownload.css
+++ b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfdownload.css
@@ -11,7 +11,7 @@
color:rgba(0,0,0,1);
}
.pdfdownloadfont4CACFF{
- color: #4CACFF;
+ color: #4CACFF !important;
}
.pdfdownloadfont00CC5F{
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 c83cefe7f..55d7fd239 100644
--- a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfdownload.js
+++ b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfdownload.js
@@ -10,7 +10,8 @@ class CompetitionContentspdfdownload extends Component{
constructor(props) {
super(props)
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`;
axios.get(url).then((response) => {
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({
data:response.data,
+ teams:datas,
})
}
}).catch((error) => {
@@ -30,19 +46,10 @@ class CompetitionContentspdfdownload extends Component{
render() {
- // 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)
- })
- }
+
+
+ let {data,teams}=this.state;
+
const columns = [
{
title: '角色',
@@ -108,21 +115,20 @@ class CompetitionContentspdfdownload extends Component{
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
+ render: (value, record, index) => {
+ if (index === 0&&record.bank_account!=null) {
+ return {
+ children:
{record.bank_account.bank + record.bank_account.second_bank + record.bank_account.card_no},
+ };
+ }
+
},
},
];
+
+ let people=[ { url: '/api/competitions/xxxxx/certificates/1/personal' },
+ { url: '/api/competitions/xxxxx/certificates/2/personal' },]
return (
@@ -134,13 +140,30 @@ class CompetitionContentspdfdownload extends Component{
- {data&&data.personal_certifications.length===0?个人证书:暂未生成 原因:还未认证个人信息,this.props.Competitioncallback("2")}>立即查看:""}
+ 个人证书: {data&&data.personal_certifications.length===0?暂未生成 原因:还未认证个人信息,this.props.Competitioncallback("2")}>立即查看:
+ data&&data.personal_certifications.map((item,key)=>{
+ return(
+
+
+ 立即下载
+
+ )
+ })}
团队证书:
{data&&data.team_certifications.length===0?暂未生成
- :立即下载}
+ :data&&data.team_certifications.map((item,key)=>{
+ return(
+
+
+ 立即下载
+
+ )
+ })}
@@ -152,12 +175,15 @@ class CompetitionContentspdfdownload extends Component{
}
.pdfdownloadTable .ant-table-tbody > tr > td{
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;
+ }
`
}
- {data&&data.teams.map((item,key)=>{
+ {teams&&teams.map((item,key)=>{
return(
{item.name}战队信息填报概况
diff --git a/public/react/src/modules/courses/statistics/Statistics.js b/public/react/src/modules/courses/statistics/Statistics.js
index 3ba159dbf..d11df0b6a 100644
--- a/public/react/src/modules/courses/statistics/Statistics.js
+++ b/public/react/src/modules/courses/statistics/Statistics.js
@@ -438,7 +438,7 @@ class Statistics extends Component{
return(
-
+
From 7b7c44fd18657a839b1620b53d9ae0e377f14ac7 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 23:34:27 +0800
Subject: [PATCH 14/14] =?UTF-8?q?=E7=AB=9E=E8=B5=9B=E6=8A=A5=E5=90=8D?=
=?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Competitioncommon/CompetitionCommon.js | 43 +++++++++++++++++--
1 file changed, 39 insertions(+), 4 deletions(-)
diff --git a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommon.js b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommon.js
index de1924975..ed5d2649b 100755
--- a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommon.js
+++ b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommon.js
@@ -23,7 +23,8 @@ class CompetitionCommon extends Component{
chart_rules:undefined,
Competitionedittype:false,
chartdata:undefined,
- has_url:false
+ has_url:false,
+ signupdata:undefined
}
}
@@ -230,10 +231,44 @@ class CompetitionCommon extends Component{
}
}
}else{
- this.props.history.replace(url);
+
+ if(url==="personal"){
+ this.Personalregistration()
+ }else{
+ this.props.history.replace(url);
+ }
+
}
}
+
+ Personalregistration = () => {
+
+ let {signupdata} = this.state;
+ let urls=`/competitions/${this.props.match.params.identifier}/enroll`;
+ if (signupdata.enroll_ended === true) {
+ //已截止
+ this.props.showNotification(`报名已截止`);
+ return;
+ }
+ if (signupdata.enrolled === true) {
+ this.props.showNotification(`你已经报名,不能重复报名!`);
+ return;
+ }
+ const url = `/competitions/${this.props.match.params.identifier}/competition_teams.json`;
+ axios.post(url).then((response) => {
+ if (response) {
+ if (response.data) {
+ this.props.showNotification(`报名成功,预祝您夺得桂冠!`);
+ this.props.history.replace(urls);
+ }
+ }
+ }).catch((error) => {
+
+ });
+ }
+
+
Competitioncallback=(key)=>{
this.setState({
tabkey:key
@@ -255,7 +290,7 @@ class CompetitionCommon extends Component{
render() {
- let {data,module_type,Competitionedittype}=this.state;
+ let {data,module_type,Competitionedittype,signupdata}=this.state;
return (
data===undefined?"":