|
|
|
@ -1,4 +1,3 @@
|
|
|
|
|
|
|
|
|
|
import React, {Component} from "react";
|
|
|
|
|
import { SnackbarHOC} from 'educoder';
|
|
|
|
|
import axios from 'axios';
|
|
|
|
@ -181,11 +180,9 @@ class Question extends Component {
|
|
|
|
|
this.getbasket_listdata();
|
|
|
|
|
//获取题库筛选资料
|
|
|
|
|
let urls = `/disciplines.json`;
|
|
|
|
|
axios.get(urls, {
|
|
|
|
|
params: {
|
|
|
|
|
axios.get(urls, {params: {
|
|
|
|
|
source:"question"
|
|
|
|
|
}
|
|
|
|
|
}).then((response) => {
|
|
|
|
|
}}).then((response) => {
|
|
|
|
|
//console.log("Questiondisciplines");
|
|
|
|
|
//console.log(response.data);
|
|
|
|
|
if (response) {
|
|
|
|
@ -674,8 +671,6 @@ class Question extends Component {
|
|
|
|
|
})
|
|
|
|
|
// Undoclickable=true;
|
|
|
|
|
})
|
|
|
|
|
// Undoclickable=true;
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
// 不选用 NewMyShixunModel.js 页面也有个
|
|
|
|
@ -780,49 +775,6 @@ class Question extends Component {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
// 撤销
|
|
|
|
|
getitem_basketss=(id)=>{
|
|
|
|
|
if(Undoclickable===true){
|
|
|
|
|
Undoclickable=false;
|
|
|
|
|
//选用题型可以上传单个 或者多个题型
|
|
|
|
|
let 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,
|
|
|
|
|
};
|
|
|
|
|
this.getdatasy(data);
|
|
|
|
|
this.getbasket_listdata();
|
|
|
|
|
}
|
|
|
|
|
setTimeout(()=>{
|
|
|
|
|
Undoclickable=true;
|
|
|
|
|
},1000);
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
////console.log(error);
|
|
|
|
|
setTimeout(()=>{
|
|
|
|
|
Undoclickable=true;
|
|
|
|
|
},1000);
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
//全选试题库
|
|
|
|
|
selectallquestionsonthispage=(bool)=>{
|
|
|
|
@ -910,11 +862,9 @@ class Question extends Component {
|
|
|
|
|
//删除大题型
|
|
|
|
|
Deletebigquestiontype =(item_type)=>{
|
|
|
|
|
const url=`/item_baskets/delete_item_type.json`;
|
|
|
|
|
axios.delete((url), {
|
|
|
|
|
data: {
|
|
|
|
|
axios.delete((url), { data: {
|
|
|
|
|
item_type:item_type
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}})
|
|
|
|
|
.then((response) => {
|
|
|
|
|
if (response.data.status == 0) {
|
|
|
|
|
// this.props.showNotification('删除成功');
|
|
|
|
@ -1108,12 +1058,6 @@ class Question extends Component {
|
|
|
|
|
setDownload={() => this.modalsTypeInauditbool()}></QuestionModalys>
|
|
|
|
|
:""
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
modalsTypeInaudit===true?
|
|
|
|
|
<QuestionModalys {...this.props}{...this.state} modalsType={modalsTypeInaudit} modalCancel={() => this.modalsTypeInauditbool()}
|
|
|
|
|
setDownload={() => this.modalsTypeInauditbool()}></QuestionModalys>
|
|
|
|
|
:""
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|