From 7cdb0d1e1a39a1946bf4a4a244e4941a5739bcb9 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, 25 Oct 2019 17:53:31 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=89=88=E6=9C=AC=E5=BA=93?= =?UTF-8?q?=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Competitioncommon/CompetitionCommon.css | 7 ++++ .../CompetitionContentsChart.js | 33 +++++++++++++++++++ .../tpm/shixunchild/Repository/Repository.js | 13 +++++--- 3 files changed, 48 insertions(+), 5 deletions(-) diff --git a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommon.css b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommon.css index 23dfe3895..6a204e127 100644 --- a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommon.css +++ b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommon.css @@ -357,4 +357,11 @@ font-size: 16px; color: rgba(119,119,119,1); +} + +.youranklist{ + background: rgba(226,241,255,1); + line-height: 50px; + text-align: center; + padding-left: 20px; } \ No newline at end of file diff --git a/public/react/src/modules/competitions/Competitioncommon/CompetitionContentsChart.js b/public/react/src/modules/competitions/Competitioncommon/CompetitionContentsChart.js index 17baca3d6..eec2176e5 100644 --- a/public/react/src/modules/competitions/Competitioncommon/CompetitionContentsChart.js +++ b/public/react/src/modules/competitions/Competitioncommon/CompetitionContentsChart.js @@ -226,7 +226,40 @@ class CompetitionContents extends Component{ })} + {chartdata===undefined?"":chartdata.user_ranks.length===0?"":
+ + {chartdata.user_ranks.map((item,key)=>{ + return( + + + 您当前排名:{item.rank} + + + {item.user_name} + + + {item.team_name} + + + {item.cost_time} + + + {item.score} + + + ) + })} +
} {chartdata===undefined?"":chartdata.teams.length===0?"":} diff --git a/public/react/src/modules/tpm/shixunchild/Repository/Repository.js b/public/react/src/modules/tpm/shixunchild/Repository/Repository.js index 85659a3a6..c477422e8 100644 --- a/public/react/src/modules/tpm/shixunchild/Repository/Repository.js +++ b/public/react/src/modules/tpm/shixunchild/Repository/Repository.js @@ -31,7 +31,9 @@ function jsCopy(){ class Repository extends Component { constructor(props) { super(props); + this.state={ + } } componentDidMount() { } @@ -41,7 +43,8 @@ class Repository extends Component { } render() { - let { match, author, git_url, lastest_commit, trees, commits,repositoryLoading, pathArray , TPMRightSectionData } = this.props; + let { match, author, git_url, lastest_commit,repositoryLoading, commits,trees,pathArray , TPMRightSectionData } = this.props; + if (!author) { author = {} } @@ -174,9 +177,9 @@ class Repository extends Component { {/* 用户、最近提交时间 */} { - trees === undefined || trees === null ? : + trees === undefined || trees === null ||trees.length===0? :
-
+ {commits===undefined?"":commits===null||commits.length===0?"":
{author.name} 提交记录 -
+
}
@@ -201,7 +204,7 @@ class Repository extends Component {
- {trees.map((item, index) => { + { trees === undefined ?"": trees === null || trees.length===0?"":trees.map((item, index) => { return (