diff --git a/public/react/src/modules/courses/new/CoursesNew.js b/public/react/src/modules/courses/new/CoursesNew.js index 71092ebdb..6073eee97 100644 --- a/public/react/src/modules/courses/new/CoursesNew.js +++ b/public/react/src/modules/courses/new/CoursesNew.js @@ -47,7 +47,6 @@ class CoursesNew extends Component { checkboxgroup:undefined, addonAfteronelenone:0, addonAfteronelentwo:0, - classroomyslstiring:"", checkbofrup:[{module_type:"shixun_homework",module_name:"实训作业"},{module_type:"common_homework",module_name:"普通作业"},{module_type:"group_homework",module_name:"分组作业"} ,{module_type:"exercise",module_name:"试卷"},{module_type:"poll",module_name:"问卷"},{module_type:"graduation",module_name:"毕业设计"} ,{module_type:"board",module_name:"讨论"},{module_type:"attachment",module_name:"资源"},{module_type:"course_group",module_name:"分班"}], @@ -396,16 +395,11 @@ class CoursesNew extends Component { }; handleChange=(value)=>{ - if(value){ - this.props.form.setFieldsValue({ - course:value+"", - classroom:value+"", - }); - this.setState({ - classroomyslstiring:value - }) - } + this.props.form.setFieldsValue({ + // course:value, + classroom:value + }) }; handleSearchschool=(value)=>{ @@ -497,16 +491,7 @@ class CoursesNew extends Component { if(addonAftertwo){ addonAfteronelens=String(addonAftertwo).length; } - var addonAfterthree=this.props.form&&this.props.form.getFieldValue('course'); - var addonAfteronelens3=0; - if(addonAfterthree){ - addonAfteronelens3=String(addonAfterthree).length; - } - var addonAfterfour=this.props.form&&this.props.form.getFieldValue('classroom'); - var addonAfteronelens4=0; - if(addonAfterfour){ - addonAfteronelens4=String(addonAfterfour).length; - } + console.log(options); return ( @@ -568,16 +553,20 @@ class CoursesNew extends Component { .ant-select-dropdown{ // top: 221px !important; // left: 115px !important; + width: 280px !important; height: 160px; } .ant-select-dropdown-menu{ + width: 280px !important; height: 160px; } .construction .ant-input{ + width: 280px !important; margin-left: 0px !important; } .construction { - margin-left: 11px; + width: 280px; + margin-left: 10px; } .construction .ant-select-selection__placeholder, .ant-select-search__field__placeholder { @@ -589,51 +578,22 @@ class CoursesNew extends Component {
- {getFieldDecorator('course', { - rules: [{required: true, message: "不能为空"}, - { - max:60, - message: '不能超过60个字符', - }], + rules: [{required: true, message: "不能为空"}], })( - - - - + + )} - + {/*(错误示例:数据结构2017本部;数据结构2017秋季;数据结构2017电子商务1班)*/}

@@ -660,38 +620,11 @@ class CoursesNew extends Component { }

- - + {getFieldDecorator('classroom', { - rules: [{required: true, message: "不能为空"}, - { - max:60, - message: '不能超过60个字符', - }], - })()} + rules: [{required: true, message: "不能为空"}], + })()} {/*(如果本学期包含多个班级,只需创建一个课堂然后在课堂内部建立不同的分班)*/}

diff --git a/public/react/src/modules/courses/new/Goldsubject.js b/public/react/src/modules/courses/new/Goldsubject.js index 9695f60ff..696a81969 100644 --- a/public/react/src/modules/courses/new/Goldsubject.js +++ b/public/react/src/modules/courses/new/Goldsubject.js @@ -54,7 +54,6 @@ class Goldsubject extends Component { addonAfteronelenone:"", addonAfteronelentwo:"", Whethertocreateanewclassroom:true, - bordebool:false, checkbofrup:[ {module_type:"announcement",module_name:"公告栏"},{module_type:"online_learning",module_name:"在线学习"} ,{module_type:"shixun_homework",module_name:"实训作业"},{module_type:"common_homework",module_name:"普通作业"} @@ -529,26 +528,12 @@ class Goldsubject extends Component { }; handleChange=(value)=>{ - if(value){ - if(value.length>60){ - this.setState({ - bordebool:true, - }) - }else if(value.length===0){ - this.setState({ - bordebool:true, - }) - }else{ - this.setState({ - bordebool:false, - }) - } - }else{ - this.setState({ - bordebool:true - }) - } }; + this.props.form.setFieldsValue({ + // course:value, + classroom:value + }) + }; handleSearchschool=(value)=>{ @@ -617,7 +602,7 @@ class Goldsubject extends Component { this.applyForAddOrgForm.setVisible(true) } render() { - let {datatime,datatimetwo,school,searchlistscholl,Whethertocreateanewclassroom,bordebool,addonAfteronelenone,addonAfteronelentwo} = this.state; + let {datatime,datatimetwo,school,searchlistscholl,Whethertocreateanewclassroom,addonAfteronelenone,addonAfteronelentwo} = this.state; const {getFieldDecorator} = this.props.form; const propsWithoutForm = Object.assign({}, this.props) delete propsWithoutForm.form @@ -639,13 +624,9 @@ class Goldsubject extends Component { if(addonAftertwo){ addonAfteronelens=String(addonAftertwo).length; } - - var addonAfterfour=this.props.form&&this.props.form.getFieldValue('classroom'); - var addonAfteronelens4=0; - if(addonAfterfour){ - addonAfteronelens4=String(addonAfterfour).length; - } - + console.log(addonAfteronelenone); + console.log(addonAfteronelentwo); + console.log(options); return ( @@ -707,16 +688,20 @@ class Goldsubject extends Component { .ant-select-dropdown{ // top: 221px !important; // left: 115px !important; + width: 280px !important; height: 160px; } .ant-select-dropdown-menu{ + width: 280px !important; height: 160px; } .construction .ant-input{ + width: 280px !important; margin-left: 0px !important; } .construction { - margin-left: 11px; + width: 280px; + margin-left: 10px; } .construction .ant-select-selection__placeholder, .ant-select-search__field__placeholder { @@ -726,7 +711,38 @@ class Goldsubject extends Component { `} + {/*

*/} + {/*
*/} + {/* */} + {/* {getFieldDecorator('course', {*/} + {/* rules: [{required: true, message: "不能为空"}],*/} + {/* })(*/} + + {/* */} + {/* {options}*/} + {/* */} + {/* )}*/} + {/* */} + {/* /!*(错误示例:数据结构2017本部;数据结构2017秋季;数据结构2017电子商务1班)*!/*/} + {/*

*/} + {/* */} + {/* 正确示例:数据结构*/} + {/*

*/} + {/*

*/} + {/* */} + {/* 错误示例:数据结构2019春*/} + {/*

*/} + {/*
*/} + {/*
*/} + {/*
*/} + {/*
*/} + {/*
*/} -
- - - - {getFieldDecorator('classroom', { - rules: [{required: true, message: "不能为空"}, - { - max:60, - message: '不能超过60个字符', - }], - })()} + + {getFieldDecorator('classroom', { + rules: [{required: true, message: "不能为空"}], + })( + + + {options} + + )} + {/**/} + {/* /!*(如果本学期包含多个班级,只需创建一个课堂然后在课堂内部建立不同的分班)*!/*/} + {/*

*/} + {/* */} + {/* 正确示例:数据结构2019春季班级*/} + {/*

*/} + {/*

*/} + {/* */} + {/* 错误示例:2019春季班级数据结构*/} + {/*

*/} + {/*
*/}
+