Commit dca9352c authored by baixian's avatar baixian

优化

parent db788868
......@@ -18,6 +18,6 @@
</head>
<body>
<div id="root"></div>
<script src="dist/main.js?1576633244770" charset="utf-8"></script>
<script src="dist/main.js?1576726601110" charset="utf-8"></script>
</body>
</html>
\ No newline at end of file
......@@ -17,7 +17,7 @@ class ChangeCourse extends React.Component {
form, changeScheduleIndex, closeChangeSchedule, sureAdjustCourse,
} = this.props;
if (changeScheduleIndex == 2) {
closeChangeSchedule();
this.closeChangeSchedule();
} else {
e.preventDefault();
form.validateFields((err, values) => {
......@@ -31,6 +31,13 @@ class ChangeCourse extends React.Component {
// Can not select days before today and today
return current && current < moment(new Date(new Date().getTime() - (24 * 3600 * 1000)));
}
closeChangeSchedule = () => {
const { closeChangeSchedule, form, changeScheduleIndex } = this.props;
closeChangeSchedule();
if (changeScheduleIndex === 1) {
form.resetFields();
}
}
render() {
const {
visible,
......@@ -91,7 +98,7 @@ class ChangeCourse extends React.Component {
visible={changeScheduleShow}
title="调整课次"
okText="确定"
onCancel={closeChangeSchedule}
onCancel={this.closeChangeSchedule}
onOk={this.sureAdjustCourse}
className="courseplanmodal"
confirmLoading={scheduleUpdateSubmitting}
......
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