|
|
|
@ -93,29 +93,33 @@ function CourseGroupListTable(props) {
|
|
|
|
|
render: (member_manager, record, index) => {
|
|
|
|
|
return member_manager
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
isAdmin ? {
|
|
|
|
|
title: '邀请码',
|
|
|
|
|
dataIndex: 'invite_code',
|
|
|
|
|
key: 'invite_code',
|
|
|
|
|
align:'center',
|
|
|
|
|
width:"10%",
|
|
|
|
|
className:"color-grey-6",
|
|
|
|
|
render: (invite_code, record, index) => {
|
|
|
|
|
return invite_code
|
|
|
|
|
}
|
|
|
|
|
} : {
|
|
|
|
|
title: '你当前所在分班',
|
|
|
|
|
dataIndex: 'group',
|
|
|
|
|
key: 'group',
|
|
|
|
|
align:'center',
|
|
|
|
|
width:"20%",
|
|
|
|
|
className:"color-grey-6",
|
|
|
|
|
render: (invite_code, record, index) => {
|
|
|
|
|
return props.current_group_id == record.id && <Badge status="processing" text="" />
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
}];
|
|
|
|
|
if (!isNotMember) {
|
|
|
|
|
const aCol = (isAdmin ? {
|
|
|
|
|
title: '邀请码',
|
|
|
|
|
dataIndex: 'invite_code',
|
|
|
|
|
key: 'invite_code',
|
|
|
|
|
align:'center',
|
|
|
|
|
width:"10%",
|
|
|
|
|
className:"color-grey-6",
|
|
|
|
|
render: (invite_code, record, index) => {
|
|
|
|
|
return invite_code
|
|
|
|
|
}
|
|
|
|
|
} : {
|
|
|
|
|
title: '你当前所在分班',
|
|
|
|
|
dataIndex: 'group',
|
|
|
|
|
key: 'group',
|
|
|
|
|
align:'center',
|
|
|
|
|
width:"20%",
|
|
|
|
|
className:"color-grey-6",
|
|
|
|
|
render: (invite_code, record, index) => {
|
|
|
|
|
return props.current_group_id == record.id && <Badge status="processing" text="" />
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
columns.push( aCol );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
columns.push({
|
|
|
|
|
title: '操作',
|
|
|
|
|
dataIndex: 'setting',
|
|
|
|
|
key: 'setting',
|
|
|
|
@ -124,15 +128,15 @@ function CourseGroupListTable(props) {
|
|
|
|
|
className:"color-grey-6",
|
|
|
|
|
render: (none, record, index) => {
|
|
|
|
|
return <React.Fragment>
|
|
|
|
|
{!isCourseEnd && isAdmin && <WordsBtn style2={{ marginRight: '12px' }} onClick={() => onDelete(record)} style={'grey'}>删除</WordsBtn>}
|
|
|
|
|
{!isCourseEnd && isAdmin && <WordsBtn style2={{ marginRight: '12px' }} onClick={() => onDelete(record)} style={'grey'}>删除分班</WordsBtn>}
|
|
|
|
|
{isAdmin && <WordsBtn style2={{ marginRight: '12px' }} data-clipboard-text={record.invite_code}
|
|
|
|
|
className={`copyBtn_${record.id}`} style={''}>复制邀请码</WordsBtn> }
|
|
|
|
|
{isStudent && <WordsBtn style2={{ marginRight: '12px' }} onClick={() => addToDir(record)} style={''}>加入分班</WordsBtn>}
|
|
|
|
|
<WordsBtn style2={{ marginRight: '12px' }} onClick={() => onGoDetail(record)} style={''}>查看</WordsBtn>
|
|
|
|
|
</React.Fragment>
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
return columns
|
|
|
|
|
}
|
|
|
|
|
const addToDir = async (record) => {
|
|
|
|
@ -180,6 +184,8 @@ function CourseGroupListTable(props) {
|
|
|
|
|
const isAdmin = props.isAdmin();
|
|
|
|
|
const isSuperAdmin = props.isSuperAdmin();
|
|
|
|
|
const isStudent = props.isStudent()
|
|
|
|
|
const isNotMember = props.isNotMember()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const isParent = true;
|
|
|
|
|
const isCourseEnd= props.isCourseEnd();
|
|
|
|
|