删除目录

courseware
caicai8 5 years ago
parent b2d153169e
commit 303546c40a

@ -465,13 +465,14 @@ class Coursesleftnav extends Component{
Modalstopval:"隐藏后将不再显示此模块,",
ModalsBottomval:"后续可在课堂设置中重新勾选模块恢复显示",
ModalSave:()=>this.edithiddens(id),
loadtype:false
})
}else{
this.setState({
ModalsType:true,
Modalstopval:"您不能隐藏所有课堂模块,请至少保留",
ModalsBottomval:"其中一个模块。",
loadtype:true,
loadtype:false,
ModalSave:()=>this.cannerNavmoda(),
})
}
@ -674,6 +675,7 @@ class Coursesleftnav extends Component{
ModalsType:false,
Modalstopval:"",
loadtype:false,
antIcon:false
})
notification.open({
message: "删除成功",
@ -692,6 +694,7 @@ class Coursesleftnav extends Component{
axios.delete(url).then((result)=>{
if(result.data.status===0){
this.updatadeleteSecondary(mainurl || result.data.right_url);
}
}).catch((error)=>{
console.log(error)
@ -699,17 +702,16 @@ class Coursesleftnav extends Component{
}
deleteSecondary=(e,type,id,mainurl)=>{
e.stopPropagation();//阻止冒泡
debugger;
if(type===1){
let url="/course_second_categories/"+id+".json"
this.setState({
loadtype:false,
ModalsType:true,
Modalstopval:"该目录下的内容将被移动到父目录,",
ModalsBottomval:"是否确认删除?",
ModalSave:()=>this.deletenavchilds(url,mainurl),
loadtype:false
ModalSave:()=>this.deletenavchilds(url,mainurl)
})
}else if(type===2){
let url="/course_groups/"+id+".json"
this.setState({

Loading…
Cancel
Save