|
|
|
@ -51,6 +51,13 @@ class ActionView extends Component {
|
|
|
|
|
|
|
|
|
|
componentDidMount() {
|
|
|
|
|
// request
|
|
|
|
|
window._tpiWidthResize = () => {
|
|
|
|
|
if (window.$('#actionView').width() < 580) {
|
|
|
|
|
window.$('.time_limit').hide()
|
|
|
|
|
} else {
|
|
|
|
|
window.$('.time_limit').show()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
showWebDisplay(challenge) {
|
|
|
|
@ -59,10 +66,17 @@ class ActionView extends Component {
|
|
|
|
|
/*<span className="mt10 -flex c_grey ml15" id="time-consuming">耗时:0 天 3 小时 11 分钟 57 秒 </span>*/
|
|
|
|
|
render() {
|
|
|
|
|
const { onRunCodeTest, onShowPrevStage, onShowNextStage, gameBuilding
|
|
|
|
|
, game, classes, st, shixun, record, challenge } = this.props;
|
|
|
|
|
, game, classes, st, shixun, record, challenge, time_limit } = this.props;
|
|
|
|
|
return (
|
|
|
|
|
<div className="-flex -layout-h" id="game_operate_action">
|
|
|
|
|
<style>{`
|
|
|
|
|
.time_limit {
|
|
|
|
|
margin-right: 16px;
|
|
|
|
|
}
|
|
|
|
|
`}</style>
|
|
|
|
|
<span className="mt10 -flex c_grey ml15" id="time-consuming">
|
|
|
|
|
{!!time_limit &&
|
|
|
|
|
<span className="time_limit">{`本关最大执行时间:${time_limit}秒`}</span>}
|
|
|
|
|
{!gameBuilding && record ?
|
|
|
|
|
<Tooltip title={ "本次评测耗时(编译、运行总时间)" }>
|
|
|
|
|
<span>{ record } 秒</span>
|
|
|
|
@ -73,7 +87,9 @@ class ActionView extends Component {
|
|
|
|
|
{/*将第一个按钮改为visibility方式隐藏,不然加载时测评按钮会出现没有垂直居中的情况*/}
|
|
|
|
|
<Tooltip title={ "倒计时为0时,服务将被关闭" }>
|
|
|
|
|
<Button size="small" className={classes.button + ' actionViewfirstButton'} onClick={()=>this.showWebDisplay(challenge)}
|
|
|
|
|
style={{ visibility: challenge.showWebDisplayButton ? '': 'hidden'}} id="showWebDisplayButton">
|
|
|
|
|
style={{ visibility: challenge.showWebDisplayButton ? '': 'hidden'}} id="showWebDisplayButton"
|
|
|
|
|
style={{ display: challenge.showWebDisplayButton ? 'flex': 'none'}}
|
|
|
|
|
>
|
|
|
|
|
查看效果
|
|
|
|
|
</Button>
|
|
|
|
|
</Tooltip>
|
|
|
|
|