mast_item_banktwo
杨树林 5 years ago
parent 5c611fb61b
commit af26a97137

@ -176,6 +176,25 @@ class Paperreview_item extends Component {
}
setDownloady = (fenshu) => {
if(this.props.match.params.type==="Intelligence") {
//智能选题
const url = "/item_baskets/batch_set_score.json";
var data = {
score: fenshu,
item_type: this.state.titilesm === "单选题" ? "SINGLE" : this.state.titilesm === "多选题" ? "MULTIPLE" : this.state.titilesm === "判断题" ? "JUDGMENT" : this.state.titilesm === "编程题" ? "PROGRAM" : '',
exam_setting_id:this.props.match.params.id,
}
axios.post(url, data)
.then((result) => {
if (result.data.status == 0) {
// this.props.showNotification(`调分成功`);
this.props.getdata({});
this.Singlemagazine("", false);
}
}).catch((error) => {
//console.log(error);
})
}else{
const url = "/item_baskets/batch_set_score.json";
var data = {
score: fenshu,
@ -194,6 +213,8 @@ class Paperreview_item extends Component {
})
}
}
setDownloadys=(value)=>{
const url = `/item_baskets/${this.state.set_scoreid}/set_score.json`;
var data = {
@ -239,6 +260,29 @@ class Paperreview_item extends Component {
modalsTypedel: bool,
titilesms: names
})
if(this.props.match.params.type==="Intelligence") {
//智能组卷
const url = `/item_baskets/delete_item_type.json`;
axios.delete((url), {
data: {
item_type: names,
exam_setting_id:this.props.match.params.id,
}
})
.then((response) => {
if (response.data.status == 0) {
// this.props.showNotification('大题删除成功');
this.props.getdata({});
this.setState({
titilesms: ""
})
}
})
.catch(function (error) {
////console.log(error);
});
}else{
const url = `/item_baskets/delete_item_type.json`;
axios.delete((url), {
data: {
@ -257,6 +301,8 @@ class Paperreview_item extends Component {
.catch(function (error) {
////console.log(error);
});
}
@ -271,6 +317,8 @@ class Paperreview_item extends Component {
})
}else {
//确定
if(this.props.match.params.type==="Intelligence"){
//智能组卷
const url = `/item_baskets/${this.state.item_bank_id}.json`;
axios.delete(url, { data: {
exam_setting_id: this.props.match.params.id,
@ -284,6 +332,20 @@ class Paperreview_item extends Component {
.catch(function (error) {
});
}else{
const url = `/item_baskets/${this.state.item_bank_id}.json`;
axios.delete(url)
.then((response) => {
if (response.data.status == 0) {
// this.props.showNotification('试题删除成功');
this.props.getdata({});
}
})
.catch(function (error) {
});
}
this.setState({
modalsTypedels: bool,

Loading…
Cancel
Save