|
|
|
@ -47,6 +47,7 @@ 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:"分班"}],
|
|
|
|
@ -364,6 +365,7 @@ class CoursesNew extends Component {
|
|
|
|
|
search:value
|
|
|
|
|
}).then((result)=>{
|
|
|
|
|
// console.log(result.data)
|
|
|
|
|
if(result){
|
|
|
|
|
if (result.data.message===undefined) {
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
@ -372,6 +374,7 @@ class CoursesNew extends Component {
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// this.props.form.setFieldsValue({
|
|
|
|
|
// course:value
|
|
|
|
|
// })
|
|
|
|
@ -393,11 +396,16 @@ class CoursesNew extends Component {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
handleChange=(value)=>{
|
|
|
|
|
|
|
|
|
|
if(value){
|
|
|
|
|
this.props.form.setFieldsValue({
|
|
|
|
|
// course:value,
|
|
|
|
|
classroom:value
|
|
|
|
|
course:value+"",
|
|
|
|
|
classroom:value+"",
|
|
|
|
|
});
|
|
|
|
|
this.setState({
|
|
|
|
|
classroomyslstiring:value
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
handleSearchschool=(value)=>{
|
|
|
|
@ -489,6 +497,16 @@ 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;
|
|
|
|
|
}
|
|
|
|
|
return (
|
|
|
|
|
<React.Fragment>
|
|
|
|
|
|
|
|
|
@ -550,20 +568,16 @@ 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 {
|
|
|
|
|
width: 280px;
|
|
|
|
|
margin-left: 10px;
|
|
|
|
|
margin-left: 11px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.construction .ant-select-selection__placeholder, .ant-select-search__field__placeholder {
|
|
|
|
@ -575,21 +589,51 @@ class CoursesNew extends Component {
|
|
|
|
|
|
|
|
|
|
<div className="stud-class-set bor-bottom-greyE padding10200 ">
|
|
|
|
|
<div className={"TabsWarpcourse"}>
|
|
|
|
|
<style>{
|
|
|
|
|
`
|
|
|
|
|
.yslzxueshis .ant-input{
|
|
|
|
|
border-right: none !important;
|
|
|
|
|
height: 40px !important;
|
|
|
|
|
width: 655px !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.yslzxueshisy .ant-input-group-addon{
|
|
|
|
|
width: 65px !important;
|
|
|
|
|
background-color: #fafafa!important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.yslzxueshis .ant-select-dropdown{
|
|
|
|
|
width: 655px !important;
|
|
|
|
|
height:160px !important;
|
|
|
|
|
}
|
|
|
|
|
.yslzxueshis .ant-select-dropdown-menu{
|
|
|
|
|
width: 655px !important;
|
|
|
|
|
}
|
|
|
|
|
`
|
|
|
|
|
}</style>
|
|
|
|
|
<Form.Item label="课程名称">
|
|
|
|
|
{getFieldDecorator('course', {
|
|
|
|
|
rules: [{required: true, message: "不能为空"}],
|
|
|
|
|
rules: [{required: true, message: "不能为空"},
|
|
|
|
|
{
|
|
|
|
|
max:60,
|
|
|
|
|
message: '不能超过60个字符',
|
|
|
|
|
}],
|
|
|
|
|
})(
|
|
|
|
|
|
|
|
|
|
<AutoComplete style={{ width: 280 }}
|
|
|
|
|
<AutoComplete
|
|
|
|
|
style={{ width: 720}}
|
|
|
|
|
onSearch={this.handleSearch}
|
|
|
|
|
onChange={this.handleChange}
|
|
|
|
|
className={"fl construction "}
|
|
|
|
|
className={"fl construction yslzxueshis "}
|
|
|
|
|
placeholder="例如:数据结构"
|
|
|
|
|
dataSource={options}
|
|
|
|
|
|
|
|
|
|
>
|
|
|
|
|
{options}
|
|
|
|
|
<Input className="yslzxueshisy" addonAfter={String(addonAfteronelens3)+"/60"} />
|
|
|
|
|
|
|
|
|
|
</AutoComplete>
|
|
|
|
|
)}
|
|
|
|
|
<span className={"newcoursestitle fl"}>
|
|
|
|
|
<span className="newcoursestitle fl">
|
|
|
|
|
{/*(错误示例:数据结构2017本部;数据结构2017秋季;数据结构2017电子商务1班)*/}
|
|
|
|
|
<p className="ant-progress-text">
|
|
|
|
|
<Icon style={{ color: '#52c41a' }} type="check-circle" theme="filled"/>
|
|
|
|
@ -616,11 +660,38 @@ class CoursesNew extends Component {
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
<div className="stud-class-set bor-bottom-greyE padding1020 ">
|
|
|
|
|
<style>{
|
|
|
|
|
`
|
|
|
|
|
.yslzxueshiskmc .ant-input{
|
|
|
|
|
border-right: none !important;
|
|
|
|
|
height: 40px !important;
|
|
|
|
|
width: 655px !important;
|
|
|
|
|
|
|
|
|
|
<Form.Item label="课堂名称">
|
|
|
|
|
}
|
|
|
|
|
.yslzxueshiskmc .ant-input-group{
|
|
|
|
|
width: 720px !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.yslzxueshiskmc .ant-input-group-addon{
|
|
|
|
|
width: 65px !important;
|
|
|
|
|
background-color: #fafafa!important;
|
|
|
|
|
}
|
|
|
|
|
.yslzxueshiskmc .ant-input-group-wrapper{
|
|
|
|
|
width: 720px !important;
|
|
|
|
|
}
|
|
|
|
|
.yslzxueshiskmcs .ant-input-group-wrapper{
|
|
|
|
|
width: 720px !important;
|
|
|
|
|
}
|
|
|
|
|
`
|
|
|
|
|
}</style>
|
|
|
|
|
<Form.Item label="课堂名称" className="yslzxueshiskmcs">
|
|
|
|
|
{getFieldDecorator('classroom', {
|
|
|
|
|
rules: [{required: true, message: "不能为空"}],
|
|
|
|
|
})(<Input className={"greyInput fl"} placeholder="例如:数据结构2016秋季班级"/>)}
|
|
|
|
|
rules: [{required: true, message: "不能为空"},
|
|
|
|
|
{
|
|
|
|
|
max:60,
|
|
|
|
|
message: '不能超过60个字符',
|
|
|
|
|
}],
|
|
|
|
|
})(<Input className="yslzxueshiskmc fl" placeholder="例如:数据结构2016秋季班级" addonAfter={String(addonAfteronelens4)+"/60"} />)}
|
|
|
|
|
<span className={"newcoursestitle fl"}>
|
|
|
|
|
{/*(如果本学期包含多个班级,只需创建一个课堂然后在课堂内部建立不同的分班)*/}
|
|
|
|
|
<p className="ant-progress-text">
|
|
|
|
@ -698,7 +769,7 @@ class CoursesNew extends Component {
|
|
|
|
|
}
|
|
|
|
|
]}
|
|
|
|
|
)(
|
|
|
|
|
<Input id="credit" className="yslzxueshi" placeholder="例如:3" addonAfter={String(addonAfteronelen)+"/5"} maxLength={5}/>
|
|
|
|
|
<Input id="credit" className="yslzxueshi" placeholder="例如:3" addonAfter={String(addonAfteronelens)+"/5"} maxLength={5}/>
|
|
|
|
|
)}
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item
|
|
|
|
|