From 535e5e06c418d29c2fbdd99773549b0cddbf6928 Mon Sep 17 00:00:00 2001 From: baiqi Date: Fri, 2 Feb 2024 11:53:26 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E5=85=A8=E5=B1=80):=20=E9=9D=A2=E5=8C=85?= =?UTF-8?q?=E5=B1=91=E5=88=A4=E6=96=AD=E8=B0=83=E6=95=B4&=E5=B7=A6?= =?UTF-8?q?=E4=BE=A7=E8=8F=9C=E5=8D=95=E4=BD=8D=E7=BD=AE=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/business/ms-breadcrumb/index.vue | 5 +---- .../src/components/business/ms-menu/index.vue | 15 +++++++++++---- .../src/components/business/ms-top-menu/index.vue | 6 +++--- .../case-management/caseReview/caseDetail.vue | 11 +++++------ 4 files changed, 20 insertions(+), 17 deletions(-) diff --git a/frontend/src/components/business/ms-breadcrumb/index.vue b/frontend/src/components/business/ms-breadcrumb/index.vue index b5b537b273..16de27bf95 100644 --- a/frontend/src/components/business/ms-breadcrumb/index.vue +++ b/frontend/src/components/business/ms-breadcrumb/index.vue @@ -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 { diff --git a/frontend/src/components/business/ms-menu/index.vue b/frontend/src/components/business/ms-menu/index.vue index a3f64f5d4d..269e27a607 100644 --- a/frontend/src/components/business/ms-menu/index.vue +++ b/frontend/src/components/business/ms-menu/index.vue @@ -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 ( (appStore.menuCollapse ? : ), }} > - {renderSubMenu()} - {personalInfoMenu()} +
{renderSubMenu()}
+
{personalInfoMenu()}
{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) { diff --git a/frontend/src/components/business/ms-top-menu/index.vue b/frontend/src/components/business/ms-top-menu/index.vue index 1f3dd39bc1..9560240aa7 100644 --- a/frontend/src/components/business/ms-top-menu/index.vue +++ b/frontend/src/components/business/ms-top-menu/index.vue @@ -95,11 +95,11 @@ setCurrentTopMenu(name as string); return; } - // 切换到没有顶部菜单的路由时,清空顶部菜单 - appStore.setTopMenus([]); - setCurrentTopMenu(''); } } + // 切换到没有顶部菜单的路由时,清空顶部菜单 + appStore.setTopMenus([]); + setCurrentTopMenu(''); }, true); function jumpPath(route: RouteRecordName | undefined) { diff --git a/frontend/src/views/case-management/caseReview/caseDetail.vue b/frontend/src/views/case-management/caseReview/caseDetail.vue index cb06b9cc49..945f88eb75 100644 --- a/frontend/src/views/case-management/caseReview/caseDetail.vue +++ b/frontend/src/views/case-management/caseReview/caseDetail.vue @@ -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);