hasGroupModule = () => {

issues25489
hjm 6 years ago
parent 1130395f94
commit 983ae533f6

@ -107,7 +107,7 @@ const buildColumns = (that,isParent) => {
} }
]; ];
if (course_groups && course_groups.length) { if (that.hasGroupModule()) {
that.isStudentPage && columns.push({ that.isStudentPage && columns.push({
title: '分班', title: '分班',
dataIndex: 'course_group_name', dataIndex: 'course_group_name',
@ -249,6 +249,13 @@ class studentsList extends Component{
console.log(error) console.log(error)
}); });
} }
hasGroupModule = () => {
const { course_modules } = this.props;
const result = course_modules && course_modules.filter( item => {
return item.type == 'course_group'
})
return result && result.length > 0
}
Downloadcal=()=>{ Downloadcal=()=>{
this.setState({ this.setState({

Loading…
Cancel
Save