Merge branch 'dev_hjm_a' into dev_aliyun

dev_ec
hjm 5 years ago
commit d9b62b05fe

@ -92,6 +92,10 @@ html, body {
.formItemInline .ant-form-item-control-wrapper {
flex: 1;
}
/* AutoComplete placeholder 不显示的问题 */
.ant-select-auto-complete.ant-select .ant-select-selection__placeholder {
z-index: 2;
}
/* 兼容性 */

@ -110,7 +110,7 @@ class CommentItemMDEditor extends Component {
<img alt="0?1442652658" height="33" src={`/images/${user.image_url}`} width="33"></img>
</a>
</div>
<div id={`reply_message_${item.id}`} className="reply_to_message commentItemMDEditor"
<div id={`reply_message_${item.id}`} className="reply_to_message commentItemMDEditor editormd-image-click-expand"
style={{ paddingTop: '0px', paddingBottom: '0px', marginTop: '36px' }}
>
<div id={`reply_message_editorMd_${item.id}`} className="editorMD" style={{ marginBottom: '0px'}}>

@ -116,6 +116,7 @@ class Boards extends Component{
this.setState({
isSpin:true
})
this.clearAllCheck()
this.fetchAll(null, 1)
}
}

@ -1,5 +1,5 @@
import React,{ Component } from "react";
import { Modal,Input, Checkbox} from "antd";
import { Modal,Input, Checkbox, Spin} from "antd";
import '../css/members.css'
class ModalWrapper extends Component{
@ -23,7 +23,7 @@ class ModalWrapper extends Component{
}
render(){
let {flag, visible}=this.state
let { onOk, cancelText, okText, title, width, className, bottomRender}=this.props;
let { onOk, cancelText, okText, title, width, className, bottomRender, loading}=this.props;
return(
<Modal
@ -48,6 +48,7 @@ class ModalWrapper extends Component{
}
</style>:""
}
<Spin spinning={!!this.props.loading}>
<div className="newupload_conbox clearfix">
{this.props.children}
{this.props.checkBoxValuestype===true?<div className={"mt10 color-red"}>
@ -59,6 +60,7 @@ class ModalWrapper extends Component{
</div>
{ bottomRender }
</div>
</Spin>
</Modal>
)
}

@ -209,7 +209,7 @@ class GraduationTasksappraiseMainEditor extends Component{
`}</style>
{this.props.title && <span className="mainEditorTitle color-grey-6">{this.props.title}</span>}
<TPMMDEditor ref={this.mdRef} mdID={'appraiseEditor'} placeholder={placeholder || "请在此输入对本作品的评语最大限制2000个字符"}
watch={false} height={160} className={errorMessage ? 'editorInputError' : ''}></TPMMDEditor>
watch={false} height={160} className={errorMessage ? 'editorInputError' : ''} imageExpand={true}></TPMMDEditor>
{ showSameScore == true && <div>
<Checkbox checked={same_score} onChange={this.same_score_change}>整组同评</Checkbox>
<span className={"font-14 color-grey-9"}>(选中则本次评阅对象指小组全部成员否则仅评阅此成员1人 )</span>

@ -68,7 +68,7 @@ class AddStudentModal extends Component{
if (response.data.course_groups && response.data.course_groups.length) {
this.setState({
course_groups: response.data.course_groups,
courseGroup: response.data.course_groups[0].id
courseGroup: '0' // response.data.course_groups[0].id
})
} else {
// showNotification('')
@ -268,6 +268,7 @@ class AddStudentModal extends Component{
{course_groups && course_groups.length && <div className="df" style={{ marginTop: '12px' }} >
<span className="mr10" style={{ width: '148px' }}>所选学生分班至(选填):</span>
<Select style={{ width: 236 }} onChange={this.handleCourseGroupChange} value={courseGroup}>
<Option value={'0'}>{'未分班'}</Option>
{ course_groups.map((item) => {
return <Option value={item.id}>{item.name}</Option>
})}

@ -270,12 +270,13 @@ class studentsList extends Component{
addStudentSuccessListener=(e, data)=>{
const params = JSON.parse(data)
this.props.updataleftNavfun()
const course_group_id = this.props.match.params.course_group_id
const coursesId = this.props.match.params.coursesId
if (params.course_group_id == course_group_id) {
this.fetchAll(1)
} else {
this.props.history.push(`/courses/${coursesId}/course_groups/${params.course_group_id}`)
this.props.history.push(`/courses/${coursesId}/course_groups/${params.course_group_id || '0'}`)
}
// console.log('addStudentSuccessListener', data)
}
@ -465,6 +466,7 @@ class studentsList extends Component{
}).then((result)=>{
if (result.data.status == 0) {
this.props.showNotification('删除成功')
this.props.updataleftNavfun()
this.fetchAll()
this.setState({checkBoxValues: []})
trigger('updatabanner')

@ -1,5 +1,5 @@
import React, { Component } from "react";
import { Modal } from "antd";
import { Spin } from "antd";
import axios from 'axios'
import ModalWrapper from "../../courses/common/ModalWrapper"
import { Cropper, getUrl } from 'educoder'
@ -13,7 +13,7 @@ class ChangeHeaderPicModal extends Component{
constructor(props){
super(props);
this.state={
uploading: false
}
}
init = () => {
@ -85,12 +85,23 @@ class ChangeHeaderPicModal extends Component{
}
onOk = () => {
if (this.state.uploading == true) return;
if (this.fileUploaded != true) {
this.props.showNotification("请先上传图片")
return;
}
console.log(new Date().getTime())
this.setState({ uploading: true }, () => {
window.setTimeout(() => {
console.log(new Date().getTime())
this._onOk()
}, 10)
})
}
_onOk = () => {
var img_lg = document.getElementById(previewId);
// https://github.com/niklasvh/html2canvas/issues/1908
// 截图小的显示框内的内容
@ -115,9 +126,12 @@ class ChangeHeaderPicModal extends Component{
} else {
this.doAfterUpdated();
}
this.setState({ uploading: false })
}
})
.catch(function (error) {
this.setState({ uploading: false })
console.log(error);
});
});
@ -142,6 +156,8 @@ class ChangeHeaderPicModal extends Component{
okText="保存"
width={552}
className="changeHeaderModal"
loading={this.state.uploading}
onCancel={() => this.setState({ uploading: false })}
>
<style>{`
#changeHeader_imagePreview {

Loading…
Cancel
Save