diff --git a/apps/web-antd/src/views/workflow/components/approval-panel.vue b/apps/web-antd/src/views/workflow/components/approval-panel.vue index d171a777..56fd0d84 100644 --- a/apps/web-antd/src/views/workflow/components/approval-panel.vue +++ b/apps/web-antd/src/views/workflow/components/approval-panel.vue @@ -4,6 +4,7 @@ import type { FlowInfoResponse } from '#/api/workflow/instance/model'; import type { TaskInfo } from '#/api/workflow/task/model'; import { computed, onUnmounted, ref, watch } from 'vue'; +import { useRouter } from 'vue-router'; import { Fallback, useVbenModal, VbenAvatar } from '@vben/common-ui'; import { DictEnum } from '@vben/constants'; @@ -139,6 +140,9 @@ async function handleCancel() { }); } +/** + * 是否可编辑/删除 + */ const editableAndRemoveable = computed(() => { if (!props.task) { return false; @@ -146,6 +150,14 @@ const editableAndRemoveable = computed(() => { return ['back', 'cancel', 'draft'].includes(props.task.flowStatus); }); +const router = useRouter(); +function handleEdit() { + const path = props.task?.formPath; + if (path) { + router.push({ path, query: { id: props.task!.businessId } }); + } +} + function handleRemove() { Modal.confirm({ title: '提示', @@ -366,7 +378,9 @@ function handleReductionSignature(userList: User[]) { > 撤销申请 - + + 重新编辑 +