refactor: 使用映射方式替换iframe来显示流程详情

This commit is contained in:
dap
2025-08-08 10:07:16 +08:00
parent 46e642a2ce
commit c401a3092f
8 changed files with 73 additions and 118 deletions

View File

@@ -3,7 +3,6 @@ import type { RouteRecordRaw } from 'vue-router';
import { mergeRouteModules, traverseTreeValues } from '@vben/utils';
import { coreRoutes, fallbackNotFoundRoute } from './core';
import { workflowIframeRoutes } from './workflow-iframe';
const dynamicRouteFiles = import.meta.glob('./modules/**/*.ts', {
eager: true,
@@ -27,12 +26,11 @@ const externalRoutes: RouteRecordRaw[] = [];
const routes: RouteRecordRaw[] = [
...coreRoutes,
...externalRoutes,
...workflowIframeRoutes,
fallbackNotFoundRoute,
];
/** 基本路由(登录, 第三方登录, 注册等) + workflowIframe路由不需要拦截 */
const basicRoutes = [...coreRoutes, ...workflowIframeRoutes];
/** 基本路由(登录, 第三方登录, 注册等) */
const basicRoutes = [...coreRoutes];
/** 基本路由列表,这些路由不需要进入权限拦截 */
const coreRouteNames = traverseTreeValues(basicRoutes, (route) => route.name);

View File

@@ -1,18 +0,0 @@
import type { RouteRecordRaw } from '@vben/types';
/**
* 该文件存放workflow表单的iframe内嵌路由
* 不需要权限认证 少走两个接口😅
*/
export const workflowIframeRoutes: RouteRecordRaw[] = [
// 这里是iframe使用的 去掉外层的BasicLayout
{
name: 'WorkflowLeaveInner',
path: '/workflow/leaveEdit/index/iframe',
component: () => import('#/views/workflow/leave/leave-form.vue'),
meta: {
hideInTab: true,
title: '请假申请',
},
},
];