|
|
|
@ -22,6 +22,7 @@ import './questioncss/questioncom.css';
|
|
|
|
|
import SiderBars from "../question/component/SiderBars";
|
|
|
|
|
import QuestionModalys from "./component/QuestionModalys";
|
|
|
|
|
|
|
|
|
|
var Undoclickable=true;
|
|
|
|
|
class Question extends Component {
|
|
|
|
|
constructor(props) {
|
|
|
|
|
super(props);
|
|
|
|
@ -69,6 +70,9 @@ class Question extends Component {
|
|
|
|
|
isVisible: false,
|
|
|
|
|
selectionbools:false,
|
|
|
|
|
chakanjiexiboolindex:"无",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -287,7 +291,10 @@ class Question extends Component {
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
this.getdataslen(response.data.items);
|
|
|
|
|
// Undoclickable=true;
|
|
|
|
|
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
// Undoclickable=true;
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
@ -634,6 +641,7 @@ class Question extends Component {
|
|
|
|
|
single_questions_count: result.data.single_questions_count,
|
|
|
|
|
subjective_questions_count: result.data.subjective_questions_count,
|
|
|
|
|
})
|
|
|
|
|
// Undoclickable=true;
|
|
|
|
|
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
// ////console.log(error);
|
|
|
|
@ -646,6 +654,7 @@ class Question extends Component {
|
|
|
|
|
single_questions_count: 0,
|
|
|
|
|
subjective_questions_count: 0,
|
|
|
|
|
})
|
|
|
|
|
// Undoclickable=true;
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -683,30 +692,49 @@ class Question extends Component {
|
|
|
|
|
}
|
|
|
|
|
// 撤销
|
|
|
|
|
getitem_basketss=(id)=>{
|
|
|
|
|
//选用题型可以上传单个 或者多个题型
|
|
|
|
|
let url=`/item_baskets/${id}.json`;
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
|
|
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();
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
////console.log(error);
|
|
|
|
|
})
|
|
|
|
|
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=()=>{
|
|
|
|
|