dev_aliyun2
harry 5 years ago
parent cd8fda27aa
commit 24155b753f

@ -1,21 +1,13 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import { Redirect } from 'react-router'; import { Redirect } from 'react-router';
import { Rate } from 'antd'
import PropTypes from 'prop-types';
import Rate from 'rc-rate';
import Tooltip from 'material-ui/Tooltip';
import './TaskResultLayer.css' import './TaskResultLayer.css'
import moment from 'moment';
import passallImg from '../../../images/tpi/passall.png' import passallImg from '../../../images/tpi/passall.png'
import passpartImg from '../../../images/tpi/passpart.png' import passpartImg from '../../../images/tpi/passpart.png'
import empiricgreenImg from '../../../images/tpi/empiricgreen.png' import empiricgreenImg from '../../../images/tpi/empiricgreen.png'
import { trigger } from 'educoder'; import { trigger } from 'educoder';
import SecondTab from "../../paths/SchoolStatistics/SecondTab";
class TaskResultLayer extends Component { class TaskResultLayer extends Component {
@ -107,16 +99,6 @@ class TaskResultLayer extends Component {
return Math.floor(((600 - cost_time) / 600) * 100) return Math.floor(((600 - cost_time) / 600) * 100)
} }
// componentDidUpdate(prevProps) {
// if (!this.props.challenge) {
// return;
// }
// const { showLanguagePictrue } = this.props.challenge;
// if ( prevProps.challenge.showLanguagePictrue != showLanguagePictrue &&
// showLanguagePictrue == true ) {
// }
// }
initEffectDisplayServerTimer = () => { initEffectDisplayServerTimer = () => {
this.setState({ timeRemain: 5 * 60 }, () => { this.setState({ timeRemain: 5 * 60 }, () => {
@ -200,7 +182,6 @@ class TaskResultLayer extends Component {
</React.Fragment> </React.Fragment>
: ''} : ''}
<p> <p>
{/*<a href="javascript:void(0)" className="passNext">下一关</a>*/}
<a href="javascript:void(0)" className={`passed ${stared || game.star ? 'stared' : ''}`} <a href="javascript:void(0)" className={`passed ${stared || game.star ? 'stared' : ''}`}
{...titleObj} onClick={() => this.onFinish(true)}>{next_game ? '下一关' : '完成'}</a> {...titleObj} onClick={() => this.onFinish(true)}>{next_game ? '下一关' : '完成'}</a>
@ -209,30 +190,10 @@ class TaskResultLayer extends Component {
<a href="javascript:void(0)" className={`passed ${stared || game.star ? 'stared' : ''}`} <a href="javascript:void(0)" className={`passed ${stared || game.star ? 'stared' : ''}`}
{...titleObj} onClick={() => this.onFinish()}> {...titleObj} onClick={() => this.onFinish()}>
{`查看效果`} {`查看效果`}
{/* ${ moment(this.state.timeRemain * 1000).format('mm:ss') } */}
</a> </a>
} }
{/*
(this.state.timeRemain ?
<Tooltip title={"注意效果查看服务只会保留5分钟"} disableFocusListener={true}>
</Tooltip>
:
<Tooltip title={"效果查看服务已被终止运行,需要重新评测后才能查看"} disableFocusListener={true}>
<a href="javascript:void(0)" className={`passed ${ stared || game.star ? 'stared' : '' }`}
{...titleObj} onClick={()=>{}} style={{ backgroundColor: 'gray'}}>
{ `查看效果` }
</a>
</Tooltip>
)
*/}
{/*
注意效果查看服务只会保留5分钟
效果查看服务已被终止运行需要重新评测后才能查看
*/}
</p> </p>
</div> </div>
</div> </div>

Loading…
Cancel
Save