|
|
@ -48,6 +48,7 @@ class Itembankstop extends Component {
|
|
|
|
page:1,
|
|
|
|
page:1,
|
|
|
|
Knowpoints:[],
|
|
|
|
Knowpoints:[],
|
|
|
|
rbtx:undefined,
|
|
|
|
rbtx:undefined,
|
|
|
|
|
|
|
|
rbkc:undefined,
|
|
|
|
knowledgepoints:[],
|
|
|
|
knowledgepoints:[],
|
|
|
|
options:[],
|
|
|
|
options:[],
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -60,9 +61,10 @@ class Itembankstop extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
knowledgepoints:this.props.knowledgepoints,
|
|
|
|
|
|
|
|
options:this.props.disciplmy
|
|
|
|
options:this.props.disciplmy
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
// knowledgepoints:this.props.knowledgepoints,
|
|
|
|
|
|
|
|
|
|
|
|
////console.log("componentDidMount");
|
|
|
|
////console.log("componentDidMount");
|
|
|
|
////console.log(this.state);
|
|
|
|
////console.log(this.state);
|
|
|
|
////console.log(this.props);
|
|
|
|
////console.log(this.props);
|
|
|
@ -96,11 +98,11 @@ class Itembankstop extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if(prevProps.knowledgepoints !== this.props.knowledgepoints){
|
|
|
|
// if(prevProps.knowledgepoints !== this.props.knowledgepoints){
|
|
|
|
this.setState({
|
|
|
|
// this.setState({
|
|
|
|
knowledgepoints:this.props.knowledgepoints
|
|
|
|
// knowledgepoints:this.props.knowledgepoints
|
|
|
|
})
|
|
|
|
// })
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
if(prevProps.disciplmy !== this.props.disciplmy){
|
|
|
|
if(prevProps.disciplmy !== this.props.disciplmy){
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
@ -124,7 +126,19 @@ class Itembankstop extends Component {
|
|
|
|
if (!err) {
|
|
|
|
if (!err) {
|
|
|
|
// ////console.log("获取的form 数据");
|
|
|
|
// ////console.log("获取的form 数据");
|
|
|
|
// ////console.log(values);
|
|
|
|
// ////console.log(values);
|
|
|
|
data= values;
|
|
|
|
data.push({
|
|
|
|
|
|
|
|
rbnd:values.rbnd
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
data.push({
|
|
|
|
|
|
|
|
rbtx:values.rbtx
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
data.push({
|
|
|
|
|
|
|
|
rbzsd:this.state.Knowpoints
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
data.push({
|
|
|
|
|
|
|
|
rbkc:values.rbkc
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
@ -160,14 +174,16 @@ class Itembankstop extends Component {
|
|
|
|
//课程
|
|
|
|
//课程
|
|
|
|
////console.log("课程");
|
|
|
|
////console.log("课程");
|
|
|
|
////console.log(value);
|
|
|
|
////console.log(value);
|
|
|
|
|
|
|
|
var valuename=undefined;
|
|
|
|
this.props.form.setFieldsValue({
|
|
|
|
this.props.form.setFieldsValue({
|
|
|
|
rbkc:value,
|
|
|
|
rbzsd:value,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
var arr= this.state.knowledgepoints;
|
|
|
|
var arr= this.state.knowledgepoints;
|
|
|
|
for(let data of arr) {
|
|
|
|
for(let data of arr) {
|
|
|
|
if(data.id===value){
|
|
|
|
if(data.id===value){
|
|
|
|
this.state.Knowpoints.push(data);
|
|
|
|
this.state.Knowpoints.push(data);
|
|
|
|
|
|
|
|
valuename=data.name;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -179,6 +195,7 @@ class Itembankstop extends Component {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
rbzsd:valuename,
|
|
|
|
Knowpoints:this.state.Knowpoints,
|
|
|
|
Knowpoints:this.state.Knowpoints,
|
|
|
|
knowledgepoints:this.state.knowledgepoints,
|
|
|
|
knowledgepoints:this.state.knowledgepoints,
|
|
|
|
})
|
|
|
|
})
|
|
|
@ -188,7 +205,7 @@ class Itembankstop extends Component {
|
|
|
|
handleFormzhishidian=(value)=>{
|
|
|
|
handleFormzhishidian=(value)=>{
|
|
|
|
//课程
|
|
|
|
//课程
|
|
|
|
this.props.form.setFieldsValue({
|
|
|
|
this.props.form.setFieldsValue({
|
|
|
|
rbzsd:value,
|
|
|
|
rbkc:value,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
// console.log("handleFormzhishidian");
|
|
|
|
// console.log("handleFormzhishidian");
|
|
|
@ -226,8 +243,11 @@ class Itembankstop extends Component {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
this.props.form.setFieldsValue({
|
|
|
|
this.props.form.setFieldsValue({
|
|
|
|
rbkc:undefined,
|
|
|
|
rbzsd:undefined,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
rbzsd:undefined,
|
|
|
|
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
handleFormtixing=(value)=>{
|
|
|
|
handleFormtixing=(value)=>{
|
|
|
@ -271,6 +291,23 @@ class Itembankstop extends Component {
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
Knowpoints:this.state.Knowpoints,
|
|
|
|
Knowpoints:this.state.Knowpoints,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(this.state.Knowpoints.length===0){
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
rbzsd:undefined,
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
} else if(this.state.Knowpoints.length>0){
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
const myknowda=this.state.Knowpoints;
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
rbzsd:myknowda[this.state.Knowpoints.length-1].name,
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}catch (e) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -319,14 +356,14 @@ class Itembankstop extends Component {
|
|
|
|
<Form.Item
|
|
|
|
<Form.Item
|
|
|
|
label="课程"
|
|
|
|
label="课程"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
{getFieldDecorator("rbzsd",
|
|
|
|
{getFieldDecorator("rbkc",
|
|
|
|
{
|
|
|
|
{
|
|
|
|
rules: [{ required: true, message: '请选择课程' }],
|
|
|
|
rules: [{ required: true, message: '请选择课程' }],
|
|
|
|
}
|
|
|
|
}
|
|
|
|
)(
|
|
|
|
)(
|
|
|
|
<div className="sortinxdirection">
|
|
|
|
<div className="sortinxdirection">
|
|
|
|
<InputGroup compact >
|
|
|
|
<InputGroup compact >
|
|
|
|
<Cascader style={{ width: '258px' }} defaultValue={this.state.Knowpoints} options={options} onChange={this.handleFormzhishidian} placeholder="请选择..." />
|
|
|
|
<Cascader style={{ width: '258px' }} options={options} onChange={this.handleFormzhishidian} placeholder="请选择..." />
|
|
|
|
</InputGroup>
|
|
|
|
</InputGroup>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -356,14 +393,14 @@ class Itembankstop extends Component {
|
|
|
|
<Form.Item
|
|
|
|
<Form.Item
|
|
|
|
label="知识点"
|
|
|
|
label="知识点"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
{getFieldDecorator("rbkc",
|
|
|
|
{getFieldDecorator("rbzsd",
|
|
|
|
{
|
|
|
|
{
|
|
|
|
rules: [{ required: true, message: '请选择知识点' }],
|
|
|
|
rules: [{ required: true, message: '请选择知识点' }],
|
|
|
|
}
|
|
|
|
}
|
|
|
|
)(
|
|
|
|
)(
|
|
|
|
<div className="sortinxdirection">
|
|
|
|
<div className="sortinxdirection">
|
|
|
|
<InputGroup compact >
|
|
|
|
<InputGroup compact >
|
|
|
|
<Select style={{ width: '258px' }} onChange={this.handleFormkechen} placeholder="请选择...">
|
|
|
|
<Select style={{ width: '258px' }} value={this.state.rbzsd} onChange={this.handleFormkechen} placeholder="请选择...">
|
|
|
|
{this.state.knowledgepoints&&this.state.knowledgepoints.map((object, index) => {
|
|
|
|
{this.state.knowledgepoints&&this.state.knowledgepoints.map((object, index) => {
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<Option value={object.id}>{object.name}</Option>
|
|
|
|
<Option value={object.id}>{object.name}</Option>
|
|
|
|