From 3eb64ca02e166d629ca9d05ce250a0e1966dca7f Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Mon, 14 Oct 2019 17:02:26 +0800 Subject: [PATCH] isnotmemeber --- .../courses/members/CourseGroupList.js | 34 +++++++---- .../courses/members/CourseGroupListTable.js | 58 ++++++++++--------- 2 files changed, 56 insertions(+), 36 deletions(-) diff --git a/public/react/src/modules/courses/members/CourseGroupList.js b/public/react/src/modules/courses/members/CourseGroupList.js index 07a24f318..ec0b23fb3 100644 --- a/public/react/src/modules/courses/members/CourseGroupList.js +++ b/public/react/src/modules/courses/members/CourseGroupList.js @@ -137,7 +137,7 @@ function CourseGroupList(props) { searchValue={ searchValue } onInputSearchChange={onInputSearchChange} showSearchInput={total_count >= 10} - searchPlaceholder={ '请输入名称进行搜索' } + searchPlaceholder={ '请输入分班名称进行搜索' } firstRowRight={ { // pageType !== TYPE_STUDENTS && @@ -177,10 +177,13 @@ function CourseGroupList(props) { padding-bottom: 8px; } .drop_down_menu .drop_down_btn{ - border-top:none; + border-top:none; } .dividerStyle.ant-divider-horizontal{ - margin: 0px; + margin: 0px; + } + .courseGroupList .ant-table-tbody tr:last-child td { + border-bottom: none; } `} { isAdmin && @@ -207,17 +210,28 @@ function CourseGroupList(props) { onPressEnter={onPressEnter} > -
- - {course_groups && !!course_groups.length ? + 未分班: + {none_group_member_count}个学生 + + {props.history.push(`/courses/${courseId}/course_groups/0`)}}>查看 +
+ + + {course_groups && !!course_groups.length ? +
+ + : - } - -
+ > + + : + } +
) } diff --git a/public/react/src/modules/courses/members/CourseGroupListTable.js b/public/react/src/modules/courses/members/CourseGroupListTable.js index 779e40f5e..f1dd3aafd 100644 --- a/public/react/src/modules/courses/members/CourseGroupListTable.js +++ b/public/react/src/modules/courses/members/CourseGroupListTable.js @@ -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 && - } - }, - { + }]; + 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 && + } + }) + 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 - {!isCourseEnd && isAdmin && onDelete(record)} style={'grey'}>删除} + {!isCourseEnd && isAdmin && onDelete(record)} style={'grey'}>删除分班} {isAdmin && 复制邀请码 } {isStudent && addToDir(record)} style={''}>加入分班} onGoDetail(record)} style={''}>查看 } - }, - ] + }) + 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();