调整题库

yslnewtiku
杨树林 5 years ago
parent fcf9fe3d89
commit 056282cc7a

@ -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);

@ -51,7 +51,7 @@ class Contentquestionbank extends Component {
<p className="setequesbank ml20">选用本页全部试题</p> <p className="setequesbank ml20">选用本页全部试题</p>
</div> </div>
<div className="xaxisreverseorder testpaper w50s"> <div className="xaxisreverseorder testpaper w50s">
123个试题 {this.props.items_count?this.props.items_count:0}个试题
</div> </div>
</div> </div>

Loading…
Cancel
Save