From 1a8d0378aaef0c6d2a0633eba73badb81859bd98 Mon Sep 17 00:00:00 2001
From: hjm <63528605@qq.com>
Date: Fri, 11 Oct 2019 15:03:00 +0800
Subject: [PATCH] no message
---
.../src/modules/courses/ListPageIndex.js | 8 +-
.../courses/members/CourseGroupList.js | 189 ++++++++++++++++++
2 files changed, 196 insertions(+), 1 deletion(-)
create mode 100644 public/react/src/modules/courses/members/CourseGroupList.js
diff --git a/public/react/src/modules/courses/ListPageIndex.js b/public/react/src/modules/courses/ListPageIndex.js
index 730a1bdce..8c5652838 100644
--- a/public/react/src/modules/courses/ListPageIndex.js
+++ b/public/react/src/modules/courses/ListPageIndex.js
@@ -33,6 +33,12 @@ const StudentsList= Loadable({
loader: () => import('./members/studentsList'),
loading: Loading,
});
+//分班列表
+const CourseGroupList= Loadable({
+ loader: () => import('./members/CourseGroupList'),
+ loading: Loading,
+});
+
const Eduinforms= Loadable({
loader: () => import('./gradinforms/Eduinforms.js'),
loading: Loading,
@@ -234,7 +240,7 @@ class ListPageIndex extends Component{
>
()
+ (props) => ()
}
>
diff --git a/public/react/src/modules/courses/members/CourseGroupList.js b/public/react/src/modules/courses/members/CourseGroupList.js
new file mode 100644
index 000000000..26a1abda3
--- /dev/null
+++ b/public/react/src/modules/courses/members/CourseGroupList.js
@@ -0,0 +1,189 @@
+// 分班列表 加入分班
+
+import React, { useState, useEffect } from 'react'
+
+import { Input,Checkbox,Table, Pagination, Modal,Menu ,Spin, Tooltip , Divider, Popconfirm } from "antd";
+import ClipboardJS from 'clipboard'
+import axios from 'axios'
+import _ from 'lodash'
+
+import '../css/Courses.css'
+import '../css/members.css'
+
+import CourseLayoutcomponent from '../common/CourseLayoutComponent'
+import Titlesearchsection from '../common/titleSearch/TitleSearchSection'
+import ColorCountText from '../common/titleSearch/ColorCountText'
+
+import { WordsBtn, trigger, on, off, getUrl, downloadFile , sortDirections } from 'educoder'
+import Modals from "../../modals/Modals";
+import NoneData from "../coursesPublic/NoneData"
+import DownloadMessageysl from "../../modals/DownloadMessageysl";
+import CreateGroupByImportModal from './modal/CreateGroupByImportModal'
+import ChangeRolePop from './ChangeRolePop'
+/**
+ 角色数组, CREATOR: 创建者, PROFESSOR: 教师, ASSISTANT_PROFESSOR: 助教, STUDENT: 学生
+*/
+function CourseGroupList(props) {
+ const [checkBoxRoles, setCheckBoxRoles] = useState()
+
+ const courseId = props.match.params.coursesId
+
+ useEffect(() => {
+ fetchAll()
+ }, [])
+ function fetchAll() {
+ const url = `/courses/${courseId}/course_groups.json`
+ }
+ const onConfirm = async () => {
+ }
+
+ function createGroupImportSuccess() {
+
+ }
+ function addDir() {
+
+ }
+ function deleteDir() {
+
+ }
+ function onPressEnter() {
+
+ }
+ function onInputSearchChange() {
+
+ }
+ function onInputSearchChange() {
+
+ }
+ function Downloadcal() {
+
+ }
+ const confirmysl = (url) => {
+ axios.get(url + 'export=true').then((response) => {
+ if(response === undefined){
+ return
+ }
+ if(response.data.status&&response.data.status===-1){
+
+ }else if(response.data.status&&response.data.status===-2){
+ if(response.data.message === "100"){
+ // 已超出文件导出的上限数量(100 ),建议:
+
+ this.setState({
+ DownloadType:true,
+ DownloadMessageval:100
+ })
+ }else {
+ //因附件资料超过500M
+ this.setState({
+ DownloadType:true,
+ DownloadMessageval:500
+ })
+ }
+ }else {
+ props.slowDownload(url)
+ }
+ }).catch((error) => {
+ console.log(error)
+ });
+ }
+
+ const isAdmin = true;
+ const isSuperAdmin = true;
+ const isParent = true;
+ const searchValue = '';
+ const isCourseEnd= '';
+ const course_group_id= '';
+
+ const DownloadMessageval= '';
+ const DownloadType= '';
+ const total_count = 9
+
+ let exportUrl = `/courses/${courseId}/export_member_scores_excel.xlsx?`; //总成绩
+ let exportUrltwo = `/courses/${courseId}/export_couser_info.xlsx?`; //课堂信息
+ let exportUrlthree = `/courses/${courseId}/export_member_act_score.xlsx?`; //活跃度
+ return (
+
+
+ = 10}
+ searchPlaceholder={ '请输入姓名、学号进行搜索' }
+ firstRowRight={
+
+ { // pageType !== TYPE_STUDENTS &&
+ isSuperAdmin &&
+ {/* ref="createGroupByImportModal" */}
+
+ {/* this.refs['createGroupByImportModal'].setVisible(true) */}
+ {}}>导入创建分班
+ }
+ {
+ // pageType !== TYPE_STUDENTS &&
+ !isCourseEnd && isAdmin && isParent && addDir()}>添加分班 }
+ {
+ isAdmin && !isParent && course_group_id != 0 && deleteDir()}>删除分班 }
+ {/* {
+ isAdmin && !isParent && course_group_id != 0 && this.renameDir()}>分班重命名 } */}
+
+ { isAdmin &&
+
+ 导出
+
+
+ }
+
+ }
+ secondRowLeft={
+ total_count ? : ''
+ }
+ onPressEnter={onPressEnter}
+ >
+
+ )
+}
+export default CourseGroupList
\ No newline at end of file