From ccb53f377a1da1089f69e11f26f34063cce3f515 Mon Sep 17 00:00:00 2001 From: dap <15891557205@163.com> Date: Fri, 8 Aug 2025 10:29:48 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E5=8F=91=E8=B5=B7=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E5=89=8D=E7=9A=84loading?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/workflow/components/apply-modal.vue | 5 +++ .../workflow/leave/leave-description.vue | 13 ++++++- .../src/views/workflow/leave/leave-form.vue | 38 ++++++++++++++----- 3 files changed, 46 insertions(+), 10 deletions(-) diff --git a/apps/web-antd/src/views/workflow/components/apply-modal.vue b/apps/web-antd/src/views/workflow/components/apply-modal.vue index d0116f03..171feaf5 100644 --- a/apps/web-antd/src/views/workflow/components/apply-modal.vue +++ b/apps/web-antd/src/views/workflow/components/apply-modal.vue @@ -17,6 +17,10 @@ interface Emits { * 完成 */ complete: []; + /** + * 取消 此时已经变成草稿状态了 + */ + cancel: []; } const emit = defineEmits(); @@ -31,6 +35,7 @@ const [BasicModal, modalApi] = useVbenModal({ title: '流程发起', fullscreenButton: false, onConfirm: handleSubmit, + onCancel: () => emit('cancel'), async onOpenChange(isOpen) { if (!isOpen) { return null; diff --git a/apps/web-antd/src/views/workflow/leave/leave-description.vue b/apps/web-antd/src/views/workflow/leave/leave-description.vue index 07743157..c6184dfc 100644 --- a/apps/web-antd/src/views/workflow/leave/leave-description.vue +++ b/apps/web-antd/src/views/workflow/leave/leave-description.vue @@ -3,7 +3,12 @@ import type { LeaveVO } from '../leave/api/model'; import { computed, onMounted, shallowRef } from 'vue'; -import { Descriptions, DescriptionsItem, Skeleton } from 'ant-design-vue'; +import { + Alert, + Descriptions, + DescriptionsItem, + Skeleton, +} from 'ant-design-vue'; import dayjs from 'dayjs'; import { leaveInfo } from './api'; @@ -36,6 +41,12 @@ function formatDate(date: string) {