Commit 1f13bb04 authored by wangxuelai's avatar wangxuelai

''

parent 177906e7
......@@ -127,6 +127,7 @@ export default {
birthday: `${dakaapi}member/erp/todo/birthday`,
call: `${dakaapi}member/erp/todo/call`,
assign: `${dakaapi}member/erp/todo/assign`,
todoSchedule: `${dakaapi}member/erp/todo/schedule`,
},
thememgt: {
themeList: `${dakaapi}member/subject/mixed`,
......
......@@ -64,6 +64,7 @@ export default {
student_id: '',
my: '',
miss_call_day: '',
schedule_count: '',
},
classListQueryParamsB: {
school_id: 0,
......@@ -443,6 +444,7 @@ export default {
student_id: '',
my: '',
miss_call_day: '',
schedule_count: '',
},
},
});
......@@ -463,6 +465,7 @@ export default {
student_id: '',
my: '',
miss_call_day: '',
schedule_count: '',
}),
},
},
......@@ -776,6 +779,7 @@ export default {
extra: 'course,class_room',
student_id: '',
my: '',
schedule_count: '',
},
copyClassListQueryParams: {
school_id: 0,
......@@ -791,6 +795,7 @@ export default {
student_id: '',
my: '',
miss_call_day: '',
schedule_count: '',
},
classListQueryParamsB: {
school_id: 0,
......
......@@ -50,6 +50,7 @@ export default {
assign: {
total: 0,
},
scheduleCount: 0,
teacherList: [],
courseList: [],
classroomList: [],
......@@ -182,6 +183,17 @@ export default {
});
yield put(routerRedux.push('/sjd/classmgt'));
},
* goPlanClass({ payload }, { call, put, select }) {
const { classListQueryParams } = yield select(state => state.classmgt);
classListQueryParams.schedule_count = 3;
yield put({
type: 'updateState',
payload: {
classListQueryParams: { ...classListQueryParams },
},
});
yield put(routerRedux.push('/sjd/classmgt'));
},
* goPlanStudent({ payload }, { call, put, select }) {
const { studentListQueryParams, searchstudentListQueryParams } = yield select(state => state.students);
const { dateTime } = yield select(state => state.indexstaic);
......@@ -428,6 +440,27 @@ export default {
// message.error(callData.msg, 1);
}
},
* todoSchedule({ payload }, { call, put, select }) {
const { sid } = yield select(state => state.webapp);
const callData = yield call(indexstaticajax.todoSchedule, { school_id: sid, my: LocalStorage.getItem('role') == 1 ? 1 : '' });
if (callData.code == 200) {
yield put({
type: 'updateState',
payload: {
sid,
scheduleCount: callData.data.total,
},
});
} else {
yield put({
type: 'webapp/errorrequestresolve',
payload: {
data: callData,
},
});
// message.error(callData.msg, 1);
}
},
* queryinfo({ payload }, { call, put, select }) {
const { sid } = yield select(state => state.webapp);
if (!sid) {
......@@ -577,6 +610,7 @@ export default {
assign: {
total: 0,
},
scheduleCount: 0,
teacherList: [],
courseList: [],
classroomList: [],
......
......@@ -193,6 +193,9 @@ export default {
dispatch({
type: 'indexstaic/assign',
});
dispatch({
type: 'indexstaic/todoSchedule',
});
dispatch({
type: 'webapp/updateState',
payload: {
......
......@@ -107,6 +107,12 @@ class StaticCenter extends React.Component {
type: 'indexstaic/goCallStudent',
});
}
goPlanClass = () => {
const { dispatch } = this.props;
dispatch({
type: 'indexstaic/goPlanClass',
});
}
goPlanStudent = () => {
const { dispatch } = this.props;
dispatch({
......@@ -248,6 +254,7 @@ class StaticCenter extends React.Component {
addTimeSubmitting,
chartEndDate,
chartStartDate,
scheduleCount,
} = this.props;
const dataArray = clockCharts;
const month = dataArray.dates;
......@@ -516,10 +523,11 @@ class StaticCenter extends React.Component {
<span>待办事项</span>
</div>
<div className={pageStyle.items}>
{renew.total > 0 && <div className={pageStyle.renew} onClick={this.goDeadlineStudent}><span>续费</span>有{renew.total || 0}名学员的课时即将到期</div>}
{birthday.total > 0 && <div className={pageStyle.birthday} onClick={this.goBirthStudent}><span>生日</span>本日有{birthday.total || 0}名学员生日待祝福</div>}
{callData.total > 0 && <div className={pageStyle.birthday} onClick={this.goCallStudent}><span>点名</span>本周有{callData.total || 0}个课时尚未点名</div>}
{assign.total > 0 && <div className={pageStyle.birthday} onClick={this.goPlanStudent}><span>分配</span>有{assign.total || 0}名学员未安排班级</div>}
{renew.total > -1 && <div className={pageStyle.renew} onClick={this.goDeadlineStudent}><span>续费</span>有{renew.total || 0}名学员的课时即将到期</div>}
{birthday.total > -1 && <div className={pageStyle.birthday} onClick={this.goBirthStudent}><span>生日</span>本日有{birthday.total || 0}名学员生日待祝福</div>}
{callData.total > -1 && <div className={pageStyle.birthday} onClick={this.goCallStudent}><span>点名</span>本周有{callData.total || 0}个课时尚未点名</div>}
{assign.total > -1 && <div className={pageStyle.birthday} onClick={this.goPlanStudent}><span>分配</span>有{assign.total || 0}名学员未安排班级</div>}
{scheduleCount > -1 && <div className={pageStyle.birthday} onClick={this.goPlanClass}><span>排课</span>有{scheduleCount}个班级课表即将结束</div>}
</div>
</div>
</div>
......@@ -574,6 +582,7 @@ function mapStateToProps(state) {
addTimeSubmitting,
chartEndDate,
chartStartDate,
scheduleCount,
} = state.indexstaic;
return {
staticcenter,
......@@ -595,6 +604,7 @@ function mapStateToProps(state) {
addTimeSubmitting,
chartEndDate,
chartStartDate,
scheduleCount,
};
}
export default connect(mapStateToProps)(StaticCenter);
......
......@@ -25,6 +25,12 @@ export function birthday({ schoolId }) {
method: 'GET',
});
}
export function todoSchedule({ school_id }) {
return request({
url: `${api.todo.todoSchedule}?school_id=${school_id}`,
method: 'GET',
});
}
export function call(params) {
const data = qs.stringify(params);
return request({
......
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