|
|
@ -238,6 +238,11 @@ class Itembankstop extends Component {
|
|
|
|
//课程
|
|
|
|
//课程
|
|
|
|
////console.log("课程");
|
|
|
|
////console.log("课程");
|
|
|
|
////console.log(value);
|
|
|
|
////console.log(value);
|
|
|
|
|
|
|
|
// console.log("handleFormkechen");
|
|
|
|
|
|
|
|
if(this.state.Knowpoints.length>4){
|
|
|
|
|
|
|
|
this.props.showNotification(`知识点最多选择5个`);
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
var valuename = undefined;
|
|
|
|
var valuename = undefined;
|
|
|
|
this.props.form.setFieldsValue({
|
|
|
|
this.props.form.setFieldsValue({
|
|
|
|
rbzsd: value,
|
|
|
|
rbzsd: value,
|
|
|
@ -384,9 +389,11 @@ class Itembankstop extends Component {
|
|
|
|
NewknTypedel:bool
|
|
|
|
NewknTypedel:bool
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
NewknTypedeltyoedel=(value)=>{
|
|
|
|
NewknTypedeltyoedel=(value)=>{
|
|
|
|
|
|
|
|
|
|
|
|
if(value===null||value===""){
|
|
|
|
if(value===null||value===""){
|
|
|
|
this.props.showNotification(`请输入知识点`);
|
|
|
|
this.props.showNotification(`请输入知识点`);
|
|
|
|
return
|
|
|
|
return
|
|
|
@ -396,15 +403,28 @@ class Itembankstop extends Component {
|
|
|
|
this.props.showNotification(`请输入知识点`);
|
|
|
|
this.props.showNotification(`请输入知识点`);
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(this.state.rbkc===undefined || this.state.rbkc===null || this.state.rbkc===""){
|
|
|
|
|
|
|
|
this.props.showNotification(`请选择课程方向`);
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
var data={
|
|
|
|
var data={
|
|
|
|
name:"",
|
|
|
|
name:value,
|
|
|
|
sub_discipline_id:""
|
|
|
|
sub_discipline_id:this.state.rbkc[1]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const url="/tag_disciplines.json";
|
|
|
|
const url="/tag_disciplines.json";
|
|
|
|
axios.post(url,data)
|
|
|
|
axios.post(url,data)
|
|
|
|
.then((result) => {
|
|
|
|
.then((result) => {
|
|
|
|
if (result.data.status == 0) {
|
|
|
|
if (result.data.status === 0) {
|
|
|
|
this.props.showNotification(`新增知识点成功!`);
|
|
|
|
this.props.showNotification(`新增知识点成功!`);
|
|
|
|
|
|
|
|
var leydata={
|
|
|
|
|
|
|
|
id: result.data.tag_discipline_id,
|
|
|
|
|
|
|
|
name:value,
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
this.state.knowledgepoints.push(leydata);
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
knowledgepoints:this.state.knowledgepoints
|
|
|
|
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}).catch((error) => {
|
|
|
|
}).catch((error) => {
|
|
|
|
//console.log(error);
|
|
|
|
//console.log(error);
|
|
|
|