复制issue-不调用copy接口,直接跳编辑页,最后调新建接口

This commit is contained in:
caishi 2021-10-09 14:56:07 +08:00
parent 3be536d37a
commit 078a453dcf
3 changed files with 21 additions and 23 deletions

View File

@ -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={

View File

@ -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`
);
};
// 翻页

View File

@ -178,7 +178,6 @@ class order_form extends Component {
this.setState({
isSpin: false,
});
console.log(error);
});
} else {
const url = `/${owner}/${projectsId}/issues/${orderId}.json`;