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

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

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

Loading…
Cancel
Save