Merge branch 'dev_aliyun' of http://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

dev_ec^2
cxt 6 years ago
commit 07d714e7b8

@ -89,7 +89,7 @@ function CourseGroupChooser({ course_groups, isAdminOrCreator = true, item, inde
<p className="drop_down_btn"> <p className="drop_down_btn">
<a href="javascript:void(0)" className="color-grey-6" <a href="javascript:void(0)" className="color-grey-6"
onClick={() => trigger('groupAdd')} onClick={() => trigger('groupAdd')}
>添加分班</a> >新建分班</a>
</p> </p>
</ul> </ul>
) )

@ -210,13 +210,13 @@ function CourseGroupList(props) {
onPressEnter={onPressEnter} onPressEnter={onPressEnter}
></Titlesearchsection> ></Titlesearchsection>
<div className="mt20 edu-back-white padding20-30 "> {!!none_group_member_count && <div className="mt20 edu-back-white padding20-30 ">
<span>未分班</span> <span>未分班</span>
<span style={{color: '#999999'}}>{none_group_member_count}个学生</span> <span style={{color: '#999999'}}>{none_group_member_count}个学生</span>
<WordsBtn style="blue" className="fr " <WordsBtn style="blue" className="fr "
onClick={() => {props.history.push(`/courses/${courseId}/course_groups/0`)}}>查看</WordsBtn> onClick={() => {props.history.push(`/courses/${courseId}/course_groups/0`)}}>查看</WordsBtn>
</div> </div>}
<Spin size="large" spinning={isSpin}> <Spin size="large" spinning={isSpin}>
{course_groups && !!course_groups.length ? {course_groups && !!course_groups.length ?

@ -107,7 +107,7 @@ const buildColumns = (that,isParent) => {
} }
]; ];
if (course_groups && course_groups.length) { if (course_groups && course_groups.length) {
columns.push({ this.isStudentPage && columns.push({
title: '分班', title: '分班',
dataIndex: 'course_group_name', dataIndex: 'course_group_name',
key: 'course_group_name', key: 'course_group_name',
@ -589,15 +589,15 @@ class studentsList extends Component{
<div>是否确认删除?</div> <div>是否确认删除?</div>
</div>, </div>,
onOk: () => { onOk: () => {
// const cid = this.props.match.params.coursesId
const course_group_id = this.props.match.params.course_group_id const course_group_id = this.props.match.params.course_group_id
const courseId = this.props.match.params.coursesId
const url = `/course_groups/${course_group_id}.json` const url = `/course_groups/${course_group_id}.json`
axios.delete(url) axios.delete(url)
.then((response) => { .then((response) => {
if (response.data.status == 0) { if (response.data.status == 0) {
this.props.showNotification('删除成功') this.props.showNotification('删除成功')
this.props.history.push(response.data.right_url) this.props.history.push(`/courses/${coursesId}/course_groups`)
} }
}) })
.catch(function (error) { .catch(function (error) {
@ -687,6 +687,7 @@ class studentsList extends Component{
} else { } else {
pageType = TYPE_COURSE_GOURP_PARENT pageType = TYPE_COURSE_GOURP_PARENT
} }
// 本页面有2个状态学生列表、具体分班
const isStudentPage = pageType == TYPE_STUDENTS const isStudentPage = pageType == TYPE_STUDENTS
this.isStudentPage = isStudentPage this.isStudentPage = isStudentPage
const isGroupChildPage = pageType == TYPE_COURSE_GOURP_CHILD const isGroupChildPage = pageType == TYPE_COURSE_GOURP_CHILD
@ -804,7 +805,7 @@ class studentsList extends Component{
{ {
total_count > 0 || this.state.isSpin == true ? total_count > 0 || this.state.isSpin == true ?
<div className="mt20 edu-back-white padding20"> <div className="mt20 edu-back-white padding20">
<div className="clearfix stu_head" style={{paddingLeft: '15px'}}> <div className="clearfix stu_head" style={{paddingLeft: '5px'}}>
{isAdmin && !isStudentPage && <Checkbox className="fl" onChange={this.onCheckAll} checked={checkAllValue} >已选 {checkBoxValues.length} </Checkbox>} {isAdmin && !isStudentPage && <Checkbox className="fl" onChange={this.onCheckAll} checked={checkAllValue} >已选 {checkBoxValues.length} </Checkbox>}
<div className="studentList_operation_ul"> <div className="studentList_operation_ul">
{/* {isAdmin && <li className="li_line"><a href="javascript:void(0)" className="color-grey-9" onClick={this.onDelete}>删除</a></li>} */} {/* {isAdmin && <li className="li_line"><a href="javascript:void(0)" className="color-grey-9" onClick={this.onDelete}>删除</a></li>} */}
@ -835,7 +836,7 @@ class studentsList extends Component{
<p className="drop_down_btn"> <p className="drop_down_btn">
<a href="javascript:void(0)" className="color-grey-6" <a href="javascript:void(0)" className="color-grey-6"
onClick={()=>this.addDir()} onClick={()=>this.addDir()}
>添加分班...</a> >新建分班...</a>
</p> </p>
} }

Loading…
Cancel
Save