competitions
杨树林 5 years ago
parent 4ff87e73fd
commit 25791baf47

@ -61,7 +61,7 @@ class Testpapersettinghomepage extends Component{
}
//试卷公用头部
Commonheadofthetestpaper=()=>{
// console.log("Commonheadofthetestpaper");
console.log("Commonheadofthetestpaper 试卷公用头部");
var exercise_id = this.props.match.params.Id;
var url = `/exercises/${exercise_id}/common_header.json`;
axios.get(url).then((response) => {
@ -250,10 +250,12 @@ class Testpapersettinghomepage extends Component{
// })
// }
getsetdata =()=>{
let{tab}=this.state;
// console.log("Testpapersettinghomepage");
// console.log("getsetdatassssss");
let{tab}=this.state;
try {
if(tab[0]===0){
console.log(this.child);
if(tab[0]==="0"){
this.child.Teacherliststudentlist();
}
}catch (e) {
@ -421,7 +423,7 @@ class Testpapersettinghomepage extends Component{
Exercisetype={"exercise"}
action={this.Commonheadofthetestpaper}
single={true}
getsetdata={()=>this.getsetdata()}
getsetdata={this.getsetdata}
></ImmediatelyPublish>
:"":""}
{isAdmin === true? <Link className="fr color-blue font-16 mt20 mr20" to={`/courses/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/edit`}>编辑试卷</Link>:""}

@ -89,6 +89,7 @@ class Immediatelypublish extends Component{
Cancel:this.homeworkhide,
Saves:this.homeworkstartend,
})
}
}).catch((error) => {
console.log(error)
@ -135,7 +136,8 @@ class Immediatelypublish extends Component{
}
}
}
}
//取消提示弹框
@ -189,7 +191,18 @@ class Immediatelypublish extends Component{
this.homeworkhide();
// 调用父级公共头部的接口刷新
this.props.action()
try {
this.props.action();
}catch (e) {
}
// 调用父级刷新数据的接口刷新
try {
this.props.getsetdata()
}catch (e) {
}
}
}).catch((error)=>{
console.log(error);
@ -274,7 +287,7 @@ class Immediatelypublish extends Component{
modalSave={this.modalCancel}
></Modals>
<WordsBtn style={this.props.style} className={this.props.className} onClick={this.homeworkstart}>立即发布</WordsBtn>
<WordsBtn style={this.props.style} className={this.props.className} onClick={()=>this.homeworkstart()}>立即发布</WordsBtn>
</React.Fragment>
)
}

Loading…
Cancel
Save