From ea9b5cbd044af11f19d5b45c68018b534718c895 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Wed, 18 Dec 2019 17:35:38 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=96=B0=E7=89=88=E5=AE=9E?= =?UTF-8?q?=E8=AE=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/tpm/TPMChallenge.js | 2 +- .../tpm/shixunchild/Challenges/Challenges.js | 345 ++++++++++-------- .../Challenges/Challengesjupyter.js | 2 +- .../shixunchild/shixunchildCss/Challenges.css | 49 +++ 4 files changed, 236 insertions(+), 162 deletions(-) diff --git a/public/react/src/modules/tpm/TPMChallenge.js b/public/react/src/modules/tpm/TPMChallenge.js index 5c6e1a16a..7835fc9f9 100644 --- a/public/react/src/modules/tpm/TPMChallenge.js +++ b/public/react/src/modules/tpm/TPMChallenge.js @@ -26,7 +26,7 @@ class TPMChallenge extends Component {
-
+
: -
-

- {this.props.identity < 5 && ChallengesDataList&&ChallengesDataList.shixun_status=== 0 ? - - - - 实践任务 - - - : "" - } - {this.props.identity < 5 && ChallengesDataList&&ChallengesDataList.shixun_status=== 0 ? - - - - 选择题任务 - - : "" - } -

-

- 简介 - - - - - +

+ {/*

*/} + {/* {this.props.identity < 5 && ChallengesDataList&&ChallengesDataList.shixun_status=== 0 ?*/} + {/* */} + {/* */} + {/* */} + {/* 实践任务*/} + {/* */} + + {/* : ""*/} + {/* }*/} + {/* {this.props.identity < 5 && ChallengesDataList&&ChallengesDataList.shixun_status=== 0 ?*/} + {/* */} + {/* */} + {/* */} + {/* 选择题任务*/} + {/* */} + {/* : ""*/} + {/* }*/} + {/*

*/} + + +

+

+ 简介 + + {this.props.identity < 5 && ChallengesDataList&&ChallengesDataList.shixun_status < 3 ? + + {/**/} + 编辑 + :""} + {this.props.user && this.props.user.main_site === true ? + this.props.identity < 5?实训制作指南 : "":""} +
+
+ +
+

+ {ChallengesDataList === undefined ? "" :ChallengesDataList&&ChallengesDataList.description===null?"": +

+ } +

+
+

-
-

- {ChallengesDataList === undefined ? "" :ChallengesDataList&&ChallengesDataList.description===null?"": -

+
+ 全部任务 + + {/* */} + {/**/} + {/* */} + {this.props.identity < 5 && ChallengesDataList&&ChallengesDataList.shixun_status=== 0 ? + + + : "" } -

- - {/* - - */} + {this.props.identity < 5 && ChallengesDataList&&ChallengesDataList.shixun_status=== 0 ? + + + : "" + } + {/**/} + {/* */} + {/* */} +
-

- 全部任务 - {/*{this.props.identity < 5 && ChallengesDataList&&ChallengesDataList.shixun_status=== 0 ?*/} - {/**/} - {/**/} - {/**/} - {/*实践任务*/} - {/**/} - - {/* : ""*/} - {/*}*/} - {/*{this.props.identity < 5 && ChallengesDataList&&ChallengesDataList.shixun_status=== 0 ?*/} - {/**/} - {/**/} - {/**/} - {/*选择题任务*/} - {/**/} - {/* : ""*/} - {/*}*/} -

- -
+
{ChallengesDataList === undefined ?
: ChallengesDataList.challenge_list.map((item, key) => { - - let newstatus = 2; - if(ChallengesDataList.challenge_list[key - 1]!=undefined){ - newstatus=ChallengesDataList.challenge_list[key - 1].status; - } return (
+
+
第{key+1}关:{item.st === 0 ?"实践题":"选择题"} + + {/*this.startshixunCombat(false,undefined, item.challenge_id)}*/} + {/* // onClick={() => this.startshixunCombat(false)}*/} + {/* title={"查看挑战关卡"}*/} + {/*>已完成*/} + {/*判断比较复杂 有排第一不能是灰色按钮*/} + {item.status === 2 ? + + : "" + } -
- - {item.st === 0 ? - - - - : - - - - } - - 第{key+1}关 + {/* this.startshixunCombat(false,undefined, item.challenge_id)} + // onClick={() => this.startshixunCombat(false)} + >直接挑战 */} + { + ChallengesDataList.allow_skip === true && item.status === 1? + + : "" + } - {this.props.identity<5? - item.st === 1 ? - this.EditTraining(this.props.identity, item.challenge_id, "/editquestion")} - className="font-16 color05101a">{item.name} - : - this.EditTraining(this.props.identity, item.challenge_id, "/editcheckpoint")} - className="font-16 color05101a">{item.name}: this.startshixunCombat(this.props.identity, item.challenge_id, "/editcheckpoint")} - className="font-16 color05101a">{item.name} - } + {/* + this.startshixunCombat(false,undefined, item.challenge_id)} + style={{marginTop: '-2px'}}>直接挑战 + + */} + { + ChallengesDataList.allow_skip === false ? item.status === 1? + + :"":"" - - - - + } + {/**/} + {/* this.startshixunCombat(false,undefined, item.challenge_id):""}*/} + {/* style={{marginTop: '-2px'}}>直接挑战*/} + {/**/} + { + item.status === 0 ? + + :"" + } +
+ {item.delete_url != undefined && this.delOperations(item.challenge_id)} @@ -535,55 +571,44 @@ class Challenges extends Component {
-
- {item.passed_count} 人完成挑战 - {item.playing_count} 人正在挑战 - 完成挑战可获得经验值 {item.score} - - - {/*判断比较复杂 有排第一不能是灰色按钮*/} - {item.status === 2 ? - this.startshixunCombat(false,undefined, item.challenge_id)} - // onClick={() => this.startshixunCombat(false)} - title={"查看挑战关卡"} - >已完成 : "" - } - - { - ChallengesDataList.allow_skip === true && item.status === 1? - this.startshixunCombat(false,undefined, item.challenge_id)} - // onClick={() => this.startshixunCombat(false)} - >直接挑战 : "" - } - - { - ChallengesDataList.allow_skip === false ? item.status === 1? - - this.startshixunCombat(false,undefined, item.challenge_id)} - style={{marginTop: '-2px'}}>直接挑战 - :"":"" - } - - - - { - item.status === 0 ? - - this.startshixunCombat(false,undefined, item.challenge_id):""} - style={{marginTop: '-2px'}}>直接挑战 - :"" +
+ {/*onClick={() => this.EditTraining(this.props.identity, item.challenge_id, "/editquestion")}*/} + {this.props.identity<5? + item.st === 1 ? + {item.name} + : + {item.name}: this.startshixunCombat(this.props.identity, item.challenge_id, "/editcheckpoint")} + className="font-16 color05101a">{item.name} } + {/* onClick={() => this.EditTraining(this.props.identity, item.challenge_id, "/editcheckpoint")}*/} + + + +
+
+ + 正在挑战: {item.playing_count}人 + 完成挑战: {item.passed_count}人 + 可获经验: {item.score}点
diff --git a/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js b/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js index 81959a30b..2ce16f21f 100644 --- a/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js +++ b/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js @@ -199,7 +199,7 @@ class Challengesjupyter extends Component { return ( -
+

简介 diff --git a/public/react/src/modules/tpm/shixunchild/shixunchildCss/Challenges.css b/public/react/src/modules/tpm/shixunchild/shixunchildCss/Challenges.css index 10d48c120..ac762b1d5 100644 --- a/public/react/src/modules/tpm/shixunchild/shixunchildCss/Challenges.css +++ b/public/react/src/modules/tpm/shixunchild/shixunchildCss/Challenges.css @@ -103,3 +103,52 @@ position: absolute; bottom: 21px; } + + +.shixunjianjie{ + height: 76px; + line-height: 35px; + padding: 20px; + border-bottom: 1px solid #eeee; + margin-bottom: 10px; +} + +.pd20{ + padding:20px; +} + +.shixunbingbaocun12{ + font-size:12px; + color:#888888; +} + +.shixunbingbaocun33312{ + font-size:12px; + color:#333333 +} + +.shixunjianjiecballenges{ + height: 76px; + line-height: 35px; + padding: 20px; + border-bottom: 1px solid #eeee; +} + +.padding1020pxshixun{ + padding: 10px 20px 0px 20px; +} + +.shixunstartbutton33BD8C{ + background: #33BD8C; + border: #33BD8C; +} + +.shixunstartbuttonFF6601{ + background: #FF6601; + border: #FF6601; +} + +.shixunstartbutton666666{ + font-size:14px; + color:#666666; +} \ No newline at end of file