dev_aliyun2
harry 5 years ago
parent 7c1afec61d
commit edd30558a4

@ -1,6 +1,10 @@
import React, { Component } from "react"; import React, { Component } from "react";
import { SnackbarHOC } from 'educoder';
import axios from 'axios'; import axios from 'axios';
import { Breadcrumb } from "antd"; import {
Breadcrumb
} from "antd";
import TPMIndexHOC from "../tpm/TPMIndexHOC"; import TPMIndexHOC from "../tpm/TPMIndexHOC";
import './questioncss/questioncom.css'; import './questioncss/questioncom.css';
import '../tpm/newshixuns/css/Newshixuns.css'; import '../tpm/newshixuns/css/Newshixuns.css';
@ -8,6 +12,7 @@ import Paperreview_item from "./Paperreview_item"
import Bottomsubmit from "../../modules/modals/Bottomsubmit"; import Bottomsubmit from "../../modules/modals/Bottomsubmit";
import Comthetestpaperst from "./comthetestpaper/Comthetestpaperst"; import Comthetestpaperst from "./comthetestpaper/Comthetestpaperst";
import NewMyShixunModel from "../question/NewMyShixunModel"; import NewMyShixunModel from "../question/NewMyShixunModel";
import IntelligentModel from "../question/component/IntelligentModel"
//人工组卷预览 //人工组卷预览
let Changes = true; let Changes = true;
class Paperreview extends Component { class Paperreview extends Component {
@ -35,6 +40,8 @@ class Paperreview extends Component {
name: null, name: null,
duration: null, duration: null,
newmyshixunmodelbool: false, newmyshixunmodelbool: false,
artificialtype: "artificial",
Intelligentformation: false,
} }
// single_questions:null, 单选题 // single_questions:null, 单选题
@ -257,6 +264,7 @@ class Paperreview extends Component {
} }
setnewmyshixunmodelbool = (bool) => { setnewmyshixunmodelbool = (bool) => {
//人工组卷
if (bool === true) { if (bool === true) {
let scrollToTop = window.setInterval(function () { let scrollToTop = window.setInterval(function () {
let pos = window.pageYOffset; let pos = window.pageYOffset;
@ -265,6 +273,48 @@ class Paperreview extends Component {
} else { } else {
window.clearInterval(scrollToTop); window.clearInterval(scrollToTop);
} }
}, 2);
}
this.setState({
newmyshixunmodelbool: bool
})
var data = {}
this.getdata(data);
}
//换题型
Replacementtype = (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) => { }).catch((error) => {
//console.log(error); //console.log(error);
}) })
@ -299,19 +349,28 @@ class Paperreview extends Component {
setIntelligentformation = (bool) => { setIntelligentformation = (bool) => {
this.setState({ this.setState({
newmyshixunmodelbool: bool Intelligentformation: bool
}) })
var data = {} }
this.getdata(data); Confirmationofvolumeformations = () => {
this.setState({
Intelligentformation: false
})
} }
render() { 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, Intelligentformation } = this.state;
const params = this.props && this.props.match && this.props.match.params; const params = this.props && this.props.match && this.props.match.params;
// ////console.log(params); // ////console.log(params);
return ( return (
<div> <div>
<div id={"Itembankstopid"} className="newMain clearfix intermediatecenter " <div id={"Itembankstopid"} className="newMain clearfix intermediatecenter "
> >
{
Intelligentformation === true ?
<IntelligentModel getdata={(data) => this.getdata(data)} {...this.state} {...this.props} exam_id={this.props.match.params.id} Confirmationofvolumeformations={() => this.Confirmationofvolumeformations()}></IntelligentModel>
: ""
}
{ {
newmyshixunmodelbool === true ? newmyshixunmodelbool === true ?
<style>{ <style>{

Loading…
Cancel
Save