dev_aliyun_beta
杨树林 5 years ago
parent f2d87fe271
commit 5a0d629642

@ -47,7 +47,6 @@ class CoursesNew extends Component {
checkboxgroup:undefined, checkboxgroup:undefined,
addonAfteronelenone:0, addonAfteronelenone:0,
addonAfteronelentwo:0, addonAfteronelentwo:0,
classroomyslstiring:"",
checkbofrup:[{module_type:"shixun_homework",module_name:"实训作业"},{module_type:"common_homework",module_name:"普通作业"},{module_type:"group_homework",module_name:"分组作业"} 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:"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:"分班"}], ,{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)=>{ 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)=>{ handleSearchschool=(value)=>{
@ -497,16 +491,7 @@ class CoursesNew extends Component {
if(addonAftertwo){ if(addonAftertwo){
addonAfteronelens=String(addonAftertwo).length; addonAfteronelens=String(addonAftertwo).length;
} }
var addonAfterthree=this.props.form&&this.props.form.getFieldValue('course'); console.log(options);
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 ( return (
<React.Fragment> <React.Fragment>
@ -568,16 +553,20 @@ class CoursesNew extends Component {
.ant-select-dropdown{ .ant-select-dropdown{
// top: 221px !important; // top: 221px !important;
// left: 115px !important; // left: 115px !important;
width: 280px !important;
height: 160px; height: 160px;
} }
.ant-select-dropdown-menu{ .ant-select-dropdown-menu{
width: 280px !important;
height: 160px; height: 160px;
} }
.construction .ant-input{ .construction .ant-input{
width: 280px !important;
margin-left: 0px !important; margin-left: 0px !important;
} }
.construction { .construction {
margin-left: 11px; width: 280px;
margin-left: 10px;
} }
.construction .ant-select-selection__placeholder, .ant-select-search__field__placeholder { .construction .ant-select-selection__placeholder, .ant-select-search__field__placeholder {
@ -589,51 +578,22 @@ class CoursesNew extends Component {
<div className="stud-class-set bor-bottom-greyE padding10200 "> <div className="stud-class-set bor-bottom-greyE padding10200 ">
<div className={"TabsWarpcourse"}> <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="课程名称"> <Form.Item label="课程名称">
{getFieldDecorator('course', { {getFieldDecorator('course', {
rules: [{required: true, message: "不能为空"}, rules: [{required: true, message: "不能为空"}],
{
max:60,
message: '不能超过60个字符',
}],
})( })(
<AutoComplete <AutoComplete style={{ width: 280 }}
style={{ width: 720}}
onSearch={this.handleSearch} onSearch={this.handleSearch}
onChange={this.handleChange} onChange={this.handleChange}
className={"fl construction yslzxueshis "} className={"fl construction "}
placeholder="例如:数据结构" placeholder="例如:数据结构"
dataSource={options} dataSource={options}
> >
<Input className="yslzxueshisy" addonAfter={String(addonAfteronelens3)+"/60"} />
</AutoComplete>
</AutoComplete>
)} )}
<span className="newcoursestitle fl"> <span className={"newcoursestitle fl"}>
{/*错误示例数据结构2017本部数据结构2017秋季数据结构2017电子商务1班*/} {/*错误示例数据结构2017本部数据结构2017秋季数据结构2017电子商务1班*/}
<p className="ant-progress-text"> <p className="ant-progress-text">
<Icon style={{ color: '#52c41a' }} type="check-circle" theme="filled"/> <Icon style={{ color: '#52c41a' }} type="check-circle" theme="filled"/>
@ -660,38 +620,11 @@ class CoursesNew extends Component {
} }
</style> </style>
<div className="stud-class-set bor-bottom-greyE padding1020 "> <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', { {getFieldDecorator('classroom', {
rules: [{required: true, message: "不能为空"}, rules: [{required: true, message: "不能为空"}],
{ })(<Input className={"greyInput fl"} placeholder="例如数据结构2016秋季班级"/>)}
max:60,
message: '不能超过60个字符',
}],
})(<Input className="yslzxueshiskmc fl" placeholder="例如数据结构2016秋季班级" addonAfter={String(addonAfteronelens4)+"/60"} />)}
<span className={"newcoursestitle fl"}> <span className={"newcoursestitle fl"}>
{/*(如果本学期包含多个班级,只需创建一个课堂然后在课堂内部建立不同的分班)*/} {/*(如果本学期包含多个班级,只需创建一个课堂然后在课堂内部建立不同的分班)*/}
<p className="ant-progress-text"> <p className="ant-progress-text">

@ -54,7 +54,6 @@ class Goldsubject extends Component {
addonAfteronelenone:"", addonAfteronelenone:"",
addonAfteronelentwo:"", addonAfteronelentwo:"",
Whethertocreateanewclassroom:true, Whethertocreateanewclassroom:true,
bordebool:false,
checkbofrup:[ checkbofrup:[
{module_type:"announcement",module_name:"公告栏"},{module_type:"online_learning",module_name:"在线学习"} {module_type:"announcement",module_name:"公告栏"},{module_type:"online_learning",module_name:"在线学习"}
,{module_type:"shixun_homework",module_name:"实训作业"},{module_type:"common_homework",module_name:"普通作业"} ,{module_type:"shixun_homework",module_name:"实训作业"},{module_type:"common_homework",module_name:"普通作业"}
@ -529,26 +528,12 @@ class Goldsubject extends Component {
}; };
handleChange=(value)=>{ 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)=>{ handleSearchschool=(value)=>{
@ -617,7 +602,7 @@ class Goldsubject extends Component {
this.applyForAddOrgForm.setVisible(true) this.applyForAddOrgForm.setVisible(true)
} }
render() { 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 {getFieldDecorator} = this.props.form;
const propsWithoutForm = Object.assign({}, this.props) const propsWithoutForm = Object.assign({}, this.props)
delete propsWithoutForm.form delete propsWithoutForm.form
@ -639,13 +624,9 @@ class Goldsubject extends Component {
if(addonAftertwo){ if(addonAftertwo){
addonAfteronelens=String(addonAftertwo).length; addonAfteronelens=String(addonAftertwo).length;
} }
console.log(addonAfteronelenone);
var addonAfterfour=this.props.form&&this.props.form.getFieldValue('classroom'); console.log(addonAfteronelentwo);
var addonAfteronelens4=0; console.log(options);
if(addonAfterfour){
addonAfteronelens4=String(addonAfterfour).length;
}
return ( return (
<React.Fragment> <React.Fragment>
@ -707,16 +688,20 @@ class Goldsubject extends Component {
.ant-select-dropdown{ .ant-select-dropdown{
// top: 221px !important; // top: 221px !important;
// left: 115px !important; // left: 115px !important;
width: 280px !important;
height: 160px; height: 160px;
} }
.ant-select-dropdown-menu{ .ant-select-dropdown-menu{
width: 280px !important;
height: 160px; height: 160px;
} }
.construction .ant-input{ .construction .ant-input{
width: 280px !important;
margin-left: 0px !important; margin-left: 0px !important;
} }
.construction { .construction {
margin-left: 11px; width: 280px;
margin-left: 10px;
} }
.construction .ant-select-selection__placeholder, .ant-select-search__field__placeholder { .construction .ant-select-selection__placeholder, .ant-select-search__field__placeholder {
@ -726,7 +711,38 @@ class Goldsubject extends Component {
`} `}
</style> </style>
{/*<div className="stud-class-set bor-bottom-greyE padding10200 ">*/}
{/* <div className={"TabsWarpcourse"}>*/}
{/* <Form.Item label="课程名称">*/}
{/* {getFieldDecorator('course', {*/}
{/* rules: [{required: true, message: "不能为空"}],*/}
{/* })(*/}
{/* <AutoComplete style={{ width: 280 }}*/}
{/* onSearch={this.handleSearch}*/}
{/* onChange={this.handleChange}*/}
{/* className={"fl construction "}*/}
{/* placeholder="例如:数据结构"*/}
{/* >*/}
{/* {options}*/}
{/* </AutoComplete>*/}
{/* )}*/}
{/* <span className={"newcoursestitle fl"}>*/}
{/* /!*错误示例数据结构2017本部数据结构2017秋季数据结构2017电子商务1班*!/*/}
{/* <p className="ant-progress-text">*/}
{/* <Icon style={{ color: '#52c41a' }} type="check-circle" theme="filled"/>*/}
{/* <span className={"color-grey-9 font-12 ml5"}>正确示例:数据结构</span>*/}
{/* </p>*/}
{/* <p className="ant-progress-text">*/}
{/* <Icon style={{ color: 'red' }} theme="filled" type="close-circle"/>*/}
{/* <span className={"color-grey-9 font-12 ml5"}>错误示例数据结构2019春</span>*/}
{/* </p>*/}
{/* </span>*/}
{/* <div id='iscourse'></div>*/}
{/* </Form.Item>*/}
{/* </div>*/}
{/*</div>*/}
<style> <style>
{ {
@ -737,57 +753,37 @@ class Goldsubject extends Component {
` `
} }
</style> </style>
<div className="stud-class-set bor-bottom-greyE padding1020 "> <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{ {getFieldDecorator('classroom', {
width: 720px !important; rules: [{required: true, message: "不能为空"}],
} })(
.yslzxueshiskmc .ant-input-group-addon{ <AutoComplete style={{ width: 280 }}
width: 65px !important; onSearch={this.handleSearch}
background-color: #fafafa!important; onChange={this.handleChange}
} className={"fl construction "}
.yslzxueshiskmc .ant-input-group-wrapper{ placeholder="例如:数据结构"
width: 720px !important; >
} {options}
.yslzxueshiskmcs .ant-input-group-wrapper{ </AutoComplete>
width: 720px !important; )}
} {/*<span className={"newcoursestitle fl"}>*/}
` {/* /!*(如果本学期包含多个班级,只需创建一个课堂然后在课堂内部建立不同的分班)*!/*/}
}</style> {/* <p className="ant-progress-text">*/}
<style> {/* <Icon style={{ color: '#52c41a' }} type="check-circle" theme="filled"/>*/}
{bordebool===false? {/* <span className={"color-grey-9 font-12 ml5"}>正确示例数据结构2019春季班级</span>*/}
` {/* </p>*/}
.ant-input:hover { {/* <p className="ant-progress-text">*/}
// border: 1px solid #d9d9d9; {/* <Icon style={{ color: 'red' }} theme="filled" type="close-circle"/>*/}
} {/* <span className={"color-grey-9 font-12 ml5"}>错误示例2019春季班级数据结构</span>*/}
`: {/* </p>*/}
` {/* </span>*/}
.ant-input:hover {
// border: 1px solid #f5222d;
}
`
}
</style>
<Form.Item label="课堂名称" className="yslzxueshiskmcs">
{getFieldDecorator('classroom', {
rules: [{required: true, message: "不能为空"},
{
max:60,
message: '不能超过60个字符',
}],
})(<Input className="yslzxueshiskmc fl" placeholder="例如数据结构2016秋季班级" onChange={this.handleChange} addonAfter={String(addonAfteronelens4)+"/60"} />)}
<div id='isclassroom'></div> <div id='isclassroom'></div>
</Form.Item> </Form.Item>
</div> </div>
<div className="stud-class-set bor-bottom-greyE padding1020 coursenavbox coursenavboxtow yslinputcourput"> <div className="stud-class-set bor-bottom-greyE padding1020 coursenavbox coursenavboxtow yslinputcourput">

Loading…
Cancel
Save