cfb718d3 by lihua

支持在资源目录下嵌入全景地图

1 parent f9ed3877
...@@ -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' || paneData.name == 'iframePage') { 61 if (paneData.name == 'budgetDataIndex' || paneData.name == 'iframePage' || paneData.name == 'portraitMap' || paneData.name == 'portraitMaps') {
62 router.push(paneData.fullPath); 62 router.push(paneData.fullPath);
63 } else { 63 } else {
64 router.push({ 64 router.push({
......
...@@ -175,6 +175,19 @@ const routes: RouteRecordRaw[] = [ ...@@ -175,6 +175,19 @@ const routes: RouteRecordRaw[] = [
175 reuse: true, 175 reuse: true,
176 activeMenu: '/data-meta/reports/iframePage', 176 activeMenu: '/data-meta/reports/iframePage',
177 }, 177 },
178 },
179 {
180 path: 'portraitMaps',
181 name: 'portraitMaps',
182 component: () => import('@/views/data_meta/portraitMap.vue'),
183 meta: {
184 title: '全景地图',
185 sidebar: true,
186 breadcrumb: false,
187 cache: true,
188 reuse: true,
189 activeMenu: '/data-meta/reports/portraitMaps',
190 },
178 } 191 }
179 ] 192 ]
180 }, 193 },
......
...@@ -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/reports/iframePage" || data== "/data-meta/report/budgetDataIndex") && r.path?.includes('/data-meta/report')) { 177 if ((data== "/data-meta/reports/iframePage" || data == '/data-meta/reports/portraitMaps' || data== "/data-meta/report/budgetDataIndex") && r.path?.includes('/data-meta/report')) {
178 return true; 178 return true;
179 } 179 }
180 if (data== "/data-meta/portraitMap" && r.path?.includes('/data-meta/portraitMap')) { 180 if (data== "/data-meta/portraitMap" && r.path?.includes('/data-meta/portraitMap')) {
......
...@@ -157,7 +157,7 @@ const useRouteStore = defineStore( ...@@ -157,7 +157,7 @@ const useRouteStore = defineStore(
157 }; 157 };
158 } 158 }
159 r = routes.find((route: any) => { 159 r = routes.find((route: any) => {
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')) || (path.includes('/data-meta/portraitMap') && route.path.includes('/data-meta/portraitMap'))); 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')) || (path.includes('portraitMaps') && path.includes('/data-meta/report')) || (path.includes('/data-meta/portraitMap') && route.path.includes('/data-meta/portraitMap')));
161 }); 161 });
162 if (r && (path.includes('budgetDataIndex') || path.includes('iframePage')) || path.includes('portraitMap')) { 162 if (r && (path.includes('budgetDataIndex') || path.includes('iframePage')) || path.includes('portraitMap')) {
163 r.path = path; 163 r.path = path;
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!