dev_static
杨树明 5 years ago
parent 78f68f8955
commit b3d970cfaf

@ -530,20 +530,22 @@ class Coursesleftnav extends Component{
{name:value}).then((result)=>{ {name:value}).then((result)=>{
if(result!=undefined){ if(result!=undefined){
if(result.data.status===0){ if(result.data.status===0){
// window.location.reload()
// this.updasaveNavmoda()
//
notification.open({ notification.open({
message:"提示", message:"提示",
description:result.data.message description:result.data.message
}); });
trigger('updateNavSuccess')
if(positiontype==="files"){ if(positiontype==="files"){
this.updasaveNavmoda()
trigger('updateNavSuccess')
window.location.href=`/courses/${coursesId}/file/${result.data.category_id}`; window.location.href=`/courses/${coursesId}/file/${result.data.category_id}`;
} }
if(positiontype==="boards"){ if(positiontype==="boards"){
this.updasaveNavmoda()
trigger('updateNavSuccess')
window.location.href=`/courses/${coursesId}/boards/${result.data.category_id}`; window.location.href=`/courses/${coursesId}/boards/${result.data.category_id}`;
} }

@ -131,8 +131,11 @@ class Exercisesetting extends Component{
// } // }
// 已有设置数据的查询 // 已有设置数据的查询
getSettingInfo=()=>{ getSettingInfo=(type)=>{
this.props.Commonheadofthetestpapers() if(type!=1){
this.props.Commonheadofthetestpapers()
}
let Id=this.props.match.params.Id; let Id=this.props.match.params.Id;
let url=`/exercises/${Id}/exercise_setting.json`; let url=`/exercises/${Id}/exercise_setting.json`;
axios.get(url).then((result)=>{ axios.get(url).then((result)=>{
@ -241,10 +244,10 @@ class Exercisesetting extends Component{
let{unified_setting}=this.state let{unified_setting}=this.state
if(unified_setting==true){ if(unified_setting==true){
console.log("统一设置"); console.log("统一设置");
this.UnifiedSetting(); this.UnifiedSetting( );
}else{ }else{
console.log("非统一设置"); console.log("非统一设置");
this.NotUnifiedSetting(); this.NotUnifiedSetting( );
} }
} }
}) })
@ -347,7 +350,7 @@ class Exercisesetting extends Component{
console.log(result) console.log(result)
if(result.status==200){ if(result.status==200){
this.props.showNotification(`${result.data.message}`); this.props.showNotification(`${result.data.message}`);
this.getSettingInfo(); this.getSettingInfo(1);
this.cancelEdit(); this.cancelEdit();
} }
}) })
@ -367,7 +370,7 @@ class Exercisesetting extends Component{
if(result.status==200){ if(result.status==200){
this.props.showNotification(`${result.data.message}`); this.props.showNotification(`${result.data.message}`);
this.cancelEdit(); this.cancelEdit();
this.getSettingInfo(); this.getSettingInfo(1);
} }
}); });
@ -559,7 +562,7 @@ class Exercisesetting extends Component{
} }
//取消编辑 //取消编辑
cancelEdit=()=>{ cancelEdit=()=>{
this.getSettingInfo(); this.getSettingInfo(1);
this.setState({ this.setState({
flagPageEdit:false flagPageEdit:false
}) })

Loading…
Cancel
Save