|
|
|
@ -51,6 +51,7 @@ class Paperreview extends Component {
|
|
|
|
|
name:null,
|
|
|
|
|
duration:null,
|
|
|
|
|
newmyshixunmodelbool:false,
|
|
|
|
|
artificialtype:"artificial",
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
// single_questions:null, 单选题
|
|
|
|
@ -64,10 +65,27 @@ class Paperreview extends Component {
|
|
|
|
|
|
|
|
|
|
//初始化
|
|
|
|
|
componentDidMount() {
|
|
|
|
|
console.log("Paperreview.js");
|
|
|
|
|
console.log(this.props.match.params.type);
|
|
|
|
|
this.setState({
|
|
|
|
|
artificialtype:this.props.match.params.type
|
|
|
|
|
})
|
|
|
|
|
if(this.props.match.params.type==="artificial"){
|
|
|
|
|
//人工组卷
|
|
|
|
|
|
|
|
|
|
var data = {}
|
|
|
|
|
this.getdata(data);
|
|
|
|
|
}else{
|
|
|
|
|
//智能组卷
|
|
|
|
|
//
|
|
|
|
|
var data = {
|
|
|
|
|
exam_setting_id:this.props.match.params.id
|
|
|
|
|
}
|
|
|
|
|
this.getdata(data);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var data = {}
|
|
|
|
|
this.getdata(data);
|
|
|
|
|
let urls = `/disciplines.json`;
|
|
|
|
|
axios.get(urls, {
|
|
|
|
|
params: {
|
|
|
|
@ -193,43 +211,51 @@ class Paperreview extends Component {
|
|
|
|
|
}
|
|
|
|
|
preservation = () => {
|
|
|
|
|
//保存试卷
|
|
|
|
|
if(this.state.Cohetepaperbool===true){
|
|
|
|
|
if (this.contentMdRef.Getdatas().length === 0) {
|
|
|
|
|
this.scrollToAnchor("Itembankstopid");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
var myrbkc=[];
|
|
|
|
|
var Getdatasdatas=this.contentMdRef.Getdatas()[2].rbzsd;
|
|
|
|
|
for(let myda of Getdatasdatas) {
|
|
|
|
|
myrbkc.push(myda.id);
|
|
|
|
|
}
|
|
|
|
|
const url = `/examination_banks.json`;
|
|
|
|
|
var data={
|
|
|
|
|
difficulty:this.contentMdRef.Getdatas()[0].rbnd,
|
|
|
|
|
name:this.contentMdRef.Getdatas()[4].classroom,
|
|
|
|
|
duration:this.contentMdRef.Getdatas()[5].kssc,
|
|
|
|
|
discipline_id: this.contentMdRef.Getdatas()[3].rbkc[0],
|
|
|
|
|
sub_discipline_id: this.contentMdRef.Getdatas()[3].rbkc[1],
|
|
|
|
|
tag_discipline_id: myrbkc,
|
|
|
|
|
if(this.state.artificialtype==="artificial"){
|
|
|
|
|
if(this.state.Cohetepaperbool===true){
|
|
|
|
|
if (this.contentMdRef.Getdatas().length === 0) {
|
|
|
|
|
this.scrollToAnchor("Itembankstopid");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
var myrbkc=[];
|
|
|
|
|
var Getdatasdatas=this.contentMdRef.Getdatas()[2].rbzsd;
|
|
|
|
|
for(let myda of Getdatasdatas) {
|
|
|
|
|
myrbkc.push(myda.id);
|
|
|
|
|
}
|
|
|
|
|
const url = `/examination_banks.json`;
|
|
|
|
|
var data={
|
|
|
|
|
difficulty:this.contentMdRef.Getdatas()[0].rbnd,
|
|
|
|
|
name:this.contentMdRef.Getdatas()[4].classroom,
|
|
|
|
|
duration:this.contentMdRef.Getdatas()[5].kssc,
|
|
|
|
|
discipline_id: this.contentMdRef.Getdatas()[3].rbkc[0],
|
|
|
|
|
sub_discipline_id: this.contentMdRef.Getdatas()[3].rbkc[1],
|
|
|
|
|
tag_discipline_id: myrbkc,
|
|
|
|
|
}
|
|
|
|
|
axios.post(url, data)
|
|
|
|
|
.then((result) => {
|
|
|
|
|
if (result.data.status === 0) {
|
|
|
|
|
// this.props.showNotification(`组卷成功`);
|
|
|
|
|
this.props.history.replace('/paperlibrary');
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
console.log(error);
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
this.setCohetepaperbool(true);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
axios.post(url, data)
|
|
|
|
|
.then((result) => {
|
|
|
|
|
if (result.data.status === 0) {
|
|
|
|
|
// this.props.showNotification(`组卷成功`);
|
|
|
|
|
this.props.history.replace('/paperlibrary');
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
console.log(error);
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
this.setCohetepaperbool(true);
|
|
|
|
|
//智能组卷
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -265,7 +291,7 @@ class Paperreview extends Component {
|
|
|
|
|
this.getdata(data);
|
|
|
|
|
}
|
|
|
|
|
render() {
|
|
|
|
|
let {page, limit, count, Headertop, visible, placement, modalsType, item_type,Cohetepaperbool,newmyshixunmodelbool} = this.state;
|
|
|
|
|
let {page, limit, count, Headertop, visible, placement, modalsType, item_type,artificialtype,Cohetepaperbool,newmyshixunmodelbool} = this.state;
|
|
|
|
|
const params = this.props && this.props.match && this.props.match.params;
|
|
|
|
|
// //console.log(params);
|
|
|
|
|
return (
|
|
|
|
@ -305,11 +331,18 @@ class Paperreview extends Component {
|
|
|
|
|
<div className="w100s mt30">
|
|
|
|
|
{
|
|
|
|
|
Cohetepaperbool===false?
|
|
|
|
|
<Breadcrumb separator=">">
|
|
|
|
|
<Breadcrumb.Item href="/question">试题库</Breadcrumb.Item>
|
|
|
|
|
<Breadcrumb.Item className={"xiaoshou"}>人工组卷</Breadcrumb.Item>
|
|
|
|
|
<Breadcrumb.Item className={"xiaoshout"}>试卷预览</Breadcrumb.Item>
|
|
|
|
|
</Breadcrumb>
|
|
|
|
|
artificialtype==="artificial"?
|
|
|
|
|
<Breadcrumb separator=">">
|
|
|
|
|
<Breadcrumb.Item href="/question">试题库</Breadcrumb.Item>
|
|
|
|
|
<Breadcrumb.Item className={"xiaoshou"}>人工组卷</Breadcrumb.Item>
|
|
|
|
|
<Breadcrumb.Item className={"xiaoshout"}>试卷预览</Breadcrumb.Item>
|
|
|
|
|
</Breadcrumb>
|
|
|
|
|
:
|
|
|
|
|
<Breadcrumb separator=">">
|
|
|
|
|
<Breadcrumb.Item href="/paperlibrary">试卷库</Breadcrumb.Item>
|
|
|
|
|
<Breadcrumb.Item className={"/Integeneration"}>智能组卷</Breadcrumb.Item>
|
|
|
|
|
<Breadcrumb.Item className={"xiaoshout"}>试卷预览</Breadcrumb.Item>
|
|
|
|
|
</Breadcrumb>
|
|
|
|
|
:
|
|
|
|
|
<Breadcrumb separator=">">
|
|
|
|
|
<Breadcrumb.Item href="/question">试题库</Breadcrumb.Item>
|
|
|
|
|