复制issue-不调用copy接口,直接跳编辑页,最后调新建接口
This commit is contained in:
parent
3be536d37a
commit
078a453dcf
|
@ -688,16 +688,12 @@ class Detail extends Component {
|
|||
}
|
||||
></Route>
|
||||
{/* 复制详情 copyetail*/}
|
||||
{/* <Route path="/:owner/:projectsId/issues/:orderId/copyetail"
|
||||
render={
|
||||
(props) => (<OrdercopyDetail {...this.props} {...props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route> */}
|
||||
<Route path="/:owner/:projectsId/issues/:orderId/:operateName"
|
||||
<Route path="/:owner/:projectsId/issues/:orderId/copyetail"
|
||||
render={
|
||||
(props) => (<OrderupdateDetail {...this.props} {...props} {...this.state} {...common} />)
|
||||
}
|
||||
></Route>
|
||||
|
||||
{/* 任务详情 */}
|
||||
<Route path="/:owner/:projectsId/issues/:orderId"
|
||||
render={
|
||||
|
|
|
@ -123,22 +123,25 @@ class Detail extends Component {
|
|||
//复制
|
||||
copydetail = () => {
|
||||
const { projectsId, orderId, owner } = this.props.match.params;
|
||||
const url = `/${owner}/${projectsId}/issues/${orderId}/copy.json`;
|
||||
axios
|
||||
.post(url, {
|
||||
project_id: projectsId,
|
||||
id: orderId,
|
||||
})
|
||||
.then((result) => {
|
||||
if (result) {
|
||||
this.props.history.push(
|
||||
`/${owner}/${projectsId}/issues/${result.data.issue_id}/copyetail`
|
||||
);
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log(error);
|
||||
});
|
||||
// const url = `/${owner}/${projectsId}/issues/${orderId}/copy.json`;
|
||||
// axios
|
||||
// .post(url, {
|
||||
// project_id: projectsId,
|
||||
// id: orderId,
|
||||
// })
|
||||
// .then((result) => {
|
||||
// if (result) {
|
||||
// this.props.history.push(
|
||||
// `/${owner}/${projectsId}/issues/${result.data.issue_id}/copyetail`
|
||||
// );
|
||||
// }
|
||||
// })
|
||||
// .catch((error) => {
|
||||
// console.log(error);
|
||||
// });
|
||||
this.props.history.push(
|
||||
`/${owner}/${projectsId}/issues/${orderId}/copyetail`
|
||||
);
|
||||
};
|
||||
|
||||
// 翻页
|
||||
|
|
|
@ -178,7 +178,6 @@ class order_form extends Component {
|
|||
this.setState({
|
||||
isSpin: false,
|
||||
});
|
||||
console.log(error);
|
||||
});
|
||||
} else {
|
||||
const url = `/${owner}/${projectsId}/issues/${orderId}.json`;
|
||||
|
|
Loading…
Reference in New Issue