parent
e4ec0cc0a2
commit
7d6658f72d
@ -0,0 +1,117 @@
|
|||||||
|
import React, { useState, useEffect } from 'react'
|
||||||
|
|
||||||
|
import { Input,Checkbox,Table, Pagination, Modal,Menu ,Spin, Tooltip , Divider, Popconfirm } from "antd";
|
||||||
|
|
||||||
|
import { WordsBtn, trigger, on, off, getUrl, downloadFile , sortDirections } from 'educoder'
|
||||||
|
/**
|
||||||
|
角色数组, CREATOR: 创建者, PROFESSOR: 教师, ASSISTANT_PROFESSOR: 助教, STUDENT: 学生
|
||||||
|
course_members_count: 0
|
||||||
|
id: 2441
|
||||||
|
invite_code: "WUNX9K"
|
||||||
|
member_manager: "全部教师"
|
||||||
|
name: "e'e'e"
|
||||||
|
*/
|
||||||
|
function buildColumns() {
|
||||||
|
const columns=[{
|
||||||
|
title: '序号',
|
||||||
|
dataIndex: 'id',
|
||||||
|
key: 'id',
|
||||||
|
align:'center',
|
||||||
|
width:"10%",
|
||||||
|
className:"color-grey-6",
|
||||||
|
render: (id, record, index) => {
|
||||||
|
return index + 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '分班名称',
|
||||||
|
dataIndex: 'name',
|
||||||
|
key: 'name',
|
||||||
|
align:'center',
|
||||||
|
width:"20%",
|
||||||
|
className:"color-grey-6",
|
||||||
|
render: (name, record, index) => {
|
||||||
|
return name
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
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: 'course_members_count',
|
||||||
|
key: 'course_members_count',
|
||||||
|
align:'center',
|
||||||
|
width:"10%",
|
||||||
|
className:"color-grey-6",
|
||||||
|
render: (course_members_count, record, index) => {
|
||||||
|
return course_members_count
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '管理教师',
|
||||||
|
dataIndex: 'member_manager',
|
||||||
|
key: 'member_manager',
|
||||||
|
align:'center',
|
||||||
|
width:"25%",
|
||||||
|
className:"color-grey-6",
|
||||||
|
render: (member_manager, record, index) => {
|
||||||
|
return member_manager
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
dataIndex: 'setting',
|
||||||
|
key: 'setting',
|
||||||
|
align:'center',
|
||||||
|
width:"25%",
|
||||||
|
className:"color-grey-6",
|
||||||
|
render: (none, record, index) => {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
},
|
||||||
|
]
|
||||||
|
return columns
|
||||||
|
}
|
||||||
|
function CourseGroupListTable(props) {
|
||||||
|
const [serachValue, setSerachValue] = useState('')
|
||||||
|
|
||||||
|
const courseId = props.match.params.coursesId
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
|
||||||
|
}, [])
|
||||||
|
|
||||||
|
const onConfirm = async () => {
|
||||||
|
}
|
||||||
|
|
||||||
|
function deleteDir() {
|
||||||
|
|
||||||
|
}
|
||||||
|
const isAdmin = true;
|
||||||
|
const isSuperAdmin = true;
|
||||||
|
const isParent = true;
|
||||||
|
const searchValue = '';
|
||||||
|
const isCourseEnd= '';
|
||||||
|
const course_group_id= '';
|
||||||
|
|
||||||
|
|
||||||
|
const course_groups = props.course_groups
|
||||||
|
const columns = buildColumns()
|
||||||
|
return (
|
||||||
|
<React.Fragment>
|
||||||
|
{/* onChange={onTableChange} */}
|
||||||
|
<Table columns={columns} dataSource={course_groups} pagination={false}></Table>
|
||||||
|
|
||||||
|
</React.Fragment>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
export default CourseGroupListTable
|
Loading…
Reference in new issue