|
|
|
@ -42,8 +42,15 @@ class MilepostDetail extends Component{
|
|
|
|
|
//设置选择高亮
|
|
|
|
|
openselect:1,
|
|
|
|
|
closeselect:undefined,
|
|
|
|
|
miledata:undefined
|
|
|
|
|
miledata:undefined,
|
|
|
|
|
// status_type: undefined
|
|
|
|
|
issue_tag_ids:'标签',
|
|
|
|
|
tracker_ids:'所有分类',
|
|
|
|
|
author_ids:'发布人',
|
|
|
|
|
assigned_to_ids:'指派人',
|
|
|
|
|
priority_ids:'优先度',
|
|
|
|
|
done_ratios:'完成度',
|
|
|
|
|
paix:'排序'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -120,7 +127,70 @@ class MilepostDetail extends Component{
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getOption=(e,id)=>{
|
|
|
|
|
getOption=(e,id,name)=>{
|
|
|
|
|
if(id+'s'==="issue_tag_ids"){
|
|
|
|
|
this.setState({
|
|
|
|
|
[id]:e.key,
|
|
|
|
|
issue_tag_ids:name
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if(id+'s'==="tracker_ids"){
|
|
|
|
|
this.setState({
|
|
|
|
|
[id]:e.key,
|
|
|
|
|
tracker_ids:name
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if(id+'s'==="author_ids"){
|
|
|
|
|
this.setState({
|
|
|
|
|
[id]:e.key,
|
|
|
|
|
author_ids:name
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if(id+'s'==="assigned_to_ids"){
|
|
|
|
|
this.setState({
|
|
|
|
|
[id]:e.key,
|
|
|
|
|
assigned_to_ids:name
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if(id+'s'==="priority_ids"){
|
|
|
|
|
this.setState({
|
|
|
|
|
[id]:e.key,
|
|
|
|
|
priority_ids:name
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if(id+'s'==="done_ratios"){
|
|
|
|
|
this.setState({
|
|
|
|
|
[id]:e.key,
|
|
|
|
|
done_ratios:name
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(e.key==="created_on"){
|
|
|
|
|
if(e.item.props.value==="desc"){
|
|
|
|
|
this.setState({
|
|
|
|
|
[id]:e.key,
|
|
|
|
|
paix:'最新创建'
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
this.setState({
|
|
|
|
|
[id]:e.key,
|
|
|
|
|
paix:'最早创建'
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}else if(e.key==="updated_on"){
|
|
|
|
|
if(e.item.props.value==="desc"){
|
|
|
|
|
this.setState({
|
|
|
|
|
[id]:e.key,
|
|
|
|
|
paix:'最新更新'
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
this.setState({
|
|
|
|
|
[id]:e.key,
|
|
|
|
|
paix:'最早更新'
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
[id]:e.key
|
|
|
|
|
})
|
|
|
|
@ -135,11 +205,11 @@ class MilepostDetail extends Component{
|
|
|
|
|
renderMenu =(array,name,id)=>{
|
|
|
|
|
return(
|
|
|
|
|
<Menu>
|
|
|
|
|
<Menu.Item key={"all"} onClick={(e)=>this.getOption(e,id)}>{name}</Menu.Item>
|
|
|
|
|
<Menu.Item key={"all"} onClick={(e)=>this.getOption(e,id,name)}>{name}</Menu.Item>
|
|
|
|
|
{
|
|
|
|
|
array && array.length > 0 && array.map((item,key)=>{
|
|
|
|
|
return(
|
|
|
|
|
<Menu.Item key={item.id} onClick={(e)=>this.getOption(e,id)}>{item.name}</Menu.Item>
|
|
|
|
|
<Menu.Item key={item.id} onClick={(e)=>this.getOption(e,id,item.name)}>{item.name}</Menu.Item>
|
|
|
|
|
)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
@ -198,6 +268,15 @@ class MilepostDetail extends Component{
|
|
|
|
|
const { issue_chosen , issues , limit , page , search_count , data , miledata , isSpin,openselect,closeselect } = this.state;
|
|
|
|
|
const { projectsId,meilid } = this.props.match.params;
|
|
|
|
|
|
|
|
|
|
const menu = (
|
|
|
|
|
<Menu onClick={(e)=>this.getOption(e)}>
|
|
|
|
|
<Menu.Item key={'created_on'} value="desc">最新创建</Menu.Item>
|
|
|
|
|
<Menu.Item key={'created_on'} value="asc">最早创建</Menu.Item>
|
|
|
|
|
<Menu.Item key={'updated_on'} value="desc">最新更新</Menu.Item>
|
|
|
|
|
<Menu.Item key={'updated_on'} value="asc">最早更新</Menu.Item>
|
|
|
|
|
</Menu>
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
const Paginations = (
|
|
|
|
|
<React.Fragment>
|
|
|
|
|
{
|
|
|
|
@ -212,40 +291,62 @@ class MilepostDetail extends Component{
|
|
|
|
|
<div className="main">
|
|
|
|
|
<div className="topWrapper">
|
|
|
|
|
<p>{miledata&&miledata.name}</p>
|
|
|
|
|
<div className="topWrapper">
|
|
|
|
|
<Link to={`/projects/${projectsId}/orders/${meilid}/meilpost`} className="topWrapper_btn" style={{marginRight:15}}>编辑里程碑</Link>
|
|
|
|
|
<div className="milepostdiv">
|
|
|
|
|
<Link to={`/projects/${projectsId}/orders/${meilid}/meilpost`} className="topWrapper_btn" style={{marginRight:15}} >编辑里程碑</Link>
|
|
|
|
|
<Link to={`/projects/${projectsId}/orders/new`} className="topWrapper_btn">创建工单</Link>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
<div className="topWrapper" style={{borderBottom:"none"}}>
|
|
|
|
|
<p className="topWrapper_type">
|
|
|
|
|
<li className={openselect ? "active":""} onClick={()=>this.openorder(1)}>{data && data.open_issues_count}个开启中</li>
|
|
|
|
|
<li className={closeselect ? "active":""} onClick={()=>this.openorder(2)}>{data && data.close_issues_count}个已关闭</li>
|
|
|
|
|
{/* <span onClick={this.openorder} className={author_id ? "active":""}>{data && data.open_count}个开启中</span>
|
|
|
|
|
<span onClick={this.closeorder} className={author_id ? "active":""}>{data && data.close_count}个已关闭</span> */}
|
|
|
|
|
</p>
|
|
|
|
|
{/* <p className="topWrapper_type">
|
|
|
|
|
</p> */}
|
|
|
|
|
</div>
|
|
|
|
|
<Spin spinning={isSpin}>
|
|
|
|
|
<div className="f-wrap-between mb20">
|
|
|
|
|
<ul className="topWrapper_type">
|
|
|
|
|
|
|
|
|
|
<ul className="topWrapper_type">
|
|
|
|
|
<li className={openselect ? "active":""} onClick={()=>this.openorder(1)}>{data && data.open_issues_count}个开启中</li>
|
|
|
|
|
<li className={closeselect ? "active":""} onClick={()=>this.openorder(2)}>{data && data.close_issues_count}个已关闭</li>
|
|
|
|
|
{/* <li>@我的</li> */}
|
|
|
|
|
</ul>
|
|
|
|
|
<ul className="topWrapper_select">
|
|
|
|
|
<li>
|
|
|
|
|
<li>
|
|
|
|
|
<Dropdown className="topWrapperSelect" overlay={this.renderMenu(issue_chosen && issue_chosen.issue_tag,'标签','issue_tag_id')} trigger={['click']} placement="bottomCenter">
|
|
|
|
|
<span>标签<Icon type="caret-down" className="ml5" /></span>
|
|
|
|
|
<span>{this.state.issue_tag_ids}<Icon type="caret-down" className="ml5" /></span>
|
|
|
|
|
</Dropdown>
|
|
|
|
|
</li>
|
|
|
|
|
{/*<li>*/}
|
|
|
|
|
{/*<Dropdown className="topWrapperSelect" overlay={this.renderMenu(issue_chosen && issue_chosen.issue_type,'所有类型','issue_type')} trigger={['click']} placement="bottomCenter">*/}
|
|
|
|
|
{/*<span>类型<Icon type="caret-down" className="ml5" /></span>*/}
|
|
|
|
|
{/*</Dropdown>*/}
|
|
|
|
|
{/*</li>*/}
|
|
|
|
|
<li>
|
|
|
|
|
<Dropdown className="topWrapperSelect" overlay={this.renderMenu(issue_chosen && issue_chosen.tracker,'所有分类','tracker_id')} trigger={['click']} placement="bottomCenter">
|
|
|
|
|
<span>{this.state.tracker_ids}<Icon type="caret-down" className="ml5" /></span>
|
|
|
|
|
</Dropdown>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<Dropdown className="topWrapperSelect" overlay={this.renderMenu(issue_chosen && issue_chosen.issue_type,'所有类型','issue_type')} trigger={['click']} placement="bottomCenter">
|
|
|
|
|
<span>类型<Icon type="caret-down" className="ml5" /></span>
|
|
|
|
|
<Dropdown className="topWrapperSelect" overlay={this.renderMenu(issue_chosen && issue_chosen.assign_user,'发布人','author_id')} trigger={['click']} placement="bottomCenter">
|
|
|
|
|
<span>{this.state.author_ids}<Icon type="caret-down" className="ml5" /></span>
|
|
|
|
|
</Dropdown>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<Dropdown className="topWrapperSelect" overlay={this.renderMenu(issue_chosen && issue_chosen.assign_user,'指派人','assigned_to_id')} trigger={['click']} placement="bottomCenter">
|
|
|
|
|
<span>指派人<Icon type="caret-down" className="ml5" /></span>
|
|
|
|
|
<span>{this.state.assigned_to_ids}<Icon type="caret-down" className="ml5" /></span>
|
|
|
|
|
</Dropdown>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<Dropdown className="topWrapperSelect" overlay={this.renderMenu(issue_chosen && issue_chosen.priority,'优先度','priority_id')} trigger={['click']} placement="bottomCenter">
|
|
|
|
|
<span>{this.state.priority_ids}<Icon type="caret-down" className="ml5"/></span>
|
|
|
|
|
</Dropdown>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<Dropdown className="topWrapperSelect" overlay={this.renderMenu(issue_chosen && issue_chosen.done_ratio,'完成度','done_ratio')} trigger={['click']} placement="bottomCenter">
|
|
|
|
|
<span>{this.state.done_ratios}<Icon type="caret-down" className="ml5" /></span>
|
|
|
|
|
</Dropdown>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<Dropdown className="topWrapperSelect" overlay={menu} trigger={['click']} placement="bottomCenter">
|
|
|
|
|
<span>{this.state.paix}<Icon type="caret-down" className="ml5" /></span>
|
|
|
|
|
</Dropdown>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|