|
|
|
@ -30,6 +30,10 @@ class Intecomponents extends Component {
|
|
|
|
|
disciplmy: [],
|
|
|
|
|
item_banksedit: [],
|
|
|
|
|
newmyshixunmodelbool:false,
|
|
|
|
|
single_question_count:0,
|
|
|
|
|
multiple_question_count:0,
|
|
|
|
|
judgement_question_count:0,
|
|
|
|
|
program_question_count:0,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -107,12 +111,17 @@ class Intecomponents extends Component {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
getdatas=()=>{
|
|
|
|
|
if (this.Judquestio.Getdatas().length === 0) {
|
|
|
|
|
this.scrollToAnchor("Itembankstopid");
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
console.log(this.Judquestio.Getdatas());
|
|
|
|
|
var myrbkc=[];
|
|
|
|
|
var Getdatasdatas=this.Judquestio.Getdatas()[1].rbzsd;
|
|
|
|
|
for(let myda of Getdatasdatas) {
|
|
|
|
|
myrbkc.push(myda.id);
|
|
|
|
|
}
|
|
|
|
|
const url="/examination_intelligent_settings/optinal_items.jso";
|
|
|
|
|
const url="/examination_intelligent_settings/optinal_items.json";
|
|
|
|
|
var data={
|
|
|
|
|
sub_discipline_id:this.Judquestio.Getdatas()[2].rbkc[1],
|
|
|
|
|
tag_discipline_id:myrbkc,
|
|
|
|
@ -124,13 +133,63 @@ class Intecomponents extends Component {
|
|
|
|
|
data
|
|
|
|
|
}}).then((response) => {
|
|
|
|
|
if (response) {
|
|
|
|
|
console.log("智能组卷");
|
|
|
|
|
console.log(response);
|
|
|
|
|
if(response.data){
|
|
|
|
|
this.setState({
|
|
|
|
|
single_question_count:response.data.single_question_count,
|
|
|
|
|
multiple_question_count:response.data.multiple_question_count,
|
|
|
|
|
judgement_question_count:response.data.judgement_question_count,
|
|
|
|
|
program_question_count:response.data.program_question_count,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getdatass=(nandu)=>{
|
|
|
|
|
debugger
|
|
|
|
|
if (this.Judquestio.Getdatas().length === 0) {
|
|
|
|
|
this.scrollToAnchor("Itembankstopid");
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
console.log(this.Judquestio.Getdatas());
|
|
|
|
|
var myrbkc=[];
|
|
|
|
|
var Getdatasdatas=this.Judquestio.Getdatas()[1].rbzsd;
|
|
|
|
|
for(let myda of Getdatasdatas) {
|
|
|
|
|
myrbkc.push(myda.id);
|
|
|
|
|
}
|
|
|
|
|
const url="/examination_intelligent_settings/optinal_items.json";
|
|
|
|
|
var data={
|
|
|
|
|
sub_discipline_id:this.Judquestio.Getdatas()[2].rbkc[1],
|
|
|
|
|
tag_discipline_id:myrbkc,
|
|
|
|
|
source:this.Judquestio.Getdatas()[7].rbly,
|
|
|
|
|
difficulty:nandu,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
axios.get(url, {params: {
|
|
|
|
|
data
|
|
|
|
|
}}).then((response) => {
|
|
|
|
|
if (response) {
|
|
|
|
|
console.log("智能组卷");
|
|
|
|
|
console.log(response);
|
|
|
|
|
if(response.data){
|
|
|
|
|
this.setState({
|
|
|
|
|
single_question_count:response.data.single_question_count,
|
|
|
|
|
multiple_question_count:response.data.multiple_question_count,
|
|
|
|
|
judgement_question_count:response.data.judgement_question_count,
|
|
|
|
|
program_question_count:response.data.program_question_count,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
componentDidUpdate(prevProps) {
|
|
|
|
@ -203,6 +262,7 @@ class Intecomponents extends Component {
|
|
|
|
|
.then((result) => {
|
|
|
|
|
if (result.data.status == 0) {
|
|
|
|
|
console.log("组卷成功");
|
|
|
|
|
this.props.history.push(`/IntegenerationSee/Intelligence/${result.data.exam_setting_id}`);
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
console.log(error);
|
|
|
|
@ -228,7 +288,7 @@ class Intecomponents extends Component {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
|
let {paperlibrartdata,newmyshixunmodelbool} = this.state;
|
|
|
|
|
let {paperlibrartdata,newmyshixunmodelbool,single_question_count,multiple_question_count,judgement_question_count,program_question_count} = this.state;
|
|
|
|
|
const params = this.props && this.props.match && this.props.match.params;
|
|
|
|
|
return (
|
|
|
|
|
<div>
|
|
|
|
@ -252,7 +312,12 @@ class Intecomponents extends Component {
|
|
|
|
|
</Breadcrumb>
|
|
|
|
|
</div>
|
|
|
|
|
<Intelligentcomponents {...this.state} {...this.props}
|
|
|
|
|
single_question_count={this.state.single_question_count}
|
|
|
|
|
multiple_question_count={this.state.multiple_question_count}
|
|
|
|
|
judgement_question_count={this.state.judgement_question_count}
|
|
|
|
|
program_question_count={this.state.program_question_count}
|
|
|
|
|
getdatas={()=>this.getdatas()}
|
|
|
|
|
getdatass={(nd)=>this.getdatass(nd)}
|
|
|
|
|
getJudquestio={(ref) => this.getJudquestio(ref)}
|
|
|
|
|
></Intelligentcomponents>
|
|
|
|
|
|
|
|
|
|