feat(全局): 面包屑判断调整&左侧菜单位置调整
This commit is contained in:
parent
b1a48dcd94
commit
535e5e06c4
|
@ -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 {
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue