Merge branches 'dev_new_shixunsrepository' and 'develop' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_new_shixunsrepository

dev_new_shixunsrepository
杨树明 5 years ago
commit a1a8eaea11

@ -327,6 +327,7 @@ function JupyterTPI (props) {
}, [props]); }, [props]);
const onFinish= () =>{ const onFinish= () =>{
Modal.destroyAll();
Modal.confirm({ Modal.confirm({
title: '倒计时截止', title: '倒计时截止',
content: ( content: (
@ -346,7 +347,7 @@ function JupyterTPI (props) {
title: '服务中断提醒', title: '服务中断提醒',
content: ( content: (
<p style={{ lineHeight: '24px' }}> <p style={{ lineHeight: '24px' }}>
jupyter将于<Countdown value={jupytertime} format="HH:mm"/>分钟后服务中断是否需要延长使用时 jupyter将于<span className={"Countdownfonttpi"}><Countdown value={jupytertime} format="HH:mm:ss"/></span>使
</p> </p>
), ),
okText: '立即延长', okText: '立即延长',

@ -250,3 +250,12 @@ line-height: 50px !important;
overflow: hidden; overflow: hidden;
display: block; display: block;
} }
.Countdownfonttpi{
width: 60px;
display: inline-block;
}
.Countdownfonttpi .ant-statistic-content-value{
font-size: 14px;
}

@ -120,12 +120,12 @@ class Challengesjupyter extends Component {
let remainingSeconds=response.data.remainingSeconds; let remainingSeconds=response.data.remainingSeconds;
// let summain=3600 * 1000; // let summain=3600 * 1000;
let sums= remainingSeconds * 1000; let sums= remainingSeconds * 1000;
let endsms=(remainingSeconds-300<0?0:remainingSeconds-300)*1000 let endsms=(remainingSeconds-300<=0?0:remainingSeconds-300)*1000
// let sum=summain-sums; // let sum=summain-sums;
setTimeout(()=>{ setTimeout(()=>{
this.setState({ this.setState({
jupytertime:Date.now() +sums, jupytertime:Date.now() +sums,
endtimes:endsms===0?Date.now() +1000:Date.now() +endsms endtimes:endsms===0?Date.now()+1000:Date.now() +endsms
}) })
},500); },500);
} }
@ -423,6 +423,7 @@ class Challengesjupyter extends Component {
} }
onFinish=()=>{ onFinish=()=>{
Modal.destroyAll();
let id=this.props.match.params.shixunId; let id=this.props.match.params.shixunId;
let that=this; let that=this;
Modal.confirm({ Modal.confirm({
@ -444,10 +445,10 @@ class Challengesjupyter extends Component {
let id=this.props.match.params.shixunId; let id=this.props.match.params.shixunId;
let that=this; let that=this;
Modal.confirm({ Modal.confirm({
title:"jupyter将于"+<Countdown value={this.state.jupytertime} format="HH:mm" onFinish={this.onFinish}/>+"分钟后服务中断,是否需要延长使用时间?", title:"服务中断提醒",
content: ( content: (
<p style={{ lineHeight: '24px' }}> <p style={{ lineHeight: '24px' }}>
命令行即将中断需要延长使用时间吗 jupyter将于<span className={"Countdownfonttpm"}><Countdown value={this.state.jupytertime} format="HH:mm:ss" onFinish={this.onFinish}/></span>使
</p> </p>
), ),
okText: '立即延长', okText: '立即延长',

@ -239,3 +239,12 @@
background-color: #29BD8B !important; background-color: #29BD8B !important;
border-color: transparent ; border-color: transparent ;
} }
.Countdownfonttpm{
width: 60px;
display: inline-block;
}
.Countdownfonttpm .ant-statistic-content-value{
font-size: 14px;
}

@ -273,9 +273,9 @@ export const timeinfo_with_tpi = (identifier, dispatch) => {
let remainingSeconds=res.data.remainingSeconds; let remainingSeconds=res.data.remainingSeconds;
// let summain=3600 * 1000; // let summain=3600 * 1000;
let sums= remainingSeconds * 1000; let sums= remainingSeconds * 1000;
let endsms=(remainingSeconds-300<0?0:remainingSeconds-300)*1000 let endsms=(remainingSeconds-300<=0?0:remainingSeconds-300)*1000
// let sum=summain-sums; // let sum=summain-sums;
setTimeout(()=>{ dispatch(addjypertime(Date.now() +sums,endsms===0?Date.now() +1000:Date.now() +endsms))},500); setTimeout(()=>{ dispatch(addjypertime(Date.now() +sums,endsms===0?Date.now()+1000:Date.now() +endsms))},500);
} }
} }
} }

Loading…
Cancel
Save