试卷题库试卷编辑更新接口

dev_jupyter
杨树林 5 years ago
parent 647ed7315f
commit 667d6aef03

@ -192,7 +192,6 @@ class Paperreview extends Component {
}
preservation = () => {
//保存试卷
debugger
if(this.state.Cohetepaperbool===true){
if (this.contentMdRef.Getdatas().length === 0) {
this.scrollToAnchor("Itembankstopid");

@ -141,7 +141,33 @@ class Paperlibraryeditid extends Component {
}
preservation = () => {
//保存试卷
if (this.Judquestio.Getdatas().length === 0) {
this.scrollToAnchor("Itembankstopid");
return;
}
var myrbkc=[];
var Getdatasdatas=this.Judquestio.Getdatas()[2].rbzsd;
for(let myda of Getdatasdatas) {
myrbkc.push(myda.id);
}
const url = `/examination_banks/${this.props.match.params.id}.json`;
var data={
difficulty:this.Judquestio.Getdatas()[0].rbnd,
name:this.Judquestio.Getdatas()[4].classroom,
duration:this.Judquestio.Getdatas()[5].kssc,
discipline_id: this.Judquestio.Getdatas()[3].rbkc[0],
sub_discipline_id: this.Judquestio.Getdatas()[3].rbkc[1],
tag_discipline_id: myrbkc,
}
axios.put(url, data)
.then((result) => {
if (result.data.status === 0) {
this.props.showNotification(`试卷更新成功`);
this.props.history.replace('./paperlibrary');
}
}).catch((error) => {
console.log(error);
})
}

Loading…
Cancel
Save