杨树林 6 years ago
commit d41de4196d

@ -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: <Tooltip title="仅能批阅指定分班的作品">管理权限</Tooltip>,
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,

@ -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

@ -38,7 +38,7 @@ export default class TpmQuestionEdit extends Component {
<span className="mr30 color-orange pt10">*</span>
<div className="flex1 mr20">
<TPMMDEditor ref={this.props.neweditanswerRef} placeholder="请输入选择题的题干内容" mdID={'editquestioMDid'} refreshTimeout={1500}
watch={true} className="courseMessageMD" initValue={this.props.neweditanswerRefval}></TPMMDEditor>
needRecreate={true} watch={true} className="courseMessageMD" initValue={this.props.neweditanswerRefval}></TPMMDEditor>
</div>

Loading…
Cancel
Save