feat(全局): 面包屑判断调整&左侧菜单位置调整

This commit is contained in:
baiqi 2024-02-02 11:53:26 +08:00 committed by 刘瑞斌
parent b1a48dcd94
commit 535e5e06c4
4 changed files with 20 additions and 17 deletions

View File

@ -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 {

View File

@ -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) {

View File

@ -95,11 +95,11 @@
setCurrentTopMenu(name as string);
return;
}
}
}
//
appStore.setTopMenus([]);
setCurrentTopMenu('');
}
}
}, true);
function jumpPath(route: RouteRecordName | undefined) {

View File

@ -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);