Commit d8fc342d authored by wangxuelai's avatar wangxuelai

'最新代码提交'

parent 75b41ed2
......@@ -383,7 +383,7 @@ class classRoomMgt extends React.Component {
<Row gutter={4}>
<Col span={13}>
{getFieldDecorator('teacher_id', {
initialValue: rulePlanDetail.teacher_id.length > 0 ? rulePlanDetail.teacher_id : schoolUserInfo.id,
initialValue: rulePlanDetail.teacher_id,
rules: [{ required: true, message: '请选择上课老师' }],
})(
<Select style={{ width: '100%' }} placeholder="请选择上课老师">
......
......@@ -32,7 +32,7 @@ export default {
end_date: '',
is_repeat: 1,
week_day: '',
teacher_id: [],
teacher_id: '',
id: 0,
},
datePlanDetail: {
......
......@@ -865,7 +865,7 @@ class ClassDetailForm extends React.Component {
}
goPlanCourse = () => {
const {
dispatch, classDetail, classId, guideShow,
dispatch, classDetail, classId, guideShow, rulePlanDetail, schoolUserInfo,
} = this.props;
if (guideShow) {
return;
......@@ -880,6 +880,10 @@ class ClassDetailForm extends React.Component {
classId,
PlanCourseShow: true,
edittype: 'add',
rulePlanDetail: {
...rulePlanDetail,
teacher_id: schoolUserInfo && schoolUserInfo.id ? schoolUserInfo.id : '',
},
classDetail,
widthClassSelect: false,
teacherList: classDetail.school_teachers,
......@@ -1918,6 +1922,12 @@ function mapStateToProps(state) {
const {
guideShow,
} = state.userguide;
const {
schoolUserInfo,
} = state.webapp;
const {
rulePlanDetail,
} = state.plancourse;
return {
classDetail,
editClassModalShow,
......@@ -1968,6 +1978,8 @@ function mapStateToProps(state) {
addTimeSubmitting,
courseTimeListShow,
guideShow,
rulePlanDetail,
schoolUserInfo,
};
}
export default connect(mapStateToProps)(ClassDetail);
......
......@@ -127,7 +127,9 @@ class StaticCenter extends React.Component {
return current > moment();
}
goPlanCourse = () => {
const { dispatch, classId } = this.props;
const {
dispatch, classId, rulePlanDetail, schoolUserInfo,
} = this.props;
dispatch({
type: 'plancourse/queryClassList',
});
......@@ -138,6 +140,10 @@ class StaticCenter extends React.Component {
PlanCourseShow: true,
edittype: 'add',
widthClassSelect: true,
rulePlanDetail: {
...rulePlanDetail,
teacher_id: schoolUserInfo && schoolUserInfo.id ? schoolUserInfo.id : '',
},
},
});
}
......@@ -1277,6 +1283,9 @@ function mapStateToProps(state) {
editClassModalShow,
classSubmitting,
} = state.classmgt;
const {
rulePlanDetail,
} = state.plancourse;
return {
staticcenter,
clockCharts,
......
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