修改issue详情路由

This commit is contained in:
何童崇 2021-12-13 15:01:03 +08:00
parent 2e1cf5ad82
commit 358880bfd2
5 changed files with 13 additions and 13 deletions

View File

@ -55,7 +55,8 @@ const OrderupdateMilepost = Loadable({
}) })
const OrderupdateDetail = Loadable({ const OrderupdateDetail = Loadable({
loader: () => import('../Order/UpdateDetail'), // loader: () => import('../Order/UpdateDetail'),
loader: () => import('../Order/order_form'),
loading: Loading, loading: Loading,
}) })
@ -700,16 +701,16 @@ class Detail extends Component {
(props) => (<OrderNew {...this.props} {...props} {...this.state} {...common} />) (props) => (<OrderNew {...this.props} {...props} {...this.state} {...common} />)
} }
></Route> ></Route>
{/* 修改详情 updatedetail*/} {/* 修改详情 edit*/}
<Route path="/:owner/:projectsId/issues/:orderId/:operateName" <Route path="/:owner/:projectsId/issues/:orderId/edit"
render={ render={
(props) => (<OrderupdateDetail {...this.props} {...props} {...this.state} {...common} />) (props) => (<OrderupdateDetail {...this.props} {...props} {...this.state} {...common} form_type={"edit"}/>)
} }
></Route> ></Route>
{/* 复制详情 copyetail*/} {/* 复制详情 copyetail*/}
<Route path="/:owner/:projectsId/issues/:orderId/copyetail" <Route path="/:owner/:projectsId/issues/:orderId/copyetail"
render={ render={
(props) => (<OrderupdateDetail {...this.props} {...props} {...this.state} {...common} />) (props) => (<OrderupdateDetail {...this.props} {...props} {...this.state} {...common} form_type={"copy"}/>)
} }
></Route> ></Route>

View File

@ -273,7 +273,7 @@ class Detail extends Component {
</Popconfirm> </Popconfirm>
<Link <Link
to={`/${owner}/${projectsId}/issues/${orderId}/updatedetail`} to={`/${owner}/${projectsId}/issues/${orderId}/edit`}
className="color-blue fr" className="color-blue fr"
> >
编辑 编辑

View File

@ -94,7 +94,7 @@ class OrderItem extends Component {
user_admin_or_member ? user_admin_or_member ?
<div style={{ display: orderid === item.id && isdisplay ? 'flex' : 'none' }}> <div style={{ display: orderid === item.id && isdisplay ? 'flex' : 'none' }}>
<div className="mr8 ml8 color-grey-9"> <div className="mr8 ml8 color-grey-9">
<Link to={`/${owner}/${projectsId}/issues/${item.id}/updatedetail`} className="color-grey-9"> <Link to={`/${owner}/${projectsId}/issues/${item.id}/edit`} className="color-grey-9">
<i className="iconfont icon-bianji3 font-14 mr5"></i> <i className="iconfont icon-bianji3 font-14 mr5"></i>
</Link> </Link>
</div> </div>

View File

@ -4,6 +4,7 @@ import OrderForm from './order_form'
function CopyDetail(props){ function CopyDetail(props){
const operateName = props.match.params.operateName; const operateName = props.match.params.operateName;
console.log('operateName:'+operateName);
return( return(
<OrderForm form_type={operateName === "copyetail" ? "copy":"edit"} {...props}></OrderForm> <OrderForm form_type={operateName === "copyetail" ? "copy":"edit"} {...props}></OrderForm>
) )

View File

@ -169,11 +169,12 @@ class order_form extends Component {
// 创建 // 创建
handleSubmit = () => { handleSubmit = () => {
this.setState({
isSpin: true,
});
this.props.form.validateFieldsAndScroll((err, values) => { this.props.form.validateFieldsAndScroll((err, values) => {
if (!err) { if (!err) {
this.setState({
isSpin: true,
});
const { form_type } = this.props; const { form_type } = this.props;
const { projectsId , orderId , owner } = this.props.match.params; const { projectsId , orderId , owner } = this.props.match.params;
@ -247,9 +248,6 @@ class order_form extends Component {
}); });
} }
} }
this.setState({
isSpin: false,
});
}); });
}; };