|
|
|
@ -38,7 +38,7 @@ class GraduateTopicNew extends Component{
|
|
|
|
|
topic_source:[],
|
|
|
|
|
topic_type:[],
|
|
|
|
|
attachments:undefined,
|
|
|
|
|
addonAfter:20,
|
|
|
|
|
addonAfter:60,
|
|
|
|
|
left_banner_id:undefined,
|
|
|
|
|
course_name:undefined
|
|
|
|
|
}
|
|
|
|
@ -87,7 +87,7 @@ class GraduateTopicNew extends Component{
|
|
|
|
|
let topicId=this.props.match.params.topicId
|
|
|
|
|
let url=`/courses/${cid}/graduation_topics/${topicId}/edit.json`;
|
|
|
|
|
axios.get((url)).then((result)=>{
|
|
|
|
|
if(result.status==200){
|
|
|
|
|
if(result){
|
|
|
|
|
this.setState({
|
|
|
|
|
left_banner_id:result.data.left_banner_id,
|
|
|
|
|
course_name:result.data.course_name,
|
|
|
|
@ -257,7 +257,7 @@ class GraduateTopicNew extends Component{
|
|
|
|
|
// 附件相关 ------------ END
|
|
|
|
|
|
|
|
|
|
changeTopicName=(e)=>{
|
|
|
|
|
let num= 20 - parseInt(e.target.value.length);
|
|
|
|
|
let num= 60 - parseInt(e.target.value.length);
|
|
|
|
|
this.setState({
|
|
|
|
|
addonAfter:num < 0 ? 0 : num
|
|
|
|
|
})
|
|
|
|
@ -315,6 +315,11 @@ class GraduateTopicNew extends Component{
|
|
|
|
|
console.log(this.props);
|
|
|
|
|
return(
|
|
|
|
|
<div className="newMain ">
|
|
|
|
|
<style>{`
|
|
|
|
|
.courseForm .ant-form-item-label{
|
|
|
|
|
margin-left:unset!important
|
|
|
|
|
}
|
|
|
|
|
`}</style>
|
|
|
|
|
<div className="edu-class-container edu-position courseForm">
|
|
|
|
|
<p className="clearfix mb20 mt10">
|
|
|
|
|
<WordsBtn style="grey" className="fl" to={`/courses/${coursesId}`}>{course_name}</WordsBtn>
|
|
|
|
@ -357,10 +362,10 @@ class GraduateTopicNew extends Component{
|
|
|
|
|
rules: [{
|
|
|
|
|
required: true, message: '请输入选题名称',
|
|
|
|
|
}, {
|
|
|
|
|
max: 20, message: '最大限制为20个字符',
|
|
|
|
|
max: 60, message: '最大限制为60个字符',
|
|
|
|
|
}],
|
|
|
|
|
})(
|
|
|
|
|
<Input placeholder="请输入帖子选题名称,最大限制20个字符" maxLength="20" onInput={this.changeTopicName} autoComplete="off" addonAfter={String(addonAfter)} className="searchViewAfter" />
|
|
|
|
|
<Input placeholder="请输入帖子选题名称,最大限制60个字符" maxLength="60" onInput={this.changeTopicName} autoComplete="off" addonAfter={String(addonAfter)} className="searchViewAfter" />
|
|
|
|
|
)}
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</div>
|
|
|
|
@ -381,6 +386,34 @@ class GraduateTopicNew extends Component{
|
|
|
|
|
width: 350px;
|
|
|
|
|
margin-bottom:10px;
|
|
|
|
|
}
|
|
|
|
|
.ant-upload-list-item{
|
|
|
|
|
margin-top:0px!important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.ant-form-item-children{
|
|
|
|
|
position:unset
|
|
|
|
|
}
|
|
|
|
|
.rememberTip{
|
|
|
|
|
position:absolute;
|
|
|
|
|
right:0px;
|
|
|
|
|
bottom:-10px;
|
|
|
|
|
}
|
|
|
|
|
.chooseDes .ant-form-explain{
|
|
|
|
|
position:absolute;
|
|
|
|
|
bottom:-10px;
|
|
|
|
|
left:0px;
|
|
|
|
|
}
|
|
|
|
|
.setUploadStyle .uploadBtn{
|
|
|
|
|
height:20px;
|
|
|
|
|
line-height:20px;
|
|
|
|
|
}
|
|
|
|
|
.setUploadStyle .ant-form-item-control{
|
|
|
|
|
margin-top:15px!important;
|
|
|
|
|
line-height:22px!important;
|
|
|
|
|
}
|
|
|
|
|
.setUploadStyle .ant-upload-list{
|
|
|
|
|
margin-top:5px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
`}</style>
|
|
|
|
|
|
|
|
|
@ -389,7 +422,7 @@ class GraduateTopicNew extends Component{
|
|
|
|
|
<Form.Item
|
|
|
|
|
label="选题简介"
|
|
|
|
|
style={{"borderBottom":'none'}}
|
|
|
|
|
className="chooseDes"
|
|
|
|
|
className="chooseDes pr"
|
|
|
|
|
>
|
|
|
|
|
{getFieldDecorator('description', {
|
|
|
|
|
rules: [{
|
|
|
|
@ -402,7 +435,9 @@ class GraduateTopicNew extends Component{
|
|
|
|
|
mdID={'courseMessageMD'} initValue={this.editTopic ? this.editTopic.content : ''} className="courseMessageMD"></TPMMDEditor>
|
|
|
|
|
)}
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item>
|
|
|
|
|
<Form.Item
|
|
|
|
|
className="setUploadStyle"
|
|
|
|
|
>
|
|
|
|
|
{
|
|
|
|
|
getFieldDecorator('file',{
|
|
|
|
|
rules:[{
|
|
|
|
@ -505,6 +540,9 @@ class GraduateTopicNew extends Component{
|
|
|
|
|
.flexBlock .ant-row.ant-form-item {
|
|
|
|
|
margin-bottom: 6px;
|
|
|
|
|
}
|
|
|
|
|
.ant-cascader-menu{
|
|
|
|
|
min-width:125px!important;
|
|
|
|
|
}
|
|
|
|
|
`}</style>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -543,7 +581,7 @@ class GraduateTopicNew extends Component{
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item
|
|
|
|
|
label="调研或实习地点"
|
|
|
|
|
className="mt15 with22"
|
|
|
|
|
className="mt15 with22 setAreaStyle"
|
|
|
|
|
>
|
|
|
|
|
{getFieldDecorator('city', {
|
|
|
|
|
rules: [{
|
|
|
|
|