|
|
|
@ -20,28 +20,6 @@ import './../questioncss/questioncom.css';
|
|
|
|
|
|
|
|
|
|
const InputGroup = Input.Group;
|
|
|
|
|
const {Option} = Select;
|
|
|
|
|
const options = [
|
|
|
|
|
{
|
|
|
|
|
value: '方向',
|
|
|
|
|
label: '方向',
|
|
|
|
|
children: [
|
|
|
|
|
{
|
|
|
|
|
value: '课程',
|
|
|
|
|
label: '课程',
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: 'jiangsu',
|
|
|
|
|
label: 'Jiangsu',
|
|
|
|
|
children: [
|
|
|
|
|
{
|
|
|
|
|
value: 'nanjing',
|
|
|
|
|
label: 'Nanjing',
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
class Comthetestpapers extends Component {
|
|
|
|
|
constructor(props) {
|
|
|
|
@ -64,52 +42,16 @@ class Comthetestpapers extends Component {
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
options: this.props.disciplmy
|
|
|
|
|
options: this.props.disciplmy,
|
|
|
|
|
knowledgepoints: this.props.knowledgepoints,
|
|
|
|
|
})
|
|
|
|
|
// knowledgepoints:this.props.knowledgepoints,
|
|
|
|
|
|
|
|
|
|
////console.log("componentDidMount");
|
|
|
|
|
////console.log(this.state);
|
|
|
|
|
////console.log(this.props);
|
|
|
|
|
// let homeworkid = this.props.match.params.homeworkid;
|
|
|
|
|
// let url = "/homework_commons/" + homeworkid + "/end_groups.json";
|
|
|
|
|
// axios.get(url).then((response) => {
|
|
|
|
|
// if (response.status === 200) {
|
|
|
|
|
// this.setState({})
|
|
|
|
|
// }
|
|
|
|
|
// }).catch((error) => {
|
|
|
|
|
// ////console.log(error)
|
|
|
|
|
// });()
|
|
|
|
|
// 题型
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
componentDidUpdate(prevProps) {
|
|
|
|
|
|
|
|
|
|
if (prevProps.item_banksedit !== this.props.item_banksedit) {
|
|
|
|
|
if (this.props.item_banksedit.item_type) {
|
|
|
|
|
this.handleFormtixing(this.props.item_banksedit.item_type);
|
|
|
|
|
}
|
|
|
|
|
if (this.props.item_banksedit.difficulty) {
|
|
|
|
|
this.handleFormLayoutChange(this.props.item_banksedit.difficulty);
|
|
|
|
|
}
|
|
|
|
|
if (this.props.item_banksedit.tag_disciplines) {
|
|
|
|
|
this.handletag_disciplinesChange(this.props.item_banksedit.tag_disciplines);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (this.props.item_banksedit.discipline &&this.props.item_banksedit.sub_discipline) {
|
|
|
|
|
this.handdisciplinesChange(this.props.item_banksedit.discipline,this.props.item_banksedit.sub_discipline);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (prevProps.disciplmy !== this.props.disciplmy) {
|
|
|
|
|
this.setState({
|
|
|
|
|
options: this.props.disciplmy
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
handdisciplinesChange =(name,title)=>{
|
|
|
|
|
this.setState({
|
|
|
|
|
rbkc:[name.id,title.id]
|
|
|
|
@ -424,14 +366,17 @@ class Comthetestpapers extends Component {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
|
let {page} = this.state;
|
|
|
|
|
let {page,options} = this.state;
|
|
|
|
|
const {getFieldDecorator} = this.props.form;
|
|
|
|
|
const options = this.state.searchlist && this.state.searchlist.map(d => <Option key={d.name} value={d.name}>{d.name}</Option>);
|
|
|
|
|
const optionss = this.state.searchlist && this.state.searchlist.map(d => <Option key={d.name} value={d.name}>{d.name}</Option>);
|
|
|
|
|
var addonAfterthree=this.props.form&&this.props.form.getFieldValue('classroom');
|
|
|
|
|
var addonAfteronelens3=0;
|
|
|
|
|
if(addonAfterthree){
|
|
|
|
|
addonAfteronelens3=String(addonAfterthree).length;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
console.log("Comthetestpapers.js");
|
|
|
|
|
console.log(this.props);
|
|
|
|
|
return (
|
|
|
|
|
|
|
|
|
|
<div className=" clearfix educontent Contentquestionbankstyle w100s w1200fpx mt19">
|
|
|
|
@ -563,7 +508,7 @@ class Comthetestpapers extends Component {
|
|
|
|
|
style={{width: 704}}
|
|
|
|
|
onSearch={this.handleSearch}
|
|
|
|
|
className={"fl construction yslzxueshis "}
|
|
|
|
|
dataSource={options}
|
|
|
|
|
dataSource={optionss}
|
|
|
|
|
>
|
|
|
|
|
<Input className="yslzxueshisy " placeholder="例如:数据结构" onInput={this.handleChange} addonAfter={String(addonAfteronelens3)+"/60"} maxLength={60} />
|
|
|
|
|
</AutoComplete>
|
|
|
|
|