From 340c4ec12a8c165dcf0831bdbfe844441b14a9e2 Mon Sep 17 00:00:00 2001
From: hjm <63528605@qq.com>
Date: Wed, 17 Jul 2019 17:25:37 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E6=95=99=E5=B8=88=E5=88=97=E8=A1=A8?=
=?UTF-8?q?=E7=9A=84=E5=BE=85=E5=AE=A1=E6=89=B9=E5=88=97=E8=A1=A8=E4=B8=8D?=
=?UTF-8?q?=E5=BA=94=E8=AF=A5=E6=98=BE=E7=A4=BA=E2=80=9C=E7=AE=A1=E7=90=86?=
=?UTF-8?q?=E6=9D=83=E9=99=90=E2=80=9D=E6=93=8D=E4=BD=9C=E5=88=97?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/react/src/modules/courses/members/teacherList.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/public/react/src/modules/courses/members/teacherList.js b/public/react/src/modules/courses/members/teacherList.js
index d2c495ddd..7e0b659e4 100644
--- a/public/react/src/modules/courses/members/teacherList.js
+++ b/public/react/src/modules/courses/members/teacherList.js
@@ -78,7 +78,7 @@ function buildColumns(that) {
sortOrder: sortedInfo.columnKey === 'role' && sortedInfo.order,
}]
- that.state.course_groups && that.state.course_groups.length && columns.push({
+ that.state.course_groups && that.state.course_groups.length && showSorter && columns.push({
title: 管理权限,
width: 260,
key: 'course_groups',
@@ -111,7 +111,7 @@ function buildColumns(that) {
,
});
const hasGraduationModule = that.hasGraduationModule()
- if (hasGraduationModule) {
+ if (hasGraduationModule && showSorter) {
columns.push({
title: '答辩组',
// width: 90,
From 4f3161fe689c9966596fb4e7ffe0ef3ae2b8ea1c Mon Sep 17 00:00:00 2001
From: hjm <63528605@qq.com>
Date: Wed, 17 Jul 2019 17:44:03 +0800
Subject: [PATCH 2/2] needRecreate
---
.../src/modules/tpm/challengesnew/TPMMDEditor.js | 11 ++++++++---
.../src/modules/tpm/challengesnew/TpmQuestionEdit.js | 2 +-
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/public/react/src/modules/tpm/challengesnew/TPMMDEditor.js b/public/react/src/modules/tpm/challengesnew/TPMMDEditor.js
index 93f50d704..19d819afe 100644
--- a/public/react/src/modules/tpm/challengesnew/TPMMDEditor.js
+++ b/public/react/src/modules/tpm/challengesnew/TPMMDEditor.js
@@ -229,13 +229,18 @@ export default class TPMMDEditor extends Component {
// 创建editorMd
let react_id = `react_${_id}`;
window[react_id] = this
- const answers_editormd = create_editorMD(_id, '100%', this.props.height, _placeholder, imageUrl, (__editorName) => {
+ const answers_editormd = create_editorMD(_id, '100%', this.props.height, _placeholder, imageUrl, (_editorName) => {
+ const __editorName = _editorName;
react_id = `react_${__editorName.id}`;
const that = window[react_id]
setTimeout(() => {
+ if (that.props.needRecreate == true) {
+ __editorName.recreate()
+ } else {
+ __editorName.resize()
+ }
console.log('timeout', __editorName.id)
- __editorName.resize()
__editorName.cm && __editorName.cm.refresh()
}, that.props.refreshTimeout || 500)
if (that.props.initValue != undefined && that.props.initValue != '') {
@@ -258,7 +263,7 @@ export default class TPMMDEditor extends Component {
that.props.onCMBeforeChange(cm,change)
})
that.answers_editormd = __editorName;
- window[_id] = __editorName;
+ window[__editorName.id+'_'] = __editorName;
}, initValue, this.onEditorChange,this.props.watch, {
noStorage: this.props.noStorage,
showNullButton: this.props.showNullButton
diff --git a/public/react/src/modules/tpm/challengesnew/TpmQuestionEdit.js b/public/react/src/modules/tpm/challengesnew/TpmQuestionEdit.js
index a037e62dc..99abbfafa 100644
--- a/public/react/src/modules/tpm/challengesnew/TpmQuestionEdit.js
+++ b/public/react/src/modules/tpm/challengesnew/TpmQuestionEdit.js
@@ -38,7 +38,7 @@ export default class TpmQuestionEdit extends Component {
*
+ needRecreate={true} watch={true} className="courseMessageMD" initValue={this.props.neweditanswerRefval}>