Merge branch 'topic_bank' of https://bdgit.educoder.net/Hjqreturn/educoder into topic_bank

dev_aliyun_beta
杨树林 5 years ago
commit 333c1bb10c

@ -254,7 +254,6 @@ class NewWorkForm extends Component{
base_on_project_change = () => {
this.setState({ base_on_project: !this.state.base_on_project })
}
render(){
let {typeId,coursesId,pageType}=this.props.match.params;
const { getFieldDecorator } = this.props.form;
@ -370,6 +369,18 @@ class NewWorkForm extends Component{
display: inline-block;
border-bottom: 1px solid #EDEDED;
}
.courseForm .AboutInputForm.clearPaddingBottom{
padding-bottom:0px!important;
}
.clearPaddingBottom .ant-form-explain{
position:absolute;
bottom:0px;
left:0px
}
.resetNewWorkUpload{
border-bottom:none!important;
}
`}</style>
@ -380,7 +391,9 @@ class NewWorkForm extends Component{
>
{getFieldDecorator('description', {
rules: [{
required: true, message: '请输入作业内容和要求'
required: true, message: '请输入作业内容和要求',
},{
max: 5000 , message:'最大限制5000个字符'
}],
})(
<TPMMDEditor ref={this.contentMdRef} placeholder="请在此输入作业内容和要求,最大限制5000个字符" mdID={'courseContentMD'} refreshTimeout={1500}
@ -436,26 +449,28 @@ class NewWorkForm extends Component{
)}
</Form.Item>
}
<Form.Item
label="参考答案"
className="AboutInputForm"
style={{"borderBottom":"none"}}
>
{getFieldDecorator('reference_answer', {
rules: [{
required: false
}],
})(
<TPMMDEditor ref={this.answerMdRef} placeholder="请在此输入作业的参考答案,最大限制5000个字符" mdID={'workAnswerMD'}
className="courseMessageMD" refreshTimeout={1500} initValue={this.state.reference_answer || ''}></TPMMDEditor>
)}
<Upload {...answerUploadProps} className="upload_1">
<div className="edu-back-white">
<Form.Item
label="参考答案"
className="AboutInputForm clearPaddingBottom pr"
style={{"borderBottom":"none"}}
>
{getFieldDecorator('reference_answer', {
rules: [{
max: 5000 , message:'最大限制5000个字符'
}],
})(
<TPMMDEditor ref={this.answerMdRef} placeholder="请在此输入作业的参考答案,最大限制5000个字符" mdID={'workAnswerMD'}
className="courseMessageMD" refreshTimeout={1500} initValue={this.state.reference_answer || ''}></TPMMDEditor>
)}
</Form.Item>
<Upload {...answerUploadProps} className="upload_1 newWorkUpload resetNewWorkUpload">
<Button className="uploadBtn">
<Icon type="upload" /> 上传附件
</Button>
(单个文件150M以内)
</Upload>
</Form.Item>
</div>
<Form.Item>
<div className="clearfix mt30 mb30">
{/* htmlType="submit" */}

@ -290,6 +290,13 @@ class GraduationTasksedit extends Component{
shixunsreplace:false,
})
}
checkContent = (rule, value, callback) => {
if(value.length>5000){
callback('最大限制为5000个字符');
}else{
callback();
}
}
render(){
const { getFieldDecorator } = this.props.form;
let {title_num,pageType,name,description,Loadtype,attachments,fileList,
@ -437,9 +444,9 @@ class GraduationTasksedit extends Component{
>
{getFieldDecorator('description', {
rules: [{
required: true, message: '请输入帖子内容',
}, {
max: 10000, message: '最大限制为10000个字符',
required: true, message: '请输入内容',
},{
max:5000,message:'最大限制5000个字符'
}],
})(
<TPMMDEditor ref={this.mdRef} placeholder={'请输入任务内容说明最大限制5000个字符'} {...this.state} {...this.props}

@ -266,6 +266,18 @@ class GraduationTasksnew extends Component {
})
}
checkContent = (rule, value, callback) => {
if (value == "") {
callback('请输入内容');
}else if(value.length>5000){
callback('最大限制为5000个字符');
}else{
callback();
}
}
render() {
const {getFieldDecorator} = this.props.form;
let {
@ -448,9 +460,9 @@ class GraduationTasksnew extends Component {
{getFieldDecorator('description', {
rules: [{
required: true, message: '请输入内容',
}, {
max: 5000, message: '最大限制为5000个字符',
}],
},{
max:5000,message:'最大限制5000个字符'
}]
})(
<TPMMDEditor ref={this.mdRef} placeholder={'请输入任务内容说明最大限制5000个字符'}
mdID={'courseMessageMD'} className="courseMessageMD"></TPMMDEditor>

@ -449,7 +449,7 @@ class GraduateTopicNew extends Component{
rules: [{
required: true, message: '请输入选题简介',
}, {
max: 10000, message: '最大限制为10000个字符',
max: 5000, message: '最大限制为5000个字符',
}],
})(
<TPMMDEditor ref={this.mdRef} placeholder={'请简要说明选题内容最大限制5000个字符'}

Loading…
Cancel
Save