chromesetting
杨树林 5 years ago
commit 0653c29ab5

File diff suppressed because one or more lines are too long

@ -25,6 +25,7 @@ class Challengesjupyter extends Component {
boxoffsetHeigh:0, boxoffsetHeigh:0,
opentitletype:true, opentitletype:true,
isopentitletype:"Less", isopentitletype:"Less",
enlarge:false,
} }
} }
@ -79,6 +80,7 @@ class Challengesjupyter extends Component {
} }
componentDidMount() { componentDidMount() {
var that=this;
setTimeout(this.ChallengesList(), 1000); setTimeout(this.ChallengesList(), 1000);
let id = this.props.match.params.shixunId; let id = this.props.match.params.shixunId;
let ChallengesURL = `/jupyters/get_info_with_tpm.json`; let ChallengesURL = `/jupyters/get_info_with_tpm.json`;
@ -122,6 +124,14 @@ class Challengesjupyter extends Component {
}, 600) }, 600)
}); });
window.addEventListener('jupytermessage', (e) => {
console.log("触发了jupytermessage");
console.log("触发了jupytermessage");
that.modifyjupyter();
});
} }
updatamakedowns = () => { updatamakedowns = () => {
@ -191,6 +201,7 @@ class Challengesjupyter extends Component {
.then((result) => { .then((result) => {
if (result.data.status === 0) { if (result.data.status === 0) {
this.props.showNotification(`应用成功`); this.props.showNotification(`应用成功`);
console.log("触发了jupytermessage调用了应用成功");
} }
}).catch((error) => { }).catch((error) => {
}) })
@ -202,9 +213,15 @@ class Challengesjupyter extends Component {
}) })
} }
onclki=(bool)=>{
this.setState({
enlarge:bool
})
}
render() { render() {
let{ChallengesDataList,booljupyterurls}=this.state; let{ChallengesDataList,booljupyterurls,enlarge}=this.state;
let id = this.props.match.params.shixunId; let id = this.props.match.params.shixunId;
//老师 //老师
const is_teacher = this.props&&this.props.current_user&&this.props.current_user.is_teacher?this.props.current_user.is_teacher:false; const is_teacher = this.props&&this.props.current_user&&this.props.current_user.is_teacher?this.props.current_user.is_teacher:false;
@ -310,6 +327,7 @@ class Challengesjupyter extends Component {
display: flex; display: flex;
flex-direction:row-reverse; flex-direction:row-reverse;
} }
; ;
} }
` `
@ -321,16 +339,33 @@ class Challengesjupyter extends Component {
: :
( (
admin===true||business===true||mysidentity===true? admin===true||business===true||mysidentity===true?
<div className={"shixunjianjiecballenges edu-back-white sortinxdirection mt20"}> <div style={{
height: '63px',
}} className={enlarge?"shixunjianjiecballenges edu-back-white intermediatecenter fangdaone":"shixunjianjiecballenges edu-back-white mt20"}>
<div className={enlarge?"sortinxdirection jupyterswidth":"sortinxdirection"} >
<div className="renwuxiangssi sortinxdirection"> <div className="renwuxiangssi sortinxdirection">
<div><p className="renwuxiangqdiv">任务详情</p></div> <div><p className="renwuxiangqdiv">任务详情</p></div>
<div><p className="renwuxiangqdivtest ml1 shixunbingbaocun">请将实训题目写在下方并保存</p></div> <div><p className="renwuxiangqdivtest ml1 shixunbingbaocun">请将实训题目写在下方并保存</p></div>
</div> </div>
<div className="renwuxiangssit xaxisreverseorder"> <div className="renwuxiangssit xaxisreverseorder">
<div className="challenbaocun" onClick={() => this.modifyjupyter(this.state)}><p {
className="challenbaocuntest">应用到实训</p></div> enlarge===true?
<i className="iconfont icon-suoxiao2 font-20 ml2 ysliconfont" style={{
marginLeft: '30px',
}} onClick={()=>this.onclki(false)}></i>
:
<i className="iconfont icon-fangda font-20 ml2 ysliconfont" style={{
marginLeft: '30px',
}} onClick={()=>this.onclki(true)}></i>
}
<div className="challenbaocun" ><p
className="challenbaocuntest">导入</p>
</div>
</div> </div>
</div> </div>
</div>
: :
"" ""
) )
@ -365,7 +400,7 @@ class Challengesjupyter extends Component {
{ {
admin===true||business===true||mysidentity===true? admin===true||business===true||mysidentity===true?
<div> <div>
<div className="pb47"> <div className={"pb47"}>
{ {
this.state.jupyter_url===null || this.state.jupyter_url===undefined? this.state.jupyter_url===null || this.state.jupyter_url===undefined?
( (
@ -374,7 +409,7 @@ class Challengesjupyter extends Component {
:"" :""
) )
: :
<iframe src={this.state.jupyter_url} <iframe src={this.state.jupyter_url} className={enlarge?"fangdatwo":""}
sandbox="allow-same-origin allow-scripts allow-top-navigation " scrolling="no" id="frame" sandbox="allow-same-origin allow-scripts allow-top-navigation " scrolling="no" id="frame"
name="framename" width="100%" height="700" frameBorder="0" name="framename" width="100%" height="700" frameBorder="0"
></iframe> ></iframe>

@ -27,14 +27,14 @@
line-height: 25px; line-height: 25px;
} }
.challenbaocun{ .challenbaocun{
width:103px; width:60px;
height:30px; height:30px;
background:#29BD8B; background:#29BD8B;
border-radius:3px; border-radius:3px;
cursor:pointer cursor:pointer
} }
.challenbaocuntest{ .challenbaocuntest{
width:103px; width:60px;
height:30px; height:30px;
font-size:16px; font-size:16px;
color:#FFFFFF; color:#FFFFFF;
@ -185,4 +185,33 @@
.icon-shanchu_Hover:hover{ .icon-shanchu_Hover:hover{
color:rgb(255, 85, 85) !important; color:rgb(255, 85, 85) !important;
} }
.ysliconfont{
text-align: center;
line-height: 30px;
}
.fangdaone{
height: 63px;
width: 100%;
position: fixed;
top: 0px;
left: 0px;
z-index: 999999;
right: 0px;
}
.fangdatwo{
height: 100%;
width: 100%;
position: fixed;
top:0px;
margin-top: 63px;
bottom: 0px;
left: 0px;
z-index: 999999;
right: 0px;
}
.jupyterswidth{
width: 1140px;
}

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save