元数据目录支持配置二级目录嵌入bi地址
Showing
4 changed files
with
30 additions
and
5 deletions
| ... | @@ -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,7 +147,7 @@ const routes: RouteRecordRaw[] = [ | ... | @@ -147,7 +147,7 @@ const routes: RouteRecordRaw[] = [ |
| 147 | component: () => import('@/views/data_meta/budgetDataIndex.vue'), | 147 | component: () => import('@/views/data_meta/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, |
| ... | @@ -155,7 +155,30 @@ const routes: RouteRecordRaw[] = [ | ... | @@ -155,7 +155,30 @@ const routes: RouteRecordRaw[] = [ |
| 155 | }, | 155 | }, |
| 156 | } | 156 | } |
| 157 | ] | 157 | ] |
| 158 | }, | ||
| 159 | { | ||
| 160 | path: '/data-meta/reports', | ||
| 161 | component: Layout, | ||
| 162 | meta: { | ||
| 163 | title: '资源目录', | ||
| 164 | icon: 'ep:grid', | ||
| 165 | }, | ||
| 166 | children: [ | ||
| 167 | { | ||
| 168 | path: 'iframePage', | ||
| 169 | name: 'iframePage', | ||
| 170 | component: () => import('@/views/data_meta/budgetDataIndex.vue'), | ||
| 171 | meta: { | ||
| 172 | title: '', | ||
| 173 | sidebar: true, | ||
| 174 | breadcrumb: false, | ||
| 175 | cache: true, | ||
| 176 | reuse: true, | ||
| 177 | activeMenu: '/data-meta/reports/iframePage', | ||
| 178 | }, | ||
| 158 | } | 179 | } |
| 180 | ] | ||
| 181 | }, | ||
| 159 | ] | 182 | ] |
| 160 | 183 | ||
| 161 | export default routes | 184 | 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 !== "{}") { | ... | ... |
-
Please register or sign in to post a comment