Browse Source

[Fix][UI Next][V1.0.0-Alpha] Fix the workflow instance not clickable in task instance page. (#8952)

3.0.0/version-upgrade
Amy0104 3 years ago committed by GitHub
parent
commit
b86dce53a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 23
      dolphinscheduler-ui-next/src/views/projects/task/instance/use-table.ts

23
dolphinscheduler-ui-next/src/views/projects/task/instance/use-table.ts

@ -24,19 +24,22 @@ import {
downloadLog
} from '@/service/modules/task-instances'
import { NButton, NIcon, NSpace, NTooltip } from 'naive-ui'
import ButtonLink from '@/components/button-link'
import {
AlignLeftOutlined,
CheckCircleOutlined,
DownloadOutlined
} from '@vicons/antd'
import { format } from 'date-fns'
import { useRoute } from 'vue-router'
import { useRoute, useRouter } from 'vue-router'
import { parseTime } from '@/utils/common'
import type { Router } from 'vue-router'
import type { TaskInstancesRes } from '@/service/modules/task-instances/types'
export function useTable() {
const { t } = useI18n()
const route = useRoute()
const router: Router = useRouter()
const projectCode = Number(route.params.projectCode)
const processInstanceId = Number(route.params.processInstanceId)
@ -71,7 +74,23 @@ export function useTable() {
{
title: t('project.task.workflow_instance'),
key: 'processInstanceName',
width: 250
width: 250,
render: (row: {
processInstanceId: number
processInstanceName: string
}) =>
h(
ButtonLink,
{
onClick: () =>
void router.push({
name: 'workflow-instance-detail',
params: { id: row.processInstanceId },
query: { code: projectCode }
})
},
{ default: () => row.processInstanceName }
)
},
{
title: t('project.task.executor'),

Loading…
Cancel
Save