78d9da31 by lihua

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

1 parent 596d182e
...@@ -58,7 +58,7 @@ watch( ...@@ -58,7 +58,7 @@ watch(
58 const changeTab = (pane: any, ev: any) => { 58 const changeTab = (pane: any, ev: any) => {
59 const tabIndex = Number(pane.index); 59 const tabIndex = Number(pane.index);
60 const paneData: any = tabbarList.value[tabIndex]; 60 const paneData: any = tabbarList.value[tabIndex];
61 if (paneData.name == 'budgetDataIndex') { 61 if (paneData.name == 'budgetDataIndex' || paneData.name == 'iframePage') {
62 router.push(paneData.fullPath); 62 router.push(paneData.fullPath);
63 } else { 63 } else {
64 router.push({ 64 router.push({
......
...@@ -147,14 +147,37 @@ const routes: RouteRecordRaw[] = [ ...@@ -147,14 +147,37 @@ const routes: RouteRecordRaw[] = [
147 component: () => import('@/views/data_catalog/budgetDataIndex.vue'), 147 component: () => import('@/views/data_catalog/budgetDataIndex.vue'),
148 meta: { 148 meta: {
149 title: '', 149 title: '',
150 sidebar: false, 150 // sidebar: false,
151 breadcrumb: false, 151 breadcrumb: false,
152 cache: true, 152 cache: true,
153 reuse: true 153 reuse: true
154 }, 154 },
155 } 155 }
156 ] 156 ]
157 } 157 },
158 {
159 path: '/data-meta/reports',
160 component: Layout,
161 meta: {
162 title: '资源目录',
163 icon: 'ep:grid',
164 },
165 children: [
166 {
167 path: 'iframePage',
168 name: 'iframePage',
169 component: () => import('@/views/data_meta/budgetDataIndex.vue'),
170 meta: {
171 title: '',
172 sidebar: true,
173 breadcrumb: false,
174 cache: true,
175 reuse: true,
176 activeMenu: '/data-meta/reports/iframePage',
177 },
178 }
179 ]
180 },
158 ] 181 ]
159 182
160 export default routes 183 export default routes
......
...@@ -174,7 +174,7 @@ const useMenuStore = defineStore( ...@@ -174,7 +174,7 @@ const useMenuStore = defineStore(
174 else { 174 else {
175 // 如果是 string 类型,则认为是路由,需要查找对应的主导航索引 175 // 如果是 string 类型,则认为是路由,需要查找对应的主导航索引
176 const findIndex = allMenus.value.findIndex(item => item.children.some(r => { 176 const findIndex = allMenus.value.findIndex(item => item.children.some(r => {
177 if (data== "/data-meta/report/budgetDataIndex" && r.path?.includes('/data-meta/report')) { 177 if ((data== "/data-meta/reports/iframePage" || data== "/data-meta/report/budgetDataIndex") && r.path?.includes('/data-meta/report')) {
178 return true; 178 return true;
179 } 179 }
180 if (data.indexOf(`${r.path}/`) === 0 || data === r.path) { 180 if (data.indexOf(`${r.path}/`) === 0 || data === r.path) {
......
...@@ -156,8 +156,10 @@ const useRouteStore = defineStore( ...@@ -156,8 +156,10 @@ const useRouteStore = defineStore(
156 title: m.productName || m.menuName 156 title: m.productName || m.menuName
157 }; 157 };
158 } 158 }
159 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'))); 159 r = routes.find((route: any) => {
160 if (r && path.includes('budgetDataIndex')) { 160 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')));
161 });
162 if (r && (path.includes('budgetDataIndex') || path.includes('iframePage'))) {
161 r.path = path; 163 r.path = path;
162 } 164 }
163 if(r && m.icon && m.icon !== "{}") { 165 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!