yslnewtiku
杨树林 5 years ago
parent 7bd80a19fe
commit 276caa91a7

@ -238,8 +238,9 @@ class Questionitem_banks extends Component {
} }
console.log("preservation"); // console.log("preservation");
console.log(this.contentMdRef.Getdatas()); // console.log(this.contentMdRef.Getdatas());
var Getdatasdata=this.contentMdRef.Getdatas();
if (this.state.item_type === null) { if (this.state.item_type === null) {
@ -269,13 +270,19 @@ class Questionitem_banks extends Component {
// repertoire_id:1, // repertoire_id:1,
// sub_repertoire_id:1, // sub_repertoire_id:1,
// tag_repertoire_id:[1,3], // tag_repertoire_id:[1,3],
var myrbkc=[];
var Getdatasdatas=Getdatasdata.rbkc[1]
for(let myda of Getdatasdatas) {
myrbkc.push(myda.id);
}
var data = { var data = {
discipline_id: 1, discipline_id: Getdatasdata.rbkc[0],
sub_discipline_id: 1, sub_discipline_id: myrbkc,
tag_discipline_id: [1, 3], tag_discipline_id: Getdatasdata.rbzsd,
name: anserdata[0], name: anserdata[0],
item_type: "SINGLE", item_type: Getdatasdata.rbtx,
difficulty: 2, difficulty:Getdatasdata.rbnd,
analysis: anserdata[3], analysis: anserdata[3],
choices: choices, choices: choices,
@ -341,16 +348,25 @@ class Questionitem_banks extends Component {
choices.push(choicesdata); choices.push(choicesdata);
} }
var myrbkc=[];
var Getdatasdatas=Getdatasdata.rbkc[1]
for(let myda of Getdatasdatas) {
myrbkc.push(myda.id);
}
var data = { var data = {
discipline_id: 1, discipline_id: Getdatasdata.rbkc[0],
sub_discipline_id: 1, sub_discipline_id: myrbkc,
tag_discipline_id: [1, 3], tag_discipline_id: Getdatasdata.rbzsd,
name: anserdata[0], name: anserdata[0],
item_type: "MULTIPLE", item_type: Getdatasdata.rbtx,
difficulty: 2, difficulty:Getdatasdata.rbnd,
analysis: anserdata[3], analysis: anserdata[3],
choices: choices, choices: choices,
}
};
if (boolnew === true) { if (boolnew === true) {
axios.post(url, data) axios.post(url, data)
.then((result) => { .then((result) => {
@ -402,17 +418,22 @@ class Questionitem_banks extends Component {
is_answer: anserdata[1] === "1" ? 1 : 0, is_answer: anserdata[1] === "1" ? 1 : 0,
} }
choices.push(choicesdatas); choices.push(choicesdatas);
var myrbkc=[];
var Getdatasdatas=Getdatasdata.rbkc[1]
for(let myda of Getdatasdatas) {
myrbkc.push(myda.id);
}
var data = { var data = {
discipline_id: 1, discipline_id: Getdatasdata.rbkc[0],
sub_discipline_id: 1, sub_discipline_id: myrbkc,
tag_discipline_id: [1, 3], tag_discipline_id: Getdatasdata.rbzsd,
name: anserdata[0], name: anserdata[0],
item_type: "JUDGMENT", item_type: Getdatasdata.rbtx,
difficulty: 2, difficulty:Getdatasdata.rbnd,
analysis: anserdata[2], analysis: anserdata[3],
choices: choices, choices: choices,
}
};
if (boolnew === true) { if (boolnew === true) {
axios.post(url, data) axios.post(url, data)
.then((result) => { .then((result) => {
@ -461,18 +482,6 @@ class Questionitem_banks extends Component {
render() { render() {
let {page, limit, count, Headertop, visible, placement, modalsType, item_type} = this.state; let {page, limit, count, Headertop, visible, placement, modalsType, item_type} = this.state;
{/*<Option value="SINGLE">单选题</Option>*/
}
{/*<Option value="MULTIPLE">多选题</Option>*/
}
{/*<Option value="JUDGMENT">判断题</Option>*/
}
{/*<Option value="PROGRAM">编程题</Option>*/
}
//////console.log("塞选的数据");
//////console.log(item_type);
const params = this.props && this.props.match && this.props.match.params; const params = this.props && this.props.match && this.props.match.params;
// //console.log(params); // //console.log(params);
return ( return (

Loading…
Cancel
Save