Commit 57dbae1d authored by baixian's avatar baixian

上课记录修改

parent be8d4def
......@@ -18,5 +18,5 @@
</head>
<body>
<div id="root"></div>
<script type="text/javascript" src="https://cdn.img.shangjiadao.cn/qingxiao/biz/dist/main.21da11.js"></script></body>
<script type="text/javascript" src="https://cdn.img.shangjiadao.cn/qingxiao/biz/dist/main.3004e0.js"></script></body>
</html>
\ No newline at end of file
......@@ -22,7 +22,7 @@ export default {
recordParams: {
teacher_id: '',
start_time: '',
end_time: '',
start_time_end: '',
class_id: '',
status: '',
course_id: '',
......@@ -88,7 +88,7 @@ export default {
let newTotal = recordTotal;
const data = yield call(classRecordAjax.getRecordList, {
...newParams,
end_time: params.end_time ? params.end_time : moment().format('YYYY-MM-DD HH:mm:ss'),
start_time_end: newParams.start_time_end ? newParams.start_time_end : moment().format('YYYY-MM-DD HH:mm:ss'),
});
setTimeout(loading);
if (data.code == 200) {
......@@ -298,7 +298,7 @@ export default {
recordParams: {
teacher_id: '',
start_time: '',
end_time: '',
start_time_end: '',
class_id: '',
status: '',
course_id: '',
......
......@@ -195,6 +195,7 @@ export default {
* goCallStudent({ payload }, { call, put, select }) {
const { recordParams } = yield select(state => state.classrecord);
recordParams.status = 2;
recordParams.start_time_end = moment().format('YYYY-MM-DD HH:mm:ss');
yield put({
type: 'updateState',
payload: {
......
......@@ -132,14 +132,14 @@ class StaticCenter extends React.Component {
searchTimeItemChange = (e, key) => {
const { dispatch } = this.props;
const start_time = (e[0] && moment(e[0]).startOf('day').format('YYYY-MM-DD HH:mm:ss')) || '';
const end_time = (e[1] && moment(e[1]).format('YYYY-MM-DD HH:mm:ss')) || '';
const start_time_end = (e[1] && moment(e[1]).format('YYYY-MM-DD HH:mm:ss')) || '';
dispatch({
type: 'classrecord/selectRecord',
payload: {
params: {
page: 1,
start_time,
end_time,
start_time_end,
},
},
});
......@@ -155,11 +155,11 @@ class StaticCenter extends React.Component {
page: 1,
teacher_id: '',
start_time: '',
end_time: '',
class_id: '',
status: '',
course_id: '',
class_room_id: '',
start_time_end: '',
},
},
});
......@@ -482,13 +482,14 @@ class StaticCenter extends React.Component {
<Col xs={{ span: 12 }} sm={{ span: 12 }} md={{ span: 12 }} lg={{ span: 8 }} xl={{ span: 8 }}>
<FormItem {...formItemLayout} label="上课时间">
{getFieldDecorator('time', {
initialValue: [recordParams.start_time == '' ? null : moment(recordParams.start_time), recordParams.end_time == '' ? null : moment(recordParams.end_time)],
initialValue: [recordParams.start_time == '' ? null : moment(recordParams.start_time), recordParams.start_time_end == '' ? null : moment(recordParams.start_time_end)],
})(
<RangePicker
style={{ width: '100%' }}
format="YYYY-MM-DD"
disabledDate={this.disabledDate}
onChange={e => this.searchTimeItemChange(e, 'time')}
placeholder={['上课开始时间', '上课结束时间']}
/>,
)}
</FormItem>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment