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{ .newcoursestitle{
font-size: 12px; font-size: 12px;
color: #989898; color: #989898;
margin-left: 10px; margin-left: 40px;
} }
.coursenavbox .ant-form-item-label{ .coursenavbox .ant-form-item-label{

@ -47,6 +47,7 @@ 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:"分班"}],
@ -364,14 +365,16 @@ class CoursesNew extends Component {
search:value search:value
}).then((result)=>{ }).then((result)=>{
// console.log(result.data) // console.log(result.data)
if (result.data.message===undefined) { if(result){
if (result.data.message===undefined) {
this.setState({ this.setState({
searchlist: result.data.course_lists, searchlist: result.data.course_lists,
// course:value, // course:value,
}) })
} }
}
// this.props.form.setFieldsValue({ // this.props.form.setFieldsValue({
// course:value // course:value
// }) // })
@ -393,11 +396,16 @@ 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)=>{
@ -489,6 +497,16 @@ 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');
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>
@ -550,20 +568,16 @@ 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 {
width: 280px; margin-left: 11px;
margin-left: 10px;
} }
.construction .ant-select-selection__placeholder, .ant-select-search__field__placeholder { .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="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 style={{ width: 280 }} <AutoComplete
style={{ width: 720}}
onSearch={this.handleSearch} onSearch={this.handleSearch}
onChange={this.handleChange} onChange={this.handleChange}
className={"fl construction "} className={"fl construction yslzxueshis "}
placeholder="例如:数据结构" placeholder="例如:数据结构"
dataSource={options}
> >
{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"/>
@ -616,11 +660,38 @@ 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">
@ -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>
<Form.Item <Form.Item

@ -529,10 +529,15 @@ class Goldsubject extends Component {
handleChange=(value)=>{ handleChange=(value)=>{
this.props.form.setFieldsValue({ if(value){
// course:value, setTimeout(()=>{
classroom:value this.props.form.setFieldsValue({
}) course:value+"",
classroom:value+"",
});
},100)
}
}; };
handleSearchschool=(value)=>{ handleSearchschool=(value)=>{
@ -624,6 +629,12 @@ class Goldsubject extends Component {
if(addonAftertwo){ if(addonAftertwo){
addonAfteronelens=String(addonAftertwo).length; 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(addonAfteronelenone);
console.log(addonAfteronelentwo); console.log(addonAfteronelentwo);
console.log(options); console.log(options);
@ -688,20 +699,16 @@ 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 {
width: 280px; margin-left: 11px;
margin-left: 10px;
} }
.construction .ant-select-selection__placeholder, .ant-select-search__field__placeholder { .construction .ant-select-selection__placeholder, .ant-select-search__field__placeholder {
@ -711,38 +718,7 @@ 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>
{ {
@ -753,37 +729,88 @@ class Goldsubject extends Component {
` `
} }
</style> </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 "> <div className="stud-class-set bor-bottom-greyE padding1020 ">
<Form.Item label="课堂名称"> {/* <Form.Item label="课堂名称">*/}
{getFieldDecorator('classroom', {
rules: [{required: true, message: "不能为空"}], {/* {getFieldDecorator('classroom', {*/}
})( {/* rules: [{required: true, message: "不能为空"},*/}
{/* {*/}
<AutoComplete style={{ width: 280 }} {/* max:60,*/}
onSearch={this.handleSearch} {/* message: '不能超过60个字符',*/}
onChange={this.handleChange} {/* }],*/}
className={"fl construction "} {/* })(*/}
placeholder="例如:数据结构" {/* <AutoComplete*/}
dataSource={options} {/* style={{ width: 720}}*/}
> {/* onSearch={this.handleSearch}*/}
</AutoComplete> {/* onChange={this.handleChange}*/}
)} {/* className={"fl construction yslzxueshis "}*/}
{/*<span className={"newcoursestitle fl"}>*/} {/* 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">*/} {/* <p className="ant-progress-text">*/}
{/* <Icon style={{ color: '#52c41a' }} type="check-circle" theme="filled"/>*/} {/* <Icon style={{ color: '#52c41a' }} type="check-circle" theme="filled"/>*/}
{/* <span className={"color-grey-9 font-12 ml5"}>正确示例数据结构2019春季班级</span>*/} {/* <span className={"color-grey-9 font-12 ml5"}>正确示例:数据结构</span>*/}
{/* </p>*/} {/* </p>*/}
{/* <p className="ant-progress-text">*/} {/* <p className="ant-progress-text">*/}
{/* <Icon style={{ color: 'red' }} theme="filled" type="close-circle"/>*/} {/* <Icon style={{ color: 'red' }} theme="filled" type="close-circle"/>*/}
{/* <span className={"color-grey-9 font-12 ml5"}>错误示例2019春季班级数据结构</span>*/} {/* <span className={"color-grey-9 font-12 ml5"}>错误示例:数据结构2019春</span>*/}
{/* </p>*/} {/* </p>*/}
{/* </span>*/} {/* </span>*/}
<div id='isclassroom'></div> <div id='iscourse'></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