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); appStore.setBreadcrumbList(appStore.currentTopMenu?.meta?.breadcrumbs);
} else if ((name as string).includes(appStore.currentTopMenu.name as string)) { } else if ((name as string).includes(appStore.currentTopMenu.name as string)) {
// //
const { children } = router.currentRoute.value.matched[1]; const currentBreads = meta.breadcrumbs;
const currentRoute = children.length > 0 ? children.find((e) => e.name === name) : null;
const currentBreads = currentRoute?.meta?.breadcrumbs || meta.breadcrumbs;
appStore.setBreadcrumbList(currentBreads); appStore.setBreadcrumbList(currentBreads);
// //
const editTag = currentBreads && currentBreads[currentBreads.length - 1].editTag; const editTag = currentBreads && currentBreads[currentBreads.length - 1].editTag;
@ -49,7 +47,6 @@
}, true); }, true);
function jumpTo(crumb: BreadcrumbItem) { function jumpTo(crumb: BreadcrumbItem) {
debugger;
if (crumb.isBack && window.history.state.back) { if (crumb.isBack && window.history.state.back) {
router.back(); router.back();
} else { } else {

View File

@ -189,6 +189,7 @@
const res = await getOrgOptions(); const res = await getOrgOptions();
originOrgList.value = res || []; originOrgList.value = res || [];
} catch (error) { } catch (error) {
// eslint-disable-next-line no-console
console.log(error); console.log(error);
} }
} }
@ -202,6 +203,9 @@
} else { } else {
personalMenus.value.splice(1, 1); personalMenus.value.splice(1, 1);
} }
},
{
immediate: true,
} }
); );
@ -217,7 +221,7 @@
return ( return (
<a-trigger <a-trigger
v-model:popup-visible={personalMenusVisible.value} v-model:popup-visible={personalMenusVisible.value}
trigger="hover" trigger="click"
unmount-on-close={false} unmount-on-close={false}
popup-offset={4} popup-offset={4}
position="right" position="right"
@ -386,8 +390,8 @@
'collapse-icon': () => (appStore.menuCollapse ? <icon-right /> : <icon-left />), 'collapse-icon': () => (appStore.menuCollapse ? <icon-right /> : <icon-left />),
}} }}
> >
{renderSubMenu()} <div class="flex flex-1 flex-col">{renderSubMenu()}</div>
{personalInfoMenu()} <div class="flex flex-col">{personalInfoMenu()}</div>
</a-menu> </a-menu>
{personalInfoDrawer()} {personalInfoDrawer()}
</> </>
@ -402,7 +406,7 @@
background-color: var(--color-bg-3); background-color: var(--color-bg-3);
} }
.arco-menu-inner { .arco-menu-inner {
@apply flex flex-col; @apply flex flex-col justify-between;
padding: 16px 28px 16px 16px !important; padding: 16px 28px 16px 16px !important;
.arco-menu-inline { .arco-menu-inline {
@ -445,6 +449,9 @@
color: var(--color-text-1); color: var(--color-text-1);
} }
} }
.arco-menu-inline--bottom {
justify-self: end;
}
.arco-menu-selected { .arco-menu-selected {
color: rgb(var(--primary-5)) !important; color: rgb(var(--primary-5)) !important;
&:not(.arco-menu-inline-header) { &:not(.arco-menu-inline-header) {

View File

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

View File

@ -498,12 +498,11 @@
} }
function goCaseDetail() { function goCaseDetail() {
router.push({ window.open(
name: CaseManagementRouteEnum.CASE_MANAGEMENT, `${window.location.origin}#${router.resolve({ name: CaseManagementRouteEnum.CASE_MANAGEMENT }).fullPath}?id=${
query: { activeCaseId.value
id: activeCaseId.value, }`
}, );
});
} }
const submitReviewLoading = ref(false); const submitReviewLoading = ref(false);