处理刷新

chromesetting
杨树林 5 years ago
parent 67fbcb823b
commit bd2e25ec00

@ -1,7 +1,7 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import { Link } from "react-router-dom"; import { Link } from "react-router-dom";
import { markdownToHTML, configShareForCustom,getImageUrl,getUploadActionUrlthree,appendFileSizeToUploadFileAll} from 'educoder' import { markdownToHTML, configShareForCustom,getImageUrl,getUploadActionUrlthree,appendFileSizeToUploadFileAll} from 'educoder'
import { Divider, Tooltip,Upload} from 'antd'; import { Divider, Tooltip,Upload,Spin} from 'antd';
import LoadingSpin from '../../../../common/LoadingSpin'; import LoadingSpin from '../../../../common/LoadingSpin';
import 'antd/lib/pagination/style/index.css'; import 'antd/lib/pagination/style/index.css';
import '../shixunchildCss/Challenges.css'; import '../shixunchildCss/Challenges.css';
@ -215,6 +215,8 @@ class Challengesjupyter extends Component {
modifyjupyter=()=>{ modifyjupyter=()=>{
this.props.showNotification('保存中!');
let id=this.props.match.params.shixunId; let id=this.props.match.params.shixunId;
var jupyter_port=""; var jupyter_port="";
try{ try{
@ -233,8 +235,12 @@ class Challengesjupyter extends Component {
if (result.data.status === 0) { if (result.data.status === 0) {
// this.props.showNotification(`应用成功`); // this.props.showNotification(`应用成功`);
console.log("应用成功了"); console.log("应用成功了");
this.props.showNotification('保存成功!');
}else{
this.props.showNotification(result.data.message);
} }
}).catch((error) => { }).catch((error) => {
this.props.showNotification('保存失败!');
}) })
} }
@ -274,6 +280,11 @@ class Challengesjupyter extends Component {
}else{ }else{
if(info.file.response.status===0){ if(info.file.response.status===0){
try {
this.modifyjupyter();
}catch (e) {
}
try { try {
this.setState({ this.setState({
jupyter_url : null, jupyter_url : null,
@ -555,6 +566,7 @@ class Challengesjupyter extends Component {
:"" :""
) )
: :
<iframe src={this.state.jupyter_url} className={enlarge?"fangdatwo":""} <iframe src={this.state.jupyter_url} className={enlarge?"fangdatwo":""}
scrolling="no" id="frame" scrolling="no" id="frame"
name="framename" width="100%" height="700" frameBorder="0" name="framename" width="100%" height="700" frameBorder="0"

Loading…
Cancel
Save