Merge branch 'dev_jupyter' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_jupyter

chromesetting
daiao 5 years ago
commit c15feef158

@ -241,16 +241,27 @@ class TPMDataset extends Component {
let {fileList} = this.state; let {fileList} = this.state;
if (info.file.status === 'uploading' || info.file.status === 'done' || info.file.status === 'removed') { if (info.file.status === 'uploading' || info.file.status === 'done' || info.file.status === 'removed') {
console.log("handleChange1"); console.log("handleChange1fileLists");
// if(fileList.length===0){ // if(fileList.length===0){
let fileLists = info.fileList; let fileLists = info.fileList;
console.log(fileLists);
this.setState({ this.setState({
// fileList:appendFileSizeToUploadFileAll(fileList), // fileList:appendFileSizeToUploadFileAll(fileList),
fileList: fileLists, fileList: fileLists,
deleteisnot: false deleteisnot: false
}); });
}
if(info.file.status === 'done'){
//done 成功就会调用这个方法
this.getdatas(); this.getdatas();
// } // this.props.showNotification(`上传文件成功`);
}else if(info.file.status === 'removed'){
// this.props.showNotification(`上传文件失败`);
}else if(info.file.status === 'uploading'){
// this.props.showNotification(`正在上传文件中`);
} }
} }
} }

@ -53,20 +53,44 @@ class TPMNav extends Component {
{/*jupyter*/} {/*jupyter*/}
{ {
this.props.is_jupyter===true? this.props.is_jupyter===true?
<Link to={`/shixuns/${shixunId}/dataset`} (
className={`${match.url.indexOf('dataset') != -1 ? 'active' : ''} fl mr40`}>数据集</Link> is_teacher===true?
<Link to={`/shixuns/${shixunId}/dataset`}
className={`${match.url.indexOf('dataset') != -1 ? 'active' : ''} fl mr40`}>数据集</Link>
:""
)
:"" :""
} }
{
this.props.is_jupyter === false ?
<Link to={`/shixuns/${shixunId}/shixun_discuss`}
className={`${match.url.indexOf('shixun_discuss') != -1 ? 'active' : ''} fl mr40`}>评论</Link>
:""
}
{
this.props.is_jupyter === false ?
<Link to={`/shixuns/${shixunId}/ranking_list`}
className={`${match.url.indexOf('ranking_list') != -1 ? 'active' : ''} fl mr40`}>排行榜</Link>:""
}
<Link to={`/shixuns/${shixunId}/shixun_discuss`} {this.props.identity >2||this.props.identity===undefined?"":
className={`${match.url.indexOf('shixun_discuss') != -1 ? 'active' : ''} fl mr40`}>评论</Link> (this.props.is_jupyter === false?
<Link to={`/shixuns/${shixunId}/audit_situation`}
className={`${match.url.indexOf('audit_situation') != -1 ? 'active' : ''} fl`}>审核情况</Link>
:
is_teacher===true?
<Link to={`/shixuns/${shixunId}/audit_situation`}
className={`${match.url.indexOf('audit_situation') != -1 ? 'active' : ''} fl`}>审核情况</Link>
:
""
)
<Link to={`/shixuns/${shixunId}/ranking_list`}
className={`${match.url.indexOf('ranking_list') != -1 ? 'active' : ''} fl mr40`}>排行榜</Link>
{this.props.identity >2||this.props.identity===undefined?"":<Link to={`/shixuns/${shixunId}/audit_situation`}
className={`${match.url.indexOf('audit_situation') != -1 ? 'active' : ''} fl`}>审核情况</Link>} }
{this.props.identity >4||this.props.identity===undefined ? "":<Link to={`/shixuns/${shixunId}/settings`} className="edu-default-btn edu-blueline-btn ml20 fr" {this.props.identity >4||this.props.identity===undefined ? "":<Link to={`/shixuns/${shixunId}/settings`} className="edu-default-btn edu-blueline-btn ml20 fr"
>配置</Link>} >配置</Link>}

@ -206,7 +206,7 @@ class Challengesjupyter extends Component {
// // _iframe.style.display= "none"; //修改样式 // // _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.state.jupyter_url === null || this.state.jupyter_url === undefined ?
"" ""
: :
<div className="sortinxdirection mt60"> (
<div className="renwuxiangssi sortinxdirection"> is_teacher===true?
<div><p className="renwuxiangqdiv">任务详情</p></div> <div className="sortinxdirection mt60">
<div><p className="renwuxiangqdivtest ml24">请将实训题目写在下方</p></div> <div className="renwuxiangssi sortinxdirection">
</div> <div><p className="renwuxiangqdiv">任务详情</p></div>
<div className="renwuxiangssit xaxisreverseorder"> <div><p className="renwuxiangqdivtest ml24">请将实训题目写在下方</p></div>
<div className="challenbaocun" onClick={() => this.modifyjupyter(this.state)}><p </div>
className="challenbaocuntest">应用到实训</p></div> <div className="renwuxiangssit xaxisreverseorder">
</div> <div className="challenbaocun" onClick={() => this.modifyjupyter(this.state)}><p
</div> className="challenbaocuntest">应用到实训</p></div>
</div>
</div>
:
""
)
} }
<style> <style>
@ -290,21 +296,25 @@ class Challengesjupyter extends Component {
` `
} }
</style> </style>
<div className="mt35"> {
{/*https://48888.jupyter.educoder.net/tree?*/} is_teacher===true?
<div className="mt35">
<div className="pb47"> {/*https://48888.jupyter.educoder.net/tree?*/}
{
this.state.jupyter_url===null || this.state.jupyter_url===undefined? <div className="pb47">
"" {
: this.state.jupyter_url===null || this.state.jupyter_url===undefined?
<iframe src={this.state.jupyter_url} ""
sandbox="allow-same-origin allow-scripts allow-top-navigation " scrolling="no" id="frame" :
name="framename" width="100%" height="700" frameBorder="0" <iframe src={this.state.jupyter_url}
></iframe> sandbox="allow-same-origin allow-scripts allow-top-navigation " scrolling="no" id="frame"
} name="framename" width="100%" height="700" frameBorder="0"
</div> ></iframe>
</div> }
</div>
</div>
:""
}
</div> </div>
</div> </div>

Loading…
Cancel
Save