schedule_job
杨树明 5 years ago
parent f57fbe7b24
commit 0e7f8f13aa

@ -36,7 +36,8 @@ const CollectionCreateForm = Form.create({ name: 'form_in_modal' })(
start_time:"",
end_time:"",
attendance_date:"",
newmode:null
newmode:null,
groupstype:false
}
}
@ -72,7 +73,7 @@ const CollectionCreateForm = Form.create({ name: 'form_in_modal' })(
})
})
console.log(newlist)
// console.log(newlist)
// this.setState({
//
// })
@ -82,7 +83,8 @@ const CollectionCreateForm = Form.create({ name: 'form_in_modal' })(
start_time:new Date(this.props.attendancesdata.start_time),
end_time:new Date(this.props.attendancesdata.end_time),
newmode:this.props.attendancesdata.mode,
course_groups:newcourse_groups
course_groups:newcourse_groups,
groupstype:newlist.length===0?true:false
})
@ -96,7 +98,8 @@ const CollectionCreateForm = Form.create({ name: 'form_in_modal' })(
}else{
this.setState({
start_time: new Date("2000-01-01T09:00:00.000+08:00"),
course_groups:newcourse_groups
course_groups:newcourse_groups,
groupstype:false
})
this.props.form.setFieldsValue({
@ -238,7 +241,7 @@ const CollectionCreateForm = Form.create({ name: 'form_in_modal' })(
}
render() {
const { visible,form ,setRadio,Radiolist,hideCreatesign,editvisible} = this.props;
let {course_groups,newmode}=this.state;
let {course_groups,newmode,groupstype}=this.state;
const { getFieldDecorator } = form;
const { Option } = Select;
const formItemLayout = {
@ -280,8 +283,8 @@ const CollectionCreateForm = Form.create({ name: 'form_in_modal' })(
<Form.Item label="签到班级:">
{getFieldDecorator('group_ids')(
<Select mode="multiple" placeholder={course_groups.length>0?"不选择分班时默认选择全部学生":'暂无分班,将默认选择课堂全部学生'} getPopupContainer={trigger => trigger.parentNode}
// disabled={this.props&&this.props.type==="edit"?true:false}
<Select mode="multiple" placeholder={this.props&&this.props.type==="edit"&&this.state.groupstype===true?"已选择全部分班":course_groups.length>0?"不选择分班时默认选择全部学生":'暂无分班,将默认选择课堂全部学生'} getPopupContainer={trigger => trigger.parentNode}
disabled={this.props&&this.props.type==="edit"&&this.state.groupstype===true?true:false}
>
{course_groups.map((item,key)=>{

Loading…
Cancel
Save