|
|
@ -18,7 +18,7 @@ class GraduationTasksedit extends Component{
|
|
|
|
this.state={
|
|
|
|
this.state={
|
|
|
|
coursename:"",
|
|
|
|
coursename:"",
|
|
|
|
coursesearch:"",
|
|
|
|
coursesearch:"",
|
|
|
|
title_num:60,
|
|
|
|
title_num:0,
|
|
|
|
title_value:"",
|
|
|
|
title_value:"",
|
|
|
|
fileList: [],
|
|
|
|
fileList: [],
|
|
|
|
contents: [{val:"",id:1}],
|
|
|
|
contents: [{val:"",id:1}],
|
|
|
@ -53,14 +53,14 @@ class GraduationTasksedit extends Component{
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
let namelength=result.data.task_name.length;
|
|
|
|
let namelength=result.data.task_name.length;
|
|
|
|
let sixlength=title_num-namelength
|
|
|
|
// let sixlength=title_num-namelength
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
// fileList:newfilelist,
|
|
|
|
// fileList:newfilelist,
|
|
|
|
description:result.data.description,
|
|
|
|
description:result.data.description,
|
|
|
|
tasktype:result.data.task_type,
|
|
|
|
tasktype:result.data.task_type,
|
|
|
|
name:result.data.task_name,
|
|
|
|
name:result.data.task_name,
|
|
|
|
data:result.data,
|
|
|
|
data:result.data,
|
|
|
|
title_num:sixlength,
|
|
|
|
title_num:namelength,
|
|
|
|
attachments:result.data.attachments,
|
|
|
|
attachments:result.data.attachments,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
@ -94,9 +94,9 @@ class GraduationTasksedit extends Component{
|
|
|
|
|
|
|
|
|
|
|
|
// 输入title
|
|
|
|
// 输入title
|
|
|
|
changeTitle=(e)=>{
|
|
|
|
changeTitle=(e)=>{
|
|
|
|
|
|
|
|
// title_num:60-parseInt(e.target.value.length),
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
title_num:60-parseInt(e.target.value.length),
|
|
|
|
title_num:e.target.value.length,
|
|
|
|
title_value:e.target.value
|
|
|
|
title_value:e.target.value
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
@ -379,7 +379,7 @@ class GraduationTasksedit extends Component{
|
|
|
|
<Form.Item label="任务标题" >
|
|
|
|
<Form.Item label="任务标题" >
|
|
|
|
{getFieldDecorator('name', {
|
|
|
|
{getFieldDecorator('name', {
|
|
|
|
rules: [{ required: true, message: "请输入标题" }],
|
|
|
|
rules: [{ required: true, message: "请输入标题" }],
|
|
|
|
})(<Input placeholder="请输入任务名称,最大限制60个字符" value={name} onInput={this.changeTitle} className="searchView searchViewAfter" style={{"width":"100%"}} maxLength="60" addonAfter={String(title_num)}/>)}
|
|
|
|
})(<Input placeholder="请输入任务名称,最大限制60个字符" value={name} onInput={this.changeTitle} className="searchView searchViewAfter" style={{"width":"100%"}} maxLength="60" addonAfter={String(title_num)+"/60"}/>)}
|
|
|
|
</Form.Item>
|
|
|
|
</Form.Item>
|
|
|
|
<input type="hidden" id='nametypes' />
|
|
|
|
<input type="hidden" id='nametypes' />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|