diff --git a/public/react/src/modules/tpm/TPMDataset.js b/public/react/src/modules/tpm/TPMDataset.js index bf9795952..2d9d06200 100644 --- a/public/react/src/modules/tpm/TPMDataset.js +++ b/public/react/src/modules/tpm/TPMDataset.js @@ -241,16 +241,27 @@ class TPMDataset extends Component { let {fileList} = this.state; if (info.file.status === 'uploading' || info.file.status === 'done' || info.file.status === 'removed') { - console.log("handleChange1"); + console.log("handleChange1fileLists"); // if(fileList.length===0){ let fileLists = info.fileList; + console.log(fileLists); this.setState({ // fileList:appendFileSizeToUploadFileAll(fileList), fileList: fileLists, deleteisnot: false }); + } + if(info.file.status === 'done'){ + //done 成功就会调用这个方法 this.getdatas(); - // } + // this.props.showNotification(`上传文件成功`); + + }else if(info.file.status === 'removed'){ + // this.props.showNotification(`上传文件失败`); + + }else if(info.file.status === 'uploading'){ + // this.props.showNotification(`正在上传文件中`); + } } } diff --git a/public/react/src/modules/tpm/component/TPMNav.js b/public/react/src/modules/tpm/component/TPMNav.js index 12906fe5a..b18a1e909 100644 --- a/public/react/src/modules/tpm/component/TPMNav.js +++ b/public/react/src/modules/tpm/component/TPMNav.js @@ -53,20 +53,44 @@ class TPMNav extends Component { {/*jupyter*/} { this.props.is_jupyter===true? - 数据集 + ( + is_teacher===true? + 数据集 + :"" + ) + :"" } + { + this.props.is_jupyter === false ? + 评论 + :"" + } + { + this.props.is_jupyter === false ? + 排行榜:"" + } - 评论 + {this.props.identity >2||this.props.identity===undefined?"": + (this.props.is_jupyter === false? + 审核情况 + : + is_teacher===true? + 审核情况 + : + "" + + ) - 排行榜 - {this.props.identity >2||this.props.identity===undefined?"":审核情况} + + } {this.props.identity >4||this.props.identity===undefined ? "":配置} diff --git a/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js b/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js index 744b23daa..b59c4ebc2 100644 --- a/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js +++ b/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js @@ -206,7 +206,7 @@ class Challengesjupyter extends Component { // // _iframe.style.display= "none"; //修改样式 // } - + const is_teacher = this.props&&this.props.current_user&&this.props.current_user.is_teacher?this.props.current_user.is_teacher:false; @@ -257,16 +257,22 @@ class Challengesjupyter extends Component { this.state.jupyter_url === null || this.state.jupyter_url === undefined ? "" : -
-
-

任务详情

-

(请将实训题目写在下方)

-
-
-
this.modifyjupyter(this.state)}>

应用到实训

-
-
+ ( + is_teacher===true? +
+
+

任务详情

+

(请将实训题目写在下方)

+
+
+
this.modifyjupyter(this.state)}>

应用到实训

+
+
+ : + "" + ) + } -
- {/*https://48888.jupyter.educoder.net/tree?*/} - -
- { - this.state.jupyter_url===null || this.state.jupyter_url===undefined? - "" - : - - } -
-
+ { + is_teacher===true? +
+ {/*https://48888.jupyter.educoder.net/tree?*/} + +
+ { + this.state.jupyter_url===null || this.state.jupyter_url===undefined? + "" + : + + } +
+
+ :"" + }