dev_aliyun2
杨树林 5 years ago committed by harry
parent 2a6f6e5fee
commit c651b9ce9d

@ -1,5 +1,4 @@
import React, { Component } from "react";
import { SnackbarHOC } from 'educoder';
import axios from 'axios';
import { Breadcrumb } from "antd";
import TPMIndexHOC from "../tpm/TPMIndexHOC";
@ -10,6 +9,7 @@ import Bottomsubmit from "../../modules/modals/Bottomsubmit";
import Comthetestpaperst from "./comthetestpaper/Comthetestpaperst";
import NewMyShixunModel from "../question/NewMyShixunModel";
//人工组卷预览
let Changes=true;
class Paperreview extends Component {
constructor(props) {
super(props);
@ -263,8 +263,39 @@ class Paperreview extends Component {
} else {
window.clearInterval(scrollToTop);
}
}, 2);
}).catch((error) => {
//console.log(error);
})
}
//换题
Changingtopics=(id)=>{
if(Changes===true){
Changes=false;
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);
}
setTimeout(()=>{
Changes=true;
},1000);
}).catch((error) => {
//console.log(error);
setTimeout(()=>{
Changes=true;
},1000);
})
}
}
setIntelligentformation=(bool)=>{
this.setState({
newmyshixunmodelbool: bool
})

@ -82,6 +82,19 @@ class Paperreview_single extends Component {
const options = [
'bold', // 加粗
]
try {
if(itemsnamesy.constructor === Object){
// console.log("是对象");
// console.log(itemsnamesy);
}else {
// console.log("不是对象");
// console.log(itemsnamesy);
itemsnamesy=itemsnamesy+"";
}
}catch (e) {
}
return (
<div key={indexxy}
className={"w100s borderwdswuh mb20 pd20 "}

@ -137,31 +137,32 @@ class Listjihe extends Component {
}
}
}
var itemssname = "";
try {
itemssname = JSON.parse(items.name);
} catch (e) {
}
if (itemssname === undefined) {
itemssname = items.name
}
}
var itemssname="";
try {
itemssname= JSON.parse(items.name);
}catch (e) {
}
if(itemssname===undefined){
itemssname=items.name+""
}
var itemsnamesy = "";
try {
itemsnamesy = JSON.parse(items && items.program_attr && items.program_attr.description);
} catch (e) {
itemsnamesy = items && items.program_attr && items.program_attr.description;
}
}catch (e) {
itemsnamesy=items&&items.program_attr&&items.program_attr.description+"";
}
var analysisnames = "";
try {
analysisnames = JSON.parse(items && items.analysis);
}catch (e) {
analysisnames=items&&items.analysis;
analysisnames=items&&items.analysis+"";
}
// console.log(items.name);
// console.log(itemsnamesy);
@ -170,6 +171,21 @@ class Listjihe extends Component {
const options = [
'bold', // 加粗
]
try {
if(itemsnamesy.constructor === Object){
// console.log("是对象");
// console.log(itemsnamesy);
}else {
// console.log("不是对象");
// console.log(itemsnamesy);
itemsnamesy=itemsnamesy+"";
}
}catch (e) {
}
return (
<div key={keindex}
className={chakanjiexiboolindex === keindex ? "w100s borderwds283 pd20 mb20 listjihecolors" : "w100s borderwds pd20 mb20 listjihecolors"}>

@ -159,7 +159,9 @@ class Listjihe extends Component {
</div>
</div>
<div className="sjfqks reversedirection">
<div className="sjfqks reversedirection" style={{
display: "none"
}}>
<div className="newbutoonss">
<p className="newbutoontess" >发起考试</p>
</div>

@ -80,6 +80,19 @@ class Paperlibraryseeid_items extends Component {
const options = [
'bold', // 加粗
]
try {
if(itemsnamesy.constructor === Object){
// console.log("是对象");
// console.log(itemsnamesy);
}else {
// console.log("不是对象");
// console.log(itemsnamesy);
itemsnamesy=itemsnamesy+"";
}
}catch (e) {
}
return (
<div key={indexxy}
className={"w100s borderwdswuh mb20 pd20 "}

Loading…
Cancel
Save