From 2308454f427f266269afac7d73fee69724ff470c Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Mon, 8 Jul 2019 16:49:36 +0800 Subject: [PATCH 01/10] del --- .../react/src/modules/tpm/challengesnew/TPManswer2.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/public/react/src/modules/tpm/challengesnew/TPManswer2.js b/public/react/src/modules/tpm/challengesnew/TPManswer2.js index 98c615065..b5e1b43a6 100644 --- a/public/react/src/modules/tpm/challengesnew/TPManswer2.js +++ b/public/react/src/modules/tpm/challengesnew/TPManswer2.js @@ -195,10 +195,10 @@ export default class TPManswer extends Component { this.setState({ answers: newAnswers}) } answerOnChange = (val, index) => { - // if (!this.state.answers[index]) { - // // 1、2、3删除2会走到这里 - // return; - // } + if (!this.state.answers[index]) { + // 1、2、3删除2会走到这里 + return; + } const newAnswer = Object.assign({}, this.state.answers[index]) newAnswer.contents = val const newAnswers = this.state.answers.slice(0) @@ -314,7 +314,7 @@ export default class TPManswer extends Component { { answers.map((answer, index) => { - return
From 10ac320117a58c79a9fdfdab80bbfdbb1eb32e59 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Tue, 9 Jul 2019 11:01:28 +0800
Subject: [PATCH 08/10] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/react/package.json | 3 ---
public/react/src/modules/courses/Resource/Fileslistitem.js | 1 -
.../src/modules/courses/shixunHomework/ShixunStudentWork.js | 1 -
.../src/modules/courses/shixunHomework/ShixunWorkReport.js | 1 -
.../src/modules/courses/shixunHomework/Trainingjobsetting.js | 1 -
.../modules/courses/shixunHomework/Workquestionandanswer.js | 1 -
6 files changed, 8 deletions(-)
diff --git a/public/react/package.json b/public/react/package.json
index d2b6a23ea..e0989f47c 100644
--- a/public/react/package.json
+++ b/public/react/package.json
@@ -42,8 +42,6 @@
"immutability-helper": "^2.6.6",
"install": "^0.12.2",
"jest": "20.0.4",
- "js-base64": "^2.5.1",
- "js-file-download": "^0.4.7",
"lodash": "^4.17.5",
"loglevel": "^1.6.1",
"material-ui": "^1.0.0-beta.40",
@@ -165,7 +163,6 @@
"babel-plugin-import": "^1.11.0",
"concat": "^1.0.3",
"happypack": "^5.0.1",
- "videojs-for-react": "^0.0.3",
"webpack-bundle-analyzer": "^3.0.3",
"webpack-parallel-uglify-plugin": "^1.1.0"
}
diff --git a/public/react/src/modules/courses/Resource/Fileslistitem.js b/public/react/src/modules/courses/Resource/Fileslistitem.js
index 8a8ff674c..c3998700f 100644
--- a/public/react/src/modules/courses/Resource/Fileslistitem.js
+++ b/public/react/src/modules/courses/Resource/Fileslistitem.js
@@ -6,7 +6,6 @@ import {getImageUrl} from 'educoder';
import axios from 'axios'
import {getUrl} from 'educoder';
import moment from 'moment'
-import { Base64 } from 'js-base64';
import CoursesListType from '../coursesPublic/CoursesListType';
import Showoldfiles from "../coursesPublic/Showoldfiles";
import Modals from '../../modals/Modals';
diff --git a/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js b/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js
index 90bc23d99..879f90cc7 100644
--- a/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js
+++ b/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js
@@ -33,7 +33,6 @@ import '../css/Courses.css'
import './style.css'
import moment from 'moment';
import 'moment/locale/zh-cn';
-import {Base64} from 'js-base64';
const Search = Input.Search;
const CheckboxGroup = Checkbox.Group;
diff --git a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js
index fc34e0667..9a331cdef 100644
--- a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js
+++ b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js
@@ -20,7 +20,6 @@ import '../css/Courses.css';
import './style.css';
import moment from 'moment';
import 'moment/locale/zh-cn';
-import {Base64} from 'js-base64';
class ShixunWorkReport extends Component {
diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js
index 51b491861..06c4dfba2 100644
--- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js
+++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js
@@ -4,7 +4,6 @@ import HomeworkModal from "../coursesPublic/HomeworkModal";
import {WordsBtn, ActionBtn, handleDateString} from 'educoder';
import PollDetailTabForthRules from '../poll/PollDetailTabForthRules';
import ShixunWorkModal from './Shixunworkdetails/ShixunWorkModal';
-import {Base64} from 'js-base64';
import {
Button,
Checkbox,
diff --git a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js
index 5cb496847..9616eae58 100644
--- a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js
+++ b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js
@@ -23,7 +23,6 @@ import {
import {Link, Switch, Route, Redirect} from 'react-router-dom';
import moment from 'moment';
import 'moment/locale/zh-cn';
-import {Base64} from 'js-base64';
import axios from 'axios';
import '../css/members.css'
import "../common/formCommon.css"
From b7e2556aaea15193dfc9259d3fa73ed236df7660 Mon Sep 17 00:00:00 2001
From: hjm <63528605@qq.com>
Date: Tue, 9 Jul 2019 14:00:37 +0800
Subject: [PATCH 09/10] =?UTF-8?q?=E5=B7=B2=E5=AE=A1=E6=89=B9=E5=BE=85?=
=?UTF-8?q?=E5=AE=A1=E6=89=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../modules/courses/members/teacherList.js | 118 +++++++++++++++---
1 file changed, 98 insertions(+), 20 deletions(-)
diff --git a/public/react/src/modules/courses/members/teacherList.js b/public/react/src/modules/courses/members/teacherList.js
index 2c5108f8d..18915f20c 100644
--- a/public/react/src/modules/courses/members/teacherList.js
+++ b/public/react/src/modules/courses/members/teacherList.js
@@ -1,5 +1,5 @@
import React,{ Component } from "react";
-import { Input,Checkbox,Table, Divider, Tooltip,Spin } from "antd";
+import { Input,Checkbox,Table, Divider, Tooltip,Spin, Menu } from "antd";
import CourseLayoutcomponent from '../common/CourseLayoutComponent'
@@ -27,11 +27,14 @@ const ROLE_ADMIN = "管理员"
const ROLE_TEACHER = "教师"
const ROLE_TEACHER_ASSISTANT = "助教"
const pageSize = 20;
+
function buildColumns(that) {
+ let sortedInfo = that.state.sortedInfo || {}
const isAdmin = that.props.isAdmin()
const isAdminOrCreator = that.props.isAdminOrCreator();
const isAdminOrTeacher = that.props.isAdminOrTeacher()
- const { course_groups } = that.state
+ const { course_groups, filterKey } = that.state
+ const showSorter = filterKey == '1'
const columns = [{
title: '序号',
dataIndex: 'name',
@@ -55,6 +58,8 @@ function buildColumns(that) {
dataIndex: 'name',
width: 120,
key: 'name',
+ sorter: showSorter,
+ sortOrder: sortedInfo.columnKey === 'name' && sortedInfo.order,
render: (name, record) => {
return 4 ? name : ''}`}>{name}
@@ -63,6 +68,11 @@ function buildColumns(that) {
title: '角色',
dataIndex: 'role',
key: 'role',
+ sorter: showSorter,
+ // 'ascend' | 'descend'
+ defaultSortOrder: 'ascend',
+ sortOrder: sortedInfo.columnKey === 'role' && sortedInfo.order,
+
}]
that.state.course_groups && that.state.course_groups.length && columns.push({
title: