Commit fa578fca authored by wangxuelai's avatar wangxuelai

'最新代码提交'

parent 8d2b4b32
<!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?1566355317524" 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?1566355317524" charset="utf-8"></script></body></html> <![endif]-->
\ No newline at end of file <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?1566376947791" 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?1566376947791" charset="utf-8"></script>
</body>
</html>
\ No newline at end of file
...@@ -171,6 +171,7 @@ export default { ...@@ -171,6 +171,7 @@ export default {
const { const {
teacherListQueryParams, teacherListTotal, searching, searchteacherListQueryParams, teacherListQueryParams, teacherListTotal, searching, searchteacherListQueryParams,
} = yield select(state => state.teachers); } = yield select(state => state.teachers);
let loadmessage;
if (action == 'search') { if (action == 'search') {
if (searching) { if (searching) {
return; return;
...@@ -181,15 +182,15 @@ export default { ...@@ -181,15 +182,15 @@ export default {
searching: true, searching: true,
}, },
}); });
loadmessage = message.loading('数据加载中...', 0);
} }
let newTeacherListTotal = teacherListTotal; let newTeacherListTotal = teacherListTotal;
const loadmessage = message.loading('数据加载中...', 0);
const newteacherQueryParams = Object.assign(teacherListQueryParams, params, searchteacherListQueryParams, { const newteacherQueryParams = Object.assign(teacherListQueryParams, params, searchteacherListQueryParams, {
school_id: sid, school_id: sid,
}); });
const teachersinfoData = yield call(teachersAjax.teachersList, newteacherQueryParams); const teachersinfoData = yield call(teachersAjax.teachersList, newteacherQueryParams);
setTimeout(loadmessage);
if (action == 'search') { if (action == 'search') {
setTimeout(loadmessage);
yield put({ yield put({
type: 'updateState', type: 'updateState',
payload: { payload: {
......
...@@ -62,6 +62,18 @@ class EditClassModal extends React.Component { ...@@ -62,6 +62,18 @@ class EditClassModal extends React.Component {
title: e.target.value, title: e.target.value,
}); });
} }
delSingleTeacher = (value) => {
const { editClassInfo } = this.props;
const { school_teachers } = editClassInfo;
const teacherInSchool = school_teachers.find(ele => ele.id == value);
console.log(teacherInSchool, 'teacherInSchool');
console.log((teacherInSchool.all_schedules_count - teacherInSchool.expired_schedules_count) > 0, '');
if (teacherInSchool && (teacherInSchool.all_schedules_count - teacherInSchool.expired_schedules_count) > 0) {
message.warn('该老师还有课程未上,无法删除', 1);
return;
}
console.log('ddddddd');
}
render() { render() {
const { const {
visible, visible,
...@@ -244,7 +256,11 @@ class EditClassModal extends React.Component { ...@@ -244,7 +256,11 @@ class EditClassModal extends React.Component {
{getFieldDecorator('teacher_id', { {getFieldDecorator('teacher_id', {
initialValue: editClassInfo.teacher_id, initialValue: editClassInfo.teacher_id,
})( })(
<Select mode="multiple" allowClear placeholder="请选择老师"> <Select
mode="multiple"
onDeselect={this.delSingleTeacher}
placeholder="请选择老师"
>
{teacherList.map(ele => ( {teacherList.map(ele => (
<Option value={ele.id}>{ele.nickname}</Option> <Option value={ele.id}>{ele.nickname}</Option>
))} ))}
......
...@@ -217,7 +217,6 @@ class StaticCenter extends React.Component { ...@@ -217,7 +217,6 @@ class StaticCenter extends React.Component {
chartEndDate, chartEndDate,
chartStartDate, chartStartDate,
} = this.props; } = this.props;
console.log(staticcenter);
const dataArray = clockCharts; const dataArray = clockCharts;
const month = dataArray.dates; const month = dataArray.dates;
const clockCount = dataArray.clock_count; const clockCount = dataArray.clock_count;
...@@ -420,7 +419,7 @@ class StaticCenter extends React.Component { ...@@ -420,7 +419,7 @@ class StaticCenter extends React.Component {
}, },
}} }}
handleStyle={{ handleStyle={{
img: 'http://tc.lihail.cn/Group%2019.png', img: `${__IMGCDN__}sliderblock.png`,
width: 30, width: 30,
height: 29, height: 29,
}} }}
......
...@@ -142,11 +142,17 @@ class ClassMgt extends React.Component { ...@@ -142,11 +142,17 @@ class ClassMgt extends React.Component {
} }
changeStatus = (id, status) => { changeStatus = (id, status) => {
const { dispatch } = this.props; const { dispatch } = this.props;
dispatch({ console.log(status, 'status');
type: 'teachers/teacherStatus', Modal.confirm({
payload: { title: `确定${status == 1 ? '停用' : '启用'}该老师吗?`,
id, onOk() {
status, dispatch({
type: 'teachers/teacherStatus',
payload: {
id,
status,
},
});
}, },
}); });
} }
......
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