Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_Ysl

# Conflicts:
#	public/react/src/modules/courses/new/CoursesNew.js
#	public/react/src/modules/courses/new/Goldsubject.js
dev_aliyun_beta
杨树林 6 years ago
parent 447ee0b8dc
commit 16307a5938

@ -1061,7 +1061,7 @@ samp {
.newcoursestitle{
font-size: 12px;
color: #989898;
margin-left: 10px;
margin-left: 40px;
}
.coursenavbox .ant-form-item-label{

@ -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,14 +365,16 @@ class CoursesNew extends Component {
search:value
}).then((result)=>{
// console.log(result.data)
if (result.data.message===undefined) {
if(result){
if (result.data.message===undefined) {
this.setState({
searchlist: result.data.course_lists,
// course:value,
this.setState({
searchlist: result.data.course_lists,
// course:value,
})
}
})
}
}
// 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+"",
});
this.setState({
classroomyslstiring:value
})
}
this.props.form.setFieldsValue({
// course:value,
classroom: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}
</AutoComplete>
<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

@ -529,10 +529,15 @@ class Goldsubject extends Component {
handleChange=(value)=>{
this.props.form.setFieldsValue({
// course:value,
classroom:value
})
if(value){
setTimeout(()=>{
this.props.form.setFieldsValue({
course:value+"",
classroom:value+"",
});
},100)
}
};
handleSearchschool=(value)=>{
@ -624,6 +629,12 @@ 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);
@ -688,20 +699,16 @@ 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 {
width: 280px;
margin-left: 10px;
margin-left: 11px;
}
.construction .ant-select-selection__placeholder, .ant-select-search__field__placeholder {
@ -711,38 +718,7 @@ class Goldsubject extends Component {
`}
</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>
{
@ -753,37 +729,88 @@ class Goldsubject extends Component {
`
}
</style>
<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>
<div className="stud-class-set bor-bottom-greyE padding1020 ">
<Form.Item label="课堂名称">
{getFieldDecorator('classroom', {
rules: [{required: true, message: "不能为空"}],
})(
<AutoComplete style={{ width: 280 }}
onSearch={this.handleSearch}
onChange={this.handleChange}
className={"fl construction "}
placeholder="例如:数据结构"
dataSource={options}
>
</AutoComplete>
)}
{/*<span className={"newcoursestitle fl"}>*/}
{/* /!*(如果本学期包含多个班级,只需创建一个课堂然后在课堂内部建立不同的分班)*!/*/}
{/* <Form.Item label="课堂名称">*/}
{/* {getFieldDecorator('classroom', {*/}
{/* rules: [{required: true, message: "不能为空"},*/}
{/* {*/}
{/* max:60,*/}
{/* message: '不能超过60个字符',*/}
{/* }],*/}
{/* })(*/}
{/* <AutoComplete*/}
{/* style={{ width: 720}}*/}
{/* onSearch={this.handleSearch}*/}
{/* onChange={this.handleChange}*/}
{/* className={"fl construction yslzxueshis "}*/}
{/* placeholder="例如:数据结构"*/}
{/* dataSource={options}*/}
{/* >*/}
{/* <Input className="yslzxueshisy" addonAfter={String(addonAfteronelens4)+"/60"} />*/}
{/* </AutoComplete>*/}
{/* )}*/}
{/*</Form.Item>*/}
<Form.Item label="课程名称">
{getFieldDecorator('classroom', {
rules: [{required: true, message: "不能为空"},
{
max:60,
message: '不能超过60个字符',
}],
})(
<AutoComplete
style={{ width: 720}}
onSearch={this.handleSearch}
onChange={this.handleChange}
className={"fl construction yslzxueshis "}
placeholder="例如:数据结构"
dataSource={options}
>
<Input className="yslzxueshisy" addonAfter={String(addonAfteronelens4)+"/60"} />
</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"}>正确示例数据结构2019春季班级</span>*/}
{/* <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>*/}
{/* <Icon style={{ color: 'red' }} theme="filled" type="close-circle"/>*/}
{/* <span className={"color-grey-9 font-12 ml5"}>错误示例:数据结构2019春</span>*/}
{/* </p>*/}
{/* </span>*/}
<div id='isclassroom'></div>
<div id='iscourse'></div>
</Form.Item>
</div>
<div className="stud-class-set bor-bottom-greyE padding1020 coursenavbox coursenavboxtow yslinputcourput">

Loading…
Cancel
Save