Browse Source

[Fix-15698][UI] close the definition when opened in the new tab (#15736)

Co-authored-by: xiangzihao <460888207@qq.com>
dev_wenjun_refactorMaster
arlendp 8 months ago committed by GitHub
parent
commit
a16a15c84e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 7
      dolphinscheduler-ui/src/views/projects/workflow/components/dag/dag-toolbar.tsx

7
dolphinscheduler-ui/src/views/projects/workflow/components/dag/dag-toolbar.tsx

@ -148,17 +148,18 @@ export default defineComponent({
* Back to the entrance * Back to the entrance
*/ */
const onClose = () => { const onClose = () => {
if (history.state.back !== '/login') { const { back, current } = history.state
if (back && back !== '/login') {
router.go(-1) router.go(-1)
return return
} }
if (history.state.current.includes('workflow/definitions')) { if (!back || current.includes('workflow/definitions')) {
router.push({ router.push({
path: `/projects/${route.params.projectCode}/workflow-definition` path: `/projects/${route.params.projectCode}/workflow-definition`
}) })
return return
} }
if (history.state.current.includes('workflow/instances')) { if (current.includes('workflow/instances')) {
router.push({ router.push({
path: `/projects/${route.params.projectCode}/workflow/instances` path: `/projects/${route.params.projectCode}/workflow/instances`
}) })

Loading…
Cancel
Save