Commit d8fc342d authored by wangxuelai's avatar wangxuelai

'最新代码提交'

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