From 394a3d075ae88f3c548bfac77bac4534fdb5437d Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 11 Jun 2026 01:21:56 +0800 Subject: [PATCH] =?UTF-8?q?feat(bpm):=20=E6=94=AF=E6=8C=81=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E6=89=93=E5=8D=B0=E6=B8=B2=E6=9F=93=E4=B8=9A=E5=8A=A1?= =?UTF-8?q?=E8=A1=A8=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 vue3、vben antd、vben ele 打印弹窗中动态加载业务表单组件 - 未启用自定义打印模板且流程表单字段为空时,使用 formCustomViewPath 渲染业务详情 - 业务表单独立于打印表格渲染,避免表格单元格内嵌页面导致布局和分页问题 - 保留 readonly、print-mode 作为业务详情组件打印态适配约定 --- .../processInstance/detail/PrintDialog.vue | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/views/bpm/processInstance/detail/PrintDialog.vue b/src/views/bpm/processInstance/detail/PrintDialog.vue index 080704ab9..527d495c4 100644 --- a/src/views/bpm/processInstance/detail/PrintDialog.vue +++ b/src/views/bpm/processInstance/detail/PrintDialog.vue @@ -14,6 +14,7 @@ import { getStrDictOptions } from '@/utils/dict' import { decodeFields } from '@/utils/formCreate' +import { registerComponent } from '@/utils/routerHelper' interface FormFieldItem { html: string @@ -58,6 +59,7 @@ const userName = computed(() => userStore.user.nickname ?? '') const printTime = ref(formatDate(new Date(), 'YYYY-MM-DD HH:mm')) const formFields = ref([]) const printDataMap = ref>({}) +const BusinessFormComponent = shallowRef() const open = async (id: string) => { loading.value = true @@ -66,6 +68,7 @@ const open = async (id: string) => { printTime.value = formatDate(new Date(), 'YYYY-MM-DD HH:mm') initPrintDataMap() await parseFormFields() + initBusinessFormComponent() } finally { loading.value = false } @@ -73,6 +76,12 @@ const open = async (id: string) => { } defineExpose({ open }) +const initBusinessFormComponent = () => { + const businessFormPath = + printData.value?.processInstance?.processDefinition?.formCustomViewPath || '' + BusinessFormComponent.value = businessFormPath ? registerComponent(businessFormPath) : undefined +} + const parseFormFields = async () => { if (!printData.value) return @@ -498,6 +507,19 @@ const printObj = ref({
+ + + +
+ +
+ +

流程节点