调整题库

yslnewtiku
杨树林 5 years ago
parent 329cec5830
commit e9a7faeb7d

@ -113,26 +113,22 @@ class Questionitem_banks extends Component {
if (response.data.disciplines) {
const didata = response.data.disciplines;
for (var i = 0; i < didata.length; i++) {
for (var i = 0; i < didata.length; i++) {
const childern=[];
//方向
const fxdidata = didata[i].sub_disciplines;
for (var j = 0; j < fxdidata.length; j++) {
//课程
const zsddata = fxdidata[j].tag_disciplines;
const datakec={
value: didata[i].id,
label: didata[i].name,
children: [
childern.push(
{
value: fxdidata[j].id,
label: fxdidata[j].name,
},
],
}
this.state.disciplmy.push(datakec);
}
)
for (var k = 0; k < zsddata.length; k++) {
//知识点
this.state.knowledgepoints.push(zsddata[k]);
@ -141,6 +137,12 @@ class Questionitem_banks extends Component {
}
}
const datakec={
value: didata[i].id,
label: didata[i].name,
children: childern,
}
this.state.disciplmy.push(datakec);
}
this.setState({

@ -69,6 +69,7 @@ class Headplugselection extends Component {
//知识点
if(this.state.titlesttings===null){
this.props.showNotification('请先选择课程');
return
}
this.setState({

@ -173,7 +173,6 @@ class Itembankstop extends Component {
var tmp = JSON.parse(JSON.stringify(this.state.knowledgepoints));
for(var i=0;i<tmp.length;i++){
debugger
if(tmp[i].id===value) {
this.state.knowledgepoints.splice(i, 1);
}

Loading…
Cancel
Save