From 5977fa4a24947d9678ab363ce832f53904eb8616 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Thu, 12 Dec 2019 09:40:27 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/tpm/TPMChallengeContainer.js | 4 ++-- public/react/src/modules/tpm/TPMDataset.js | 8 ++++--- .../Challenges/Challengesjupyter.js | 23 +++++++++++++++---- 3 files changed, 26 insertions(+), 9 deletions(-) diff --git a/public/react/src/modules/tpm/TPMChallengeContainer.js b/public/react/src/modules/tpm/TPMChallengeContainer.js index d58a17e55..9fc1f44f4 100644 --- a/public/react/src/modules/tpm/TPMChallengeContainer.js +++ b/public/react/src/modules/tpm/TPMChallengeContainer.js @@ -15,8 +15,8 @@ class TPMChallengeContainer extends Component { render() { const { tpmLoading } = this.props; const user = this.props.current_user; - console.log("TPMChallengeContainerTPMChallengeContainer"); - console.log(this.props); + // console.log("TPMChallengeContainerTPMChallengeContainer"); + // console.log(this.props); return ( diff --git a/public/react/src/modules/tpm/TPMDataset.js b/public/react/src/modules/tpm/TPMDataset.js index d7f14b84e..897fbe221 100644 --- a/public/react/src/modules/tpm/TPMDataset.js +++ b/public/react/src/modules/tpm/TPMDataset.js @@ -103,8 +103,8 @@ class TPMDataset extends Component { selectedRowKeysdata:mydata, selectedRowKeys: datas, }) - console.log(mydata); - console.log(datas); + // console.log(mydata); + // console.log(datas); } else { @@ -237,6 +237,7 @@ class TPMDataset extends Component { // 附件相关 START handleChange = (info) => { + debugger if(info.file.status === 'uploading' || info.file.status === 'done' || info.file.status === 'removed') { let {fileList} = this.state; @@ -256,6 +257,7 @@ class TPMDataset extends Component { } onAttachmentRemove = (file) => { + debugger if(!file.percent || file.percent == 100){ confirm({ title: '确定要删除这个附件吗?', @@ -357,7 +359,7 @@ class TPMDataset extends Component { onChange: this.handleChange, onRemove: this.onAttachmentRemove, beforeUpload: (file, fileList) => { - + debugger if (this.state.fileList.length >= 1) { return false } diff --git a/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js b/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js index cf7243bf1..86e7f2c04 100644 --- a/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js +++ b/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js @@ -60,11 +60,26 @@ class Challengesjupyter extends Component { componentDidMount() { setTimeout(this.ChallengesList(), 1000); + // console.log("componentDidMount"); + // console.log("Challengesjupyter"); + // console.log(this.props); + let id = this.props.match.params.shixunId; + let ChallengesURL = `/jupyters/get_info_with_tpm.json`; + let datas={ + identifier:id, + } + axios.get(ChallengesURL, {params: datas}).then((response) => { + if (response.status === 200) { + if (response.data.status === 403||response.data.status === 401||response.data.status === 500) { - console.log("componentDidMount"); - console.log("Challengesjupyter"); - console.log(this.props); - + }else{ + console.log("componentDidMountChallengesjupyter"); + console.log(response.data); + } + } + }).catch((error) => { + console.log(error) + });