competitions
杨树明 6 years ago
parent 66f03ecea2
commit 1e4d6e8f2b

@ -528,20 +528,31 @@ class Coursesleftnav extends Component{
axios.post(url,
{name:value}).then((result)=>{
if(result.data.status===0){
// window.location.reload()
this.updasaveNavmoda()
//
notification.open({
message:"提示",
description:result.data.message
});
trigger('updateNavSuccess')
if(positiontype==="files"){
window.location.href=`/courses/${coursesId}/file/${result.data.category_id}`;
// this.props.history.push(`/courses/${coursesId}/file/${result.data.category_id}`)
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"){
window.location.href=`/courses/${coursesId}/file/${result.data.category_id}`;
}
if(positiontype==="boards"){
window.location.href=`/courses/${coursesId}/boards/${result.data.category_id}`;
}
if(positiontype==="course_groups"){
window.location.href=`/courses/${coursesId}/course_groups/${result.data.group_id}`;
}
}
}
}
}).catch((error)=>{
console.log(error)
})
@ -549,17 +560,19 @@ class Coursesleftnav extends Component{
saveboardpost=(url,value)=>{
axios.put(url,
{name:value}).then((result)=>{
if(result.data.status===0){
// window.location.reload()
this.updasaveNavmoda()
trigger('updateNavSuccess')
//
notification.open({
message:"提示",
description:result.data.message
});
}
if(result!=undefined){
if(result.data.status===0){
// window.location.reload()
this.updasaveNavmoda()
trigger('updateNavSuccess')
//
notification.open({
message:"提示",
description:result.data.message
});
}
}
}).catch((error)=>{
console.log(error)
})
@ -599,7 +612,7 @@ class Coursesleftnav extends Component{
let newid=this.props.match.params.coursesId;
let url="/courses/"+newid+"/course_groups.json";
this.saveNavmodapost(url,NavmodalValue)
this.saveNavmodapost(url,NavmodalValue,this.state.positiontype,this.props.match.params.coursesId)
}else if(Navmodaltypename===3){
@ -620,7 +633,7 @@ class Coursesleftnav extends Component{
let newid=this.props.match.params.coursesId;
let url = "/courses/"+newid+"/boards.json";
this.saveNavmodapost(url,NavmodalValue)
this.saveNavmodapost(url,NavmodalValue,this.state.positiontype,this.props.match.params.coursesId)
}else if(Navmodaltypename===7) {
@ -708,13 +721,15 @@ class Coursesleftnav extends Component{
droppablepost=(url,list)=>{
axios.post(url,{position: list}).then((result)=>{
// this.updasaveNavmoda(result.data.message)
this.updasaveNavmoda()
//
notification.open({
message:"提示",
description:result.data.message
});
if(result!=undefined){
// this.updasaveNavmoda(result.data.message)
this.updasaveNavmoda()
//
notification.open({
message:"提示",
description:result.data.message
});
}
}).catch((error)=>{
console.log(error)
})

@ -19,7 +19,7 @@ class Exercisestatisticalresult extends Component {
super(props);
this.state = {
data:undefined,
sort:"percent",
sort:"asc",
exercise_group_id:[],
page:1,
limit:10,
@ -69,12 +69,19 @@ class Exercisestatisticalresult extends Component {
}
onSortTypeChange=(value)=>{
let{exercise_group_id,page,limit}=this.state;
onSortTypeChange=()=>{
let{exercise_group_id,page,limit,sort}=this.state;
let newdesc="asc";
if(sort==="desc"){
newdesc="asc"
}else{
newdesc="desc"
}
this.setState({
sort:value
sort:newdesc
})
this.updatefun(value,exercise_group_id,page,limit)
this.updatefun(newdesc,exercise_group_id,page,limit)
}
funtaskstatustwo=(checkedValues,list)=>{
@ -177,7 +184,7 @@ class Exercisestatisticalresult extends Component {
</style>
<div className="stud-class-set fafafa">
<li className="drop_down fr mt10 mr33" onClick={() => this.onSortTypeChange('percent')}>
<li className="drop_down fr mt10 mr33 cursor" onClick={() => this.onSortTypeChange()}>
{/*{sort==="percent"?"正确率":sort==="type"?"题型":sort==="position"?"题序":""}*/}
{/*<i className="iconfont icon-xiajiantou font-12 ml2"></i>*/}
{/*<ul className="drop_down_normal">*/}

Loading…
Cancel
Save