|
|
|
@ -25,6 +25,7 @@ import Paperreview_item from "./Paperreview_item"
|
|
|
|
|
import Bottomsubmit from "../../modules/modals/Bottomsubmit";
|
|
|
|
|
import Comthetestpaperst from "./comthetestpaper/Comthetestpaperst";
|
|
|
|
|
import NewMyShixunModel from "../question/NewMyShixunModel";
|
|
|
|
|
import IntelligentModel from "../question/component/IntelligentModel"
|
|
|
|
|
//人工组卷预览
|
|
|
|
|
class Paperreview extends Component {
|
|
|
|
|
constructor(props) {
|
|
|
|
@ -52,6 +53,7 @@ class Paperreview extends Component {
|
|
|
|
|
duration:null,
|
|
|
|
|
newmyshixunmodelbool:false,
|
|
|
|
|
artificialtype:"artificial",
|
|
|
|
|
Intelligentformation:false,
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
// single_questions:null, 单选题
|
|
|
|
@ -246,7 +248,7 @@ class Paperreview extends Component {
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
//智能组卷
|
|
|
|
|
|
|
|
|
|
this.setIntelligentformation(true);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -272,47 +274,103 @@ class Paperreview extends Component {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
setnewmyshixunmodelbool=(bool)=>{
|
|
|
|
|
if(bool===true){
|
|
|
|
|
let scrollToTop = window.setInterval(function() {
|
|
|
|
|
let pos = window.pageYOffset;
|
|
|
|
|
if ( pos > 0 ) {
|
|
|
|
|
window.scrollTo( 0, pos - 20 ); // how far to scroll on each step
|
|
|
|
|
} else {
|
|
|
|
|
window.clearInterval( scrollToTop );
|
|
|
|
|
}
|
|
|
|
|
}, 2);
|
|
|
|
|
}
|
|
|
|
|
this.setState({
|
|
|
|
|
newmyshixunmodelbool:bool
|
|
|
|
|
})
|
|
|
|
|
var data = {}
|
|
|
|
|
this.getdata(data);
|
|
|
|
|
//人工组卷
|
|
|
|
|
if(bool===true){
|
|
|
|
|
let scrollToTop = window.setInterval(function() {
|
|
|
|
|
let pos = window.pageYOffset;
|
|
|
|
|
if ( pos > 0 ) {
|
|
|
|
|
window.scrollTo( 0, pos - 20 ); // how far to scroll on each step
|
|
|
|
|
} else {
|
|
|
|
|
window.clearInterval( scrollToTop );
|
|
|
|
|
}
|
|
|
|
|
}, 2);
|
|
|
|
|
}
|
|
|
|
|
this.setState({
|
|
|
|
|
newmyshixunmodelbool:bool
|
|
|
|
|
})
|
|
|
|
|
var data = {}
|
|
|
|
|
this.getdata(data);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//换题型
|
|
|
|
|
Replacementtype=(value)=>{
|
|
|
|
|
console.log("换题型");
|
|
|
|
|
console.log(value);
|
|
|
|
|
var item_types="";
|
|
|
|
|
if(value==="单选题"){
|
|
|
|
|
item_types="SINGLE";
|
|
|
|
|
}
|
|
|
|
|
else if(value==="多选题"){
|
|
|
|
|
item_types="MULTIPLE";
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else if(value==="判断题"){
|
|
|
|
|
item_types="JUDGMENT";
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else if(value==="编程题"){
|
|
|
|
|
item_types="PROGRAM";
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
const url=`/examination_intelligent_settings/${this.props.match.params.id}/exchange_items.json`;
|
|
|
|
|
let data={
|
|
|
|
|
item_type:item_types,
|
|
|
|
|
}
|
|
|
|
|
axios.post(url, data)
|
|
|
|
|
.then((result) => {
|
|
|
|
|
if (result.data.status == 0) {
|
|
|
|
|
console.log(result);
|
|
|
|
|
var data = {}
|
|
|
|
|
this.getdata(data);
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
console.log(error);
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
//换题
|
|
|
|
|
Changingtopics=(value)=>{
|
|
|
|
|
console.log("换题");
|
|
|
|
|
console.log(value);
|
|
|
|
|
Changingtopics=(id)=>{
|
|
|
|
|
const url=`/examination_intelligent_settings/${this.props.match.params.id}/exchange_one_item.json`;
|
|
|
|
|
let data={
|
|
|
|
|
item_id:id,
|
|
|
|
|
}
|
|
|
|
|
axios.post(url, data)
|
|
|
|
|
.then((result) => {
|
|
|
|
|
if (result.data.status == 0) {
|
|
|
|
|
console.log(result);
|
|
|
|
|
var data = {}
|
|
|
|
|
this.getdata(data);
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
console.log(error);
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
setIntelligentformation=(bool)=>{
|
|
|
|
|
this.setState({
|
|
|
|
|
Intelligentformation:bool
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
Confirmationofvolumeformations=()=>{
|
|
|
|
|
this.setState({
|
|
|
|
|
Intelligentformation:false
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
render() {
|
|
|
|
|
let {page, limit, count, Headertop, visible, placement, modalsType, item_type,artificialtype,Cohetepaperbool,newmyshixunmodelbool} = this.state;
|
|
|
|
|
let {page, limit, count, Headertop, visible, placement, modalsType, item_type,artificialtype,Cohetepaperbool,newmyshixunmodelbool,Intelligentformation} = this.state;
|
|
|
|
|
const params = this.props && this.props.match && this.props.match.params;
|
|
|
|
|
// //console.log(params);
|
|
|
|
|
return (
|
|
|
|
|
<div>
|
|
|
|
|
<div id={"Itembankstopid"} className="newMain clearfix intermediatecenter "
|
|
|
|
|
>
|
|
|
|
|
{
|
|
|
|
|
Intelligentformation===true?
|
|
|
|
|
<IntelligentModel {...this.state} {...this.props} exam_id={this.props.match.params.id} Confirmationofvolumeformations={()=>this.Confirmationofvolumeformations()}></IntelligentModel>
|
|
|
|
|
:""
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
newmyshixunmodelbool===true?
|
|
|
|
|
<style>{
|
|
|
|
|