isnotmemeber

dev_hjm_a
hjm 5 years ago
parent 2b1b067fd3
commit 3eb64ca02e

@ -137,7 +137,7 @@ function CourseGroupList(props) {
searchValue={ searchValue }
onInputSearchChange={onInputSearchChange}
showSearchInput={total_count >= 10}
searchPlaceholder={ '请输入名称进行搜索' }
searchPlaceholder={ '请输入分班名称进行搜索' }
firstRowRight={
<React.Fragment>
{ // pageType !== TYPE_STUDENTS &&
@ -182,6 +182,9 @@ function CourseGroupList(props) {
.dividerStyle.ant-divider-horizontal{
margin: 0px;
}
.courseGroupList .ant-table-tbody tr:last-child td {
border-bottom: none;
}
`}</style>
{ isAdmin &&
<li className="li_line drop_down fr color-blue font-16">
@ -207,17 +210,28 @@ function CourseGroupList(props) {
onPressEnter={onPressEnter}
></Titlesearchsection>
<div className="mt20 edu-back-white padding20 courseGroupList">
<div className="mt20 edu-back-white padding20-30 ">
<span>未分班</span>
<span style={{color: '#999999'}}>{none_group_member_count}个学生</span>
<WordsBtn style="blue" className="fr "
onClick={() => {props.history.push(`/courses/${courseId}/course_groups/0`)}}>查看</WordsBtn>
</div>
<Spin size="large" spinning={isSpin}>
{course_groups && !!course_groups.length ? <CourseGroupListTable
{course_groups && !!course_groups.length ?
<div className="mt20 edu-back-white padding20 courseGroupList">
<CourseGroupListTable
course_groups={course_groups}
onOperationSuccess={onOperationSuccess}
current_group_id={current_group_id}
{...props}
></CourseGroupListTable> :
></CourseGroupListTable>
</div>:
<NoneData></NoneData>}
</Spin>
</div>
</React.Fragment>
)
}

@ -93,8 +93,9 @@ function CourseGroupListTable(props) {
render: (member_manager, record, index) => {
return member_manager
}
},
isAdmin ? {
}];
if (!isNotMember) {
const aCol = (isAdmin ? {
title: '邀请码',
dataIndex: 'invite_code',
key: 'invite_code',
@ -114,8 +115,11 @@ function CourseGroupListTable(props) {
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();

Loading…
Cancel
Save