9c0249ab by lihua

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

1 parent e08e6a76
...@@ -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({
......
...@@ -176,6 +176,19 @@ const routes: RouteRecordRaw[] = [ ...@@ -176,6 +176,19 @@ const routes: RouteRecordRaw[] = [
176 reuse: true, 176 reuse: true,
177 activeMenu: '/data-meta/reports/iframePage', 177 activeMenu: '/data-meta/reports/iframePage',
178 }, 178 },
179 },
180 {
181 path: 'portraitMaps',
182 name: 'portraitMaps',
183 component: () => import('@/views/data_meta/portraitMap.vue'),
184 meta: {
185 title: '全景地图',
186 sidebar: true,
187 breadcrumb: false,
188 cache: true,
189 reuse: true,
190 activeMenu: '/data-meta/reports/portraitMaps',
191 },
179 } 192 }
180 ] 193 ]
181 }, 194 },
......
...@@ -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!