Commit 287079fe authored by wangxuelai's avatar wangxuelai

''

parent 9a8d97c1
<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><title>轻校</title><link rel="shortcut icon" href="https://cdn.img.shangjiadao.cn/qingxiao/biz/image/qxlogo4.png"><meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0;" name="viewport"><meta http-equiv="X-UA-Compatible" content="IE=edge"><!-- Polyfills --><!--[if lt IE 10]> <!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><title>轻校</title><link rel="shortcut icon" href="https://cdn.img.shangjiadao.cn/qingxiao/biz/image/qxlogo4.png"><meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0;" name="viewport"><meta http-equiv="X-UA-Compatible" content="IE=edge"><!-- Polyfills --><!--[if lt IE 10]>
<script src="js/console-polyfill.js"></script> <script src="js/console-polyfill.js"></script>
<![endif]--><script charset="utf-8" src="https://map.qq.com/api/js?v=2.exp&key=XSZBZ-5LHCV-5I2P7-UQHPW-6456F-JBB3B"></script><link href="/dist/index.css?1565771827295" rel="stylesheet"><script src="/lib/vendor.dll.js?3" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/console-polyfill.js?3" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es6-shim.min.js?3" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es5-shim.js?3" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es5-sham.min.js?3" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/json3.min.js?3" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/html5shiv.min.js?3" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/polyfill.js?3" charset="utf-8"></script></head><body><div id="root"></div><script src="/dist/index.js?1565771827295" charset="utf-8"></script></body></html> <![endif]--><script charset="utf-8" src="https://map.qq.com/api/js?v=2.exp&key=XSZBZ-5LHCV-5I2P7-UQHPW-6456F-JBB3B"></script><link href="/dist/index.css?1565831228714" rel="stylesheet"><script src="/lib/vendor.dll.js?3" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/console-polyfill.js?3" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es6-shim.min.js?3" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es5-shim.js?3" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es5-sham.min.js?3" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/json3.min.js?3" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/html5shiv.min.js?3" charset="utf-8"></script><script src="https://cdn.img.shangjiadao.cn/qingxiao/biz/js/polyfill.js?3" charset="utf-8"></script></head><body><div id="root"></div><script src="/dist/index.js?1565831228714" charset="utf-8"></script></body></html>
\ No newline at end of file \ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
...@@ -36,7 +36,8 @@ ...@@ -36,7 +36,8 @@
"qs": "^6.5.1", "qs": "^6.5.1",
"react": "^16.2.0", "react": "^16.2.0",
"react-dom": "^16.2.0", "react-dom": "^16.2.0",
"video-react": "^0.14.1" "video-react": "^0.14.1",
"xlsx": "^0.15.0"
}, },
"devDependencies": { "devDependencies": {
"babel-eslint": "^8.2.2", "babel-eslint": "^8.2.2",
......
...@@ -2,101 +2,87 @@ export default { ...@@ -2,101 +2,87 @@ export default {
menus: [ menus: [
{ {
id: '1', id: '1',
name: '概况', name: '首页',
activeIcon: { style: {
backgroundPosition: '-99px 0', width: '20px',
height: '22px',
}, },
defaultIcon: { activeurl: `${__IMGCDN__}menu/indexactive.png`,
backgroundPosition: '-67px 0', notactiveurl: `${__IMGCDN__}menu/index.png`,
},
activeurl: `${__IMGCDN__}menu/indexstaicactive.png`,
notactiveurl: `${__IMGCDN__}menu/indexstaicnotactive.png`,
path: '/sjd/indexstaic', path: '/sjd/indexstaic',
relativePath: ['/sjd/indexstaic'], relativePath: ['/sjd/indexstaic'],
}, },
{
id: '2',
name: '微官网管理',
activeIcon: {
backgroundPosition: '-99px -28px',
},
defaultIcon: {
backgroundPosition: '-67px -28px',
},
activeurl: `${__IMGCDN__}menu/officialwebactive.png`,
notactiveurl: `${__IMGCDN__}menu/officialwebnotactive.png`,
path: '/sjd/officialweb',
relativePath: ['/sjd/officialweb', '/sjd/officialwebeditor'],
},
{ {
id: '3', id: '3',
name: '班级管理', name: '班级管理',
activeIcon: { style: {
backgroundPosition: '-99px -28px', width: '20px',
height: '20px',
}, },
defaultIcon: { activeurl: `${__IMGCDN__}menu/classactive.png`,
backgroundPosition: '-67px -28px', notactiveurl: `${__IMGCDN__}menu/class.png`,
},
activeurl: `${__IMGCDN__}menu/officialwebactive.png`,
notactiveurl: `${__IMGCDN__}menu/officialwebnotactive.png`,
path: '/sjd/classmgt', path: '/sjd/classmgt',
relativePath: ['/sjd/classmgt', '/sjd/classdetail/:classid'], relativePath: ['/sjd/classmgt', '/sjd/classdetail/:classid'],
}, },
{ {
id: '4', id: '4',
name: '老师管理', name: '老师管理',
activeIcon: { style: {
backgroundPosition: '-99px -28px', width: '20px',
}, height: '20px',
defaultIcon: {
backgroundPosition: '-67px -28px',
}, },
activeurl: `${__IMGCDN__}menu/officialwebactive.png`, activeurl: `${__IMGCDN__}menu/teacheractive.png`,
notactiveurl: `${__IMGCDN__}menu/officialwebnotactive.png`, notactiveurl: `${__IMGCDN__}menu/teacher.png`,
path: '/sjd/teacher', path: '/sjd/teacher',
relativePath: ['/sjd/teacher', '/sjd/teacherinfo/:id'], relativePath: ['/sjd/teacher', '/sjd/teacherinfo/:id'],
}, },
{ {
id: '5', id: '5',
name: '学生管理', name: '学生管理',
activeIcon: { style: {
backgroundPosition: '-99px -28px', width: '20px',
height: '20px',
}, },
defaultIcon: { activeurl: `${__IMGCDN__}menu/studentactive.png`,
backgroundPosition: '-67px -28px', notactiveurl: `${__IMGCDN__}menu/student.png`,
},
activeurl: `${__IMGCDN__}menu/officialwebactive.png`,
notactiveurl: `${__IMGCDN__}menu/officialwebnotactive.png`,
path: '/sjd/student', path: '/sjd/student',
relativePath: ['/sjd/student', '/sjd/studentinfo/:id', '/sjd/studentclass/:id'], relativePath: ['/sjd/student', '/sjd/studentinfo/:id', '/sjd/studentclass/:id'],
}, },
{ {
id: '6', id: '6',
name: '课程管理', name: '课程管理',
activeIcon: { style: {
backgroundPosition: '-99px -28px', width: '20px',
}, height: '20px',
defaultIcon: {
backgroundPosition: '-67px -28px',
}, },
activeurl: `${__IMGCDN__}menu/officialwebactive.png`, activeurl: `${__IMGCDN__}menu/courseactive.png`,
notactiveurl: `${__IMGCDN__}menu/officialwebnotactive.png`, notactiveurl: `${__IMGCDN__}menu/course.png`,
path: '/sjd/course', path: '/sjd/course',
relativePath: ['/sjd/course'], relativePath: ['/sjd/course'],
}, },
{ {
id: '7', id: '7',
name: '机构管理', name: '机构管理',
activeIcon: { style: {
backgroundPosition: '-99px -28px', width: '20px',
height: '20px',
}, },
defaultIcon: { activeurl: `${__IMGCDN__}menu/orgmgtactive.png`,
backgroundPosition: '-67px -28px', notactiveurl: `${__IMGCDN__}menu/orgmgt.png`,
},
activeurl: `${__IMGCDN__}menu/officialwebactive.png`,
notactiveurl: `${__IMGCDN__}menu/officialwebnotactive.png`,
path: '/sjd/institutions', path: '/sjd/institutions',
relativePath: ['/sjd/institutions'], relativePath: ['/sjd/institutions'],
}, },
{
id: '2',
name: '小程序管理',
style: {
width: '20px',
height: '20px',
},
activeurl: `${__IMGCDN__}menu/minappactive.png`,
notactiveurl: `${__IMGCDN__}menu/minapp.png`,
// path: '/sjd/officialweb',
// relativePath: ['/sjd/officialweb', '/sjd/officialwebeditor'],
},
], ],
}; };
...@@ -8,17 +8,17 @@ const { TextArea } = Input; ...@@ -8,17 +8,17 @@ const { TextArea } = Input;
const { Group } = Radio; const { Group } = Radio;
class CallStudents extends React.Component { class CallStudents extends React.Component {
componentDidMount() { // 挂载 componentDidMount() { // 挂载
const { dispatch, classDetail } = this.props; // const { dispatch, classDetail } = this.props;
dispatch({ // dispatch({
type: 'callstudents/updateState', // type: 'callstudents/updateState',
payload: { // payload: {
expend: classDetail.expend, // expend: classDetail.expend,
copyExpend: classDetail.expend, // copyExpend: classDetail.expend,
courseId: classDetail.course_id, // courseId: classDetail.course_id,
classroomId: classDetail.class_room_id, // classroomId: classDetail.class_room_id,
classId: classDetail.id, // classId: classDetail.id,
}, // },
}); // });
} }
componentDidUpdate() { componentDidUpdate() {
} }
...@@ -80,9 +80,16 @@ class CallStudents extends React.Component { ...@@ -80,9 +80,16 @@ class CallStudents extends React.Component {
}); });
} }
studentCallPost = () => { studentCallPost = () => {
const { dispatch } = this.props; const { dispatch, callBack } = this.props;
dispatch({ dispatch({
type: 'callstudents/studentCallPost', type: 'callstudents/studentCallPost',
payload: {
callBack: () => {
if (callBack && (typeof callBack == 'function')) {
callBack();
}
},
},
}); });
} }
closeLinShiStudent = () => { closeLinShiStudent = () => {
...@@ -399,7 +406,7 @@ class CallStudents extends React.Component { ...@@ -399,7 +406,7 @@ class CallStudents extends React.Component {
<div> <div>
<Modal <Modal
visible={callStudentsShow} visible={callStudentsShow}
title="班级点名" title="点名"
okText="确定" okText="确定"
onCancel={this.hideCallStudents} onCancel={this.hideCallStudents}
onOk={this.studentCallPost} onOk={this.studentCallPost}
......
...@@ -31,7 +31,9 @@ class classRoomMgt extends React.Component { ...@@ -31,7 +31,9 @@ class classRoomMgt extends React.Component {
}); });
} }
plansubmit = (e) => { plansubmit = (e) => {
const { form, dispatch, classId } = this.props; const {
form, dispatch, classId, saveSubmit,
} = this.props;
e.preventDefault(); e.preventDefault();
form.validateFields((err, values) => { form.validateFields((err, values) => {
if (!err) { if (!err) {
...@@ -40,6 +42,19 @@ class classRoomMgt extends React.Component { ...@@ -40,6 +42,19 @@ class classRoomMgt extends React.Component {
payload: { payload: {
classId, classId,
values, values,
callBack: () => {
if (saveSubmit && (typeof saveSubmit == 'function')) {
form.resetFields();
dispatch({
type: 'plancourse/updateState',
payload: {
selectWeekDays: [],
selectPlanDays: [],
},
});
saveSubmit();
}
},
}, },
}); });
} }
...@@ -52,6 +67,8 @@ class classRoomMgt extends React.Component { ...@@ -52,6 +67,8 @@ class classRoomMgt extends React.Component {
type: 'plancourse/updateState', type: 'plancourse/updateState',
payload: { payload: {
PlanCourseShow: false, PlanCourseShow: false,
selectWeekDays: [],
selectPlanDays: [],
rulePlanDetail: { rulePlanDetail: {
class_id: 0, class_id: 0,
class_room_id: '', class_room_id: '',
...@@ -78,8 +95,6 @@ class classRoomMgt extends React.Component { ...@@ -78,8 +95,6 @@ class classRoomMgt extends React.Component {
}, },
}); });
} }
console.log(this.props.selectPlanDays.indexOf(day.date));
console.log(this.props.selectPlanDays, day.date);
} }
daychange = (type) => { daychange = (type) => {
const { dispatch } = this.props; const { dispatch } = this.props;
...@@ -119,6 +134,7 @@ class classRoomMgt extends React.Component { ...@@ -119,6 +134,7 @@ class classRoomMgt extends React.Component {
calendarData, calendarData,
selectPlanDays, selectPlanDays,
currentTimestamp, currentTimestamp,
classDetail,
} = this.props; } = this.props;
const { getFieldDecorator } = this.props.form; const { getFieldDecorator } = this.props.form;
return ( return (
...@@ -154,7 +170,7 @@ class classRoomMgt extends React.Component { ...@@ -154,7 +170,7 @@ class classRoomMgt extends React.Component {
rules: [{ required: true, message: '开始时间不能为空' }], rules: [{ required: true, message: '开始时间不能为空' }],
initialValue: rulePlanDetail.start_date ? moment(rulePlanDetail.start_date, 'YYYY-MM-DD') : moment(new Date(), 'YYYY-MM-DD'), initialValue: rulePlanDetail.start_date ? moment(rulePlanDetail.start_date, 'YYYY-MM-DD') : moment(new Date(), 'YYYY-MM-DD'),
})( })(
<DatePicker style={{ width: '100%' }} disabledDate={this.disabledDate} />)} <DatePicker style={{ width: '100%' }} placeholder="请选择开始时间" disabledDate={this.disabledDate} />)}
</Form.Item> </Form.Item>
<Form.Item <Form.Item
label="结束时间:" label="结束时间:"
...@@ -170,7 +186,7 @@ class classRoomMgt extends React.Component { ...@@ -170,7 +186,7 @@ class classRoomMgt extends React.Component {
{getFieldDecorator('end_date', { {getFieldDecorator('end_date', {
rules: [{ required: true, message: '结束时间不能为空' }], rules: [{ required: true, message: '结束时间不能为空' }],
initialValue: rulePlanDetail.end_date ? moment(rulePlanDetail.end_date, 'YYYY-MM-DD') : moment(new Date(), 'YYYY-MM-DD'), initialValue: rulePlanDetail.end_date ? moment(rulePlanDetail.end_date, 'YYYY-MM-DD') : moment(new Date(), 'YYYY-MM-DD'),
})(<DatePicker style={{ width: '100%' }} disabledDate={this.endDisabledDate} />)} })(<DatePicker style={{ width: '100%' }} placeholder="请选择结束时间" disabledDate={this.endDisabledDate} />)}
</Form.Item> </Form.Item>
<Form.Item <Form.Item
label="是否重复:" label="是否重复:"
...@@ -260,7 +276,7 @@ class classRoomMgt extends React.Component { ...@@ -260,7 +276,7 @@ class classRoomMgt extends React.Component {
initialValue: rulePlanDetail.teacher_id, initialValue: rulePlanDetail.teacher_id,
rules: [{ required: true, message: '请选择上课老师' }], rules: [{ required: true, message: '请选择上课老师' }],
})( })(
<Select defaultValue="1" style={{ width: '100%' }}> <Select defaultValue="1" style={{ width: '100%' }} placeholder="请选择上课老师">
<Option value=""></Option> <Option value=""></Option>
{teacherList.map(ele => <Option value={ele.id}>{ele.nickname}</Option>)} {teacherList.map(ele => <Option value={ele.id}>{ele.nickname}</Option>)}
</Select>)} </Select>)}
...@@ -283,7 +299,7 @@ class classRoomMgt extends React.Component { ...@@ -283,7 +299,7 @@ class classRoomMgt extends React.Component {
{getFieldDecorator('class_room_id', { {getFieldDecorator('class_room_id', {
initialValue: rulePlanDetail.class_room_id, initialValue: rulePlanDetail.class_room_id,
})( })(
<Select defaultValue="1"> <Select placeholder="请选择上课教室" >
<Option value=""></Option> <Option value=""></Option>
{classroomList.map(ele => <Option value={ele.id}>{ele.title}</Option>)} {classroomList.map(ele => <Option value={ele.id}>{ele.title}</Option>)}
</Select>)} </Select>)}
...@@ -489,6 +505,8 @@ function mapStateToProps(state) { ...@@ -489,6 +505,8 @@ function mapStateToProps(state) {
calendarData, calendarData,
selectPlanDays, selectPlanDays,
currentTimestamp, currentTimestamp,
teacherList,
classDetail,
} = state.plancourse; } = state.plancourse;
return { return {
tabType, tabType,
...@@ -500,6 +518,8 @@ function mapStateToProps(state) { ...@@ -500,6 +518,8 @@ function mapStateToProps(state) {
calendarData, calendarData,
selectPlanDays, selectPlanDays,
currentTimestamp, currentTimestamp,
teacherList,
classDetail,
}; };
} }
export default connect(mapStateToProps)(classRoomMgtForm); export default connect(mapStateToProps)(classRoomMgtForm);
......
...@@ -35,6 +35,8 @@ class SjdMenu extends React.Component { ...@@ -35,6 +35,8 @@ class SjdMenu extends React.Component {
fontSize: '13px', fontSize: '13px',
height: '40px', height: '40px',
paddingLeft: '35px', paddingLeft: '35px',
display: 'flex',
alignItems: 'center',
}; };
return ( return (
<Layout> <Layout>
...@@ -63,7 +65,7 @@ class SjdMenu extends React.Component { ...@@ -63,7 +65,7 @@ class SjdMenu extends React.Component {
{ {
menus.map(ele => ( menus.map(ele => (
<Menu.Item key={ele.id} style={menuItemStyle}> <Menu.Item key={ele.id} style={menuItemStyle}>
<div className={SjdMenuStyle.menuicon} style={defaultMenu === ele.id ? { backgroundImage: `url(${ele.activeurl})` } : { backgroundImage: `url(${ele.notactiveurl})` }} /> <div className={SjdMenuStyle.menuicon} style={defaultMenu === ele.id ? { width: ele.style.width, height: ele.style.height, backgroundImage: `url(${ele.activeurl})` } : { width: ele.style.width, height: ele.style.height, backgroundImage: `url(${ele.notactiveurl})` }} />
<Icon style={{ width: 0, minWidth: 'initial' }} /> <Icon style={{ width: 0, minWidth: 'initial' }} />
<span>{ele.name}</span> <span>{ele.name}</span>
</Menu.Item> </Menu.Item>
......
...@@ -127,6 +127,7 @@ export default { ...@@ -127,6 +127,7 @@ export default {
}, },
}); });
let newcallStudentTotal = bukeStudentTotal; let newcallStudentTotal = bukeStudentTotal;
console.log(courseId, 'courseId');
const newqueryScheduleStudentListParams = Object.assign(querybukeStudentListParams, { const newqueryScheduleStudentListParams = Object.assign(querybukeStudentListParams, {
school_id: sid, school_id: sid,
exclude_class_id: classId, exclude_class_id: classId,
...@@ -425,6 +426,7 @@ export default { ...@@ -425,6 +426,7 @@ export default {
const { const {
callStudentOperateList, courseId, classroomId, callType, expend, classId, callStudentSchedule, startTime, callStudentSubmitting, callStudentOperateList, courseId, classroomId, callType, expend, classId, callStudentSchedule, startTime, callStudentSubmitting,
} = yield select(state => state.callstudents); } = yield select(state => state.callstudents);
const { callBack } = payload;
if (callStudentSubmitting) { if (callStudentSubmitting) {
return; return;
} }
...@@ -466,12 +468,15 @@ export default { ...@@ -466,12 +468,15 @@ export default {
callStudentsShow: false, callStudentsShow: false,
}, },
}); });
yield put({ // yield put({
type: 'classdetail/queryScheduleList', // type: 'classdetail/queryScheduleList',
payload: { // payload: {
params: {}, // params: {},
}, // },
}); // });
if (callBack && (typeof callBack == 'function')) {
callBack();
}
} else { } else {
message.error(studentCallsDate.msg, 1); message.error(studentCallsDate.msg, 1);
} }
......
...@@ -204,7 +204,7 @@ export default { ...@@ -204,7 +204,7 @@ export default {
school_id: sid, school_id: sid,
course_id: classDetail.course_id, course_id: classDetail.course_id,
exclude_class_id: params.exclude_class_id || classId, exclude_class_id: params.exclude_class_id || classId,
start_time: moment(datetime, 'YYYY-MM-DD'), start_time: datetime.split(' ')[0],
end_time: '', end_time: '',
}); });
const queryScheduleListData = yield call(schedulemgtAjax.scheduleList, newScheduleListQueryParams); const queryScheduleListData = yield call(schedulemgtAjax.scheduleList, newScheduleListQueryParams);
...@@ -487,6 +487,13 @@ export default { ...@@ -487,6 +487,13 @@ export default {
}, },
}, },
}); });
yield put({
type: 'queryToAddStudentList',
payload: {
params: {
},
},
});
} else { } else {
message.error(studentAdjustData.msg, 1); message.error(studentAdjustData.msg, 1);
} }
...@@ -523,13 +530,16 @@ export default { ...@@ -523,13 +530,16 @@ export default {
* queryClassList({ payload }, { call, put, select }) { * queryClassList({ payload }, { call, put, select }) {
const { params, action } = payload; const { params, action } = payload;
const { sid } = yield select(state => state.webapp); const { sid } = yield select(state => state.webapp);
const { classListQueryParams, classListTotal, classDetail } = yield select(state => state.classdetail); const {
classListQueryParams, classListTotal, classDetail, classId,
} = yield select(state => state.classdetail);
let newClassListTotal = classListTotal; let newClassListTotal = classListTotal;
const loading = message.loading('班级数据加载中...', 1); const loading = message.loading('班级数据加载中...', 1);
const newClassListQueryParams = Object.assign(classListQueryParams, params, { const newClassListQueryParams = Object.assign(classListQueryParams, params, {
school_id: sid, school_id: sid,
course_id: classDetail.course_id, course_id: classDetail.course_id,
status: 1, status: 1,
exclude_class_id: classId,
// teacher_id: 77, // teacher_id: 77,
}); });
const classListData = yield call(classMgtAjax.getClassList, newClassListQueryParams); const classListData = yield call(classMgtAjax.getClassList, newClassListQueryParams);
...@@ -735,7 +745,6 @@ export default { ...@@ -735,7 +745,6 @@ export default {
}); });
}, },
* queryinfo({ payload }, { call, put, select }) { * queryinfo({ payload }, { call, put, select }) {
console.log(payload, 'payload');
yield put({ yield put({
type: 'updateState', type: 'updateState',
payload: { payload: {
......
...@@ -50,6 +50,8 @@ export default { ...@@ -50,6 +50,8 @@ export default {
calendarData: {}, calendarData: {},
currentTimestamp: 0, currentTimestamp: 0,
selectPlanDays: [], selectPlanDays: [],
classDetail: {},
teacherList: [],
}, },
subscriptions: { subscriptions: {
setup({ dispatch, history }) { // eslint-disable-line setup({ dispatch, history }) { // eslint-disable-line
...@@ -58,7 +60,13 @@ export default { ...@@ -58,7 +60,13 @@ export default {
effects: { effects: {
* toEditClassPlan({ payload }, { call, put, select }) { * toEditClassPlan({ payload }, { call, put, select }) {
const { plan, classId, edittype } = payload; const {
plan,
classId,
edittype,
classDetail,
teacherList,
} = payload;
const { const {
tabType, tabType,
rulePlanDetail, rulePlanDetail,
...@@ -88,6 +96,8 @@ export default { ...@@ -88,6 +96,8 @@ export default {
rulePlanDetail: { ...rulePlanDetail }, rulePlanDetail: { ...rulePlanDetail },
PlanCourseShow: true, PlanCourseShow: true,
selectWeekDays: [...plan.rule.week_day], selectWeekDays: [...plan.rule.week_day],
classDetail: { ...classDetail },
teacherList: [...teacherList],
}, },
}); });
} else if (plan.rule.type == 2) { // 日历排课 } else if (plan.rule.type == 2) { // 日历排课
...@@ -109,6 +119,8 @@ export default { ...@@ -109,6 +119,8 @@ export default {
datePlanDetail: { ...datePlanDetail }, datePlanDetail: { ...datePlanDetail },
selectPlanDays: [...plan.rule.dates], selectPlanDays: [...plan.rule.dates],
PlanCourseShow: true, PlanCourseShow: true,
classDetail: { ...classDetail },
teacherList: [...teacherList],
}, },
}); });
} }
...@@ -192,7 +204,7 @@ export default { ...@@ -192,7 +204,7 @@ export default {
const { const {
class_room_id, content, end_date, is_repeat, start_date, teacher_id, times, class_room_id2, content2, teacher_id2, times2, class_room_id, content, end_date, is_repeat, start_date, teacher_id, times, class_room_id2, content2, teacher_id2, times2,
} = payload.values; } = payload.values;
const { classId } = payload; const { classId, callBack } = payload;
const { const {
selectWeekDays, tabType, planSubmitting, selectPlanDays, rulePlanDetail, datePlanDetail, selectWeekDays, tabType, planSubmitting, selectPlanDays, rulePlanDetail, datePlanDetail,
} = yield select(state => state.plancourse); } = yield select(state => state.plancourse);
...@@ -295,6 +307,9 @@ export default { ...@@ -295,6 +307,9 @@ export default {
} }
// PlanCourseShow // PlanCourseShow
if (plansAddDate.code == 200) { if (plansAddDate.code == 200) {
if (callBack && (typeof callBack == 'function')) {
callBack();
}
yield put({ yield put({
type: 'updateState', type: 'updateState',
payload: { payload: {
......
...@@ -331,10 +331,17 @@ export default { ...@@ -331,10 +331,17 @@ export default {
yield put({ yield put({
type: 'updateState', type: 'updateState',
payload: { payload: {
selectedCourse: studentCourseAndClassInfo[0],
studentClassObj, studentClassObj,
studentCourseAndClassInfo, studentCourseAndClassInfo,
}, },
}); });
yield put({
type: 'queryClassList',
payload: {
title: '',
},
});
} else { } else {
message.error(studentsReadlist.msg, 1); message.error(studentsReadlist.msg, 1);
} }
...@@ -429,6 +436,11 @@ export default { ...@@ -429,6 +436,11 @@ export default {
editClassModalShow: false, editClassModalShow: false,
}, },
}); });
yield put({
type: 'queryClassList',
payload: {
},
});
} else { } else {
message.error(classAddDate.msg, 1); message.error(classAddDate.msg, 1);
} }
......
...@@ -45,7 +45,7 @@ export default { ...@@ -45,7 +45,7 @@ export default {
start_time: '', start_time: '',
end_time: '', end_time: '',
class_id: '', class_id: '',
status: 1, status: '',
course_id: '', course_id: '',
class_room_id: '', class_room_id: '',
page: 1, page: 1,
...@@ -91,10 +91,12 @@ export default { ...@@ -91,10 +91,12 @@ export default {
effects: { effects: {
* queryCoureList({ payload }, { call, put, select }) { * queryCoureList({ payload }, { call, put, select }) {
const { sid } = yield select(state => state.webapp); const { sid } = yield select(state => state.webapp);
const { teacherId } = yield select(state => state.teachersinfo);
const courselistinfo = yield call(courseAjax.courseList, { const courselistinfo = yield call(courseAjax.courseList, {
school_id: sid, school_id: sid,
page: 1, page: 1,
perPage: 100, perPage: 200,
teacher_id: teacherId,
}); });
if (courselistinfo.code == 200 && courselistinfo.data) { if (courselistinfo.code == 200 && courselistinfo.data) {
yield put({ yield put({
......
...@@ -404,10 +404,12 @@ export default { ...@@ -404,10 +404,12 @@ export default {
let matchedmenu = null; let matchedmenu = null;
for (let i = 0; i < menus.length; i++) { for (let i = 0; i < menus.length; i++) {
const menu = menus[i]; const menu = menus[i];
for (let j = 0; j < menu.relativePath.length; j++) { if (menu.relativePath && menu.relativePath.length > 0) {
if (pathToRegexp(menu.relativePath[j]).exec(pathname)) { for (let j = 0; j < menu.relativePath.length; j++) {
matchedmenu = menu; if (pathToRegexp(menu.relativePath[j]).exec(pathname)) {
newDefaultMenu = menu.id; matchedmenu = menu;
newDefaultMenu = menu.id;
}
} }
} }
} }
......
...@@ -182,7 +182,7 @@ class ChangeCourse extends React.Component { ...@@ -182,7 +182,7 @@ class ChangeCourse extends React.Component {
<Row gutter={4}> <Row gutter={4}>
<Col span={13}> <Col span={13}>
{getFieldDecorator('class_room_id', { {getFieldDecorator('class_room_id', {
initialValue: selectScheduleinfo.class_room_id, initialValue: selectScheduleinfo.class_room_id == 0 ? '' : selectScheduleinfo.class_room_id,
})( })(
<Select defaultValue="1"> <Select defaultValue="1">
<Option value=""></Option> <Option value=""></Option>
......
...@@ -345,7 +345,11 @@ class ClassDetailForm extends React.Component { ...@@ -345,7 +345,11 @@ class ClassDetailForm extends React.Component {
}); });
} }
toAddClassStudent = () => { toAddClassStudent = () => {
const { dispatch } = this.props; const { dispatch, classDetail } = this.props;
if (classDetail.status == 2) {
message.warn('班级已结业,不能添加班级!', 0.5);
return;
}
dispatch({ dispatch({
type: 'classdetail/updateState', type: 'classdetail/updateState',
payload: { payload: {
...@@ -525,7 +529,15 @@ class ClassDetailForm extends React.Component { ...@@ -525,7 +529,15 @@ class ClassDetailForm extends React.Component {
}); });
} }
changeSchedule = (record) => { changeSchedule = (record) => {
const { dispatch } = this.props; const { dispatch, datetime } = this.props;
if (new Date(datetime.replace(/-/g, '/')).getTime() - new Date(record.start_time.replace(/-/g, '/')).getTime() > 0) {
message.error('本课时已经开始,无法调课', 0.5);
return;
}
if (record.call_time) {
message.warn('该课时已点名,不能调课', 0.5);
return;
}
dispatch({ dispatch({
type: 'classdetail/updateState', type: 'classdetail/updateState',
payload: { payload: {
...@@ -625,6 +637,11 @@ class ClassDetailForm extends React.Component { ...@@ -625,6 +637,11 @@ class ClassDetailForm extends React.Component {
type: 'callstudents/updateState', type: 'callstudents/updateState',
payload: { payload: {
callStudentsShow: true, callStudentsShow: true,
expend: schedule.class.expend,
copyExpend: schedule.class.expend,
courseId: schedule.course_id,
classroomId: schedule.class_room_id,
classId: schedule.class_id,
}, },
}); });
dispatch({ dispatch({
...@@ -641,6 +658,11 @@ class ClassDetailForm extends React.Component { ...@@ -641,6 +658,11 @@ class ClassDetailForm extends React.Component {
type: 'callstudents/updateState', type: 'callstudents/updateState',
payload: { payload: {
callStudentsShow: true, callStudentsShow: true,
expend: schedule.class.expend,
copyExpend: schedule.class.expend,
courseId: schedule.course_id,
classroomId: schedule.class_room_id,
classId: schedule.class_id,
}, },
}); });
dispatch({ dispatch({
...@@ -659,6 +681,8 @@ class ClassDetailForm extends React.Component { ...@@ -659,6 +681,8 @@ class ClassDetailForm extends React.Component {
classId: classDetail.id, classId: classDetail.id,
plan, plan,
edittype: 'edit', edittype: 'edit',
classDetail,
teacherList: classDetail.school_teachers,
}, },
}); });
} }
...@@ -673,6 +697,26 @@ class ClassDetailForm extends React.Component { ...@@ -673,6 +697,26 @@ class ClassDetailForm extends React.Component {
payload: { payload: {
PlanCourseShow: true, PlanCourseShow: true,
edittype: 'add', edittype: 'add',
classDetail,
teacherList: classDetail.school_teachers,
},
});
}
plancoursesaveSubmit = () => {
const { dispatch } = this.props;
dispatch({
type: 'classdetail/queryCoursePlansList',
payload: {
params: {},
},
});
}
saveCallStudents = () => {
const { dispatch } = this.props;
dispatch({
type: 'classdetail/queryScheduleList',
payload: {
params: {},
}, },
}); });
} }
...@@ -866,7 +910,7 @@ class ClassDetailForm extends React.Component { ...@@ -866,7 +910,7 @@ class ClassDetailForm extends React.Component {
render: (text, record, index) => { render: (text, record, index) => {
return ( return (
<div> <div>
{record.expend_time}/{record.total} {record.expend}/{record.total}
</div> </div>
); );
}, },
...@@ -1148,10 +1192,10 @@ class ClassDetailForm extends React.Component { ...@@ -1148,10 +1192,10 @@ class ClassDetailForm extends React.Component {
<div className={`${pageStyle.container} classdetailcontainer`}> <div className={`${pageStyle.container} classdetailcontainer`}>
<PlanCourse <PlanCourse
classroomList={classroomList} classroomList={classroomList}
teacherList={teacherList}
classroomMgt={this.classroomMgt} classroomMgt={this.classroomMgt}
addCourseTime={this.addCourseTime} addCourseTime={this.addCourseTime}
classId={classId} classId={classId}
saveSubmit={this.plancoursesaveSubmit}
/> />
<AddCourseTime <AddCourseTime
visible={addCourseTimeShow} visible={addCourseTimeShow}
...@@ -1446,10 +1490,9 @@ class ClassDetailForm extends React.Component { ...@@ -1446,10 +1490,9 @@ class ClassDetailForm extends React.Component {
changeStudentSchedule={this.changeStudentSchedule} changeStudentSchedule={this.changeStudentSchedule}
sureAdjustCourse={this.sureAdjustCourse} sureAdjustCourse={this.sureAdjustCourse}
/> />
{classDetail.id && <CallStudents
<CallStudents callBack={this.saveCallStudents}
classDetail={classDetail} />
/>}
</div> </div>
); );
} }
......
import { connect } from 'dva'; import { connect } from 'dva';
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { Icon, Button, Row, Col, Input, Select, Checkbox, Table, Modal, Form, Alert, InputNumber } from 'antd'; import { message, Row, Col, Input, Select, Modal, Form, InputNumber } from 'antd';
import pageStyle from './EditClassModal.less'; import pageStyle from './EditClassModal.less';
import { pageIn } from '../../utils/index'; import { pageIn } from '../../utils/index';
const { Option } = Select; const { Option } = Select;
...@@ -27,9 +27,15 @@ class EditClassModal extends React.Component { ...@@ -27,9 +27,15 @@ class EditClassModal extends React.Component {
} }
save = () => { save = () => {
const { form, save } = this.props; const {
form, save, isEdit, editClassInfo,
} = this.props;
form.validateFields((err, values) => { form.validateFields((err, values) => {
if (!err) { if (!err) {
if (isEdit == 1 && values.capacity < editClassInfo.class_student_count) {
message.warn(`班级容量不能小于当前班级人数${editClassInfo.class_student_count}人`, 1);
return;
}
save(values, form); save(values, form);
} }
}); });
...@@ -56,11 +62,9 @@ class EditClassModal extends React.Component { ...@@ -56,11 +62,9 @@ class EditClassModal extends React.Component {
teacherList, teacherList,
classroomMgt, classroomMgt,
editClassInfo, editClassInfo,
save,
classSubmitting, classSubmitting,
classroomList, classroomList,
isEdit, isEdit,
form,
} = this.props; } = this.props;
const { classRoomId, title } = this.state; const { classRoomId, title } = this.state;
let classRoom; let classRoom;
......
import { connect } from 'dva'; import { connect } from 'dva';
import React from 'react'; import React from 'react';
import { Icon, Button, Row, Col, Input, Select, Checkbox, Form, InputNumber, Table, Modal, DatePicker } from 'antd'; import { Icon, Button, Row, Col, Input, Select, Checkbox, Form, InputNumber, Table, Modal, DatePicker, message } from 'antd';
import pageStyle from './index.less'; import pageStyle from './index.less';
import { pageIn } from '../../utils/index'; import { pageIn } from '../../utils/index';
import RenewEdit from './RenewEdit'; import RenewEdit from './RenewEdit';
...@@ -35,12 +35,16 @@ class StudentMgt extends React.Component { ...@@ -35,12 +35,16 @@ class StudentMgt extends React.Component {
}, },
}); });
} }
toChoiceClass = (id) => { toChoiceClass = (record) => {
if (record.student_courses.length == 0) {
message.error('该学生没有购买课程,无法排课', 0.5);
return;
}
const { dispatch } = this.props; const { dispatch } = this.props;
dispatch({ dispatch({
type: 'students/toChoiceClass', type: 'students/toChoiceClass',
payload: { payload: {
id, id: record.id,
}, },
}); });
} }
...@@ -314,7 +318,7 @@ class StudentMgt extends React.Component { ...@@ -314,7 +318,7 @@ class StudentMgt extends React.Component {
render: (text, record, index) => { render: (text, record, index) => {
return ( return (
<div className={pageStyle.tableoperatebox}> <div className={pageStyle.tableoperatebox}>
<a className={pageStyle.alink} href="javascript:;" onClick={() => this.toChoiceClass(record.id)}>选班</a> <a className={pageStyle.alink} href="javascript:;" onClick={() => this.toChoiceClass(record)}>选班</a>
<span className={pageStyle.divideline}>|</span> <span className={pageStyle.divideline}>|</span>
<a className={pageStyle.alink} href="javascript:;" onClick={() => this.goRenewCourse(record)}>续课</a> <a className={pageStyle.alink} href="javascript:;" onClick={() => this.goRenewCourse(record)}>续课</a>
{record.student_courses.filter(ele => ele.course_mode != 3).length != 0 && {record.student_courses.filter(ele => ele.course_mode != 3).length != 0 &&
...@@ -352,14 +356,14 @@ class StudentMgt extends React.Component { ...@@ -352,14 +356,14 @@ class StudentMgt extends React.Component {
<Col className={pageStyle.formitem} xs={{ span: 12 }} sm={{ span: 12 }} md={{ span: 12 }} lg={{ span: 6 }}> <Col className={pageStyle.formitem} xs={{ span: 12 }} sm={{ span: 12 }} md={{ span: 12 }} lg={{ span: 6 }}>
<div className={pageStyle.formitemlabel}>报读课程</div> <div className={pageStyle.formitemlabel}>报读课程</div>
<Select className={pageStyle.selectitem} placeholder="请选择所属课程" value={searchstudentListQueryParams.course_id} onChange={e => this.searchParamsChange(e, 'Select', 'course_id')}> <Select className={pageStyle.selectitem} placeholder="请选择所属课程" value={searchstudentListQueryParams.course_id} onChange={e => this.searchParamsChange(e, 'Select', 'course_id')}>
<Option value=""></Option> <Option value="">全部课程</Option>
{courseList.map(ele => <Option value={ele.id}>{ele.title}</Option>)} {courseList.map(ele => <Option value={ele.id}>{ele.title}</Option>)}
</Select> </Select>
</Col> </Col>
<Col className={pageStyle.formitem} xs={{ span: 12 }} sm={{ span: 12 }} md={{ span: 12 }} lg={{ span: 6 }}> <Col className={pageStyle.formitem} xs={{ span: 12 }} sm={{ span: 12 }} md={{ span: 12 }} lg={{ span: 6 }}>
<div className={pageStyle.formitemlabel}>所在班级</div> <div className={pageStyle.formitemlabel}>所在班级</div>
<Select className={pageStyle.selectitem} placeholder="班级列表" value={searchstudentListQueryParams.class_id} onChange={e => this.searchParamsChange(e, 'Select', 'class_id')}> <Select className={pageStyle.selectitem} placeholder="班级列表" value={searchstudentListQueryParams.class_id} onChange={e => this.searchParamsChange(e, 'Select', 'class_id')}>
<Option value=""></Option> <Option value="">全部班级</Option>
{classList.map(ele => <Option value={ele.id}>{ele.title}</Option>)} {classList.map(ele => <Option value={ele.id}>{ele.title}</Option>)}
</Select> </Select>
</Col> </Col>
...@@ -381,7 +385,7 @@ class StudentMgt extends React.Component { ...@@ -381,7 +385,7 @@ class StudentMgt extends React.Component {
<Col className={pageStyle.formitem} xs={{ span: 12 }} sm={{ span: 12 }} md={{ span: 12 }} lg={{ span: 6 }}> <Col className={pageStyle.formitem} xs={{ span: 12 }} sm={{ span: 12 }} md={{ span: 12 }} lg={{ span: 6 }}>
<div className={pageStyle.formitemlabel}>生日月份</div> <div className={pageStyle.formitemlabel}>生日月份</div>
<Select className={pageStyle.selectitem} placeholder="请选择月份" value={searchstudentListQueryParams.birthday_month} onChange={e => this.searchParamsChange(e, 'Select', 'birthday_month')}> <Select className={pageStyle.selectitem} placeholder="请选择月份" value={searchstudentListQueryParams.birthday_month} onChange={e => this.searchParamsChange(e, 'Select', 'birthday_month')}>
<Option value={0}></Option> <Option value={0}>全部</Option>
<Option value={1}>一月</Option> <Option value={1}>一月</Option>
<Option value={2}>二月</Option> <Option value={2}>二月</Option>
<Option value={3}>三月</Option> <Option value={3}>三月</Option>
...@@ -399,7 +403,7 @@ class StudentMgt extends React.Component { ...@@ -399,7 +403,7 @@ class StudentMgt extends React.Component {
<Col className={pageStyle.formitem} xs={{ span: 12 }} sm={{ span: 12 }} md={{ span: 12 }} lg={{ span: 6 }}> <Col className={pageStyle.formitem} xs={{ span: 12 }} sm={{ span: 12 }} md={{ span: 12 }} lg={{ span: 6 }}>
<div className={pageStyle.formitemlabel}>微信绑定</div> <div className={pageStyle.formitemlabel}>微信绑定</div>
<Select className={pageStyle.selectitem} placeholder="请选择结业状态" value={searchstudentListQueryParams.wechat_status} onChange={e => this.searchParamsChange(e, 'Select', 'wechat_status')}> <Select className={pageStyle.selectitem} placeholder="请选择结业状态" value={searchstudentListQueryParams.wechat_status} onChange={e => this.searchParamsChange(e, 'Select', 'wechat_status')}>
<Option value=""></Option> <Option value="">全部</Option>
<Option value={1}>已绑定</Option> <Option value={1}>已绑定</Option>
<Option value={2}>未绑定</Option> <Option value={2}>未绑定</Option>
</Select> </Select>
...@@ -407,7 +411,7 @@ class StudentMgt extends React.Component { ...@@ -407,7 +411,7 @@ class StudentMgt extends React.Component {
<Col className={pageStyle.formitem} xs={{ span: 12 }} sm={{ span: 12 }} md={{ span: 12 }} lg={{ span: 3 }}> <Col className={pageStyle.formitem} xs={{ span: 12 }} sm={{ span: 12 }} md={{ span: 12 }} lg={{ span: 3 }}>
<div className={pageStyle.formitemlabel} >是否选班</div> <div className={pageStyle.formitemlabel} >是否选班</div>
<Select className={pageStyle.selectitem} style={{ width: 74 }} placeholder="是" value={searchstudentListQueryParams.assign_class_status} onChange={e => this.searchParamsChange(e, 'Select', 'assign_class_status')}> <Select className={pageStyle.selectitem} style={{ width: 74 }} placeholder="是" value={searchstudentListQueryParams.assign_class_status} onChange={e => this.searchParamsChange(e, 'Select', 'assign_class_status')}>
<Option value=""></Option> <Option value="">全部</Option>
<Option value={1}></Option> <Option value={1}></Option>
<Option value={2}></Option> <Option value={2}></Option>
</Select> </Select>
......
...@@ -88,6 +88,8 @@ class classChange extends React.Component { ...@@ -88,6 +88,8 @@ class classChange extends React.Component {
type: 'studentclass/updateState', type: 'studentclass/updateState',
payload: { payload: {
editClassModalShow: true, editClassModalShow: true,
selectedClasses: [],
selectedClassesRow: [],
}, },
}); });
} }
......
...@@ -224,14 +224,14 @@ class ClassMgt extends React.Component { ...@@ -224,14 +224,14 @@ class ClassMgt extends React.Component {
<Col className={pageStyle.formitem} xs={{ span: 24 }} sm={{ span: 12 }} md={{ span: 12 }} lg={{ span: 5 }}> <Col className={pageStyle.formitem} xs={{ span: 24 }} sm={{ span: 12 }} md={{ span: 12 }} lg={{ span: 5 }}>
<div className={pageStyle.formitemlabel}>授课课程</div> <div className={pageStyle.formitemlabel}>授课课程</div>
<Select className={pageStyle.selectitem} placeholder="请选择所属课程" value={searchteacherListQueryParams.course_id} onChange={e => this.searchParamsChange(e, 'Select', 'course_id')}> <Select className={pageStyle.selectitem} placeholder="请选择所属课程" value={searchteacherListQueryParams.course_id} onChange={e => this.searchParamsChange(e, 'Select', 'course_id')}>
<Option value=""></Option> <Option value="">全部课程</Option>
{courseList.map(ele => <Option value={ele.id}>{ele.title}</Option>)} {courseList.map(ele => <Option value={ele.id}>{ele.title}</Option>)}
</Select> </Select>
</Col> </Col>
<Col className={pageStyle.formitem} xs={{ span: 24 }} sm={{ span: 12 }} md={{ span: 12 }} lg={{ span: 5 }}> <Col className={pageStyle.formitem} xs={{ span: 24 }} sm={{ span: 12 }} md={{ span: 12 }} lg={{ span: 5 }}>
<div className={pageStyle.formitemlabel}>启用状态</div> <div className={pageStyle.formitemlabel}>启用状态</div>
<Select className={pageStyle.selectitem} placeholder="全部" value={searchteacherListQueryParams.status} onChange={e => this.searchParamsChange(e, 'Select', 'status')}> <Select className={pageStyle.selectitem} placeholder="全部" value={searchteacherListQueryParams.status} onChange={e => this.searchParamsChange(e, 'Select', 'status')}>
<Option value=""></Option> <Option value="">全部状态</Option>
<Option value="1">开启</Option> <Option value="1">开启</Option>
<Option value="2">关闭</Option> <Option value="2">关闭</Option>
</Select> </Select>
......
...@@ -14,7 +14,7 @@ const { TabPane } = Tabs; ...@@ -14,7 +14,7 @@ const { TabPane } = Tabs;
class teachersForm extends React.Component { class teachersForm extends React.Component {
state = { state = {
// visible: false, // visible: false,
classInfo: {}, // classInfo: {},
}; };
componentDidMount() { // 挂载 componentDidMount() { // 挂载
pageIn('教师详情管理'); pageIn('教师详情管理');
...@@ -60,19 +60,24 @@ class teachersForm extends React.Component { ...@@ -60,19 +60,24 @@ class teachersForm extends React.Component {
} }
toCallStudents = (schedule) => { toCallStudents = (schedule) => {
const { dispatch } = this.props; const { dispatch } = this.props;
this.setState({ // this.setState({
classInfo: { // classInfo: {
expend: schedule.class.expend, // expend: schedule.class.expend,
copyExpend: schedule.class.expend, // copyExpend: schedule.class.expend,
courseId: schedule.course_id, // courseId: schedule.course_id,
classroomId: schedule.class_room_id, // classroomId: schedule.class_room_id,
id: schedule.class_id, // id: schedule.class_id,
}, // },
}); // });
dispatch({ dispatch({
type: 'callstudents/updateState', type: 'callstudents/updateState',
payload: { payload: {
callStudentsShow: true, callStudentsShow: true,
expend: schedule.class.expend,
copyExpend: schedule.class.expend,
courseId: schedule.course_id,
classroomId: schedule.class_room_id,
classId: schedule.class_id,
}, },
}); });
dispatch({ dispatch({
...@@ -85,19 +90,15 @@ class teachersForm extends React.Component { ...@@ -85,19 +90,15 @@ class teachersForm extends React.Component {
} }
toEditCallStudents = (schedule) => { toEditCallStudents = (schedule) => {
const { dispatch } = this.props; const { dispatch } = this.props;
this.setState({
classInfo: {
expend: schedule.class.expend,
copyExpend: schedule.class.expend,
courseId: schedule.course_id,
classroomId: schedule.class_room_id,
id: schedule.class_id,
},
});
dispatch({ dispatch({
type: 'callstudents/updateState', type: 'callstudents/updateState',
payload: { payload: {
callStudentsShow: true, callStudentsShow: true,
expend: schedule.class.expend,
copyExpend: schedule.class.expend,
courseId: schedule.course_id,
classroomId: schedule.class_room_id,
classId: schedule.class_id,
}, },
}); });
dispatch({ dispatch({
...@@ -326,6 +327,16 @@ class teachersForm extends React.Component { ...@@ -326,6 +327,16 @@ class teachersForm extends React.Component {
type: 'teachersinfo/searchTeachersSchedule', type: 'teachersinfo/searchTeachersSchedule',
}); });
} }
saveCallStudents = () => {
const { dispatch } = this.props;
dispatch({
type: 'teachersinfo/queryScheduleList',
payload: {
params: {
},
},
});
}
resetTeachersSchedule = () => { resetTeachersSchedule = () => {
const { dispatch } = this.props; const { dispatch } = this.props;
dispatch({ dispatch({
...@@ -400,6 +411,7 @@ class teachersForm extends React.Component { ...@@ -400,6 +411,7 @@ class teachersForm extends React.Component {
studentChangeScheduleListLoading, studentChangeScheduleListLoading,
studentChangeScheduleListTotal, studentChangeScheduleListTotal,
studentChangeScheduleListQueryParams, studentChangeScheduleListQueryParams,
copyTeachersScheduleListQueryParams,
} = this.props; } = this.props;
const classinfo = [ const classinfo = [
{ {
...@@ -472,7 +484,7 @@ class teachersForm extends React.Component { ...@@ -472,7 +484,7 @@ class teachersForm extends React.Component {
render: (text, record, index) => { render: (text, record, index) => {
return ( return (
<div className={pageStyle.tableoperatebox}> <div className={pageStyle.tableoperatebox}>
{record.status == 1 ? '已点名' : '未点名'} {!record.call_time ? '未点名' : '已点名'}
</div> </div>
); );
}, },
...@@ -485,7 +497,7 @@ class teachersForm extends React.Component { ...@@ -485,7 +497,7 @@ class teachersForm extends React.Component {
key: 'key', key: 'key',
render: (text, record, index) => { render: (text, record, index) => {
return ( return (
<div className={pageStyle.tableoperatebox}> <div>
{index + 1} {index + 1}
</div> </div>
); );
...@@ -503,6 +515,18 @@ class teachersForm extends React.Component { ...@@ -503,6 +515,18 @@ class teachersForm extends React.Component {
); );
}, },
}, },
{
title: '班级',
dataIndex: 'class_name',
key: 'class_name',
render: (text, record, index) => {
return (
<div className={pageStyle.tableoperatebox}>
{(record.class && record.class.title) || ''}
</div>
);
},
},
{ {
title: '上课教师', title: '上课教师',
dataIndex: 'school_teacher.nickname', dataIndex: 'school_teacher.nickname',
...@@ -710,16 +734,16 @@ class teachersForm extends React.Component { ...@@ -710,16 +734,16 @@ class teachersForm extends React.Component {
<Col xs={{ span: 24 }} sm={{ span: 12 }} md={{ span: 12 }} lg={{ span: 6 }}> <Col xs={{ span: 24 }} sm={{ span: 12 }} md={{ span: 12 }} lg={{ span: 6 }}>
<div className={pageStyle.formitemlabel}> <div className={pageStyle.formitemlabel}>
授课班级: 授课班级:
<Select style={{ width: '100%', maxWidth: 233 }} placeholder="班级列表" onChange={e => this.searchParamsChange(e, 'classId')}> <Select style={{ width: '100%', maxWidth: 233 }} placeholder="班级列表" value={copyTeachersScheduleListQueryParams.class_id} onChange={e => this.searchParamsChange(e, 'classId')}>
<Option value=""></Option> <Option value="">全部班级</Option>
{teacherClassListForSearch.map(ele => <Option value={ele.id}>{ele.title}</Option>)} {teacherClassListForSearch.map(ele => <Option value={ele.id}>{ele.title}</Option>)}
</Select> </Select>
</div> </div>
</Col> </Col>
<Col xs={{ span: 24 }} sm={{ span: 12 }} md={{ span: 12 }} lg={{ span: 6 }}> <Col xs={{ span: 24 }} sm={{ span: 12 }} md={{ span: 12 }} lg={{ span: 6 }}>
<div className={pageStyle.formitemlabel}>点名状态: <div className={pageStyle.formitemlabel}>点名状态:
<Select style={{ width: '100%', maxWidth: 233 }} placeholder="全部" onChange={e => this.searchParamsChange(e, 'status')}> <Select style={{ width: '100%', maxWidth: 233 }} placeholder="全部" value={copyTeachersScheduleListQueryParams.status} onChange={e => this.searchParamsChange(e, 'status')}>
<Option value=""></Option> <Option value="">全部状态</Option>
<Option value={1}>已点名</Option> <Option value={1}>已点名</Option>
<Option value={2}>未点名</Option> <Option value={2}>未点名</Option>
</Select> </Select>
...@@ -729,8 +753,8 @@ class teachersForm extends React.Component { ...@@ -729,8 +753,8 @@ class teachersForm extends React.Component {
<Row gutter="24" tyle="flex" align="center"> <Row gutter="24" tyle="flex" align="center">
<Col xs={{ span: 24 }} sm={{ span: 12 }} md={{ span: 12 }} lg={{ span: 6 }}> <Col xs={{ span: 24 }} sm={{ span: 12 }} md={{ span: 12 }} lg={{ span: 6 }}>
<div className={pageStyle.formitemlabel}>授课课程: <div className={pageStyle.formitemlabel}>授课课程:
<Select style={{ width: '100%', maxWidth: 233 }} placeholder="课程列表" onChange={e => this.searchParamsChange(e, 'courseId')}> <Select style={{ width: '100%', maxWidth: 233 }} value={copyTeachersScheduleListQueryParams.course_id} placeholder="课程列表" onChange={e => this.searchParamsChange(e, 'courseId')}>
<Option value=""></Option> <Option value="">全部课程</Option>
{courseList.map(ele => <Option value={ele.id}>{ele.title}</Option>)} {courseList.map(ele => <Option value={ele.id}>{ele.title}</Option>)}
</Select> </Select>
</div> </div>
...@@ -738,8 +762,8 @@ class teachersForm extends React.Component { ...@@ -738,8 +762,8 @@ class teachersForm extends React.Component {
<Col xs={{ span: 24 }} sm={{ span: 12 }} md={{ span: 12 }} lg={{ span: 6 }}> <Col xs={{ span: 24 }} sm={{ span: 12 }} md={{ span: 12 }} lg={{ span: 6 }}>
<div className={pageStyle.formitemlabel}> <div className={pageStyle.formitemlabel}>
<span style={{ marginRight: 28 }}>教室:</span> <span style={{ marginRight: 28 }}>教室:</span>
<Select style={{ width: '100%', maxWidth: 233 }} placeholder="教室列表" onChange={e => this.searchParamsChange(e, 'class_room_id')}> <Select style={{ width: '100%', maxWidth: 233 }} value={copyTeachersScheduleListQueryParams.class_room_id} placeholder="教室列表" onChange={e => this.searchParamsChange(e, 'class_room_id')}>
<Option value=""></Option> <Option value="">全部教室</Option>
{classroomList.map(ele => <Option value={ele.id}>{ele.title}</Option>)} {classroomList.map(ele => <Option value={ele.id}>{ele.title}</Option>)}
</Select> </Select>
</div> </div>
...@@ -770,7 +794,7 @@ class teachersForm extends React.Component { ...@@ -770,7 +794,7 @@ class teachersForm extends React.Component {
</TabPane> </TabPane>
<TabPane tab="排课表" key="3"> <TabPane tab="排课表" key="3">
<div> <div>
<Row className={pageStyle.timechoice}> <Row className={pageStyle.timechoice} type="flex" align="middle" justify="space-between">
<Col span={6}> <Col span={6}>
<div className={pageStyle.dianmingtime}>一周点名情况 {scheduleListQueryParams.start_time}{scheduleListQueryParams.end_time}</div> <div className={pageStyle.dianmingtime}>一周点名情况 {scheduleListQueryParams.start_time}{scheduleListQueryParams.end_time}</div>
</Col> </Col>
...@@ -806,10 +830,9 @@ class teachersForm extends React.Component { ...@@ -806,10 +830,9 @@ class teachersForm extends React.Component {
changeStudentSchedule={this.changeStudentSchedule} changeStudentSchedule={this.changeStudentSchedule}
sureAdjustCourse={this.sureAdjustCourse} sureAdjustCourse={this.sureAdjustCourse}
/> />
{this.state.classInfo.id && <CallStudents
<CallStudents callBack={this.saveCallStudents}
classDetail={this.state.classInfo} />
/>}
<EditTeacher <EditTeacher
visible={addOrUpdateDiaShow} visible={addOrUpdateDiaShow}
hide={() => this.setModal1Visible(false)} hide={() => this.setModal1Visible(false)}
...@@ -841,6 +864,7 @@ function mapStateToProps(state) { ...@@ -841,6 +864,7 @@ function mapStateToProps(state) {
courseList, courseList,
teachersscheduleTotal, teachersscheduleTotal,
teachersScheduleListQueryParams, teachersScheduleListQueryParams,
copyTeachersScheduleListQueryParams,
} = state.teachersinfo; } = state.teachersinfo;
const { const {
changeScheduleIndex, changeScheduleIndex,
...@@ -895,6 +919,7 @@ function mapStateToProps(state) { ...@@ -895,6 +919,7 @@ function mapStateToProps(state) {
studentChangeScheduleListLoading, studentChangeScheduleListLoading,
studentChangeScheduleListTotal, studentChangeScheduleListTotal,
studentChangeScheduleListQueryParams, studentChangeScheduleListQueryParams,
copyTeachersScheduleListQueryParams,
}; };
} }
export default connect(mapStateToProps)(ForgotPassword); export default connect(mapStateToProps)(ForgotPassword);
......
...@@ -11,6 +11,7 @@ module.exports = { ...@@ -11,6 +11,7 @@ module.exports = {
'jquery', 'jquery',
'cropper', 'cropper',
'bizcharts', 'bizcharts',
'xlsx',
], ],
}, },
output: { output: {
......
...@@ -1098,6 +1098,13 @@ address@1.0.3, address@^1.0.1: ...@@ -1098,6 +1098,13 @@ address@1.0.3, address@^1.0.1:
version "1.0.3" version "1.0.3"
resolved "https://registry.yarnpkg.com/address/-/address-1.0.3.tgz#b5f50631f8d6cec8bd20c963963afb55e06cbce9" resolved "https://registry.yarnpkg.com/address/-/address-1.0.3.tgz#b5f50631f8d6cec8bd20c963963afb55e06cbce9"
adler-32@~1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/adler-32/-/adler-32-1.2.0.tgz#6a3e6bf0a63900ba15652808cb15c6813d1a5f25"
dependencies:
exit-on-epipe "~1.0.1"
printj "~1.1.0"
af-webpack@^0.22.2: af-webpack@^0.22.2:
version "0.22.3" version "0.22.3"
resolved "https://registry.yarnpkg.com/af-webpack/-/af-webpack-0.22.3.tgz#5863e0a528745d17c228c298a02caf30d7b80cb1" resolved "https://registry.yarnpkg.com/af-webpack/-/af-webpack-0.22.3.tgz#5863e0a528745d17c228c298a02caf30d7b80cb1"
...@@ -2265,6 +2272,15 @@ center-align@^0.1.1: ...@@ -2265,6 +2272,15 @@ center-align@^0.1.1:
align-text "^0.1.3" align-text "^0.1.3"
lazy-cache "^1.0.3" lazy-cache "^1.0.3"
cfb@^1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/cfb/-/cfb-1.1.3.tgz#05de6816259c8e8bc32713aba905608ee385df66"
dependencies:
adler-32 "~1.2.0"
commander "^2.16.0"
crc-32 "~1.2.0"
printj "~1.1.2"
chalk@1.1.3, chalk@^1.1.1, chalk@^1.1.3: chalk@1.1.3, chalk@^1.1.1, chalk@^1.1.3:
version "1.1.3" version "1.1.3"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98"
...@@ -2451,6 +2467,13 @@ code-point-at@^1.0.0: ...@@ -2451,6 +2467,13 @@ code-point-at@^1.0.0:
version "1.1.0" version "1.1.0"
resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77"
codepage@~1.14.0:
version "1.14.0"
resolved "https://registry.yarnpkg.com/codepage/-/codepage-1.14.0.tgz#8cbe25481323559d7d307571b0fff91e7a1d2f99"
dependencies:
commander "~2.14.1"
exit-on-epipe "~1.0.1"
collection-visit@^1.0.0: collection-visit@^1.0.0:
version "1.0.0" version "1.0.0"
resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0"
...@@ -2508,7 +2531,7 @@ commander@*, commander@2.15.x, commander@^2.11.0, commander@^2.12.1, commander@^ ...@@ -2508,7 +2531,7 @@ commander@*, commander@2.15.x, commander@^2.11.0, commander@^2.12.1, commander@^
version "2.15.1" version "2.15.1"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f" resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f"
commander@2: commander@2, commander@^2.16.0:
version "2.20.0" version "2.20.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422"
...@@ -2516,6 +2539,14 @@ commander@~2.13.0: ...@@ -2516,6 +2539,14 @@ commander@~2.13.0:
version "2.13.0" version "2.13.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c" resolved "https://registry.yarnpkg.com/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c"
commander@~2.14.1:
version "2.14.1"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.14.1.tgz#2235123e37af8ca3c65df45b026dbd357b01b9aa"
commander@~2.17.1:
version "2.17.1"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.17.1.tgz#bd77ab7de6de94205ceacc72f1716d29f20a77bf"
commondir@^1.0.1: commondir@^1.0.1:
version "1.0.1" version "1.0.1"
resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b"
...@@ -2718,6 +2749,13 @@ cpx@^1.5.0: ...@@ -2718,6 +2749,13 @@ cpx@^1.5.0:
shell-quote "^1.6.1" shell-quote "^1.6.1"
subarg "^1.0.0" subarg "^1.0.0"
crc-32@~1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/crc-32/-/crc-32-1.2.0.tgz#cb2db6e29b88508e32d9dd0ec1693e7b41a18208"
dependencies:
exit-on-epipe "~1.0.1"
printj "~1.1.0"
create-ecdh@^4.0.0: create-ecdh@^4.0.0:
version "4.0.3" version "4.0.3"
resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.3.tgz#c9111b6f33045c4697f144787f9254cdc77c45ff" resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.3.tgz#c9111b6f33045c4697f144787f9254cdc77c45ff"
...@@ -4023,6 +4061,10 @@ execa@^0.7.0: ...@@ -4023,6 +4061,10 @@ execa@^0.7.0:
signal-exit "^3.0.0" signal-exit "^3.0.0"
strip-eof "^1.0.0" strip-eof "^1.0.0"
exit-on-epipe@~1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/exit-on-epipe/-/exit-on-epipe-1.0.1.tgz#0bdd92e87d5285d267daa8171d0eb06159689692"
exit@^0.1.2: exit@^0.1.2:
version "0.1.2" version "0.1.2"
resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c"
...@@ -4462,6 +4504,10 @@ forwarded@~0.1.2: ...@@ -4462,6 +4504,10 @@ forwarded@~0.1.2:
version "0.1.2" version "0.1.2"
resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84" resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84"
frac@~1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/frac/-/frac-1.1.2.tgz#3d74f7f6478c88a1b5020306d747dc6313c74d0b"
fragment-cache@^0.2.1: fragment-cache@^0.2.1:
version "0.2.1" version "0.2.1"
resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19"
...@@ -7721,6 +7767,10 @@ pretty-format@^22.4.0, pretty-format@^22.4.3: ...@@ -7721,6 +7767,10 @@ pretty-format@^22.4.0, pretty-format@^22.4.3:
ansi-regex "^3.0.0" ansi-regex "^3.0.0"
ansi-styles "^3.2.0" ansi-styles "^3.2.0"
printj@~1.1.0, printj@~1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/printj/-/printj-1.1.2.tgz#d90deb2975a8b9f600fb3a1c94e3f4c53c78a222"
private@^0.1.6, private@^0.1.8, private@~0.1.5: private@^0.1.6, private@^0.1.8, private@~0.1.5:
version "0.1.8" version "0.1.8"
resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff"
...@@ -9491,6 +9541,12 @@ sprintf-js@~1.0.2: ...@@ -9491,6 +9541,12 @@ sprintf-js@~1.0.2:
version "1.0.3" version "1.0.3"
resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
ssf@~0.10.2:
version "0.10.2"
resolved "https://registry.yarnpkg.com/ssf/-/ssf-0.10.2.tgz#65b2b4fcdfd967bc8e8383a41349009893115976"
dependencies:
frac "~1.1.2"
sshpk@^1.7.0: sshpk@^1.7.0:
version "1.14.1" version "1.14.1"
resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.14.1.tgz#130f5975eddad963f1d56f92b9ac6c51fa9f83eb" resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.14.1.tgz#130f5975eddad963f1d56f92b9ac6c51fa9f83eb"
...@@ -10615,6 +10671,18 @@ xdg-basedir@^3.0.0: ...@@ -10615,6 +10671,18 @@ xdg-basedir@^3.0.0:
version "3.0.0" version "3.0.0"
resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-3.0.0.tgz#496b2cc109eca8dbacfe2dc72b603c17c5870ad4" resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-3.0.0.tgz#496b2cc109eca8dbacfe2dc72b603c17c5870ad4"
xlsx@^0.15.0:
version "0.15.0"
resolved "https://registry.yarnpkg.com/xlsx/-/xlsx-0.15.0.tgz#7e5633bbeb3995373b8b9960deb6fbda912ab602"
dependencies:
adler-32 "~1.2.0"
cfb "^1.1.3"
codepage "~1.14.0"
commander "~2.17.1"
crc-32 "~1.2.0"
exit-on-epipe "~1.0.1"
ssf "~0.10.2"
xml-name-validator@^3.0.0: xml-name-validator@^3.0.0:
version "3.0.0" version "3.0.0"
resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a" resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a"
......
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