add:添加调拨其他出库下推功能 fix:修复sys菜单组件名称问题

This commit is contained in:
zhangzq
2026-07-14 20:42:54 +08:00
parent 7be392563a
commit daa7151a83
14 changed files with 394 additions and 102 deletions

View File

@@ -2,6 +2,8 @@ import { constantRouterMap } from '@/router/routers'
import Layout from '@/layout/index'
import ParentView from '@/components/ParentView'
const MENU_TYPE_DIRECTORY = '2'
const permission = {
state: {
routers: constantRouterMap,
@@ -42,6 +44,7 @@ export const filterAsyncRouter = (routers, lastRouter = false, type = false) =>
if (type && router.children) {
router.children = filterChildren(router.children)
}
const hasChildren = router.children != null && router.children && router.children.length
if (router.component) {
if (router.component === 'Layout') { // Layout组件特殊处理
router.component = Layout
@@ -51,8 +54,10 @@ export const filterAsyncRouter = (routers, lastRouter = false, type = false) =>
const component = router.component
router.component = loadView(component)
}
} else if (hasChildren && router.type === MENU_TYPE_DIRECTORY) {
router.component = ParentView
}
if (router.children != null && router.children && router.children.length) {
if (hasChildren) {
router.children = filterAsyncRouter(router.children, router, type)
} else {
delete router['children']