|
|
|
@ -2,7 +2,7 @@ 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';
|
|
|
|
@ -16,12 +16,12 @@ class TaskList extends Component {
|
|
|
|
|
}
|
|
|
|
|
renderTasks() {
|
|
|
|
|
const { challenges, challenge, shixun, onChallengesDrawerClose, myshixun_manager } = this.props;
|
|
|
|
|
const currentChallenge = challenge;
|
|
|
|
|
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 (
|
|
|
|
@ -70,6 +70,15 @@ class TaskList extends Component {
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div className="finish-wrap">
|
|
|
|
|
<p class="finish-time font-12">
|
|
|
|
|
<span class="time-title">完成时间</span>
|
|
|
|
|
{ finished_time ? moment(finished_time).format('YYYY-MM-DD HH:mm') : '--' }
|
|
|
|
|
</p>
|
|
|
|
|
<p class="finish-time font-12">
|
|
|
|
|
<span class="time-title">查看答案时间</span>
|
|
|
|
|
{ view_answer_time ? moment(view_answer_time).format('YYYY-MM-DD HH:mm') : '--' } </p>
|
|
|
|
|
</div>
|
|
|
|
|
{ shixun.status >= 2 && <div className="rateRow">
|
|
|
|
|
{/* 已完成、未评分 */}
|
|
|
|
|
{challenge.status === 2 && challenge.star === 0?
|
|
|
|
@ -103,8 +112,15 @@ class TaskList extends Component {
|
|
|
|
|
render() {
|
|
|
|
|
const { taskListLoading } = this.props;
|
|
|
|
|
return (
|
|
|
|
|
<div className="page--over">
|
|
|
|
|
<div className="col-width-3 -scroll" style={{height: '100%'}} id="all_task_index">
|
|
|
|
|
<div className="page--over" style={{ width: '420px'}}>
|
|
|
|
|
{/** 增加提示信息 */}
|
|
|
|
|
<div className="tip-info-wrap">
|
|
|
|
|
<p className="tip-info">
|
|
|
|
|
<span><span style={{ color: '#FFBD4C'}}>温馨提示: </span> 若查看答案时间早于关卡任务完成时间,将影响课堂实训作业的成绩。</span>
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div className="col-width-3 -scroll" style={{height: 'calc( 100% - 100px )', width: '420px'}} id="all_task_index">
|
|
|
|
|
{ taskListLoading ?
|
|
|
|
|
<CircularProgress size={40} thickness={3} style={{ marginLeft: 'auto', marginRight: 'auto', marginTop: '40%', display: 'block' }}/> :
|
|
|
|
|
this.renderTasks()
|
|
|
|
|