dev_aliyun_beta
杨树林 6 years ago
parent afb3883da0
commit 7d615a20b3

@ -54,6 +54,7 @@ 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:"普通作业"}
@ -528,17 +529,26 @@ class Goldsubject extends Component {
}; };
handleChange=(value)=>{ handleChange=(value)=>{
if(value){ if(value){
setTimeout(()=>{ if(value.length>60){
this.props.form.setFieldsValue({ this.setState({
course:value+"", bordebool:true,
classroom:value+"", })
}); }else if(value.length===0){
},100) this.setState({
bordebool:true,
})
}else{
this.setState({
bordebool:false,
})
}
}else{
this.setState({
bordebool:true
})
} } };
};
handleSearchschool=(value)=>{ handleSearchschool=(value)=>{
@ -607,7 +617,7 @@ class Goldsubject extends Component {
this.applyForAddOrgForm.setVisible(true) this.applyForAddOrgForm.setVisible(true)
} }
render() { render() {
let {datatime,datatimetwo,school,searchlistscholl,Whethertocreateanewclassroom,addonAfteronelenone,addonAfteronelentwo} = this.state; let {datatime,datatimetwo,school,searchlistscholl,Whethertocreateanewclassroom,bordebool,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
@ -753,6 +763,20 @@ class Goldsubject extends Component {
} }
` `
}</style> }</style>
<style>
{bordebool===false?
`
.ant-input:hover {
// border: 1px solid #d9d9d9;
}
`:
`
.ant-input:hover {
// border: 1px solid #f5222d;
}
`
}
</style>
<Form.Item label="课堂名称" className="yslzxueshiskmcs"> <Form.Item label="课堂名称" className="yslzxueshiskmcs">
{getFieldDecorator('classroom', { {getFieldDecorator('classroom', {
rules: [{required: true, message: "不能为空"}, rules: [{required: true, message: "不能为空"},
@ -760,7 +784,7 @@ class Goldsubject extends Component {
max:60, max:60,
message: '不能超过60个字符', message: '不能超过60个字符',
}], }],
})(<Input className="yslzxueshiskmc fl" placeholder="例如数据结构2016秋季班级" addonAfter={String(addonAfteronelens4)+"/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>

Loading…
Cancel
Save