|
|
|
@ -59,6 +59,7 @@ class Itembankstop extends Component {
|
|
|
|
|
this.state = {
|
|
|
|
|
page:1,
|
|
|
|
|
Knowpoints:[],
|
|
|
|
|
rbtx:"",
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//初始化
|
|
|
|
@ -79,8 +80,23 @@ class Itembankstop extends Component {
|
|
|
|
|
// }
|
|
|
|
|
// }).catch((error) => {
|
|
|
|
|
// //console.log(error)
|
|
|
|
|
// });
|
|
|
|
|
// });()
|
|
|
|
|
// 题型
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
componentDidUpdate(prevProps) {
|
|
|
|
|
console.log("componentDidUpdate");
|
|
|
|
|
console.log(prevProps);
|
|
|
|
|
console.log(this.props.item_banksedit);
|
|
|
|
|
|
|
|
|
|
if(prevProps.item_banksedit !== this.props.item_banksedit){
|
|
|
|
|
debugger
|
|
|
|
|
this.handleFormtixing(this.props.item_banksedit.item_type);
|
|
|
|
|
this.handleFormLayoutChange(this.props.item_banksedit.difficulty);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
onChange=(e)=> {
|
|
|
|
|
//console.log(`checked = ${e.target.checked}`);
|
|
|
|
@ -122,6 +138,9 @@ class Itembankstop extends Component {
|
|
|
|
|
this.props.form.setFieldsValue({
|
|
|
|
|
rbnd:value,
|
|
|
|
|
});
|
|
|
|
|
this.setState({
|
|
|
|
|
rbnd:value,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
handleFormkechen=(value)=>{
|
|
|
|
@ -148,11 +167,14 @@ class Itembankstop extends Component {
|
|
|
|
|
|
|
|
|
|
handleFormtixing=(value)=>{
|
|
|
|
|
//题型
|
|
|
|
|
//console.log("题型");
|
|
|
|
|
//console.log(value);
|
|
|
|
|
console.log("题型");
|
|
|
|
|
console.log(value);
|
|
|
|
|
this.props.form.setFieldsValue({
|
|
|
|
|
rbtx:value,
|
|
|
|
|
});
|
|
|
|
|
this.setState({
|
|
|
|
|
rbtx:value,
|
|
|
|
|
})
|
|
|
|
|
this.props.setitem_type(value);
|
|
|
|
|
}
|
|
|
|
|
preventDefault=(e)=> {
|
|
|
|
@ -188,7 +210,8 @@ class Itembankstop extends Component {
|
|
|
|
|
render() {
|
|
|
|
|
let {page}=this.state;
|
|
|
|
|
const { getFieldDecorator } = this.props.form;
|
|
|
|
|
|
|
|
|
|
console.log("renderrenderrender");
|
|
|
|
|
console.log(this.props.item_banksedit);
|
|
|
|
|
return (
|
|
|
|
|
|
|
|
|
|
<div className=" clearfix educontent Contentquestionbankstyle w100s w1200fpx mt19" >
|
|
|
|
@ -234,6 +257,7 @@ class Itembankstop extends Component {
|
|
|
|
|
|
|
|
|
|
<InputGroup compact >
|
|
|
|
|
<Select style={{ width: '258px' }} onChange={this.handleFormkechen} placeholder="请选择...">
|
|
|
|
|
|
|
|
|
|
<Option value="Home">Home</Option>
|
|
|
|
|
<Option value="Company">Company</Option>
|
|
|
|
|
</Select>
|
|
|
|
@ -286,7 +310,7 @@ class Itembankstop extends Component {
|
|
|
|
|
}
|
|
|
|
|
)(
|
|
|
|
|
<InputGroup compact>
|
|
|
|
|
<Select style={{ width: '258px' }} onChange={this.handleFormtixing} placeholder="请选择...">
|
|
|
|
|
<Select style={{ width: '258px' }} defaultValue onChange={this.handleFormtixing} placeholder="请选择...">
|
|
|
|
|
<Option value="SINGLE">单选题</Option>
|
|
|
|
|
<Option value="MULTIPLE">多选题</Option>
|
|
|
|
|
<Option value="JUDGMENT">判断题</Option>
|
|
|
|
@ -357,7 +381,7 @@ class Itembankstop extends Component {
|
|
|
|
|
}
|
|
|
|
|
)(
|
|
|
|
|
|
|
|
|
|
<Radio.Group onChange={this.handleFormLayoutChange} >
|
|
|
|
|
<Radio.Group defaultValue={this.state.rbnd} onChange={this.handleFormLayoutChange} >
|
|
|
|
|
<Radio.Button value="1">简单</Radio.Button>
|
|
|
|
|
<Radio.Button value="2">适中</Radio.Button>
|
|
|
|
|
<Radio.Button value="3">困难</Radio.Button>
|
|
|
|
|