From fc766e206c91b6e4474daf2e5ebf0b5f5eb2edc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Mon, 6 Jan 2020 15:49:48 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4jupyter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/tpm/jupyter/index.js | 3 ++- public/react/src/modules/tpm/jupyter/index.scss | 9 +++++++++ .../tpm/shixunchild/Challenges/Challengesjupyter.js | 9 +++++---- .../tpm/shixunchild/shixunchildCss/Challenges.css | 9 +++++++++ public/react/src/redux/actions/jupyter.js | 4 ++-- 5 files changed, 27 insertions(+), 7 deletions(-) diff --git a/public/react/src/modules/tpm/jupyter/index.js b/public/react/src/modules/tpm/jupyter/index.js index 3ba648ca8..6883aa72f 100644 --- a/public/react/src/modules/tpm/jupyter/index.js +++ b/public/react/src/modules/tpm/jupyter/index.js @@ -327,6 +327,7 @@ function JupyterTPI (props) { }, [props]); const onFinish= () =>{ + Modal.destroyAll(); Modal.confirm({ title: '倒计时截止', content: ( @@ -346,7 +347,7 @@ function JupyterTPI (props) { title: '服务中断提醒', content: (

- jupyter将于分钟后服务中断,是否需要延长使用时间? + jupyter将于时间后服务中断,是否需要延长使用时间?

), okText: '立即延长', diff --git a/public/react/src/modules/tpm/jupyter/index.scss b/public/react/src/modules/tpm/jupyter/index.scss index 5cc42b1be..b2c900652 100644 --- a/public/react/src/modules/tpm/jupyter/index.scss +++ b/public/react/src/modules/tpm/jupyter/index.scss @@ -249,4 +249,13 @@ line-height: 50px !important; height:1px; overflow: hidden; display: block; +} + +.Countdownfonttpi{ + width: 60px; + display: inline-block; +} + +.Countdownfonttpi .ant-statistic-content-value{ + font-size: 14px; } \ No newline at end of file diff --git a/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js b/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js index 746766dfa..c1a5f8dea 100644 --- a/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js +++ b/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js @@ -120,12 +120,12 @@ class Challengesjupyter extends Component { let remainingSeconds=response.data.remainingSeconds; // let summain=3600 * 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; setTimeout(()=>{ this.setState({ jupytertime:Date.now() +sums, - endtimes:endsms===0?Date.now() +1000:Date.now() +endsms + endtimes:endsms===0?Date.now()+1000:Date.now() +endsms }) },500); } @@ -423,6 +423,7 @@ class Challengesjupyter extends Component { } onFinish=()=>{ + Modal.destroyAll(); let id=this.props.match.params.shixunId; let that=this; Modal.confirm({ @@ -444,10 +445,10 @@ class Challengesjupyter extends Component { let id=this.props.match.params.shixunId; let that=this; Modal.confirm({ - title:"jupyter将于"++"分钟后服务中断,是否需要延长使用时间?", + title:"服务中断提醒", content: (

- 命令行即将中断,需要延长使用时间吗? + jupyter将于时间后服务中断,是否需要延长使用时间?

), okText: '立即延长', diff --git a/public/react/src/modules/tpm/shixunchild/shixunchildCss/Challenges.css b/public/react/src/modules/tpm/shixunchild/shixunchildCss/Challenges.css index d2bba2f84..b59bd86fd 100644 --- a/public/react/src/modules/tpm/shixunchild/shixunchildCss/Challenges.css +++ b/public/react/src/modules/tpm/shixunchild/shixunchildCss/Challenges.css @@ -239,3 +239,12 @@ background-color: #29BD8B !important; border-color: transparent ; } + +.Countdownfonttpm{ + width: 60px; + display: inline-block; +} + +.Countdownfonttpm .ant-statistic-content-value{ + font-size: 14px; +} \ No newline at end of file diff --git a/public/react/src/redux/actions/jupyter.js b/public/react/src/redux/actions/jupyter.js index 9b3bc4748..1a3654c3f 100644 --- a/public/react/src/redux/actions/jupyter.js +++ b/public/react/src/redux/actions/jupyter.js @@ -273,9 +273,9 @@ export const timeinfo_with_tpi = (identifier, dispatch) => { let remainingSeconds=res.data.remainingSeconds; // let summain=3600 * 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; - 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); } } }