- { loading ?
-
+ style={{ marginLeft: 'auto', marginRight: 'auto', marginTop: '40% !important', display: 'block' }}/>
: ""
}
-
-
@@ -242,7 +243,7 @@ class LeftView extends Component {
@@ -253,8 +254,8 @@ class LeftView extends Component {
{/* 只读markdown的写法 markdownToHTML 这个接口生成的markdown没有setMarkdown接口
*/}
-
-
+
+
{ (!unlockedAnswers || unlockedAnswers.length === 0) && (!lockedAnswers || lockedAnswers.length === 0) &&
@@ -283,8 +284,10 @@ class LeftView extends Component {
}
.multiLevelAnswer .status{
color: #CDCDCD;
- flex: 0 0 45px;
- }
+ }
+ .multiLevelAnswer .lock-time{
+ margin-right: 15px;
+ }
.markdown-body ol, .markdown-body ul {
padding-left: 2.5em;
}
@@ -292,13 +295,17 @@ class LeftView extends Component {
{ unlockedAnswers && unlockedAnswers.map((item, index) => {
+ const {name, contents, view_time} = item;
return
级别{index + 1}:
-
{item.name}
-
已解锁
+
{name}
+
+ {view_time ? moment(view_time).format('YYYY-MM-DD HH:mm') : ''}
+ 已解锁
+
-
})}
@@ -308,19 +315,19 @@ class LeftView extends Component {
级别{index + 1 + (unlockedAnswers ? unlockedAnswers.length : 0)}:
{item.name}
-
{ this.props.showUnlockAnswerDialog(item) } }
style={{ color: '#4CACFF', cursor: 'pointer' }}
>解锁
})}
-
+
-
- { st === 1 ?
-
@@ -338,8 +345,8 @@ class LeftView extends Component {
- { loadingComments ?
- :
+ { loadingComments ?
+ :
}
diff --git a/public/react/src/modules/page/taskList/TaskList.css b/public/react/src/modules/page/taskList/TaskList.css
index 46dfd5076..8898ab3e4 100644
--- a/public/react/src/modules/page/taskList/TaskList.css
+++ b/public/react/src/modules/page/taskList/TaskList.css
@@ -1,92 +1,123 @@
-/*------------------------------- TaskList Start */
-#all_task_index {
- color: #fff;
- background: #111C24;
-}
- .panel-list:last-child {
- margin-bottom: 50px;
- }
- .-task-list-title a, .-task-list-title a:link, .-task-list-title a:visited {
- color: #BCC6CD;
-
- }
- .-task-list-inner {
- background: none;
- border-bottom: 1px solid #222C34;
- padding-bottom: 16px;
- }
- #all_task_index .fa-play-circle {
- color: white;
- }
- #all_task_index .panel-list {
- position: relative;
- }
- #all_task_index .current .currentSelected {
- border-left: 3px solid #4CACFF;
- height: 22px;
- width: 0px;
- position: absolute;
- top: 8px;
- }
-
- #all_task_index .grades {
- color: #747A7F;
- }
- .-task-list-title {
- color: #BCC6CD;
- }
- #all_task_index .positive.info-partly span {
- color: #45E660;
- }
- #all_task_index .negative.info-partly span {
- color: #FF954C;
- }
- #all_task_index .notFinish .info-partly span {
- color: #747A7F !important;
- }
-
- #all_task_index #shixun_exp_118 span {
- /*color: #45E660;*/
- }
- #all_task_index #shixun_grade_118 span {
- /*color: #FF954C;*/
- }
-
- #all_task_index #shixun_tag_118 span {
- color: #FFF;
- }
-
-
-.rateRow {
- margin-left: 20px;
- font-size: 13px;
- margin-top: 6px;
-}
- .rateRow .rc-rate {
- margin-top: -5px;
- margin-left: 3px;
- }
- .rateRow .rc-rate-star {
- color: #9A9A9A;
- }
- .rateRow .starTip {
- color: #666666;
- font-size: 13px;
- }
- .rateRow .starNumber {
- color: #FFA800;
- margin-left: 4px;
- }
- .rateRow .unstar .starNumber {
- cursor: pointer;
- }
- .rateRow .unstar .starNumber:hover {
- text-decoration: underline;
- }
- .rateRow .stared .starNumber {
-
- }
- .rateRow .rc-rate-star-half .rc-rate-star-first, .rateRow .rc-rate-star-full .rc-rate-star-second {
- color: #FFA800;
- }
-/*------------------------------- TaskList End */
\ No newline at end of file
+/*------------------------------- TaskList Start */
+#all_task_index {
+ color: #fff;
+ background: #111C24;
+}
+ .panel-list:last-child {
+ margin-bottom: 50px;
+ }
+ .-task-list-title a, .-task-list-title a:link, .-task-list-title a:visited {
+ color: #BCC6CD;
+
+ }
+ .-task-list-inner {
+ background: none;
+ border-bottom: 1px solid #222C34;
+ padding-bottom: 16px;
+ }
+ #all_task_index .fa-play-circle {
+ color: white;
+ }
+ #all_task_index .panel-list {
+ position: relative;
+ }
+ #all_task_index .current .currentSelected {
+ border-left: 3px solid #4CACFF;
+ height: 22px;
+ width: 0px;
+ position: absolute;
+ top: 8px;
+ }
+
+ #all_task_index .grades {
+ color: #747A7F;
+ }
+ .-task-list-title {
+ color: #BCC6CD;
+ }
+ #all_task_index .positive.info-partly span {
+ color: #45E660;
+ }
+ #all_task_index .negative.info-partly span {
+ color: #FF954C;
+ }
+ #all_task_index .notFinish .info-partly span {
+ color: #747A7F !important;
+ }
+
+ #all_task_index #shixun_exp_118 span {
+ /*color: #45E660;*/
+ }
+ #all_task_index #shixun_grade_118 span {
+ /*color: #FF954C;*/
+ }
+
+ #all_task_index #shixun_tag_118 span {
+ color: #FFF;
+ }
+
+
+.rateRow {
+ margin-left: 20px;
+ font-size: 13px;
+ margin-top: 6px;
+}
+ .rateRow .rc-rate {
+ margin-top: -5px;
+ margin-left: 3px;
+ }
+ .rateRow .rc-rate-star {
+ color: #9A9A9A;
+ }
+ .rateRow .starTip {
+ color: #666666;
+ font-size: 13px;
+ }
+ .rateRow .starNumber {
+ color: #FFA800;
+ margin-left: 4px;
+ }
+ .rateRow .unstar .starNumber {
+ cursor: pointer;
+ }
+ .rateRow .unstar .starNumber:hover {
+ text-decoration: underline;
+ }
+ .rateRow .stared .starNumber {
+
+ }
+ .rateRow .rc-rate-star-half .rc-rate-star-first, .rateRow .rc-rate-star-full .rc-rate-star-second {
+ color: #FFA800;
+ }
+
+ .tip-info-wrap{
+ background-color: #111C24;
+ padding: 20px 0px;
+ }
+ .tip-info-wrap .tip-info{
+ display: flex;
+ background: #707070;
+ border: 1px solid rgba(112,112,112,1);
+ border-radius: 100px;
+ width: 375px;
+ height: 52px;
+ font-size: 12px;
+ align-items: center;
+ align-items: space-around;
+ margin: 0 auto;
+ padding: 0 20px;
+ }
+
+ .finish-wrap{
+ display: flex;
+ padding: 0 0px 0 20px;
+ margin-top: 10px;
+ }
+ .finish-wrap .finish-time{
+ flex: 1;
+ }
+ .finish-time .time-title{
+ color: #747A7F;
+ margin-right: 5px;
+ }
+/*------------------------------- TaskList End */
diff --git a/public/react/src/modules/page/taskList/TaskList.js b/public/react/src/modules/page/taskList/TaskList.js
index d3efba167..824512291 100644
--- a/public/react/src/modules/page/taskList/TaskList.js
+++ b/public/react/src/modules/page/taskList/TaskList.js
@@ -1,124 +1,140 @@
-import React, { Component } from 'react';
-
-import { BrowserRouter as Router, Route, Link } from "react-router-dom";
-import { CircularProgress } from 'material-ui/Progress';
-
-import Rate from 'rc-rate';
-
-import 'rc-rate/assets/index.css';
-import './TaskList.css'
-
-import classNames from 'classnames'
-class TaskList extends Component {
-
- onChange() {
-
- }
- renderTasks() {
- const { challenges, challenge, shixun, onChallengesDrawerClose, myshixun_manager } = this.props;
- const currentChallenge = challenge;
- const taskArray = challenges.map( (challenge, index) => {
- challenge.experience = challenge.get_experience
- challenge.gold = challenge.get_gold
- challenge.subject = challenge.name
-
- const showExp = (challenge.experience > 0 && challenge.status === 2) ? '+' + challenge.experience : challenge.experience
- const showGold = (challenge.gold > 0 && challenge.status === 2) ? '+' + challenge.gold : challenge.gold
- return (
-
-
-
-
- {/* 允许跳关的设置 */}
-
- {shixun.status<2 || challenge.status === 2 || (challenges[index-1] && challenges[index-1].status === 2)
- || shixun.task_pass || myshixun_manager === true ?
- {index+1}. {challenge.subject}
- :
- {index+1}. {challenge.subject}}
-
-
-
- {challenge.status === 2 ?
-
- :
-
- }
-
-
-
-
-
- 0) ? 'positive ' : 'negative'}`} id="shixun_exp_118">
- 经验值
- { showExp }
-
-
- 0) ? 'positive ' : 'negative'}`} id="shixun_grade_118">
- 金币
- {/*因为关卡金币和经验值是一样的,所以这里可以直接用经验值*/}
- { showGold }
-
-
-
-
- { challenge.tag_count ?
-
- 技能标签{challenge.tag_count || '无'}
-
- : '' }
-
-
-
- { shixun.status >= 2 &&
- {/* 已完成、未评分 */}
- {challenge.status === 2 && challenge.star === 0?
-
- 给个评分吧:
- this.props.onStarChange(challenge, index, value)}
- />
- this.props.saveChallengeStar(challenge, index)}>评价
-
- :
- challenge.status === 2 && challenge.star > 0 ?
-
- 已评分:
-
- {challenge.star}分
-
- : ''}
-
}
-
-
- )
- })
- return taskArray;
- }
-
- render() {
- const { taskListLoading } = this.props;
- return (
-
-
- { taskListLoading ?
- :
- this.renderTasks()
- }
-
-
- );
- }
- /*
-
-
-
全部任务
-
- */
-}
-
-export default TaskList;
+import React, { Component } from 'react';
+
+import { BrowserRouter as Router, Route, Link } from "react-router-dom";
+import { CircularProgress } from 'material-ui/Progress';
+import moment from 'moment';
+import Rate from 'rc-rate';
+
+import 'rc-rate/assets/index.css';
+import './TaskList.css'
+
+import classNames from 'classnames'
+class TaskList extends Component {
+
+ onChange() {
+
+ }
+ renderTasks() {
+ const { challenges, challenge, shixun, onChallengesDrawerClose, myshixun_manager } = this.props;
+ const currentChallenge = challenge;
+ const taskArray = challenges.map( (challenge, index) => {
+ challenge.experience = challenge.get_experience
+ challenge.gold = challenge.get_gold
+ challenge.subject = challenge.name
+ const {finished_time, view_answer_time} = challenge;
+ const showExp = (challenge.experience > 0 && challenge.status === 2) ? '+' + challenge.experience : challenge.experience
+ const showGold = (challenge.gold > 0 && challenge.status === 2) ? '+' + challenge.gold : challenge.gold
+ return (
+
+
+
+
+ {/* 允许跳关的设置 */}
+
+ {shixun.status<2 || challenge.status === 2 || (challenges[index-1] && challenges[index-1].status === 2)
+ || shixun.task_pass || myshixun_manager === true ?
+ {index+1}. {challenge.subject}
+ :
+ {index+1}. {challenge.subject}}
+
+
+
+ {challenge.status === 2 ?
+
+ :
+
+ }
+
+
+
+
+
+ 0) ? 'positive ' : 'negative'}`} id="shixun_exp_118">
+ 经验值
+ { showExp }
+
+
+ 0) ? 'positive ' : 'negative'}`} id="shixun_grade_118">
+ 金币
+ {/*因为关卡金币和经验值是一样的,所以这里可以直接用经验值*/}
+ { showGold }
+
+
+
+
+ { challenge.tag_count ?
+
+ 技能标签{challenge.tag_count || '无'}
+
+ : '' }
+
+
+
+
+
+ 完成时间
+ { finished_time ? moment(finished_time).format('YYYY-MM-DD HH:mm') : '--' }
+
+
+ 查看答案时间
+ { view_answer_time ? moment(view_answer_time).format('YYYY-MM-DD HH:mm') : '--' }
+
+ { shixun.status >= 2 &&
+ {/* 已完成、未评分 */}
+ {challenge.status === 2 && challenge.star === 0?
+
+ 给个评分吧:
+ this.props.onStarChange(challenge, index, value)}
+ />
+ this.props.saveChallengeStar(challenge, index)}>评价
+
+ :
+ challenge.status === 2 && challenge.star > 0 ?
+
+ 已评分:
+
+ {challenge.star}分
+
+ : ''}
+
}
+
+
+ )
+ })
+ return taskArray;
+ }
+
+ render() {
+ const { taskListLoading } = this.props;
+ return (
+
+ {/** 增加提示信息 */}
+
+
+ 温馨提示: 若查看答案时间早于关卡任务完成时间,将影响课堂实训作业的成绩。
+
+
+
+
+ { taskListLoading ?
+ :
+ this.renderTasks()
+ }
+
+
+ );
+ }
+ /*
+
+
+
全部任务
+
+ */
+}
+
+export default TaskList;