|
|
@ -39,7 +39,8 @@ class Question extends Component {
|
|
|
|
visiblemyss:false,
|
|
|
|
visiblemyss:false,
|
|
|
|
item_type:null,
|
|
|
|
item_type:null,
|
|
|
|
keyword:null,
|
|
|
|
keyword:null,
|
|
|
|
timuid:null
|
|
|
|
timuid:null,
|
|
|
|
|
|
|
|
items_count:0,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -96,7 +97,8 @@ class Question extends Component {
|
|
|
|
//console.log("item_banks");
|
|
|
|
//console.log("item_banks");
|
|
|
|
//console.log(response);
|
|
|
|
//console.log(response);
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
Contentdata:response.data
|
|
|
|
Contentdata:response.data,
|
|
|
|
|
|
|
|
items_count:response.data.items_count,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}).catch((error) => {
|
|
|
|
}).catch((error) => {
|
|
|
|
//console.log(error)
|
|
|
|
//console.log(error)
|
|
|
@ -267,6 +269,13 @@ class Question extends Component {
|
|
|
|
if (response.data.status == 0) {
|
|
|
|
if (response.data.status == 0) {
|
|
|
|
this.props.showNotification('删除试题成功')
|
|
|
|
this.props.showNotification('删除试题成功')
|
|
|
|
// props.history.push(response.data.right_url)
|
|
|
|
// props.history.push(response.data.right_url)
|
|
|
|
|
|
|
|
var data={
|
|
|
|
|
|
|
|
public:this.state.defaultActiveKey,
|
|
|
|
|
|
|
|
difficulty:this.state.difficulty,
|
|
|
|
|
|
|
|
item_type:this.state.item_type,
|
|
|
|
|
|
|
|
keywords:this.state.keywords,
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
this.getdata(data);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.catch(function (error) {
|
|
|
|
.catch(function (error) {
|
|
|
@ -280,7 +289,13 @@ 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) => {
|
|
|
|
}).catch((error) => {
|
|
|
|
console.log(error);
|
|
|
|
console.log(error);
|
|
|
|