PCqiandao
杨树明 5 years ago
parent 0ff3702bee
commit 8f2dec86d0

@ -91,7 +91,7 @@ class Signinstatistics extends Component {
}
};
console.log(course_groups)
return(
<React.Fragment >

@ -23,37 +23,33 @@
margin-left: 20px;
}
.lishiqiandao{
width: 100%;
height: 150px;
background-image: url(https://test-newweb.educoder.net/images/qiandao/lishi.png);
background-color: #000a4f;
background-image: url(./lishi.png);
background-size: cover;
background-position: center;
background-repeat: no-repeat;
}
.daokeqiandao{
width: 100%;
height: 150px;
background-image: url(https://test-newweb.educoder.net/images/qiandao/daoke.png);
height: 150px;
background-image: url(./daoke.png);
background-size: cover;
background-position: center;
background-repeat: no-repeat;
}
.kuangkeqiandao{
width: 100%;
height: 150px;
background-image: url(https://test-newweb.educoder.net/images/qiandao/kuangke.png);
height: 150px;
background-image: url(./kuangke.png);
background-size: cover;
background-position: center;
background-repeat: no-repeat;
}
.qingjiaqiandao{
width: 100%;
height: 150px;
background-image: url(https://test-newweb.educoder.net/images/qiandao/qingjia.png);
height: 150px;
background-image: url(./qingjia.png);
background-size: cover;
background-position: center;
background-repeat: no-repeat;
@ -107,4 +103,22 @@
text-align: right;
margin-right: 20px;
line-height: 32px;
}
#form_in_modal_group_ids .ant-select-selection{
background: #fafafa !important;
}
#form_in_modal_attendance_date .ant-calendar-picker-input {
height:40px;
}
#form_in_modal_start_time{
height:40px;
background: #fafafa !important;
}
#form_in_modal_end_time{
height:40px;
background: #fafafa !important;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

@ -1,5 +1,8 @@
import "../css/Signinstatistics.css"
import React from 'react'
import { Modal , Form, Input, Radio,DatePicker, TimePicker,Select,Button} from 'antd';
import moment from 'moment';
import axios from 'axios';
const CollectionCreateForm = Form.create({ name: 'form_in_modal' })(
@ -7,11 +10,34 @@ const CollectionCreateForm = Form.create({ name: 'form_in_modal' })(
constructor(props){
super(props);
this.state = {
course_groups:[]
}
}
componentDidMount() {
const coursesId=this.props.match.params.coursesId;
let newurl=`/courses/${coursesId}/all_course_groups.json`;
axios.get(newurl).then((response) => {
this.setState({
course_groups:response.data.course_groups
})
})
}
hideCreatesign=(e)=>{
e.preventDefault();
this.props.form.validateFields((err, values) => {
if (!err) {
console.log('Received values of form: ', values);
}
});
}
render() {
const { visible, form ,setRadio,Radiolist} = this.props;
const { visible, form ,setRadio,Radiolist,hideCreatesign} = this.props;
let {course_groups}=this.state;
const { getFieldDecorator } = form;
const { Option } = Select;
const formItemLayout = {
@ -46,25 +72,29 @@ const CollectionCreateForm = Form.create({ name: 'form_in_modal' })(
<Form.Item label="签到名称:">
{getFieldDecorator('name', {
rules: [{ required: true, message: 'Please input the title of collection!' }],
})(<Input />)}
rules: [{ required: true, message: '请输入签到名称' },{whitespace:true,message: '请勿输入空格'}],
})(<Input placeholder="请输入签到名称" style={{height:"40px"}} />)}
</Form.Item>
<Form.Item label="签到班级:">
{getFieldDecorator('group_ids')(
<Select mode="multiple" placeholder="Please select favourite colors">
<Option value="red">Red</Option>
<Option value="green">Green</Option>
<Option value="blue">Blue</Option>
<Select mode="multiple" placeholder={course_groups.length>0?"不选择分班时默认选择全部学生":'暂无分班,将默认选择课堂全部学生'} getPopupContainer={trigger => trigger.parentNode}>
{course_groups.map((item,key)=>{
return(
<Option value={item.id}>{item.name}</Option>
)
})}
</Select>,
)}
</Form.Item>
<Form.Item label="签到方式:" >
{getFieldDecorator('mode', {
rules: [{ required: true, message: 'Please input the title of collection!' }],
rules: [{ required: true, message: '请选择签到方式' }],
})(
<Radio.Group onChange={setRadio}>
<Radio.Group onChange={setRadio} getPopupContainer={trigger => trigger.parentNode}>
<Radio value="QUICK">快捷签到</Radio>
<Radio value="NUMBER">签到码签到</Radio>
<Radio value="QRCODE">二维码签到</Radio>
@ -90,32 +120,32 @@ const CollectionCreateForm = Form.create({ name: 'form_in_modal' })(
<Form.Item label="签到日期:">
{getFieldDecorator('attendance_date', {
rules: [{ type: 'object', required: true, message: 'Please select time!' }],
})(<DatePicker style={{width:"413px"}} />)}
rules: [{ type: 'object', required: true, message: '请选择签到日期',}],
})(<DatePicker style={{width:"413px"}} getPopupContainer={trigger => trigger.parentNode}/>)}
</Form.Item>
<Form.Item label="开始时间:">
{getFieldDecorator('start_time', {
rules: [{ type: 'object', required: true, message: 'Please select time!' }],
})(<TimePicker style={{width:"413px"}} format={format} />)}
rules: [{ type: 'object', required: true, message: '请选择开始时间' }],
})(<TimePicker style={{width:"413px"}} format={format} getPopupContainer={trigger => trigger.parentNode}/>)}
</Form.Item>
<Form.Item label="结束时间:">
{getFieldDecorator('end_time', {
rules: [{ type: 'object', required: true, message: 'Please select time!' }],
})(<TimePicker style={{width:"413px"}} format={format} />)}
rules: [{ type: 'object', required: true, message: '请选择结束时间' }],
})(<TimePicker style={{width:"413px"}} format={format} getPopupContainer={trigger => trigger.parentNode}/>)}
</Form.Item>
<div className={"mt20 marginauto clearfix edu-txt-center"}>
<a>
<Button type="primary" ghost style={leftbuton}>
<Button type="primary" ghost style={leftbuton} onClick={hideCreatesign}>
取消
</Button>
</a>
<a>
<Button type="primary" className={"ml20"} style={rightbuton}>
<Button type="primary" className={"ml20"} style={rightbuton} onClick={(e)=>this.hideCreatesign(e)}>
确定
</Button>
</a>
@ -145,6 +175,7 @@ class Createsignmodel extends React.Component {
<React.Fragment>
<CollectionCreateForm
{...this.state}
{...this.props}
visible={this.props.visible}
setRadio={(e)=>this.setRadio(e)}
/>

@ -104,15 +104,9 @@ class Students_signin extends Component{
}
Studentsbottom=()=>{
hideCreatesign=()=>{
this.setState({
Studentssigntype:true
})
}
Qrcodesignintypefun=()=>{
this.setState({
Qrcodesignintype:true
visible:false
})
}
@ -191,6 +185,7 @@ class Students_signin extends Component{
<Createsignmodel
{...this.state}
{...this.props}
hideCreatesign={()=>this.hideCreatesign()}
/>
{/*签到*/}
<Studentssignmodels

@ -970,12 +970,12 @@
.mr15{
margin-right: 15px;
}
.ant-modal-mask{
z-index: 6000 !important;
}
.ant-modal-wrap{
z-index: 6000 !important;
}
/*.ant-modal-mask{*/
/* z-index: 6000 !important;*/
/*}*/
/*.ant-modal-wrap{*/
/* z-index: 6000 !important;*/
/*}*/
.fangdatwo{
background: #fefefe;
background-color: #fefefe;

Loading…
Cancel
Save