|
|
|
@ -9,6 +9,7 @@ import QuestionModals from "./component/QuestionModals";
|
|
|
|
|
import Contentpart from "./component/Contentpart";
|
|
|
|
|
import './questioncss/questioncom.css';
|
|
|
|
|
import Bottomsubmit from "../modals/Bottomsubmit";
|
|
|
|
|
import QuestionModalys from "./component/QuestionModalys";
|
|
|
|
|
|
|
|
|
|
//exam_id 试卷的id
|
|
|
|
|
class NewMyShixunModel extends Component {
|
|
|
|
@ -56,15 +57,28 @@ class NewMyShixunModel extends Component {
|
|
|
|
|
oj_status: null,
|
|
|
|
|
isVisible: false,
|
|
|
|
|
selectionbools: false,
|
|
|
|
|
chakanjiexiboolindex: "无",
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
chakanjiexibool = (index) => {
|
|
|
|
|
if (this.state.chakanjiexiboolindex === index) {
|
|
|
|
|
this.setState({
|
|
|
|
|
chakanjiexiboolindex: "无",
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
this.setState({
|
|
|
|
|
chakanjiexiboolindex: index,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
setdiscipline_id = (discipline_id) => {
|
|
|
|
|
this.setState({
|
|
|
|
|
discipline_id: discipline_id,
|
|
|
|
|
sub_discipline_id: null,
|
|
|
|
|
tag_discipline_id: null,
|
|
|
|
|
keywords: "",
|
|
|
|
|
keyword: "",
|
|
|
|
|
page: 1,
|
|
|
|
|
per_page: 10,
|
|
|
|
|
oj_status: null
|
|
|
|
@ -76,7 +90,7 @@ class NewMyShixunModel extends Component {
|
|
|
|
|
public: this.state.defaultActiveKey,
|
|
|
|
|
difficulty: this.state.difficulty,
|
|
|
|
|
item_type: this.state.item_type,
|
|
|
|
|
keywords: null,
|
|
|
|
|
keyword: null,
|
|
|
|
|
page: this.state.page,
|
|
|
|
|
per_page: 10,
|
|
|
|
|
oj_status: null,
|
|
|
|
@ -90,7 +104,7 @@ class NewMyShixunModel extends Component {
|
|
|
|
|
this.setState({
|
|
|
|
|
sub_discipline_id: sub_discipline_id,
|
|
|
|
|
tag_discipline_id: null,
|
|
|
|
|
keywords: "",
|
|
|
|
|
keyword: "",
|
|
|
|
|
page: 1,
|
|
|
|
|
per_page: 10,
|
|
|
|
|
oj_status: null
|
|
|
|
@ -102,7 +116,7 @@ class NewMyShixunModel extends Component {
|
|
|
|
|
public: this.state.defaultActiveKey,
|
|
|
|
|
difficulty: this.state.difficulty,
|
|
|
|
|
item_type: this.state.item_type,
|
|
|
|
|
keywords: null,
|
|
|
|
|
keyword: null,
|
|
|
|
|
page: 1,
|
|
|
|
|
per_page: 10,
|
|
|
|
|
oj_status: null,
|
|
|
|
@ -114,7 +128,7 @@ class NewMyShixunModel extends Component {
|
|
|
|
|
settag_discipline_id = (tag_discipline_id) => {
|
|
|
|
|
this.setState({
|
|
|
|
|
tag_discipline_id: tag_discipline_id,
|
|
|
|
|
keywords: "",
|
|
|
|
|
keyword: "",
|
|
|
|
|
page: 1,
|
|
|
|
|
per_page: 10,
|
|
|
|
|
oj_status: null
|
|
|
|
@ -126,7 +140,7 @@ class NewMyShixunModel extends Component {
|
|
|
|
|
public: this.state.defaultActiveKey,
|
|
|
|
|
difficulty: this.state.difficulty,
|
|
|
|
|
item_type: this.state.item_type,
|
|
|
|
|
keywords: null,
|
|
|
|
|
keyword: null,
|
|
|
|
|
page: 1,
|
|
|
|
|
per_page: 10,
|
|
|
|
|
oj_status: null,
|
|
|
|
@ -347,7 +361,7 @@ class NewMyShixunModel extends Component {
|
|
|
|
|
public: this.state.defaultActiveKey,
|
|
|
|
|
difficulty: this.state.difficulty,
|
|
|
|
|
item_type: this.state.item_type,
|
|
|
|
|
keywords: this.state.keywords,
|
|
|
|
|
keyword: this.state.keywords,
|
|
|
|
|
page: pageNumber,
|
|
|
|
|
per_page: 10,
|
|
|
|
|
oj_status: this.state.oj_status,
|
|
|
|
@ -455,7 +469,7 @@ class NewMyShixunModel extends Component {
|
|
|
|
|
visiblemys: false,
|
|
|
|
|
page: 1,
|
|
|
|
|
per_page: 10,
|
|
|
|
|
keywords: "",
|
|
|
|
|
keyword: "",
|
|
|
|
|
oj_status: null
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
@ -466,11 +480,11 @@ class NewMyShixunModel extends Component {
|
|
|
|
|
public: this.state.defaultActiveKey,
|
|
|
|
|
difficulty: difficulty,
|
|
|
|
|
item_type: this.state.item_type,
|
|
|
|
|
keywords: null,
|
|
|
|
|
keyword: null,
|
|
|
|
|
page: 1,
|
|
|
|
|
per_page: 10,
|
|
|
|
|
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);
|
|
|
|
@ -482,7 +496,7 @@ class NewMyShixunModel extends Component {
|
|
|
|
|
visiblemyss: false,
|
|
|
|
|
page: 1,
|
|
|
|
|
per_page: 10,
|
|
|
|
|
keywords: "",
|
|
|
|
|
keyword: "",
|
|
|
|
|
oj_status: null
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
@ -495,9 +509,9 @@ class NewMyShixunModel extends Component {
|
|
|
|
|
item_type: item_type,
|
|
|
|
|
page: 1,
|
|
|
|
|
per_page: 10,
|
|
|
|
|
keywords: null,
|
|
|
|
|
keyword: 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);
|
|
|
|
@ -516,6 +530,19 @@ class NewMyShixunModel extends Component {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
showmodelsInaudit = (e) => {
|
|
|
|
|
this.setState({
|
|
|
|
|
modalsTypeInaudit: true,
|
|
|
|
|
titilesm: "公开申请已提交,请等待管理员的审核",
|
|
|
|
|
titiless: "我们将在1-2个工作日内完成审核",
|
|
|
|
|
})
|
|
|
|
|
};
|
|
|
|
|
modalsTypeInauditbool = () => {
|
|
|
|
|
this.setState({
|
|
|
|
|
modalsTypeInaudit: false,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
handleVisibleChanges = (boll) => {
|
|
|
|
|
if (this.state.visiblemys === true) {
|
|
|
|
@ -533,13 +560,13 @@ class NewMyShixunModel extends Component {
|
|
|
|
|
|
|
|
|
|
setdatafunsval = (e) => {
|
|
|
|
|
this.setState({
|
|
|
|
|
keywords: e.target.value
|
|
|
|
|
keyword: e.target.value
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
setdatafuns = (value) => {
|
|
|
|
|
this.setState({
|
|
|
|
|
keywords: value,
|
|
|
|
|
keyword: value,
|
|
|
|
|
})
|
|
|
|
|
var data = {
|
|
|
|
|
discipline_id: this.state.discipline_id,
|
|
|
|
@ -548,7 +575,7 @@ class NewMyShixunModel extends Component {
|
|
|
|
|
public: this.state.defaultActiveKey,
|
|
|
|
|
difficulty: this.state.difficulty,
|
|
|
|
|
item_type: this.state.item_type,
|
|
|
|
|
keywords: value,
|
|
|
|
|
keyword: value,
|
|
|
|
|
page: this.state.page,
|
|
|
|
|
per_page: 10,
|
|
|
|
|
oj_status: this.state.oj_status,
|
|
|
|
@ -573,7 +600,7 @@ class NewMyShixunModel extends Component {
|
|
|
|
|
public: this.state.defaultActiveKey,
|
|
|
|
|
difficulty: this.state.difficulty,
|
|
|
|
|
item_type: this.state.item_type,
|
|
|
|
|
keywords: this.state.keywords,
|
|
|
|
|
keyword: this.state.keywords,
|
|
|
|
|
page: this.state.page,
|
|
|
|
|
per_page: 10,
|
|
|
|
|
item_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
|
|
|
|
@ -599,7 +626,7 @@ class NewMyShixunModel extends Component {
|
|
|
|
|
public: this.state.defaultActiveKey,
|
|
|
|
|
difficulty: this.state.difficulty,
|
|
|
|
|
item_type: this.state.item_type,
|
|
|
|
|
keywords: this.state.keywords,
|
|
|
|
|
keyword: this.state.keywords,
|
|
|
|
|
page: this.state.page,
|
|
|
|
|
per_page: 10,
|
|
|
|
|
item_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
|
|
|
|
@ -667,7 +694,7 @@ class NewMyShixunModel extends Component {
|
|
|
|
|
public: this.state.defaultActiveKey,
|
|
|
|
|
difficulty: this.state.difficulty,
|
|
|
|
|
item_type: this.state.item_type,
|
|
|
|
|
keywords: this.state.keywords,
|
|
|
|
|
keyword: this.state.keywords,
|
|
|
|
|
page: this.state.page,
|
|
|
|
|
per_page: 10,
|
|
|
|
|
item_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
|
|
|
|
@ -687,18 +714,168 @@ class NewMyShixunModel extends Component {
|
|
|
|
|
let url = "";
|
|
|
|
|
if (this.props.exam_id === undefined) {
|
|
|
|
|
url = `/item_baskets/${id}.json`;
|
|
|
|
|
axios.delete(url)
|
|
|
|
|
.then((result) => {
|
|
|
|
|
if (result.data.status == 0) {
|
|
|
|
|
// this.props.showNotification(`撤销成功`);
|
|
|
|
|
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,
|
|
|
|
|
exam_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
|
|
|
|
|
};
|
|
|
|
|
this.getdatasy(data);
|
|
|
|
|
this.getbasket_listdata();
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
////console.log(error);
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
url = `/examination_banks/${id}/revoke_item.json`;
|
|
|
|
|
url = `/examination_banks/${this.props.exam_id}/revoke_item.json`;
|
|
|
|
|
axios.delete(url, {
|
|
|
|
|
data: {
|
|
|
|
|
item_id: id === undefined ? "" : parseInt(id),
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.then((result) => {
|
|
|
|
|
if (result.data.status == 0) {
|
|
|
|
|
// this.props.showNotification(`撤销成功`);
|
|
|
|
|
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,
|
|
|
|
|
exam_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) => {
|
|
|
|
|
let url = "";
|
|
|
|
|
if (this.props.exam_id === undefined) {
|
|
|
|
|
url = `/item_baskets/${id}.json`;
|
|
|
|
|
} else {
|
|
|
|
|
url = `/examination_banks/${id}/revoke_item.json`;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
axios.delete(url, {
|
|
|
|
|
data: {
|
|
|
|
|
item_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.then((result) => {
|
|
|
|
|
if (result.data.status == 0) {
|
|
|
|
|
// this.props.showNotification(`撤销成功`);
|
|
|
|
|
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();
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.then((result) => {
|
|
|
|
|
if (result.data.status == 0) {
|
|
|
|
|
// this.props.showNotification(`撤销成功`);
|
|
|
|
|
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,
|
|
|
|
|
keywords: this.state.keywords,
|
|
|
|
|
page: this.state.page,
|
|
|
|
|
per_page: 10,
|
|
|
|
|
exam_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
|
|
|
|
|
};
|
|
|
|
|
this.getdatasy(data);
|
|
|
|
|
this.getbasket_listdata();
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
////console.log(error);
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
//全选试题库
|
|
|
|
|
selectallquestionsonthispage = () => {
|
|
|
|
|
var item_idsdata = [];
|
|
|
|
|
|
|
|
|
|
var arr = this.state.Contentdata.items;
|
|
|
|
|
for (let data of arr) {
|
|
|
|
|
if (data.item_type === "PROGRAM") {
|
|
|
|
|
//编程题
|
|
|
|
|
if (data.choosed === true) {
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
//未选用
|
|
|
|
|
if (data.program_attr.status === 1) {
|
|
|
|
|
//已发布
|
|
|
|
|
item_idsdata.push(data.id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
//不是编程题
|
|
|
|
|
if (data.choosed === true) {
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
//未选用
|
|
|
|
|
item_idsdata.push(data.id);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
const data = {
|
|
|
|
|
item_ids: item_idsdata,
|
|
|
|
|
item_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
|
|
|
|
|
}
|
|
|
|
|
this.getitem_baskets(data);
|
|
|
|
|
this.setState({
|
|
|
|
|
selectallquestionsonthispages: true,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//全选的状态
|
|
|
|
|
|
|
|
|
|
axios.delete(url, {
|
|
|
|
|
//删除大题型
|
|
|
|
|
Deletebigquestiontype = (item_type) => {
|
|
|
|
|
const url = `/item_baskets/delete_item_type.json`;
|
|
|
|
|
axios.delete((url), {
|
|
|
|
|
data: {
|
|
|
|
|
item_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
|
|
|
|
|
item_type: item_type
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.then((result) => {
|
|
|
|
|
if (result.data.status == 0) {
|
|
|
|
|
// this.props.showNotification(`撤销成功`);
|
|
|
|
|
.then((response) => {
|
|
|
|
|
if (response.data.status == 0) {
|
|
|
|
|
// this.props.showNotification('删除成功');
|
|
|
|
|
var data = {
|
|
|
|
|
discipline_id: this.state.discipline_id,
|
|
|
|
|
sub_discipline_id: this.state.sub_discipline_id,
|
|
|
|
@ -711,164 +888,85 @@ class NewMyShixunModel extends Component {
|
|
|
|
|
per_page: 10,
|
|
|
|
|
item_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
|
|
|
|
|
};
|
|
|
|
|
this.getdatasy(data);
|
|
|
|
|
this.getbasket_listdata();
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.then((result) => {
|
|
|
|
|
if (result.data.status == 0) {
|
|
|
|
|
// this.props.showNotification(`撤销成功`);
|
|
|
|
|
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,
|
|
|
|
|
keywords: this.state.keywords,
|
|
|
|
|
page: this.state.page,
|
|
|
|
|
per_page: 10,
|
|
|
|
|
exam_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
|
|
|
|
|
};
|
|
|
|
|
this.getdatasy(data);
|
|
|
|
|
this.getdata(data);
|
|
|
|
|
this.getbasket_listdata();
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
////console.log(error);
|
|
|
|
|
})
|
|
|
|
|
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,
|
|
|
|
|
oj_status: oj_status,
|
|
|
|
|
exam_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
|
|
|
|
|
};
|
|
|
|
|
this.getdata(data);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
//全选试题库
|
|
|
|
|
selectallquestionsonthispage = () => {
|
|
|
|
|
var item_idsdata = [];
|
|
|
|
|
|
|
|
|
|
var arr = this.state.Contentdata.items;
|
|
|
|
|
for (let data of arr) {
|
|
|
|
|
if (data.item_type === "PROGRAM") {
|
|
|
|
|
//编程题
|
|
|
|
|
if (data.choosed === true) {
|
|
|
|
|
render() {
|
|
|
|
|
let {
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
//未选用
|
|
|
|
|
if (data.program_attr.status === 1) {
|
|
|
|
|
//已发布
|
|
|
|
|
item_idsdata.push(data.id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
this.props.history.replace("/paperreview");
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
//不是编程题
|
|
|
|
|
if (data.choosed === true) {
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
//未选用
|
|
|
|
|
item_idsdata.push(data.id);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
const data = {
|
|
|
|
|
item_ids: item_idsdata,
|
|
|
|
|
item_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
|
|
|
|
|
}
|
|
|
|
|
this.getitem_baskets(data);
|
|
|
|
|
this.setState({
|
|
|
|
|
selectallquestionsonthispages: true,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//全选的状态
|
|
|
|
|
|
|
|
|
|
//删除大题型
|
|
|
|
|
Deletebigquestiontype = (item_type) => {
|
|
|
|
|
const url = `/item_baskets/delete_item_type.json`;
|
|
|
|
|
axios.delete((url), {
|
|
|
|
|
data: {
|
|
|
|
|
item_type: item_type
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.then((response) => {
|
|
|
|
|
if (response.data.status == 0) {
|
|
|
|
|
// this.props.showNotification('删除成功');
|
|
|
|
|
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,
|
|
|
|
|
keywords: this.state.keywords,
|
|
|
|
|
page: this.state.page,
|
|
|
|
|
per_page: 10,
|
|
|
|
|
item_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
|
|
|
|
|
};
|
|
|
|
|
this.getdata(data);
|
|
|
|
|
this.getbasket_listdata();
|
|
|
|
|
}
|
|
|
|
|
setoj_status = (oj_status) => {
|
|
|
|
|
//编程题发布未发布
|
|
|
|
|
this.setState({
|
|
|
|
|
selectallquestionsonthispages: false,
|
|
|
|
|
difficulty: null,
|
|
|
|
|
oj_status: oj_status
|
|
|
|
|
})
|
|
|
|
|
.catch(function (error) {
|
|
|
|
|
////console.log(error);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//跳转
|
|
|
|
|
gotopaperreview = () => {
|
|
|
|
|
|
|
|
|
|
this.props.history.replace("/paperreview");
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
setoj_status = (oj_status) => {
|
|
|
|
|
//编程题发布未发布
|
|
|
|
|
this.setState({
|
|
|
|
|
selectallquestionsonthispages: false,
|
|
|
|
|
difficulty: null,
|
|
|
|
|
oj_status: oj_status
|
|
|
|
|
})
|
|
|
|
|
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,
|
|
|
|
|
keywords: this.state.keywords,
|
|
|
|
|
page: this.state.page,
|
|
|
|
|
per_page: 10,
|
|
|
|
|
oj_status: oj_status,
|
|
|
|
|
item_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
|
|
|
|
|
};
|
|
|
|
|
this.getdata(data);
|
|
|
|
|
}
|
|
|
|
|
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,
|
|
|
|
|
keywords: this.state.keywords,
|
|
|
|
|
page: this.state.page,
|
|
|
|
|
per_page: 10,
|
|
|
|
|
oj_status: oj_status,
|
|
|
|
|
item_id: this.props.exam_id === undefined ? "" : parseInt(this.props.exam_id),
|
|
|
|
|
};
|
|
|
|
|
this.getdata(data);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
|
let {
|
|
|
|
|
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
|
|
|
|
|
} = this.state;
|
|
|
|
|
render() {
|
|
|
|
|
let {
|
|
|
|
|
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
|
|
|
|
|
} = this.state;
|
|
|
|
|
|
|
|
|
|
const Datacount = completion_questions_count + judgement_questions_count
|
|
|
|
|
+ multiple_questions_count + practical_questions_count
|
|
|
|
|
+ program_questions_count
|
|
|
|
|
+ single_questions_count
|
|
|
|
|
+ subjective_questions_count;
|
|
|
|
|
const Datacount = completion_questions_count + judgement_questions_count
|
|
|
|
|
+ multiple_questions_count + practical_questions_count
|
|
|
|
|
+ program_questions_count
|
|
|
|
|
+ single_questions_count
|
|
|
|
|
+ subjective_questions_count;
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div className="newMain clearfix " ref={this.saveContainer}>
|
|
|
|
|
return (
|
|
|
|
|
<div className="newMain clearfix " ref={this.saveContainer}>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
visible === true ?
|
|
|
|
|
<style>
|
|
|
|
|
{
|
|
|
|
|
`
|
|
|
|
|
{
|
|
|
|
|
visible === true ?
|
|
|
|
|
<style>
|
|
|
|
|
{
|
|
|
|
|
`
|
|
|
|
|
.newHeaders{
|
|
|
|
|
position: fixed;
|
|
|
|
|
top: 0px;
|
|
|
|
@ -886,79 +984,89 @@ render() {
|
|
|
|
|
z-index: 9999999 ;
|
|
|
|
|
}
|
|
|
|
|
`
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
: ""
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
visible === true ?
|
|
|
|
|
<div
|
|
|
|
|
style={{
|
|
|
|
|
marginTop: "60px"
|
|
|
|
|
}}></div>
|
|
|
|
|
: ""}
|
|
|
|
|
{
|
|
|
|
|
modalsTypes === true ?
|
|
|
|
|
<QuestionModals {...this.props}{...this.state} modalsTypes={modalsTypes} modalCancels={() => this.modalCancels()}
|
|
|
|
|
setDownloads={(e) => this.setDownloads(e)}></QuestionModals>
|
|
|
|
|
: ""
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
modalsType === true ?
|
|
|
|
|
<QuestionModal {...this.props}{...this.state} modalsType={modalsType} modalCancel={() => this.modalCancel()}
|
|
|
|
|
setDownload={() => this.setDownload()}></QuestionModal>
|
|
|
|
|
: ""
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
{/*顶部*/}
|
|
|
|
|
|
|
|
|
|
<Headplugselections
|
|
|
|
|
disciplinesdata={this.state.disciplinesdata}
|
|
|
|
|
{...this.props}
|
|
|
|
|
{...this.state}
|
|
|
|
|
setdifficulty={(e) => this.setdifficulty(e)}
|
|
|
|
|
setitem_types={(e) => this.setitem_types(e)}
|
|
|
|
|
setdiscipline_id={(e) => this.setdiscipline_id(e)}
|
|
|
|
|
setsub_discipline_id={(e) => this.setsub_discipline_id(e)}
|
|
|
|
|
settag_discipline_id={(e) => this.settag_discipline_id(e)}
|
|
|
|
|
/>
|
|
|
|
|
{/*头部*/}
|
|
|
|
|
<Contentpart {...this.state} {...this.props}
|
|
|
|
|
exam_id={this.props.exam_id}
|
|
|
|
|
Isitapopup={"true"}
|
|
|
|
|
getitem_basketss={(id) => this.getitem_basketss(id)}
|
|
|
|
|
selectallquestionsonthispage={() => this.selectallquestionsonthispage()}
|
|
|
|
|
getitem_baskets={(e) => this.getitem_baskets(e)}
|
|
|
|
|
setdatafuns={(e) => this.setdatafuns(e)}
|
|
|
|
|
setdatafunsval={(e) => this.setdatafunsval(e)}
|
|
|
|
|
handleVisibleChanges={(e) => this.handleVisibleChanges(e)}
|
|
|
|
|
handleVisibleChange={(e) => this.handleVisibleChange(e)}
|
|
|
|
|
showmodels={(e) => this.showmodels(e)}
|
|
|
|
|
showmodelysl={(e) => this.showmodelysl(e)}
|
|
|
|
|
callback={(e) => this.callback(e)}
|
|
|
|
|
setoj_status={(e) => this.setoj_status(e)}></Contentpart>
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
items_count && items_count > 10 ?
|
|
|
|
|
<div className="mb30 clearfix educontent mt40 intermediatecenter">
|
|
|
|
|
<Pagination showQuickJumper current={page} onChange={this.paginationonChange}
|
|
|
|
|
pageSize={per_page}
|
|
|
|
|
total={items_count}></Pagination>
|
|
|
|
|
</div>
|
|
|
|
|
: <div className="h30 clearfix educontent mt40 intermediatecenter">
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
: ""
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
visible === true ?
|
|
|
|
|
<div
|
|
|
|
|
style={{
|
|
|
|
|
marginTop: "60px"
|
|
|
|
|
}}></div>
|
|
|
|
|
: ""}
|
|
|
|
|
{
|
|
|
|
|
modalsTypes === true ?
|
|
|
|
|
<QuestionModals {...this.props}{...this.state} modalsTypes={modalsTypes} modalCancels={() => this.modalCancels()}
|
|
|
|
|
setDownloads={(e) => this.setDownloads(e)}></QuestionModals>
|
|
|
|
|
: ""
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
modalsType === true ?
|
|
|
|
|
<QuestionModal {...this.props}{...this.state} modalsType={modalsType} modalCancel={() => this.modalCancel()}
|
|
|
|
|
setDownload={() => this.setDownload()}></QuestionModal>
|
|
|
|
|
: ""
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
modalsTypeInaudit === true ?
|
|
|
|
|
<QuestionModalys {...this.props}{...this.state} modalsType={modalsTypeInaudit} modalCancel={() => this.modalsTypeInauditbool()}
|
|
|
|
|
setDownload={() => this.modalsTypeInauditbool()}></QuestionModalys>
|
|
|
|
|
: ""
|
|
|
|
|
}
|
|
|
|
|
{/*顶部*/}
|
|
|
|
|
|
|
|
|
|
<Headplugselections
|
|
|
|
|
disciplinesdata={this.state.disciplinesdata}
|
|
|
|
|
{...this.props}
|
|
|
|
|
{...this.state}
|
|
|
|
|
setdifficulty={(e) => this.setdifficulty(e)}
|
|
|
|
|
setitem_types={(e) => this.setitem_types(e)}
|
|
|
|
|
setdiscipline_id={(e) => this.setdiscipline_id(e)}
|
|
|
|
|
setsub_discipline_id={(e) => this.setsub_discipline_id(e)}
|
|
|
|
|
settag_discipline_id={(e) => this.settag_discipline_id(e)}
|
|
|
|
|
/>
|
|
|
|
|
{/*头部*/}
|
|
|
|
|
<Contentpart {...this.state} {...this.props}
|
|
|
|
|
exam_id={this.props.exam_id}
|
|
|
|
|
Isitapopup={"true"}
|
|
|
|
|
chakanjiexiboolindex={this.state.chakanjiexiboolindex}
|
|
|
|
|
chakanjiexibool={(e) => this.chakanjiexibool(e)}
|
|
|
|
|
getitem_basketss={(id) => this.getitem_basketss(id)}
|
|
|
|
|
selectallquestionsonthispage={() => this.selectallquestionsonthispage()}
|
|
|
|
|
getitem_baskets={(e) => this.getitem_baskets(e)}
|
|
|
|
|
setdatafuns={(e) => this.setdatafuns(e)}
|
|
|
|
|
setdatafunsval={(e) => this.setdatafunsval(e)}
|
|
|
|
|
handleVisibleChanges={(e) => this.handleVisibleChanges(e)}
|
|
|
|
|
handleVisibleChange={(e) => this.handleVisibleChange(e)}
|
|
|
|
|
showmodels={(e) => this.showmodels(e)}
|
|
|
|
|
showmodelysl={(e) => this.showmodelysl(e)}
|
|
|
|
|
callback={(e) => this.callback(e)}
|
|
|
|
|
setoj_status={(e) => this.setoj_status(e)}
|
|
|
|
|
showmodelsInaudit={(e) => this.showmodelsInaudit(e)}
|
|
|
|
|
|
|
|
|
|
></Contentpart>
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
items_count && items_count > 10 ?
|
|
|
|
|
<div className="mb30 clearfix educontent mt40 intermediatecenter">
|
|
|
|
|
<Pagination showQuickJumper current={page} onChange={this.paginationonChange}
|
|
|
|
|
pageSize={per_page}
|
|
|
|
|
total={items_count}></Pagination>
|
|
|
|
|
</div>
|
|
|
|
|
: <div className="h30 clearfix educontent mt40 intermediatecenter">
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Bottomsubmit {...this.props} {...this.state} bottomvalue={"确定"}
|
|
|
|
|
Cohetepaperbool={true}
|
|
|
|
|
setCohetepaperbool={() => this.props.setnewmyshixunmodelbool(false)}
|
|
|
|
|
onSubmits={() => this.props.setnewmyshixunmodelbool(false)} url={'/paperlibrary'}></Bottomsubmit>
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
<Bottomsubmit {...this.props} {...this.state} bottomvalue={"确定"}
|
|
|
|
|
Cohetepaperbool={true}
|
|
|
|
|
setCohetepaperbool={() => this.props.setnewmyshixunmodelbool(false)}
|
|
|
|
|
onSubmits={() => this.props.setnewmyshixunmodelbool(false)} url={'/paperlibrary'}></Bottomsubmit>
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|