feat(全局): 面包屑判断调整&左侧菜单位置调整
This commit is contained in:
parent
b1a48dcd94
commit
535e5e06c4
|
@ -33,9 +33,7 @@
|
|||
appStore.setBreadcrumbList(appStore.currentTopMenu?.meta?.breadcrumbs);
|
||||
} else if ((name as string).includes(appStore.currentTopMenu.name as string)) {
|
||||
// 顶部菜单内下钻的父子路由命名是包含关系,子路由会携带完整的父路由名称
|
||||
const { children } = router.currentRoute.value.matched[1];
|
||||
const currentRoute = children.length > 0 ? children.find((e) => e.name === name) : null;
|
||||
const currentBreads = currentRoute?.meta?.breadcrumbs || meta.breadcrumbs;
|
||||
const currentBreads = meta.breadcrumbs;
|
||||
appStore.setBreadcrumbList(currentBreads);
|
||||
// 下钻的三级路由一般都会区分编辑添加场景,根据场景展示不同的国际化路由信息
|
||||
const editTag = currentBreads && currentBreads[currentBreads.length - 1].editTag;
|
||||
|
@ -49,7 +47,6 @@
|
|||
}, true);
|
||||
|
||||
function jumpTo(crumb: BreadcrumbItem) {
|
||||
debugger;
|
||||
if (crumb.isBack && window.history.state.back) {
|
||||
router.back();
|
||||
} else {
|
||||
|
|
|
@ -189,6 +189,7 @@
|
|||
const res = await getOrgOptions();
|
||||
originOrgList.value = res || [];
|
||||
} catch (error) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(error);
|
||||
}
|
||||
}
|
||||
|
@ -202,6 +203,9 @@
|
|||
} else {
|
||||
personalMenus.value.splice(1, 1);
|
||||
}
|
||||
},
|
||||
{
|
||||
immediate: true,
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -217,7 +221,7 @@
|
|||
return (
|
||||
<a-trigger
|
||||
v-model:popup-visible={personalMenusVisible.value}
|
||||
trigger="hover"
|
||||
trigger="click"
|
||||
unmount-on-close={false}
|
||||
popup-offset={4}
|
||||
position="right"
|
||||
|
@ -386,8 +390,8 @@
|
|||
'collapse-icon': () => (appStore.menuCollapse ? <icon-right /> : <icon-left />),
|
||||
}}
|
||||
>
|
||||
{renderSubMenu()}
|
||||
{personalInfoMenu()}
|
||||
<div class="flex flex-1 flex-col">{renderSubMenu()}</div>
|
||||
<div class="flex flex-col">{personalInfoMenu()}</div>
|
||||
</a-menu>
|
||||
{personalInfoDrawer()}
|
||||
</>
|
||||
|
@ -402,7 +406,7 @@
|
|||
background-color: var(--color-bg-3);
|
||||
}
|
||||
.arco-menu-inner {
|
||||
@apply flex flex-col;
|
||||
@apply flex flex-col justify-between;
|
||||
|
||||
padding: 16px 28px 16px 16px !important;
|
||||
.arco-menu-inline {
|
||||
|
@ -445,6 +449,9 @@
|
|||
color: var(--color-text-1);
|
||||
}
|
||||
}
|
||||
.arco-menu-inline--bottom {
|
||||
justify-self: end;
|
||||
}
|
||||
.arco-menu-selected {
|
||||
color: rgb(var(--primary-5)) !important;
|
||||
&:not(.arco-menu-inline-header) {
|
||||
|
|
|
@ -95,11 +95,11 @@
|
|||
setCurrentTopMenu(name as string);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
// 切换到没有顶部菜单的路由时,清空顶部菜单
|
||||
appStore.setTopMenus([]);
|
||||
setCurrentTopMenu('');
|
||||
}
|
||||
}
|
||||
}, true);
|
||||
|
||||
function jumpPath(route: RouteRecordName | undefined) {
|
||||
|
|
|
@ -498,12 +498,11 @@
|
|||
}
|
||||
|
||||
function goCaseDetail() {
|
||||
router.push({
|
||||
name: CaseManagementRouteEnum.CASE_MANAGEMENT,
|
||||
query: {
|
||||
id: activeCaseId.value,
|
||||
},
|
||||
});
|
||||
window.open(
|
||||
`${window.location.origin}#${router.resolve({ name: CaseManagementRouteEnum.CASE_MANAGEMENT }).fullPath}?id=${
|
||||
activeCaseId.value
|
||||
}`
|
||||
);
|
||||
}
|
||||
|
||||
const submitReviewLoading = ref(false);
|
||||
|
|
Loading…
Reference in New Issue