From ac8a407b4b7af307bb50b786dab3dfbd1b1cecf1 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 24 Dec 2025 23:01:32 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E3=80=90bpm=E3=80=91=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E5=8F=91=E8=B5=B7=E7=95=8C=E9=9D=A2=EF=BC=9A=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E8=B7=B3=E8=BD=AC=E5=88=B0=E4=B8=9A=E5=8A=A1=E8=A1=A8?= =?UTF-8?q?=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../processInstance/create/index.vue | 31 +++++++++++++------ src/pages-bpm/utils/index.ts | 23 ++++++++++++++ 2 files changed, 45 insertions(+), 9 deletions(-) create mode 100644 src/pages-bpm/utils/index.ts diff --git a/src/pages-bpm/processInstance/create/index.vue b/src/pages-bpm/processInstance/create/index.vue index a64ad6d..4865827 100644 --- a/src/pages-bpm/processInstance/create/index.vue +++ b/src/pages-bpm/processInstance/create/index.vue @@ -55,11 +55,14 @@ class="flex items-center border-b border-[#f5f5f5] p-24rpx last:border-b-0" @click="handleSelect(definition)" > - 移动端路径映射 + * - key: PC 端路径 (formCustomCreatePath / formCustomViewPath) + * - value: 移动端路径 + * 原因是:目前暂时没有 mobile 端的自定义表单字段,所以暂时需要硬编码映射关系 + */ +const PC_TO_MOBILE_PATH_MAP: Record = { + // OA 请假 + '/bpm/oa/leave/create': '/pages-bpm/oa/leave/create/index', + '/bpm/oa/leave/detail': '/pages-bpm/oa/leave/detail/index', +} + +/** + * 根据 PC 端路径获取移动端的跳转路径 + * @param pcPath PC 端的表单路径 + * @returns 移动端的跳转路径,如果没有映射则返回 undefined + */ +export function getMobileFormCustomPath(pcPath: string | undefined): string | undefined { + if (!pcPath) { + return undefined + } + return PC_TO_MOBILE_PATH_MAP[pcPath] +}