|
|
|
@ -28,6 +28,7 @@ class Challengesjupyter extends Component {
|
|
|
|
|
enlarge:false,
|
|
|
|
|
fileList:[],
|
|
|
|
|
shuaxin:false,
|
|
|
|
|
showtime:false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -152,8 +153,12 @@ class Challengesjupyter extends Component {
|
|
|
|
|
if(e){
|
|
|
|
|
if(e.data){
|
|
|
|
|
if(e.data==="jupytermessage"){
|
|
|
|
|
that.modifyjupyter();
|
|
|
|
|
|
|
|
|
|
if(this.state.showtime===false){
|
|
|
|
|
that.modifyjupyter();
|
|
|
|
|
this.setState({
|
|
|
|
|
showtime:true
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -213,7 +218,7 @@ class Challengesjupyter extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
modifyjupyter=()=>{
|
|
|
|
|
this.props.showNotification('实训正在保存中...!');
|
|
|
|
|
// this.props.showNotification('实训正在保存中...!');
|
|
|
|
|
|
|
|
|
|
let id=this.props.match.params.shixunId;
|
|
|
|
|
var jupyter_port="";
|
|
|
|
@ -233,11 +238,23 @@ class Challengesjupyter extends Component {
|
|
|
|
|
if (result.data.status === 0) {
|
|
|
|
|
// this.props.showNotification(`应用成功`);
|
|
|
|
|
console.log("应用成功了");
|
|
|
|
|
this.props.showNotification('实训保存成功!');
|
|
|
|
|
this.props.showNotification('保存成功!');
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
this.setState({
|
|
|
|
|
showtime:false
|
|
|
|
|
})
|
|
|
|
|
}, 500)
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
this.setState({
|
|
|
|
|
showtime:false
|
|
|
|
|
})
|
|
|
|
|
this.props.showNotification(result.data.message);
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
this.setState({
|
|
|
|
|
showtime:false
|
|
|
|
|
})
|
|
|
|
|
this.props.showNotification('实训保存失败!');
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|