|
|
|
@ -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);
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|