Commit 177906e7 authored by wangxuelai's avatar wangxuelai

''

parent ad7b1f2c
......@@ -1151,7 +1151,7 @@ export default {
});
if (classDetailData.code == 200) {
classDetail = classDetailData.data;
classDetail.teacher_id = classDetailData.data.school_teachers.map(ele => ele.id) || [];
classDetail.teacher_id = (classDetailData.data.school_teachers && classDetailData.data.school_teachers.map(ele => ele.id)) || [];
yield put({
type: 'updateState',
payload: {
......
......@@ -654,42 +654,8 @@ export default {
type: 'updateState',
});
},
* judgeexpire({ payload }, { put, call, select }) {
// const webapp = yield select(state => state.webapp);
// const { userInfo } = webapp;
// const { isLogin, isSchoolAdd } = payload;
// if ((LocalStorage.getItem('user') && LocalStorage.getItem('user').token && LocalStorage.getItem('dakarole') == 1) || (LocalStorage.getItem('teacher') && LocalStorage.getItem('teacher').token && LocalStorage.getItem('dakarole') == 2)) {
// const memberSchools = yield call(users.memberSchools);
// if (memberSchools.data.list.length > 0) {
// LocalStorage.setItem('sid', memberSchools.data.list[0].id);
// yield put({
// type: 'webapp/updateState',
// payload: {
// sid: memberSchools.data.list[0].id,
// },
// });
// yield put(routerRedux.push({
// pathname: '/sjd/indexstaic',
// }));
// } else {
// if (isSchoolAdd) {
// return;
// }
// yield put(routerRedux.push({
// pathname: '/schooladd',
// }));
// }
// } else {
// LocalStorage.removeItem('user');
// LocalStorage.removeItem('dakarole');
// LocalStorage.removeItem('teacher');
// if (isSchoolAdd) {
// yield put(routerRedux.push({
// pathname: '/login',
// }));
// }
// }
},
// * judgeexpire({ payload }, { put, call, select }) {
// },
* shiftSchool({ payload }, { put, select }) {
yield put(routerRedux.replace({
pathname: '/schoollist',
......
......@@ -958,7 +958,7 @@ class ClassDetailForm extends React.Component {
{record.rule.type == 1 &&
<div>
<div>{record.rule.start_date}开始</div>
<div>({record.rule.week_day.map(ele => (
<div>({record.rule.week_day && record.rule.week_day.map(ele => (
`${record.rule.is_repeat == 1 ? '每周' : '隔周'}${['一', '二', '三', '四', '五', '六', '日'][ele - 1]}`
)).join('/')})
</div>
......@@ -1418,7 +1418,7 @@ class ClassDetailForm extends React.Component {
<Col xs={{ span: 24 }} sm={{ span: 12 }} md={{ span: 12 }} lg={{ span: 6 }}>
<span className={pageStyle.detailtitle}>班级老师:</span>
{classDetail.school_teachers && classDetail.school_teachers.length > 0 &&
<span className={pageStyle.detaildesc}>{classDetail.school_teachers.map(ele => ele.nickname).join(',')}</span>
<span className={pageStyle.detaildesc}>{classDetail.school_teachers && classDetail.school_teachers.map(ele => ele.nickname).join(',')}</span>
}
{(!classDetail.school_teachers || classDetail.school_teachers.length == 0) &&
<span className={pageStyle.detaildesc}>未绑定</span>
......
......@@ -75,7 +75,7 @@ class ClassStatusChangeModal extends React.Component {
render: (text, record, index) => {
return (
<div>
{record.school_teachers.map(ele => ele.nickname).join(',') }
{record.school_teachers && record.school_teachers.map(ele => ele.nickname).join(',') }
</div>
);
},
......
......@@ -415,7 +415,7 @@ class ClassMgtForm extends React.Component {
render: (text, record, index) => {
return (
<div >
{record.school_teachers.map(ele => ele.nickname).join(',') }
{record.school_teachers && record.school_teachers.map(ele => ele.nickname).join(',') }
</div>
);
},
......
......@@ -220,7 +220,7 @@ class StudentAddForm extends React.Component {
</Col>
<Col sm={{ span: 8 }} style={{ textAlign: 'center' }}>
<img className={pageStyle.avatar} src={imagify(studentAvator) || `${__IMGCDN__}defaultavatar.png`} alt="1" />
<span style={{ position: 'relative' }}>
<span style={{ position: 'relative', color: '#1890FF' }} >
<input type="file" id="uploadinput" className={pageStyle.fileuploadinput} onChange={(e) => { this.uploadAvator(e); }} accept="image/*" />
上传头像
</span>
......
......@@ -178,7 +178,7 @@ class StudentAddForm extends React.Component {
</Col>
<Col sm={{ span: 8 }} style={{ textAlign: 'center' }}>
<img className={pageStyle.avatar} src={imagify(studentAvator) || `${__IMGCDN__}defaultavatar.png`} alt="" />
<span style={{ position: 'relative' }}>
<span style={{ position: 'relative', color: '#1890FF' }}>
<input type="file" id="uploadinput" className={pageStyle.fileuploadinput} onChange={(e) => { this.uploadAvator(e); }} accept="image/*" />
上传头像
</span>
......
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