修改从里程碑新建工单

This commit is contained in:
sylor_huang@126.com 2020-04-27 18:49:50 +08:00
parent 5ab66792c6
commit 14ff9e24b4
6 changed files with 28 additions and 9 deletions

View File

@ -439,8 +439,13 @@ class Detail extends Component{
></Route>
{/* 里程碑页面新建任务 */}
<Route path="/projects/:projectsId/orders/:milepostId/new"
render={
(props) => (<OrderNew {...this.props} {...props} {...this.state}/>)
}
></Route>
{/* 新建任务 */}
<Route path="/projects/:projectsId/orders/new"
render={
(props) => (<OrderNew {...this.props} {...props} {...this.state}/>)

View File

@ -64,7 +64,7 @@ class MergeItem extends Component{
}
</p>
</div>
<ul className="topWrapper_select" onMouseMove={()=>this.onMouseMove(item.id)} onMouseOut={()=>this.onMouseOut()}>
<ul className="topWrapper_select no-cursor" onMouseMove={()=>this.onMouseMove(item.id)} onMouseOut={()=>this.onMouseOut()}>
<li>{this.set_issue_tags(item.issue_tags)}</li>
{/*<li>{item.issue_type || "--"}</li>*/}
<li>{item.version || "--"}</li>

View File

@ -287,7 +287,7 @@ class MilepostDetail extends Component{
<p>{data&&data.name}</p>
<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>
<Link to={`/projects/${projectsId}/orders/${meilid}/new`} className="topWrapper_btn">创建任务</Link>
</div>
</div>
<div className="grid-item mr10">

View File

@ -56,7 +56,19 @@ class New extends Component{
}
getSelectList=()=>{
const { projectsId } = this.props.match.params;
let projectsId = ""
if(this.props.match.params.milepostId){
projectsId = this.props.match.params.projectsId;
this.props.form.setFieldsValue({
fixed_version_id: this.props.match.params.milepostId
});
// this.setState({
// fixed_version_id: this.props.match.params.milepostId
// })
}else{
projectsId = this.props.match.params.projectsId;
}
const url = `/projects/${projectsId}/issues/new.json`;
axios.get(url).then((result)=>{
if(result){
@ -222,8 +234,9 @@ class New extends Component{
>
{getFieldDecorator('fixed_version_id', {
rules: [],
})(
<Select value={fixed_version_id}>
<Select>
<Option value={""}>{issue_chosen && issue_chosen.issue_version.length > 0 ? '未选择里程碑': '请添加里程碑'}</Option>
{ this.renderSelect(issue_chosen && issue_chosen.issue_version) }
</Select>

View File

@ -70,7 +70,7 @@ class OrderItem extends Component{
}
</p>
</div>
<ul className="topWrapper_select" onMouseMove={()=>this.onMouseMove(item.id)} onMouseOut={()=>this.onMouseOut()} >
<ul className="topWrapper_select no-cursor" onMouseMove={()=>this.onMouseMove(item.id)} onMouseOut={()=>this.onMouseOut()} >
<li>{this.set_issue_tags(item.issue_tags)}</li>
{/*<li>{item.issue_type || "--"}</li>*/}
<li>{item.tracker || "--"}</li>

View File

@ -175,7 +175,7 @@
}
.topWrapper_select li{
text-align: center;
/* cursor: pointer; */
cursor: pointer;
color: #666;
width:90px;
text-align: center;
@ -185,10 +185,11 @@
-o-text-overflow: ellipsis;
text-overflow: ellipsis;
}
/* .topWrapper_select li:active{
.topWrapper_select li:active{
background: #f4f4f4;
border-radius: 4px;
} */
}
.no-cursor li{cursor: default !important;}
.ant-dropdown-menu .ant-dropdown-menu-item{
text-align: center;
padding:6px 30px;