78d9da31 by lihua

元数据目录支持配置二级目录嵌入bi地址

1 parent 596d182e
......@@ -58,7 +58,7 @@ watch(
const changeTab = (pane: any, ev: any) => {
const tabIndex = Number(pane.index);
const paneData: any = tabbarList.value[tabIndex];
if (paneData.name == 'budgetDataIndex') {
if (paneData.name == 'budgetDataIndex' || paneData.name == 'iframePage') {
router.push(paneData.fullPath);
} else {
router.push({
......
......@@ -147,14 +147,37 @@ const routes: RouteRecordRaw[] = [
component: () => import('@/views/data_catalog/budgetDataIndex.vue'),
meta: {
title: '',
sidebar: false,
// sidebar: false,
breadcrumb: false,
cache: true,
reuse: true
},
}
]
}
},
{
path: '/data-meta/reports',
component: Layout,
meta: {
title: '资源目录',
icon: 'ep:grid',
},
children: [
{
path: 'iframePage',
name: 'iframePage',
component: () => import('@/views/data_meta/budgetDataIndex.vue'),
meta: {
title: '',
sidebar: true,
breadcrumb: false,
cache: true,
reuse: true,
activeMenu: '/data-meta/reports/iframePage',
},
}
]
},
]
export default routes
......
......@@ -174,7 +174,7 @@ const useMenuStore = defineStore(
else {
// 如果是 string 类型,则认为是路由,需要查找对应的主导航索引
const findIndex = allMenus.value.findIndex(item => item.children.some(r => {
if (data== "/data-meta/report/budgetDataIndex" && r.path?.includes('/data-meta/report')) {
if ((data== "/data-meta/reports/iframePage" || data== "/data-meta/report/budgetDataIndex") && r.path?.includes('/data-meta/report')) {
return true;
}
if (data.indexOf(`${r.path}/`) === 0 || data === r.path) {
......
......@@ -156,8 +156,10 @@ const useRouteStore = defineStore(
title: m.productName || m.menuName
};
}
r = routes.find((route: any) => route.path === path || route.path === m.path || `/${route.path}` === m.path || (path.includes('/data-meta/report') && route.path.includes('/data-meta/report')));
if (r && path.includes('budgetDataIndex')) {
r = routes.find((route: any) => {
return route.path === path || route.path === m.path || `/${route.path}` === m.path || ((path.includes('budgetDataIndex') && path.includes('/data-meta/report') && route.path.includes('/data-meta/report')) || (path.includes('iframePage') && path.includes('/data-meta/report')));
});
if (r && (path.includes('budgetDataIndex') || path.includes('iframePage'))) {
r.path = path;
}
if(r && m.icon && m.icon !== "{}") {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!