|
|
@ -347,7 +347,7 @@ class Question extends Component {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//选用
|
|
|
|
getitem_baskets=(data)=>{
|
|
|
|
getitem_baskets=(data)=>{
|
|
|
|
//选用题型可以上传单个 或者多个题型
|
|
|
|
//选用题型可以上传单个 或者多个题型
|
|
|
|
let url="/item_baskets.json";
|
|
|
|
let url="/item_baskets.json";
|
|
|
@ -356,6 +356,34 @@ class Question extends Component {
|
|
|
|
.then((result) => {
|
|
|
|
.then((result) => {
|
|
|
|
if (result.data.status == 0) {
|
|
|
|
if (result.data.status == 0) {
|
|
|
|
this.props.showNotification(`选用成功`);
|
|
|
|
this.props.showNotification(`选用成功`);
|
|
|
|
|
|
|
|
var data = {
|
|
|
|
|
|
|
|
public: this.state.defaultActiveKey,
|
|
|
|
|
|
|
|
difficulty: this.state.difficulty,
|
|
|
|
|
|
|
|
item_type: this.state.item_type,
|
|
|
|
|
|
|
|
keywords: this.state.keywords,
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
this.getdata(data);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
|
|
|
console.log(error);
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// 撤销
|
|
|
|
|
|
|
|
getitem_basketss=(id)=>{
|
|
|
|
|
|
|
|
//选用题型可以上传单个 或者多个题型
|
|
|
|
|
|
|
|
let url=`/item_baskets/${id}.json`;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
axios.delete(url)
|
|
|
|
|
|
|
|
.then((result) => {
|
|
|
|
|
|
|
|
if (result.data.status == 0) {
|
|
|
|
|
|
|
|
this.props.showNotification(`撤销成功`);
|
|
|
|
|
|
|
|
var data = {
|
|
|
|
|
|
|
|
public: this.state.defaultActiveKey,
|
|
|
|
|
|
|
|
difficulty: this.state.difficulty,
|
|
|
|
|
|
|
|
item_type: this.state.item_type,
|
|
|
|
|
|
|
|
keywords: this.state.keywords,
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
this.getdata(data);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}).catch((error) => {
|
|
|
|
}).catch((error) => {
|
|
|
|
console.log(error);
|
|
|
|
console.log(error);
|
|
|
@ -430,6 +458,7 @@ class Question extends Component {
|
|
|
|
<Headplugselection></Headplugselection>
|
|
|
|
<Headplugselection></Headplugselection>
|
|
|
|
{/*头部*/}
|
|
|
|
{/*头部*/}
|
|
|
|
<Contentpart {...this.state} {...this.props}
|
|
|
|
<Contentpart {...this.state} {...this.props}
|
|
|
|
|
|
|
|
getitem_basketss={(id)=>this.getitem_basketss(id)}
|
|
|
|
selectallquestionsonthispage={()=>this.selectallquestionsonthispage()}
|
|
|
|
selectallquestionsonthispage={()=>this.selectallquestionsonthispage()}
|
|
|
|
getitem_baskets={(e)=>this.getitem_baskets(e)}
|
|
|
|
getitem_baskets={(e)=>this.getitem_baskets(e)}
|
|
|
|
setdatafuns={(e) => this.setdatafuns(e)}
|
|
|
|
setdatafuns={(e) => this.setdatafuns(e)}
|
|
|
|