修改工单信息

This commit is contained in:
caicai8 2020-04-02 18:21:43 +08:00
parent f511e85d38
commit 748ab612d2
2 changed files with 49 additions and 6 deletions

View File

@ -25,13 +25,13 @@ class IndexItem extends Component{
<img className="p-r-photo" alt="" src={getImageUrl(`images/${item.author && item.author.image_url}`)} ></img>
<div className="p-r-Infos">
<div className="p-r-name">
<Link to={`/projects/${item.id}/${item.author && item.author.login}/coder`} className="hide-1 font-16 color-grey-3" style={{whiteSpace:"wrap",display:'flex'}}>{item.author.name}/<p className="task-hide font-18" style={{width:200,marginTop:5}}>{item.name}</p></Link>
<Link to={`/projects/${item.id}/coders`} className="hide-1 font-16 color-grey-3" style={{whiteSpace:"wrap",display:'flex'}}>{item.author.name}/<p className="task-hide font-18" style={{width:200,marginTop:5}}>{item.name}</p></Link>
</div>
<div className="p-r-content">
<p className="break_word task-hide flex1" style={{maxHeight:"40px",width:"0"}}>{item.description}</p>
<span className="p-r-tags">
{/* { item.forked_count ? <span><label>Fork</label><span>{ item.forked_count}</span></span>:"" } */}
<span className="pariseTag"><img src={img_parise} alt="" className="pariseImg"/>({ item.praises_count })</span>
<span className="pariseTag"><img src={img_parise} alt="" className="pariseImg"/>({ item.praises_count })</span>
{ item.language && item.language.id ? <span><label>{ item.language.name }</label></span>:"" }
</span>
</div>

View File

@ -9,9 +9,7 @@ import{ Modal , Form , Input , Select } from 'antd'
import Attachments from '../Upload/attachment';
import QuillForEditor from '../quillForEditor';
import { QuillDeltaToHtmlConverter } from 'quill-delta-to-html'
const TextArea = Input.TextArea;
const Option = Select.Option;
const options = [
@ -136,6 +134,51 @@ class UpdateDetail extends Component{
)
}
}
// 切换完成度
changeRatio=(e)=>{
if(e === 0){
this.props.form.setFieldsValue({
status_id:1
})
this.setState({
status_id:1
})
}else if(e === 100){
this.props.form.setFieldsValue({
status_id:3
})
this.setState({
status_id:3
})
}else{
this.props.form.setFieldsValue({
status_id:2
})
this.setState({
status_id:2
})
}
}
// 切换状态
changeStatus=(e)=>{
// console.log(e);
if(e === 1){
this.props.form.setFieldsValue({
done_ratio:0
})
this.setState({
done_ratio:0
})
}else if(e === 3){
this.props.form.setFieldsValue({
done_ratio:100
})
this.setState({
done_ratio:100
})
}
}
stringJson=(value) =>{
let _value = null;
@ -300,7 +343,7 @@ class UpdateDetail extends Component{
required: true, message: '请选择完成状态'
}],
})(
<Select >
<Select onChange={this.changeStatus}>
{ this.renderSelect(issue_chosen && issue_chosen.issue_status) }
</Select>
)}
@ -355,7 +398,7 @@ class UpdateDetail extends Component{
required: true, message: '请选择完成度'
}],
})(
<Select value={done_ratio}>
<Select value={done_ratio} onChange={this.changeRatio}>
{ this.renderSelect(issue_chosen && issue_chosen.done_ratio) }
</Select>
)}