|
|
|
@ -729,7 +729,35 @@ class NewMyShixunModel extends Component {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//选用
|
|
|
|
|
|
|
|
|
|
// 不选用 Question.js页面也有个
|
|
|
|
|
NOgetitem_baskets=(data)=>{
|
|
|
|
|
let url="/examination_banks/cancel_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,
|
|
|
|
|
exam_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id),
|
|
|
|
|
};
|
|
|
|
|
this.getdatasy(data);
|
|
|
|
|
this.getbasket_listdata();
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
////console.log(error);
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//选用 Question.js页面也有个
|
|
|
|
|
getitem_baskets=(data)=>{
|
|
|
|
|
//选用题型可以上传单个 或者多个题型
|
|
|
|
|
let url="";
|
|
|
|
@ -743,7 +771,6 @@ class NewMyShixunModel extends Component {
|
|
|
|
|
axios.post(url, data)
|
|
|
|
|
.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,
|
|
|
|
@ -758,9 +785,6 @@ class NewMyShixunModel extends Component {
|
|
|
|
|
};
|
|
|
|
|
this.getdatasy(data);
|
|
|
|
|
this.getbasket_listdata();
|
|
|
|
|
// this.setState({
|
|
|
|
|
// visible:true
|
|
|
|
|
// })
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
////console.log(error);
|
|
|
|
@ -845,7 +869,7 @@ class NewMyShixunModel extends Component {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
//全选试题库
|
|
|
|
|
selectallquestionsonthispage=()=>{
|
|
|
|
|
selectallquestionsonthispage=(bool)=>{
|
|
|
|
|
var item_idsdata=[];
|
|
|
|
|
|
|
|
|
|
var arr= this.state.Contentdata.items;
|
|
|
|
@ -853,6 +877,10 @@ class NewMyShixunModel extends Component {
|
|
|
|
|
if(data.item_type==="PROGRAM"){
|
|
|
|
|
//编程题
|
|
|
|
|
if(data.choosed===true){
|
|
|
|
|
if(data.program_attr.status===1){
|
|
|
|
|
//已发布
|
|
|
|
|
item_idsdata.push(data.id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
//未选用
|
|
|
|
@ -866,7 +894,7 @@ class NewMyShixunModel extends Component {
|
|
|
|
|
}else{
|
|
|
|
|
//不是编程题
|
|
|
|
|
if(data.choosed===true){
|
|
|
|
|
|
|
|
|
|
item_idsdata.push(data.id);
|
|
|
|
|
}else{
|
|
|
|
|
//未选用
|
|
|
|
|
item_idsdata.push(data.id);
|
|
|
|
@ -878,10 +906,21 @@ class NewMyShixunModel extends Component {
|
|
|
|
|
item_ids:item_idsdata,
|
|
|
|
|
exam_id:this.props.exam_id===undefined?"":parseInt(this.props.exam_id),
|
|
|
|
|
}
|
|
|
|
|
this.getitem_baskets(data);
|
|
|
|
|
this.setState({
|
|
|
|
|
selectallquestionsonthispages:true,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(bool===false){
|
|
|
|
|
this.getitem_baskets(data);
|
|
|
|
|
this.setState({
|
|
|
|
|
selectallquestionsonthispages:true,
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
this.NOgetitem_baskets(data);
|
|
|
|
|
this.setState({
|
|
|
|
|
selectallquestionsonthispages:false,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//全选的状态
|
|
|
|
@ -1040,7 +1079,7 @@ class NewMyShixunModel extends Component {
|
|
|
|
|
chakanjiexiboolindex={this.state.chakanjiexiboolindex}
|
|
|
|
|
chakanjiexibool={(e)=>this.chakanjiexibool(e)}
|
|
|
|
|
getitem_basketss={(id)=>this.getitem_basketss(id)}
|
|
|
|
|
selectallquestionsonthispage={()=>this.selectallquestionsonthispage()}
|
|
|
|
|
selectallquestionsonthispage={(bool)=>this.selectallquestionsonthispage(bool)}
|
|
|
|
|
getitem_baskets={(e)=>this.getitem_baskets(e)}
|
|
|
|
|
setdatafuns={(e) => this.setdatafuns(e)}
|
|
|
|
|
setdatafunsval={(e) => this.setdatafunsval(e)}
|
|
|
|
|