Commit c64f6c35 authored by wangxuelai's avatar wangxuelai

'sada'

parent b3e9eca8
......@@ -70,7 +70,7 @@ class SjdMenu extends React.Component {
<Menu.Item key={ele.id} style={menuItemStyle} onClick={() => this.selectedMenu(ele.id, null)}>
<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' }} />
<span>{ele.name} {defaultMenu == ele.id && 'dui'}</span>
<span>{ele.name}</span>
</Menu.Item> :
<SubMenu
key="sub1"
......@@ -86,7 +86,7 @@ class SjdMenu extends React.Component {
<Menu.Item key={submenu.id} style={menuItemStyle} onClick={() => this.selectedMenu(submenu.id, submenu.fatherId)}>
<div className={SjdMenuStyle.menuicon} style={defaultMenu == submenu.id ? { width: submenu.style.width, height: submenu.style.height, backgroundImage: `url(${submenu.activeurl})` } : { width: submenu.style.width, height: submenu.style.height, backgroundImage: `url(${submenu.notactiveurl})` }} />
<Icon style={{ width: 0, minWidth: 'initial' }} />
<span>{submenu.name} {defaultMenu == submenu.id && 'dui'}</span>
<span>{submenu.name}</span>
</Menu.Item>
))}
</SubMenu>
......
......@@ -91,7 +91,7 @@ export default {
teacher_id: '',
course_id: '',
class_room_id: '',
status: 0,
graduation_status: 0,
assign_class_status: 0,
extra: 'course,class_room',
student_id: '',
......@@ -538,7 +538,7 @@ export default {
const newClassListQueryParams = Object.assign(classListQueryParams, params, {
school_id: sid,
course_id: classDetail.course_id,
status: 1,
graduation_status: 1,
exclude_class_id: classId,
// teacher_id: 77,
});
......
......@@ -44,7 +44,7 @@ export default {
teacher_id: '',
course_id: '',
class_room_id: '',
status: 0,
graduation_status: 0,
assign_class_status: 0,
extra: 'course,class_room',
student_id: '',
......@@ -58,7 +58,7 @@ export default {
teacher_id: '',
course_id: '',
class_room_id: '',
status: 0,
graduation_status: 0,
assign_class_status: 0,
extra: 'course,class_room',
student_id: '',
......@@ -72,7 +72,7 @@ export default {
teacher_id: '',
course_id: '',
class_room_id: '',
status: 1,
graduation_status: 1,
assign_class_status: 0,
extra: 'course,class_room',
student_id: '',
......@@ -86,7 +86,7 @@ export default {
teacher_id: '',
course_id: '',
class_room_id: '',
status: 1,
graduation_status: 1,
assign_class_status: 0,
extra: 'course,class_room',
student_id: '',
......@@ -410,7 +410,7 @@ export default {
teacher_id: '',
course_id: '',
class_room_id: '',
status: 0,
graduation_status: 0,
assign_class_status: 0,
extra: 'course,class_room',
student_id: '',
......@@ -429,7 +429,7 @@ export default {
teacher_id: '',
course_id: '',
class_room_id: '',
status: 0,
graduation_status: 0,
assign_class_status: 0,
extra: 'course,class_room',
student_id: '',
......@@ -451,7 +451,7 @@ export default {
teacher_id: '',
course_id: '',
class_room_id: '',
status: 0,
graduation_status: 0,
assign_class_status: 0,
extra: 'course,class_room',
student_id: '',
......@@ -470,7 +470,7 @@ export default {
teacher_id: '',
course_id: '',
class_room_id: '',
status: 0,
graduation_status: 0,
assign_class_status: 0,
extra: 'course,class_room',
student_id: '',
......@@ -614,7 +614,7 @@ export default {
* saveStatusChange({ payload }, { call, put, select }) {
const { selectedClasskey, selectedClass, statusChangeSubmitting } = yield select(state => state.classmgt);
const { sid } = yield select(state => state.webapp);
const { status } = payload;
const { graduation_status } = payload;
if (selectedClasskey.length == 0) {
message.warn('请选择需要结业的班级', 1);
return;
......@@ -631,7 +631,7 @@ export default {
const changeClassStatusData = yield call(classMgtAjax.changeClassStatus, {
ids: selectedClass.map(ele => ele.id).join(','),
school_id: sid,
status,
graduation_status,
});
yield put({
type: 'updateState',
......@@ -661,7 +661,7 @@ export default {
},
},
});
message.success(status == 1 ? '撤销结业成功' : '结业成功', 1);
message.success(graduation_status == 1 ? '撤销结业成功' : '结业成功', 1);
} else {
message.error(changeClassStatusData.msg, 1);
}
......
......@@ -338,6 +338,7 @@ export default {
perPage: 1000,
type: 1,
school_id: sid,
graduation_status: 1,
});
if (classListdata.code == 200) {
yield put({
......
......@@ -258,7 +258,7 @@ export default {
school_id: sid,
page: 1,
perPage: 1000,
status: 1,
graduation_status: 1,
course_id: selectedCourse.course_id,
title,
});
......
......@@ -616,27 +616,12 @@ export default {
* queryClassList({ payload }, { call, put, select }) {
const { params, action } = payload;
const { sid } = yield select(state => state.webapp);
const { classListQueryParams, classListTotal, searching } = yield select(state => state.classmgt);
if (action == 'search') {
if (searching) {
return;
}
yield put({
type: 'updateState',
payload: {
searching: true,
},
});
}
let newClassListTotal = classListTotal;
const loading = message.loading('数据加载中...', 1);
const newClassListQueryParams = Object.assign(classListQueryParams, params, {
const classListData = yield call(classMgtAjax.getClassList, {
school_id: sid,
page: 1,
perPage: 1000,
// teacher_id: 77,
});
const classListData = yield call(classMgtAjax.getClassList, newClassListQueryParams);
setTimeout(loading);
if (action == 'search') {
yield put({
......@@ -647,9 +632,6 @@ export default {
});
}
if (classListData.code == 200) {
if (classListData.data.total != undefined) {
newClassListTotal = classListData.data.total;
}
yield put({
type: 'updateState',
payload: {
......
......@@ -559,7 +559,6 @@ export default {
}
}
menueSearch(menus);
console.log(newDefaultMenu, 'newDefaultMenu');
yield put({
type: 'updateState',
payload: {
......
......@@ -346,7 +346,7 @@ class ClassDetailForm extends React.Component {
}
toAddClassStudent = () => {
const { dispatch, classDetail } = this.props;
if (classDetail.status == 2) {
if (classDetail.graduation_status == 2) {
message.warn('班级已结业,不能添加班级!', 0.5);
return;
}
......@@ -688,7 +688,7 @@ class ClassDetailForm extends React.Component {
}
goPlanCourse = () => {
const { dispatch, classDetail, classId } = this.props;
if (classDetail.status == 2) {
if (classDetail.graduation_status == 2) {
message.error('已结业班级不能排课');
return;
}
......
......@@ -14,7 +14,6 @@ class EditClassModal extends React.Component {
componentWillMount() {
}
componentDidUpdate() {
console.log(this.props.editClassInfo.title, 'this.props.editClassInfo.title');
}
componentWillUpdate() {
......
......@@ -264,7 +264,7 @@ class ClassMgtForm extends React.Component {
dispatch({
type: 'classmgt/saveStatusChange',
payload: {
status: 2,
graduation_status: 2,
},
});
}
......@@ -283,7 +283,7 @@ class ClassMgtForm extends React.Component {
dispatch({
type: 'classmgt/saveStatusChange',
payload: {
status: 2,
graduation_status: 2,
},
});
},
......@@ -313,7 +313,7 @@ class ClassMgtForm extends React.Component {
dispatch({
type: 'classmgt/saveStatusChange',
payload: {
status: 1,
graduation_status: 1,
},
});
},
......@@ -351,7 +351,6 @@ class ClassMgtForm extends React.Component {
const { dispatch } = this.props;
const thisColumns = JSON.parse(JSON.stringify(columns));
thisColumns.splice(columns.length - 1, 1);
console.log(thisColumns, 'thisColumns');
dispatch({
type: 'classmgt/exportClassListExcel',
payload: {
......@@ -453,8 +452,8 @@ class ClassMgtForm extends React.Component {
<span className={pageStyle.divideline}>|</span>
<a className={pageStyle.alink} href="javascript:;" onClick={() => this.goClassDetail(record, 3)}>点名</a>
<span className={pageStyle.divideline}>|</span>
{record.status == 2 && <a className={pageStyle.alink} onClick={() => this.singleResetClassStatusChange(record)} href="javascript:;">已结业</a>}
{record.status == 1 && <a className={pageStyle.alink} href="javascript:;" onClick={() => this.singleClassStatusChange(record)}>结业</a>}
{record.graduation_status == 2 && <a className={pageStyle.alink} onClick={() => this.singleResetClassStatusChange(record)} href="javascript:;">已结业</a>}
{record.graduation_status == 1 && <a className={pageStyle.alink} href="javascript:;" onClick={() => this.singleClassStatusChange(record)}>结业</a>}
</div>
);
},
......@@ -508,7 +507,7 @@ class ClassMgtForm extends React.Component {
</Col>
<Col className={pageStyle.formitem} xs={{ span: 12 }} sm={{ span: 12 }} md={{ span: 12 }} lg={{ span: 6 }}>
<div className={pageStyle.formitemlabel}>结业状态</div>
<Select className={pageStyle.selectitem} value={copyClassListQueryParams.status} onChange={e => this.searchParamsChange(e, 'Select', 'status')} placeholder="请选择结业状态">
<Select className={pageStyle.selectitem} value={copyClassListQueryParams.graduation_status} onChange={e => this.searchParamsChange(e, 'Select', 'graduation_status')} placeholder="请选择结业状态">
<Option value={0}>全部状态</Option>
<Option value={1}>未结业</Option>
<Option value={2}>已结业</Option>
......
......@@ -463,7 +463,6 @@ class StudentMgt extends React.Component {
<EliminateEdit
studentinfo={selectdeStudent}
courseList={courseList}
classList={classList}
teacherList={teacherList}
editClassInfo={editClassInfo}
wrappedComponentRef={this.saveFormRef}
......
......@@ -374,19 +374,6 @@ class StudentMgt extends React.Component {
);
},
},
{
title: '班级名称',
dataIndex: 'class',
key: 'class',
render: (text, record, index) => {
return (
<div className={pageStyle.classNamebox}>
{record.classes.length == 0 && '无'}
{record.classes.length > 0 && record.classes.map(ele => (<div>{ele.title}</div>))}
</div>
);
},
},
{
title: '购买课时',
dataIndex: 'buy',
......@@ -461,6 +448,21 @@ class StudentMgt extends React.Component {
},
},
];
if (currentCourseQueryParams.type == 1) {
columns.splice(1, 0, {
title: '班级名称',
dataIndex: 'class',
key: 'class',
render: (text, record, index) => {
return (
<div className={pageStyle.classNamebox}>
{record.classes.length == 0 && '无'}
{record.classes.length > 0 && record.classes.map(ele => (<div>{ele.title}</div>))}
</div>
);
},
});
}
return (
<div className={pageStyle.container}>
<Modal
......
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