|
|
@ -1,12 +1,23 @@
|
|
|
|
import React, {Component} from "react";
|
|
|
|
import React, {Component} from "react";
|
|
|
|
|
|
|
|
import {Link, NavLink} from 'react-router-dom';
|
|
|
|
|
|
|
|
import {WordsBtn, ActionBtn, SnackbarHOC, getImageUrl} from 'educoder';
|
|
|
|
import axios from 'axios';
|
|
|
|
import axios from 'axios';
|
|
|
|
import {
|
|
|
|
import {
|
|
|
|
|
|
|
|
notification,
|
|
|
|
|
|
|
|
Spin,
|
|
|
|
|
|
|
|
Table,
|
|
|
|
Pagination,
|
|
|
|
Pagination,
|
|
|
|
|
|
|
|
Drawer,
|
|
|
|
|
|
|
|
Input,
|
|
|
|
|
|
|
|
Tooltip
|
|
|
|
} from "antd";
|
|
|
|
} from "antd";
|
|
|
|
|
|
|
|
import {parabola} from './animation/parabola'
|
|
|
|
import Headplugselections from "./component/Headplugselections";
|
|
|
|
import Headplugselections from "./component/Headplugselections";
|
|
|
|
import QuestionModal from "./component/QuestionModal";
|
|
|
|
import QuestionModal from "./component/QuestionModal";
|
|
|
|
import QuestionModals from "./component/QuestionModals";
|
|
|
|
import QuestionModals from "./component/QuestionModals";
|
|
|
|
import Contentpart from "./component/Contentpart";
|
|
|
|
import Contentpart from "./component/Contentpart";
|
|
|
|
|
|
|
|
import {TPMIndexHOC} from "../tpm/TPMIndexHOC";
|
|
|
|
|
|
|
|
import NoneData from './component/NoneData';
|
|
|
|
import './questioncss/questioncom.css';
|
|
|
|
import './questioncss/questioncom.css';
|
|
|
|
import Bottomsubmit from "../modals/Bottomsubmit";
|
|
|
|
import Bottomsubmit from "../modals/Bottomsubmit";
|
|
|
|
import QuestionModalys from "./component/QuestionModalys";
|
|
|
|
import QuestionModalys from "./component/QuestionModalys";
|
|
|
@ -98,7 +109,7 @@ class NewMyShixunModel extends Component {
|
|
|
|
page: this.state.page,
|
|
|
|
page: this.state.page,
|
|
|
|
per_page:10,
|
|
|
|
per_page:10,
|
|
|
|
oj_status:null,
|
|
|
|
oj_status:null,
|
|
|
|
item_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
|
|
|
|
exam_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id),
|
|
|
|
};
|
|
|
|
};
|
|
|
|
this.getdata(data);
|
|
|
|
this.getdata(data);
|
|
|
|
|
|
|
|
|
|
|
@ -124,7 +135,7 @@ class NewMyShixunModel extends Component {
|
|
|
|
page: 1,
|
|
|
|
page: 1,
|
|
|
|
per_page:10,
|
|
|
|
per_page:10,
|
|
|
|
oj_status:null,
|
|
|
|
oj_status:null,
|
|
|
|
item_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
|
|
|
|
exam_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id),
|
|
|
|
};
|
|
|
|
};
|
|
|
|
this.getdata(data);
|
|
|
|
this.getdata(data);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -148,7 +159,7 @@ class NewMyShixunModel extends Component {
|
|
|
|
page: 1,
|
|
|
|
page: 1,
|
|
|
|
per_page:10,
|
|
|
|
per_page:10,
|
|
|
|
oj_status:null,
|
|
|
|
oj_status:null,
|
|
|
|
item_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
|
|
|
|
exam_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id),
|
|
|
|
};
|
|
|
|
};
|
|
|
|
this.getdata(data);
|
|
|
|
this.getdata(data);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -205,11 +216,9 @@ class NewMyShixunModel extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
//获取题库筛选资料
|
|
|
|
//获取题库筛选资料
|
|
|
|
let urls = `/disciplines.json`;
|
|
|
|
let urls = `/disciplines.json`;
|
|
|
|
axios.get(urls, {
|
|
|
|
axios.get(urls, {params: {
|
|
|
|
params: {
|
|
|
|
|
|
|
|
source:"question"
|
|
|
|
source:"question"
|
|
|
|
}
|
|
|
|
}}).then((response) => {
|
|
|
|
}).then((response) => {
|
|
|
|
|
|
|
|
//console.log("Questiondisciplines");
|
|
|
|
//console.log("Questiondisciplines");
|
|
|
|
//console.log(response.data);
|
|
|
|
//console.log(response.data);
|
|
|
|
if (response) {
|
|
|
|
if (response) {
|
|
|
@ -277,7 +286,7 @@ class NewMyShixunModel extends Component {
|
|
|
|
page: 1,
|
|
|
|
page: 1,
|
|
|
|
per_page:10,
|
|
|
|
per_page:10,
|
|
|
|
oj_status:null,
|
|
|
|
oj_status:null,
|
|
|
|
item_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
|
|
|
|
exam_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id),
|
|
|
|
};
|
|
|
|
};
|
|
|
|
this.getdata(data);
|
|
|
|
this.getdata(data);
|
|
|
|
|
|
|
|
|
|
|
@ -414,28 +423,6 @@ class NewMyShixunModel extends Component {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
if(arr.length===Grandtotal){
|
|
|
|
|
|
|
|
myGrandtotal=true;
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
selectionbools:false,
|
|
|
|
|
|
|
|
selectallquestionsonthispages:false,
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
selectionbools:true,
|
|
|
|
|
|
|
|
selectallquestionsonthispages:true,
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}catch (e) {
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
selectionbools:true,
|
|
|
|
|
|
|
|
selectallquestionsonthispages:true,
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
paginationonChange = (pageNumber) => {
|
|
|
|
paginationonChange = (pageNumber) => {
|
|
|
@ -453,7 +440,7 @@ class NewMyShixunModel extends Component {
|
|
|
|
page: pageNumber,
|
|
|
|
page: pageNumber,
|
|
|
|
per_page:10,
|
|
|
|
per_page:10,
|
|
|
|
oj_status:this.state.oj_status,
|
|
|
|
oj_status:this.state.oj_status,
|
|
|
|
item_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
|
|
|
|
exam_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id),
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
this.getdata(data);
|
|
|
|
this.getdata(data);
|
|
|
@ -667,7 +654,7 @@ class NewMyShixunModel extends Component {
|
|
|
|
page: this.state.page,
|
|
|
|
page: this.state.page,
|
|
|
|
per_page:10,
|
|
|
|
per_page:10,
|
|
|
|
oj_status:this.state.oj_status,
|
|
|
|
oj_status:this.state.oj_status,
|
|
|
|
item_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
|
|
|
|
exam_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id),
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
this.getdata(data);
|
|
|
|
this.getdata(data);
|
|
|
@ -691,7 +678,7 @@ class NewMyShixunModel extends Component {
|
|
|
|
keyword: this.state.keywords,
|
|
|
|
keyword: this.state.keywords,
|
|
|
|
page: this.state.page,
|
|
|
|
page: this.state.page,
|
|
|
|
per_page:10,
|
|
|
|
per_page:10,
|
|
|
|
item_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
|
|
|
|
exam_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id),
|
|
|
|
};
|
|
|
|
};
|
|
|
|
this.getdata(data);
|
|
|
|
this.getdata(data);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -717,7 +704,7 @@ class NewMyShixunModel extends Component {
|
|
|
|
keyword: this.state.keywords,
|
|
|
|
keyword: this.state.keywords,
|
|
|
|
page: this.state.page,
|
|
|
|
page: this.state.page,
|
|
|
|
per_page:10,
|
|
|
|
per_page:10,
|
|
|
|
item_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
|
|
|
|
exam_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id),
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
this.getdata(data);
|
|
|
|
this.getdata(data);
|
|
|
@ -799,11 +786,6 @@ class NewMyShixunModel extends Component {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 不选用 Question.js页面也有个
|
|
|
|
|
|
|
|
NOgetitem_baskets=(data)=>{
|
|
|
|
|
|
|
|
let url="/examination_banks/cancel_items.json";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
axios.post(url, data)
|
|
|
|
axios.post(url, data)
|
|
|
|
.then((result) => {
|
|
|
|
.then((result) => {
|
|
|
|
if (result.data.status == 0) {
|
|
|
|
if (result.data.status == 0) {
|
|
|
@ -826,40 +808,6 @@ class NewMyShixunModel extends Component {
|
|
|
|
////console.log(error);
|
|
|
|
////console.log(error);
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//选用 Question.js页面也有个
|
|
|
|
|
|
|
|
getitem_baskets=(data)=>{
|
|
|
|
|
|
|
|
//选用题型可以上传单个 或者多个题型
|
|
|
|
|
|
|
|
let url = "";
|
|
|
|
|
|
|
|
if (this.props.exam_id === undefined) {
|
|
|
|
|
|
|
|
url = "/item_baskets.json";
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
url = "/examination_items.json";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
axios.post(url, data)
|
|
|
|
|
|
|
|
.then((result) => {
|
|
|
|
|
|
|
|
if (result.data.status == 0) {
|
|
|
|
|
|
|
|
var data = {
|
|
|
|
|
|
|
|
discipline_id: this.state.discipline_id,
|
|
|
|
|
|
|
|
sub_discipline_id: this.state.sub_discipline_id,
|
|
|
|
|
|
|
|
tag_discipline_id: this.state.tag_discipline_id,
|
|
|
|
|
|
|
|
public: this.state.defaultActiveKey,
|
|
|
|
|
|
|
|
difficulty: this.state.difficulty,
|
|
|
|
|
|
|
|
item_type: this.state.item_type,
|
|
|
|
|
|
|
|
keyword: this.state.keywords,
|
|
|
|
|
|
|
|
page: this.state.page,
|
|
|
|
|
|
|
|
per_page: 10,
|
|
|
|
|
|
|
|
item_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
this.getdatasy(data);
|
|
|
|
|
|
|
|
this.getbasket_listdata();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
|
|
|
////console.log(error);
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// 撤销
|
|
|
|
// 撤销
|
|
|
|
getitem_basketss=(id)=>{
|
|
|
|
getitem_basketss=(id)=>{
|
|
|
|
|
|
|
|
|
|
|
@ -978,7 +926,7 @@ class NewMyShixunModel extends Component {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const data={
|
|
|
|
const data={
|
|
|
|
item_ids:item_idsdata,
|
|
|
|
item_ids:item_idsdata,
|
|
|
|
item_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
|
|
|
|
exam_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -1002,11 +950,9 @@ class NewMyShixunModel extends Component {
|
|
|
|
//删除大题型
|
|
|
|
//删除大题型
|
|
|
|
Deletebigquestiontype =(item_type)=>{
|
|
|
|
Deletebigquestiontype =(item_type)=>{
|
|
|
|
const url=`/item_baskets/delete_item_type.json`;
|
|
|
|
const url=`/item_baskets/delete_item_type.json`;
|
|
|
|
axios.delete((url), {
|
|
|
|
axios.delete((url), { data: {
|
|
|
|
data: {
|
|
|
|
|
|
|
|
item_type:item_type
|
|
|
|
item_type:item_type
|
|
|
|
}
|
|
|
|
}})
|
|
|
|
})
|
|
|
|
|
|
|
|
.then((response) => {
|
|
|
|
.then((response) => {
|
|
|
|
if (response.data.status == 0) {
|
|
|
|
if (response.data.status == 0) {
|
|
|
|
// this.props.showNotification('删除成功');
|
|
|
|
// this.props.showNotification('删除成功');
|
|
|
@ -1020,36 +966,21 @@ class NewMyShixunModel extends Component {
|
|
|
|
keyword: this.state.keywords,
|
|
|
|
keyword: this.state.keywords,
|
|
|
|
page: this.state.page,
|
|
|
|
page: this.state.page,
|
|
|
|
per_page:10,
|
|
|
|
per_page:10,
|
|
|
|
item_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
|
|
|
|
exam_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id),
|
|
|
|
};
|
|
|
|
};
|
|
|
|
this.getdata(data);
|
|
|
|
this.getdata(data);
|
|
|
|
this.getbasket_listdata();
|
|
|
|
this.getbasket_listdata();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
var data = {
|
|
|
|
.catch(function (error) {
|
|
|
|
discipline_id: this.state.discipline_id,
|
|
|
|
////console.log(error);
|
|
|
|
sub_discipline_id: this.state.sub_discipline_id,
|
|
|
|
});
|
|
|
|
tag_discipline_id: this.state.tag_discipline_id,
|
|
|
|
|
|
|
|
public: this.state.defaultActiveKey,
|
|
|
|
|
|
|
|
difficulty: this.state.difficulty,
|
|
|
|
|
|
|
|
item_type: this.state.item_type,
|
|
|
|
|
|
|
|
keyword: this.state.keywords,
|
|
|
|
|
|
|
|
page: this.state.page,
|
|
|
|
|
|
|
|
per_page: 10,
|
|
|
|
|
|
|
|
oj_status: oj_status,
|
|
|
|
|
|
|
|
exam_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
this.getdata(data);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
//跳转
|
|
|
|
let {
|
|
|
|
gotopaperreview=()=>{
|
|
|
|
page, per_page, items_count, Headertop, visible, placement, modalsType, modalsTypes, basket_list,
|
|
|
|
|
|
|
|
completion_questions_count, judgement_questions_count, multiple_questions_count, practical_questions_count,
|
|
|
|
|
|
|
|
program_questions_count, single_questions_count, subjective_questions_count, selectionbools,
|
|
|
|
|
|
|
|
modalsTypeInaudit
|
|
|
|
|
|
|
|
} = this.state;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.props.history.replace("/paperreview");
|
|
|
|
this.props.history.replace("/paperreview");
|
|
|
|
|
|
|
|
|
|
|
@ -1073,7 +1004,7 @@ class NewMyShixunModel extends Component {
|
|
|
|
page: this.state.page,
|
|
|
|
page: this.state.page,
|
|
|
|
per_page:10,
|
|
|
|
per_page:10,
|
|
|
|
oj_status:oj_status,
|
|
|
|
oj_status:oj_status,
|
|
|
|
item_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
|
|
|
|
exam_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id),
|
|
|
|
};
|
|
|
|
};
|
|
|
|
this.getdata(data);
|
|
|
|
this.getdata(data);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1152,12 +1083,6 @@ class NewMyShixunModel extends Component {
|
|
|
|
setDownload={() => this.modalsTypeInauditbool()}></QuestionModalys>
|
|
|
|
setDownload={() => this.modalsTypeInauditbool()}></QuestionModalys>
|
|
|
|
:""
|
|
|
|
:""
|
|
|
|
}
|
|
|
|
}
|
|
|
|
{
|
|
|
|
|
|
|
|
modalsTypeInaudit===true?
|
|
|
|
|
|
|
|
<QuestionModalys {...this.props}{...this.state} modalsType={modalsTypeInaudit} modalCancel={() => this.modalsTypeInauditbool()}
|
|
|
|
|
|
|
|
setDownload={() => this.modalsTypeInauditbool()}></QuestionModalys>
|
|
|
|
|
|
|
|
:""
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
{/*顶部*/}
|
|
|
|
{/*顶部*/}
|
|
|
|
|
|
|
|
|
|
|
|
<Headplugselections
|
|
|
|
<Headplugselections
|
|
|
|