|
|
|
@ -12,6 +12,8 @@ import "../../common/formCommon.css"
|
|
|
|
|
import '../style.css'
|
|
|
|
|
import '../../css/Courses.css'
|
|
|
|
|
import { WordsBtn, City } from 'educoder'
|
|
|
|
|
|
|
|
|
|
import {Link} from 'react-router-dom'
|
|
|
|
|
// import City from './City'
|
|
|
|
|
|
|
|
|
|
// import './board.css'
|
|
|
|
@ -20,6 +22,7 @@ import { WordsBtn, City } from 'educoder'
|
|
|
|
|
const confirm = Modal.confirm;
|
|
|
|
|
const $ = window.$
|
|
|
|
|
const { Option } = Select;
|
|
|
|
|
const NAME_COUNT=60;
|
|
|
|
|
// 新建毕设选题
|
|
|
|
|
// https://lanhuapp.com/web/#/item/project/board/detail?pid=a3bcd4b1-99ce-4e43-8ead-5b8b0a410807&project_id=a3bcd4b1-99ce-4e43-8ead-5b8b0a410807&image_id=c6d9b36f-7701-4035-afdb-62404681108c
|
|
|
|
|
class GraduateTopicNew extends Component{
|
|
|
|
@ -38,7 +41,7 @@ class GraduateTopicNew extends Component{
|
|
|
|
|
topic_source:[],
|
|
|
|
|
topic_type:[],
|
|
|
|
|
attachments:undefined,
|
|
|
|
|
addonAfter:60,
|
|
|
|
|
addonAfter:0,
|
|
|
|
|
left_banner_id:undefined,
|
|
|
|
|
course_name:undefined
|
|
|
|
|
}
|
|
|
|
@ -99,7 +102,7 @@ class GraduateTopicNew extends Component{
|
|
|
|
|
topic_source:result.data.topic_source,
|
|
|
|
|
topic_type:result.data.topic_type,
|
|
|
|
|
attachments:result.data.attachments,
|
|
|
|
|
addonAfter:20-parseInt(result.data.selected_data.name.length)
|
|
|
|
|
addonAfter:parseInt(result.data.selected_data.name.length)
|
|
|
|
|
})
|
|
|
|
|
this.props.form.setFieldsValue({
|
|
|
|
|
tea_id:result.data.selected_data.tea_id,
|
|
|
|
@ -257,9 +260,9 @@ class GraduateTopicNew extends Component{
|
|
|
|
|
// 附件相关 ------------ END
|
|
|
|
|
|
|
|
|
|
changeTopicName=(e)=>{
|
|
|
|
|
let num= 60 - parseInt(e.target.value.length);
|
|
|
|
|
// let num= 60 - parseInt(e.target.value.length);
|
|
|
|
|
this.setState({
|
|
|
|
|
addonAfter:num < 0 ? 0 : num
|
|
|
|
|
addonAfter:e.target.value.length
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
render() {
|
|
|
|
@ -331,7 +334,7 @@ class GraduateTopicNew extends Component{
|
|
|
|
|
</p>
|
|
|
|
|
<div className="clearfix mb20 lineh-25">
|
|
|
|
|
<p className="fl color-black summaryname">{topicId==undefined?"新建":"编辑"}毕设选题</p>
|
|
|
|
|
<a onClick={()=>this.props.history.goBack()} className="color-grey-6 fr font-16">返回</a>
|
|
|
|
|
<Link to={`/courses/${coursesId}/graduation_topics/${left_banner_id}`} className="color-grey-6 fr font-16">返回</Link>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<Form {...formItemLayout} onSubmit={this.handleSubmit}>
|
|
|
|
@ -366,7 +369,7 @@ class GraduateTopicNew extends Component{
|
|
|
|
|
max: 60, message: '最大限制为60个字符',
|
|
|
|
|
}],
|
|
|
|
|
})(
|
|
|
|
|
<Input placeholder="请输入帖子选题名称,最大限制60个字符" maxLength="60" onInput={this.changeTopicName} autoComplete="off" addonAfter={String(addonAfter)} className="searchViewAfter" />
|
|
|
|
|
<Input placeholder="请输入帖子选题名称,最大限制60个字符" maxLength="60" onInput={this.changeTopicName} autoComplete="off" suffix={`${String(addonAfter)}/${NAME_COUNT}`} className="searchViewAfter" />
|
|
|
|
|
)}
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</div>
|
|
|
|
|